/* ─── TOKENS ─────────────────────────────────────────── */
:root {
  --bg:         #f0f3fa;
  --bg2:        #e8edf7;
  --surface:    #ffffff;
  --surface2:   #f7f9fd;
  --border:     #e1e8f5;
  --border2:    #c8d5ec;

  --navy:       #0d1d3d;
  --blue:       #1d4ed8;
  --blue-soft:  #3b82f6;
  --blue-tint:  #eff6ff;
  --blue-mid:   #dbeafe;

  --emerald:    #059669;
  --emerald-t:  #ecfdf5;
  --rose:       #dc2626;
  --rose-t:     #fef2f2;
  --amber:      #d97706;
  --amber-t:    #fffbeb;
  --violet:     #7c3aed;
  --violet-t:   #f5f3ff;
  --cyan:       #0891b2;
  --cyan-t:     #ecfeff;

  --text:       #0f172a;
  --text2:      #334155;
  --muted:      #64748b;
  --muted2:     #94a3b8;
  --placeholder:#cbd5e1;

  --shadow-sm:  0 1px 3px rgba(15,32,68,0.05), 0 1px 2px rgba(15,32,68,0.03);
  --shadow:     0 8px 24px rgba(15,32,68,0.08), 0 2px 8px rgba(15,32,68,0.04);
  --shadow-lg:  0 20px 60px rgba(15,32,68,0.12), 0 6px 20px rgba(15,32,68,0.06);
  --shadow-glow-blue:   0 8px 32px rgba(29,78,216,0.18);
  --shadow-glow-green:  0 8px 32px rgba(5,150,105,0.18);
  --shadow-glow-red:    0 8px 32px rgba(220,38,38,0.18);
  --shadow-glow-violet: 0 8px 32px rgba(124,58,237,0.18);
  --shadow-glow-amber:  0 8px 32px rgba(217,119,6,0.18);
  --shadow-glow-cyan:   0 8px 32px rgba(8,145,178,0.18);
}

/* ─── BASE ────────────────────────────────────────────── */
body {
  background: var(--bg);

  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* Dot-pattern background */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(148,163,184,0.35) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Ambient light blobs */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(59,130,246,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(16,185,129,0.05) 0%, transparent 55%);
}


.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8 0%, #0891b2 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(29,78,216,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}
.logo-name {

  font-weight: 700; font-size: 19px;
  color: var(--navy); letter-spacing: -0.3px;
}
.logo-name em { color: var(--blue-soft); font-style: normal; }

.header-pills { display: flex; align-items: center; gap: 8px; }
.h-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 20px;
  font-size: 11.5px; font-weight: 500;
 
  border: 1px solid var(--border2);
  color: var(--muted); background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 2px rgba(5,150,105,0.2);
  animation: blink 2.2s ease infinite;
}
@keyframes blink { 0%,100%{opacity:1;box-shadow:0 0 0 2px rgba(5,150,105,0.2)} 50%{opacity:.5;box-shadow:0 0 0 4px rgba(5,150,105,0.08)} }
.h-pill.live { color: var(--emerald); border-color: rgba(5,150,105,0.3); background: rgba(236,253,245,0.8); }

/* ─── MAIN ────────────────────────────────────────────── */
main {
  position: relative; z-index: 1;
  max-width: 1560px; margin: 0 auto;
  padding: 28px 32px 56px;
}

/* ─── PAGE HERO ──────────────────────────────────────── */
.page-hero {
  margin-bottom: 28px;
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.page-eyebrow {
 
  font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--blue-soft); margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.page-eyebrow::before { content:''; display:block; width:20px; height:2px; background: linear-gradient(90deg,var(--blue),var(--blue-soft)); border-radius:2px; }
.page-title {
  
  font-weight: 800; font-size: 32px;
  color: var(--navy); letter-spacing: -0.5px; line-height: 1.1;
}
.page-sub { font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 300; }
.update-tag {
  font-size: 11px; color: var(--muted);
 
  background: rgba(255,255,255,0.8); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 10px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

/* ─── FILTER BAR ─────────────────────────────────────── */
.filter-bar {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.9);
  border-bottom-color: var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,1);
  padding: 16px 22px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-label {
 
  font-size: 9px; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--muted2); font-weight: 500;
}
select {
  appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--border2);
  border-radius: 10px;
  color: var(--text2);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12.5px; font-weight: 500;
  padding: 7px 28px 7px 12px;
  cursor: pointer; outline: none;
  transition: border-color .18s, box-shadow .18s;
  min-width: 120px;
  box-shadow: 0 1px 3px rgba(15,32,68,0.06);
}
select:focus { border-color: var(--blue-soft); box-shadow: 0 0 0 3px rgba(59,130,246,0.14); }
select option { background: #fff; }

.filter-sep { width: 1px; height: 36px; background: var(--border); flex-shrink: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
  cursor: pointer; border: 1.5px solid var(--border2);
  background: rgba(255,255,255,0.7); color: var(--muted);
  transition: all .18s; white-space: nowrap;
}
.chip.active {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-soft) 100%);
  border-color: transparent; color: #fff;
  box-shadow: 0 3px 10px rgba(29,78,216,0.25);
}
.chip:hover:not(.active) { border-color: var(--blue-soft); color: var(--blue-soft); background: var(--blue-tint); }

/* ─── KPI STRIP ──────────────────────────────────────── */
.kpi-strip {
  display: grid; grid-template-columns: repeat(6,1fr); gap: 14px;
  margin-bottom: 24px;
}

/* Modern glass KPI card */
.kpi {
  position: relative; overflow: hidden;
  border-radius: 20px;
  padding: 20px 20px 16px;
  cursor: default;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease;
  /* Frosted glass */
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  /* Gradient border via box-shadow + pseudo */
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.8);
}
.kpi::before {
  /* Gradient border top stripe */
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: 20px 20px 0 0;
}
.kpi::after {
  /* Ambient orb glow */
  content: '';
  position: absolute; bottom: -20px; right: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  opacity: 0.12;
  transition: opacity .3s;
}
.kpi:hover { transform: translateY(-3px) scale(1.01); }
.kpi:hover::after { opacity: 0.22; }

/* Per-colour orbs and stripes */
.kpi.c-blue::before  { background: linear-gradient(90deg,#1d4ed8,#60a5fa); }
.kpi.c-blue::after   { background: radial-gradient(circle, #3b82f6, transparent 70%); }
.kpi.c-blue:hover    { box-shadow: var(--shadow-glow-blue), inset 0 1px 0 rgba(255,255,255,0.95); }

.kpi.c-green::before { background: linear-gradient(90deg,#059669,#34d399); }
.kpi.c-green::after  { background: radial-gradient(circle, #10b981, transparent 70%); }
.kpi.c-green:hover   { box-shadow: var(--shadow-glow-green), inset 0 1px 0 rgba(255,255,255,0.95); }

.kpi.c-red::before   { background: linear-gradient(90deg,#dc2626,#f87171); }
.kpi.c-red::after    { background: radial-gradient(circle, #ef4444, transparent 70%); }
.kpi.c-red:hover     { box-shadow: var(--shadow-glow-red), inset 0 1px 0 rgba(255,255,255,0.95); }

.kpi.c-violet::before{ background: linear-gradient(90deg,#7c3aed,#a78bfa); }
.kpi.c-violet::after { background: radial-gradient(circle, #8b5cf6, transparent 70%); }
.kpi.c-violet:hover  { box-shadow: var(--shadow-glow-violet), inset 0 1px 0 rgba(255,255,255,0.95); }

.kpi.c-amber::before { background: linear-gradient(90deg,#d97706,#fbbf24); }
.kpi.c-amber::after  { background: radial-gradient(circle, #f59e0b, transparent 70%); }
.kpi.c-amber:hover   { box-shadow: var(--shadow-glow-amber), inset 0 1px 0 rgba(255,255,255,0.95); }

.kpi.c-cyan::before  { background: linear-gradient(90deg,#0891b2,#22d3ee); }
.kpi.c-cyan::after   { background: radial-gradient(circle, #06b6d4, transparent 70%); }
.kpi.c-cyan:hover    { box-shadow: var(--shadow-glow-cyan), inset 0 1px 0 rgba(255,255,255,0.95); }

/* KPI inner layout */
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }

.kpi-icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.kpi.c-blue   .kpi-icon { background: linear-gradient(135deg,#dbeafe,#eff6ff); }
.kpi.c-green  .kpi-icon { background: linear-gradient(135deg,#d1fae5,#ecfdf5); }
.kpi.c-red    .kpi-icon { background: linear-gradient(135deg,#fee2e2,#fef2f2); }
.kpi.c-violet .kpi-icon { background: linear-gradient(135deg,#ede9fe,#f5f3ff); }
.kpi.c-amber  .kpi-icon { background: linear-gradient(135deg,#fef3c7,#fffbeb); }
.kpi.c-cyan   .kpi-icon { background: linear-gradient(135deg,#cffafe,#ecfeff); }

/* Mini sparkline area in top-right */
.kpi-spark { width: 52px; height: 28px; opacity: 0.7; }

.kpi-label { font-size: 10.5px; color: var(--muted); font-weight: 600; letter-spacing: .2px; margin-bottom: 2px; text-transform: uppercase; }
.kpi-value {
  
  font-weight: 800; font-size: 30px; line-height: 1.05;
  color: var(--navy); margin-bottom: 6px; letter-spacing: -0.5px;
}
.kpi-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(226,232,240,0.6);
}
.kpi-trend { font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 3px; }
.t-up   { color: var(--emerald); }
.t-down { color: var(--rose); }
.t-flat { color: var(--muted); }
.kpi-sub { font-size: 10px; color: var(--muted2); }


/* Card inner shimmer on hover */
.card::after {
  content: '';
  position: absolute; inset: 0; border-radius: 20px;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.35) 50%, transparent 60%);
  background-size: 200% 100%;
  background-position: -100% 0;
  transition: background-position .5s ease;
  pointer-events: none; z-index: 0;
}
.card:hover::after { background-position: 100% 0; }

.card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px; gap: 10px;
}
.card-title {
  
  font-weight: 700; font-size: 15px;
  color: var(--navy); letter-spacing: -0.2px; line-height: 1.2;
}
.card-meta { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* Floating badge */
.badge {
 
  font-size: 10px; font-weight: 600;
  padding: 4px 10px; border-radius: 8px;
  white-space: nowrap; letter-spacing: .2px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.badge-blue   { background: linear-gradient(135deg,#dbeafe,#eff6ff); color: #1d4ed8 !important; border: 1px solid rgba(29,78,216,0.15); width: auto !important;}
.badge-green  { background: linear-gradient(135deg,#d1fae5,#ecfdf5); color: #059669 !important; border: 1px solid rgba(5,150,105,0.15); }
.badge-red    { background: linear-gradient(135deg,#fee2e2,#fef2f2); color: #dc2626 !important; border: 1px solid rgba(220,38,38,0.15); }
.badge-amber  { background: linear-gradient(135deg,#fef3c7,#fffbeb); color: #d97706 !important; border: 1px solid rgba(217,119,6,0.15); }
.badge-violet { background: linear-gradient(135deg,#ede9fe,#f5f3ff); color: #7c3aed !important; border: 1px solid rgba(124,58,237,0.15); }

canvas { display: block; width: 100% !important; }

/* ─── TABLE ──────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; border-radius: 12px; }
.tbl-wrap::-webkit-scrollbar { height: 5px; }
.tbl-wrap::-webkit-scrollbar-track { background: var(--bg2); border-radius: 3px; }
.tbl-wrap::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

table { width: 100%; border-collapse: separate; border-spacing: 0; }
thead th {
 
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .9px;
  color: var(--muted2); font-weight: 600;
  padding: 10px 14px; text-align: left;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
  background: linear-gradient(180deg, var(--surface2) 0%, rgba(248,250,253,0) 100%);
}
thead th:first-child { border-radius: 10px 0 0 0; }
thead th:last-child  { border-radius: 0 10px 0 0; }

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(225,232,245,0.6);
  color: var(--text2); font-size: 12.5px;
  vertical-align: middle;
  transition: background .12s;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(239,246,255,0.5); }
td.bold { font-weight: 600; color: var(--text); }
td.mono { font-size: 11.5px; }

/* ─── STATUS PILL ────────────────────────────────────── */
.spill {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700;
 
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.spill-g { background: linear-gradient(135deg,#d1fae5,#ecfdf5); color: var(--emerald); border: 1px solid rgba(5,150,105,0.15); }
.spill-a { background: linear-gradient(135deg,#fef3c7,#fffbeb); color: var(--amber);   border: 1px solid rgba(217,119,6,0.15); }
.spill-r { background: linear-gradient(135deg,#fee2e2,#fef2f2); color: var(--rose);    border: 1px solid rgba(220,38,38,0.15); }

/* ─── PAYER LEGEND ───────────────────────────────────── */
.payer-legend { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.leg-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.leg-left { display: flex; align-items: center; gap: 10px; }
.leg-dot { width: 10px; height: 10px; border-radius: 4px; flex-shrink: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.leg-name { font-size: 12px; color: var(--text2); font-weight: 500; }
.leg-right { text-align: right; display: flex; align-items: center; gap: 10px; }
.leg-pct { font-size: 12px; color: var(--text); font-weight: 600; min-width: 34px; }
.leg-bar-track { height: 4px; background: var(--border); border-radius: 3px; width: 80px; overflow: hidden; }
.leg-bar-fill  { height: 100%; border-radius: 3px; transition: width .8s cubic-bezier(.34,1.2,.64,1); }

/* ─── PROGRESS ───────────────────────────────────────── */
.prog-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid rgba(225,232,245,0.6);
}
.prog-row:last-child { border-bottom: none; }
.prog-label { font-size: 12px; color: var(--text2); font-weight: 600; width: 130px; flex-shrink: 0; }
.prog-track {
  flex: 1; height: 8px;
  background: var(--bg2); border-radius: 10px; overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(15,32,68,0.06);
}
.prog-fill { height: 100%; border-radius: 10px; transition: width 1s cubic-bezier(.34,1.2,.64,1); }
.prog-val { font-size: 11.5px; color: var(--text); font-weight: 600; width: 42px; text-align: right; }

/* ─── DENIAL LIST ────────────────────────────────────── */
.denial-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid rgba(225,232,245,0.6);
  transition: background .12s;
}
.denial-item:last-child { border-bottom: none; }
.denial-item:hover { background: rgba(239,246,255,0.4); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.denial-rank {
  
  font-size: 20px; font-weight: 800;
  color: var(--placeholder); width: 28px; flex-shrink: 0; line-height: 1.1;
}
.denial-body { flex: 1; }
.denial-title { font-size: 12.5px; color: var(--text); font-weight: 600; margin-bottom: 3px; line-height: 1.35; }
.denial-code { font-size: 10px; color: var(--muted2); }
.denial-count {
  
  font-size: 20px; font-weight: 800; color: var(--rose); flex-shrink: 0;
}

/* ─── HEATMAP ────────────────────────────────────────── */
.hm-wrap { overflow-x: auto; padding-bottom: 4px; }
.hm-grid { display: grid; grid-template-columns: 52px repeat(12, 1fr); gap: 4px; min-width: 560px; }
.hm-h { font-size: 9.5px; color: var(--muted2); display: flex; align-items: center; justify-content: center; padding-bottom: 2px; }
.hm-yl { font-size: 10px; color: var(--muted); display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; }
.hm-cell {
  height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
 
  font-size: 9px; cursor: pointer;
  transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s;
  border: 1px solid rgba(255,255,255,0.4);
}
.hm-cell:hover { transform: scale(1.15); z-index: 5; box-shadow: 0 6px 20px rgba(29,78,216,0.2); border-color: rgba(255,255,255,0.7); }

.hm-legend { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 10px; color: var(--muted2); }
.hm-swatch { display: flex; gap: 3px; }
.hm-sw { width: 20px; height: 9px; border-radius: 3px; border: 1px solid rgba(255,255,255,0.3); }

/* ─── SECTION DIVIDER ────────────────────────────────── */
.section-head { display: flex; align-items: center; gap: 12px; margin: 30px 0 18px; }
.section-head::after { content:''; flex:1; height:1px; background: linear-gradient(90deg, var(--border), transparent); }
.section-label {
 
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--muted); white-space: nowrap; font-weight: 600;
  background: linear-gradient(135deg,var(--blue),var(--blue-soft));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ─── PAYER TYPE TAG ─────────────────────────────────── */
.ptype {
 
  font-size: 10px; padding: 3px 9px; border-radius: 7px;
  font-weight: 600; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ─── FOOTER ─────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 22px 32px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  position: relative; z-index: 1;
}
.footer-logo {  font-size: 14px; font-weight: 700; color: var(--navy); }
.footer-logo em { color: var(--blue-soft); font-style: normal; }
.footer-meta { font-size: 11px; color: var(--muted2); }



.payer-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}
.leg-row {
   display: flex;
    align-items: center;
    justify-content: space-between;
}
.card.accent-blue {
    border-left: 3px solid var(--blue);
}

