@charset "UTF-8";
:root{
  /* Brand + semantic colors — UNCHANGED so existing consumers (KPI variants,
     tags, alerts, login gradient, button hovers) keep their current look. */
  --teal:#006B6B;--teal-dark:#004F4F;--teal-light:#E6F4F4;--teal-mid:#009999;
  --gold:#C9A84C;--gold-light:#FFF8E8;--red:#C0392B;--red-light:#FDEDEC;
  --green:#27AE60;--green-light:#EAFAF1;--blue:#1A5276;--blue-light:#EBF5FB;
  --orange:#E67E22;--orange-light:#FEF5E7;--purple:#6C3483;

  /* Quick-wins 2026-05-26 — warm-calm direction.
     Only neutral surface/border/text + shadow tokens shifted; brand tokens
     above stay identical so KPI variants, tags, alerts, buttons keep working
     and inline `style="color:var(--teal-dark)"` references still resolve. */
  --sidebar-w:244px;
  --bg:#FAF7F1;        /* was #EFF4F4 — warm cream */
  --surface:#FFFCF7;   /* was #fff       — warm white */
  --border:#E7E1D4;    /* was #D5E8E8    — warm stone */
  --text:#2A251D;      /* was #1A2E2E    — warm near-black */
  --muted:#6B6256;     /* was #5A7A7A    — warm stone, AA contrast on cream */
  --r:10px;
  --sh:0 1px 3px rgba(74,60,40,0.06), 0 1px 1px rgba(74,60,40,0.04);   /* warm-tinted, was cold-teal */
  --sh-lg:0 16px 40px rgba(74,60,40,0.14), 0 6px 16px rgba(74,60,40,0.06);
}
*{margin:0;padding:0;box-sizing:border-box;}
body{font-family:'DM Sans',sans-serif;background:var(--bg);color:var(--text);min-height:100vh;display:flex;font-size:14px;line-height:1.5;}  /* base 15->14px (2026-06-01): app rendered ~15% larger than Ann's 13px mockup → felt "zoomed in"; 14px gentle global zoom-out */

/* A11y focus ring — applies only to keyboard focus (:focus-visible) so mouse
   clicks on buttons don't get a ring. Scoped tightly so we don't interfere
   with intentional outline:none on text inputs that already style their focus. */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-item:focus-visible,
.lbtn:focus-visible{
  outline:2px solid var(--teal);
  outline-offset:2px;
  border-radius:6px;
}

/* SIDEBAR — warm-calm 2026-05-26
   Direct background override (NOT var(--teal-dark)) so the login screen's
   gradient and .btn-p:hover keep their existing teal-dark color. Text uses
   warm off-white (#F3EEE5) instead of pure #fff to reduce glare on long shifts. */
#sidebar{width:var(--sidebar-w);background:#2C2A23;min-height:100vh;display:flex;flex-direction:column;position:fixed;left:0;top:0;bottom:0;z-index:100;overflow-y:auto;}
.logo-area{padding:18px 16px 14px;border-bottom:1px solid rgba(243,238,229,0.08);}
.logo-area h1{color:#F3EEE5;font-size:16px;font-weight:700;}
.logo-area p{color:rgba(243,238,229,0.55);font-size:11px;margin-top:2px;}
.prov-badge{margin:12px;background:rgba(243,238,229,0.07);border-radius:8px;padding:10px 12px;}
.prov-badge .pname{color:#F3EEE5;font-size:13px;font-weight:600;}
.prov-badge label{color:rgba(243,238,229,0.55);font-size:10px;display:block;margin-top:6px;}
.prov-badge select{background:transparent;border:none;color:rgba(243,238,229,0.85);font-size:12px;cursor:pointer;outline:none;width:100%;margin-top:2px;}
.prov-badge select option{color:#000;background:#fff;}
nav{flex:1;padding:8px 0;}
.nav-sec{padding:14px 16px 4px;font-size:10px;text-transform:uppercase;letter-spacing:1px;color:rgba(243,238,229,0.45);font-weight:600;}
.nav-item{display:flex;align-items:center;gap:11px;padding:10px 18px 10px 15px;cursor:pointer;color:rgba(243,238,229,0.72);font-size:13px;transition:background var(--duration-fast,150ms) ease-out,color var(--duration-fast,150ms) ease-out,border-color var(--duration-fast,150ms) ease-out;border-left:3px solid transparent;font-weight:500;}
.nav-item:hover{background:rgba(243,238,229,0.06);color:#F3EEE5;}
.nav-item.active{background:rgba(243,238,229,0.12);color:#F3EEE5;border-left-color:var(--gold);font-weight:600;padding-left:15px;}
.ni{width:16px;text-align:center;font-size:14px;}
.nbadge{margin-left:auto;background:var(--red);color:#fff;font-size:10px;font-weight:700;border-radius:10px;padding:1px 6px;}
.sfooter{padding:12px 16px;border-top:1px solid rgba(243,238,229,0.08);}
.lbtn{color:rgba(243,238,229,0.55);font-size:12px;cursor:pointer;padding:4px 0;display:block;}
.lbtn:hover{color:#F3EEE5;}

/* MAIN */
#main{margin-left:var(--sidebar-w);flex:1;display:flex;flex-direction:column;min-height:100vh;min-width:0;}
.topbar{background:var(--surface);border-bottom:1px solid var(--border);padding:0 26px;height:48px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:50;}
.tl{display:flex;align-items:center;gap:10px;line-height:1.2;}
.back-btn{display:none;align-items:center;gap:5px;padding:5px 12px;border-radius:6px;font-size:12px;font-weight:700;cursor:pointer;border:2px solid var(--teal);background:var(--teal-light);color:var(--teal);font-family:'DM Sans',sans-serif;}
.back-btn:hover{background:var(--teal);color:#fff;}
#page-title{font-size:15px;font-weight:700;color:var(--text);line-height:1.2;}
.bc{display:flex;align-items:center;gap:4px;font-size:10.5px;color:var(--muted);margin-top:0;}
.bc-link{color:var(--teal);cursor:pointer;font-weight:500;}
.bc-link:hover{text-decoration:underline;}
.bc-sep{color:var(--border);}
.bc-cur{color:var(--text);font-weight:600;}
.tr{display:flex;align-items:center;gap:10px;}
.ipa-badge{background:var(--teal-light);color:var(--teal);padding:4px 10px;border-radius:20px;font-size:11px;font-weight:600;}
.content{padding:20px 26px;flex:1;min-width:0;scrollbar-gutter:stable;}  /* min-width:0 lets flex item shrink so children with overflow:auto can scroll instead of pushing the layout wider than the viewport. scrollbar-gutter:stable reserves the scrollbar track so content width doesn't jump when switching between short/tall tabs. */
/* CONSISTENCY (2026-06-01): the Worklist sub-tab previously went edge-to-edge
   (.content padding 14px 0 0 + 18px insets), so switching Dashboard<->Worklist
   <->Tracker visibly shifted the left margin. Removed — all three HRCM sub-views
   now share the same .content gutter. The worklist table is simplified to the
   mockup's column set, so it fits the gutter without needing full bleed. */

/* LOGIN */
#login-screen{position:fixed;inset:0;background:linear-gradient(135deg,var(--teal-dark),var(--teal));display:flex;align-items:center;justify-content:center;z-index:999;}
html.has-token #login-screen{display:none;}
.lcard{background:#fff;border-radius:var(--r);padding:40px;width:400px;box-shadow:var(--sh-lg);}
.llogo{text-align:center;margin-bottom:28px;}
.llogo h1{font-size:20px;font-weight:700;color:var(--teal-dark);}
.llogo p{color:var(--muted);font-size:12px;margin-top:4px;}
.fg{margin-bottom:14px;}
.fg label{display:block;font-size:11px;font-weight:600;color:var(--muted);margin-bottom:5px;}
.fg input,.fg select,.fg textarea,.ti{width:100%;padding:9px 12px;border:1px solid var(--border);border-radius:6px;font-size:13px;font-family:inherit;outline:none;transition:border .15s;background:#fff;color:var(--text);}
.fg input::placeholder,.fg textarea::placeholder,.ti::placeholder{color:#aaa;}
.fg input:focus,.fg select:focus,.ti:focus{border-color:var(--teal);}
.fg select option{color:#000;background:#fff;}
.role-sel{display:flex;gap:8px;}
.role-opt{flex:1;border:1px solid var(--border);border-radius:6px;padding:10px;text-align:center;cursor:pointer;transition:all .15s;font-size:13px;font-weight:500;color:var(--muted);}
.role-opt.sel{border-color:var(--teal);background:var(--teal-light);color:var(--teal);}

/* CARDS */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);box-shadow:var(--sh);padding:18px 20px;margin-bottom:14px;}
.card-hdr{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;gap:12px;}
.card-title{font-size:14px;font-weight:700;color:var(--text);letter-spacing:-0.1px;}

/* KPI */
.kpi{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:18px;box-shadow:var(--sh);border-left:3px solid rgba(0,107,107,0.30);cursor:pointer;transition:box-shadow var(--duration-fast,150ms) ease-out,transform var(--duration-fast,150ms) ease-out,border-color var(--duration-fast,150ms) ease-out;}
.kpi:hover{box-shadow:var(--sh-lg);transform:translateY(-1px);border-left-color:rgba(0,107,107,0.55);}
/* KPI variant classes (gold/blue/green/red/orange/purple/teal) are intentionally
   neutralized — keeps the JS renderer code working (it still emits class="kpi gold")
   but every rail reads the same calm warm-teal so color is reserved for actual
   status, not decoration. Was a rainbow of 6 different colors across 19 KPIs. */
.kpi.gold,.kpi.blue,.kpi.green,.kpi.red,.kpi.orange,.kpi.purple,.kpi.teal{border-left-color:rgba(0,107,107,0.30);}
.kpi-n{font-size:28px;font-weight:700;font-family:'DM Mono',monospace;line-height:1.05;color:var(--text);letter-spacing:-0.5px;}
.kpi-l{font-size:12px;color:var(--muted);margin-top:8px;text-transform:uppercase;letter-spacing:0.4px;font-weight:600;line-height:1.35;}
.kpi-s{font-size:11px;color:var(--teal);margin-top:6px;font-weight:600;line-height:1.35;}
.akpi{border-radius:var(--r);padding:16px;box-shadow:var(--sh);cursor:pointer;transition:box-shadow .15s;}
.akpi:hover{box-shadow:var(--sh-lg);}
.akpi .kpi-n,.akpi .kpi-l,.akpi .kpi-s{color:#fff;}

/* TABLE */
table{width:100%;border-collapse:collapse;font-size:13px;}
thead th{background:var(--teal-light);color:var(--teal-dark);font-weight:600;padding:10px 12px;text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.5px;position:sticky;top:0;z-index:5;}
tbody tr{border-bottom:1px solid var(--border);}
tbody tr:hover{background:rgba(0,107,107,0.06);}  /* was var(--teal-light) — softer on warm bg */
tbody td{padding:10px 12px;vertical-align:middle;}
.tag{display:inline-flex;align-items:center;padding:3px 9px;border-radius:999px;font-size:11px;font-weight:600;line-height:1.4;letter-spacing:0.1px;white-space:nowrap;}
.tg{background:var(--green-light);color:var(--green);}
.tr2{background:var(--red-light);color:var(--red);}
.to{background:var(--gold-light);color:var(--gold);}
.tb{background:var(--blue-light);color:var(--blue);}
.toa{background:var(--orange-light);color:var(--orange);}
.tgr{background:var(--border);color:var(--muted);}

/* BUTTONS */
.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none;transition:background-color var(--duration-fast,150ms) ease-out,box-shadow var(--duration-fast,150ms) ease-out,transform var(--duration-fast,150ms) ease-out;font-family:inherit;line-height:1.2;}
.btn:active{transform:translateY(1px);}
.btn-p{background:var(--teal);color:#fff;box-shadow:0 1px 0 rgba(0,0,0,0.04);}.btn-p:hover{background:var(--teal-dark);}
.btn-g{background:transparent;color:var(--teal);border:1px solid var(--teal);}.btn-g:hover{background:var(--teal-light);}
.btn-sm{padding:6px 11px;font-size:12px;border-radius:7px;}
.w-full{width:100%;justify-content:center;}

/* MODALS */
.modal-ov{position:fixed;inset:0;background:rgba(0,0,0,0.45);z-index:500;display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:opacity .15s;}
.modal-ov.open{opacity:1;pointer-events:all;}
.modal{background:var(--surface);border-radius:var(--r);width:93%;max-width:680px;max-height:88vh;overflow-y:auto;box-shadow:var(--sh-lg);transform:translateY(12px);transition:transform .15s;}
.modal-ov.open .modal{transform:translateY(0);}
.mhdr{padding:16px 20px 12px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:var(--surface);z-index:1;}
.mtitle{font-size:15px;font-weight:700;color:var(--text);}
.mx{font-size:20px;cursor:pointer;color:var(--muted);border:none;background:none;line-height:1;}
.mx:hover{color:var(--red);}
.mbody{padding:16px 20px;max-height:65vh;overflow-y:auto;}
.mftr{padding:12px 20px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:8px;position:sticky;bottom:0;background:var(--surface);}

/* ═══ ALERTS ═══ */
.al{border-radius:8px;padding:10px 14px;margin-bottom:12px;font-size:13px;display:flex;align-items:flex-start;gap:9px;}
.al-i{background:var(--blue-light);color:var(--blue);border-left:3px solid var(--blue);}
.al-w{background:var(--gold-light);color:var(--gold);border-left:3px solid var(--gold);}
.al-s{background:var(--green-light);color:var(--green);border-left:3px solid var(--green);}
.al-e{background:var(--red-light);color:var(--red);border-left:3px solid var(--red);}

/* ═══ CHARTS ═══ */
.cwrap{display:flex;align-items:flex-end;gap:5px;padding:6px 0 26px;height:170px;}
.bar{flex:1;border-radius:4px 4px 0 0;position:relative;min-width:16px;}
.bv{position:absolute;top:-18px;left:50%;transform:translateX(-50%);font-size:10px;font-weight:700;color:var(--text);white-space:nowrap;}
.bl{position:absolute;bottom:-20px;left:50%;transform:translateX(-50%);font-size:10px;color:var(--muted);white-space:nowrap;font-weight:500;}

/* ═══ GRIDS ═══ */
.g2{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.g3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;}
.g4{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:14px;}
.g5{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr;gap:12px;}

/* PA FORM */
.pagrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.pasec{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.8px;color:var(--teal-dark);background:var(--teal-light);padding:7px 11px;border-radius:6px;margin:14px 0 8px;grid-column:1/-1;border-left:2px solid var(--teal);}

/* AWE FORM */
.awesec{border:1px solid var(--border);border-radius:10px;margin-bottom:10px;overflow:hidden;}
.awehdr{background:var(--teal-light);color:var(--teal-dark);border-bottom:1px solid var(--border);padding:10px 14px;font-size:13px;font-weight:700;cursor:pointer;display:flex;justify-content:space-between;align-items:center;}
.awebody{padding:14px;}
.cbgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:5px;}
.cbi{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--text);}

/* MISC */
.sdot{width:7px;height:7px;border-radius:50%;display:inline-block;margin-right:3px;}
.s-p{background:var(--gold);}.s-a{background:var(--green);}.s-d{background:var(--red);}.s-c{background:var(--muted);}
.upload-zone{border:2px dashed var(--border);border-radius:var(--r);padding:28px;text-align:center;cursor:pointer;transition:all .15s;background:var(--teal-light);color:var(--muted);}
.upload-zone:hover{border-color:var(--teal);color:var(--text);}
.cred-item{display:flex;align-items:center;justify-content:space-between;padding:11px;border:1px solid var(--border);border-radius:8px;margin-bottom:7px;background:var(--surface);}
.pie-legend{display:flex;flex-direction:column;gap:6px;justify-content:center;}
.pie-li{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--text);}
.pie-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;}
.tsm{font-size:12px;}.tmuted{color:var(--muted);}

/* COMPLIANCE */
.training-card{border:1px solid var(--border);border-radius:var(--r);padding:15px 16px;margin-bottom:10px;display:flex;align-items:center;gap:14px;transition:all .15s;cursor:pointer;background:var(--surface);}
.training-card:hover{border-color:var(--teal);background:var(--teal-light);}
.training-card.attested{border-color:var(--green);background:var(--green-light);}
.training-card.attested:hover{background:var(--green-light);}
.tc-icon{font-size:22px;flex-shrink:0;width:42px;height:42px;border-radius:var(--r);display:flex;align-items:center;justify-content:center;background:var(--teal-light);}
.tc-icon.done{background:var(--green-light);}
.tc-body{flex:1;}
.tc-title{font-weight:700;font-size:13px;color:var(--text);}
.tc-meta{font-size:11px;color:var(--muted);margin-top:2px;}
.tc-sig{font-size:11px;color:var(--green);font-weight:600;margin-top:4px;}
.tc-actions{display:flex;gap:7px;flex-shrink:0;}
.iframe-wrap{border:1px solid var(--border);border-radius:10px;overflow:hidden;margin-bottom:14px;}
.iframe-wrap iframe{width:100%;height:420px;border:none;display:block;}
.attest-box{background:var(--teal-light);border:1px solid var(--teal);border-radius:var(--r);padding:16px 18px;}
.attest-box .attest-title{font-weight:700;color:var(--teal-dark);margin-bottom:11px;font-size:13px;}
.sig-line{border-bottom:2px solid var(--teal);margin-top:4px;padding-bottom:3px;font-family:'DM Mono',monospace;font-size:13px;color:var(--text);}

/* SKELETON */
.sk{border-radius:6px;background:var(--border);position:relative;overflow:hidden;}
.sk::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(0,107,107,0.08) 50%,transparent 100%);animation:sk-shimmer 1.4s ease-in-out infinite;}
@keyframes sk-shimmer{0%{transform:translateX(-100%);}100%{transform:translateX(100%);}}
.sk-text{height:13px;margin-bottom:8px;}
.sk-text.w60{width:60%;}.sk-text.w40{width:40%;}.sk-text.w80{width:80%;}.sk-text.w50{width:50%;}.sk-text.w30{width:30%;}.sk-text.w70{width:70%;}
.sk-title{height:18px;width:45%;margin-bottom:12px;}
.sk-kpi{border-radius:var(--r);padding:18px;background:var(--surface);box-shadow:var(--sh);border-left:3px solid var(--border);}
.sk-kpi .sk-num{height:28px;width:50%;margin-bottom:8px;}
.sk-kpi .sk-lbl{height:11px;width:70%;}
.sk-kpi .sk-sub{height:10px;width:55%;margin-top:6px;}
.sk-card{background:var(--surface);border-radius:var(--r);box-shadow:var(--sh);padding:18px;margin-bottom:14px;}
.sk-row{display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border);}
.sk-row:last-child{border-bottom:none;}
.sk-avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;}
.sk-cell{flex:1;}
.sk-banner{height:90px;border-radius:var(--r);margin-bottom:14px;background:var(--teal-light);position:relative;overflow:hidden;}
.sk-banner::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(0,107,107,0.06) 50%,transparent 100%);animation:sk-shimmer 1.4s ease-in-out infinite;}
.sk-chart{height:180px;border-radius:8px;margin-top:12px;}
.sk-tab-bar{display:flex;gap:4px;margin-bottom:14px;}
.sk-tab{height:34px;width:100px;border-radius:7px 7px 0 0;}
.sk-hero-kpi{border-radius:var(--r);padding:18px 16px;background:var(--surface);box-shadow:var(--sh);border-left:3px solid var(--border);text-align:center;}
.sk-hero-kpi .sk-num{height:28px;width:60%;margin:0 auto 8px;}
.sk-hero-kpi .sk-lbl{height:10px;width:50%;margin:0 auto;}
.loading-wrap{display:flex;align-items:center;justify-content:center;padding:48px 0;}
.loading-dot{width:12px;height:12px;border-radius:50%;background:var(--teal-light);animation:pulse-dot 0.9s ease-in-out infinite;}
@keyframes pulse-dot{0%,100%{transform:scale(0.8);opacity:0.4;}50%{transform:scale(1.2);opacity:1;background:var(--teal);}}

/* PAGINATION */
.pager{display:flex;align-items:center;gap:5px;margin-top:14px;justify-content:center;}
.pager button{border:1px solid var(--border);background:var(--surface);border-radius:6px;padding:5px 10px;font-size:12px;font-weight:600;font-family:inherit;cursor:pointer;transition:all .12s;color:var(--text);}
.pager button:hover:not(:disabled){background:var(--teal-light);border-color:var(--teal);color:var(--teal);}
.pager button.pg-active{background:var(--teal);color:#fff;border-color:var(--teal);}
.pager button:disabled{opacity:0.35;cursor:default;}
.pager .pg-info{font-size:11px;color:var(--muted);margin:0 6px;}

/* CASE MANAGEMENT */
.cm-header{background:var(--red-light);border:1px solid var(--red);color:var(--text);border-radius:var(--r);padding:20px 24px;margin-bottom:18px;}
.cm-header h2{font-size:18px;font-weight:700;margin-bottom:4px;color:var(--red);}
.cm-header p{font-size:12px;color:var(--muted);}
.risk-badge{display:inline-flex;align-items:center;gap:5px;background:var(--surface);border-radius:20px;padding:3px 10px;font-size:11px;font-weight:700;margin-right:6px;}
.cm-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);box-shadow:var(--sh);margin-bottom:14px;overflow:hidden;}
.cm-card-hdr{padding:12px 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);background:var(--teal-light);}
.cm-card-title{font-weight:700;font-size:13px;color:var(--teal-dark);}
.case-row{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--border);cursor:pointer;transition:background .12s;}
.case-row:hover{background:var(--teal-light);}
.case-row:last-child{border-bottom:none;}
.case-avatar{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0;}
.case-info{flex:1;min-width:0;}
.case-name{font-weight:700;font-size:13px;color:var(--text);}
.case-meta{font-size:11px;color:var(--muted);margin-top:2px;}
.case-tags{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px;}
.risk-tag{font-size:10px;font-weight:700;padding:2px 7px;border-radius:10px;}
.risk-hi{background:rgba(248,113,113,0.15);color:var(--red);border:1px solid rgba(248,113,113,0.2);}
.risk-cancer{background:rgba(167,139,250,0.15);color:var(--purple);border:1px solid rgba(167,139,250,0.2);}
.risk-readmit{background:rgba(251,146,60,0.15);color:var(--orange);border:1px solid rgba(251,146,60,0.2);}
.alert-dot{width:8px;height:8px;border-radius:50%;background:var(--red);flex-shrink:0;animation:pulse-dot 1.5s infinite;}
.cm-tabs{display:flex;gap:2px;background:var(--border);border-radius:8px;padding:3px;margin-bottom:16px;flex-wrap:wrap;}
.cm-tab{flex:1;text-align:center;padding:7px 4px;font-size:11px;font-weight:600;border-radius:6px;cursor:pointer;color:var(--muted);transition:all .15s;white-space:nowrap;}
.cm-tab.active{background:var(--surface);color:var(--teal);box-shadow:var(--sh);}
.note-item{padding:12px 16px;border-bottom:1px solid var(--border);}
.note-item:last-child{border-bottom:none;}
.note-hdr{display:flex;align-items:center;gap:8px;margin-bottom:5px;flex-wrap:wrap;}
.note-author{font-weight:700;font-size:12px;color:var(--teal);}
.note-role-tag{font-size:10px;padding:1px 7px;border-radius:8px;font-weight:600;}
.note-time{font-size:11px;color:var(--muted);margin-left:auto;}
.note-body{font-size:12px;color:var(--text);line-height:1.6;}
.task-item{padding:11px 16px;border-bottom:1px solid var(--border);display:flex;align-items:flex-start;gap:10px;}
.task-item:last-child{border-bottom:none;}
.task-check{width:18px;height:18px;border-radius:4px;border:2px solid var(--teal);display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;margin-top:2px;transition:all .15s;}
.task-check.done{background:var(--teal);border-color:var(--teal);}
.task-body{flex:1;}
.task-title{font-size:12px;font-weight:600;color:var(--text);}
.task-title.done{text-decoration:line-through;color:var(--muted);}
.task-detail{font-size:11px;color:var(--muted);margin-top:2px;}
.task-owner{font-size:10px;font-weight:700;color:var(--teal);background:var(--teal-light);padding:1px 6px;border-radius:8px;display:inline-block;margin-top:3px;}
.goal-item{padding:10px 16px;border-bottom:1px solid var(--border);display:flex;align-items:flex-start;gap:10px;}
.goal-item:last-child{border-bottom:none;}
.goal-num{width:22px;height:22px;border-radius:50%;background:var(--teal);color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:2px;}
.goal-body{flex:1;}
.goal-title{font-size:12px;font-weight:600;color:var(--text);}
.goal-detail{font-size:11px;color:var(--muted);margin-top:2px;}
.progress-wrap{background:var(--border);border-radius:4px;height:5px;flex:1;margin-top:6px;}
.progress-fill{height:5px;border-radius:4px;background:linear-gradient(90deg,var(--teal),var(--green));}
.alert-item{padding:11px 16px;border-bottom:1px solid var(--border);display:flex;align-items:flex-start;gap:10px;}
.alert-item:last-child{border-bottom:none;}
.alert-icon{font-size:20px;flex-shrink:0;}
.alert-body{flex:1;}
.alert-title{font-size:12px;font-weight:700;color:var(--text);}
.alert-sub{font-size:11px;color:var(--muted);margin-top:2px;}
.concierge-item{padding:11px 16px;border-bottom:1px solid var(--border);}
.concierge-item:last-child{border-bottom:none;}
.conc-hdr{display:flex;align-items:center;gap:8px;margin-bottom:4px;}
.conc-type{font-size:10px;font-weight:700;padding:1px 7px;border-radius:8px;}
.call-log{background:var(--blue-light);color:var(--blue);}
.visit-log{background:var(--green-light);color:var(--green);}
.msg-log{background:var(--gold-light);color:var(--gold);}
.cm-btn-row{display:flex;gap:8px;flex-wrap:wrap;padding:12px 16px;border-top:1px solid var(--border);background:var(--teal-light);}
.pcp-member-row{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--border);}
.pcp-member-row:last-child{border-bottom:none;}
.pcp-actions{display:flex;gap:5px;margin-left:auto;flex-shrink:0;flex-wrap:wrap;}
.facetime-btn{background:var(--green);color:#fff;border:none;border-radius:6px;padding:5px 9px;font-size:11px;font-weight:700;cursor:pointer;}
.sms-btn2{background:var(--blue);color:#fff;border:none;border-radius:6px;padding:5px 9px;font-size:11px;font-weight:700;cursor:pointer;}
.reminder-btn{background:var(--gold);color:#fff;border:none;border-radius:6px;padding:5px 9px;font-size:11px;font-weight:700;cursor:pointer;}
.home-btn{background:var(--purple);color:#fff;border:none;border-radius:6px;padding:5px 9px;font-size:11px;font-weight:700;cursor:pointer;}

/* Dashboard tabs */
.dash-tab:hover{color:var(--teal) !important;}
.dash-tab.active{color:var(--teal) !important;border-bottom-color:var(--teal) !important;}

/* HRCM Worklist + Case Detail (Phase 2A) */
.hrcm-kpi-strip{display:grid;grid-template-columns:repeat(8,1fr);gap:8px;margin:12px 0;}
.hrcm-kpi-strip .kpi-tile{padding:10px 12px;border-radius:8px;color:#fff;}
.hrcm-kpi-strip .kpi-label{font-size:10px;opacity:.85;text-transform:uppercase;letter-spacing:.4px;}
.hrcm-kpi-strip .kpi-value{font-size:20px;font-weight:700;margin-top:4px;}
.hrcm-kpi-strip .kpi-red{background:#c0392b;}
.hrcm-kpi-strip .kpi-amber{background:#d68910;}
.hrcm-kpi-strip .kpi-blue{background:#2874a6;}
.hrcm-kpi-strip .kpi-purple{background:#6c3483;}
.hrcm-kpi-strip .kpi-purple-light{background:#a569bd;}
.hrcm-kpi-strip .kpi-green{background:#1e8449;}
.hrcm-kpi-strip .kpi-navy{background:#1b2631;}
.hrcm-kpi-strip .kpi-orange{background:#ca6f1e;}

/* HRCM Clinical Dashboard tiles — v9 dashboard color key (URGENT/PRIORITY/ON-TRACK/NEUTRAL). */
.hrcm-cd-section{margin:16px 0;}
.hrcm-cd-section > h3{
  font-size:11.5px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#475569;
  font-weight:700;
  margin:0 0 10px;
  border:0;
  padding-bottom:0;
}
.hrcm-cd-section > h4{font-size:12px;color:#334155;margin:14px 0 6px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;}
.hrcm-cd-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;}
.hrcm-cd-grid.cols-8{grid-template-columns:repeat(8,1fr);}
.hrcm-cd-grid.cols-6{grid-template-columns:repeat(6,1fr);}
@media(max-width:1100px){.hrcm-cd-grid,.hrcm-cd-grid.cols-8,.hrcm-cd-grid.cols-6{grid-template-columns:repeat(4,1fr);}}
@media(max-width:720px){.hrcm-cd-grid,.hrcm-cd-grid.cols-8,.hrcm-cd-grid.cols-6{grid-template-columns:repeat(2,1fr);}}
/* Ann 2026-05-23: "take out the colors and make it more like 3D boxes that
   looks like a medical chart, the colors are too much." Tiles are now
   uniform white cards with a subtle inset/drop shadow combo for a
   physical-chart feel. State is conveyed by a small corner dot, not a
   full-tile color wash. */
.hrcm-cd-tile{
  position:relative;
  padding:14px 16px;
  background:#ffffff;
  border:1px solid #d0d7de;
  border-radius:8px;
  box-shadow:0 1px 0 rgba(15,23,42,.04), inset 0 -1px 0 rgba(15,23,42,.05), 0 1px 2px rgba(15,23,42,.04);
  transition:transform .12s ease, box-shadow .12s ease;
}
.hrcm-cd-tile .label{
  font-size:10.5px;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#64748b;
  font-weight:700;
  line-height:1.3;
  padding-right:14px; /* leave room for corner dot */
}
.hrcm-cd-tile .value{
  font-size:26px;
  font-weight:700;
  margin-top:4px;
  color:#0f172a;
  font-variant-numeric:tabular-nums;
  line-height:1.05;
}
.hrcm-cd-tile .hrcm-tile-chip{display:none;}  /* removed — every value is now live, no need for SNAPSHOT label */
.hrcm-cd-tile.clickable{cursor:pointer;}
.hrcm-cd-tile.clickable:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 14px -4px rgba(15,23,42,.12), 0 2px 4px rgba(15,23,42,.06), inset 0 -1px 0 rgba(15,23,42,.05);
  border-color:#94a3b8;
}
/* State indicator — small dot in the top-right corner of the tile. */
.hrcm-cd-tile::after{
  content:"";
  position:absolute;
  top:12px;
  right:12px;
  width:8px;
  height:8px;
  border-radius:50%;
  background:transparent;
  box-shadow:0 0 0 2px #ffffff inset;
}
.hrcm-cd-tile.urgent::after  {background:#dc2626;} /* red-600   */
.hrcm-cd-tile.priority::after{background:#ea580c;} /* orange-600 */
.hrcm-cd-tile.outreach::after{background:#d97706;} /* amber-600  */
.hrcm-cd-tile.workload::after{background:#7c3aed;} /* violet-600 */
.hrcm-cd-tile.activity::after{background:#2563eb;} /* blue-600   */
.hrcm-cd-tile.hospice::after {background:#6366f1;} /* indigo-500 */
.hrcm-cd-tile.ontrack::after {background:#16a34a;} /* green-600  */
.hrcm-cd-tile.neutral::after {background:#94a3b8;} /* slate-400  */
/* Sub-text shown on the conditional Care Plans overdue tile. */
.hrcm-cd-tile .sub{
  font-size:11px;
  color:#64748b;
  margin-top:6px;
  line-height:1.45;
}
.hrcm-cd-addons{width:100%;border-collapse:collapse;font-size:12px;margin-top:6px;}
.hrcm-cd-addons th{background:#01696F;color:#fff;text-align:left;padding:6px 8px;font-weight:600;}
.hrcm-cd-addons td{padding:6px 8px;border-bottom:1px solid #e5e2da;}

/* Tab switcher above the dashboard / worklist split. Clinical-chart styling. */
/* View tabs reuse the warm .mc-tab pill system (was slate underline — clashed
   with the teal/sand theme and the chart's pill tabs). One tab system everywhere. */
.hrcm-view-tabs{display:flex;gap:6px;flex-wrap:wrap;align-items:center;border-bottom:1px solid var(--border);margin:0 0 16px;padding-bottom:10px;}
.hrcm-view-tabs button{
  padding:8px 15px;background:transparent;border:1px solid transparent;border-radius:8px;
  cursor:pointer;font-size:13px;font-weight:600;color:var(--muted);font-family:inherit;line-height:1.2;
  transition:color .15s ease, background .15s ease, border-color .15s ease;
}
.hrcm-view-tabs button:hover:not(.active){color:var(--text);background:var(--bg);}
.hrcm-view-tabs button.active{color:var(--teal-dark);background:var(--surface);border-color:rgba(0,107,107,0.28);font-weight:700;box-shadow:0 1px 3px rgba(42,37,29,0.10);}
.hrcm-view-tabs .tab-badge{
  display:inline-block;margin-left:8px;padding:1px 8px;border-radius:10px;
  background:var(--teal-dark);color:#fff;font-size:10.5px;font-weight:700;font-variant-numeric:tabular-nums;
}
.hrcm-view-tabs .tab-badge.zero{background:var(--muted);color:#fff;}

/* Compact summary strip shown above the worklist tab (single line of tier counts). */
.hrcm-compact-strip{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px;padding:8px 10px;background:#f9f8f5;border:1px solid #e5e2da;border-radius:6px;font-size:11px;align-items:center;}
.hrcm-compact-strip .pill{padding:3px 8px;border-radius:10px;font-weight:600;border:1px solid;cursor:pointer;}
.hrcm-compact-strip .pill:hover{transform:translateY(-1px);box-shadow:0 2px 4px rgba(0,0,0,.08);}
.hrcm-compact-strip .pill.urgent{background:#F7E1EE;border-color:#A12C7B;color:#A12C7B;}
.hrcm-compact-strip .pill.priority{background:#FBE3D5;border-color:#964219;color:#964219;}
.hrcm-compact-strip .pill.neutral{background:#DDEEF8;border-color:#006494;color:#006494;}
.hrcm-compact-strip .pill.ontrack{background:#E0EFD3;border-color:#437A22;color:#437A22;}
.hrcm-compact-strip .freshness{margin-left:auto;color:var(--muted);font-size:10px;}

/* Top-of-page compact header — freshness + IPA dropdown + inline legend. */
.hrcm-cd-topbar{
  display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin:0 0 14px;
  padding:10px 14px;background:#ffffff;border:1px solid #d0d7de;border-radius:8px;
  font-size:12px;
  box-shadow:0 1px 2px rgba(15,23,42,.03);
}
.hrcm-cd-topbar .freshness{font-weight:600;color:#0f172a;}
.hrcm-cd-topbar .freshness em{font-style:normal;color:#64748b;font-weight:500;margin-right:4px;}
.hrcm-cd-topbar .topbar-spacer{flex:1;}
.hrcm-cd-topbar .ipa-select label{color:#64748b;}
.hrcm-cd-topbar .ipa-select select{padding:4px 10px;border:1px solid #d0d7de;border-radius:6px;font-size:12px;margin-left:6px;background:#fff;color:#0f172a;cursor:pointer;}
.hrcm-cd-topbar .inline-legend{display:flex;gap:6px;flex-wrap:wrap;}
.hrcm-cd-topbar .inline-legend .pill{padding:3px 9px;border-radius:11px;font-size:10.5px;font-weight:600;letter-spacing:.02em;}
/* Top-bar legend pills — soft tint + dot, matches the new tile/tier style. */
.hrcm-cd-topbar .inline-legend .pill{
  display:inline-flex;align-items:center;gap:5px;background:#ffffff;
  border:1px solid #d0d7de;color:#475569;border-radius:11px;
}
.hrcm-cd-topbar .inline-legend .pill::before{content:"";width:6px;height:6px;border-radius:50%;background:#94a3b8;}
.hrcm-cd-topbar .inline-legend .pill.urgent  {color:#991b1b;border-color:#fecaca;background:#fef2f2;}
.hrcm-cd-topbar .inline-legend .pill.urgent::before  {background:#dc2626;}
.hrcm-cd-topbar .inline-legend .pill.priority{color:#9a3412;border-color:#fed7aa;background:#fff7ed;}
.hrcm-cd-topbar .inline-legend .pill.priority::before{background:#ea580c;}
.hrcm-cd-topbar .inline-legend .pill.outreach{color:#854d0e;border-color:#fde68a;background:#fffbeb;}
.hrcm-cd-topbar .inline-legend .pill.outreach::before{background:#d97706;}
.hrcm-cd-topbar .inline-legend .pill.workload{color:#5b21b6;border-color:#ddd6fe;background:#f5f3ff;}
.hrcm-cd-topbar .inline-legend .pill.workload::before{background:#7c3aed;}
.hrcm-cd-topbar .inline-legend .pill.activity{color:#1e40af;border-color:#bfdbfe;background:#eff6ff;}
.hrcm-cd-topbar .inline-legend .pill.activity::before{background:#2563eb;}
.hrcm-cd-topbar .inline-legend .pill.hospice {color:#3730a3;border-color:#c7d2fe;background:#eef2ff;}
.hrcm-cd-topbar .inline-legend .pill.hospice::before {background:#6366f1;}
.hrcm-cd-topbar .inline-legend .pill.ontrack {color:#15803d;border-color:#bbf7d0;background:#f0fdf4;}
.hrcm-cd-topbar .inline-legend .pill.ontrack::before {background:#16a34a;}
.hrcm-cd-topbar .inline-legend .pill.neutral {color:#475569;border-color:#e2e8f0;background:#f8fafc;}
.hrcm-cd-topbar .inline-legend .pill.neutral::before {background:#94a3b8;}
.hrcm-cd-topbar .jump-to-list{padding:5px 10px;background:var(--teal-dark);color:#fff;border:none;border-radius:4px;font-size:12px;cursor:pointer;font-weight:500;}
.hrcm-cd-topbar .jump-to-list:hover{background:#01595e;}

.hrcm-cd-legend{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0;font-size:11px;}
.hrcm-cd-legend .chip{padding:4px 8px;border-radius:4px;border:1px solid;}
.hrcm-cd-legend .chip.urgent{background:#F7E1EE;border-color:#A12C7B;color:#A12C7B;}
.hrcm-cd-legend .chip.priority{background:#FBE3D5;border-color:#964219;color:#964219;}
.hrcm-cd-legend .chip.ontrack{background:#E0EFD3;border-color:#437A22;color:#437A22;}
.hrcm-cd-legend .chip.neutral{background:#DDEEF8;border-color:#006494;color:#006494;}

/* Per-staff blocks — chart-card style, neutral palette per Ann 2026-05-23. */
.hrcm-cd-staff-block{
  margin:8px 0 10px;
  border:1px solid #d0d7de;
  border-radius:8px;
  background:#ffffff;
  overflow:hidden;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.hrcm-cd-staff-block .staff-head{
  display:flex;align-items:center;font-size:13px;font-weight:700;color:#0f172a;
  padding:11px 14px;cursor:pointer;user-select:none;background:#fafbfc;
  border-bottom:1px solid transparent;
  transition:background .12s ease;
}
.hrcm-cd-staff-block:not(.collapsed) .staff-head{border-bottom-color:#e2e8f0;}
.hrcm-cd-staff-block .staff-head:hover{background:#f1f5f9;}
.hrcm-cd-staff-block .staff-head .caret{
  margin-right:10px;font-size:10px;color:#64748b;
  transition:transform .15s ease;
}
.hrcm-cd-staff-block.collapsed .staff-head .caret{transform:rotate(-90deg);}
.hrcm-cd-staff-block .staff-role{font-size:11.5px;color:#64748b;margin-left:8px;font-weight:500;}
.hrcm-cd-staff-block .staff-badge{margin-left:auto;font-size:11px;font-weight:600;}
.hrcm-cd-staff-block .staff-body{padding:12px 14px 14px;}
.hrcm-cd-staff-block.collapsed .staff-body{display:none;}
.hrcm-cd-staff-block.my-block{border-color:#0f172a;}
.hrcm-cd-staff-block.my-block .staff-head{background:#f1f5f9;}
.hrcm-cd-staff-block.my-block .staff-head::before{content:'★';color:#0f172a;margin-right:8px;font-size:11px;}
/* Staff section hint — clinical info banner. */
.hrcm-staff-hint{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 14px;
  margin:0 0 12px;
  background:#f1f5f9;
  border:1px solid #cbd5e1;
  border-radius:8px;
  font-size:12px;
  color:#334155;
  line-height:1.5;
}
.hrcm-staff-hint .hint-icon{font-size:14px;line-height:1.4;flex-shrink:0;}
.hrcm-staff-hint em{color:#0f172a;font-style:normal;font-weight:600;background:#fff;padding:1px 6px;border-radius:4px;border:1px solid #e2e8f0;}

.hrcm-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0;}
.hrcm-chips .chip{
  padding:6px 13px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--surface);
  cursor:pointer;
  font-size:12px;
  font-weight:600;
  color:var(--muted);
  transition:background .12s ease, border-color .12s ease, color .12s ease;
}
.hrcm-chips .chip:hover{background:var(--bg);border-color:var(--teal-mid);color:var(--text);}
/* !important + the .hrcm-chips scope beats the app-wide "button.chip.active"
   dark-pill rule, so "selected = teal" matches the active tab + sidebar accent. */
.hrcm-chips .chip.active{
  background:var(--teal) !important;color:#fff !important;border-color:var(--teal) !important;
}
/* LEAD column rendering — Ann 2026-05-23 fix: show display name when
   assigned, soft "Unassigned" placeholder when not. */
.hrcm-table .lead-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:2px 8px;
  background:#f0fdf4;
  border:1px solid #bbf7d0;
  border-radius:10px;
  font-size:11px;
  font-weight:600;
  color:#15803d;
  white-space:nowrap;
}
.hrcm-table .lead-chip::before{content:"●";color:#16a34a;font-size:8px;line-height:1;}
.hrcm-table .lead-empty{color:#94a3b8;font-size:11px;font-style:italic;}

/* ============================================================
   Worklist table — Airtable-clean redesign (Ann 2026-05-23)
   Consistent row heights, tighter typography, no clutter.
   ============================================================ */
.hrcm-log{
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface);
  box-shadow:0 1px 2px rgba(42,37,29,.05);
}
/* Worklist-only: horizontal scroll + width-fit trick so the table behaves.
   Scoped to data-hrcm-view="worklist" to keep Dashboard / Tracker untouched. */
body[data-hrcm-view="worklist"] .hrcm-log{
  overflow-x:auto;
  overflow-y:hidden;
  /* width:0 + min-width:100% forces the box to its parent's width and lets
     wider children scroll inside via overflow-x:auto instead of pushing
     the layout wider than the viewport. Standard CSS table-in-flex fix. */
  width:0;
  min-width:100%;
  max-width:100%;
}
/* Custom scrollbar inside the worklist — subtle, doesn't dominate. */
.hrcm-log::-webkit-scrollbar{height:8px;}
.hrcm-log::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px;}
.hrcm-log::-webkit-scrollbar-thumb:hover{background:var(--muted);}
.hrcm-log::-webkit-scrollbar-track{background:var(--sand);}
.hrcm-table{font-size:12.5px;border-spacing:0;}
.hrcm-table thead th{
  background:var(--teal-light);
  color:var(--teal-dark);
  font-weight:700;
  font-size:10.5px;
  text-transform:uppercase;
  letter-spacing:.04em;
  padding:7px 8px;
  border-bottom:1px solid var(--border);
  border-top:0;
  text-align:left;
  white-space:nowrap;
}
.hrcm-table tbody td{
  padding:6px 8px;
  border-bottom:1px solid var(--border);
  border-top:0;
  vertical-align:middle;
  font-size:12.5px;
  color:var(--text);
  height:44px;            /* row height 56->44px (2026-06-01): match Ann's compact mockup */
  box-sizing:border-box;
}
/* First and last column get a bit more breathing room. */
.hrcm-table tbody td:first-child,
.hrcm-table thead th:first-child{padding-left:12px;}
.hrcm-table tbody td:last-child,
.hrcm-table thead th:last-child{padding-right:12px;}
.hrcm-table tbody tr:last-child td{border-bottom:0;}
.hrcm-table tbody tr{cursor:pointer;background:var(--surface);transition:background .12s;}
.hrcm-table tbody tr td:first-child{border-left:3px solid transparent;}
.hrcm-table tbody tr:nth-child(even){background:var(--surface);}  /* drop zebra-stripe */
.hrcm-table tbody tr:hover{background:rgba(0,107,107,0.06);}
.hrcm-table tbody tr:hover td:first-child{border-left-color:var(--teal);}
.hrcm-table tbody tr.row-active{background:var(--teal-light);}
.hrcm-table tbody tr.row-active td:first-child{border-left-color:var(--teal);}

/* Column widths — fixed layout so columns obey set widths regardless of
   content (overflowing text gets ellipsis instead of expanding cells).
   Total ≈ 1085px; fits a 1366px laptop edge-to-edge without scrolling.
   Wider viewports let the Member column flex via `width: auto`.
   Scoped to data-hrcm-view="worklist" so the rules don't affect the
   Tracker (which also uses `.hrcm-table` for its SLA / Care Team views). */
body[data-hrcm-view="worklist"] .hrcm-table{table-layout:fixed;width:100%;min-width:980px;}
body[data-hrcm-view="worklist"] .hrcm-table .col-num{width:46px;color:var(--muted);font-size:11px;text-align:right;padding-left:10px;padding-right:10px;font-variant-numeric:tabular-nums;}
body[data-hrcm-view="worklist"] .hrcm-table .col-age{width:46px;color:var(--muted);font-size:12px;text-align:right;}
body[data-hrcm-view="worklist"] .hrcm-table .col-stage{width:158px;}
body[data-hrcm-view="worklist"] .hrcm-table .col-action{width:120px;text-align:right;padding-right:14px;}
/* Member fixed tight (no more auto-flex eating the gap to IPA). IPA tightened.
   The freed slack goes into the CCM + Hospice tier columns (108 → 124 each)
   so the badges + scores have more breathing room. Status keeps its right-edge
   gutter. Lead stays comfortable for the audit content. */
body[data-hrcm-view="worklist"] .hrcm-table .col-member{width:200px;}
body[data-hrcm-view="worklist"] .hrcm-table .col-ipa{width:138px;}
body[data-hrcm-view="worklist"] .hrcm-table .col-tier{width:124px;}
body[data-hrcm-view="worklist"] .hrcm-table .col-raf{width:90px;}
body[data-hrcm-view="worklist"] .hrcm-table .col-util{width:96px;color:var(--text);font-size:12px;white-space:nowrap;}
body[data-hrcm-view="worklist"] .hrcm-table .col-cci{width:108px;white-space:nowrap;}
body[data-hrcm-view="worklist"] .hrcm-table .col-touch{width:160px;}  /* fixed — no more auto-flex eating slack into the Lead↔Status gap */
body[data-hrcm-view="worklist"] .hrcm-table .col-status{width:148px;padding-right:18px;}
/* Force text to ellipsis when columns are tight (worklist only). */
/* Compact worklist rows. Higher specificity (0,2,3) than the global brass
   `.content table tbody td` (0,1,3) so it wins without touching the app-wide
   table theme. This is what actually shrinks the "humongous" rows to the mockup. */
body[data-hrcm-view="worklist"] .hrcm-table tbody td{
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  padding:5px 8px;font-size:12.5px;height:38px;
}
body[data-hrcm-view="worklist"] .hrcm-table thead th{padding:7px 8px;font-size:10.5px;letter-spacing:.04em;}
body[data-hrcm-view="worklist"] .hrcm-table tbody td:first-child{padding-left:12px;}
/* Informative empty-state row (e.g. Stream 4 "no discharges in 30 days…") must
   wrap, not inherit the single-line ellipsis clip above — else the message is cut off. */
body[data-hrcm-view="worklist"] .hrcm-table tbody td.empty{
  white-space:normal;overflow:visible;text-overflow:clip;height:auto;
  line-height:1.5;padding:18px 16px;color:#64748b;
}
body[data-hrcm-view="worklist"] .hrcm-table tbody td:last-child{padding-right:14px;}
body[data-hrcm-view="worklist"] .hrcm-table thead th:first-child{padding-left:12px;}
body[data-hrcm-view="worklist"] .hrcm-table thead th:last-child{padding-right:14px;}
body[data-hrcm-view="worklist"] .hrcm-table .ipa-stacked .ipa-name,
body[data-hrcm-view="worklist"] .hrcm-table .ipa-stacked .ipa-pcp{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* Member cell — single line (name + optional BH chip); id/DOB live in the tooltip. */
.member-row{display:flex;align-items:center;gap:6px;line-height:1.3;overflow:hidden;white-space:nowrap;}
.member-row .member-primary{display:flex;align-items:center;gap:6px;}
.member-row .member-name{font-weight:600;font-size:12.5px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:280px;}
.member-row .member-secondary{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.member-row .member-id{font-variant-numeric:tabular-nums;}
.member-row .member-dob{}
.member-row .cell-sep{color:var(--border);}

/* IPA / PCP cell — two stacked lines */
.ipa-stacked{display:flex;flex-direction:column;line-height:1.3;}
.ipa-stacked .ipa-name{font-size:12px;font-weight:600;color:#0f172a;}
.ipa-stacked .ipa-pcp{font-size:11px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px;}

/* Condition chip — small rounded pill on the right of the name. Ann 2026-05-23:
   "make the labels like 'Late-Stage / Metastatic Cancer +1' round edges and
   on the right of the name so it will take less space." */
.row-flag-chip{
  display:inline-flex;align-items:center;gap:4px;
  padding:1px 8px;border-radius:999px;
  background:#f1f5f9;color:#475569;
  font-size:10.5px;font-weight:600;line-height:1.5;
  border:1px solid #e2e8f0;
  max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  margin-left:6px;
}
.row-flag-chip.red{background:#fef2f2;color:#991b1b;border-color:#fecaca;}
.row-flag-chip .flag-more{color:inherit;font-weight:500;opacity:.75;font-size:10px;}
.row-bh-chip{
  display:inline-flex;align-items:center;padding:1px 7px;border-radius:999px;
  background:#ede9fe;color:#5b21b6;font-size:10px;font-weight:700;
  letter-spacing:.04em;border:1px solid #ddd6fe;line-height:1.5;
}

.cell-dash{color:var(--muted);font-size:14px;}

/* Last Touch column */
.touch-cell{display:flex;flex-direction:column;line-height:1.3;}
.touch-cell .touch-name{font-size:12px;font-weight:600;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.touch-cell .touch-meta{font-size:10.5px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.touch-empty{color:#cbd5e1;font-size:11px;font-style:italic;}

/* Inline editable Status pill — compact chip, click opens native dropdown.
   Ann 2026-05-23: "make it like a simple pill... when the user click on it,
   the user see other options in the dropdown." No fixed width, no visible
   caret; the select sits inside the pill, invisible chrome, but clicking
   anywhere on the pill opens the dropdown. */
.status-pill{
  position:relative;
  display:inline-flex;align-items:center;
  border-radius:999px;
  background:#f1f5f9;
  border:1px solid #e2e8f0;
  font-size:11.5px;font-weight:600;
  transition:background .12s, border-color .12s;
  cursor:pointer;
  white-space:nowrap;
}
.status-pill select{
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  background:transparent;
  background-image:none;
  border:none;outline:none;
  padding:3px 10px;
  font:inherit;color:inherit;
  cursor:pointer;
  text-align:center;
}
.status-pill select::-ms-expand{display:none;}
.status-pill:hover{filter:brightness(.97);}
.status-pill.status-neutral{background:#f1f5f9;color:#475569;border-color:#e2e8f0;}
.status-pill.status-engaged{background:#eff6ff;color:#1e40af;border-color:#bfdbfe;}
.status-pill.status-progress{background:#f0fdf4;color:#15803d;border-color:#bbf7d0;}
.status-pill.status-closed{background:#f8fafc;color:#94a3b8;border-color:#e2e8f0;}

/* Tighter raf-gap-chip */
.raf-gap-chip{display:inline-block;background:#fef3c7;color:#92400e;padding:1px 5px;border-radius:6px;font-size:10px;font-weight:600;margin-left:4px;}

/* Search input */
.hrcm-toolbar .hrcm-search{
  padding:9px 12px;
  border:1px solid #d0d7de;
  border-radius:8px;
  font-size:13px;
  background:#fff;
  color:#0f172a;
  transition:border-color .12s, box-shadow .12s;
}
.hrcm-toolbar .hrcm-search:focus{
  outline:none;
  border-color:#0f172a;
  box-shadow:0 0 0 3px rgba(15,23,42,.08);
}

/* List footer cleanup — detached strip with breathing room above, and the two
   notes pushed to opposite ends so "filter: ccm-urgent" no longer runs into
   "Click a row…". */
.hrcm-list-footer{
  display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;
  padding:11px 14px;
  margin-top:12px;
  font-size:12px;color:var(--muted);
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:8px;
}
/* Inline CM Lead picker on the side panel — Ann 2026-05-23 inline assign. */
.case-detail .lead-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  margin:8px 0;
  border:1px solid #d0d7de;
  border-radius:8px;
  background:#ffffff;
  font-size:13px;
}
.case-detail .lead-row.no-lead{
  background:#fffbeb;
  border-color:#fcd34d;
}
.case-detail .lead-row.has-lead{
  background:#f0fdf4;
  border-color:#bbf7d0;
}
.case-detail .lead-row label{
  font-weight:700;
  color:#0f172a;
  margin:0;
  flex-shrink:0;
}
.case-detail .lead-row select{
  padding:6px 10px;
  border:1px solid #d0d7de;
  border-radius:6px;
  background:#fff;
  font-size:13px;
  font-family:inherit;
  color:#0f172a;
  cursor:pointer;
  min-width:200px;
}
.case-detail .lead-row select:focus{outline:2px solid #0f172a;outline-offset:1px;}
.case-detail .lead-row-hint{
  font-size:11px;
  color:#9a3412;
  font-style:italic;
}
.case-detail .lead-row-name{font-weight:600;color:#15803d;}
/* =========================================================
   Drawer redesign (Ann 2026-05-23) — cleaner hierarchy, less
   overwhelming. Sticky header + collapsible sections.
   ========================================================= */
.case-detail{padding:0;display:flex;flex-direction:column;min-height:100%;background:#fafbfc;}
.case-detail .cd-header{
  position:sticky;top:0;z-index:5;
  background:#ffffff;
  border-bottom:1px solid #e2e8f0;
  padding:16px 22px 12px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.case-detail .cd-header h2{
  margin:0 0 4px;font-size:18px;font-weight:700;color:#0f172a;
  letter-spacing:-.01em;
}
.case-detail .cd-header .cd-meta{font-size:12px;color:#64748b;line-height:1.5;}
.case-detail .cd-header .cd-meta a{color:#0f172a;font-weight:600;}
.case-detail .cd-header .cd-meta .sep{color:#cbd5e1;margin:0 6px;}
.case-detail .cd-header-pills{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;}
.case-detail .cd-header-pills .cd-label{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#64748b;margin-right:4px;}
.case-detail .cd-header-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px;}
.case-detail .cd-header-actions .btn{font-size:12px;padding:6px 12px;border-radius:6px;}
.case-detail .cd-body{padding:16px 20px 28px;display:flex;flex-direction:column;gap:12px;}
/* Section order — Ann 2026-05-23: most useful at top. CSS `order` lets the
   HTML generator stay in current sequence while the visual order shows:
   At glance → Playbook → Action Plan → Care Team → Notes → Auths → Meds → HH. */
.case-detail .cd-section.s-glance{order:1;}
.case-detail .cd-section.s-playbook{order:2;}
.case-detail .cd-section.s-action{order:3;}
.case-detail .cd-section.s-team{order:4;}
.case-detail .cd-section.s-notes{order:5;}
.case-detail .cd-section.s-auth{order:6;}
.case-detail .cd-section.s-meds{order:7;}
.case-detail .cd-section.s-hh{order:8;}
/* Each section = a card; <details> drives open/closed state with native UI.
   Ann 2026-05-23: rounder edges (12px), generous padding, more readable. */
.case-detail .cd-section{
  background:#ffffff;
  border:1px solid #e2e8f0;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 1px 2px rgba(15,23,42,.03), 0 1px 0 rgba(15,23,42,.02);
  transition:box-shadow .15s ease;
}
.case-detail .cd-section[open]{box-shadow:0 2px 6px rgba(15,23,42,.05), 0 1px 0 rgba(15,23,42,.02);}
.case-detail .cd-section > summary{
  list-style:none;
  cursor:pointer;
  padding:14px 16px;
  display:flex;align-items:center;gap:12px;
  font-weight:700;font-size:13.5px;color:#0f172a;
  user-select:none;
  background:#fff;
  letter-spacing:-.005em;
}
.case-detail .cd-section > summary::-webkit-details-marker{display:none;}
.case-detail .cd-section > summary::before{
  content:"▸";color:#94a3b8;font-size:11px;
  transition:transform .18s ease;
  flex-shrink:0;
  width:10px;display:inline-block;text-align:center;
}
.case-detail .cd-section[open] > summary::before{transform:rotate(90deg);color:#475569;}
.case-detail .cd-section > summary:hover{background:#f8fafc;}
.case-detail .cd-section > summary .cd-count{
  margin-left:auto;
  background:#f1f5f9;color:#475569;
  font-size:11.5px;font-weight:600;
  padding:2px 10px;border-radius:11px;
  font-variant-numeric:tabular-nums;
  border:1px solid #e2e8f0;
}
.case-detail .cd-section > summary .cd-flag{
  margin-left:auto;
  font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  padding:2px 8px;border-radius:11px;
  background:#fef2f2;color:#991b1b;border:1px solid #fecaca;
}
.case-detail .cd-section-body{
  padding:4px 18px 18px;
  font-size:13px;line-height:1.55;color:#1f2937;
}
.case-detail .cd-section-body h4,
.case-detail .cd-section-body .adh-h4{
  font-size:11.5px;font-weight:700;letter-spacing:.05em;
  text-transform:uppercase;color:#64748b;
  margin:14px 0 8px;
}
.case-detail .cd-section-body h4:first-child,
.case-detail .cd-section-body .adh-h4:first-child{margin-top:6px;}
.case-detail .cd-section-body .reasons{margin:10px 0;padding:8px 12px;background:#f8fafc;border-left:3px solid #94a3b8;border-radius:6px;font-size:12.5px;color:#475569;}
.case-detail .cd-section-body .reasons strong{color:#0f172a;}
.case-detail .cd-section-body .flags-row{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 6px;}
.case-detail .cd-section.section-urgent{border-color:#fecaca;}
.case-detail .cd-section.section-urgent > summary{background:#fef2f2;color:#991b1b;}
.case-detail .cd-section.section-urgent > summary::before{color:#dc2626;}
/* Compact stat tiles inside drawer — smaller than dashboard tiles. */
.case-detail .cd-section .summary-grid{margin:0 0 4px;}
.case-detail .cd-section .summary-tile{padding:10px 12px;}
.case-detail .cd-section .summary-tile .val{font-size:16px;}
/* Stack member's metadata into a clean grid */
.case-detail .cd-stat-grid{
  display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:8px 0;
  font-size:12px;
}
.case-detail .cd-stat-grid .row{display:flex;justify-content:space-between;gap:8px;padding:6px 0;border-bottom:1px solid #f1f5f9;}
.case-detail .cd-stat-grid .row:last-child,.case-detail .cd-stat-grid .row:nth-last-child(2){border-bottom:0;}
.case-detail .cd-stat-grid .row .lbl{color:#64748b;font-weight:500;}
.case-detail .cd-stat-grid .row .val{color:#0f172a;font-weight:600;text-align:right;}
/* Quick links row at the bottom of At a Glance. */
.case-detail .cd-quick-links{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:10px;}
.case-detail .cd-quick-links .ql-btn{
  display:flex;flex-direction:column;align-items:center;gap:4px;
  background:#ffffff;border:1px solid #d0d7de;border-radius:8px;
  padding:10px 6px;cursor:pointer;
  font-size:11px;font-weight:600;color:#475569;
  transition:background .12s, border-color .12s;
}
.case-detail .cd-quick-links .ql-btn:hover{background:#f1f5f9;border-color:#94a3b8;color:#0f172a;}
.case-detail .cd-quick-links .ql-btn .ql-icon{font-size:18px;line-height:1;}
/* Care Team grid uses tighter layout inside drawer. */
.case-detail .assignments-grid{
  display:grid;grid-template-columns:140px 1fr;gap:6px 12px;
  align-items:center;font-size:12px;margin-top:2px;
}
.case-detail .assignments-grid label{color:#475569;font-weight:600;font-size:11.5px;text-align:right;}
.case-detail .assignments-grid select{
  padding:6px 10px;border:1px solid #d0d7de;border-radius:6px;
  background:#fff;font-size:12.5px;color:#0f172a;width:100%;
}
.case-detail .assignments-grid select:focus{outline:2px solid #0f172a;outline-offset:1px;}
/* Drop the old chrome — we don't need .case-header anymore. */
.case-detail .case-header{padding:0;border:0;}
.case-detail .case-actions{margin:0;}
/* Tracker Care Team inline lead picker. */
.tr-inline-lead{
  padding:5px 10px;
  border:1px solid #d0d7de;
  border-radius:6px;
  background:#fff;
  font-size:12px;
  font-family:inherit;
  color:#0f172a;
  cursor:pointer;
  max-width:180px;
}
.tr-inline-lead:hover{border-color:#0f172a;}
.tr-row.no-lead .tr-inline-lead{border-color:#fcd34d;background:#fffbeb;color:#92400e;font-weight:600;}
.tr-row.has-lead .tr-inline-lead{border-color:#bbf7d0;background:#f0fdf4;color:#15803d;font-weight:600;}
.tr-banner{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  margin-bottom:12px;
  border-radius:8px;
  font-size:12px;
  border:1px solid;
  background:#fff;
}
.tr-banner.ok  {border-color:#bbf7d0;background:#f0fdf4;color:#15803d;}
.tr-banner.warn{border-color:#fcd34d;background:#fffbeb;color:#9a3412;}

/* ============================================================
   Tracker → Care Team panel (xlsx Care Team sheet, 10 disciplines)
   Per-role grid with ✓ / ⨯ icons. Click ⨯ to inline-assign.
   ============================================================ */
.ctp-wrap{overflow-x:auto;}
.ctp-table{min-width:1100px;}
.ctp-table thead th{font-size:10.5px;text-align:center;vertical-align:bottom;padding:8px 4px;}
.ctp-table thead th.ctp-member-h{text-align:left;min-width:200px;}
.ctp-table thead th.ctp-tier-h{text-align:left;width:96px;}
.ctp-table thead th.ctp-count-h{text-align:center;width:42px;}
.ctp-table thead th.ctp-role-h{width:80px;font-size:14px;line-height:1.1;color:#475569;}
.ctp-table thead th .ctp-role-h-lbl{display:block;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;margin-top:3px;}
.ctp-table tbody td{vertical-align:middle;font-size:12px;padding:8px 6px;}
.ctp-table tbody td.ctp-member{padding-left:14px;}
.ctp-table tbody td.ctp-member .ctp-name{font-weight:600;color:#0f172a;}
.ctp-table tbody td.ctp-member .ctp-meta{font-size:10.5px;color:#64748b;}
.ctp-table tbody td.ctp-cell{text-align:center;border-left:1px solid #f1f5f9;padding:6px 4px;cursor:default;height:56px;}
.ctp-table tbody td.ctp-filled{background:#f0fdf4;cursor:pointer;}
.ctp-table tbody td.ctp-filled:hover{background:#dcfce7;}
.ctp-table tbody td.ctp-filled .ctp-check{display:inline-block;width:18px;height:18px;line-height:18px;border-radius:50%;background:#16a34a;color:#fff;font-size:11px;font-weight:700;}
.ctp-table tbody td.ctp-filled .ctp-name-short{display:block;font-size:10px;color:#15803d;font-weight:600;margin-top:3px;max-width:74px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ctp-table tbody td.ctp-empty{background:#fffbeb;cursor:pointer;}
.ctp-table tbody td.ctp-empty:hover{background:#fef3c7;}
.ctp-table tbody td.ctp-empty .ctp-x{display:inline-block;width:18px;height:18px;line-height:18px;border-radius:50%;background:#fff;color:#94a3b8;font-size:14px;font-weight:700;border:1px dashed #cbd5e1;}
.ctp-table tbody td.ctp-empty:hover .ctp-x{border-color:#0f172a;color:#0f172a;border-style:solid;}
.ctp-table tbody td.ctp-na .ctp-dash{color:#cbd5e1;font-size:14px;}
.ctp-row.no-lead td.ctp-cell:nth-child(4){background:#fef2f2;}  /* highlight missing Lead */
.ctp-row.no-lead td.ctp-cell.ctp-empty:nth-child(4) .ctp-x{border-color:#fecaca;background:#fff;color:#dc2626;}

/* ============================================================
   Tracker → SLA Monitor — Status pill + countdown stacked
   ============================================================ */
.sla-table tbody td{vertical-align:middle;}
.sla-table .sla-member{font-weight:600;color:#0f172a;font-size:13px;}
.sla-table .sla-id{font-size:10.5px;color:#64748b;}
.sla-table .sla-case-status{font-size:12px;color:#475569;font-weight:500;}
.sla-table .sla-stack{display:flex;flex-direction:column;gap:3px;align-items:flex-start;}
.sla-table .sla-done-date{font-size:10px;color:#64748b;font-style:italic;}
.sla-status{
  display:inline-flex;align-items:center;gap:5px;
  padding:2px 8px;border-radius:11px;
  font-size:10.5px;font-weight:600;
  border:1px solid;
}
.sla-status .dot{width:6px;height:6px;border-radius:50%;}
.sla-status.sla-not{background:#f1f5f9;color:#64748b;border-color:#e2e8f0;}
.sla-status.sla-not .dot{background:#94a3b8;}
.sla-status.sla-progress{background:#eff6ff;color:#1e40af;border-color:#bfdbfe;}
.sla-status.sla-progress .dot{background:#2563eb;}
.sla-status.sla-done{background:#f0fdf4;color:#15803d;border-color:#bbf7d0;}
.sla-status.sla-done .dot{background:#16a34a;}

/* HRCM Prompt modal — replaces window.prompt() everywhere in the drawer. */
.hrcm-prompt-backdrop{
  position:fixed;inset:0;background:rgba(15,23,42,.4);
  display:flex;align-items:center;justify-content:center;
  z-index:10000;
  animation:hrcmPromptFade .15s ease;
}
@keyframes hrcmPromptFade{from{opacity:0}to{opacity:1}}
.hrcm-prompt-modal{
  background:#fff;border-radius:12px;
  width:min(440px,92vw);
  box-shadow:0 20px 50px -10px rgba(15,23,42,.35), 0 8px 16px -4px rgba(15,23,42,.15);
  overflow:hidden;
  animation:hrcmPromptSlide .18s cubic-bezier(.16,1,.3,1);
}
@keyframes hrcmPromptSlide{from{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}
.hrcm-prompt-header{padding:18px 22px 6px;}
.hrcm-prompt-title{font-size:16px;font-weight:700;color:#0f172a;}
.hrcm-prompt-subtitle{font-size:12.5px;color:#64748b;margin-top:4px;line-height:1.45;}
.hrcm-prompt-body{padding:14px 22px;display:flex;flex-direction:column;gap:6px;}
.hrcm-prompt-label{font-size:12px;font-weight:600;color:#334155;margin-top:8px;}
.hrcm-prompt-input{
  padding:9px 12px;
  border:1px solid #d0d7de;
  border-radius:8px;
  font-size:14px;
  font-family:inherit;
  color:#0f172a;
  background:#fff;
  transition:border-color .12s, box-shadow .12s;
  margin-bottom:2px;
}
.hrcm-prompt-input:focus{outline:none;border-color:#0f172a;box-shadow:0 0 0 3px rgba(15,23,42,.08);}
.hrcm-prompt-footer{
  padding:14px 22px 18px;
  display:flex;justify-content:flex-end;gap:8px;
  border-top:1px solid #f1f5f9;
  background:#fafbfc;
}
.hrcm-prompt-btn{
  padding:9px 18px;border-radius:8px;font-size:13px;font-weight:600;
  border:1px solid;cursor:pointer;font-family:inherit;
  transition:background .12s, border-color .12s;
}
.hrcm-prompt-btn.cancel{background:#fff;color:#475569;border-color:#d0d7de;}
.hrcm-prompt-btn.cancel:hover{background:#f1f5f9;border-color:#94a3b8;color:#0f172a;}
.hrcm-prompt-btn.confirm{background:#0f172a;color:#fff;border-color:#0f172a;}
.hrcm-prompt-btn.confirm:hover{background:#1e293b;}
/* Worklist layout — list-first canvas + side-sheet detail. */
.hrcm-layout{display:block;position:relative;max-width:100%;overflow:hidden;}
.hrcm-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:10px 0 12px;}
.hrcm-toolbar .hrcm-search{flex:0 1 280px;min-width:180px;margin:0;width:auto;}
.hrcm-toolbar .hrcm-chips{flex:0 0 auto;margin:0;}
.hrcm-toolbar .toolbar-meta{margin-left:auto;font-size:11px;color:#64748b;font-style:italic;}
/* Side-sheet detail pane (slides in from right). */
.hrcm-detail{position:fixed;top:0;right:0;bottom:0;width:min(580px,92vw);background:#fafafa;border-left:1px solid #d8d4cc;box-shadow:-12px 0 32px rgba(0,0,0,.10);transform:translateX(100%);transition:transform .22s cubic-bezier(.2,.7,.2,1);z-index:60;overflow-y:auto;display:flex;flex-direction:column;}
.hrcm-detail.open{transform:translateX(0);}
.hrcm-detail-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.28);opacity:0;pointer-events:none;transition:opacity .22s;z-index:55;}
.hrcm-detail-backdrop.open{opacity:1;pointer-events:auto;}
.hrcm-detail-close{position:sticky;top:0;align-self:flex-end;margin:8px 8px 0;padding:6px 10px;background:#fff;border:1px solid #d8d4cc;border-radius:6px;cursor:pointer;font-size:13px;color:#1f2933;z-index:2;}
.hrcm-detail-close:hover{background:#eef7f7;border-color:var(--teal-dark);color:var(--teal-dark);}
.hrcm-detail-close kbd{font-family:inherit;font-size:10px;background:#f1f3f5;border:1px solid #d8d4cc;border-radius:3px;padding:1px 4px;margin-left:4px;}
@media(max-width:1280px){.hrcm-table .col-lowprio{display:none;}}
@media(max-width:1024px){.hrcm-table .col-midprio{display:none;} .hrcm-table .member-row .member-secondary{max-width:200px;}}
.case-workspace-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 14px;padding:10px 12px;background:#f8fafc;border-radius:8px;border:1px solid #e2e8f0;}
.ws-tab{background:#fff;border:1px solid #d0d7de;border-radius:6px;padding:7px 12px;cursor:pointer;font-size:12px;font-weight:600;color:#475569;box-shadow:none;transition:background .12s, border-color .12s, color .12s;}
.ws-tab:hover{background:#f1f5f9;border-color:#94a3b8;color:#0f172a;transform:none;}
.hrcm-table{width:100%;}
.hrcm-table tbody tr:hover td:first-child{border-left-color:#01696F;}
.hrcm-table tbody tr.row-active{background:#d6eaf8;}
.hrcm-table tbody tr.row-active td:first-child{border-left-color:#01696F;}
.hrcm-table tbody tr.row-nomatch{opacity:.7;background:rgba(248,215,218,0.18);}
.hrcm-table tbody tr.row-nomatch.row-active{background:#d6eaf8;opacity:1;}
/* Closed / Disenrolled cases — muted so they fade into the background and
   don't distract the CM from active work. Ann 2026-05-23. */
/* Closed / disenrolled rows: NOT "cut out" (Ann 2026-06-01 — no strikethrough,
   no heavy grey-out). They read like any other row; the muted "Closure" stage
   chip is the only signal that the case is closed. */
.hrcm-table tbody tr.row-inactive .member-name{color:var(--muted);}
.hrcm-table tbody tr.row-inactive.row-active{background:var(--teal-light);}

/* Stage header — consistent numbered title in the app's display font (replaces
   the bare "Stage 4 — Care Plan" h3s). Ann 2026-06-01. */
.mc-stage-head{display:flex;align-items:center;gap:10px;margin:0 0 14px;}
.mc-stage-head .mc-stage-num{
  display:inline-flex;align-items:center;justify-content:center;
  width:26px;height:26px;border-radius:50%;flex:0 0 26px;
  background:var(--teal);color:#fff;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;
}
.mc-stage-head h3{
  margin:0;font-family:var(--font-display);font-size:20px;font-weight:600;
  color:var(--teal-dark);letter-spacing:-.2px;line-height:1.1;
}
.mc-stage-head .mc-stage-extra{font-family:var(--font-body);font-size:13px;color:var(--muted);font-weight:500;}
.mc-stage-head .mc-stage-of{margin-left:auto;font-size:11px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.06em;white-space:nowrap;}

/* Chart stage forms (Intake/IA/Care Plan/…): consistent, polished controls so
   the Intake form no longer renders as raw browser default fields (Ann 2026-06-01). */
.stage-card input:not([type="checkbox"]):not([type="radio"]),
.stage-card select,
.stage-card textarea{
  width:100%; box-sizing:border-box;
  padding:7px 10px; margin:0;
  border:1px solid var(--border); border-radius:6px;
  font-family:inherit; font-size:13px; color:var(--text); background:#fff;
  outline:none; transition:border-color .12s, box-shadow .12s;
}
.stage-card input:focus, .stage-card select:focus, .stage-card textarea:focus{
  border-color:var(--teal); box-shadow:0 0 0 3px rgba(0,107,107,.08);
}
.stage-card table{ border-collapse:collapse; }
.stage-card table th{ font-size:11px; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.03em; }
.stage-card table td{ padding:4px 6px; }
.stage-card table input, .stage-card table select{ padding:5px 7px; font-size:12px; }
.stage-card h4{ color:var(--teal-dark); font-weight:700; }
.hrcm-table .member-name{font-weight:600;}
.hrcm-table .meta{color:#777;font-size:11px;}

/* PCP Outreach (Section 9 of SOP v5.3) */
.po-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin-bottom:12px;}
.po-kpi{background:#fff;border:1px solid var(--border);border-radius:8px;padding:10px 12px;}
.po-kpi-n{font-size:22px;font-weight:700;color:var(--teal-dark);}
.po-kpi-l{font-size:11px;color:var(--muted);margin-top:2px;}
.po-chips{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 10px;}
.po-chip{padding:5px 10px;border:1px solid var(--border);border-radius:18px;background:#fff;font-size:11px;cursor:pointer;color:#1f2933;}
.po-chip:hover{border-color:var(--teal);}
.po-chip.active{background:var(--teal-dark);color:#fff;border-color:var(--teal-dark);}
.po-chip-n{display:inline-block;margin-left:4px;padding:1px 5px;border-radius:8px;background:rgba(0,0,0,.08);font-size:10px;}
.po-chip.active .po-chip-n{background:rgba(255,255,255,.25);}
.po-table-wrap{overflow-x:auto;}
.po-member-name{font-weight:600;font-size:12px;}
.po-meta{color:#777;font-size:11px;}
.po-badge{display:inline-block;padding:2px 7px;border-radius:10px;font-size:10px;font-weight:700;letter-spacing:.4px;}
.po-badge.urgent{background:#fee;color:#a8071a;border:1px solid #ffadd2;}
.po-badge.priority{background:#fff7e6;color:#ad4e00;border:1px solid #ffd591;}
.po-badge.monitor{background:#f6ffed;color:#237804;border:1px solid #b7eb8f;}
.po-badge.strong{background:#e6f4ff;color:#0050b3;border:1px solid #91caff;}
.po-badge.consider{background:#f0f5ff;color:#1d39c4;border:1px solid #adc6ff;}
.po-badge.none{color:#bbb;}
.po-status{display:inline-block;padding:2px 8px;border-radius:10px;font-size:10px;font-weight:600;}
.po-status-open{background:#f5f5f5;color:#555;}
.po-status-contacted{background:#fff7e6;color:#ad4e00;}
.po-status-scheduled{background:#e6f4ff;color:#0050b3;}
.po-status-completed{background:#f6ffed;color:#237804;}
.po-actions{display:flex;flex-wrap:wrap;gap:4px;align-items:center;}
.po-act{background:#fff;border:1px solid var(--border);border-radius:5px;padding:4px 8px;cursor:pointer;font-size:14px;line-height:1;transition:background .12s, border-color .12s, transform .12s;}
.po-act:hover{background:var(--teal);color:#fff;border-color:var(--teal);transform:translateY(-1px);}
.po-notes-cell{min-width:120px;max-width:170px;display:flex;align-items:center;justify-content:space-between;gap:6px;}
.po-notes-cell > .po-meta{flex:1;min-width:0;}
.po-log-badge{background:#f3efe5;border:1px solid #e0dcc8;border-radius:12px;padding:2px 8px;font-size:11px;font-weight:600;color:var(--teal-dark);cursor:pointer;white-space:nowrap;}
.po-log-badge:hover{background:var(--teal-dark);color:#fff;border-color:var(--teal-dark);}
/* Legacy link still styled for back-compat with anything still calling it */
.po-act-link{background:none;border:none;color:var(--teal-dark);font-size:11px;font-weight:600;padding:2px 0;margin-top:4px;cursor:pointer;text-decoration:underline;}
.po-act-link:hover{color:var(--teal);}
/* Worklist row tier badges — softened per Ann 2026-05-23 "colors are too
   much". Pastel tint + colored 1px border + dark text; reads as a clinical
   status label, not a saturated alert. */
.tier{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:2px 8px;
  border-radius:11px;
  font-size:10.5px;
  font-weight:700;
  letter-spacing:.04em;
  border:1px solid;
  background:#ffffff;
  line-height:1.3;
}
.tier::before{content:"";width:6px;height:6px;border-radius:50%;}
.tier-urgent  {background:#fef2f2;border-color:#fecaca;color:#991b1b;}
.tier-urgent::before  {background:#dc2626;}
.tier-priority{background:#fff7ed;border-color:#fed7aa;color:#9a3412;}
.tier-priority::before{background:#ea580c;}
.tier-monitor {background:#eff6ff;border-color:#bfdbfe;color:#1e40af;}
.tier-monitor::before {background:#2563eb;}
.tier-strong  {background:#f5f3ff;border-color:#ddd6fe;color:#5b21b6;}
.tier-strong::before  {background:#7c3aed;}
.tier-consider{background:#fdf4ff;border-color:#f5d0fe;color:#86198f;}
.tier-consider::before{background:#a21caf;}
.tier-engaged{background:#f0fdf4;border-color:#bbf7d0;color:#15803d;}
.tier-engaged::before{background:#16a34a;}
.raf-gap-chip{display:inline-block;background:#d4edda;color:#155724;padding:1px 6px;border-radius:3px;font-size:10px;}
.risk-share-pill{display:inline-block;background:#e4e0f5;color:#4a2e8f;padding:1px 6px;border-radius:3px;font-size:10px;font-weight:600;letter-spacing:.3px;border:1px solid #c8bff0;cursor:help}
.spend-chip{display:inline-block;padding:1px 5px;border-radius:3px;font-size:10px;font-weight:700;margin-left:4px;cursor:help;}
.spend-1{background:#fff3cd;color:#856404;}
.spend-2{background:#ffe082;color:#8a5b00;}
.spend-3{background:#f5c6cb;color:#721c24;}
/* CCI buckets — no background wash, just a colored dot + label so the row
   reads cleanly. Per Ann's medical-chart ask. */
.cci-bucket{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:0;
  margin-left:6px;
  font-size:10.5px;
  font-weight:600;
  background:transparent;
  border-radius:0;
  color:#475569;
}
.cci-bucket::before{content:"";width:6px;height:6px;border-radius:50%;background:#94a3b8;}
.cci-low::before  {background:#16a34a;}
.cci-mod::before  {background:#ca8a04;}
.cci-high::before {background:#ea580c;}
.cci-vhigh::before{background:#dc2626;}
.cci-low  {color:#15803d;}
.cci-mod  {color:#854d0e;}
.cci-high {color:#9a3412;}
.cci-vhigh{color:#991b1b;}
.hospice-reasons{font-size:10px;color:#555;margin-top:2px;line-height:1.3;}
.row-flag-chip{display:inline-block;padding:1px 5px;border-radius:3px;background:#eef2f5;color:#374151;font-size:10px;margin:1px 3px 1px 0;line-height:1.3;}
.row-flag-chip.red{background:#fadbd8;color:#922b21;}
.row-bh-chip{display:inline-block;padding:1px 5px;border-radius:3px;background:#e9d6ff;color:#5b21b6;font-size:10px;font-weight:700;margin-left:4px;}
.engine-freshness{font-size:10px;color:var(--muted);margin:-2px 0 6px;font-style:italic}
.match-pill{display:inline-block;padding:1px 6px;border-radius:3px;font-size:10px;margin-left:4px;}
.match-pill-trunc{background:#e8e8e8;color:#555;}
.match-pill-name{background:#fcf3cf;color:#7d6608;}
.match-pill-nomatch{background:#f8d7da;color:#721c24;font-weight:600;}
.empty,.empty-detail{padding:24px;color:#888;text-align:center;font-size:13px;}
.case-detail{padding:12px 16px;}
.case-detail .case-header h2{margin:0 0 4px;font-size:18px;}
.case-detail .warn-banner{background:#fcf3cf;color:#7d6608;border-left:3px solid #d68910;padding:6px 10px;border-radius:4px;margin-top:6px;font-size:12px;}
/* Side panel summary tiles + flag chips + playbook — Ann 2026-05-23
   medical-chart restyle to match the dashboard. White cards with corner
   dots; no pastel washes. */
.case-detail .summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:14px 0;}
.case-detail .summary-tile{
  position:relative;
  background:#ffffff;
  padding:12px 14px;
  border-radius:8px;
  border:1px solid #d0d7de;
  box-shadow:0 1px 0 rgba(15,23,42,.04), inset 0 -1px 0 rgba(15,23,42,.05), 0 1px 2px rgba(15,23,42,.04);
}
.case-detail .summary-tile .lbl,
.case-detail .summary-tile .meta{font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;color:#64748b;font-weight:700;padding-right:14px;}
.case-detail .summary-tile .val{font-weight:700;font-size:18px;margin-top:4px;color:#0f172a;font-variant-numeric:tabular-nums;}
.case-detail .summary-tile::after{
  content:"";
  position:absolute;
  top:10px;right:10px;
  width:7px;height:7px;
  border-radius:50%;
  background:transparent;
}
.case-detail .tile-urgent::after  {background:#dc2626;}
.case-detail .tile-priority::after{background:#ea580c;}
.case-detail .tile-monitor::after {background:#2563eb;}
.case-detail .tile-hospice-strong::after  {background:#7c3aed;}
.case-detail .tile-hospice-consider::after{background:#a21caf;}
.case-detail .reasons{margin:8px 0;font-size:13px;color:#475569;}
.case-detail .flags-row{margin:10px 0;display:flex;gap:6px;flex-wrap:wrap;align-items:center;}
.case-detail .flag-chip{
  display:inline-flex;align-items:center;gap:5px;
  padding:3px 8px;border-radius:11px;
  background:#f1f5f9;color:#334155;
  font-size:11px;font-weight:600;
  border:1px solid #e2e8f0;
}
.case-detail .flag-chip::before{content:"";width:6px;height:6px;border-radius:50%;background:#94a3b8;}
.case-detail .flag-red{background:#fef2f2;color:#991b1b;border-color:#fecaca;}
.case-detail .flag-red::before{background:#dc2626;}
/* Playbook card — clinical chart styling. */
.case-detail .playbook-card{background:#fff;border:1px solid #d0d7de;border-left:4px solid #f59e0b;padding:12px 14px;margin:12px 0;border-radius:8px;box-shadow:0 1px 2px rgba(15,23,42,.04);}
.case-detail .playbook-card.playbook-urgent{border-left-color:#dc2626;background:#fef2f2;}
.case-detail .playbook-card.playbook-hospice_strong{border-left-color:#7c3aed;background:#faf5ff;}
.case-detail .playbook-card.playbook-bh{border-left-color:#a21caf;background:#fdf4ff;}
.case-detail .playbook-card h3{margin:0 0 6px;font-size:14px;}
.case-detail .playbook-card ol{margin:6px 0 6px 22px;font-size:12px;}
.case-detail section{margin:14px 0;}
.case-detail section h3{font-size:13px;text-transform:uppercase;letter-spacing:.4px;color:#555;margin:0 0 6px;border-bottom:1px solid #eee;padding-bottom:3px;}
.case-detail .note{background:#fff;padding:8px;margin:6px 0;border-radius:4px;border:1px solid #eee;font-size:12px;}
.case-detail .status-row{display:flex;align-items:center;gap:8px;margin:8px 0;}
.case-detail .status-row label{font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.4px;color:#555;}
.case-detail .status-row select{padding:4px 8px;border:1px solid #ccc;border-radius:4px;font-size:13px;}
.case-detail .assignments-grid{display:grid;grid-template-columns:auto 1fr;gap:6px 10px;align-items:center;font-size:12px;}
.case-detail .assignments-grid label{font-weight:500;color:#444;}
.case-detail .assignments-grid select{padding:3px 6px;border:1px solid #ccc;border-radius:4px;font-size:12px;}
.case-detail .task-table{width:100%;border-collapse:collapse;font-size:12px;}
.case-detail .task-table td{padding:4px 6px;border-bottom:1px solid #f0f0f0;vertical-align:middle;}
.case-detail .task-table tr.task-done td{color:#888;text-decoration:line-through;}
.case-detail .task-table tr.task-overdue td{background:#fdebd0;}
.case-detail .task-add-row{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap;}
.case-detail .task-add-row input[type=text]{flex:1 1 200px;}
.case-detail .task-add-row input,.case-detail .task-add-row select{padding:4px 6px;border:1px solid #ccc;border-radius:4px;font-size:12px;}
.case-detail .task-add-row #hrcm-new-task-desc{flex:1 1 200px;}
.case-detail .note-add-row{display:flex;flex-direction:column;gap:6px;margin-top:8px;}
.case-detail .note-add-row textarea{min-height:60px;padding:6px;border:1px solid #ccc;border-radius:4px;font-size:12px;font-family:inherit;}
.case-detail .note-add-row button{align-self:flex-end;}
.case-detail .btn-p{background:#2874a6;color:#fff;border:none;padding:4px 10px;border-radius:4px;cursor:pointer;font-size:12px;}
.case-detail .btn-sm{font-size:12px;padding:3px 8px;}
.case-detail .case-actions{display:flex;gap:6px;margin:10px 0;flex-wrap:wrap;}
.case-detail .case-actions button{font-size:12px;padding:5px 10px;border:1px solid #ccc;border-radius:4px;background:#fff;cursor:pointer;}
.case-detail .case-actions button.btn-p{background:#2874a6;color:#fff;border-color:#2874a6;}
.case-detail .attachments-row{margin:6px 0;font-size:12px;background:#fafafa;padding:6px 10px;border-radius:4px;}
.case-detail .attachments-row a{color:#2874a6;}
.case-detail .pa-panel{margin-top:14px;padding:10px;background:#fafafa;border:1px solid #eee;border-radius:6px;}
.case-detail .pa-panel button{margin-bottom:8px;}
.case-detail .pa-table{width:100%;border-collapse:collapse;font-size:12px;}
.case-detail .pa-table th,.case-detail .pa-table td{padding:4px 6px;border-bottom:1px solid #eee;text-align:left;vertical-align:top;}
.case-detail .pa-table thead th{background:#f0f0f0;font-weight:600;}
.case-detail .auth-status{display:inline-block;padding:2px 6px;border-radius:3px;font-size:11px;font-weight:600;}
.case-detail .auth-draft{background:#e8e8e8;color:#555;}
.case-detail .auth-pending{background:#fef9e7;color:#7d6608;}
.case-detail .auth-approved{background:#d4edda;color:#155724;}
.case-detail .auth-partial{background:#fcf3cf;color:#7d6608;}
.case-detail .auth-denied{background:#f8d7da;color:#721c24;}
.case-detail .auth-modified{background:#fce4d4;color:#a04000;}
.case-detail .auth-withdrawn{background:#e8e8e8;color:#666;}
.case-detail .auth-expired{background:#e8e8e8;color:#666;text-decoration:line-through;}
.case-detail .pa-table .overdue{color:#c0392b;font-weight:700;}
/* PA modal */
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:9000;}
.modal{position:fixed;top:5%;left:50%;transform:translateX(-50%);width:720px;max-width:92vw;max-height:88vh;overflow:auto;background:#fff;padding:18px 22px;border-radius:8px;z-index:9001;box-shadow:0 8px 30px rgba(0,0,0,.3);}
.modal h2{margin:0 0 12px;font-size:18px;}
.pa-modal fieldset{border:1px solid #ddd;margin:6px 0;padding:8px 10px;border-radius:4px;}
.pa-modal legend{font-size:12px;font-weight:700;color:#555;}
.pa-modal input,.pa-modal textarea,.pa-modal select{width:100%;padding:5px 8px;margin:3px 0;box-sizing:border-box;border:1px solid #ccc;border-radius:3px;font-size:13px;font-family:inherit;}
.pa-modal label{font-size:12px;margin-right:8px;}
.pa-modal label input[type=radio]{width:auto;margin-right:4px;}
.pa-modal .svc{display:grid;grid-template-columns:1fr 80px 1fr 1fr;gap:6px;margin-bottom:4px;}
.pa-modal textarea{min-height:60px;}
.modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:14px;border-top:1px solid #eee;padding-top:12px;}
.lookup-filters{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0;}
.lookup-filters input,.lookup-filters select{padding:5px 8px;border:1px solid #ccc;border-radius:4px;font-size:12px;}
.pa-table{width:100%;border-collapse:collapse;font-size:12px;}
.pa-table th,.pa-table td{padding:5px 8px;border-bottom:1px solid #eee;text-align:left;vertical-align:top;}
.pa-table thead th{background:#f0f0f0;font-weight:600;}
.pa-table .overdue{color:#c0392b;font-weight:700;}
.auth-status{display:inline-block;padding:2px 6px;border-radius:3px;font-size:11px;font-weight:600;}
.auth-draft{background:#e8e8e8;color:#555;}
.auth-pending{background:#fef9e7;color:#7d6608;}
.auth-approved{background:#d4edda;color:#155724;}
.auth-partial{background:#fcf3cf;color:#7d6608;}
.auth-denied{background:#f8d7da;color:#721c24;}
.auth-modified{background:#fce4d4;color:#a04000;}
.auth-withdrawn{background:#e8e8e8;color:#666;}
.auth-expired{background:#e8e8e8;color:#666;text-decoration:line-through;}
.hipaa-strip{position:sticky;top:0;z-index:900;background:#7d2d12;color:#fff5e6;text-align:center;padding:5px 10px;font-size:11px;letter-spacing:1.4px;font-weight:700;border-bottom:1px solid #5a1f0c;}
.hipaa-strip .hipaa-icon{margin-right:8px;}
.case-detail .adh-panel{margin-top:14px;padding:10px;background:#fff5e6;border:1px solid #f5cba7;border-radius:6px;}
.case-detail .adh-panel h4.adh-h4{font-size:12px;text-transform:uppercase;color:#7d6608;margin:8px 0 4px;}
.case-detail .med-table,.case-detail .adh-grid{width:100%;border-collapse:collapse;font-size:12px;}
.case-detail .med-table td{padding:3px 6px;border-bottom:1px solid #f0d9a8;}
.case-detail .adh-grid th,.case-detail .adh-grid td{padding:4px;text-align:center;border:1px solid #f0d9a8;font-size:11px;}
.case-detail .adh-grid td:first-child{text-align:left;font-weight:600;background:#fef9e7;}
.case-detail .adh-grid td.cell-picked{background:#d4edda;color:#155724;cursor:pointer;}
.case-detail .adh-grid td.cell-missed{background:#f8d7da;color:#721c24;font-weight:700;cursor:pointer;}
.case-detail .adh-grid td.cell-partial{background:#fcf3cf;color:#7d6608;cursor:pointer;}
.case-detail .adh-grid td.cell-na{background:#eee;color:#888;cursor:pointer;}
.case-detail .hh-panel{margin-top:14px;padding:10px;background:#eaf3f9;border:1px solid #aed6f1;border-radius:6px;}
.case-detail .hh-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:6px;}
.case-detail .hh-files{margin:6px 0;font-size:12px;padding-left:18px;}
@media(max-width:980px){.hrcm-kpi-strip{grid-template-columns:repeat(3,1fr);} .hrcm-detail{width:100vw;}}

/* Care Plan redesign 2026-05-21 — .cp-page wraps the entire renderer output. */
.cp-page{--cp-card-bg:#fff;--cp-border:#e3e7eb;--cp-border-strong:#d0d6dc;--cp-muted:#64748b;--cp-text:#1f2933;--cp-accent:var(--teal-dark);font-size:13px;color:var(--cp-text);}
.cp-page h2{font-size:20px;font-weight:700;margin:0;letter-spacing:-.2px;}
.cp-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:0 0 14px;padding:14px 16px;background:linear-gradient(180deg,#fafbfc,#f1f5f7);border:1px solid var(--cp-border);border-radius:10px;flex-wrap:wrap;}
.cp-header-left{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1 1 360px;}
.cp-header-meta{font-size:11px;color:var(--cp-muted);}
.cp-header-meta strong{color:var(--cp-text);font-weight:600;}
.cp-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
.cp-actions .btn{font-size:12px;}
.cp-save-state{font-size:11px;color:var(--cp-muted);padding:3px 10px;border-radius:12px;background:#fff;border:1px solid var(--cp-border);}
.cp-save-state:empty{display:none;}
.cp-grid{display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr);gap:14px;align-items:start;}
/* Rail sits below the global sticky topbar (54px) AND the sticky tab strip
   (52px). Ann 2026-05-23 — topbar+tabbar handoff so the rail doesn't slip
   underneath them when scrolling. */
.cp-rail{position:sticky;top:120px;display:flex;flex-direction:column;gap:10px;align-self:start;}
.cp-main{display:flex;flex-direction:column;gap:14px;min-width:0;}
@media(max-width:1100px){.cp-grid{grid-template-columns:1fr;} .cp-rail{position:static;max-height:none;}}
.cp-page .hrcm-card{background:var(--cp-card-bg);border:1px solid var(--cp-border);border-left:4px solid var(--cp-border-strong);border-radius:8px;padding:12px 14px!important;margin-top:0!important;box-shadow:0 1px 1px rgba(15,23,42,.02);}
.cp-rail .hrcm-card{padding:10px 12px!important;}
.cp-rail .hrcm-card > div:first-child{font-size:11px!important;text-transform:uppercase;letter-spacing:.6px;color:var(--cp-muted)!important;margin-bottom:6px!important;font-weight:700!important;}
.cp-main .hrcm-card{padding:14px 16px!important;}
.cp-main .hrcm-card > div:first-child[style*="font-weight:700"]{font-size:13px!important;font-weight:700!important;margin-bottom:10px!important;color:var(--cp-text)!important;padding-bottom:6px;border-bottom:1px solid var(--cp-border);}
.cp-rail .hrcm-card:nth-child(1){border-left-color:#dc2626;}
.cp-rail .hrcm-card:nth-child(2){border-left-color:#0ea5e9;}
.cp-rail .hrcm-card:nth-child(3){border-left-color:#0ea5e9;}
.cp-rail .hrcm-card:nth-child(4){border-left-color:#0d9488;}
.cp-rail .hrcm-card:nth-child(5){border-left-color:#d97706;}
.cp-rail .hrcm-card:nth-child(6){border-left-color:#7c3aed;}
.cp-rail .hrcm-card:nth-child(7){border-left-color:#0ea5e9;}
.cp-rail .hrcm-card:nth-child(8){border-left-color:#ea580c;}
.cp-main .hrcm-card{border-left-color:#475569;}
/* Care Plan tabbed chart — Ann 2026-05-23 (recentlysharedfiles/care_plan_form (1).html). */
.cp-tabbar{display:flex;gap:2px;border-bottom:2px solid var(--cp-border);padding:0 4px;margin:0 0 14px;flex-wrap:wrap;background:#fff;border-radius:8px 8px 0 0;position:sticky;top:54px;z-index:5;box-shadow:0 1px 0 rgba(0,0,0,.02);}
.cp-tabbar button{background:transparent;border:none;padding:11px 14px;cursor:pointer;font-size:13px;font-weight:500;color:#64748b;border-bottom:3px solid transparent;margin-bottom:-2px;font-family:inherit;display:inline-flex;align-items:center;gap:6px;border-radius:6px 6px 0 0;}
.cp-tabbar button:hover{color:#0f172a;background:#f1f5f9;}
.cp-tabbar button.active{color:#0f172a;font-weight:600;border-bottom-color:var(--teal-dark);background:#f8fafc;}
.cp-tabbar button.locked,.cp-tabbar button[aria-disabled="true"]{color:#cbd5e1;cursor:not-allowed;}
.cp-tabbar button.locked:hover,.cp-tabbar button[aria-disabled="true"]:hover{background:transparent;color:#cbd5e1;}
.cp-tab-lock{font-size:11px;opacity:.6;}
/* Hide cards that don't belong to the active tab — but skip elements
   that explicitly opt out (e.g. .cp-rail which is profile-gated). Specificity
   matters: show rules below MUST match the hide rule's specificity (0,4,0)
   so they win on tie-breaking. We append :not([data-cp-skip]) to each show
   selector for parity. */
.cp-page[data-cp-active-tab] [data-cp-tab]:not([data-cp-skip]){display:none;}
.cp-page[data-cp-active-tab="member"] [data-cp-tab="member"]:not([data-cp-skip]),
.cp-page[data-cp-active-tab="intake"] [data-cp-tab="intake"]:not([data-cp-skip]),
.cp-page[data-cp-active-tab="assessment"] [data-cp-tab="assessment"]:not([data-cp-skip]),
.cp-page[data-cp-active-tab="screens"] [data-cp-tab="screens"]:not([data-cp-skip]),
.cp-page[data-cp-active-tab="careteam"] [data-cp-tab="careteam"]:not([data-cp-skip]),
.cp-page[data-cp-active-tab="careplan"] [data-cp-tab="careplan"]:not([data-cp-skip]),
.cp-page[data-cp-active-tab="export"] [data-cp-tab="export"]:not([data-cp-skip]){display:block;}
/* Progress Notes — compact inline panel anchored at the bottom of each
   assessment tab. Top spacing intentional so it doesn't feel attached to
   the form above. Minimal chrome — single dotted divider, no card border. */
.cp-notes-tab{margin-top:28px !important;padding:18px 2px 4px !important;border:none !important;border-top:1px dashed var(--cp-border) !important;background:transparent !important;border-radius:0 !important;box-shadow:none !important;}
.cp-notes-tab .cp-notes-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;}
.cp-notes-tab .cp-notes-head-title{font-size:11px;font-weight:600;color:#475569;letter-spacing:.04em;text-transform:uppercase;display:flex;align-items:center;gap:8px;}
.cp-notes-tab .cp-notes-count{background:#f1f5f9;color:#475569;font-weight:600;font-size:10.5px;padding:1px 7px;border-radius:9px;letter-spacing:0;text-transform:none;}
.cp-notes-tab details.cp-notes-composer-wrap{margin-bottom:10px;}
.cp-notes-tab details.cp-notes-composer-wrap summary{cursor:pointer;display:inline-flex;align-items:center;gap:5px;list-style:none;font-size:11.5px;color:var(--teal-dark);font-weight:500;padding:4px 10px;border:1px dashed #cbd5e1;border-radius:6px;background:#fafbfc;}
.cp-notes-tab details.cp-notes-composer-wrap summary::-webkit-details-marker{display:none;}
.cp-notes-tab details.cp-notes-composer-wrap summary:hover{background:#f1f5f9;border-style:solid;}
.cp-notes-tab details.cp-notes-composer-wrap[open] summary{display:none;}
.cp-notes-tab .cp-notes-composer{background:#fff;border:1px solid var(--cp-border);border-radius:7px;padding:10px 12px;}
.cp-notes-tab .cp-notes-composer textarea{width:100%;min-height:54px;padding:7px 9px;font-size:12.5px;line-height:1.45;border:1px solid #e2e8f0;border-radius:5px;font-family:inherit;resize:vertical;}
.cp-notes-tab .cp-notes-composer textarea:focus{outline:none;border-color:var(--teal-dark);box-shadow:0 0 0 2px rgba(13,148,136,.15);}
.cp-notes-tab .cp-notes-composer-actions{display:flex;gap:7px;align-items:center;margin-top:8px;flex-wrap:wrap;}
.cp-notes-tab .cp-notes-composer-actions label{font-size:11px;color:#64748b;}
.cp-notes-tab .cp-notes-composer-actions select{padding:4px 7px;font-size:11.5px;border:1px solid #e2e8f0;border-radius:5px;background:#fff;min-width:170px;}
.cp-notes-tab .cp-notes-composer-actions .btn{font-size:11.5px;padding:4px 10px;}
.cp-notes-tab .cp-notes-composer-actions .cp-notes-cancel{background:transparent;border:none;color:#94a3b8;font-size:11px;cursor:pointer;padding:4px 6px;}
.cp-notes-tab .cp-notes-composer-actions .cp-notes-cancel:hover{color:#475569;}
.cp-notes-tab .cp-notes-composer-actions .cp-notes-soap-link{font-size:10.5px;color:#94a3b8;background:none;border:none;cursor:pointer;padding:4px 0;text-decoration:underline;text-decoration-style:dotted;}
.cp-notes-tab .cp-notes-composer-actions .cp-notes-soap-link:hover{color:var(--teal-dark);}
.cp-notes-tab .cp-notes-filterbar{display:flex;gap:5px;align-items:center;margin-bottom:6px;flex-wrap:wrap;}
.cp-notes-tab .cp-notes-filterbar .cp-chip{font-size:11px;padding:2px 9px;border-radius:11px;background:#f1f5f9;color:#475569;cursor:pointer;border:1px solid transparent;}
.cp-notes-tab .cp-notes-filterbar .cp-chip:hover{background:#e2e8f0;}
.cp-notes-tab .cp-notes-filterbar .cp-chip.active{background:var(--teal-dark);color:#fff;border-color:var(--teal-dark);}
.cp-notes-tab .cp-notes-feed{display:flex;flex-direction:column;}
.cp-notes-tab .cp-notes-item{padding:7px 4px;display:flex;gap:9px;align-items:flex-start;border-bottom:1px solid #f1f5f9;}
.cp-notes-tab .cp-notes-item:last-child{border-bottom:none;}
.cp-notes-tab .cp-notes-item .cp-notes-src{font-size:10.5px;padding:2px 8px;border-radius:10px;background:#eef2ff;color:#4338ca;font-weight:600;white-space:nowrap;flex-shrink:0;line-height:1.4;align-self:flex-start;margin-top:1px;}
.cp-notes-tab .cp-notes-item .cp-notes-src.concierge{background:#fef3c7;color:#92400e;}
.cp-notes-tab .cp-notes-item .cp-notes-src.intervention{background:#dcfce7;color:#166534;}
.cp-notes-tab .cp-notes-item .cp-notes-body{flex:1;min-width:0;}
.cp-notes-tab .cp-notes-item .cp-notes-body-text{font-size:12.5px;color:#0f172a;line-height:1.45;white-space:pre-wrap;word-break:break-word;}
.cp-notes-tab .cp-notes-item .cp-notes-secondary{font-size:11px;color:#475569;margin-top:3px;background:#f8fafc;padding:3px 7px;border-radius:4px;display:inline-block;font-variant-numeric:tabular-nums;}
.cp-notes-tab .cp-notes-item .cp-notes-meta{font-size:10.5px;color:var(--muted);margin-top:3px;}
.cp-notes-tab .cp-notes-item .cp-notes-open-btn{font-size:10px;padding:1px 7px;line-height:1.5;background:transparent;border:1px solid #e2e8f0;color:#64748b;cursor:pointer;border-radius:4px;align-self:center;flex-shrink:0;}
.cp-notes-tab .cp-notes-item .cp-notes-open-btn:hover{border-color:var(--teal-dark);color:var(--teal-dark);}
.cp-notes-tab .cp-notes-section{font-size:10px;padding:1px 6px;border-radius:8px;background:#f1f5f9;color:#334155;margin-left:6px;}
.cp-notes-tab .cp-notes-empty{padding:10px 4px;color:#94a3b8;font-size:11.5px;font-style:italic;}
/* Per-question note count chip — appears next to each Intake/IA/Screens section header */
.cp-section-chip{display:inline-flex;align-items:center;gap:3px;font-size:10.5px;padding:1px 7px;border-radius:9px;background:#eef2ff;color:#4338ca;cursor:pointer;margin-left:8px;font-weight:500;border:none;font-family:inherit;}
.cp-section-chip:hover{background:#c7d2fe;}
.cp-section-chip[data-cp-count="0"]{background:#f1f5f9;color:#94a3b8;}
/* Profile drawer — collapses the left rail into a thin badge bar. */
.cp-profile-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f8fafc;border:1px solid var(--cp-border);border-radius:8px;padding:8px 14px;margin:0 0 12px;font-size:12px;}
.cp-profile-bar .cp-profile-chips{display:flex;gap:6px;align-items:center;flex-wrap:wrap;}
.cp-profile-bar .cp-profile-chips strong{font-weight:600;color:#0f172a;}
.cp-profile-bar .cp-profile-toggle{background:none;border:none;color:var(--teal-dark);cursor:pointer;font-size:12px;font-weight:600;padding:4px 8px;border-radius:4px;}
.cp-profile-bar .cp-profile-toggle:hover{background:#e0f2f1;}
.cp-page[data-cp-profile-open="0"] .cp-rail{display:none;}
.cp-page[data-cp-profile-open="1"] .cp-rail{display:flex;}
/* Empty state */
.cp-emptystate{max-width:480px;margin:80px auto 40px;background:#fff;border:1px solid var(--cp-border);border-radius:12px;padding:32px 28px;text-align:center;box-shadow:0 4px 12px rgba(0,0,0,.04);}
.cp-emptystate h3{margin:0 0 6px;font-size:20px;font-weight:600;color:#0f172a;letter-spacing:-.2px;}
.cp-emptystate .cp-empty-sub{font-size:14px;color:#64748b;margin-bottom:20px;}
.cp-emptystate .cp-empty-actions{display:flex;flex-direction:column;gap:10px;}
.cp-emptystate .cp-empty-btn{display:flex;align-items:center;justify-content:flex-start;gap:10px;padding:13px 18px;border:1px solid var(--cp-border);background:#fff;color:#0f172a;font-size:14px;font-weight:600;border-radius:8px;cursor:pointer;font-family:inherit;text-align:left;}
.cp-emptystate .cp-empty-btn.primary{background:var(--teal-dark);color:#fff;border-color:var(--teal-dark);}
.cp-emptystate .cp-empty-btn.primary:hover{background:#015458;}
.cp-emptystate .cp-empty-btn:not(.primary):hover{background:#f8fafc;}
.cp-emptystate .cp-empty-btn[disabled]{opacity:.55;cursor:not-allowed;}
.cp-emptystate .cp-empty-foot{font-size:12px;color:#94a3b8;margin-top:18px;}
/* Workflow status pill — matches the full enum from index.html:9741. */
.cp-status-pill{display:inline-block;padding:4px 12px;border-radius:14px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;}
.cp-status-pill.not-started{background:#f1f5f9;color:#475569;}
.cp-status-pill.outreach-attempted{background:#fff7e6;color:#9c6b00;}
.cp-status-pill.engaged{background:#e0f2f1;color:#005f60;}
.cp-status-pill.care-plan-drafted{background:#e7f3fb;color:#1f4e78;}
.cp-status-pill.sent-to-pcp{background:#fff4e1;color:#9c6b00;}
.cp-status-pill.pcp-signed,.cp-status-pill.signed{background:#e7f5e6;color:#3e6f1f;}
.cp-status-pill.in-progress{background:#e0f2f1;color:#005f60;}
.cp-status-pill.on-hold{background:#f3e8ff;color:#5b21b6;}
.cp-status-pill.closed-stable,.cp-status-pill.closed-hospice,.cp-status-pill.closed-deceased,.cp-status-pill.closed{background:#e2e8f0;color:#64748b;}
.cp-status-pill.disenrolled{background:#fce4e4;color:#9c1f1f;}

/* ─── Care Plan landing page (history table) ───────────────────────── */
.cp-landing{max-width:1200px;margin:0 auto;padding:8px 4px 32px;}
.cp-landing-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px;flex-wrap:wrap;}
.cp-landing-hero h2{font-size:24px;font-weight:700;margin:0;color:#0f172a;letter-spacing:-.3px;}
.cp-landing-sub{font-size:13px;color:#64748b;margin-top:4px;}
.cp-landing-new{background:var(--teal-dark);color:#fff;border:none;padding:11px 20px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;font-family:inherit;box-shadow:0 1px 2px rgba(13,124,126,.2);transition:background .12s,transform .08s;}
.cp-landing-new:hover{background:#015458;transform:translateY(-1px);}
.cp-landing-new:active{transform:translateY(0);}

.cp-landing-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:20px;}
.cp-stat{background:#fff;border:1px solid #e3e7eb;border-radius:10px;padding:14px 16px;display:flex;flex-direction:column;gap:2px;box-shadow:0 1px 1px rgba(15,23,42,.02);}
.cp-stat-n{font-size:22px;font-weight:700;color:#0f172a;letter-spacing:-.4px;line-height:1.1;}
.cp-stat-l{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:#64748b;}
.cp-stat-neutral{border-left:3px solid #94a3b8;}
.cp-stat-engaged{border-left:3px solid #0d7c7e;}
.cp-stat-sent{border-left:3px solid #bf8f00;}
.cp-stat-signed{border-left:3px solid #548235;}

.cp-landing-toolbar{display:flex;gap:12px;align-items:center;margin-bottom:14px;flex-wrap:wrap;}
.cp-landing-search{flex:1;min-width:240px;padding:10px 14px;font-size:14px;border:1px solid #d0d7de;border-radius:8px;font-family:inherit;background:#fff;}
.cp-landing-search:focus{outline:none;border-color:var(--teal-dark);box-shadow:0 0 0 3px rgba(13,124,126,.12);}
.cp-landing-filters{display:flex;gap:6px;flex-wrap:wrap;}
.cp-filter-chip{background:#fff;border:1px solid #d0d7de;color:#475569;padding:8px 14px;border-radius:20px;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .12s;}
.cp-filter-chip:hover{border-color:#94a3b8;color:#0f172a;}
.cp-filter-chip.active{background:#0f172a;color:#fff;border-color:#0f172a;}

.cp-landing-table-wrap{background:#fff;border:1px solid #e3e7eb;border-radius:10px;overflow:hidden;box-shadow:0 1px 2px rgba(15,23,42,.04);}
.cp-landing-table{width:100%;border-collapse:collapse;font-size:13px;}
.cp-landing-table thead th{background:#f8fafc;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#64748b;padding:12px 16px;text-align:left;border-bottom:1px solid #e3e7eb;}
.cp-landing-table tbody td{padding:14px 16px;border-bottom:1px solid #f1f5f9;vertical-align:middle;}
.cp-landing-table tbody tr:last-child td{border-bottom:none;}
.cp-landing-row{cursor:pointer;transition:background .1s;}
.cp-landing-row:hover{background:#f8fafc;}
.cp-landing-row:hover .cp-landing-arrow{color:var(--teal-dark);transform:translateX(2px);}
.cp-member-name{font-weight:600;color:#0f172a;font-size:13.5px;line-height:1.3;}
.cp-member-id{font-size:11px;color:#94a3b8;font-family:DM Mono,monospace;margin-top:2px;}
.cp-tier-chip{display:inline-block;padding:3px 9px;border-radius:11px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;}
.cp-tier-chip.ccm-urgent{background:#fee2e2;color:#9c1f1f;}
.cp-tier-chip.ccm-priority{background:#fff4e1;color:#9c6b00;}
.cp-tier-chip.ccm-monitor{background:#e0f2f1;color:#005f60;}
.cp-tier-chip.hospice-strong{background:#f3e8ff;color:#5b21b6;}
.cp-landing-arrow{font-size:12px;font-weight:600;color:#cbd5e1;transition:color .12s,transform .12s;display:inline-block;}

/* Start New modal results */
.cp-new-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid #f1f5f9;cursor:pointer;transition:background .1s;}
.cp-new-row:last-child{border-bottom:none;}
.cp-new-row:hover{background:#f8fafc;}
.cp-new-row-main{min-width:0;flex:1 1 auto;}
.cp-new-row-name{font-size:14px;font-weight:600;color:#0f172a;line-height:1.3;}
.cp-new-row-meta{font-size:11px;color:#64748b;margin-top:2px;font-family:DM Mono,monospace;}

/* ─── Intake/IA/Screens form polish ─────────────────────────────────
   Ann's CCM template uses 14px inputs with 8-10px padding and breathing
   room between rows. The compact 12px-everywhere look was cramped. */
.cp-page details summary{padding:14px 18px!important;font-size:14px!important;}
.cp-page details summary span:first-child{font-weight:700;color:#0f172a;}
.cp-page details > div{padding:0 18px 18px!important;}
.cp-page details input[type="text"],
.cp-page details input[type="date"],
.cp-page details input[type="datetime-local"],
.cp-page details input[type="number"],
.cp-page details select,
.cp-page details textarea{padding:9px 11px!important;font-size:13.5px!important;border:1px solid #d0d7de!important;border-radius:6px!important;line-height:1.4;transition:border-color .12s, box-shadow .12s;}
.cp-page details input:focus,
.cp-page details select:focus,
.cp-page details textarea:focus{outline:none;border-color:var(--teal-dark)!important;box-shadow:0 0 0 3px rgba(13,124,126,.10);}
.cp-page details textarea{min-height:64px;font-family:inherit;resize:vertical;}
.cp-page details > div > div[style*="grid-template-columns"]{gap:14px!important;margin-bottom:14px!important;}
.cp-page details label[style*="display:block"]{margin-bottom:14px;}
.cp-page details h4{font-size:14px!important;margin:18px 0 10px!important;color:#0f172a;letter-spacing:-.1px;padding-bottom:8px;border-bottom:1px solid #e3e7eb;}
.cp-page details .meta{font-size:12px!important;line-height:1.5;}

/* Field label rows generated by CP._field — give them breathing room */
.cp-page details div[style*="margin:6px 0"]{margin:0 0 14px!important;}
.cp-page details div[style*="color:var(--muted)"][style*="margin-bottom:2px"]{font-size:12px!important;font-weight:600!important;margin-bottom:6px!important;color:#475569!important;text-transform:none!important;letter-spacing:0!important;}

/* Check-group pills — bigger touch target, friendlier hover */
.cp-page details label[style*="background:#f2f2f2"]{background:#f8fafc!important;border:1px solid #e3e7eb!important;padding:6px 12px!important;border-radius:6px!important;margin:0 6px 6px 0!important;font-size:13px!important;cursor:pointer;transition:background .12s, border-color .12s;}
.cp-page details label[style*="background:#f2f2f2"]:hover{background:#e0f2f1!important;border-color:var(--teal-dark)!important;}
.cp-page details label[style*="background:#f2f2f2"]:has(input:checked){background:#e0f2f1!important;border-color:var(--teal-dark)!important;color:#015458;font-weight:600;}

/* Radio rows for consent etc — same friendly pill style */
.cp-page details label[style*="margin-right:10px"]{display:inline-flex!important;align-items:center;gap:6px;padding:6px 12px!important;border:1px solid #e3e7eb;border-radius:6px;background:#f8fafc;cursor:pointer;margin:0 8px 6px 0!important;font-size:13px!important;transition:background .12s, border-color .12s;}
.cp-page details label[style*="margin-right:10px"]:hover{background:#e0f2f1;border-color:var(--teal-dark);}
.cp-page details label[style*="margin-right:10px"]:has(input:checked){background:#e0f2f1;border-color:var(--teal-dark);color:#015458;font-weight:600;}

/* ─── Medication Reconciliation block — modernize ──────────────────── */
.cp-main .hrcm-card.section-medrecon{background:#fff;}
.cp-main .hrcm-card.section-medrecon > div:first-child{font-size:14px!important;}
.cp-main .hrcm-card.section-medrecon label{font-size:12px!important;color:#475569!important;font-weight:600;display:block;margin-bottom:6px;letter-spacing:0;}
.cp-main .hrcm-card.section-medrecon input[type="date"],
.cp-main .hrcm-card.section-medrecon input[type="text"],
.cp-main .hrcm-card.section-medrecon textarea{padding:9px 11px;font-size:13.5px;border:1px solid #d0d7de;border-radius:6px;width:100%;font-family:inherit;transition:border-color .12s, box-shadow .12s;}
.cp-main .hrcm-card.section-medrecon input:focus,
.cp-main .hrcm-card.section-medrecon textarea:focus{outline:none;border-color:var(--teal-dark);box-shadow:0 0 0 3px rgba(13,124,126,.10);}
.cp-main .hrcm-card.section-medrecon textarea{min-height:72px;resize:vertical;line-height:1.5;}

/* ─── Mini section: repeatable tables inside Intake / IA (Ann template) ─── */
.cp-mini-section{margin:14px 0;border:1px solid #e3e7eb;border-radius:8px;background:#f8fafc;overflow:hidden;}
.cp-mini-section-head{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;background:#fff;border-bottom:1px solid #e3e7eb;}
.cp-mini-section-title{font-size:13px;font-weight:600;color:#0f172a;}
.cp-mini-section-meta{font-size:11px;font-weight:400;color:#64748b;margin-left:6px;}
.cp-mini-section-add{background:#fff;border:1px solid var(--teal-dark);color:var(--teal-dark);padding:5px 12px;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .12s;}
.cp-mini-section-add:hover{background:#e0f2f1;}
.cp-mini-table{width:100%;border-collapse:collapse;background:#fff;}
.cp-mini-table thead th{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:#64748b;padding:8px 10px;background:#f8fafc;border-bottom:1px solid #e3e7eb;text-align:left;}
.cp-mini-table tbody td{padding:6px 8px;border-bottom:1px solid #f1f5f9;vertical-align:middle;}
.cp-mini-table tbody tr:last-child td{border-bottom:none;}
.cp-mini-table input,.cp-mini-table select{font-family:inherit;}
.cp-row-del{background:transparent;border:none;color:#cbd5e1;font-size:18px;line-height:1;cursor:pointer;padding:0 6px;border-radius:4px;transition:background .12s,color .12s;}
.cp-row-del:hover{background:#fce4e4;color:#9c1f1f;}

/* ─── Member tab grid (Ann's 15-field CCM template) ────────────────── */
.cp-member-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px 16px;margin-top:10px;}
@media(max-width:880px){.cp-member-grid{grid-template-columns:repeat(2,1fr);}}
@media(max-width:560px){.cp-member-grid{grid-template-columns:1fr;}}
.cp-member-field{display:flex;flex-direction:column;gap:6px;min-width:0;}
.cp-member-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:#64748b;}
.cp-member-readonly{font-size:13.5px;color:#0f172a;padding:8px 10px;background:#f8fafc;border:1px solid #e3e7eb;border-radius:6px;min-height:34px;display:flex;align-items:center;line-height:1.4;word-break:break-word;}
.cp-member-field input{font-family:inherit;}

/* ─── Care Team Tab 4 — inline assign per role ───────────────────── */
.cp-team-grid{display:flex;flex-direction:column;gap:8px;}
.cp-team-row{display:flex;align-items:center;gap:14px;padding:12px 14px;background:#fff;border:1px solid #e3e7eb;border-radius:8px;transition:border-color .12s;}
.cp-team-row:hover{border-color:#d0d7de;}
.cp-team-role{font-size:13px;font-weight:600;color:#0f172a;min-width:200px;flex-shrink:0;}
.cp-team-control{display:flex;align-items:center;gap:10px;flex:1 1 auto;min-width:0;}
.cp-team-select{flex:1 1 auto;min-width:0;padding:9px 11px;font-size:13.5px;border:1px solid #d0d7de;border-radius:6px;background:#fff;color:#0f172a;font-family:inherit;cursor:pointer;}
.cp-team-select:focus{outline:none;border-color:var(--teal-dark);box-shadow:0 0 0 3px rgba(13,124,126,.10);}
.cp-team-select:disabled{cursor:not-allowed;background:#f8fafc;color:#94a3b8;}
.cp-team-assigned{font-size:11px;color:#548235;font-weight:600;white-space:nowrap;}
@media(max-width:780px){
  .cp-team-row{flex-direction:column;align-items:flex-start;gap:6px;}
  .cp-team-role{min-width:0;}
  .cp-team-control{width:100%;}
}

/* Member Ack — same pill-radio treatment */
.cp-main .hrcm-card.section-ack label[style*="margin-right:12px"]{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border:1px solid #e3e7eb;border-radius:6px;background:#f8fafc;cursor:pointer;margin:0 8px 6px 0!important;font-size:13px!important;font-weight:500;}
.cp-main .hrcm-card.section-ack label[style*="margin-right:12px"]:has(input:checked){background:#e0f2f1;border-color:var(--teal-dark);color:#015458;font-weight:600;}
@media(min-width:1101px){
  /* Single-column when profile is collapsed. When the nurse opens the profile
     drawer they want the rail visible NEXT TO the active tab content (not
     replacing it), so we keep the 2-column grid as long as profile is open
     regardless of which tab is active. */
  .cp-page[data-cp-profile-open="0"] .cp-grid{grid-template-columns:1fr;}
}
.cp-main .hrcm-card.section-voice{border-left-color:#6366f1;}
.cp-main .hrcm-card.section-northstar{border-left-color:#0d9488;}
.cp-main .hrcm-card.section-goals{border-left-color:#16a34a;}
.cp-main .hrcm-card.section-goals-low{border-left-color:#84cc16;}
.cp-main .hrcm-card.section-interventions{border-left-color:#0891b2;}
.cp-main .hrcm-card.section-barriers{border-left-color:#9333ea;}
.cp-main .hrcm-card.section-screens{border-left-color:#dc2626;}
.cp-main .hrcm-card.section-medrecon{border-left-color:#ca8a04;}
.cp-main .hrcm-card.section-ack{border-left-color:#0ea5e9;}
.cp-main .hrcm-card.section-notes{border-left-color:#475569;}
.cp-rail .hrcm-card > div[style*="display:flex"][style*="gap:8px"]{margin:3px 0!important;line-height:1.4!important;align-items:baseline!important;}
.cp-rail .hrcm-card > div[style*="display:flex"][style*="gap:8px"] > div:first-child{min-width:84px!important;color:var(--cp-muted)!important;font-size:10.5px!important;text-transform:uppercase;letter-spacing:.4px;}
.cp-rail .hrcm-card > div[style*="display:flex"][style*="gap:8px"] > div:last-child{font-size:12px!important;color:var(--cp-text)!important;font-weight:500;text-transform:none;letter-spacing:0;}
.cp-rail .hrcm-card:nth-child(1) span[style*="border-radius:10px"]{padding:3px 10px!important;font-size:11px!important;margin-right:6px!important;font-weight:600!important;letter-spacing:.2px;}
.cp-page input[style*="border:1px solid #ccc"],
.cp-page textarea[style*="border:1px solid #ccc"],
.cp-page select[style*="border:1px solid #ccc"]{border:1px solid var(--cp-border-strong)!important;background:#fff!important;border-radius:6px!important;padding:7px 10px!important;font-size:12.5px!important;color:var(--cp-text)!important;transition:border-color .12s,box-shadow .12s;}
.cp-page input[style*="border:1px solid #ccc"]:focus,
.cp-page textarea[style*="border:1px solid #ccc"]:focus,
.cp-page select[style*="border:1px solid #ccc"]:focus{outline:none!important;border-color:var(--cp-accent)!important;box-shadow:0 0 0 3px rgba(1,105,111,.15)!important;}
.cp-page input[disabled],.cp-page textarea[disabled],.cp-page select[disabled]{background:#f8fafc!important;color:#64748b!important;cursor:not-allowed;}
.cp-page textarea{resize:vertical;min-height:54px;}
.cp-page label[style*="font-size:11px"]{color:var(--cp-muted)!important;font-size:10.5px!important;text-transform:uppercase;letter-spacing:.4px;font-weight:600;}
.cp-page label[style*="font-size:11px"] input,
.cp-page label[style*="font-size:11px"] textarea,
.cp-page label[style*="font-size:11px"] select{margin-top:4px;text-transform:none;letter-spacing:0;font-weight:400;}
.cp-main table th{background:#f1f5f7!important;color:var(--cp-muted)!important;font-weight:700!important;font-size:10.5px!important;text-transform:uppercase;letter-spacing:.4px;padding:6px 8px!important;border-bottom:1px solid var(--cp-border)!important;}
.cp-main table td{padding:4px 6px!important;border-bottom:1px solid var(--cp-border);font-size:12px;}
.cp-main table tr:last-child td{border-bottom:none;}
.cp-page .cp-barriers-list{display:flex;flex-wrap:wrap;gap:6px;margin:-2px 0 6px;align-items:flex-start;}
.cp-page .cp-barriers-list > div{margin:0;}
.cp-page .cp-barriers-list label[style*="inline-flex"]{margin:0!important;padding:4px 10px;border:1px solid var(--cp-border);border-radius:14px;background:#fff;font-size:11.5px!important;color:var(--cp-text);cursor:pointer;transition:background .12s,border-color .12s;}
.cp-page .cp-barriers-list label[style*="inline-flex"]:hover{border-color:#9333ea;}
.cp-page .cp-barriers-list label[style*="inline-flex"]:has(input:checked){background:#faf5ff;border-color:#9333ea;color:#6b21a8;font-weight:600;}
.cp-page .cp-barriers-list input[type="checkbox"]{margin-right:6px!important;}
/* When a barrier is checked, its detail panel becomes visible inline. Force
   the entire wrapper to take the full row of the flex container so the form
   gets full width instead of being squished alongside other pills. */
.cp-page .cp-barriers-list > div:has(> div[id^="cp-barrier-detail-"][style*="display:block"]){flex-basis:100%;width:100%;order:99;}
.cp-page .cp-barriers-list > div > div[id^="cp-barrier-detail-"]{margin:6px 0 4px 0!important;background:#faf5ff!important;border-left-color:#9333ea!important;padding:12px 14px!important;border-radius:8px;}
.cp-page .cp-barriers-list > div > div[id^="cp-barrier-detail-"] > div{gap:12px!important;}
.cp-page .cp-barriers-list > div > div[id^="cp-barrier-detail-"] textarea,
.cp-page .cp-barriers-list > div > div[id^="cp-barrier-detail-"] input{font-size:13px!important;padding:7px 9px!important;border:1px solid #d8b4fe!important;border-radius:6px!important;}
.cp-page div[style*="font-style:italic"][style*="color:var(--muted)"]{color:#94a3b8!important;font-size:11.5px!important;padding:4px 0!important;}
.cp-page .hrcm-card.section-goals > div[style*="border:1px solid var(--border)"]{background:#fafefa!important;border:1px solid #d1fadc!important;border-left:3px solid #16a34a!important;}
.cp-page > div[style*="background:#e7f3fb"]{background:#eef9ff!important;border:1px solid #bfdbfe!important;border-left:4px solid #2563eb!important;padding:10px 14px!important;border-radius:8px;font-size:12px;}
.cp-page > div[style*="background:#fde2e2"]{border-radius:8px;border:1px solid #fecaca!important;border-left:4px solid #dc2626!important;}
.cp-main details{background:var(--cp-card-bg)!important;border:1px solid var(--cp-border)!important;border-left:4px solid #7c3aed!important;border-radius:8px!important;padding:0!important;margin-top:0!important;box-shadow:0 1px 1px rgba(15,23,42,.02);overflow:hidden;}
.cp-main details summary{padding:12px 14px!important;font-size:13px!important;font-weight:700!important;color:var(--cp-text)!important;background:linear-gradient(180deg,#fafbfc,#f4f6f8)!important;border-bottom:1px solid transparent!important;cursor:pointer;display:flex!important;justify-content:space-between!important;align-items:center!important;gap:10px;}
.cp-main details[open] summary{border-bottom-color:var(--cp-border)!important;}
.cp-main details summary .meta{font-weight:400!important;color:var(--cp-muted)!important;font-size:11px!important;text-transform:none;letter-spacing:0;}
.cp-main details > div{padding:14px 16px!important;}
@media(max-width:1280px){.cp-page h2{font-size:18px;} .cp-rail .hrcm-card{padding:9px 11px!important;}}

/* Daily Notes redesign 2026-05-21 — .dn-page wraps RENDERERS['hrcm-daily-notes']. */
.dn-page{--dn-border:#e3e7eb;--dn-border-strong:#d0d6dc;--dn-muted:#64748b;--dn-text:#1f2933;--dn-accent:var(--teal-dark);font-size:13px;color:var(--dn-text);}
.dn-page h2{font-size:20px!important;font-weight:700!important;margin:0!important;letter-spacing:-.2px;}
.dn-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:0 0 14px;padding:14px 16px;background:linear-gradient(180deg,#fafbfc,#f1f5f7);border:1px solid var(--dn-border);border-radius:10px;flex-wrap:wrap;}
.dn-header-left{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1 1 360px;}
.dn-header-meta{font-size:11px;color:var(--dn-muted);}
.dn-header-meta strong{color:var(--dn-text);font-weight:600;}
.dn-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
.dn-grid{display:grid!important;grid-template-columns:280px minmax(0,1fr)!important;gap:14px!important;align-items:start;}
@media(max-width:1024px){.dn-grid{grid-template-columns:1fr!important;height:auto!important;}}
/* CR-08 Coding tab (Ann 2026-06-04) — Note | Coding sub-tabs + 1111F capture. */
.dn-tabbar{display:flex;gap:4px;border-bottom:2px solid #e3e8ef;margin:6px 0 10px;}
.dn-tab{padding:8px 16px;font-size:13px;font-weight:600;cursor:pointer;border:none;background:none;color:var(--dn-muted);border-bottom:2px solid transparent;margin-bottom:-2px;}
.dn-tab.active{color:var(--teal-dark);border-bottom-color:var(--teal-dark);}
.dn-coding-card{border:1px solid #e3e8ef;border-radius:8px;padding:12px;margin-bottom:10px;}
.dn-1111f-disabled{opacity:.5;}
.dn-medrec-warn{background:#fef3c7;color:#854d0e;border-left:4px solid #d68910;padding:8px 12px;border-radius:4px;font-size:12px;margin-top:8px;}
#dn-medrec-table{width:100%;border-collapse:collapse;font-size:12px;margin-top:6px;}
#dn-medrec-table th,#dn-medrec-table td{border:1px solid #e3e8ef;padding:4px 6px;text-align:left;}
#dn-medrec-table input,#dn-medrec-table select{width:100%;border:1px solid #d8dde6;border-radius:4px;font-size:12px;padding:3px 5px;}
.dn-page #dn-list-pane{border:1px solid var(--dn-border)!important;border-radius:10px!important;background:#fff!important;box-shadow:0 1px 1px rgba(15,23,42,.02);position:sticky;top:8px;align-self:start;}
.dn-page #dn-list-pane > div:first-child{padding:10px 14px!important;border-bottom:1px solid var(--dn-border)!important;background:#fafbfc;border-radius:10px 10px 0 0;font-size:12px;text-transform:uppercase;letter-spacing:.4px;color:var(--dn-muted)!important;}
.dn-page #dn-list-pane > div:first-child strong{color:var(--dn-text)!important;font-weight:700;}
.dn-page #dn-list-pane > div[onclick]{padding:10px 12px!important;border-bottom:1px solid #f1f5f7!important;cursor:pointer;transition:background .12s;border-left:3px solid transparent!important;}
.dn-page #dn-list-pane > div[onclick]:hover{background:#f8fafc;}
.dn-page #dn-list-pane > div[onclick][style*="border-left:3px"]{background:#eef9ff!important;border-left-color:var(--dn-accent)!important;}
.dn-page #dn-list-pane > div[onclick] > div:first-child{font-size:12.5px!important;color:var(--dn-text);}
.dn-page #dn-list-pane > div[onclick] > div:last-child{font-size:10.5px!important;color:var(--dn-muted)!important;margin-top:2px;}
.dn-page #dn-editor-pane{border:1px solid var(--dn-border)!important;border-radius:10px!important;background:#fff!important;padding:16px 18px!important;box-shadow:0 1px 1px rgba(15,23,42,.02);}
.dn-page #dn-editor-pane > div[style*="font-weight:700"]{font-size:12.5px!important;font-weight:700!important;text-transform:uppercase;letter-spacing:.4px;color:var(--dn-muted)!important;margin:14px 0 6px!important;}
.dn-page #dn-editor-pane input[type="number"],
.dn-page #dn-editor-pane input[type="date"],
.dn-page #dn-editor-pane input[type="time"],
.dn-page #dn-editor-pane select,
.dn-page #dn-editor-pane textarea{border:1px solid var(--dn-border-strong)!important;background:#fff!important;border-radius:6px!important;padding:7px 10px!important;font-size:12.5px!important;color:var(--dn-text)!important;transition:border-color .12s,box-shadow .12s;}
.dn-page #dn-editor-pane input:focus,
.dn-page #dn-editor-pane select:focus,
.dn-page #dn-editor-pane textarea:focus{outline:none!important;border-color:var(--dn-accent)!important;box-shadow:0 0 0 3px rgba(1,105,111,.15)!important;}
.dn-page #dn-editor-pane label{color:var(--dn-muted)!important;font-size:10.5px!important;text-transform:uppercase;letter-spacing:.4px;font-weight:600;display:block;}
.dn-page #dn-editor-pane label input,
.dn-page #dn-editor-pane label select,
.dn-page #dn-editor-pane label textarea{margin-top:4px;text-transform:none;letter-spacing:0;font-weight:400;color:var(--dn-text)!important;}
.dn-page #dn-editor-pane textarea{resize:vertical;min-height:60px;}
.dn-page #dn-editor-pane > div[style*="repeat(7,1fr)"]{gap:10px!important;background:#fafbfc;padding:12px;border-radius:8px;border:1px solid var(--dn-border);}
@media(max-width:1280px){.dn-page #dn-editor-pane > div[style*="repeat(7,1fr)"]{grid-template-columns:repeat(4,1fr)!important;}}
@media(max-width:900px){.dn-page #dn-editor-pane > div[style*="repeat(7,1fr)"]{grid-template-columns:repeat(2,1fr)!important;}}
.dn-page #dn-save-indicator{font-size:11px!important;padding:3px 10px;border-radius:12px;background:#fff;border:1px solid var(--dn-border);color:var(--dn-muted)!important;}

/* PCP Outreach redesign 2026-05-21 — .po-page wraps RENDERERS['pcp-outreach']. */
.po-page{--po-border:#e3e7eb;--po-muted:#64748b;--po-text:#1f2933;font-size:13px;color:var(--po-text);}
.po-page .po-kpis{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))!important;gap:8px!important;margin-bottom:12px;}
.po-page .po-kpi{background:#fff;border:1px solid var(--po-border)!important;border-radius:10px!important;padding:10px 12px!important;border-left:4px solid var(--po-border)!important;box-shadow:0 1px 1px rgba(15,23,42,.02);}
.po-page .po-kpi:nth-child(1){border-left-color:#475569!important;}
.po-page .po-kpi:nth-child(2){border-left-color:#0ea5e9!important;}
.po-page .po-kpi:nth-child(3){border-left-color:#7c3aed!important;}
.po-page .po-kpi:nth-child(4){border-left-color:#16a34a!important;}
.po-page .po-kpi:nth-child(5){border-left-color:#0d9488!important;}
.po-page .po-kpi:nth-child(6){border-left-color:#0d9488!important;}
.po-page .po-kpi:nth-child(7){border-left-color:#16a34a!important;}
.po-page .po-kpi-n{font-size:22px!important;font-weight:700!important;color:var(--po-text)!important;line-height:1.1;}
.po-page .po-kpi-l{font-size:11px!important;color:var(--po-muted)!important;margin-top:4px;text-transform:uppercase;letter-spacing:.3px;font-weight:600;}
.po-page .po-kpi-l .po-meta{text-transform:none;letter-spacing:0;font-weight:400;font-size:10px;color:#94a3b8;}
.po-page .po-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:10px 0 8px;}
.po-page .po-toolbar .hrcm-search{flex:1 1 320px;min-width:240px;margin:0!important;padding:8px 10px!important;}
.po-page .po-toolbar .po-chips{flex:0 0 auto;margin:0!important;}
.po-page .po-cadence{margin-left:auto;font-size:10.5px!important;color:var(--po-muted)!important;background:#fafbfc;padding:6px 10px;border:1px dashed var(--po-border);border-radius:8px;line-height:1.4;max-width:520px;}
.po-page .po-cadence strong{color:var(--po-text);}
.po-page .po-table-wrap{border:1px solid var(--po-border);border-radius:10px;background:#fff;overflow-x:auto;}
.po-page .hrcm-table{table-layout:fixed!important;width:100%;}
.po-page .hrcm-table thead th{background:#fafbfc!important;color:var(--po-muted)!important;font-weight:700!important;font-size:10.5px!important;text-transform:uppercase;letter-spacing:.4px;}
.po-page .hrcm-table tbody tr{height:52px;}
.po-page .hrcm-table tbody td{vertical-align:middle!important;padding:6px 10px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
/* Column widths (13 cols): #, Member, IPA/PCP, LastPCP, Composite, CCM, Hospice, RAF, Phone, Address, Outreach, Status, Actions */
.po-page .hrcm-table thead th:nth-child(1),
.po-page .hrcm-table tbody td:nth-child(1){width:34px;}
.po-page .hrcm-table thead th:nth-child(2),
.po-page .hrcm-table tbody td:nth-child(2){width:280px;}
.po-page .hrcm-table thead th:nth-child(3),
.po-page .hrcm-table tbody td:nth-child(3){width:140px;}
.po-page .hrcm-table thead th:nth-child(4),
.po-page .hrcm-table tbody td:nth-child(4){width:80px;}
.po-page .hrcm-table thead th:nth-child(5),
.po-page .hrcm-table tbody td:nth-child(5){width:80px;}
.po-page .hrcm-table thead th:nth-child(6),
.po-page .hrcm-table tbody td:nth-child(6){width:74px;}
.po-page .hrcm-table thead th:nth-child(7),
.po-page .hrcm-table tbody td:nth-child(7){width:80px;}
.po-page .hrcm-table thead th:nth-child(8),
.po-page .hrcm-table tbody td:nth-child(8){width:50px;}
.po-page .hrcm-table thead th:nth-child(9),
.po-page .hrcm-table tbody td:nth-child(9){width:100px;}
.po-page .hrcm-table thead th:nth-child(10),
.po-page .hrcm-table tbody td:nth-child(10){width:130px;}
.po-page .hrcm-table thead th:nth-child(11),
.po-page .hrcm-table tbody td:nth-child(11){width:auto;min-width:120px;}
.po-page .hrcm-table thead th:nth-child(12),
.po-page .hrcm-table tbody td:nth-child(12){width:80px;}
.po-page .hrcm-table thead th:nth-child(13),
.po-page .hrcm-table tbody td:nth-child(13){width:170px;}
.po-page .po-notes-cell{min-width:0;max-width:none;}
.po-page .po-member-name{font-weight:600;font-size:13px;color:var(--po-text);}
.po-page .po-meta{color:var(--po-muted);font-size:11px;}
.po-page .po-badge{display:inline-block;padding:2px 8px;border-radius:10px;font-size:10.5px;font-weight:700;letter-spacing:.3px;}
.po-page .po-badge.urgent{background:#fee2e2;color:#991b1b;}
.po-page .po-badge.priority{background:#fef3c7;color:#854d0e;}
.po-page .po-badge.monitor{background:#dbeafe;color:#1e40af;}
.po-page .po-badge.strong{background:#f3e8ff;color:#581c87;}
.po-page .po-badge.consider{background:#fae8ff;color:#6b21a8;}
.po-page .po-badge.none{background:#f1f5f7;color:#94a3b8;}
.po-page .po-status{display:inline-block;padding:2px 8px;border-radius:10px;font-size:10.5px;font-weight:700;}
.po-page .po-status-open{background:#fef3c7;color:#854d0e;}
.po-page .po-status-contacted{background:#dbeafe;color:#1e40af;}
.po-page .po-status-scheduled{background:#dcfce7;color:#15803d;}
.po-page .po-status-completed{background:#d1fae5;color:#065f46;}
.po-page .po-actions{display:flex;gap:4px;}
.po-page .po-act{background:#fff;border:1px solid var(--po-border);border-radius:6px;padding:5px 7px;font-size:14px;cursor:pointer;transition:background .12s,border-color .12s,transform .12s;}
.po-page .po-act:hover{background:#eef7f7;border-color:var(--teal-dark);transform:translateY(-1px);}
.po-page .engine-freshness{font-size:10.5px;color:var(--po-muted);margin:6px 0 0;}
@media(max-width:1500px){.po-page .hrcm-table .col-lowprio{display:none!important;}}
@media(max-width:1180px){.po-page .hrcm-table .col-midprio{display:none!important;}}

/* Health Trend redesign 2026-05-21 — .ht-page wraps RENDERERS['hrcm-health-trend']. */
.ht-page{--ht-border:#e3e7eb;--ht-muted:#64748b;--ht-text:#1f2933;font-size:13px;color:var(--ht-text);}
.ht-page h2{font-size:20px!important;font-weight:700!important;margin:0!important;letter-spacing:-.2px;}
.ht-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:0 0 14px;padding:14px 16px;background:linear-gradient(180deg,#fafbfc,#f1f5f7);border:1px solid var(--ht-border);border-radius:10px;flex-wrap:wrap;}
.ht-header-left{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1 1 360px;}
.ht-header-meta{font-size:11px;color:var(--ht-muted);}
.ht-header-meta strong{color:var(--ht-text);font-weight:600;}
.ht-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
.ht-summary{display:flex;gap:18px;align-items:center;padding:10px 14px;border:1px solid var(--ht-border);border-radius:8px;background:#fff;margin-bottom:14px;flex-wrap:wrap;}
.ht-summary .ht-stat{display:flex;flex-direction:column;}
.ht-summary .ht-stat .n{font-size:18px;font-weight:700;color:var(--ht-text);line-height:1;}
.ht-summary .ht-stat .l{font-size:10.5px;color:var(--ht-muted);text-transform:uppercase;letter-spacing:.4px;margin-top:3px;}
.ht-summary .ht-flag-pill{margin-left:auto;padding:5px 12px;border-radius:14px;background:#fee2e2;color:#991b1b;font-size:11px;font-weight:700;letter-spacing:.3px;}
.ht-summary .ht-flag-pill.zero{background:#dcfce7;color:#15803d;}
.ht-charts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px;}
@media(max-width:980px){.ht-charts{grid-template-columns:1fr;}}
.ht-page .hrcm-card{background:#fff!important;border:1px solid var(--ht-border)!important;border-left:4px solid var(--ht-border)!important;border-radius:10px!important;padding:14px 16px!important;margin-top:0!important;box-shadow:0 1px 2px rgba(15,23,42,.04);}
.ht-page .hrcm-card.chart-bp{border-left-color:#dc2626!important;}
.ht-page .hrcm-card.chart-bpd{border-left-color:#b91c1c!important;}
.ht-page .hrcm-card.chart-hr{border-left-color:#0ea5e9!important;}
.ht-page .hrcm-card.chart-wt{border-left-color:#d97706!important;}
.ht-page .hrcm-card.chart-gl{border-left-color:#16a34a!important;}
.ht-page .hrcm-card.chart-spo2{border-left-color:#06b6d4!important;}
.ht-page .hrcm-card.chart-bmi{border-left-color:#a855f7!important;}
.ht-page .hrcm-card.chart-temp{border-left-color:#f59e0b!important;}
.ht-page .hrcm-card.chart-enc{border-left-color:#475569!important;}
.ht-page .hrcm-card.section-pdc{border-left-color:#7c3aed!important;}
.ht-page .hrcm-card.section-flags{border-left-color:#dc2626!important;}
.ht-page .hrcm-card.section-hedis{border-left-color:#0891b2!important;}
.ht-page .hrcm-card.section-engine{border-left-color:#7c3aed!important;}
.ht-page .hrcm-card > div:first-child[style*="font-weight:700"]{font-size:12.5px!important;font-weight:700!important;text-transform:uppercase;letter-spacing:.4px;color:var(--ht-muted)!important;margin-bottom:0!important;padding-bottom:0!important;border-bottom:0!important;}
.ht-page svg{display:block;width:100%!important;height:auto;border-radius:6px!important;border-color:transparent!important;}
.ht-page .hrcm-table{margin-top:0!important;}
.ht-page .hrcm-table thead th{background:#fafbfc!important;color:var(--ht-muted)!important;font-weight:700!important;font-size:10.5px!important;text-transform:uppercase;letter-spacing:.4px;padding:6px 8px!important;}
.ht-page .hrcm-table tbody td{padding:8px 10px!important;font-size:12px;vertical-align:middle!important;}
/* Chart card head — shadcn-style: vertical stack with small title above big tabular value. */
.ht-page .ht-chart-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:12px;padding-bottom:0;border-bottom:none;}
.ht-page .ht-chart-title{font-size:11.5px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:#64748b;display:flex;align-items:baseline;gap:8px;}
.ht-page .ht-chart-title .ht-target{font-weight:500;text-transform:none;letter-spacing:0;color:#94a3b8;font-size:10.5px;}
.ht-page .ht-chart-latest{display:flex;align-items:baseline;gap:6px;}
.ht-page .ht-chart-latest .v{font-size:28px;font-weight:600;color:#0f172a;line-height:1;letter-spacing:-.6px;font-variant-numeric:tabular-nums;}
.ht-page .ht-chart-latest .u{font-size:11px;color:#64748b;font-weight:500;}
.ht-page .ht-trend{display:inline-flex;align-items:center;gap:3px;font-size:10.5px;font-weight:600;padding:2px 7px;border-radius:6px;letter-spacing:0;background:#f8fafc;color:#64748b;border:1px solid #e2e8f0;font-variant-numeric:tabular-nums;}
.ht-page .ht-trend.up{color:#dc2626;background:#fef2f2;border-color:#fecaca;}
.ht-page .ht-trend.down{color:#16a34a;background:#f0fdf4;border-color:#bbf7d0;}
.ht-page .ht-trend.flat{background:#f8fafc;color:#64748b;border-color:#e2e8f0;}
.ht-page .ht-trend.up-good{color:#16a34a;background:#f0fdf4;border-color:#bbf7d0;}
.ht-page .ht-trend.down-good{color:#dc2626;background:#fef2f2;border-color:#fecaca;}
/* Bar chart legend (encounter histogram) */
.ht-page .ht-bar-legend{display:flex;gap:14px;justify-content:center;margin-top:10px;font-size:11px;color:#64748b;font-weight:500;}
.ht-page .ht-bar-legend span{display:inline-flex;align-items:center;gap:6px;}
.ht-page .ht-bar-legend .dot{width:8px;height:8px;border-radius:2px;display:inline-block;}
.ht-page .ht-chart-foot{display:flex;justify-content:space-between;font-size:10.5px;color:#94a3b8;margin-top:10px;padding-top:10px;border-top:1px solid #f1f5f9;font-weight:500;}
.ht-page .ht-empty{padding:18px 4px;text-align:center;color:var(--ht-muted);font-size:12px;background:repeating-linear-gradient(45deg,#fafbfc,#fafbfc 6px,#f4f6f8 6px,#f4f6f8 12px);border-radius:8px;border:1px dashed var(--ht-border);}
.ht-page .ht-empty .small{font-size:10.5px;margin-top:4px;opacity:.85;}
/* Risk profile chips */
.ht-page .ht-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:11px;font-size:11px;font-weight:700;color:#fff;margin:0 6px 4px 0;letter-spacing:.2px;}
.ht-page .ht-chip.outline{background:#fff;color:#7c3aed;border:1px solid #ede9fe;font-weight:600;}
.ht-page .ht-engine-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin-top:10px;}
.ht-page .ht-engine-cell{background:#fafbfc;border:1px solid var(--ht-border);border-radius:8px;padding:8px 10px;}
.ht-page .ht-engine-cell .lbl{font-size:10px;color:var(--ht-muted);text-transform:uppercase;letter-spacing:.4px;}
.ht-page .ht-engine-cell .val{font-size:16px;font-weight:700;color:var(--ht-text);margin-top:2px;line-height:1.1;}
/* HEDIS care gaps */
.ht-page .ht-gap{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border-radius:10px;font-size:11px;font-weight:600;background:#fef3c7;color:#92400e;margin:0 6px 6px 0;border:1px solid #fde68a;}
.ht-page .ht-gap::before{content:"";width:6px;height:6px;border-radius:50%;background:#f59e0b;display:inline-block;flex-shrink:0;}
.ht-page .ht-gap-recency{margin-left:auto;font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.3px;padding:1px 6px;border-radius:8px;background:rgba(255,255,255,.7);color:#92400e;}
.ht-page .ht-gap-recency.warn{background:#fdba74;color:#7c2d12;}
.ht-page .ht-gap-recency.danger{background:#dc2626;color:#fff;}
/* Sub-tab strip (Overview / Trends / Clinical / Activity) */
.ht-page .ht-tabs{display:flex;gap:4px;padding:4px;background:#fff;border:1px solid var(--ht-border);border-radius:10px;margin-bottom:14px;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.ht-page .ht-tab{flex:1;min-width:120px;padding:8px 14px;border-radius:7px;font-size:12.5px;font-weight:600;color:var(--ht-muted);cursor:pointer;text-align:center;white-space:nowrap;transition:background .15s,color .15s;display:flex;align-items:center;justify-content:center;gap:6px;}
.ht-page .ht-tab:hover{background:#f1f5f9;color:var(--ht-text);}
.ht-page .ht-tab.active{background:#0d9488;color:#fff;}
.ht-page .ht-tab .badge{background:rgba(255,255,255,.25);color:inherit;padding:1px 7px;border-radius:9px;font-size:10.5px;font-weight:700;}
.ht-page .ht-tab:not(.active) .badge{background:#f1f5f9;color:var(--ht-muted);}
/* "Latest readings" strip on Overview */
.ht-page .ht-latest{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px;margin-top:10px;}
.ht-page .ht-latest-cell{background:#fff;border:1px solid var(--ht-border);border-radius:8px;padding:8px 10px;}
.ht-page .ht-latest-cell .lbl{font-size:10px;color:var(--ht-muted);text-transform:uppercase;letter-spacing:.4px;}
.ht-page .ht-latest-cell .val{font-size:16px;font-weight:700;color:var(--ht-text);margin-top:2px;line-height:1.1;}
.ht-page .ht-latest-cell .val .u{font-size:11px;color:var(--ht-muted);font-weight:500;margin-left:3px;}
.ht-page .ht-latest-cell .meta{font-size:10px;color:var(--ht-muted);margin-top:3px;}
.ht-page .ht-latest-cell.alert{background:#fef2f2;border-color:#fecaca;}
.ht-page .ht-latest-cell.alert .val{color:#b91c1c;}
.ht-page .ht-latest-cell.good{background:#f0fdf4;border-color:#bbf7d0;}
.ht-page .ht-latest-cell.good .val{color:#15803d;}
.ht-page .ht-tile-spark{display:block;width:100%;height:28px;margin-top:6px;opacity:.85;}

/* Snapshot timeline (Overview) — encounters + auths + flags on one row each. */
.ht-page .ht-timeline{margin-top:12px;}
.ht-page .ht-tl-row{display:grid;grid-template-columns:90px 1fr;gap:10px;align-items:center;padding:6px 0;border-bottom:1px dashed var(--ht-border);}
.ht-page .ht-tl-row:last-child{border-bottom:none;}
.ht-page .ht-tl-label{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:var(--ht-muted);}
.ht-page .ht-tl-track{position:relative;height:22px;background:#fafbfc;border:1px solid var(--ht-border);border-radius:11px;}
.ht-page .ht-tl-dot{position:absolute;top:50%;transform:translate(-50%,-50%);width:11px;height:11px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 2px rgba(15,23,42,.18);}
.ht-page .ht-tl-axis{display:flex;justify-content:space-between;padding:4px 4px 0;font-size:9.5px;color:var(--ht-muted);grid-column:2;}
.ht-page .ht-tl-empty{font-size:11px;color:var(--ht-muted);font-style:italic;padding:0 6px;}

/* Hero stat bar (replaces flat .ht-summary) — 5 substantial tiles + status pill. */
.ht-page .ht-hero{display:flex;flex-wrap:wrap;gap:12px;align-items:stretch;margin-bottom:14px;}
.ht-page .ht-hero-grid{flex:1 1 580px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;min-width:0;}
.ht-page .ht-hero-stat{display:flex;align-items:center;gap:10px;padding:14px 14px;background:#fff;border:1px solid var(--ht-border);border-radius:12px;box-shadow:0 1px 1px rgba(15,23,42,.03);min-width:0;}
.ht-page .ht-hero-stat-icon{flex-shrink:0;width:36px;height:36px;border-radius:10px;background:#f1f5f9;display:flex;align-items:center;justify-content:center;font-size:18px;}
.ht-page .ht-hero-stat-body{min-width:0;flex:1;}
.ht-page .ht-hero-stat-n{font-size:24px;font-weight:700;color:var(--ht-text);line-height:1;letter-spacing:-.4px;}
.ht-page .ht-hero-stat-l{font-size:10.5px;color:var(--ht-muted);text-transform:uppercase;letter-spacing:.4px;font-weight:700;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ht-page .ht-hero-stat-sub{font-size:10.5px;color:#94a3b8;margin-top:3px;font-style:italic;}
.ht-page .ht-hero-stat.good .ht-hero-stat-icon{background:#dcfce7;}
.ht-page .ht-hero-stat.good .ht-hero-stat-n{color:#15803d;}
.ht-page .ht-hero-stat.warn .ht-hero-stat-icon{background:#fef3c7;}
.ht-page .ht-hero-stat.warn .ht-hero-stat-n{color:#a16207;}
.ht-page .ht-hero-stat.alert .ht-hero-stat-icon{background:#fee2e2;}
.ht-page .ht-hero-stat.alert .ht-hero-stat-n{color:#991b1b;}
.ht-page .ht-hero-stat.muted .ht-hero-stat-n{color:#94a3b8;}
.ht-page .ht-hero-stat.clickable{cursor:pointer;transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;}
.ht-page .ht-hero-stat.clickable:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(15,23,42,.08);border-color:#cbd5e1;}
.ht-page .ht-hero-stat.clickable:focus-visible{outline:2px solid #0d9488;outline-offset:2px;}
.ht-page .ht-hero-stat.clickable:active{transform:translateY(0);}
.ht-page .ht-hero-status{flex:0 0 200px;display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:12px;background:#fff;border:1px solid var(--ht-border);box-shadow:0 1px 1px rgba(15,23,42,.03);}
.ht-page .ht-hero-status .dot{width:10px;height:10px;border-radius:50%;flex-shrink:0;box-shadow:0 0 0 4px rgba(15,23,42,.04);}
.ht-page .ht-hero-status .msg{font-size:13px;font-weight:700;color:var(--ht-text);line-height:1.1;}
.ht-page .ht-hero-status .sub{font-size:10.5px;color:var(--ht-muted);margin-top:3px;text-transform:uppercase;letter-spacing:.3px;font-weight:600;}
.ht-page .ht-hero-status.zero{background:#f0fdf4;border-color:#bbf7d0;}
.ht-page .ht-hero-status.zero .dot{background:#16a34a;box-shadow:0 0 0 4px rgba(22,163,74,.18);}
.ht-page .ht-hero-status.zero .msg{color:#15803d;}
.ht-page .ht-hero-status.alert{background:#fef2f2;border-color:#fecaca;}
.ht-page .ht-hero-status.alert .dot{background:#dc2626;box-shadow:0 0 0 4px rgba(220,38,38,.18);animation:ht-pulse 1.8s ease-in-out infinite;}
.ht-page .ht-hero-status.alert .msg{color:#991b1b;}
@keyframes ht-pulse{0%,100%{box-shadow:0 0 0 4px rgba(220,38,38,.18);}50%{box-shadow:0 0 0 8px rgba(220,38,38,.06);}}
@media(max-width:1200px){.ht-page .ht-hero-grid{grid-template-columns:repeat(3,1fr);} .ht-page .ht-hero-status{flex:1 1 100%;}}
@media(max-width:640px){.ht-page .ht-hero-grid{grid-template-columns:repeat(2,1fr);}}

/* ───────────────────────────────────────────────────────────────────────
   Health Trend — modern design system
   Spacing scale: 4 / 8 / 12 / 16 / 24 / 32
   Radius scale:  6 (controls) / 8 (chips) / 10 (buttons) / 12 (cards)
   Colors: slate-900 text, slate-500 muted, slate-200 borders, teal-600 brand
   ─────────────────────────────────────────────────────────────────────── */
/* Page-level: leave outer padding to the panel container; just establish the
   font + color baseline. */
.ht-page .ht-header{margin-bottom:20px;display:block;background:transparent;border:0;padding:0;border-radius:0;}
.ht-page .ht-header-overview{padding:0;display:block;}
.ht-page .ht-eyebrow{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.8px;color:#0d9488;margin-bottom:6px;}
.ht-page .ht-page-title{font-size:24px;font-weight:700;color:#0f172a;letter-spacing:-.5px;line-height:1.15;margin:0;}
.ht-page .ht-page-lede{font-size:13.5px;color:#64748b;margin:6px 0 0 0;line-height:1.5;max-width:640px;}

/* Per-case page: breadcrumb + title + actions */
.ht-page .ht-header-case{display:flex;flex-direction:column;gap:12px;}
.ht-page .ht-breadcrumb{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:#64748b;line-height:1;}
.ht-page .ht-crumb-link{display:inline-flex;align-items:center;gap:5px;background:transparent;border:0;color:#64748b;padding:5px 8px 5px 6px;margin-left:-6px;font-size:12.5px;font-weight:500;cursor:pointer;border-radius:6px;transition:all .12s ease;letter-spacing:.1px;}
.ht-page .ht-crumb-link:hover{background:#f1f5f9;color:#0f172a;}
.ht-page .ht-crumb-link:focus-visible{outline:2px solid #0d9488;outline-offset:1px;}
.ht-page .ht-crumb-link svg{flex-shrink:0;color:#94a3b8;transition:color .12s,transform .12s ease;width:14px!important;height:14px!important;border-radius:0!important;}
.ht-page .ht-crumb-link:hover svg{color:#0d9488;transform:translateX(-2px);}
.ht-page .ht-crumb-sep{color:#cbd5e1;font-weight:300;margin:0 2px;user-select:none;}
.ht-page .ht-crumb-current{color:#0f172a;font-weight:600;letter-spacing:-.1px;}
.ht-page .ht-header-row{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.ht-page .ht-header-row .ht-page-title{font-size:22px;}
.ht-page .ht-actions{display:inline-flex;gap:8px;flex-shrink:0;}

/* ── Unified button system ───────────────────────────────────────────── */
.ht-page .ht-btn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 13px;border-radius:8px;font-size:12.5px;font-weight:600;cursor:pointer;line-height:1;letter-spacing:.1px;transition:all .15s ease;font-family:inherit;border:1px solid transparent;}
.ht-page .ht-btn svg{flex-shrink:0;width:14px!important;height:14px!important;border-radius:0!important;border-color:initial!important;}
.ht-page .ht-btn:focus-visible{outline:2px solid #0d9488;outline-offset:2px;}
.ht-page .ht-btn-secondary{background:#fff;border-color:#e2e8f0;color:#334155;box-shadow:0 1px 1px rgba(15,23,42,.03);}
.ht-page .ht-btn-secondary:hover{background:#f8fafc;border-color:#cbd5e1;color:#0f172a;}
.ht-page .ht-btn-secondary svg{color:#64748b;}
.ht-page .ht-btn-secondary:hover svg{color:#0f172a;}
.ht-page .ht-btn-primary{background:#0f172a;border-color:#0f172a;color:#fff;box-shadow:0 1px 2px rgba(15,23,42,.18);}
.ht-page .ht-btn-primary:hover{background:#1e293b;border-color:#1e293b;}
.ht-page .ht-btn-primary svg{color:#fff;}

/* ---- HT overview (panel-wide) table ----
   Visual language: clean rows with a thin tier accent on the left
   edge, tabular-numeric metric cells, sticky header, hover-to-reveal
   chevron + actions.
   ──────────────────────────────────────────────────────────────────────── */
.ht-page .ht-header-sub{font-size:12px;color:var(--ht-muted);margin-top:4px;letter-spacing:.1px;}
.ht-page .ht-back-btn{display:inline-flex;align-items:center;gap:4px;background:#fff;border:1px solid var(--ht-border);color:#475569;padding:6px 11px 6px 9px;border-radius:8px;font-size:12px;font-weight:600;cursor:pointer;margin-right:12px;transition:all .15s ease;letter-spacing:.1px;}
.ht-page .ht-back-btn:hover{background:#f8fafc;border-color:#94a3b8;color:#0f172a;transform:translateX(-1px);}
.ht-page .ht-back-btn:focus-visible{outline:2px solid #0d9488;outline-offset:2px;}
.ht-page .ht-header-left{display:flex;align-items:center;flex-wrap:wrap;gap:0;}
.ht-page.ht-overview-page .ht-header-left{flex-direction:column;align-items:flex-start;gap:0;}
.ht-page .ht-ov-banner{background:#fffbeb;border:1px solid #fde68a;color:#92400e;padding:10px 14px;border-radius:10px;font-size:12.5px;margin-bottom:12px;line-height:1.5;display:flex;align-items:flex-start;gap:8px;}
.ht-page .ht-ov-banner::before{content:'';flex-shrink:0;width:14px;height:14px;margin-top:2px;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23d97706' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='12'/><line x1='12' y1='16' x2='12.01' y2='16'/></svg>") center/contain no-repeat;}
.ht-page .ht-ov-banner strong{color:#78350f;font-weight:700;font-variant-numeric:tabular-nums;}
.ht-page .ht-ov-toolbar{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;margin-bottom:12px;flex-wrap:wrap;box-shadow:0 1px 2px rgba(15,23,42,.03);}
.ht-page .ht-ov-search{flex:1 1 260px;min-width:220px;position:relative;}
.ht-page .ht-ov-search::before{content:'';position:absolute;left:11px;top:50%;width:14px;height:14px;margin-top:-7px;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>") center/contain no-repeat;pointer-events:none;}
.ht-page .ht-ov-search input{width:100%;padding:8px 12px 8px 32px;border:1px solid var(--ht-border);border-radius:8px;font-size:13px;background:#f8fafc;transition:background .15s,border-color .15s,box-shadow .15s;color:#0f172a;}
.ht-page .ht-ov-search input::placeholder{color:#94a3b8;}
.ht-page .ht-ov-search input:focus{outline:none;background:#fff;border-color:#0d9488;box-shadow:0 0 0 3px rgba(13,148,136,.12);}
.ht-page .ht-ov-filters{display:flex;gap:6px;flex-wrap:wrap;}
.ht-page .ht-pill{background:#f8fafc;border:1px solid var(--ht-border);color:#475569;padding:6px 12px;border-radius:999px;font-size:11.5px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:all .15s ease;letter-spacing:.1px;line-height:1;}
.ht-page .ht-pill .n{background:rgba(15,23,42,.06);color:#64748b;padding:2px 7px;border-radius:999px;font-size:10.5px;font-weight:700;min-width:18px;text-align:center;font-variant-numeric:tabular-nums;}
.ht-page .ht-pill:hover{background:#fff;border-color:#94a3b8;color:#0f172a;}
.ht-page .ht-pill.active{background:#0f172a;border-color:#0f172a;color:#fff;box-shadow:0 1px 2px rgba(15,23,42,.12);}
.ht-page .ht-pill.active .n{background:rgba(255,255,255,.18);color:#fff;}
.ht-page .ht-ov-count{font-size:11.5px;color:var(--ht-muted);font-weight:600;margin-left:auto;font-variant-numeric:tabular-nums;letter-spacing:.1px;}
.ht-page .ht-ov-tablewrap{background:#fff;border:1px solid var(--ht-border);border-radius:12px;overflow-x:auto;overflow-y:hidden;box-shadow:0 1px 2px rgba(15,23,42,.04);width:100%;}
/* Force table to a sane minimum so col-member doesn't soak runaway space
   when the wrapper is wider than expected (caused a 500k-px Member column
   the first time the PHQ-9 column went in). When the viewport's narrower
   than this, .ht-ov-tablewrap's overflow-x kicks in and the user scrolls. */
.ht-page .ht-ov-tablewrap .ht-ov-table{min-width:1400px;}
/* Fixed layout + 100% width so the table fills its parent edge-to-edge and
   columns obey the widths we set (overflowing content gets ellipsis instead
   of expanding cells). Mirrors the HRCM worklist's column model. */
.ht-page .ht-ov-table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:12.5px;font-variant-numeric:tabular-nums;}
.ht-page .ht-ov-table thead th{background:#f8fafc;text-align:left;font-size:10px;text-transform:uppercase;letter-spacing:.5px;font-weight:700;color:#64748b;padding:10px 10px;border-bottom:1px solid var(--ht-border);position:sticky;top:0;z-index:1;white-space:nowrap;}
/* Column widths — fixed for predictable layout. Member flexes (auto), the
   rest are fixed. Total fixed ≈ 980px; Member soaks the rest. */
.ht-page .ht-ov-table .col-member{width:auto;min-width:220px;}
.ht-page .ht-ov-table .col-ccm,.ht-page .ht-ov-table .col-hospice{width:108px;}
.ht-page .ht-ov-table .col-raf{width:74px;}
.ht-page .ht-ov-table .col-metric{width:96px;}
.ht-page .ht-ov-table .col-hedis{width:64px;text-align:center;}
.ht-page .ht-ov-table .col-pcp{width:120px;}
.ht-page .ht-ov-table .col-flags{width:230px;}
.ht-page .ht-ov-table .col-act{width:100px;text-align:right;}
.ht-page .ht-ov-table tbody td{padding:11px 10px;border-bottom:1px solid #f1f5f9;vertical-align:middle;background:#fff;overflow:hidden;text-overflow:ellipsis;}
.ht-page .ht-ov-table tbody tr:last-child td{border-bottom:none;}
/* Tier accent border on the left edge of each row — Linear/Airtable style. */
.ht-page .ht-ov-row td:first-child{position:relative;}
.ht-page .ht-ov-row td:first-child::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:transparent;transition:background .15s;}
.ht-page .ht-ov-row.tier-row-urgent td:first-child::before{background:#dc2626;}
.ht-page .ht-ov-row.tier-row-priority td:first-child::before{background:#ea580c;}
.ht-page .ht-ov-row.tier-row-monitor td:first-child::before{background:#2563eb;}
.ht-page .ht-ov-row{cursor:pointer;transition:background .12s;}
.ht-page .ht-ov-row:hover td{background:#f8fafc;}
.ht-page .ht-ov-row:focus{outline:none;}
.ht-page .ht-ov-row:focus-visible td:first-child::before{background:#0d9488;width:3px;box-shadow:0 0 0 3px rgba(13,148,136,.18);}
.ht-page .ht-ov-row:focus-visible td{background:#ecfeff;}
.ht-page .ht-ov-table td.col-member{padding-left:16px;overflow:visible;}
.ht-page .ht-ov-table td.col-member .nm{display:flex;align-items:center;gap:6px;font-weight:600;color:#0f172a;line-height:1.25;font-size:13px;letter-spacing:-.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ht-page .ht-ov-table td.col-member .sub{font-size:11px;color:var(--ht-muted);margin-top:3px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ht-page .ht-ov-table td.col-member .sub .ipa-dot{margin:0 6px;opacity:.5;}
/* CCM + Hospice cells — plain text + colored dot. No chip, no border, no
   padding. Uses dedicated classes so no global rule can leak chip styling. */
.ht-page .ht-ov-table td.col-ccm,.ht-page .ht-ov-table td.col-hospice{white-space:nowrap;line-height:1.4;font-size:12px;}
.ht-tier-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:7px;vertical-align:middle;position:relative;top:-1px;}
.ht-tier-dot-urgent  {background:#dc2626;}
.ht-tier-dot-priority{background:#ea580c;}
.ht-tier-dot-monitor {background:#2563eb;}
.ht-tier-dot-strong  {background:#7c3aed;}
.ht-tier-dot-consider{background:#a21caf;}
.ht-tier-dot-engaged {background:#16a34a;}
.ht-tier-text{display:inline-block;font-weight:600;font-size:12px;letter-spacing:.4px;vertical-align:middle;line-height:1.4;}
.ht-tier-text-urgent  {color:#991b1b;}
.ht-tier-text-priority{color:#9a3412;}
.ht-tier-text-monitor {color:#1e40af;}
.ht-tier-text-strong  {color:#5b21b6;}
.ht-tier-text-consider{color:#86198f;}
.ht-tier-text-engaged {color:#15803d;}
.ht-page .ht-tier-score{display:inline-block;font-size:11.5px;font-weight:500;color:#64748b;margin-left:8px;font-variant-numeric:tabular-nums;letter-spacing:-.1px;vertical-align:middle;line-height:1.4;}
/* RAF cell — value above, gap chip below. */
.ht-page .ht-raf-cell{line-height:1.2;}
.ht-page .ht-raf-val{font-size:13px;font-weight:600;color:#0f172a;font-variant-numeric:tabular-nums;letter-spacing:-.2px;}
.ht-page .ht-raf-gap{font-size:10px;color:#15803d;font-weight:600;margin-top:2px;font-variant-numeric:tabular-nums;}
.ht-page .ht-row-spark{display:inline-flex;align-items:center;gap:8px;}
.ht-page .ht-row-spark svg{width:54px;height:16px;display:block;}
.ht-page .ht-row-spark .v{font-size:11.5px;font-weight:600;color:#0f172a;font-variant-numeric:tabular-nums;letter-spacing:-.1px;}
.ht-page .ht-row-spark-empty{color:#cbd5e1;font-size:13px;display:inline-block;width:24px;text-align:center;}
.ht-page .ht-row-spark-single{font-size:12px;font-weight:600;color:#0f172a;font-variant-numeric:tabular-nums;padding:2px 8px;background:#f1f5f9;border-radius:5px;display:inline-block;}
.ht-page .ht-row-spark-single.breach{background:#fef2f2;color:#dc2626;}
.ht-page .ht-row-gaps{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:22px;padding:0 10px;border-radius:999px;font-weight:700;font-size:11.5px;font-variant-numeric:tabular-nums;letter-spacing:.1px;}
.ht-page .ht-row-gaps.warn{background:#fef3c7;color:#854d0e;}
.ht-page .ht-row-gaps.zero{background:#f0fdf4;color:#16a34a;border:1px solid #dcfce7;}
.ht-page .ht-row-pcp .d{font-weight:600;color:#0f172a;font-size:12px;letter-spacing:-.1px;}
.ht-page .ht-row-pcp .r{font-size:10.5px;color:var(--ht-muted);margin-top:2px;line-height:1.2;}
.ht-page .ht-row-pcp.stale .d{color:#a16207;}
.ht-page .ht-row-pcp.overdue .d{color:#b91c1c;}
.ht-page .ht-row-pcp.warn .d{color:#a16207;font-weight:600;font-size:11px;}
.ht-page .ht-row-pcp.empty .d{color:#cbd5e1;}
.ht-page .ht-row-due .t{font-weight:600;color:#0f172a;font-size:11.5px;letter-spacing:-.1px;}
.ht-page .ht-row-due .r{font-size:10.5px;color:var(--ht-muted);margin-top:2px;line-height:1.2;}
.ht-page .ht-row-due.warn .r{color:#a16207;font-weight:600;}
.ht-page .ht-row-due.overdue .t{color:#991b1b;}
.ht-page .ht-row-due.overdue .r{color:#b91c1c;font-weight:700;}
.ht-page .ht-row-muted{color:#cbd5e1;font-size:13px;font-weight:500;}
/* "+N" overflow indicator next to flag chips. */
.ht-page .ht-row-more{display:inline-block;font-size:10.5px;color:#64748b;font-weight:600;margin-left:4px;letter-spacing:.1px;vertical-align:middle;cursor:help;}
.ht-page .ht-ov-table td.col-act{text-align:right;white-space:nowrap;padding-right:14px;overflow:visible;}
.ht-page .ht-row-action{background:transparent;border:none;padding:5px 6px;font-size:13px;cursor:pointer;border-radius:6px;transition:background .12s,transform .12s;opacity:.55;}
.ht-page .ht-ov-row:hover .ht-row-action{opacity:1;}
.ht-page .ht-row-action:hover{background:#e2e8f0;transform:scale(1.1);}
.ht-page .ht-row-action:focus-visible{outline:2px solid #0d9488;outline-offset:1px;opacity:1;}
.ht-page .ht-row-chevron{color:#cbd5e1;font-size:18px;margin-left:6px;font-weight:600;transition:transform .15s,color .15s;display:inline-block;}
.ht-page .ht-ov-row:hover .ht-row-chevron{color:#0d9488;transform:translateX(3px);}
@media(max-width:1280px){
  .ht-page .ht-ov-table .col-hospice{display:none;}
}
@media(max-width:1100px){
  .ht-page .ht-ov-table .col-pcp{display:none;}
}
@media(max-width:960px){
  .ht-page .ht-ov-table .col-flags,
  .ht-page .ht-ov-table .col-raf{display:none;}
}
@media(max-width:760px){
  .ht-page .ht-ov-table .col-metric:nth-of-type(7){display:none;}
}

/* Interactive chart hover — crosshair + floating tooltip */
.ht-page .ht-chart-body{position:relative;}
.ht-page .ht-chart-body svg .ht-crosshair{opacity:0;transition:opacity .12s;pointer-events:none;}
.ht-page .ht-chart-body svg.is-hover .ht-crosshair{opacity:1;}
.ht-page .ht-chart-body svg .ht-overlay{fill:transparent;cursor:crosshair;}
/* shadcn-style tooltip — white card with subtle border + soft shadow + tabular numbers. */
.ht-page .ht-tooltip{position:absolute;display:none;background:#fff;color:#0f172a;padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px;font-size:12px;pointer-events:none;white-space:nowrap;z-index:5;box-shadow:0 8px 24px -8px rgba(15,23,42,.18),0 2px 6px -2px rgba(15,23,42,.06);line-height:1.4;min-width:148px;}
.ht-page .ht-tooltip .tip-date{font-weight:600;font-size:10.5px;text-transform:uppercase;letter-spacing:.4px;color:#64748b;margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid #f1f5f9;}
.ht-page .ht-tooltip .tip-row{display:flex;align-items:center;gap:10px;margin-top:4px;}
.ht-page .ht-tooltip .tip-dot{width:7px;height:7px;border-radius:2px;flex-shrink:0;}
.ht-page .ht-tooltip .tip-lbl{color:#64748b;font-size:11.5px;font-weight:500;}
.ht-page .ht-tooltip .tip-val{font-weight:600;margin-left:auto;font-variant-numeric:tabular-nums;color:#0f172a;font-size:12.5px;}
.ht-page .ht-tooltip .tip-src{font-size:10px;color:#94a3b8;margin-top:6px;padding-top:6px;border-top:1px solid #f1f5f9;font-style:italic;}

/* Activity feed (replaces the dot timeline) */
.ht-page .ht-feed{display:flex;flex-direction:column;gap:4px;margin-top:6px;position:relative;}
.ht-page .ht-feed-item{display:grid;grid-template-columns:72px 30px 1fr auto;gap:12px;align-items:center;padding:11px 14px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;transition:all .15s ease;position:relative;}
.ht-page .ht-feed-item::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:#e2e8f0;border-radius:10px 0 0 10px;transition:background .15s;}
.ht-page .ht-feed-item{border-left:0;}
.ht-page .ht-feed-item:hover{background:#fafbfc;border-color:#cbd5e1;box-shadow:0 1px 3px rgba(15,23,42,.05);}
.ht-page .ht-feed-item.is-encounter::before{background:#0ea5e9;}
.ht-page .ht-feed-item.is-auth::before{background:#a855f7;}
.ht-page .ht-feed-item.is-auth-denied::before{background:#dc2626;}
.ht-page .ht-feed-item.is-auth-approved::before{background:#16a34a;}
.ht-page .ht-feed-item.is-flag::before{background:#dc2626;}
.ht-page .ht-feed-item.is-flag-resolved::before{background:#16a34a;}
.ht-page .ht-feed-item.is-flag-acked::before{background:#f59e0b;}
.ht-page .ht-feed-item.is-pdc::before{background:#7c3aed;}
.ht-page .ht-feed-time{font-size:11px;color:var(--ht-muted);font-weight:600;line-height:1.4;}
.ht-page .ht-feed-time .abs{display:block;font-weight:400;font-size:10px;color:#94a3b8;margin-top:1px;}
.ht-page .ht-feed-icon{width:28px;height:28px;border-radius:8px;background:#f1f5f9;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0;}
.ht-page .ht-feed-item.is-encounter .ht-feed-icon{background:#e0f2fe;}
.ht-page .ht-feed-item.is-auth .ht-feed-icon,
.ht-page .ht-feed-item.is-auth-approved .ht-feed-icon,
.ht-page .ht-feed-item.is-auth-denied .ht-feed-icon{background:#f3e8ff;}
.ht-page .ht-feed-item.is-flag .ht-feed-icon,
.ht-page .ht-feed-item.is-flag-resolved .ht-feed-icon,
.ht-page .ht-feed-item.is-flag-acked .ht-feed-icon{background:#fee2e2;}
.ht-page .ht-feed-item.is-pdc .ht-feed-icon{background:#ede9fe;}
.ht-page .ht-feed-text{min-width:0;}
.ht-page .ht-feed-head{font-size:12.5px;font-weight:600;color:var(--ht-text);line-height:1.4;}
.ht-page .ht-feed-sub{font-size:11px;color:var(--ht-muted);margin-top:2px;line-height:1.4;}
.ht-page .ht-feed-badge{font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.3px;padding:3px 8px;border-radius:10px;background:#f1f5f9;color:#475569;white-space:nowrap;align-self:center;}
.ht-page .ht-feed-badge.good{background:#dcfce7;color:#15803d;}
.ht-page .ht-feed-badge.warn{background:#fef3c7;color:#854d0e;}
.ht-page .ht-feed-badge.alert{background:#fee2e2;color:#991b1b;}
.ht-page .ht-feed-more{align-self:center;text-align:center;font-size:11px;color:var(--ht-muted);padding:6px;font-weight:600;cursor:pointer;text-transform:uppercase;letter-spacing:.3px;}
.ht-page .ht-feed-more:hover{color:var(--teal-dark);}
.ht-page .ht-feed-empty{text-align:center;padding:18px;color:var(--ht-muted);font-size:12px;background:#fafbfc;border:1px dashed var(--ht-border);border-radius:10px;}
/* Tiny section label — used by Risk profile clinical flags + hospice signals. */
.ht-page .ht-section-label{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:#64748b;margin-bottom:6px;}
.ht-page .ht-flag-row{display:flex;flex-wrap:wrap;gap:4px;align-items:center;}

/* Section title used inside cards (single source of truth) */
.ht-page .ht-section-title{font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:var(--ht-muted);display:flex;align-items:baseline;gap:8px;}
.ht-page .ht-section-title .ht-section-sub{font-weight:400;text-transform:none;letter-spacing:0;color:var(--ht-muted);font-size:11px;opacity:.85;}
/* Two-column row helper */
.ht-page .ht-row-2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
@media(max-width:920px){.ht-page .ht-row-2{grid-template-columns:1fr;}}
.ht-page .ht-row-2 > .hrcm-card{margin-bottom:0!important;}

/* Tracker subtab redesign 2026-05-21 — .tr-page wraps the worklist's Tracker view. */
.tr-page{font-size:13px;color:#1f2933;}
.tr-page h2{font-size:20px!important;font-weight:700!important;margin:0!important;letter-spacing:-.2px;}
.tr-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:0 0 14px;padding:14px 16px;background:linear-gradient(180deg,#fafbfc,#f1f5f7);border:1px solid #e3e7eb;border-radius:10px;flex-wrap:wrap;}
.tr-header-left{display:flex;flex-direction:column;gap:4px;}
.tr-header-meta{font-size:11px;color:#64748b;}
.tr-header-meta strong{color:#1f2933;font-weight:700;}
.tr-page .case-workspace-tabs{background:linear-gradient(180deg,#f3efe5,#ecead8)!important;border:1px solid #e0dcc8!important;border-radius:10px;padding:8px 10px!important;margin:0 0 12px!important;gap:4px!important;}
.tr-page .case-workspace-tabs .ws-tab{background:#fff;border:1px solid #d0d6dc;border-radius:8px;padding:6px 12px;font-size:12px;font-weight:600;color:#1f2933;}
.tr-page .case-workspace-tabs .ws-tab.active{background:var(--teal-dark);color:#fff;border-color:var(--teal-dark);}
.tr-page .case-workspace-tabs .ws-tab:hover{background:#eef7f7;border-color:var(--teal-dark);}
.tr-page .case-workspace-tabs .ws-tab.active:hover{background:#015458;}
.tr-page .case-workspace-tabs .po-chip-n{background:rgba(15,23,42,.08);padding:1px 6px;border-radius:8px;font-size:10.5px;margin-left:4px;}
.tr-page .case-workspace-tabs .ws-tab.active .po-chip-n{background:rgba(255,255,255,.22);}
.tr-page .tr-body{background:#fff;border:1px solid #e3e7eb;border-radius:10px;padding:12px 14px;box-shadow:0 1px 1px rgba(15,23,42,.02);}
.tr-page .tr-body table{font-size:12px;border-collapse:separate;border-spacing:0;width:100%;}
.tr-page .tr-body table thead th{background:#fafbfc!important;color:#64748b!important;font-weight:700!important;font-size:10.5px!important;text-transform:uppercase;letter-spacing:.4px;padding:8px 10px!important;border-bottom:1px solid #e3e7eb;}
.tr-page .tr-body table tbody td{padding:8px 10px;border-bottom:1px solid #f1f5f7;vertical-align:middle;}
.tr-page .tr-body table tbody tr:last-child td{border-bottom:none;}
.tr-page .tr-body table tbody tr:hover{background:#f8fafc;}

/* Sidebar polish 2026-05-21 — tighter rhythm, refined badge contrast. */
.nav-item{padding:8px 16px!important;border-radius:0 6px 6px 0;margin-right:6px;}
.nav-item .badge,.nav-item .tag-badge{margin-left:auto;font-size:10px;font-weight:700;padding:1px 6px;border-radius:8px;background:#dc2626;color:#fff;letter-spacing:.3px;}

/* Concierge Log redesign 2026-05-22 — .cl-page wraps RENDERERS['hrcm-concierge-log']. */
.cl-page{--cl-border:#e3e7eb;--cl-muted:#64748b;--cl-text:#1f2933;font-size:13px;color:var(--cl-text);}
.cl-page h2{font-size:20px!important;font-weight:700!important;margin:0!important;letter-spacing:-.2px;}
.cl-page h3{font-size:13px!important;font-weight:700!important;text-transform:uppercase;letter-spacing:.4px;color:var(--cl-muted)!important;margin:0 0 10px!important;display:flex;align-items:center;gap:8px;}
.cl-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:0 0 14px;padding:14px 16px;background:linear-gradient(180deg,#fafbfc,#f1f5f7);border:1px solid var(--cl-border);border-radius:10px;flex-wrap:wrap;}
.cl-header-left{display:flex;flex-direction:column;gap:4px;}
.cl-header-meta{font-size:11px;color:var(--cl-muted);}
.cl-header-meta strong{color:var(--cl-text);font-weight:600;}
.cl-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
.cl-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:14px;}
@media(max-width:980px){.cl-kpis{grid-template-columns:repeat(3,1fr);}}
@media(max-width:640px){.cl-kpis{grid-template-columns:repeat(2,1fr);}}
.cl-kpi{background:#fff;border:1px solid var(--cl-border);border-radius:10px;padding:12px 14px;border-left:4px solid var(--cl-border);box-shadow:0 1px 1px rgba(15,23,42,.02);}
.cl-kpi .n{font-size:24px;font-weight:700;color:var(--cl-text);line-height:1;}
.cl-kpi .l{font-size:10.5px;color:var(--cl-muted);text-transform:uppercase;letter-spacing:.4px;margin-top:6px;font-weight:600;}
.cl-kpi.k-attempted{border-left-color:#475569;}
.cl-kpi.k-successful{border-left-color:#16a34a;}
.cl-kpi.k-successful .n{color:#15803d;}
.cl-kpi.k-unreached{border-left-color:#d97706;}
.cl-kpi.k-unreached .n{color:#a16207;}
.cl-kpi.k-pushed{border-left-color:#dc2626;}
.cl-kpi.k-pushed .n{color:#991b1b;}
.cl-kpi.k-overdue{border-left-color:#dc2626;}
.cl-kpi.k-overdue .n{color:#991b1b;}
.cl-section{background:#fff;border:1px solid var(--cl-border);border-radius:10px;padding:14px 16px;margin-bottom:12px;box-shadow:0 1px 1px rgba(15,23,42,.02);border-left:4px solid var(--cl-border);}
.cl-section.section-cadence{border-left-color:#0d9488;}
.cl-section.section-recent{border-left-color:#6366f1;}
.cl-section table.hrcm-table{margin-top:0!important;width:100%;border-collapse:separate;border-spacing:0;}
.cl-section .hrcm-table thead th{background:#fafbfc!important;color:var(--cl-muted)!important;font-weight:700!important;font-size:10.5px!important;text-transform:uppercase;letter-spacing:.4px;padding:8px 10px!important;border-bottom:1px solid var(--cl-border)!important;}
.cl-section .hrcm-table tbody td{padding:8px 10px!important;font-size:12.5px!important;vertical-align:middle;border-bottom:1px solid #f1f5f7!important;border-top:none!important;}
.cl-section .hrcm-table tbody tr:last-child td{border-bottom:none!important;}
.cl-section .hrcm-table tbody tr td:first-child{border-left:none!important;}
.cl-section .hrcm-table tbody tr:nth-child(even){background:#fafbfc!important;}
.cl-section .hrcm-table tbody tr:hover{background:#eef9ff!important;}
.cl-due-pill{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:600;}
.cl-due-pill.overdue{background:#fee2e2;color:#991b1b;}
.cl-due-pill.due-soon{background:#fef3c7;color:#854d0e;}
.cl-due-pill.on-track{background:#dcfce7;color:#15803d;}
.cl-due-pill.no-contact{background:#f1f5f7;color:#64748b;}
.cl-due-pill .dot{width:7px;height:7px;border-radius:50%;background:currentColor;display:inline-block;}
.cl-mod-pill{display:inline-block;padding:2px 8px;border-radius:10px;font-size:10.5px;font-weight:700;letter-spacing:.3px;text-transform:uppercase;}
.cl-mod-pill.phone{background:#dbeafe;color:#1e40af;}
.cl-mod-pill.text{background:#dcfce7;color:#15803d;}
.cl-mod-pill.in_person{background:#f3e8ff;color:#581c87;}
.cl-mod-pill.voicemail{background:#fef3c7;color:#854d0e;}
.cl-mod-pill.unreachable{background:#fee2e2;color:#991b1b;}
.cl-push-badge{display:inline-block;padding:2px 8px;border-radius:10px;background:#fee2e2;color:#991b1b;font-size:10.5px;font-weight:700;letter-spacing:.3px;}
.cl-action-list{margin:0;padding:0;list-style:none;font-size:11.5px;color:var(--cl-text);line-height:1.5;}
.cl-action-list li{padding-left:14px;position:relative;}
.cl-action-list li::before{content:'•';position:absolute;left:2px;color:var(--cl-muted);}



/* ═══════════════════════════════════════════════════════════════════════════
   POLISH PASS — 2026-05-26
   Detail-level refinements applied AFTER the warm-calm Tier 1 token shift.
   All additive (no existing rules removed). Heavy use of attribute selectors
   to scope cleanup to the right surfaces without renderer edits.
   ═══════════════════════════════════════════════════════════════════════════ */

/* — Topbar right side — tidier date + IPA pill — */
#tdate{
  font-size:12px;
  font-weight:500;
  color:var(--muted);
  letter-spacing:0.1px;
}
.ipa-badge{
  background:var(--teal-light);
  color:var(--teal-dark);
  padding:5px 12px;
  border-radius:999px;
  font-size:11px;
  font-weight:600;
  letter-spacing:0.2px;
  line-height:1.4;
}
.topbar .tr{gap:14px;}

/* — Breadcrumb — slightly more breathable — */
.bc{font-size:12px;color:var(--muted);margin-top:3px;line-height:1.4;gap:6px;}
.bc-link{color:var(--teal);cursor:pointer;font-weight:500;}
.bc-link:hover{text-decoration:underline;text-underline-offset:2px;}
.bc-sep{color:var(--border);font-size:10px;}
.bc-cur{color:var(--text);font-weight:600;}

/* — Back button — softer, on-brand — */
.back-btn{
  border-width:1px;
  border-radius:8px;
  padding:6px 12px;
  font-weight:600;
}

/* — Sidebar footer — give Sign Out room to breathe — */
.sfooter{padding:14px 18px 18px;}
.lbtn{padding:6px 0;font-weight:500;}

/* — Dashboard tabs — clearer active state + spacing — */
.dash-tab{
  font-size:13px;
  padding:10px 16px !important;
  font-weight:600 !important;
  border-bottom:2px solid transparent;
  color:var(--muted) !important;
  transition:color var(--duration-fast,150ms) ease-out,
              border-color var(--duration-fast,150ms) ease-out;
}
.dash-tab:hover{color:var(--teal-dark) !important;}
.dash-tab.active{
  color:var(--teal-dark) !important;
  border-bottom-color:var(--teal) !important;
}

/* — Alerts — cleaner padding + radius parity with cards — */
.al{
  border-radius:10px;
  padding:12px 16px;
  margin-bottom:14px;
  font-size:13px;
  line-height:1.5;
}

/* — The dashboard's "Live data sync is failing" red banner uses inline
     `style="background:#FDEDEC;border-left:4px solid #E74C3C;..."` so it
     can't be retargeted by class. The next selector matches THAT exact
     shape and softens it: less alarming, smaller padding, calmer red. — */
.content > div[style*="background:#FDEDEC"][style*="border-left:4px solid #E74C3C"]{
  background:var(--red-light) !important;
  border-left-color:var(--red) !important;
  border-radius:10px !important;
  padding:12px 16px !important;
  font-size:13px !important;
  line-height:1.55 !important;
}
.content > div[style*="background:#FDEDEC"] ul{
  margin-top:6px !important;
  font-size:12px;
  color:var(--text);
}
.content > div[style*="background:#FDEDEC"] ul li{padding:1px 0;}

/* — Dashboard "IPA PERFORMANCE DASHBOARD" hero ribbon (.akpi big strip).
     Today it's a saturated dark-teal banner with little payload. Calm it. — */
.akpi[style*="background"]{
  border-radius:10px;
}

/* — KPI label spacing inside the .akpi (hero) variant — */
.akpi .kpi-l{color:rgba(255,255,255,0.85);}
.akpi .kpi-n{letter-spacing:-0.5px;}

/* — Sub-stat date markers in dashboard ("Claims: Apr 7, 2026" red dot line) —
     These look like errors today. Demote them to neutral metadata. — */
.tsm{font-size:12px;color:var(--muted);}
.tmuted{color:var(--muted);}

/* — Help FAB / floating help button — circular, calm — */
button[onclick*="help"],
[id*="help-btn"],
.help-fab{
  border-radius:999px !important;
}

/* — Modal form inputs — standardize regardless of inline styles inside the
     CM modals. Higher specificity than the inline `style="border:1.5px solid..."`
     would require !important; we instead provide a clean baseline so the
     non-styled inputs (Q2.7 cleanup target) inherit it automatically. — */
.mbody input[type="text"],
.mbody input[type="number"],
.mbody input[type="email"],
.mbody input[type="tel"],
.mbody input[type="date"],
.mbody select,
.mbody textarea{
  font-family:inherit;
  font-size:14px;
  color:var(--text);
  background:var(--surface);
  transition:border-color var(--duration-fast,150ms) ease-out,
              box-shadow var(--duration-fast,150ms) ease-out;
}
.mbody input::placeholder,
.mbody textarea::placeholder{color:#B5AB95;}
.mbody input:focus,
.mbody select:focus,
.mbody textarea:focus{
  outline:none;
  border-color:var(--teal) !important;
  box-shadow:0 0 0 3px rgba(0,107,107,0.15);
}
.mbody label{font-weight:600;}
.mhdr{padding:18px 22px 14px;}
.mbody{padding:18px 22px;}
.mftr{padding:14px 22px;}
.mtitle{font-size:16px;letter-spacing:-0.1px;}
.modal{border-radius:14px;}

/* — Section header within page (e.g., "SECTION 1 · HRCM TIER STRIP") — soften — */
.content h3{
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.6px;
  color:var(--muted);
  margin:18px 0 10px;
}

/* — Login card — match new warm palette — */
.lcard{
  background:var(--surface);
  border-radius:14px;
  padding:36px 36px 32px;
  width:400px;
}
.llogo h1{color:var(--teal-dark);letter-spacing:-0.3px;}

/* — Engine refreshed timestamp / debug-y captions — calm them — */
.content > div[style*="font-size:11px"]:not(.tag):not(.al){
  color:var(--muted);
}

/* — Skeleton shimmer — warmer tint to match new palette — */
.sk{background:var(--bg-sunken,#F3EEE5);}
.sk::after{
  background:linear-gradient(90deg,
    transparent 0%,
    rgba(74,60,40,0.06) 50%,
    transparent 100%);
}

/* — Active-row indicator on hrcm-table — warmer + brand-teal instead of blue — */
.hrcm-table tbody tr.row-active{background:var(--teal-light);}
.hrcm-table tbody tr.row-active td:first-child{border-left-color:var(--teal);}

/* — Status text colors used across worklist (.cl-* / .lcr-* tokens emitted
     by the renderer) — make sure they read against the warm cream bg — */
.cl-muted,.lcr-muted{color:var(--muted) !important;}

/* — Tier filter chips at the top of Tracker (.tag .urgent etc.) — give them
     more height and consistent padding — */
button.tag,
.hrcm-toolbar .tag{padding:6px 12px;font-size:11px;}

/* — Reduce visual weight of the 0-value KPIs (so the dashboard's many zero
     metrics don't fight for attention). Renderers emit class="kpi-n" with
     literal "0" — dim those subtly via attribute. — */
.kpi-n{transition:color var(--duration-fast,150ms) ease-out;}

/* — Anchor underline polish — */
a{text-underline-offset:2px;}

/* ═══════════════════════════════════════════════════════════════════════════
   EDITORIAL LAYER — 2026-05-26
   Aesthetic direction: warm library reading-room. Three typographic voices
   (Fraunces serif for character, DM Sans for utility, DM Mono for data),
   brass-and-teal ornament palette, paper-grain depth, restrained motion.
   Pure CSS — no functional change.
   ═══════════════════════════════════════════════════════════════════════════ */

:root{
  --font-display:'Fraunces',Georgia,'Times New Roman',serif;
  --font-body:'DM Sans',-apple-system,sans-serif;
  --font-mono:'DM Mono',ui-monospace,monospace;

  /* Brass — restrained accent for ornament: rails, dividers, underlines.
     A muted, slightly aged gold. Different from --gold (which stays as
     brand-CTA variant for KPI gold-rail backwards compat). */
  --brass:#9E7A3B;
  --brass-soft:#C5A05E;
  --brass-deep:#6E5424;
}

/* — Paper grain — a very subtle SVG noise on the page background. Adds
     organic depth so the cream doesn't read as flat sterile beige.
     Applied via ::before pseudo on body so the noise sits behind content
     but above the bg color. — */
body::before{
  content:'';
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
  opacity:0.5;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.40  0 0 0 0 0.30  0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
/* Layer above body::before noise. DON'T override sidebar's position:fixed
   (regression of 2026-05-26 paper-grain layering bug — sidebar was scrolling
   with content). z-indexes alone are enough to put these surfaces above the
   z-index:0 noise layer. */
#main{position:relative;z-index:1;}
#sidebar{z-index:100;}                       /* keeps its own position:fixed */
#login-screen,.modal-ov{z-index:999;}        /* keep their own position:fixed */

/* — Display typography — Fraunces for headings and ornamented labels.
     Letter-spacing and font-feature-settings dialed for editorial feel. — */
#page-title{
  font-family:var(--font-display);
  font-weight:500;
  font-size:18px;
  letter-spacing:-0.01em;
  font-feature-settings:'ss01' 1, 'ss02' 1;
  color:var(--text);
  line-height:1.15;
}
.card-title{
  font-family:var(--font-display);
  font-weight:500;
  font-size:16px;
  letter-spacing:-0.01em;
  color:var(--text);
}
.content h3{
  font-family:var(--font-body);
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.12em;
  color:var(--brass-deep);
  margin:22px 0 12px;
  display:flex;
  align-items:center;
  gap:10px;
}
.content h3::after{
  content:'';
  flex:1;
  height:1px;
  background:linear-gradient(to right, var(--brass-soft) 0%, transparent 60%);
  opacity:0.45;
}
.mtitle{
  font-family:var(--font-display);
  font-weight:500;
  font-size:17px;
  letter-spacing:-0.01em;
}

/* — Sidebar wordmark — refined serif italic — */
.logo-area{
  border-bottom-color:rgba(243,238,229,0.10);
  position:relative;
}
.logo-area h1{
  font-family:var(--font-display);
  font-weight:400;
  font-style:italic;
  font-size:19px;
  letter-spacing:-0.01em;
  color:#F3EEE5;
  line-height:1.2;
}
.logo-area p{
  font-family:var(--font-body);
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:0.18em;
  color:rgba(243,238,229,0.45);
  margin-top:6px;
}

/* — Sidebar brass pinstripe on the right edge (book-binding moment) — */
#sidebar::after{
  content:'';
  position:absolute;
  top:0;bottom:0;
  right:0;
  width:1px;
  background:linear-gradient(to bottom,
    transparent 0%,
    rgba(158,122,59,0.0) 5%,
    rgba(158,122,59,0.35) 50%,
    rgba(158,122,59,0.0) 95%,
    transparent 100%);
  pointer-events:none;
}

/* — Nav section labels — small caps, brass-tinted — */
.nav-sec{
  font-family:var(--font-body);
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.16em;
  color:rgba(197,160,94,0.55);
  padding:16px 18px 6px 18px;
}

/* — Active nav item — brass rail with ornament marker — */
.nav-item.active{
  background:linear-gradient(90deg,
    rgba(158,122,59,0.18) 0%,
    rgba(243,238,229,0.06) 100%);
  border-left-color:var(--brass);
  border-left-width:3px;
}
.nav-item.active::before{
  content:'◆';
  position:absolute;
  left:1px;
  color:var(--brass-soft);
  font-size:6px;
  opacity:0.85;
}
.nav-item{position:relative;}
.nav-item:hover{
  background:rgba(243,238,229,0.05);
  border-left-color:rgba(158,122,59,0.30);
}

/* — Hide IPA-selector visual in sidebar provider card by aging the look — */
.prov-badge{
  border:1px solid rgba(243,238,229,0.06);
  background:rgba(243,238,229,0.04);
  border-radius:10px;
}
.prov-badge .pname{
  font-family:var(--font-display);
  font-weight:500;
  font-size:14px;
  letter-spacing:-0.01em;
  color:#F3EEE5;
}
.prov-badge label{
  font-family:var(--font-body);
  text-transform:uppercase;
  letter-spacing:0.16em;
  color:rgba(243,238,229,0.42);
  font-size:9px;
  margin-top:8px;
}

/* — KPI cards — refined card surface with inner highlight & brass under-line —
     The .kpi card gets a paper feel (no border, soft shadow, inner top
     highlight) and a brass underline that animates in on hover. — */
.kpi{
  border:0;
  border-left:3px solid rgba(0,107,107,0.30);
  border-radius:12px;
  background:var(--surface);
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55);
  padding:16px 18px;
  position:relative;
  overflow:hidden;
  min-height:0;
}
.kpi::after{
  content:'';
  position:absolute;
  left:0;right:0;bottom:0;
  height:2px;
  background:linear-gradient(to right,
    transparent 0%,
    var(--brass-soft) 50%,
    transparent 100%);
  transform:scaleX(0);
  transform-origin:center;
  transition:transform 320ms cubic-bezier(0.22,1,0.36,1);
}
.kpi:hover{
  transform:translateY(-2px);
  box-shadow:var(--sh-lg), inset 0 1px 0 rgba(255,255,255,0.6);
  border-left-color:var(--teal);
}
.kpi:hover::after{transform:scaleX(1);}
.kpi-n{
  font-family:var(--font-mono);
  font-feature-settings:'tnum' 1, 'zero' 1;
  font-size:26px;
  font-weight:500;
  letter-spacing:-0.02em;
  line-height:1.1;
  color:var(--text);
}
.kpi-l{
  font-family:var(--font-body);
  font-size:11px;
  letter-spacing:0.14em;
  font-weight:600;
  text-transform:uppercase;
  color:var(--muted);
  margin-top:6px;
}
.kpi-s{
  font-family:var(--font-body);
  font-size:11.5px;
  color:var(--brass-deep);
  font-weight:500;
  margin-top:5px;
  letter-spacing:0;
  text-transform:none;
  line-height:1.4;
}

/* — Card refinement — borderless + inner highlight — */
.card{
  border:0;
  border-radius:12px;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55);
  padding:22px 24px;
}

/* — Dashboard tab strip — animated brass underline — */
.dash-tab{
  font-family:var(--font-body);
  font-size:13px;
  font-weight:500 !important;
  padding:12px 4px !important;
  margin-right:24px;
  letter-spacing:0.01em;
  position:relative;
  border-bottom:0 !important;
  color:var(--muted) !important;
  transition:color 200ms cubic-bezier(0.22,1,0.36,1);
}
.dash-tab::after{
  content:'';
  position:absolute;
  left:0;right:0;bottom:-2px;
  height:2px;
  background:var(--brass);
  transform:scaleX(0);
  transform-origin:left center;
  transition:transform 280ms cubic-bezier(0.22,1,0.36,1);
}
.dash-tab:hover::after{transform:scaleX(0.3);background:var(--brass-soft);}
.dash-tab.active{color:var(--text) !important;font-weight:600 !important;}
.dash-tab.active::after{transform:scaleX(1);background:var(--brass);}

/* — Page title flourish — small brass mark + horizontal rule under the
     title row to reinforce editorial framing — */
.tl > div > #page-title + .bc{
  margin-top:1px;
}

/* — Topbar — refined right side; remove redundant IPA pill weight — */
.topbar{
  height:50px;
  background:linear-gradient(to bottom, var(--surface) 0%, rgba(255,252,247,0.85) 100%);
  backdrop-filter:saturate(120%) blur(6px);
  -webkit-backdrop-filter:saturate(120%) blur(6px);
  border-bottom:1px solid rgba(231,225,212,0.7);
}
#tdate{
  font-family:var(--font-body);
  font-size:12px;
  color:var(--muted);
  font-weight:500;
  letter-spacing:0.01em;
}
.ipa-badge{
  background:transparent;
  border:1px solid var(--brass-soft);
  color:var(--brass-deep);
  font-family:var(--font-body);
  font-size:11px;
  font-weight:600;
  letter-spacing:0.08em;
  text-transform:uppercase;
  padding:5px 14px;
  border-radius:999px;
}

/* — Tables — small caps headers (printed-page feel), brass row markers — */
thead th{
  background:rgba(231,225,212,0.40);
  color:var(--brass-deep);
  font-family:var(--font-body);
  font-size:10px;
  font-weight:700;
  letter-spacing:0.16em;
  text-transform:uppercase;
  padding:13px 14px;
  border-bottom:1px solid var(--border);
}
tbody tr{border-bottom:1px solid rgba(231,225,212,0.55);}
tbody td{padding:13px 14px;font-size:14px;}
tbody tr:hover{background:rgba(158,122,59,0.04);}

/* — Tag pills — calm version, soft pastel grounds — */
.tag{
  font-family:var(--font-body);
  font-size:10.5px;
  font-weight:600;
  letter-spacing:0.06em;
  text-transform:uppercase;
  padding:3px 10px;
  border-radius:999px;
}
.tg{background:rgba(110,138,92,0.12);color:#4F6A40;}
.tr2{background:rgba(176,95,76,0.12);color:#823F2E;}
.to{background:rgba(192,138,62,0.14);color:#6E5424;}
.tb{background:rgba(84,114,144,0.12);color:#3A5269;}
.toa{background:rgba(192,138,62,0.14);color:#6E5424;}
.tgr{background:rgba(107,98,86,0.10);color:var(--muted);}

/* — Buttons — refined primary, brass-bordered ghost — */
.btn{
  font-family:var(--font-body);
  font-weight:600;
  letter-spacing:0.01em;
  border-radius:8px;
}
.btn-p{
  background:var(--teal);
  color:#FFFCF7;
  box-shadow:0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-p:hover{
  background:var(--teal-dark);
  box-shadow:0 2px 8px rgba(0,107,107,0.20), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-g{
  background:transparent;
  color:var(--brass-deep);
  border:1px solid var(--brass-soft);
}
.btn-g:hover{
  background:rgba(158,122,59,0.08);
  border-color:var(--brass);
  color:var(--brass-deep);
}

/* — Floating Help button — circular FAB, cream + brass — */
button[onclick*="help"],
[id*="help-btn"],
.help-fab,
#help-btn{
  border-radius:999px !important;
  background:var(--surface) !important;
  border:1.5px solid var(--brass-soft) !important;
  color:var(--brass-deep) !important;
  font-family:var(--font-display) !important;
  font-style:italic !important;
  font-weight:500 !important;
  box-shadow:var(--sh) !important;
  transition:transform 200ms cubic-bezier(0.22,1,0.36,1),
              box-shadow 200ms cubic-bezier(0.22,1,0.36,1) !important;
}
button[onclick*="help"]:hover,
#help-btn:hover,
.help-fab:hover{
  transform:translateY(-2px) !important;
  box-shadow:0 8px 24px rgba(158,122,59,0.25), 0 2px 6px rgba(74,60,40,0.10) !important;
}

/* — Modal panel — paper card, brass accent line under header — */
.modal{
  background:var(--surface);
  border-radius:14px;
  box-shadow:var(--sh-lg), inset 0 1px 0 rgba(255,255,255,0.6);
}
.mhdr{
  border-bottom:1px solid var(--border);
  background:linear-gradient(to bottom,
    rgba(255,252,247,1) 0%,
    rgba(250,247,241,0.85) 100%);
  position:relative;
}
.mhdr::after{
  content:'';
  position:absolute;
  left:0;right:0;bottom:-1px;
  height:1px;
  background:linear-gradient(to right,
    transparent 0%,
    var(--brass-soft) 50%,
    transparent 100%);
  opacity:0.35;
}
.mx{color:var(--muted);transition:color 150ms ease-out, transform 150ms ease-out;}
.mx:hover{color:var(--terra-500,var(--red));transform:rotate(90deg);}

/* — Breadcrumb separator — Unicode bullet with refined spacing — */
.bc-sep::before{content:'·';font-size:14px;color:var(--brass-soft);opacity:0.55;}
.bc-sep{font-size:0;}
.bc-link:hover{color:var(--brass-deep);}

/* — Inline-styled red sync banner — re-skin via attribute selector.
     Compact treatment: 2-col inline layout instead of a wall of bullets. — */
.content > div[style*="background:#FDEDEC"]{
  background:linear-gradient(to right, rgba(176,95,76,0.06), rgba(176,95,76,0.10)) !important;
  border-left:3px solid var(--brass-deep) !important;
  border-radius:10px !important;
  padding:10px 14px !important;
  font-size:12.5px !important;
  line-height:1.55 !important;
  color:var(--text) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.55) !important;
  margin-bottom:10px !important;
}
.content > div[style*="background:#FDEDEC"] > div:first-child{
  font-family:var(--font-display);
  font-style:italic;
  font-weight:500;
  font-size:14px;
  letter-spacing:-0.01em;
  color:#823F2E;
  margin-bottom:2px !important;
}
.content > div[style*="background:#FDEDEC"] ul{
  margin-top:2px !important;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:1px 18px;
  padding-left:18px !important;
  list-style:none !important;
}
.content > div[style*="background:#FDEDEC"] ul li{
  padding:0 !important;
  position:relative;
  font-size:12px;
}
.content > div[style*="background:#FDEDEC"] ul li::before{
  content:'·';
  position:absolute;
  left:-12px;
  color:var(--brass);
  font-weight:700;
}
.content > div[style*="background:#FDEDEC"] ul li strong{
  font-weight:600;
  color:var(--text);
}

/* — Skeleton — warm parchment shimmer (was cold teal) — */
.sk{background:rgba(231,225,212,0.55);}
.sk::after{
  background:linear-gradient(90deg,
    transparent 0%,
    rgba(197,160,94,0.20) 50%,
    transparent 100%);
}

/* — Login screen — warm-dark editorial gradient + brass ornament — */
#login-screen{
  background:
    radial-gradient(ellipse at 30% 20%, rgba(158,122,59,0.20) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(29,110,102,0.30) 0%, transparent 60%),
    linear-gradient(140deg, #1F1B14 0%, #2C2A23 45%, #15403B 100%);
}
.lcard{
  background:var(--surface);
  border-radius:14px;
  padding:44px 40px 36px;
  box-shadow:0 30px 80px rgba(20,15,10,0.45), inset 0 1px 0 rgba(255,255,255,0.6);
  position:relative;
  overflow:hidden;
}
.lcard::before{
  content:'';
  position:absolute;
  top:0;left:24px;right:24px;
  height:2px;
  background:linear-gradient(to right,
    transparent 0%,
    var(--brass) 50%,
    transparent 100%);
  opacity:0.5;
}
.llogo h1{
  font-family:var(--font-display);
  font-weight:400;
  font-style:italic;
  font-size:22px;
  letter-spacing:-0.01em;
  color:var(--teal-dark);
}
.llogo p{
  font-family:var(--font-body);
  font-size:10px;
  letter-spacing:0.20em;
  text-transform:uppercase;
  color:var(--brass-deep);
  margin-top:8px;
}
.fg label{
  font-family:var(--font-body);
  font-size:10px;
  letter-spacing:0.16em;
  text-transform:uppercase;
  font-weight:700;
  color:var(--brass-deep);
}
.fg input{
  font-family:var(--font-body);
  font-size:14px;
  border-radius:8px;
  padding:11px 14px;
  border:1px solid var(--border);
}
.fg input:focus{
  border-color:var(--teal);
  box-shadow:0 0 0 3px rgba(0,107,107,0.15);
}

/* — Page load: stagger reveal so it feels like a printed page assembling — */
@keyframes editorial-rise{
  0%{opacity:0;transform:translateY(6px);}
  100%{opacity:1;transform:translateY(0);}
}
@media (prefers-reduced-motion: no-preference){
  .content > .card,
  .content > .kpi,
  .content > div > .card,
  .content > div > .kpi,
  .content > .g2 > *,
  .content > .g3 > *,
  .content > .g4 > *,
  .content > .g5 > *{
    animation:editorial-rise 360ms cubic-bezier(0.22,1,0.36,1) both;
  }
  .content > .g2 > *:nth-child(1),
  .content > .g3 > *:nth-child(1),
  .content > .g4 > *:nth-child(1),
  .content > .g5 > *:nth-child(1){animation-delay:0ms;}
  .content > .g2 > *:nth-child(2),
  .content > .g3 > *:nth-child(2),
  .content > .g4 > *:nth-child(2),
  .content > .g5 > *:nth-child(2){animation-delay:40ms;}
  .content > .g2 > *:nth-child(3),
  .content > .g3 > *:nth-child(3),
  .content > .g4 > *:nth-child(3),
  .content > .g5 > *:nth-child(3){animation-delay:80ms;}
  .content > .g3 > *:nth-child(4),
  .content > .g4 > *:nth-child(4),
  .content > .g5 > *:nth-child(4){animation-delay:120ms;}
  .content > .g4 > *:nth-child(5),
  .content > .g5 > *:nth-child(5){animation-delay:160ms;}
}

/* — Selection color — brass instead of OS default — */
::selection{
  background:rgba(158,122,59,0.22);
  color:var(--text);
}

/* — Scrollbar — warm minimal — */
*::-webkit-scrollbar{width:10px;height:10px;}
*::-webkit-scrollbar-track{background:transparent;}
*::-webkit-scrollbar-thumb{
  background:rgba(107,98,86,0.25);
  border-radius:999px;
  border:2px solid var(--bg);
}
*::-webkit-scrollbar-thumb:hover{background:rgba(107,98,86,0.45);}

/* — Tabular figures everywhere numerics matter — */
.kpi-n,td,th,.tag,.nbadge,#tdate{
  font-variant-numeric:tabular-nums;
}

/* ─── Dashboard page header (editorial replacement for the teal-dark banner) ─── */
.dash-pageheader{
  display:flex;
  align-items:flex-end;            /* period stamp aligns to title baseline */
  justify-content:space-between;
  gap:24px;
  padding:2px 0 12px;
  margin-bottom:14px;
  border-bottom:1px solid var(--border);
  position:relative;
}
.dash-pageheader > div:first-child{flex:1;min-width:0;}
.dash-pageheader__period{align-self:flex-end;padding-bottom:3px;}
.dash-pageheader::after{
  content:'';
  position:absolute;
  left:0;
  bottom:-1px;
  width:64px;
  height:2px;
  background:linear-gradient(to right, var(--brass) 0%, var(--brass-soft) 60%, transparent 100%);
}
.dash-pageheader__eyebrow{
  font-family:var(--font-body);
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.20em;
  color:var(--brass-deep);
  margin-bottom:4px;
}
.dash-pageheader__title{
  font-family:var(--font-display);
  font-size:28px;
  font-weight:400;
  letter-spacing:-0.02em;
  color:var(--text);
  line-height:1.1;
}
.dash-pageheader__sub{
  font-family:var(--font-body);
  font-size:13px;
  color:var(--muted);
  margin-top:5px;
  line-height:1.5;
}
.dash-pageheader__sub:empty{display:none;}
.dash-pageheader__period{
  font-family:var(--font-display);
  font-style:italic;
  font-weight:400;
  font-size:16px;
  color:var(--brass-deep);
  letter-spacing:-0.01em;
  white-space:nowrap;
}

/* ─── HRCM Tracker tile — re-skinned to warm palette ─── */
/* The original .hrcm-cd-tile used cool slate ( #d0d7de border, #0f172a value,
   #64748b label) which fights the warm cream page. Overrides below adopt the
   editorial palette without changing the per-tile state classes. */
.hrcm-cd-tile{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55);
  padding:16px 18px;
}
.hrcm-cd-tile .label{
  font-family:var(--font-body);
  font-size:10.5px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.14em;
  color:var(--brass-deep);
}
.hrcm-cd-tile .value{
  font-family:var(--font-mono);
  font-feature-settings:'tnum' 1, 'zero' 1;
  font-size:28px;
  font-weight:500;
  letter-spacing:-0.02em;
  color:var(--text);
  margin-top:6px;
  line-height:1.05;
}
.hrcm-cd-tile.clickable:hover{
  border-color:var(--brass-soft);
  box-shadow:0 8px 20px rgba(74,60,40,0.10), inset 0 1px 0 rgba(255,255,255,0.6);
}
/* State dots — remap from cool tailwind tints to the warm semantic palette. */
.hrcm-cd-tile.urgent::after  { background:#B05F4C; }   /* terracotta */
.hrcm-cd-tile.priority::after{ background:#C08A3E; }   /* dusky amber */
.hrcm-cd-tile.outreach::after{ background:#9E7A3B; }   /* brass */
.hrcm-cd-tile.workload::after{ background:#7A6A8F; }   /* muted dust violet */
.hrcm-cd-tile.activity::after{ background:#547290; }   /* dusty blue */
.hrcm-cd-tile.hospice::after { background:#5E6F8A; }   /* slate-warm */
.hrcm-cd-tile.ontrack::after { background:#6E8A5C; }   /* sage */
.hrcm-cd-tile.neutral::after { background:var(--border-strong,#D2C9B5); }
.hrcm-cd-tile::after{ box-shadow:0 0 0 2px var(--surface) inset; }

/* The .hrcm-cd-section header (e.g. "Section 1 · HRCM Tier Strip") is
   already covered by the editorial .content h3 rule, but ensure the
   in-section h3 inherits even when scoped: */
.hrcm-cd-section > h3{
  font-family:var(--font-body);
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.16em;
  color:var(--brass-deep);
  margin:22px 0 12px;
  display:flex;
  align-items:center;
  gap:10px;
}
.hrcm-cd-section > h3::after{
  content:'';
  flex:1;
  height:1px;
  background:linear-gradient(to right, var(--brass-soft) 0%, transparent 60%);
  opacity:0.40;
}

/* Tracker chip row — was raw slate (#f1f5f9 / #475569). Warm them. */
.hrcm-chip,
button.hrcm-chip{
  background:rgba(231,225,212,0.45) !important;
  color:var(--brass-deep) !important;
  border:1px solid var(--border) !important;
  border-radius:999px !important;
  padding:5px 13px !important;
  font-family:var(--font-body) !important;
  font-size:11.5px !important;
  font-weight:600 !important;
  letter-spacing:0.02em !important;
  transition:background 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out !important;
}
.hrcm-chip:hover,
button.hrcm-chip:hover{
  background:rgba(158,122,59,0.10) !important;
  border-color:var(--brass-soft) !important;
  color:var(--brass) !important;
}

/* ─── HRCM topbar + legend — warm palette overrides ─── */
.hrcm-cd-topbar{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55);
  padding:11px 16px;
}
.hrcm-cd-topbar .freshness{color:var(--text);}
.hrcm-cd-topbar .freshness em{color:var(--muted);}
.hrcm-cd-topbar .ipa-select label{color:var(--muted);}
.hrcm-cd-topbar .ipa-select select{
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--bg-page,var(--bg));
  color:var(--text);
  padding:5px 12px;
  font-family:var(--font-body);
}
.hrcm-cd-topbar .inline-legend .pill{
  background:var(--bg-page,var(--bg));
  border:1px solid var(--border);
  color:var(--muted);
  font-family:var(--font-body);
  padding:3px 10px;
  border-radius:999px;
  letter-spacing:0.06em;
}
.hrcm-cd-topbar .inline-legend .pill.urgent  { color:#823F2E; border-color:rgba(176,95,76,0.30); background:rgba(176,95,76,0.07); }
.hrcm-cd-topbar .inline-legend .pill.urgent::before { background:#B05F4C; }
.hrcm-cd-topbar .inline-legend .pill.priority{ color:#6E5424; border-color:rgba(192,138,62,0.30); background:rgba(192,138,62,0.08); }
.hrcm-cd-topbar .inline-legend .pill.priority::before{ background:#C08A3E; }
.hrcm-cd-topbar .inline-legend .pill.outreach{ color:#6E5424; border-color:rgba(158,122,59,0.30); background:rgba(158,122,59,0.08); }
.hrcm-cd-topbar .inline-legend .pill.outreach::before{ background:#9E7A3B; }
.hrcm-cd-topbar .inline-legend .pill.workload{ color:#4E3F5E; border-color:rgba(122,106,143,0.30); background:rgba(122,106,143,0.08); }
.hrcm-cd-topbar .inline-legend .pill.workload::before{ background:#7A6A8F; }
.hrcm-cd-topbar .inline-legend .pill.activity{ color:#3A5269; border-color:rgba(84,114,144,0.30); background:rgba(84,114,144,0.08); }
.hrcm-cd-topbar .inline-legend .pill.activity::before{ background:#547290; }
.hrcm-cd-topbar .inline-legend .pill.hospice { color:#3F4D6B; border-color:rgba(94,111,138,0.30); background:rgba(94,111,138,0.08); }
.hrcm-cd-topbar .inline-legend .pill.hospice::before { background:#5E6F8A; }
.hrcm-cd-topbar .inline-legend .pill.ontrack { color:#4E6740; border-color:rgba(110,138,92,0.30); background:rgba(110,138,92,0.08); }
.hrcm-cd-topbar .inline-legend .pill.ontrack::before { background:#6E8A5C; }
.hrcm-cd-topbar .inline-legend .pill.neutral { color:var(--muted); border-color:var(--border); background:rgba(231,225,212,0.30); }
.hrcm-cd-topbar .inline-legend .pill.neutral::before { background:var(--border-strong,#D2C9B5); }
.hrcm-cd-topbar .jump-to-list{
  background:var(--teal);
  border-radius:8px;
  font-family:var(--font-body);
  padding:6px 14px;
  font-weight:600;
}
.hrcm-cd-topbar .jump-to-list:hover{ background:var(--teal-dark); }

/* Tracker legend chip row */
.hrcm-cd-legend .chip.urgent   { background:rgba(176,95,76,0.10); border-color:rgba(176,95,76,0.30); color:#823F2E; }
.hrcm-cd-legend .chip.priority { background:rgba(192,138,62,0.10); border-color:rgba(192,138,62,0.30); color:#6E5424; }
.hrcm-cd-legend .chip.ontrack  { background:rgba(110,138,92,0.10); border-color:rgba(110,138,92,0.30); color:#4E6740; }
.hrcm-cd-legend .chip{ border-radius:999px; padding:4px 12px; font-family:var(--font-body); }

/* ─── Care Plan landing — warm palette overrides ─── */
.cp-landing-hero{margin-bottom:18px;}
.cp-landing-hero h2{
  font-family:var(--font-display);
  font-weight:400;
  font-size:24px;
  letter-spacing:-0.02em;
  color:var(--text);
  /* hide the redundant emoji prefix that duplicates the topbar h1 */
}
/* The Care Plan renderer emits `<h2>🗂 Care Plan</h2>` which restates the topbar
   h1. The topbar already shows "Care Plan", so demote this to a subtitle anchor
   that doesn't shout. */
.cp-landing-hero h2{font-size:0;line-height:0;margin:0;}
.cp-landing-hero h2::before{
  content:'Workspace';
  font-size:11px;
  line-height:1;
  font-family:var(--font-body);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.18em;
  color:var(--brass-deep);
}
.cp-landing-sub{
  font-family:var(--font-body);
  font-size:13px;
  color:var(--muted);
  margin-top:6px;
}
.cp-landing-new{
  background:var(--teal);
  border-radius:8px;
  padding:10px 18px;
  font-weight:600;
  letter-spacing:0.01em;
  box-shadow:0 1px 2px rgba(0,107,107,0.18), inset 0 1px 0 rgba(255,255,255,0.15);
}
.cp-landing-new:hover{background:var(--teal-dark);transform:translateY(-1px);}

.cp-landing-stats{gap:14px;margin-bottom:16px;}
.cp-stat{
  background:var(--surface);
  border:0;
  border-left:3px solid rgba(0,107,107,0.30);
  border-radius:12px;
  padding:14px 16px;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55);
  gap:5px;
  position:relative;
  overflow:hidden;
}
.cp-stat-n{
  font-family:var(--font-mono);
  font-feature-settings:'tnum' 1, 'zero' 1;
  font-size:24px;
  font-weight:500;
  letter-spacing:-0.02em;
  color:var(--text);
  line-height:1.1;
}
.cp-stat-l{
  font-family:var(--font-body);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.14em;
  color:var(--muted);
  margin-top:3px;
}
/* Per-state rails — keep distinction, calm tones */
.cp-stat-neutral{border-left-color:rgba(107,98,86,0.45);}
.cp-stat-engaged{border-left-color:var(--brand-300,#5FB3B3);}
.cp-stat-sent   {border-left-color:#C5A05E;}
.cp-stat-signed {border-left-color:#6E8A5C;}

/* Care Plan toolbar — search + filter chips warmed */
.cp-landing-toolbar{margin-bottom:12px;gap:14px;}
.cp-landing-search{
  font-family:var(--font-body);
  padding:9px 14px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--surface);
  font-size:14px;
}
.cp-landing-search:focus{
  outline:none;
  border-color:var(--teal);
  box-shadow:0 0 0 3px rgba(0,107,107,0.15);
}
.cp-landing-filters .cp-filter-chip,
.cp-landing-filters button{
  font-family:var(--font-body);
  padding:7px 14px;
  border-radius:999px;
  font-weight:600;
  font-size:12px;
  letter-spacing:0.02em;
  transition:background 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
}

/* ─── AWE Status page — warm the hero + amber freshness banner ─── */
/* AWE freshness banner — saturated amber → calm warm-amber alert */
.content > div[style*="background:#fff5e6"][style*="border-left:4px solid #d68910"]{
  background:linear-gradient(to right, rgba(192,138,62,0.07), rgba(192,138,62,0.12)) !important;
  border-left:3px solid var(--brass) !important;
  border-radius:10px !important;
  padding:10px 14px !important;
  font-size:12.5px !important;
  line-height:1.6 !important;
  color:var(--text) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.55) !important;
}
.content > div[style*="background:#fff5e6"] strong{
  font-family:var(--font-display);
  font-style:italic;
  font-weight:500;
  font-size:13.5px;
  letter-spacing:-0.01em;
  color:var(--brass-deep);
  margin-right:4px;
}

/* AWE revenue tracker hero — saturated teal gradient → warm cream card */
.content > div[style*="background:linear-gradient(135deg,var(--teal-dark),var(--teal-mid))"]{
  background:linear-gradient(135deg, var(--surface) 0%, rgba(231,225,212,0.50) 100%) !important;
  color:var(--text) !important;
  border-radius:12px !important;
  padding:18px 22px !important;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55) !important;
  border-left:3px solid var(--brass) !important;
  position:relative !important;
}
.content > div[style*="background:linear-gradient(135deg,var(--teal-dark),var(--teal-mid))"] > div > div > div:first-child{
  color:var(--brass-deep) !important;
}
.content > div[style*="background:linear-gradient(135deg,var(--teal-dark),var(--teal-mid))"] [style*="font-size:28px"]{
  font-family:var(--font-mono) !important;
  font-feature-settings:'tnum' 1;
  color:var(--text) !important;
  letter-spacing:-0.02em;
}
.content > div[style*="background:linear-gradient(135deg,var(--teal-dark),var(--teal-mid))"] [style*="font-size:36px"]{
  font-family:var(--font-mono) !important;
  font-feature-settings:'tnum' 1;
  color:var(--text) !important;
  letter-spacing:-0.02em;
}
.content > div[style*="background:linear-gradient(135deg,var(--teal-dark),var(--teal-mid))"] [style*="opacity:.5"],
.content > div[style*="background:linear-gradient(135deg,var(--teal-dark),var(--teal-mid))"] [style*="opacity:.6"],
.content > div[style*="background:linear-gradient(135deg,var(--teal-dark),var(--teal-mid))"] [style*="opacity:.7"]{
  opacity:1 !important;
  color:var(--muted) !important;
}
.content > div[style*="background:linear-gradient(135deg,var(--teal-dark),var(--teal-mid))"] [style*="background:rgba(255,255,255,.15)"]{
  background:rgba(107,98,86,0.15) !important;
}
.content > div[style*="background:linear-gradient(135deg,var(--teal-dark),var(--teal-mid))"] [style*="background:#27AE60"]{
  background:var(--sage-500,#6E8A5C) !important;
}

/* AWE Total Revenue Potential KPI — bright blue → warm brass */
.kpi.blue[style*="border-left-color:#60A5FA"]{
  border-left-color:var(--brass) !important;
}
.kpi.blue [style*="color:#60A5FA"]{
  color:var(--brass-deep) !important;
}

/* ─── Modal field defaults (2026-05-26 inline-style sweep) ─── */
/* After stripping `style="font-size:12px;font-weight:700;color:var(--teal-dark)"`
   from 38 modal labels and `style="width:100%;border:1.5px solid..."` from 20
   inputs/textareas in index.html, the rules below provide the new baseline. */
.mbody label{
  display:block;
  font-family:var(--font-body);
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.14em;
  color:var(--brass-deep);
  margin-bottom:6px;
  margin-top:2px;
  line-height:1.3;
}
.mbody .fg{margin-bottom:14px;}
.mbody input[type="text"],
.mbody input[type="number"],
.mbody input[type="email"],
.mbody input[type="tel"],
.mbody input[type="date"],
.mbody input:not([type]),
.mbody select,
.mbody textarea{
  width:100%;
  padding:9px 12px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--surface);
  color:var(--text);
  font-family:var(--font-body);
  font-size:14px;
  line-height:1.45;
  transition:border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.mbody textarea{
  resize:vertical;
  min-height:80px;
  line-height:1.55;
}
.mbody input::placeholder,
.mbody textarea::placeholder{color:#B5AB95;}
.mbody input:focus,
.mbody select:focus,
.mbody textarea:focus{
  outline:none;
  border-color:var(--teal);
  box-shadow:0 0 0 3px rgba(0,107,107,0.15);
}
/* Vitals modal — small spinbutton inputs sit in a 2-col grid */
.mbody div[style*="grid-template-columns:1fr 1fr"] input{
  padding:7px 10px;
  font-size:13px;
}
/* Inline section headers like `📅 ENTRY INFO` / `🩺 VITAL SIGNS` */
.mbody > div > div > div[style*="text-transform:uppercase"]{
  font-family:var(--font-body) !important;
  color:var(--brass-deep) !important;
  font-size:11px !important;
  letter-spacing:0.14em !important;
  margin-bottom:12px !important;
}

/* ─── Sync alert (replaces the inline `background:#FDEDEC` wall) ─── */
/* Compact <details> element — default-closed one-liner with chevron.
   Click to expand and see per-source detail. */
.sync-alert{
  display:block;
  margin-bottom:12px;
  border-radius:10px;
  background:linear-gradient(to right, rgba(192,138,62,0.06), rgba(192,138,62,0.10));
  border-left:3px solid var(--brass);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.55);
  font-family:var(--font-body);
  font-size:13px;
  color:var(--text);
  overflow:hidden;
  transition:background 200ms ease-out;
}
.sync-alert--critical{
  background:linear-gradient(to right, rgba(176,95,76,0.07), rgba(176,95,76,0.13));
  border-left-color:var(--brass-deep);
}
.sync-alert__summary{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 14px;
  cursor:pointer;
  list-style:none;
  user-select:none;
  outline:none;
}
.sync-alert__summary::-webkit-details-marker{display:none;}
.sync-alert__summary:hover{background:rgba(255,255,255,0.20);}
.sync-alert__icon{
  font-size:14px;
  color:var(--brass-deep);
  line-height:1;
  width:18px;
  text-align:center;
}
.sync-alert--critical .sync-alert__icon{color:#823F2E;}
.sync-alert__headline{
  font-family:var(--font-display);
  font-style:italic;
  font-weight:500;
  font-size:14px;
  letter-spacing:-0.01em;
  color:var(--text);
}
.sync-alert--critical .sync-alert__headline{color:#823F2E;}
.sync-alert__count{
  margin-left:auto;
  font-family:var(--font-body);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.10em;
  color:var(--muted);
  padding:2px 10px;
  background:rgba(255,255,255,0.50);
  border-radius:999px;
}
.sync-alert__chevron{
  font-size:18px;
  color:var(--muted);
  transition:transform 220ms cubic-bezier(0.22,1,0.36,1);
  line-height:1;
}
.sync-alert[open] .sync-alert__chevron{transform:rotate(90deg);}
.sync-alert__list{
  list-style:none;
  margin:0;
  padding:6px 14px 12px 42px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:2px 18px;
  border-top:1px solid rgba(110,84,36,0.10);
  background:rgba(255,255,255,0.30);
}
.sync-alert__list li{
  display:flex;
  flex-direction:column;
  padding:6px 0;
  font-size:12.5px;
  line-height:1.5;
  position:relative;
}
.sync-alert__list li::before{
  content:'·';
  position:absolute;
  left:-14px;
  top:6px;
  color:var(--brass);
  font-weight:700;
  font-size:14px;
}
.sync-alert__type{
  font-family:var(--font-body);
  font-weight:600;
  color:var(--text);
  font-size:13px;
}
.sync-alert__date{
  font-family:var(--font-body);
  color:var(--muted);
  font-size:11.5px;
  margin-top:0;
  letter-spacing:0;
}

/* ─── Worklist tier badges + CCI buckets — warm palette remap ─── */
/* Originals (lines 1181–1220) used saturated tailwind tints
   (#fef2f2/#991b1b, #fff7ed/#9a3412, etc). Override to the warm semantic palette
   so the row stops shouting. */
.tier-urgent  {background:rgba(176,95,76,0.10) !important;border-color:rgba(176,95,76,0.35) !important;color:#823F2E !important;}
.tier-urgent::before  {background:#B05F4C !important;}
.tier-priority{background:rgba(192,138,62,0.12) !important;border-color:rgba(192,138,62,0.35) !important;color:#6E5424 !important;}
.tier-priority::before{background:#C08A3E !important;}
.tier-monitor {background:rgba(84,114,144,0.10) !important;border-color:rgba(84,114,144,0.30) !important;color:#3A5269 !important;}
.tier-monitor::before {background:#547290 !important;}
.tier-strong  {background:rgba(94,111,138,0.10) !important;border-color:rgba(94,111,138,0.30) !important;color:#3F4D6B !important;}
.tier-strong::before  {background:#5E6F8A !important;}
.tier-consider{background:rgba(122,106,143,0.10) !important;border-color:rgba(122,106,143,0.30) !important;color:#4E3F5E !important;}
.tier-consider::before{background:#7A6A8F !important;}
.tier-engaged {background:rgba(110,138,92,0.10) !important;border-color:rgba(110,138,92,0.30) !important;color:#4E6740 !important;}
.tier-engaged::before {background:#6E8A5C !important;}

.tier{
  font-family:var(--font-body) !important;
  font-size:10.5px !important;
  font-weight:600 !important;
  letter-spacing:0.08em !important;
  text-transform:uppercase !important;
  border-radius:999px !important;
  padding:3px 9px !important;
}

/* CCI bucket pills (Low/Moderate/High/Very High) — calm + secondary */
.cci-bucket{
  background:transparent !important;
  border:none !important;
  font-family:var(--font-body) !important;
  font-size:10.5px !important;
  font-weight:600 !important;
  letter-spacing:0.05em !important;
  padding:0 0 0 12px !important;
  position:relative !important;
}
.cci-bucket::before{
  position:absolute !important;
  left:0 !important;
  top:50% !important;
  margin-top:-3px !important;
  width:6px !important;
  height:6px !important;
  border-radius:50% !important;
}
.cci-low  {color:#4E6740 !important;}     .cci-low::before  {background:#6E8A5C !important;}
.cci-mod  {color:#6E5424 !important;}     .cci-mod::before  {background:#C08A3E !important;}
.cci-high {color:#823F2E !important;}     .cci-high::before {background:#B05F4C !important;}
.cci-vhigh{color:#823F2E !important;}     .cci-vhigh::before{background:#B05F4C !important;}

/* Score numbers ("19", "6") next to tier badges — quieten via .meta inline */
.hrcm-table .meta{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
  margin-left:4px;
}

/* RAF + util columns — use mono numerals + label-above pattern */
.hrcm-table .col-raf{
  font-family:var(--font-mono);
  font-feature-settings:'tnum' 1;
  font-size:14px;
  font-weight:500;
  color:var(--text);
}
.hrcm-table .col-util{
  font-family:var(--font-mono);
  font-feature-settings:'tnum' 1;
  font-size:13px;
  color:var(--muted);
}
.hrcm-table .col-cci{
  font-family:var(--font-mono);
  font-feature-settings:'tnum' 1;
  font-size:14px;
  color:var(--text);
}

/* Header cells in worklist table — softer brass small caps */
.hrcm-table thead th{
  background:var(--sand) !important;   /* was rgba(...,0.40) translucent — headers must read solid */
  color:var(--brass-deep) !important;
  font-family:var(--font-body) !important;
  font-size:10px !important;
  font-weight:700 !important;
  letter-spacing:0.16em !important;
  text-transform:uppercase !important;
  padding:11px 12px !important;
  border-bottom:1px solid var(--border) !important;
}

/* Row hover + active row */
.hrcm-table tbody tr{transition:background 120ms ease-out;}
.hrcm-table tbody tr:hover{background:rgba(158,122,59,0.04) !important;}
.hrcm-table tbody tr:hover td:first-child{border-left-color:rgba(158,122,59,0.45) !important;}
.hrcm-table tbody tr.row-active{background:rgba(0,107,107,0.06) !important;}
.hrcm-table tbody tr.row-active td:first-child{border-left-color:var(--teal) !important;}

/* Member cell typography */
.hrcm-table .col-member{
  font-family:var(--font-body);
  font-size:13.5px;
  font-weight:600;
  color:var(--text);
  line-height:1.3;
}
.hrcm-table .col-num{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
}

/* ─── Eligibility lookup page — tighter form rhythm ─── */
.content > div:has(> input[id^="elig-"]),
.content form{margin-bottom:14px;}
/* Admin Users — pull row spacing tighter, warm the action buttons */
.content table th{font-size:10.5px;letter-spacing:0.14em;}
/* Tiny "Reset PW" / "Disable" inline buttons on admin pages */
button.btn[onclick*="resetPassword"],
button.btn[onclick*="disable"],
button.btn[onclick*="enable"]{
  padding:5px 10px;
  font-size:11.5px;
  border-radius:6px;
}
button.btn[style*="background:var(--red)"],
button.btn[style*="background:#C0392B"]{
  background:var(--terra-500,#B05F4C) !important;
  color:#FFFCF7 !important;
}
button.btn[style*="background:var(--red)"]:hover,
button.btn[style*="background:#C0392B"]:hover{
  background:#823F2E !important;
}

/* ─── Eligibility KPI tiles — ensure tight rhythm ─── */
.content > .g3{gap:14px;}

/* ─── Member Eligibility Lookup card — Fraunces section header ─── */
.content .card-hdr .card-title,
.content > .card > .card-hdr > .card-title{
  font-family:var(--font-display);
  font-size:16px;
  font-weight:500;
  letter-spacing:-0.01em;
}

/* Admin freshness/info banners — same compact treatment as sync alert */
.content > div[style*="background:#EBF5FB"]{
  background:linear-gradient(to right, rgba(84,114,144,0.06), rgba(84,114,144,0.10)) !important;
  border-left:3px solid #547290 !important;
  border-radius:10px !important;
  padding:10px 14px !important;
  font-size:12.5px !important;
  line-height:1.55 !important;
  color:var(--text) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.55) !important;
}

/* IPA-badge in topbar — already styled; ensure consistent vertical centering */
.topbar .tr{align-items:center;}

/* Scroll behavior — smooth + warm scrollbar inside scrollable containers */
.content,
.mbody,
#sidebar{
  scroll-behavior:smooth;
  scrollbar-width:thin;
  scrollbar-color:rgba(107,98,86,0.30) transparent;
}

/* ═══════════════════════════════════════════════════════════════════════════
   POLISH ROUND 4 — 2026-05-26
   Hide sidebar scrollbar, unify hover/click feedback, sweep remaining tables.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Sidebar: hide scrollbar entirely while keeping scroll behavior ─── */
#sidebar{
  scrollbar-width:none;          /* Firefox */
  -ms-overflow-style:none;       /* IE 10+ */
}
#sidebar::-webkit-scrollbar{
  width:0;
  height:0;
  display:none;                  /* WebKit */
}

/* ─── Unified interactive feedback ─── */
/* Press state (active) on all clickable surfaces */
.btn:active,
.kpi:active,
.cp-stat:active,
.hrcm-cd-tile:active,
.nav-item:active{
  transform:translateY(0);
  transition:transform 80ms ease-out;
}

/* Click ripple-like flash on cards/tiles using box-shadow timing */
.kpi:hover,
.hrcm-cd-tile.clickable:hover,
.cp-stat:hover{
  transition:box-shadow 200ms cubic-bezier(0.22,1,0.36,1),
              transform 200ms cubic-bezier(0.22,1,0.36,1),
              border-color 200ms cubic-bezier(0.22,1,0.36,1);
}
.kpi:active{transform:translateY(0) scale(0.998);transition-duration:80ms;}

/* All buttons get a subtle "pressed" feedback */
button:not(:disabled):active{transition-duration:80ms;}

/* Links — consistent brass-underline hover treatment app-wide */
a{
  color:var(--teal);
  text-decoration:none;
  transition:color 150ms ease-out, text-decoration-color 150ms ease-out;
}
a:hover{
  color:var(--brass-deep);
  text-decoration:underline;
  text-decoration-color:var(--brass-soft);
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}

/* "Open ›" style action links in worklist/care-plan tables — warm them */
td a,
td button.btn-link,
td span[onclick]{
  color:var(--brass-deep);
  font-weight:600;
  font-size:12.5px;
  cursor:pointer;
  transition:color 150ms ease-out;
}
td a:hover,
td button.btn-link:hover,
td span[onclick]:hover{
  color:var(--teal);
}

/* ─── Tables — full unification (Admin Users / Provider Profiles / etc.) ─── */
/* The base `table` rules (line ~135) already warm headers; this block ensures
   ANY table in .content adopts the editorial rhythm consistently. */
.content table,
.content .card table{
  border-collapse:separate;
  border-spacing:0;
}
.content table thead th{
  background:rgba(231,225,212,0.40);
  color:var(--brass-deep);
  font-family:var(--font-body);
  font-size:10.5px;
  font-weight:700;
  letter-spacing:0.16em;
  text-transform:uppercase;
  padding:11px 14px;
  border-bottom:1px solid var(--border);
}
.content table thead th:first-child{padding-left:18px;}
.content table thead th:last-child{padding-right:18px;}
.content table tbody td{
  padding:12px 14px;
  font-family:var(--font-body);
  font-size:13.5px;
  color:var(--text);
  vertical-align:middle;
  border-bottom:1px solid rgba(231,225,212,0.55);
  transition:background 120ms ease-out;
}
.content table tbody td:first-child{padding-left:18px;}
.content table tbody td:last-child{padding-right:18px;}
.content table tbody tr{transition:background 120ms ease-out;}
.content table tbody tr:hover{background:rgba(158,122,59,0.04);}
.content table tbody tr:last-child td{border-bottom:0;}

/* Numeric-looking columns get DM Mono treatment */
.content table td:has(> span.kpi-n),
.content table .num,
.content table .col-id{
  font-family:var(--font-mono);
  font-feature-settings:'tnum' 1;
}

/* Status pills inside table cells — gentle */
.content table td .tag,
.content table td .pill,
.content table td .badge,
.content table td .ipa-badge{
  font-size:10.5px;
  letter-spacing:0.08em;
  padding:3px 9px;
  border-radius:999px;
  font-weight:600;
  white-space:nowrap;
}

/* "Status: ACTIVE" pill on Admin Users page — green-tinted but small */
.content table td span[style*="background:var(--green-light)"],
.content table td span[style*="background:#EAFAF1"]{
  background:rgba(110,138,92,0.12) !important;
  color:#4E6740 !important;
  font-size:10.5px !important;
  font-weight:600 !important;
  letter-spacing:0.08em !important;
  text-transform:uppercase !important;
  padding:3px 10px !important;
  border-radius:999px !important;
}

/* IPA pill in admin table (#ALL IPAS, NCPG, PPC etc.) — warm slate stone.
   Targeted specifically at .ipa-badge / .ipa-pill; previously the looser
   selector span[class*="ipa"] was catching .ipa-name / .ipa-pcp inside the
   Worklist .ipa-stacked column and giving those spans a stone-pill bg. */
.content table td .ipa-badge,
.content table td span.ipa-pill,
.content table td span.ipa-tag{
  background:rgba(231,225,212,0.55);
  color:var(--brass-deep);
  border:1px solid var(--border);
}
/* Explicitly transparent for the .ipa-stacked text spans (no pill bg). */
.content table td .ipa-stacked .ipa-name,
.content table td .ipa-stacked .ipa-pcp{
  background:transparent !important;
  border:0 !important;
  padding:0 !important;
}

/* Per-row actions cell — keep buttons aligned + compact horizontally */
.content table td:last-child .btn{margin-left:4px;}
.content table td:last-child .btn:first-child{margin-left:0;}

/* Inline "Reset PW" / "Disable" / "Enable" small action buttons */
button.btn-sm[onclick*="resetPassword"],
button.btn-sm[onclick*="toggleUser"]{
  font-size:11.5px;
  padding:5px 10px;
  border-radius:6px;
  font-weight:600;
  letter-spacing:0.02em;
}

/* ─── Form select chevron — replace OS native with warm subtle marker ─── */
select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%236E5424' stroke-width='1.5' stroke-linecap='round' d='M1 1l4 4 4-4'/></svg>");
  background-repeat:no-repeat;
  background-position:right 12px center;
  padding-right:32px !important;
}
.mbody select,
.fg select,
select[onchange]{padding-right:32px !important;}

/* Native chevron OS-side gets blocked; ours is consistent. */

/* ─── Modal close (✕) — refine ─── */
.mx{
  width:28px;
  height:28px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  color:var(--muted);
  background:transparent;
  transition:background 150ms ease-out, color 150ms ease-out, transform 200ms cubic-bezier(0.22,1,0.36,1);
}
.mx:hover{
  background:rgba(176,95,76,0.10);
  color:#823F2E;
  transform:rotate(90deg);
}

/* ─── Topbar IPA pill — tap-target sizing ─── */
.ipa-badge{cursor:default;}

/* ─── Search input — unified style across pages ─── */
input[type="search"],
input[id*="search"],
input[placeholder*="Search"]{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='none' stroke='%236B6256' stroke-width='1.75' stroke-linecap='round'><circle cx='7' cy='7' r='5'/><path d='M11 11l3 3'/></svg>");
  background-repeat:no-repeat;
  background-position:12px center;
  padding-left:36px !important;
}

/* ─── Pagination + footer toolbars ─── */
.hrcm-list-footer,
.pagination{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px 14px;
  font-size:12px;
  color:var(--muted);
  font-family:var(--font-body);
  box-shadow:var(--sh);
}

/* ─── Tab badges (e.g. "Worklist 725") — calm cream pill ─── */
.tab-badge,
button .tab-badge{
  background:rgba(231,225,212,0.65);
  color:var(--brass-deep);
  font-family:var(--font-mono);
  font-size:10.5px;
  font-weight:500;
  padding:2px 8px;
  border-radius:999px;
  margin-left:6px;
  letter-spacing:0;
  font-variant-numeric:tabular-nums;
}
.tab-badge.zero{background:rgba(231,225,212,0.40);color:var(--muted);}

/* ─── AWE form — editorial polish ─── */
/* The 10-section AWE form (RENDERERS['awe-form']) renders as a stack of
   .awesec collapsible cards. Repaint to match the warm card system. */
.awesec{
  border:0 !important;
  border-left:3px solid var(--border) !important;
  border-radius:12px !important;
  margin-bottom:12px !important;
  background:var(--surface);
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55);
  overflow:hidden;
  transition:border-color 200ms cubic-bezier(0.22,1,0.36,1),
              box-shadow 200ms cubic-bezier(0.22,1,0.36,1);
}
.awesec:hover{border-left-color:var(--brass-soft) !important;}
.awesec[data-complete="true"]{border-left-color:var(--sage-500,#6E8A5C) !important;}

.awehdr{
  background:linear-gradient(to right, rgba(231,225,212,0.40), rgba(231,225,212,0.20)) !important;
  color:var(--text) !important;
  border-bottom:1px solid var(--border) !important;
  padding:13px 18px !important;
  font-family:var(--font-display) !important;
  font-size:15px !important;
  font-weight:500 !important;
  font-style:normal !important;
  letter-spacing:-0.01em !important;
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  align-items:center;
  position:relative;
  transition:background 150ms ease-out;
}
.awehdr:hover{background:linear-gradient(to right, rgba(158,122,59,0.10), rgba(231,225,212,0.30)) !important;}
.awehdr > span:last-child{
  color:var(--brass-deep);
  font-size:11px;
  transition:transform 220ms cubic-bezier(0.22,1,0.36,1);
}
.awesec.collapsed .awehdr > span:last-child,
.awebody[style*="display:none"] + .awehdr > span:last-child,
.awebody[style*="display: none"] + .awehdr > span:last-child{transform:rotate(-90deg);}

/* The badge in section header — recolor from inline `background: var(--red)` to
   warm semantic. (the `style="background:...;color:#fff"` inline survives, but
   we override common cases) */
.awehdr span[style*="background:var(--red)"],
.awehdr span[style*="background:#"]{
  background:rgba(176,95,76,0.12) !important;
  color:#823F2E !important;
  border-radius:999px !important;
  padding:2px 10px !important;
  font-family:var(--font-body) !important;
  font-size:10.5px !important;
  font-weight:600 !important;
  letter-spacing:0.08em !important;
  text-transform:uppercase !important;
}
.awehdr span[style*="background:var(--gold)"]{
  background:rgba(192,138,62,0.14) !important;
  color:#6E5424 !important;
}
.awehdr span[style*="background:var(--green)"]{
  background:rgba(110,138,92,0.14) !important;
  color:#4E6740 !important;
}

.awebody{
  padding:18px 20px !important;
  background:var(--surface);
}

/* AWE form draft banner (#E3F2FD light-blue inline) — warm it */
#awe-draft-banner,
[id="awe-draft-banner"]{
  background:linear-gradient(to right, rgba(84,114,144,0.07), rgba(84,114,144,0.12)) !important;
  border-left:3px solid var(--brass-soft) !important;
  border-radius:10px !important;
  padding:10px 16px !important;
  font-family:var(--font-body) !important;
  font-size:12.5px !important;
  margin-bottom:14px !important;
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:var(--text) !important;
}
#awe-draft-status{
  font-family:var(--font-display);
  font-style:italic;
  font-weight:500;
  font-size:13.5px;
  letter-spacing:-0.01em;
  color:var(--text);
}
#awe-autosave-indicator{
  font-family:var(--font-body);
  font-size:11px !important;
  color:var(--muted) !important;
  text-transform:uppercase;
  letter-spacing:0.10em;
  font-weight:600;
}

/* AWE form header row — title + buttons */
#awe-form-wrap > div[style*="justify-content:space-between"]:nth-child(2),
#awe-form-wrap > div[style*="justify-content:space-between"]:nth-child(3){
  align-items:flex-end !important;
}
#awe-form-wrap > div[style*="justify-content:space-between"] > div > div[style*="font-size:18px"]{
  font-family:var(--font-display) !important;
  font-weight:500 !important;
  font-size:24px !important;
  letter-spacing:-0.02em !important;
}
#awe-form-wrap > div[style*="justify-content:space-between"] > div > div[style*="color:var(--muted)"]{
  font-family:var(--font-body) !important;
  font-size:11px !important;
  text-transform:uppercase !important;
  letter-spacing:0.16em !important;
  color:var(--brass-deep) !important;
  margin-top:4px !important;
}

/* AWE form: text inputs / selects / textareas inside .awebody share a baseline */
.awebody input[type="text"],
.awebody input[type="number"],
.awebody input[type="date"],
.awebody input:not([type]),
.awebody select,
.awebody textarea{
  font-family:var(--font-body);
  font-size:14px;
  color:var(--text);
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:8px;
  padding:8px 12px;
  width:100%;
  transition:border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.awebody input:focus,
.awebody select:focus,
.awebody textarea:focus{
  outline:none;
  border-color:var(--teal);
  box-shadow:0 0 0 3px rgba(0,107,107,0.15);
}
.awebody label,
.awebody .cbi{
  font-family:var(--font-body);
  font-size:12.5px;
  color:var(--text);
  line-height:1.5;
}
.awebody > div > label,
.awebody > div > strong,
.awebody > strong{
  font-family:var(--font-body);
  font-size:11px !important;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.14em;
  color:var(--brass-deep);
  display:block;
  margin-bottom:6px;
  margin-top:6px;
}

/* Two-column checkbox grid (.cbgrid) — clean borders + warm hover */
.cbgrid{
  gap:6px 14px !important;
  padding:6px 0;
}
.cbi{
  display:flex;
  align-items:center;
  gap:8px;
  padding:5px 8px;
  border-radius:6px;
  cursor:pointer;
  transition:background 120ms ease-out;
}
.cbi:hover{background:rgba(158,122,59,0.06);}
.cbi input[type="checkbox"]{
  width:14px;
  height:14px;
  accent-color:var(--teal);
}

/* AWE form: form footer button group */
.awebody button.btn,
.awebody button{
  font-family:var(--font-body);
}

/* PA section header used in PA modal — same brass treatment */
.pasec{
  background:var(--sand) !important;   /* was rgba(...,0.40) translucent — headers must read solid */
  color:var(--brass-deep) !important;
  font-family:var(--font-body) !important;
  font-size:10.5px !important;
  font-weight:700 !important;
  letter-spacing:0.16em !important;
  text-transform:uppercase !important;
  border-left:2px solid var(--brass) !important;
  border-radius:8px !important;
  padding:8px 12px !important;
  margin:16px 0 10px !important;
}

/* ─── AWE form RAF calculator footer (#raf-calculator-bar) ─── */
/* Was dark navy gradient (linear-gradient(135deg,#1a237e,#283593)) — re-skin
   via id selector so we don't have to touch the renderer. */
#raf-calculator-bar{
  background:linear-gradient(135deg, #2C2A23 0%, #3A372E 100%) !important;
  color:#F3EEE5 !important;
  font-family:var(--font-body) !important;
  border-top:1px solid rgba(158,122,59,0.30) !important;
  box-shadow:0 -8px 24px rgba(74,60,40,0.18) !important;
}
#raf-calculator-bar > *{
  font-family:var(--font-body);
  font-variant-numeric:tabular-nums;
  letter-spacing:0.02em;
}
#raf-calculator-bar strong,
#raf-calculator-bar b,
#raf-calculator-bar [style*="font-weight"]{
  color:var(--brass-soft) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   POLISH ROUND 5 — 2026-05-26
   Care Plan workspace warm-palette adoption + dedupe back-link + speed-up.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Care Plan workspace — re-skin internal palette tokens ─── */
.cp-page{
  --cp-card-bg:var(--surface);
  --cp-border:var(--border);
  --cp-border-strong:var(--border-strong,#D2C9B5);
  --cp-muted:var(--muted);
  --cp-text:var(--text);
  --cp-accent:var(--teal);
  font-family:var(--font-body);
  font-size:14px;
}
.cp-page h2{
  font-family:var(--font-display);
  font-weight:500;
  font-size:22px;
  letter-spacing:-0.02em;
  margin:0;
}
.cp-header{
  background:linear-gradient(180deg, var(--surface) 0%, rgba(231,225,212,0.30) 100%) !important;
  border:0 !important;
  border-radius:12px !important;
  padding:16px 18px !important;
  margin:0 0 14px !important;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55) !important;
}
.cp-header-meta{font-size:11.5px;color:var(--muted) !important;}
.cp-header-meta strong{color:var(--text);font-weight:600;}
.cp-save-state{
  font-size:10.5px;
  color:var(--brass-deep) !important;
  background:rgba(231,225,212,0.55) !important;
  border:1px solid var(--border) !important;
  border-radius:999px !important;
  padding:3px 10px !important;
  letter-spacing:0.08em;
  text-transform:uppercase;
  font-weight:600;
}

/* Care Plan tab bar — warm + brass underline */
.cp-tabbar{
  background:var(--surface) !important;
  border-bottom:1px solid var(--border) !important;
  border-radius:10px 10px 0 0 !important;
  padding:0 6px !important;
  position:sticky !important;
  top:60px !important;        /* matches new 60px topbar */
  z-index:5;
  box-shadow:none !important;
}
.cp-tabbar button{
  background:transparent !important;
  font-family:var(--font-body) !important;
  font-size:13px !important;
  font-weight:500 !important;
  color:var(--muted) !important;
  border:0 !important;
  border-bottom:2px solid transparent !important;
  padding:12px 14px !important;
  margin-bottom:-1px !important;
  letter-spacing:0.01em;
  transition:color 200ms ease-out, border-color 200ms cubic-bezier(0.22,1,0.36,1) !important;
  position:relative;
}
.cp-tabbar button:hover{color:var(--text) !important;background:transparent !important;}
.cp-tabbar button.active{
  color:var(--text) !important;
  font-weight:600 !important;
  border-bottom-color:var(--brass) !important;
  background:transparent !important;
}
.cp-tabbar button.locked,
.cp-tabbar button[aria-disabled="true"]{
  color:var(--muted) !important;
  opacity:0.50;
}
.cp-tab-lock{color:var(--brass-soft);}

/* Rainbow rail colors on .cp-rail cards — flatten to brass */
.cp-rail .hrcm-card:nth-child(1),
.cp-rail .hrcm-card:nth-child(2),
.cp-rail .hrcm-card:nth-child(3),
.cp-rail .hrcm-card:nth-child(4),
.cp-rail .hrcm-card:nth-child(5),
.cp-rail .hrcm-card:nth-child(6),
.cp-rail .hrcm-card:nth-child(7){
  border-left-color:rgba(158,122,59,0.45) !important;
  background:var(--surface);
  border-color:var(--border);
  border-radius:12px;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55);
}
.cp-rail .hrcm-card > div:first-child{
  font-family:var(--font-body) !important;
  color:var(--brass-deep) !important;
  font-size:10.5px !important;
  letter-spacing:0.16em !important;
}

.cp-main .hrcm-card{
  background:var(--surface) !important;
  border:0 !important;
  border-radius:12px !important;
  padding:18px 20px !important;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55);
}
.cp-main .hrcm-card > div:first-child[style*="font-weight:700"]{
  font-family:var(--font-display) !important;
  font-size:15px !important;
  font-weight:500 !important;
  letter-spacing:-0.01em !important;
  color:var(--text) !important;
  border-bottom:1px solid var(--border) !important;
}

/* Profile drawer chip bar */
.cp-profile-bar{
  background:linear-gradient(to right, rgba(231,225,212,0.40), rgba(231,225,212,0.20)) !important;
  border:0 !important;
  border-left:3px solid var(--brass-soft) !important;
  border-radius:10px !important;
  padding:10px 16px !important;
  font-family:var(--font-body) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.55);
}
.cp-profile-bar .cp-profile-chips strong{color:var(--text);}
.cp-profile-bar .cp-profile-toggle{
  color:var(--brass-deep) !important;
  font-weight:600;
}
.cp-profile-bar .cp-profile-toggle:hover{background:rgba(158,122,59,0.10) !important;}

/* Notes pane — warm dotted divider, brass chips */
.cp-notes-tab{
  border-top:1px dashed var(--brass-soft) !important;
  opacity:0.95;
}
.cp-notes-tab .cp-notes-head-title{
  color:var(--brass-deep) !important;
  font-family:var(--font-body) !important;
  letter-spacing:0.14em;
}
.cp-notes-tab .cp-notes-count{
  background:rgba(231,225,212,0.65) !important;
  color:var(--brass-deep) !important;
  font-family:var(--font-mono);
  font-variant-numeric:tabular-nums;
}
.cp-notes-tab details.cp-notes-composer-wrap summary{
  color:var(--brass-deep) !important;
  background:rgba(231,225,212,0.30) !important;
  border-color:var(--border) !important;
  border-radius:8px !important;
  font-family:var(--font-body);
}
.cp-notes-tab details.cp-notes-composer-wrap summary:hover{
  background:rgba(158,122,59,0.10) !important;
}
.cp-notes-tab .cp-notes-composer{
  border:1px solid var(--border) !important;
  border-radius:10px !important;
  background:var(--surface);
}
.cp-notes-tab .cp-notes-composer textarea{
  border:1px solid var(--border) !important;
  border-radius:8px !important;
  font-family:var(--font-body) !important;
  background:var(--surface);
}
.cp-notes-tab .cp-notes-composer textarea:focus{
  border-color:var(--teal) !important;
  box-shadow:0 0 0 3px rgba(0,107,107,0.15) !important;
}
.cp-notes-tab .cp-notes-filterbar .cp-chip{
  background:rgba(231,225,212,0.55) !important;
  color:var(--brass-deep) !important;
  border:1px solid var(--border) !important;
  border-radius:999px !important;
  padding:4px 11px !important;
  font-family:var(--font-body);
}
.cp-notes-tab .cp-notes-filterbar .cp-chip:hover{
  background:rgba(158,122,59,0.10) !important;
  border-color:var(--brass-soft) !important;
}
.cp-notes-tab .cp-notes-filterbar .cp-chip.active{
  background:var(--teal) !important;
  color:#FFFCF7 !important;
  border-color:var(--teal) !important;
}
.cp-notes-tab .cp-notes-item{
  border-bottom:1px solid rgba(231,225,212,0.55) !important;
  padding:10px 4px !important;
}
.cp-notes-tab .cp-notes-item .cp-notes-src{
  background:rgba(84,114,144,0.10) !important;
  color:#3A5269 !important;
  font-family:var(--font-body);
  letter-spacing:0.04em;
}
.cp-notes-tab .cp-notes-item .cp-notes-src.concierge{
  background:rgba(192,138,62,0.14) !important;
  color:#6E5424 !important;
}
.cp-notes-tab .cp-notes-item .cp-notes-src.intervention{
  background:rgba(110,138,92,0.12) !important;
  color:#4E6740 !important;
}
.cp-notes-tab .cp-notes-item .cp-notes-body-text{color:var(--text) !important;}
.cp-notes-tab .cp-notes-item .cp-notes-secondary{
  background:rgba(231,225,212,0.40) !important;
  color:var(--text) !important;
}
.cp-notes-tab .cp-notes-item .cp-notes-meta{color:var(--muted) !important;}
.cp-notes-tab .cp-notes-item .cp-notes-open-btn{
  border:1px solid var(--border) !important;
  color:var(--muted) !important;
  border-radius:6px !important;
}
.cp-notes-tab .cp-notes-item .cp-notes-open-btn:hover{
  border-color:var(--brass) !important;
  color:var(--brass-deep) !important;
}

/* Per-question note count chip */
.cp-section-chip{
  background:rgba(231,225,212,0.55) !important;
  color:var(--brass-deep) !important;
  border-radius:999px !important;
  font-family:var(--font-body);
}
.cp-section-chip:hover{background:rgba(158,122,59,0.15) !important;}
.cp-section-chip[data-cp-count="0"]{
  background:rgba(231,225,212,0.30) !important;
  color:var(--muted) !important;
}

/* Empty state inside Care Plan workspace */
.cp-emptystate{
  background:var(--surface);
  border:0;
  box-shadow:var(--sh-lg), inset 0 1px 0 rgba(255,255,255,0.6);
}
.cp-emptystate h3{
  font-family:var(--font-display);
  font-weight:500;
  font-size:22px;
  letter-spacing:-0.02em;
  color:var(--text);
}
.cp-emptystate .cp-empty-sub{color:var(--muted);}
.cp-emptystate .cp-empty-btn{
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--text);
  font-family:var(--font-body);
  border-radius:10px;
  transition:border-color 150ms ease-out, background 150ms ease-out;
}
.cp-emptystate .cp-empty-btn:hover{
  border-color:var(--brass-soft);
  background:rgba(158,122,59,0.05);
}

/* ─── De-dup back link: hide renderer-emitted "← All care plans" when topbar
     back button is visible (avoids two back affordances) ─── */
body[data-page="hrcm-care-plan"] .content .cp-back-link,
body[data-page="hrcm-care-plan"] .content a[onclick*="hrcm-care-plan"]:has(+ .cp-header){
  display:none;
}
/* If the renderer emits something like `<div class="cp-back-row"><a>← All care plans</a></div>` */
.cp-back-row,
.content > a[href]:first-child:has(.cp-icon-back),
.content > div:first-child > a[onclick*="goBack"]{
  display:none;
}

/* ─── Hide RAF calculator bar when NOT on awe-form ─── */
/* The #raf-calculator-bar is position:fixed at body level. The renderer
   doesn't always remove it when navigating away. Scope its visibility
   to the awe-form page via data-page. */
body:not([data-page="awe-form"]) #raf-calculator-bar{display:none !important;}

/* ─── Page skeletons (per-page) — warm shimmer ─── */
.sk-card{
  background:var(--surface);
  border-radius:12px;
  padding:18px 20px;
  margin-bottom:14px;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55);
}
.sk-kpi{
  background:var(--surface);
  border-radius:12px;
  border-left:3px solid rgba(0,107,107,0.30);
  padding:16px 18px;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55);
}
.sk-hero-kpi{
  background:var(--surface);
  border-radius:12px;
  border-left:3px solid rgba(0,107,107,0.30);
  padding:18px;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55);
}
.sk-num{height:24px;width:60%;margin-bottom:8px;}
.sk-lbl{height:11px;width:80%;margin-bottom:6px;}
.sk-sub{height:10px;width:50%;}
.sk-title{height:18px;width:42%;margin-bottom:14px;}
.sk-banner{
  height:55px;
  background:linear-gradient(to right, rgba(192,138,62,0.06), rgba(192,138,62,0.10));
  border-radius:10px;
  border-left:3px solid var(--brass-soft);
  margin-bottom:12px;
  position:relative;
  overflow:hidden;
}
.sk-banner::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, transparent 0%, rgba(197,160,94,0.20) 50%, transparent 100%);
  animation:sk-shimmer 1.4s ease-in-out infinite;
}
.sk-row{display:flex;gap:14px;padding:10px 4px;border-bottom:1px solid rgba(231,225,212,0.55);}
.sk-cell{flex:1;min-width:0;}
.sk-tab-bar{display:flex;gap:6px;align-items:center;}
.sk-tab{height:30px;border-radius:6px;background:rgba(231,225,212,0.55);}
.sk-chart{height:140px;}

/* ═══════════════════════════════════════════════════════════════════════════
   POLISH ROUND 6 — 2026-05-26
   Tracker section collapse + Health Trend warm palette + chart SVG fills.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Tracker sections — collapsible via <details> ─── */
details.hrcm-cd-section.hrcm-collapsible{
  margin:22px 0;
}
details.hrcm-cd-section.hrcm-collapsible > summary{
  list-style:none;
  cursor:pointer;
  outline:none;
  user-select:none;
}
details.hrcm-cd-section.hrcm-collapsible > summary::-webkit-details-marker{display:none;}
details.hrcm-cd-section.hrcm-collapsible > summary > h3{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 12px;
}
details.hrcm-cd-section.hrcm-collapsible > summary:hover > h3{color:var(--brass) !important;}
.hrcm-chevron{
  margin-left:auto;
  font-size:18px;
  font-weight:400;
  color:var(--brass-soft);
  transition:transform 220ms cubic-bezier(0.22,1,0.36,1);
  letter-spacing:0;
  text-transform:none;
}
details.hrcm-cd-section.hrcm-collapsible[open] > summary .hrcm-chevron{transform:rotate(90deg);}

/* ─── Health Trend page (.ht-page) — token re-skin ─── */
.ht-page{
  --ht-border:var(--border);
  --ht-muted:var(--muted);
  --ht-text:var(--text);
  font-family:var(--font-body);
  font-size:14px;
}
.ht-page h2{
  font-family:var(--font-display);
  font-weight:500;
  font-size:22px !important;
  letter-spacing:-0.02em !important;
}
.ht-header{
  background:linear-gradient(180deg, var(--surface) 0%, rgba(231,225,212,0.30) 100%) !important;
  border:0 !important;
  border-radius:12px !important;
  padding:16px 18px !important;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55) !important;
}
.ht-header-meta{font-size:11.5px;color:var(--muted) !important;}
.ht-header-meta strong{color:var(--text);}
.ht-summary{
  background:var(--surface) !important;
  border:0 !important;
  border-radius:12px !important;
  padding:12px 16px !important;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55) !important;
  gap:24px !important;
}
.ht-summary .ht-stat .n{
  font-family:var(--font-mono);
  font-feature-settings:'tnum' 1;
  color:var(--text) !important;
  font-size:20px;
  font-weight:500;
}
.ht-summary .ht-stat .l{
  font-family:var(--font-body);
  color:var(--brass-deep) !important;
  letter-spacing:0.14em;
  font-size:10.5px;
}

/* Chart card rails — flatten the rainbow to brass */
.ht-page .hrcm-card{
  background:var(--surface) !important;
  border:0 !important;
  border-left:3px solid var(--border) !important;
  border-radius:12px !important;
  padding:14px 18px !important;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55);
}
.ht-page .hrcm-card.chart-bp,
.ht-page .hrcm-card.chart-bpd,
.ht-page .hrcm-card.chart-hr,
.ht-page .hrcm-card.chart-wt,
.ht-page .hrcm-card.chart-gl,
.ht-page .hrcm-card.chart-spo2,
.ht-page .hrcm-card.chart-bmi,
.ht-page .hrcm-card.chart-temp,
.ht-page .hrcm-card.chart-enc{
  border-left-color:rgba(0,107,107,0.35) !important;
}
.ht-page .hrcm-card.section-pdc{border-left-color:var(--brass) !important;}
.ht-page .hrcm-card.section-flags{border-left-color:#B05F4C !important;}
.ht-page .hrcm-card.section-hedis{border-left-color:#547290 !important;}
.ht-page .hrcm-card.section-engine{border-left-color:var(--brass-deep) !important;}

.ht-page .hrcm-card > div:first-child[style*="font-weight:700"]{
  font-family:var(--font-body) !important;
  color:var(--brass-deep) !important;
  font-size:11px !important;
  letter-spacing:0.14em !important;
}

.ht-page .hrcm-bar-legend{
  font-family:var(--font-body);
  color:var(--muted) !important;
  font-size:11px;
}

/* Chart titles + meta */
.ht-page .ht-chart-title{
  font-family:var(--font-body);
  font-size:12px;
  font-weight:600;
  color:var(--text);
  letter-spacing:0.04em;
  text-transform:uppercase;
}
.ht-page .ht-target{
  font-family:var(--font-body);
  color:var(--muted);
  font-size:11px;
  font-weight:500;
  text-transform:none;
  letter-spacing:0;
  margin-left:8px;
}
.ht-page .ht-chart-latest{
  font-family:var(--font-mono);
  font-feature-settings:'tnum' 1;
  font-size:14px;
  color:var(--text);
}
.ht-page .ht-chart-foot{
  font-family:var(--font-body);
  font-size:11px;
  color:var(--muted);
  margin-top:6px;
}

/* HT table — adopt the unified palette */
.ht-page .hrcm-table thead th{
  background:var(--sand) !important;   /* was rgba(...,0.40) translucent — headers must read solid */
  color:var(--brass-deep) !important;
  font-family:var(--font-body) !important;
  font-size:10.5px !important;
  letter-spacing:0.16em !important;
}
.ht-page .hrcm-table tbody td{color:var(--text);}

/* ─── SVG bar fills inside .ht-page — remap saturated tailwind to warm semantic ─── */
.ht-page rect[fill="#ef4444"]{ fill:#B05F4C !important; }    /* Hospital red → terracotta */
.ht-page rect[fill="#0ea5e9"]{ fill:#547290 !important; }    /* Professional sky-blue → dusty blue */
.ht-page rect[fill="#94a3b8"]{ fill:#9E7A3B !important; }    /* Other slate → brass */
.ht-page text[fill="#94a3b8"]{ fill:var(--muted) !important; }
.ht-page text[fill="#64748b"]{ fill:var(--muted) !important; }
.ht-page text[fill="#475569"]{ fill:var(--text) !important; }
.ht-page line[stroke="#e2e8f0"]{ stroke:var(--border) !important; }

/* Bar legend dots — match new bar colors */
.ht-page .ht-bar-legend .dot[style*="background:#ef4444"]{background:#B05F4C !important;}
.ht-page .ht-bar-legend .dot[style*="background:#0ea5e9"]{background:#547290 !important;}
.ht-page .ht-bar-legend .dot[style*="background:#94a3b8"]{background:#9E7A3B !important;}

/* HT page sub-tabs (Overview / Vitals & Trends / Clinical / Activity) — make sure they're warm */
.ht-page .ht-tabs button,
.ht-page nav.ht-tabs button{
  font-family:var(--font-body);
  color:var(--muted);
}
.ht-page .ht-tabs button.active{
  color:var(--text);
  background:var(--teal) !important;
  color:#FFFCF7 !important;
  border-radius:8px;
}

/* HT 6-tile KPI strip (the colored icon tiles at top) */
.ht-page .ht-hero-stat,
.ht-hero-stat{
  background:var(--surface) !important;
  border:0 !important;
  border-radius:12px !important;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55) !important;
  padding:14px 16px !important;
}
.ht-hero-stat-n{
  font-family:var(--font-mono);
  font-feature-settings:'tnum' 1;
  font-size:24px !important;
  font-weight:500 !important;
  color:var(--text) !important;
  letter-spacing:-0.02em !important;
}
.ht-hero-stat-l{
  font-family:var(--font-body);
  font-size:11px !important;
  font-weight:600 !important;
  text-transform:uppercase;
  letter-spacing:0.14em;
  color:var(--muted) !important;
}
.ht-hero-stat-sub{
  font-family:var(--font-body);
  font-size:11px !important;
  color:var(--muted) !important;
}
.ht-hero-stat-icon{
  border-radius:10px;
  background:rgba(231,225,212,0.50);
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
}
/* Tone variations on the hero stat icon — keep distinction via warm semantics */
.ht-hero-stat.danger .ht-hero-stat-icon{background:rgba(176,95,76,0.12);color:#823F2E;}
.ht-hero-stat.warn .ht-hero-stat-icon{background:rgba(192,138,62,0.14);color:#6E5424;}
.ht-hero-stat.info .ht-hero-stat-icon{background:rgba(84,114,144,0.12);color:#3A5269;}
.ht-hero-stat.ok .ht-hero-stat-icon{background:rgba(110,138,92,0.14);color:#4E6740;}

/* HT empty-state on vitals tab */
.ht-page > div[style*="No vital trends yet"],
.ht-page .ht-empty,
.ht-page > p:first-of-type{
  font-family:var(--font-display);
  font-style:italic;
}

/* ═══════════════════════════════════════════════════════════════════════════
   POLISH ROUND 7 — 2026-05-26
   Care Plan back link warm restyle + topbar notifications bell.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Care Plan back link (.cp-backrow) — warm restyle ─── */
/* Renderer emits an inline-styled link; outranks via CSS via class scoping.
   Keeps the link's intent (one click to landing) but visually integrates. */
.cp-backrow{margin:0 0 12px !important;padding:0 !important;}
.cp-backrow a{
  background:transparent !important;
  color:var(--brass-deep) !important;
  font-family:var(--font-body) !important;
  font-size:11.5px !important;
  font-weight:600 !important;
  letter-spacing:0.04em;
  padding:4px 0 !important;
  border-radius:0 !important;
  border-bottom:1px solid transparent !important;
  transition:color 150ms ease-out, border-color 150ms ease-out !important;
}
.cp-backrow a:hover{
  color:var(--teal) !important;
  border-bottom-color:var(--brass-soft) !important;
}

/* ─── Topbar notifications bell ─── */
.topbar-bell{
  position:relative;
  display:inline-flex;
  align-items:center;
}
.topbar-bell__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:999px;
  cursor:pointer;
  color:var(--brass-deep);
  list-style:none;
  outline:none;
  position:relative;
  transition:background 150ms ease-out, color 150ms ease-out;
  user-select:none;
}
.topbar-bell__btn::-webkit-details-marker{display:none;}
.topbar-bell__btn:hover{
  background:rgba(158,122,59,0.10);
  color:var(--teal);
}
.topbar-bell[open] .topbar-bell__btn{
  background:rgba(158,122,59,0.14);
  color:var(--teal);
}
.topbar-bell__icon{
  width:18px;
  height:18px;
  flex-shrink:0;
}
.topbar-bell__dot{
  position:absolute;
  top:7px;
  right:8px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--brass);
  box-shadow:0 0 0 2px var(--surface);
}
.topbar-bell__dot[data-tone="critical"]{background:#B05F4C;}
.topbar-bell__panel{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:320px;
  max-width:360px;
  background:var(--surface);
  border-radius:12px;
  box-shadow:var(--sh-lg), inset 0 1px 0 rgba(255,255,255,0.6);
  border:1px solid var(--border);
  z-index:200;
  overflow:hidden;
  animation:topbar-bell-rise 220ms cubic-bezier(0.22,1,0.36,1);
}
@keyframes topbar-bell-rise{
  0%{opacity:0;transform:translateY(-4px);}
  100%{opacity:1;transform:translateY(0);}
}
.topbar-bell__panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 16px;
  border-bottom:1px solid var(--border);
  font-family:var(--font-body);
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.14em;
  color:var(--brass-deep);
  background:linear-gradient(to bottom, rgba(255,252,247,1) 0%, rgba(250,247,241,0.5) 100%);
}
.topbar-bell__panel-count{
  font-family:var(--font-mono);
  font-variant-numeric:tabular-nums;
  font-size:11px;
  font-weight:600;
  color:var(--brass-deep);
  background:rgba(231,225,212,0.65);
  padding:2px 9px;
  border-radius:999px;
  letter-spacing:0;
}
.topbar-bell__panel-count:empty{display:none;}
.topbar-bell__panel-body{
  max-height:380px;
  overflow-y:auto;
  padding:6px 0;
}
.topbar-bell__empty{
  padding:18px 16px;
  font-family:var(--font-display);
  font-style:italic;
  font-size:13px;
  color:var(--muted);
  text-align:center;
}
.topbar-bell__item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 14px;
  border-bottom:1px solid rgba(231,225,212,0.55);
  transition:background 120ms ease-out;
}
.topbar-bell__item:last-child{border-bottom:0;}
.topbar-bell__item[style*="cursor:pointer"]:hover,
.topbar-bell__item:hover[style*="cursor:pointer"]{
  background:rgba(158,122,59,0.06);
}
.topbar-bell__item-tone{
  width:6px;
  height:6px;
  border-radius:50%;
  flex-shrink:0;
  margin-top:6px;
  background:var(--brass);
}
.topbar-bell__item--critical .topbar-bell__item-tone{background:#B05F4C;}
.topbar-bell__item--warning .topbar-bell__item-tone{background:#C08A3E;}
.topbar-bell__item--info .topbar-bell__item-tone{background:#547290;}
.topbar-bell__item-body{flex:1;min-width:0;}
.topbar-bell__item-label{
  font-family:var(--font-body);
  font-size:13px;
  font-weight:600;
  color:var(--text);
  line-height:1.35;
}
.topbar-bell__item-detail{
  font-family:var(--font-body);
  font-size:11.5px;
  color:var(--muted);
  margin-top:2px;
  line-height:1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════
   POLISH ROUND 8 — 2026-05-26
   Modernize member detail drawer + search bars + remaining old chrome.
   Targets .case-detail (the sliding right-pane drawer over the worklist) plus
   global search input treatment + Care Team panel + Tracker banner.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Drawer shell ─── */
.hrcm-detail{
  background:var(--bg) !important;
  border-left:1px solid var(--border) !important;
  box-shadow:-20px 0 48px rgba(74,60,40,0.14), -4px 0 12px rgba(74,60,40,0.06) !important;
  transition:transform 280ms cubic-bezier(0.22,1,0.36,1) !important;
}
.hrcm-detail-backdrop{
  background:rgba(44,42,35,0.32) !important;
}
.hrcm-detail-close{
  background:var(--surface) !important;
  border:1px solid var(--border) !important;
  color:var(--text) !important;
  border-radius:999px !important;
  padding:6px 14px !important;
  font-family:var(--font-body) !important;
  font-size:12px !important;
  font-weight:600 !important;
  letter-spacing:0.04em !important;
  transition:background 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out !important;
}
.hrcm-detail-close:hover{
  background:rgba(158,122,59,0.08) !important;
  border-color:var(--brass-soft) !important;
  color:var(--brass-deep) !important;
}
.hrcm-detail-close kbd{
  font-family:var(--font-mono) !important;
  background:rgba(231,225,212,0.55) !important;
  border:1px solid var(--border) !important;
  color:var(--brass-deep) !important;
  border-radius:4px !important;
  padding:1px 5px !important;
  font-size:10px !important;
}

/* ─── Drawer header ─── */
.case-detail{background:var(--bg) !important;}
.case-detail .cd-header{
  background:var(--surface) !important;
  border-bottom:1px solid var(--border) !important;
  padding:18px 24px 14px !important;
  box-shadow:0 1px 2px rgba(74,60,40,0.04) !important;
}
.case-detail .cd-header h2{
  font-family:var(--font-display) !important;
  font-weight:500 !important;
  font-size:22px !important;
  letter-spacing:-0.02em !important;
  color:var(--text) !important;
  margin:0 0 4px !important;
}
.case-detail .cd-header .cd-meta{
  font-family:var(--font-body) !important;
  font-size:12px !important;
  color:var(--muted) !important;
  line-height:1.5 !important;
}
.case-detail .cd-header .cd-meta a{
  color:var(--text) !important;
  font-weight:600 !important;
}
.case-detail .cd-header .cd-meta .sep{
  color:var(--brass-soft) !important;
  margin:0 8px !important;
  opacity:0.55;
}

/* Drawer header pills (Status / CM Lead) */
.case-detail .cd-header-pills .cd-label{
  font-family:var(--font-body) !important;
  font-size:10.5px !important;
  font-weight:700 !important;
  text-transform:uppercase !important;
  letter-spacing:0.14em !important;
  color:var(--brass-deep) !important;
}

/* Drawer header action buttons (Generate / Send / Mark Signed) */
.case-detail .cd-header-actions{margin-top:14px !important;gap:8px !important;}
.case-detail .cd-header-actions .btn{
  font-family:var(--font-body) !important;
  font-size:12.5px !important;
  font-weight:600 !important;
  padding:7px 14px !important;
  border-radius:8px !important;
  letter-spacing:0.01em !important;
}

/* ─── Drawer body sections (At a glance / URGENT playbook / etc.) ─── */
.case-detail .cd-body{padding:18px 22px 32px !important;gap:14px !important;}
.case-detail .cd-section{
  background:var(--surface) !important;
  border:0 !important;
  border-radius:14px !important;
  box-shadow:var(--sh), inset 0 1px 0 rgba(255,255,255,0.55) !important;
  overflow:hidden;
  transition:box-shadow 200ms cubic-bezier(0.22,1,0.36,1) !important;
}
.case-detail .cd-section[open]{
  box-shadow:var(--sh-lg), inset 0 1px 0 rgba(255,255,255,0.6) !important;
}
.case-detail .cd-section > summary{
  padding:15px 18px !important;
  background:transparent !important;
  font-family:var(--font-display) !important;
  font-size:15px !important;
  font-weight:500 !important;
  color:var(--text) !important;
  letter-spacing:-0.01em !important;
  transition:background 120ms ease-out !important;
}
.case-detail .cd-section > summary:hover{background:rgba(158,122,59,0.04) !important;}
.case-detail .cd-section > summary::before{
  content:"›" !important;
  font-family:var(--font-body) !important;
  font-size:16px !important;
  color:var(--brass-soft) !important;
  width:14px !important;
  transition:transform 220ms cubic-bezier(0.22,1,0.36,1) !important;
}
.case-detail .cd-section[open] > summary::before{transform:rotate(90deg) !important;color:var(--brass) !important;}
.case-detail .cd-section > summary .cd-count{
  background:rgba(231,225,212,0.65) !important;
  color:var(--brass-deep) !important;
  border:1px solid var(--border) !important;
  border-radius:999px !important;
  padding:2px 10px !important;
  font-family:var(--font-mono) !important;
  font-feature-settings:'tnum' 1;
  font-size:11px !important;
  font-weight:500 !important;
}
.case-detail .cd-section > summary .cd-flag{
  background:rgba(176,95,76,0.12) !important;
  color:#823F2E !important;
  border:1px solid rgba(176,95,76,0.30) !important;
  border-radius:999px !important;
  padding:2px 10px !important;
  font-family:var(--font-body) !important;
  font-size:10.5px !important;
  font-weight:600 !important;
  letter-spacing:0.10em !important;
}
.case-detail .cd-section-body{
  padding:6px 20px 20px !important;
  font-family:var(--font-body);
  font-size:13.5px !important;
  line-height:1.55 !important;
  color:var(--text) !important;
}
.case-detail .cd-section-body h4,
.case-detail .cd-section-body .adh-h4{
  font-family:var(--font-body) !important;
  font-size:10.5px !important;
  font-weight:700 !important;
  letter-spacing:0.14em !important;
  text-transform:uppercase !important;
  color:var(--brass-deep) !important;
  margin:16px 0 8px !important;
}
.case-detail .cd-section-body .reasons{
  background:rgba(231,225,212,0.40) !important;
  border-left:3px solid var(--brass-soft) !important;
  border-radius:8px !important;
  color:var(--text) !important;
  font-size:12.5px !important;
  padding:10px 14px !important;
}
.case-detail .cd-section-body .reasons strong{color:var(--text);font-weight:600;}

/* URGENT section — warm terra-cotta */
.case-detail .cd-section.section-urgent{
  background:linear-gradient(180deg, rgba(176,95,76,0.04) 0%, var(--surface) 80%) !important;
  border-left:3px solid #B05F4C !important;
}
.case-detail .cd-section.section-urgent > summary{
  background:transparent !important;
  color:#823F2E !important;
}
.case-detail .cd-section.section-urgent > summary::before{color:#B05F4C !important;}

/* ─── Drawer "At a Glance" KPI tiles ─── */
.case-detail .summary-grid{
  display:grid !important;
  grid-template-columns:repeat(3, 1fr) !important;
  gap:10px !important;
  margin:0 0 12px !important;
}
.case-detail .summary-tile{
  background:var(--surface) !important;
  border:1px solid var(--border) !important;
  border-radius:12px !important;
  padding:12px 14px !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.55);
  position:relative;
}
.case-detail .summary-tile .cd-label{
  font-family:var(--font-body) !important;
  font-size:10px !important;
  font-weight:700 !important;
  letter-spacing:0.14em !important;
  text-transform:uppercase !important;
  color:var(--brass-deep) !important;
  margin-bottom:5px !important;
  display:block;
}
.case-detail .summary-tile .val{
  font-family:var(--font-mono) !important;
  font-feature-settings:'tnum' 1;
  font-size:18px !important;
  font-weight:500 !important;
  letter-spacing:-0.02em !important;
  color:var(--text) !important;
  line-height:1.1;
}
.case-detail .summary-tile.tile-urgent{border-left:3px solid #B05F4C !important;}
.case-detail .summary-tile.tile-hospice-strong{border-left:3px solid #5E6F8A !important;}
/* Top-right tone dot */
.case-detail .summary-tile.tile-urgent::after,
.case-detail .summary-tile.tile-hospice-strong::after{
  content:'';
  position:absolute;
  top:12px;right:12px;
  width:7px;height:7px;border-radius:50%;
}
.case-detail .summary-tile.tile-urgent::after{background:#B05F4C;}
.case-detail .summary-tile.tile-hospice-strong::after{background:#5E6F8A;}

/* ─── Drawer condition / match pills ─── */
.case-detail .match-pill,
.case-detail span.match-pill,
.case-detail .flag-chip,
.cd-section-body .match-pill,
.cd-section-body .flag-chip{
  background:rgba(231,225,212,0.55) !important;
  color:var(--text) !important;
  border:1px solid var(--border) !important;
  font-family:var(--font-body) !important;
  font-size:11.5px !important;
  font-weight:500 !important;
  letter-spacing:0.02em !important;
  text-transform:none !important;
  padding:4px 11px !important;
  border-radius:999px !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;
}
.case-detail .match-pill::before,
.case-detail .flag-chip::before,
.cd-section-body .match-pill::before,
.cd-section-body .flag-chip::before{
  content:'•' !important;
  color:var(--brass) !important;
  font-size:14px !important;
  line-height:0 !important;
}
/* Critical condition flag */
.case-detail .match-pill.danger,
.cd-section-body .match-pill[class*="danger"],
.case-detail .match-pill[style*="background:#fef2f2"]{
  background:rgba(176,95,76,0.10) !important;
  color:#823F2E !important;
  border-color:rgba(176,95,76,0.30) !important;
}
.case-detail .match-pill.danger::before{color:#B05F4C !important;}

/* ─── Drawer quick-links (Care Plan / Daily Notes / Health Trends / Message) ─── */
.case-detail .cd-quick-links{gap:8px !important;margin-top:12px !important;}
.case-detail .cd-quick-links .ql-btn{
  background:var(--surface) !important;
  border:1px solid var(--border) !important;
  border-radius:12px !important;
  font-family:var(--font-body) !important;
  font-size:11.5px !important;
  font-weight:600 !important;
  color:var(--text) !important;
  padding:14px 8px !important;
  gap:6px !important;
  letter-spacing:0.01em !important;
  transition:background 150ms ease-out, border-color 150ms ease-out, transform 150ms ease-out !important;
}
.case-detail .cd-quick-links .ql-btn:hover{
  background:rgba(158,122,59,0.05) !important;
  border-color:var(--brass-soft) !important;
  color:var(--brass-deep) !important;
  transform:translateY(-1px);
}
.case-detail .cd-quick-links .ql-btn .ql-icon{
  font-size:20px !important;
  line-height:1 !important;
  opacity:0.75;
}

/* ─── Drawer stat grid (paired lbl/val rows) ─── */
.case-detail .cd-stat-grid{
  font-family:var(--font-body);
  margin:12px 0 !important;
}
.case-detail .cd-stat-grid .row{
  border-bottom:1px solid rgba(231,225,212,0.55) !important;
  padding:7px 0 !important;
}
.case-detail .cd-stat-grid .row .lbl{
  color:var(--muted) !important;
  font-size:11.5px;
  font-weight:500;
}
.case-detail .cd-stat-grid .row .val{
  color:var(--text) !important;
  font-weight:600;
  font-variant-numeric:tabular-nums;
}

/* ─── Drawer assignments grid (Care Team selects) ─── */
.case-detail .assignments-grid label{
  color:var(--brass-deep) !important;
  font-family:var(--font-body) !important;
  font-size:10.5px !important;
  font-weight:700 !important;
  letter-spacing:0.14em !important;
  text-transform:uppercase !important;
}
.case-detail .assignments-grid select{
  font-family:var(--font-body) !important;
  background:var(--surface) !important;
  border:1px solid var(--border) !important;
  border-radius:8px !important;
  color:var(--text) !important;
  padding:8px 12px !important;
  font-size:13px !important;
  transition:border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.case-detail .assignments-grid select:focus{
  outline:none !important;
  border-color:var(--teal) !important;
  box-shadow:0 0 0 3px rgba(0,107,107,0.15);
}

/* ─── Empty/cell-na placeholders ─── */
.case-detail .empty,
.case-detail .cell-na{
  color:var(--muted) !important;
  font-style:italic;
  font-family:var(--font-body);
}

/* ─── Tracker banner (.tr-banner) — warm semantic ─── */
.tr-banner{
  font-family:var(--font-body);
  border-radius:10px !important;
  padding:11px 16px !important;
  font-size:12.5px !important;
}
.tr-banner.ok{
  background:rgba(110,138,92,0.10) !important;
  border-color:rgba(110,138,92,0.30) !important;
  color:#4E6740 !important;
}
.tr-banner.warn{
  background:rgba(192,138,62,0.10) !important;
  border-color:rgba(192,138,62,0.30) !important;
  color:#6E5424 !important;
}

/* ─── Tracker inline lead picker (.tr-inline-lead) ─── */
.tr-inline-lead{
  border:1px solid var(--border) !important;
  border-radius:8px !important;
  background:var(--surface) !important;
  font-family:var(--font-body) !important;
  font-size:12.5px !important;
  color:var(--text) !important;
  padding:6px 12px !important;
}
.tr-inline-lead:hover{border-color:var(--brass-soft) !important;}
.tr-row.no-lead .tr-inline-lead{
  border-color:rgba(192,138,62,0.40) !important;
  background:rgba(192,138,62,0.08) !important;
  color:#6E5424 !important;
}
.tr-row.has-lead .tr-inline-lead{
  border-color:rgba(110,138,92,0.40) !important;
  background:rgba(110,138,92,0.10) !important;
  color:#4E6740 !important;
}

/* ─── Care Team Panel (ctp-table) — warm semantic ─── */
.ctp-table thead th{
  font-family:var(--font-body);
  color:var(--brass-deep) !important;
  font-size:10.5px !important;
}
.ctp-table tbody td.ctp-member .ctp-name{color:var(--text) !important;font-family:var(--font-body);}
.ctp-table tbody td.ctp-member .ctp-meta{color:var(--muted) !important;font-family:var(--font-body);}
.ctp-table tbody td.ctp-filled{background:rgba(110,138,92,0.10) !important;}
.ctp-table tbody td.ctp-filled:hover{background:rgba(110,138,92,0.18) !important;}
.ctp-table tbody td.ctp-filled .ctp-check{background:#6E8A5C !important;color:#FFFCF7 !important;}
.ctp-table tbody td.ctp-filled .ctp-name-short{color:#4E6740 !important;font-family:var(--font-body);}
.ctp-table tbody td.ctp-empty{background:rgba(192,138,62,0.06) !important;}
.ctp-table tbody td.ctp-empty:hover{background:rgba(192,138,62,0.12) !important;}
.ctp-table tbody td.ctp-empty .ctp-x{
  background:var(--surface) !important;
  color:var(--muted) !important;
  border:1px dashed var(--border) !important;
}
.ctp-table tbody td.ctp-empty:hover .ctp-x{
  border-color:var(--brass) !important;
  color:var(--brass) !important;
  border-style:solid !important;
}
.ctp-table tbody td.ctp-na .ctp-dash{color:var(--border-strong, #D2C9B5) !important;}
.ctp-row.no-lead td.ctp-cell:nth-child(4){background:rgba(176,95,76,0.06) !important;}
.ctp-row.no-lead td.ctp-cell.ctp-empty:nth-child(4) .ctp-x{
  border-color:rgba(176,95,76,0.40) !important;
  color:#B05F4C !important;
}

/* ─── SLA table compact text ─── */
.sla-table .sla-member{font-family:var(--font-body);color:var(--text) !important;}
.sla-table .sla-id{color:var(--muted) !important;}
.sla-table .sla-case-status{color:var(--muted) !important;}

/* ─── Search inputs — global warm + soft glow on focus ─── */
input[type="search"],
input[type="text"][placeholder*="Search"],
input[type="text"][placeholder*="search"],
input[id*="search"],
input[name*="search"],
.cp-landing-search,
input.hrcm-search,
input[placeholder*="Search member"],
input[placeholder*="Search name"]{
  background-color:var(--surface) !important;
  border:1px solid var(--border) !important;
  border-radius:10px !important;
  font-family:var(--font-body) !important;
  font-size:14px !important;
  color:var(--text) !important;
  padding:10px 14px 10px 38px !important;
  transition:border-color 150ms ease-out, box-shadow 150ms ease-out !important;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 16 16' fill='none' stroke='%236B6256' stroke-width='1.75' stroke-linecap='round'><circle cx='7' cy='7' r='5'/><path d='M11 11l3 3'/></svg>") !important;
  background-repeat:no-repeat !important;
  background-position:14px center !important;
}
input[type="search"]:focus,
input[type="text"][placeholder*="Search"]:focus,
input[type="text"][placeholder*="search"]:focus,
input[id*="search"]:focus,
.cp-landing-search:focus,
input.hrcm-search:focus,
input[placeholder*="Search member"]:focus,
input[placeholder*="Search name"]:focus{
  outline:none !important;
  border-color:var(--teal) !important;
  box-shadow:0 0 0 3px rgba(0,107,107,0.15) !important;
}
input[type="search"]::placeholder,
input[type="text"][placeholder*="Search"]::placeholder,
input[type="text"][placeholder*="search"]::placeholder,
input[id*="search"]::placeholder,
.cp-landing-search::placeholder,
input.hrcm-search::placeholder,
input[placeholder*="Search member"]::placeholder,
input[placeholder*="Search name"]::placeholder{color:#B5AB95 !important;font-style:normal !important;}

/* ─── Filter chip rows app-wide (Worklist filter pills, Care Plan filters, etc.) ─── */
button.chip,
.cp-landing-filters button,
.cp-landing-filters .cp-filter-chip,
.hrcm-toolbar .chip,
button[data-cp-filter],
.hrcm-cd-section button[role="tab"]{
  background:rgba(231,225,212,0.55) !important;
  color:var(--brass-deep) !important;
  border:1px solid var(--border) !important;
  border-radius:999px !important;
  font-family:var(--font-body) !important;
  font-size:12px !important;
  font-weight:600 !important;
  letter-spacing:0.02em !important;
  padding:6px 14px !important;
  transition:background 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out !important;
  cursor:pointer;
}
button.chip:hover,
.cp-landing-filters button:hover,
.cp-landing-filters .cp-filter-chip:hover{
  background:rgba(158,122,59,0.10) !important;
  border-color:var(--brass-soft) !important;
  color:var(--brass) !important;
}
button.chip.active,
.cp-landing-filters button.active,
.cp-landing-filters .cp-filter-chip.active{
  background:var(--text) !important;
  color:var(--surface) !important;
  border-color:var(--text) !important;
}

/* ─── Status pills — semantic differentiation ─── */
/* "NOT STARTED" / "ENGAGED" / "SENT TO PCP" / "PCP SIGNED" / "CLOSED-STABLE" etc. */
.status-pill[class*="not"],
.status-pill[class*="not-started"]{
  background:rgba(107,98,86,0.10) !important;
  color:var(--muted) !important;
  border:1px solid var(--border) !important;
}
.status-pill[class*="progress"],
.status-pill[class*="engaged"]{
  background:rgba(84,114,144,0.10) !important;
  color:#3A5269 !important;
  border:1px solid rgba(84,114,144,0.30) !important;
}
.status-pill[class*="sent"],
.status-pill[class*="pcp"]{
  background:rgba(192,138,62,0.12) !important;
  color:#6E5424 !important;
  border:1px solid rgba(192,138,62,0.30) !important;
}
.status-pill[class*="signed"]{
  background:rgba(110,138,92,0.12) !important;
  color:#4E6740 !important;
  border:1px solid rgba(110,138,92,0.30) !important;
}
.status-pill[class*="closed"],
.status-pill.status-closed{
  background:rgba(231,225,212,0.55) !important;
  color:var(--brass-deep) !important;
  border:1px solid var(--border) !important;
}
.status-pill[class*="urgent"]{
  background:rgba(176,95,76,0.10) !important;
  color:#823F2E !important;
  border:1px solid rgba(176,95,76,0.30) !important;
}

/* Round all remaining sharp corners — sweep */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
button:not(.mx):not(.topbar-bell__btn),
.btn,
.tag,
.pill{
  border-radius:8px;
}
.tag,
.pill,
.ipa-badge,
.tab-badge,
.match-pill,
.flag-chip,
.cd-count,
.cd-flag,
.status-pill{
  border-radius:999px;
}

/* ─── Override .case-detail's saturated blue .btn-p / .btn-g — was a local
     drawer-specific override that's now off-palette. ─── */
.case-detail .btn-p{
  background:var(--teal) !important;
  color:#FFFCF7 !important;
  border:0 !important;
  padding:7px 14px !important;
  border-radius:8px !important;
  font-family:var(--font-body) !important;
  font-size:12.5px !important;
  font-weight:600 !important;
  cursor:pointer;
  letter-spacing:0.01em;
  box-shadow:0 1px 0 rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.12);
  transition:background 150ms ease-out, box-shadow 150ms ease-out;
}
.case-detail .btn-p:hover{
  background:var(--teal-dark) !important;
  box-shadow:0 2px 8px rgba(0,107,107,0.20), inset 0 1px 0 rgba(255,255,255,0.15);
}
.case-detail .btn-g{
  background:transparent !important;
  color:var(--teal) !important;
  border:1px solid var(--teal) !important;
  border-radius:8px !important;
  padding:7px 14px !important;
  font-family:var(--font-body) !important;
  font-size:12.5px !important;
  font-weight:600 !important;
  cursor:pointer;
}
.case-detail .btn-g:hover{
  background:var(--teal-light) !important;
}
.case-detail .case-actions button.btn-p{
  background:var(--teal) !important;
  color:#FFFCF7 !important;
  border:0 !important;
}
.case-detail .attachments-row a{color:var(--teal) !important;}
.case-detail .attachments-row a:hover{color:var(--teal-dark) !important;}

/* Hrcm kpi-blue tile bg (used in legacy strip) — warm */
.hrcm-kpi-strip .kpi-blue{background:#547290 !important;}

/* ═══════════════════════════════════════════════════════════════════════════
   POLISH ROUND 9 — 2026-05-26
   Light login + remove sidebar ◆ ornament + Worklist tab visibility +
   modernize page-header cards (PCP Inbox / CCM Candidates / Messages) +
   warm .ipa-stacked typography.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Remove the ◆ ornament on active sidebar item ─── */
.nav-item.active::before{content:none !important;}

/* ─── Worklist sub-tabs (.hrcm-view-tabs) — same pill style as chart .mc-tab ─── */
.hrcm-view-tabs{
  display:flex !important; gap:6px !important; align-items:center !important;
  border-bottom:1px solid var(--border) !important;
  margin:0 0 16px !important;
  padding-bottom:10px !important;
}
.hrcm-view-tabs button{
  font-family:var(--font-body) !important;
  font-size:13px !important;
  font-weight:600 !important;
  color:var(--muted) !important;
  padding:8px 15px !important;
  background:transparent !important;
  border:1px solid transparent !important;
  border-radius:8px !important;
  margin-bottom:0 !important;
  transition:color .15s ease, background .15s ease, border-color .15s ease !important;
}
.hrcm-view-tabs button:hover{
  color:var(--text) !important;
  background:var(--bg) !important;
}
.hrcm-view-tabs button.active{
  color:var(--teal-dark) !important;
  font-weight:700 !important;
  background:var(--surface) !important;
  border-color:rgba(0,107,107,0.28) !important;
  border-bottom-color:rgba(0,107,107,0.28) !important;
  box-shadow:0 1px 3px rgba(42,37,29,0.10) !important;
}
.hrcm-view-tabs .tab-badge{
  background:rgba(231,225,212,0.65) !important;
  color:var(--brass-deep) !important;
  font-family:var(--font-mono) !important;
  font-variant-numeric:tabular-nums;
  font-size:10.5px !important;
  font-weight:500 !important;
  padding:1px 9px !important;
  border-radius:999px !important;
  margin-left:8px !important;
}
.hrcm-view-tabs button.active .tab-badge{
  background:var(--brass) !important;
  color:var(--surface) !important;
}
.hrcm-view-tabs .tab-badge.zero{
  background:rgba(231,225,212,0.40) !important;
  color:var(--muted) !important;
}

/* ─── Worklist .ipa-stacked typography — warm tokens ─── */
.ipa-stacked .ipa-name{
  font-family:var(--font-body) !important;
  font-size:12px !important;
  font-weight:600 !important;
  color:var(--text) !important;
  letter-spacing:0.04em;
}
.ipa-stacked .ipa-pcp{
  font-family:var(--font-body) !important;
  font-size:11px !important;
  font-weight:500 !important;
  color:var(--muted) !important;
}

/* ─── Page-header card pattern used by PCP Inbox + CCM Candidates ─── */
/* Matches the inline div[style*="border-bottom:1px solid #e2e8f0"][style*="background:#fff"]
   shell. Repaint to a borderless brass-eyebrow + Fraunces sub-row block,
   hide the duplicated emoji+h2 (topbar already shows the page title). */
.content > div[style*="border-bottom:1px solid #e2e8f0"][style*="background:#fff"]{
  background:transparent !important;
  border-bottom:1px solid var(--border) !important;
  padding:4px 0 14px !important;
  margin-bottom:18px !important;
  position:relative;
}
.content > div[style*="border-bottom:1px solid #e2e8f0"][style*="background:#fff"]::after{
  content:'';
  position:absolute;
  left:0;
  bottom:-1px;
  width:64px;
  height:2px;
  background:linear-gradient(to right, var(--brass) 0%, var(--brass-soft) 60%, transparent 100%);
}
.content > div[style*="border-bottom:1px solid #e2e8f0"][style*="background:#fff"] h2{
  font-family:var(--font-body) !important;
  font-size:11px !important;
  font-weight:700 !important;
  text-transform:uppercase !important;
  letter-spacing:0.20em !important;
  color:var(--brass-deep) !important;
  margin:0 0 6px !important;
  /* Strip leading emoji + extra ws via mask trick: hide the entire H2 text
     since the topbar already shows the page title. Replace with a brass
     "Workspace" eyebrow via ::before. */
  font-size:0 !important;
  line-height:0 !important;
}
.content > div[style*="border-bottom:1px solid #e2e8f0"][style*="background:#fff"] h2::before{
  content:'Workspace';
  font-size:11px;
  line-height:1;
  font-family:var(--font-body);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.18em;
  color:var(--brass-deep);
}
/* The subtitle (description) under the H2 — make it the real page subtitle */
.content > div[style*="border-bottom:1px solid #e2e8f0"][style*="background:#fff"] h2 + div{
  font-family:var(--font-body) !important;
  font-size:14px !important;
  color:var(--text) !important;
  margin-top:6px !important;
  line-height:1.5;
}
/* Right-side meta (e.g. "560 candidates", "Signer NPI: admin · 0 pending") */
.content > div[style*="border-bottom:1px solid #e2e8f0"][style*="background:#fff"] > div > div:last-child{
  text-align:right;
}

/* ─── Messages inbox header (.inbox-page .inbox-list h3 / similar) ─── */
.content h3[style*="font-size:18px"],
.content h3[style*="font-size:20px"],
.content div h3:first-of-type:not([class]){
  font-family:var(--font-display);
  font-weight:500;
  font-size:18px;
  letter-spacing:-0.01em;
  color:var(--text);
}

/* ─── Login page — light, modern background ─── */
#login-screen{
  background:
    radial-gradient(ellipse at 15% 12%, rgba(192,138,62,0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 88%, rgba(0,107,107,0.12) 0%, transparent 55%),
    linear-gradient(160deg, #FBF7EE 0%, #FAF7F1 35%, #F3EDE0 100%) !important;
}
#login-screen::before{
  /* paper-grain noise applied to the login surface for the same warmth */
  content:'';
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:0.50;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.40  0 0 0 0 0.30  0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.lcard{
  position:relative;
  z-index:2;
  background:var(--surface) !important;
  border-radius:16px !important;
  padding:48px 44px 36px !important;
  width:420px !important;
  box-shadow:0 24px 56px rgba(74,60,40,0.16), 0 6px 16px rgba(74,60,40,0.08), inset 0 1px 0 rgba(255,255,255,0.7) !important;
  border:1px solid rgba(231,225,212,0.40);
}
.lcard::before{
  content:'';
  position:absolute;
  top:0;
  left:36px;
  right:36px;
  height:2px;
  background:linear-gradient(to right,
    transparent 0%,
    var(--brass) 30%,
    var(--brass-soft) 70%,
    transparent 100%);
  opacity:0.65;
  border-radius:2px;
}
.llogo{margin-bottom:32px !important;}
.llogo h1{
  font-family:var(--font-display) !important;
  font-weight:400 !important;
  font-style:italic !important;
  font-size:24px !important;
  letter-spacing:-0.02em !important;
  color:var(--text) !important;
  line-height:1.2;
}
.llogo p{
  font-family:var(--font-body) !important;
  font-size:10.5px !important;
  text-transform:uppercase !important;
  letter-spacing:0.22em !important;
  color:var(--brass-deep) !important;
  margin-top:8px !important;
}
.lcard .fg{margin-bottom:16px !important;}
.lcard .fg label{
  font-family:var(--font-body) !important;
  font-size:10.5px !important;
  letter-spacing:0.16em !important;
  text-transform:uppercase !important;
  font-weight:700 !important;
  color:var(--brass-deep) !important;
  margin-bottom:7px !important;
}
.lcard .fg input{
  font-family:var(--font-body) !important;
  font-size:14px !important;
  padding:11px 14px !important;
  border:1px solid var(--border) !important;
  border-radius:10px !important;
  background:var(--bg) !important;
  color:var(--text) !important;
  transition:border-color 150ms ease-out, box-shadow 150ms ease-out, background 150ms ease-out !important;
}
.lcard .fg input::placeholder{color:#B5AB95 !important;}
.lcard .fg input:focus{
  outline:none !important;
  border-color:var(--teal) !important;
  background:var(--surface) !important;
  box-shadow:0 0 0 3px rgba(0,107,107,0.15) !important;
}
/* HIPAA notice — calm warm amber instead of bright */
.lcard div[style*="background:rgba(245,158,11,0.08)"]{
  background:linear-gradient(to right, rgba(192,138,62,0.06), rgba(192,138,62,0.10)) !important;
  border:1px solid rgba(192,138,62,0.25) !important;
  border-left:3px solid var(--brass) !important;
  color:var(--text) !important;
  border-radius:10px !important;
  font-size:11px !important;
  line-height:1.55 !important;
  padding:12px 14px !important;
}
.lcard div[style*="background:rgba(245,158,11,0.08)"] strong{
  font-family:var(--font-display);
  font-style:italic;
  font-weight:500;
  font-size:12.5px;
  color:var(--brass-deep);
}
/* Sign In button */
.lcard button.btn-p{
  background:var(--teal) !important;
  border-radius:10px !important;
  font-family:var(--font-body) !important;
  font-size:14px !important;
  font-weight:600 !important;
  letter-spacing:0.02em !important;
  padding:13px 18px !important;
  margin-top:14px !important;
  box-shadow:0 2px 6px rgba(0,107,107,0.15), inset 0 1px 0 rgba(255,255,255,0.15) !important;
}
.lcard button.btn-p:hover{
  background:var(--teal-dark) !important;
  box-shadow:0 4px 12px rgba(0,107,107,0.25), inset 0 1px 0 rgba(255,255,255,0.15) !important;
}
.lcard p:last-child{
  font-family:var(--font-body) !important;
  font-size:11px !important;
  color:var(--muted) !important;
  letter-spacing:0.04em;
  margin-top:18px !important;
}

/* ─── P0-4 Documents tab ──────────────────────────────────────────── */
.doc-drop-zone{
  border:2px dashed var(--teal);
  background:var(--surface);
  padding:24px;
  text-align:center;
  border-radius:var(--r);
  cursor:pointer;
  transition:background .15s, border-color .15s;
}
.doc-drop-zone:hover,
.doc-drop-zone:focus-visible{
  background:var(--teal-light);
  border-color:var(--teal-dark);
  outline:none;
}
.doc-drop-zone.is-dragging{
  background:var(--teal-light);
  border-color:var(--teal-dark);
  border-style:solid;
}
.doc-drop-zone[aria-disabled="true"]{
  opacity:.5;
  cursor:not-allowed;
  pointer-events:none;
}
.docs-table{
  table-layout:fixed;
  width:100%;
  border-collapse:collapse;
}
.docs-table-wrap{ overflow-x:auto; }   /* safety net on narrow viewports */
.docs-table th{
  background:var(--bg);
  color:var(--text);
  font-weight:600;
  text-align:left;
  padding:8px 12px;
  border-bottom:1px solid var(--border);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.4px;
}
.docs-table td{
  padding:8px 12px;
  vertical-align:middle;
  border-bottom:1px solid var(--border);
  word-break:break-word;
  overflow-wrap:anywhere;
}
.docs-table tr:hover td{ background:rgba(0,107,107,0.04); }
.docs-table td.docs-actions{
  white-space:nowrap;
  text-align:right;
}
.docs-table td.docs-actions .btn{ margin-left:6px; }
.docs-empty{
  padding:32px 24px;
  text-align:center;
  color:var(--muted);
}
.doc-type-chip{
  display:inline-block;
  padding:2px 8px;
  border-radius:12px;
  background:var(--teal-light);
  color:var(--teal-dark);
  font-size:11px;
  font-weight:600;
  white-space:nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AGENT CHAT — full-page chat surface, warm-cream theme, smooth + rounded
   2026-05-28 (Phase 1: full page only; right-rail drawer is Phase 2)
   ═══════════════════════════════════════════════════════════════════════════ */

#main[data-page="agent-chat"] .content { padding:0; background:var(--bg); }
body[data-page="agent-chat"] { overflow:hidden; }

.ag-wrap{
  display:flex;flex-direction:column;
  height:calc(100dvh - 60px);
  max-width:840px;margin:0 auto;
  padding:0 24px 24px;
  font-family:'DM Sans',sans-serif;
}

/* Header / top of chat */
.ag-hdr{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 4px 14px;
  border-bottom:1px solid var(--border);
  margin-bottom:18px;
}
.ag-title{display:flex;align-items:center;gap:12px;}
.ag-avatar{
  width:34px;height:34px;border-radius:50%;
  background:linear-gradient(135deg,var(--teal),var(--teal-mid));
  color:#fff;font-weight:700;font-size:13px;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 2px 6px rgba(0,107,107,0.25);
  letter-spacing:0.5px;
}
.ag-title-text{display:flex;flex-direction:column;line-height:1.2;}
.ag-title-text .h{font-size:15px;font-weight:700;color:var(--text);}
.ag-title-text .s{font-size:11px;color:var(--muted);}
.ag-actions{display:flex;gap:8px;}
.ag-new-btn{
  background:transparent;border:1px solid var(--border);
  color:var(--muted);font-size:12px;font-weight:600;
  padding:7px 12px;border-radius:8px;cursor:pointer;
  font-family:inherit;
  transition:background .15s ease-out,color .15s ease-out,border-color .15s ease-out;
}
.ag-new-btn:hover{border-color:var(--teal);color:var(--teal);background:var(--teal-light);}

/* Scrollable message list */
.ag-feed{
  flex:1;overflow-y:auto;
  padding:6px 6px 18px;
  scroll-behavior:smooth;
  scrollbar-width:thin;scrollbar-color:var(--border) transparent;
}
.ag-feed::-webkit-scrollbar{width:8px;}
.ag-feed::-webkit-scrollbar-track{background:transparent;}
.ag-feed::-webkit-scrollbar-thumb{background:var(--border);border-radius:8px;}

/* Empty state */
.ag-empty{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:20px;text-align:center;padding:32px 16px;
  animation: ag-fadein .3s ease-out;
}
.ag-empty .hi{
  width:64px;height:64px;border-radius:50%;
  background:linear-gradient(135deg,var(--teal),var(--teal-mid));
  color:#fff;font-size:28px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 24px rgba(0,107,107,0.22);
}
.ag-empty .ttl{font-size:20px;font-weight:700;color:var(--text);letter-spacing:-0.2px;}
.ag-empty .sub{font-size:13px;color:var(--muted);max-width:420px;line-height:1.55;}
.ag-empty .chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;max-width:560px;margin-top:6px;}
.ag-empty .chips button{
  background:var(--surface);border:1px solid var(--border);
  color:var(--text);font-size:13px;font-weight:500;font-family:inherit;
  padding:9px 14px;border-radius:999px;cursor:pointer;
  transition:transform .12s ease-out,background-color .15s ease-out,border-color .15s ease-out,box-shadow .15s ease-out;
  box-shadow:var(--sh);
}
.ag-empty .chips button:hover{
  background:var(--teal-light);border-color:var(--teal);color:var(--teal-dark);
  transform:translateY(-1px);
}

/* Messages */
.ag-msg{
  margin:14px 0;display:flex;gap:11px;align-items:flex-start;
  animation: ag-msg-in .25s ease-out;
}
.ag-msg.usr{justify-content:flex-end;}
.ag-msg .av{
  width:30px;height:30px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  font-size:11px;font-weight:700;letter-spacing:0.3px;
}
.ag-msg.usr .av{background:var(--teal-dark);color:#F3EEE5;order:2;}
.ag-msg.bot .av{background:linear-gradient(135deg,var(--teal),var(--teal-mid));color:#fff;}
.ag-msg .body{
  max-width:78%;padding:11px 15px;
  border-radius:16px;
  font-size:14.5px;line-height:1.55;
  word-wrap:break-word;overflow-wrap:break-word;
}
.ag-msg.usr .body{
  background:var(--teal);color:#F3EEE5;
  border-bottom-right-radius:5px;
}
.ag-msg.bot .body{
  background:var(--surface);border:1px solid var(--border);color:var(--text);
  border-bottom-left-radius:5px;
  box-shadow:var(--sh);
}
.ag-msg.bot .body p{margin:0 0 8px;}
.ag-msg.bot .body p:last-child{margin-bottom:0;}
.ag-msg.bot .body strong{color:var(--teal-dark);font-weight:700;}
.ag-msg.bot .body table{margin:8px 0;font-size:13px;border-collapse:collapse;}
.ag-msg.bot .body table th,.ag-msg.bot .body table td{padding:5px 10px;border:1px solid var(--border);text-align:left;}
.ag-msg.bot .body table th{background:var(--teal-light);color:var(--teal-dark);font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.4px;}
.ag-msg.bot .body ul,.ag-msg.bot .body ol{margin:6px 0 8px 22px;}
.ag-msg.bot .body li{margin:3px 0;}
.ag-msg.bot .body code{background:#F3EEE5;color:var(--teal-dark);padding:1px 5px;border-radius:4px;font-family:'DM Mono',monospace;font-size:12.5px;}
.ag-msg.bot .body pre{background:#2C2A23;color:#F3EEE5;padding:11px 14px;border-radius:8px;font-family:'DM Mono',monospace;font-size:12.5px;overflow-x:auto;line-height:1.5;margin:8px 0;}

/* Tool / status chip — collapsed, human-readable */
.ag-tool{
  display:inline-flex;align-items:center;gap:8px;
  margin:6px 0;padding:7px 12px;
  background:var(--teal-light);
  border:1px solid rgba(0,107,107,0.15);
  border-radius:999px;
  color:var(--teal-dark);font-size:12px;font-weight:500;
  animation: ag-tool-in .25s ease-out;
  max-width:100%;
}
.ag-tool .dot{width:6px;height:6px;border-radius:50%;background:var(--teal);animation: ag-pulse 1s ease-in-out infinite;flex-shrink:0;}
.ag-tool.done{background:#F0EBE0;border-color:var(--border);color:var(--muted);}
.ag-tool.done .dot{background:var(--green);animation:none;}
.ag-tool .lbl{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* Thinking dots — shown before any text/tool arrives */
.ag-thinking{
  display:inline-flex;align-items:center;gap:4px;
  padding:9px 14px;background:var(--surface);
  border:1px solid var(--border);border-radius:16px;border-bottom-left-radius:5px;
  box-shadow:var(--sh);
}
.ag-thinking span{
  width:6px;height:6px;border-radius:50%;background:var(--muted);opacity:.55;
  animation: ag-bounce 1.1s ease-in-out infinite;
}
.ag-thinking span:nth-child(2){animation-delay:.18s;}
.ag-thinking span:nth-child(3){animation-delay:.36s;}

/* Streaming caret */
.ag-caret{display:inline-block;width:2px;height:1em;background:var(--teal);margin-left:1px;vertical-align:middle;animation: ag-blink 1s steps(1) infinite;}

/* Input bar */
.ag-input-wrap{
  border-top:1px solid var(--border);
  padding:14px 0 18px;
  background:linear-gradient(to top,var(--bg) 60%,transparent);
}
.ag-hint:empty,.ag-hint:has(>span:empty:only-child),.ag-hint{display:none;}
.ag-input-row{
  display:flex;align-items:flex-end;gap:10px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:18px;
  padding:8px 8px 8px 16px;
  box-shadow:var(--sh);
  transition:border-color .15s ease-out,box-shadow .15s ease-out;
}
.ag-input-row:focus-within{border-color:var(--teal);box-shadow:0 0 0 3px rgba(0,107,107,0.12);}
.ag-input{
  flex:1;border:none;background:transparent;outline:none;resize:none;
  font-family:inherit;font-size:14.5px;color:var(--text);line-height:1.5;
  padding:9px 0;min-height:24px;max-height:160px;
  overflow-y:auto;
}
.ag-input::placeholder{color:var(--muted);opacity:.85;}
.ag-send{
  background:var(--teal);color:#fff;border:none;
  width:36px;height:36px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;flex-shrink:0;
  transition:transform .12s ease-out,background-color .15s ease-out;
  font-size:16px;
}
.ag-send:hover{background:var(--teal-dark);transform:scale(1.05);}
.ag-send:disabled{background:var(--border);color:var(--muted);cursor:not-allowed;transform:none;}
.ag-send svg{width:18px;height:18px;}

.ag-hint{font-size:11px;color:var(--muted);margin:6px 4px 0;display:flex;justify-content:space-between;}
.ag-hint kbd{
  background:#F3EEE5;border:1px solid var(--border);border-bottom-width:2px;
  border-radius:4px;padding:1px 5px;font-family:'DM Mono',monospace;font-size:10px;color:var(--muted);
}

/* Error toast inline */
.ag-err{
  background:var(--red-light);border:1px solid rgba(192,57,43,0.25);
  color:var(--red);font-size:13px;padding:10px 14px;border-radius:10px;margin:8px 0;
  display:flex;align-items:flex-start;gap:8px;
}

/* Animations */
@keyframes ag-fadein   { from{opacity:0;transform:translateY(4px);} to{opacity:1;transform:none;} }
@keyframes ag-msg-in   { from{opacity:0;transform:translateY(8px);} to{opacity:1;transform:none;} }
@keyframes ag-tool-in  { from{opacity:0;transform:translateY(2px) scale(.96);} to{opacity:1;transform:none;} }
@keyframes ag-pulse    { 0%,100%{opacity:.5;transform:scale(.9);} 50%{opacity:1;transform:scale(1.15);} }
@keyframes ag-bounce   { 0%,80%,100%{transform:translateY(0);opacity:.5;} 40%{transform:translateY(-4px);opacity:1;} }
@keyframes ag-blink    { 0%,50%{opacity:1;} 51%,100%{opacity:0;} }

/* Mobile */
@media (max-width: 700px) {
  .ag-wrap{padding:0 14px;}
  .ag-msg .body{max-width:88%;}
}

/* AGENT CHAT — rich rendering blocks (action buttons, citation chips, sparklines, KPIs, followups) */
.ag-msg.bot .bot-col{display:flex;flex-direction:column;gap:6px;max-width:78%;min-width:0;}
.ag-msg.bot .bot-col .body{max-width:none;}

/* Action button — inline within the body */
.ag-act{
  display:inline-flex;align-items:center;gap:6px;
  margin:6px 8px 4px 0;
  padding:7px 13px;
  background:var(--teal);color:#fff;border:none;border-radius:999px;
  font-family:inherit;font-size:12.5px;font-weight:600;cursor:pointer;letter-spacing:.1px;
  white-space:nowrap;vertical-align:middle;
  box-shadow:0 1px 0 rgba(0,0,0,0.04),0 1px 3px rgba(0,107,107,0.18);
  transition:transform .12s ease-out,background-color .15s ease-out,box-shadow .15s ease-out;
}
.ag-act:hover{background:var(--teal-dark);transform:translateY(-1px);box-shadow:0 2px 6px rgba(0,107,107,0.25);}
.ag-act:active{transform:translateY(0);}
.ag-act .ic{font-size:13px;line-height:1;}

/* Action-row — when one or more action buttons appear alone on a line, give
   them a proper block container so they don't crowd the paragraph above. */
.ag-act-row{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 12px;}
.ag-act-row .ag-act{margin:0;}
.ag-msg.bot .body .ag-act-row + p,
.ag-msg.bot .body .ag-act-row + h1,
.ag-msg.bot .body .ag-act-row + h2,
.ag-msg.bot .body .ag-act-row + h3{margin-top:6px;}

/* Citation chip */
.ag-src{
  display:inline-flex;align-items:center;gap:4px;
  margin:0 2px;padding:2px 8px 2px 7px;
  background:#F3EEE5;border:1px solid var(--border);border-radius:999px;
  font-size:11.5px;font-weight:600;color:var(--muted);cursor:pointer;
  text-decoration:none;font-family:'DM Mono',monospace;
  transition:background-color .15s ease-out,color .15s ease-out,border-color .15s ease-out;
  vertical-align:1px;
}
.ag-src:hover{background:var(--teal-light);border-color:var(--teal);color:var(--teal-dark);}

/* Sparkline */
.ag-spark{
  display:inline-flex;align-items:center;gap:6px;
  margin:0 4px;padding:3px 9px 3px 6px;
  background:var(--surface);border:1px solid var(--border);border-radius:8px;
  vertical-align:middle;line-height:1;
}
.ag-spark svg{display:block;}
.ag-spark .last{font-family:'DM Mono',monospace;font-weight:700;font-size:12px;color:var(--text);}
.ag-spark .lbl{font-size:10.5px;color:var(--muted);font-weight:500;text-transform:uppercase;letter-spacing:.4px;}

/* KPI strip */
.ag-kpi{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;}
.ag-kpi-pill{
  display:inline-flex;align-items:baseline;gap:7px;
  padding:7px 14px;
  background:var(--teal-light);border:1px solid rgba(0,107,107,0.18);border-radius:10px;
}
.ag-kpi-pill .v{font-family:'DM Mono',monospace;font-weight:700;font-size:17px;color:var(--teal-dark);letter-spacing:-0.3px;}
.ag-kpi-pill .l{font-size:11px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.4px;}

/* Follow-up chips — appear under the bot bubble after streaming settles */
.ag-followups{
  display:flex;flex-wrap:wrap;gap:6px;
  margin-top:6px;padding-left:2px;
  animation: ag-fadein .3s ease-out;
}
.ag-followups button{
  background:var(--surface);border:1px solid var(--border);
  color:var(--muted);font-size:12px;font-weight:500;font-family:inherit;
  padding:6px 12px;border-radius:999px;cursor:pointer;
  transition:background-color .15s ease-out,border-color .15s ease-out,color .15s ease-out,transform .12s ease-out;
}
.ag-followups button:hover{
  background:var(--teal-light);border-color:var(--teal);color:var(--teal-dark);
  transform:translateY(-1px);
}
.ag-followups button::before{content:"↳ ";opacity:.55;}

.ag-msg.bot .body hr{border:none;border-top:1px solid var(--border);margin:10px 0;}
.ag-msg.bot .body p{margin:0 0 8px;}
.ag-msg.bot .body p:last-child{margin-bottom:0;}
.ag-msg.bot .body p strong:first-child{color:var(--teal-dark);}

.ag-tool .ct{color:var(--teal-dark);background:rgba(0,107,107,0.08);padding:1px 6px;border-radius:6px;font-family:'DM Mono',monospace;font-size:10.5px;margin-left:4px;font-weight:700;letter-spacing:.2px;}
.ag-tool.done .ct{color:var(--muted);background:rgba(0,0,0,0.04);}

.ag-msg.bot .body h1,.ag-msg.bot .body h2,.ag-msg.bot .body h3,.ag-msg.bot .body h4{
  color:var(--text);font-weight:700;letter-spacing:-0.2px;margin:14px 0 6px;line-height:1.3;
}
.ag-msg.bot .body h1{font-size:18px;}
.ag-msg.bot .body h2{font-size:16px;color:var(--teal-dark);}
.ag-msg.bot .body h3{font-size:14.5px;text-transform:none;}
.ag-msg.bot .body h2:first-child,.ag-msg.bot .body h3:first-child{margin-top:0;}
.ag-msg.bot .body blockquote{
  margin:8px 0;padding:8px 12px;
  background:var(--gold-light);
  border-left:3px solid var(--gold);
  border-radius:0 6px 6px 0;
  font-size:13px;color:var(--text);
}
.ag-msg.bot .body blockquote p{margin:0;}

/* In thinking-mode, the body wraps tool chips + dots tightly */
.ag-msg.bot .body.thinking-mode{display:flex;flex-direction:column;gap:4px;padding:10px 14px;}
.ag-msg.bot .body.thinking-mode .ag-tool{margin:0;align-self:flex-start;}
.ag-msg.bot .body.thinking-mode .ag-thinking{align-self:flex-start;padding:6px 0 0;background:none;border:none;box-shadow:none;}

/* The chat textarea sits inside a rounded pill that already shows focus via
   :focus-within. Suppress the global a11y rectangular outline so we don't get
   a misaligned blue rectangle on top of the rounded input. */
.ag-input:focus-visible,.ag-input:focus{outline:none;border:none;box-shadow:none;}

/* Top-bar minimization: removed the .ag-hdr row entirely. The "↻ New chat"
   button now floats in the top-right of the chat wrap; the empty state and
   feed reclaim the ~50px of vertical space the old header took. */
.ag-wrap{position:relative;}
.ag-new-btn.ag-new-float{
  position:absolute;top:2px;right:4px;z-index:5;
  padding:4px 9px;font-size:11.5px;line-height:1.3;
  background:transparent;border:none;color:var(--muted);
  opacity:.72;transition:opacity .15s ease-out,color .15s ease-out;
}
.ag-new-btn.ag-new-float:hover{
  background:transparent;border:none;color:var(--teal);opacity:1;
}
/* Pull the empty state up — it doesn't need to start below a non-existent header */
.ag-empty{padding-top:8px;}

/* ═══════════════════════════════════════════════════════════════════════
 * v6 Member Chart — shell layout (header + chart tabs + 3-col grid)
 * Tokens: maps cleanly onto the warm-calm portal palette.
 *   --teal/--teal-dark  → primary accent, tab underline, badge bg
 *   --border, --surface → cards
 *   --text, --muted     → typography
 *   --gold-light        → On Hold sand banner
 *   --red-light         → field error tints
 *   --green-light       → "Saved ✓" chips
 * ═══════════════════════════════════════════════════════════════════════ */

/* Header card (compact) */
.member-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.member-summary .spread {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
}
.member-summary .name { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.2px; }
.member-summary .meta { color: var(--muted); font-size: 11px; margin-top: 2px; }
.badge-stage {
  display: inline-block; padding: 1px 7px;
  background: var(--teal); color: #fff;
  font-size: 10px; border-radius: 3px;
  margin-left: 6px; font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: 2px;
}

/* On Hold sand banner */
.alert.sand.on-hold-banner {
  background: var(--gold-light);
  border: 1px solid var(--gold);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--r, 10px);
  margin-bottom: 12px;
  font-size: 13px;
}
.alert.sand.on-hold-banner .btn-sm {
  margin-left: 10px;
  padding: 4px 12px;
  background: var(--gold);
  color: #fff; border: none;
  border-radius: 6px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.alert.sand.on-hold-banner .btn-sm:hover { background: var(--gold-light); color: var(--text); border: 1px solid var(--gold); }

/* ── Unified tab component — chart tabs AND every sub-tab (S2/S3/S4) ─────
   Segmented "pill" tabs: the selected tab gets a soft filled chip (teal-tint
   bg + teal text + subtle ring) instead of a thin underline, so it reads as a
   clearly-selected segment. Calm, familiar, consistent at both tab levels. */
.mc-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  align-items: center;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.mc-tab {
  background: transparent; border: 1px solid transparent;
  padding: 8px 15px; cursor: pointer;
  color: var(--muted);
  border-radius: 8px;
  font-size: 13px; font-weight: 600; line-height: 1.2;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.mc-tab:hover:not(.active) { color: var(--text); background: var(--bg); }
.mc-tab.active {
  color: var(--teal-dark);
  background: var(--surface);
  border-color: rgba(0,107,107,0.28);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(42,37,29,0.10);
}
.mc-tab:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
/* Sub-tabs: a touch smaller + no divider line (they sit inside a card) */
.mc-subtabs { border-bottom: none; padding-bottom: 0; margin-bottom: 14px; }
.mc-subtabs .mc-tab { font-size: 12.5px; padding: 7px 12px; }

/* ─── HRCM 4-stream worklist: switcher (reuses .mc-tab) + sub-bucket headers ─── */
.hrcm-stream-tabs { margin: 0 0 14px; }
/* Worklist Stage chip (mockup-aligned column) — calm warm pill; Closure muted. */
.wl-stage {
  display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:600; line-height:1.3;
  padding:2px 9px 2px 2px; border-radius:11px; white-space:nowrap;
  background:var(--teal-light); color:var(--teal-dark); border:1px solid rgba(0,107,107,0.18);
}
/* Step number badge inside the stage chip — replaces dev-jargon "S0 ·" with a
   readable 1..7 of 7 (matches the chart's "Stage N — Label" wording). */
.wl-step {
  display:inline-flex; align-items:center; justify-content:center;
  width:18px; height:18px; border-radius:50%; flex:0 0 18px;
  background:var(--teal); color:#fff; font-size:10px; font-weight:700; font-variant-numeric:tabular-nums;
}
.wl-stage-s6 { background:var(--sand-d,#d9d2bf); color:var(--muted); border-color:var(--border); }
.wl-stage-s6 .wl-step { background:var(--muted); }
.iper { font-variant-numeric:tabular-nums; }
.iper small { color:var(--muted); font-size:10px; }
/* Stream 2 HEDIS gap chips (open triple-weight measures) — amber = action needed. */
.hedis-gaps { display:flex; flex-wrap:wrap; gap:3px; }
.hedis-chip { display:inline-block; font-size:10px; font-weight:700; padding:1px 7px; border-radius:9px; background:#f7eccf; color:#7a4d00; cursor:help; }
/* Control measures (BP/A1c) are clinical recheck/lab actions, not pickups → teal;
   adherence measures (statin/ACE-ARB) are refill/pickup → amber. */
/* Stream 4 (Post-Discharge/TCM) days-since-discharge chip. */
.disch-chip { display:inline-block; font-size:10.5px; font-weight:700; padding:1px 8px; border-radius:9px; white-space:nowrap; cursor:help; }
.disch-chip.disch-urgent { background:#fde3e0; color:#9a2418; }
.disch-chip.disch-soon { background:#f7eccf; color:#7a4d00; }
.disch-chip.disch-watch { background:var(--teal-light); color:var(--teal-dark); }
.hedis-chip.tw-control { background:var(--teal-light); color:var(--teal-dark); }
.hedis-chip.tw-adherence { background:#f7eccf; color:#7a4d00; }
/* Per-measure action caption shown in the Stream-2 group header. */
.sub-bucket-header td .bucket-action {
  text-transform:none; letter-spacing:0; font-weight:600; font-size:11px; margin-left:10px;
  padding:1px 8px; border-radius:8px;
}
.sub-bucket-header td .bucket-action.tw-control { background:rgba(0,107,107,0.10); color:var(--teal-dark); }
.sub-bucket-header td .bucket-action.tw-adherence { background:#f7eccf; color:#7a4d00; }
/* Open Chart action button — ghost style matching the portal. */
.wl-open {
  font-family:inherit; font-size:11.5px; font-weight:700; cursor:pointer;
  padding:5px 11px; border-radius:7px; white-space:nowrap;
  background:var(--surface); color:var(--teal); border:1px solid var(--teal);
  transition:background .12s, color .12s;
}
.wl-open:hover { background:var(--teal); color:#fff; }
/* Read-only (non-current) chart stage — preview banner was removed 2026-06-01,
   so make the inert state obvious: greyed controls + not-allowed cursor. The
   stepper still shows which stage is current; click it to edit. */
fieldset.mc-readonly-stage { opacity:.95; }
fieldset.mc-readonly-stage input,
fieldset.mc-readonly-stage textarea,
fieldset.mc-readonly-stage select {
  background:var(--sand) !important;
  color:var(--muted) !important;
  cursor:not-allowed;
}

/* MD Default Queue badges */
.mdq-badge{display:inline-block;font-size:10.5px;font-weight:700;padding:2px 9px;border-radius:11px;background:var(--teal-light);color:var(--teal-dark);}
.mdq-badge.overdue{background:#fbe3d5;color:#964219;}
.mdq-table .mdq-when{font-variant-numeric:tabular-nums;color:var(--muted);white-space:nowrap;}

.hrcm-table tr.sub-bucket-header { cursor:pointer; user-select:none; }
.hrcm-table tr.sub-bucket-header td {
  background: var(--teal-light);
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}
.hrcm-table tr.sub-bucket-header:hover td { background:#dcefef; }
.hrcm-table tr.sub-bucket-header td .bucket-caret {
  display:inline-block; margin-right:8px; font-size:10px; color:var(--teal);
  transition:transform .15s ease; transform:rotate(0deg);
}
.hrcm-table tr.sub-bucket-header.collapsed td .bucket-caret { transform:rotate(-90deg); }
.hrcm-table tr.sub-bucket-header td .sub-bucket-count {
  margin-left: 6px; color: var(--muted); font-weight: 600;
}

/* ─── HRCM dashboard Bandwidth Indicator meter ─── */
.bandwidth-meter { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.bandwidth-headline { font-size: 14px; font-weight: 700; color: var(--teal-dark); margin-bottom: 6px; }
.bandwidth-bar { height: 10px; background: var(--teal-light); border-radius: 6px; overflow: hidden; }
.bandwidth-bar > span { display: block; height: 100%; border-radius: 6px; background: var(--teal); transition: width .3s ease; }
.bandwidth-meter.ontrack  .bandwidth-bar > span { background: #2e7d5b; }
.bandwidth-meter.priority .bandwidth-bar > span { background: #c98a17; }
.bandwidth-meter.urgent   .bandwidth-bar > span { background: #b4452f; }
.bandwidth-meta { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* 3-col chart layout: 160px sidebar, fluid main, 240px right rail (denser per mockup) */
/* Two-column chart: form + single right rail (mockup-faithful). No left rail. */
.chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 14px;
  align-items: start;
}
.chart-main { min-width: 0; }
.chart-right { font-size: 11.5px; }

/* ── Consistent form controls across every stage form (S1/S2/S5/S6…) ───
   One height, one border, one radius, one focus ring — so fields don't look
   ad-hoc from stage to stage. (.s3-table inputs keep their tighter in-table
   sizing via more-specific selectors.) */
.chart-main input:not([type=checkbox]):not([type=radio]),
.chart-main select,
.chart-main textarea {
  font-family: inherit; font-size: 13px; color: var(--text);
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 6px; padding: 8px 10px;
  width: 100%; box-sizing: border-box;
}
.chart-main textarea { resize: vertical; line-height: 1.45; min-height: 64px; }
.chart-main input:focus, .chart-main select:focus, .chart-main textarea:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(0,107,107,0.12);
}
.chart-main fieldset[disabled] input,
.chart-main fieldset[disabled] select,
.chart-main fieldset[disabled] textarea { background: var(--bg); color: var(--muted); cursor: not-allowed; }
/* Consistent field label across the chart */
.chart-main .field > label,
.chart-main label.field-label {
  display: block; font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;
}
/* Consistent button height inside the chart */
.chart-main .btn { font-size: 13px; padding: 8px 14px; border-radius: 6px; line-height: 1.2; }
.chart-main .btn.btn-sm { font-size: 12px; padding: 6px 11px; }

/* Consistent solid table header for EVERY chart table (no see-through headers).
   Comes after the app's global ".content table thead th" so it wins for tables
   inside the chart; the .content .audit-table / .s3-table rules are more
   specific and keep their exact sizing. */
.chart-main table thead th {
  background: var(--teal); color: #fff;
  text-transform: uppercase; letter-spacing: 0.03em;
  font-size: 10px; font-weight: 700; padding: 7px 10px; text-align: left;
}
.chart-main table { border-collapse: collapse; }

.left-rail-panel, .right-rail-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.left-rail-panel h3, .right-rail-panel h3 {
  margin: 0 0 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}
.right-rail-panel ul { list-style: none; padding: 0; margin: 0; }
.right-rail-panel li { padding: 3px 0; font-size: 11.5px; color: var(--text); line-height: 1.4; }

/* ── Vitals card (right rail) — values + sparkline + delta + actions ──── */
.vitals-card .vc-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
}
.vitals-card .vc-label { color: var(--muted); font-weight: 600; font-size: 11px; }
.vitals-card .vc-spark { display: flex; align-items: center; min-height: 16px; }
.vitals-card .vc-val { font-weight: 700; font-size: 13px; text-align: right; white-space: nowrap; }
.vitals-card .vc-unit { font-weight: 400; font-size: 10px; color: var(--muted); }
.vitals-card .vc-arrow { font-size: 10px; font-weight: 700; margin-left: 4px; }
.vitals-card .vc-source { font-size: 10px; margin-top: 5px; }
.vitals-card .vc-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.vitals-card .vc-actions .btn { width: 100%; justify-content: center; font-size: 11px; padding: 5px 8px; }
.vitals-card .vc-add { background: var(--teal); color: #fff; border: none; }

/* ── Suggestions — clinical text + sourced sub-line ──────────────────── */
.right-rail-panel .sug-list li { padding: 5px 0; border-bottom: 1px solid var(--border); }
.right-rail-panel .sug-list li:last-child { border-bottom: 0; }
.right-rail-panel .sug-src {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  font-style: italic;
}

/* ── SOAP entries in the S4 notes timeline ───────────────────────────── */
.soap-entry { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.soap-entry:last-child { border-bottom: 0; }
.soap-tag {
  display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  background: var(--teal); color: #fff; padding: 1px 5px; border-radius: 4px; vertical-align: middle;
}
.soap-tag.note-tag { background: var(--muted); }
.soap-vitals { font-size: 11px; color: var(--teal-dark, var(--teal)); font-weight: 600; margin: 2px 0 4px; }
.soap-line { padding: 1px 0; line-height: 1.45; }
.soap-line .soap-k { display: inline-block; width: 14px; font-weight: 700; color: var(--muted); }

@media (max-width: 1100px) {
  .chart-layout { grid-template-columns: 1fr; }
  .chart-right { order: 2; }
}

/* ── v6-mc UX primitives: field, skeleton, sparkline, sign modal ────────── */
.field { margin-bottom: 12px; }
.field label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.field .field-saved {
  font-size: 10px; font-weight: 500; color: var(--green);
  text-transform: none; letter-spacing: 0;
  background: var(--green-light); padding: 1px 6px; border-radius: 3px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text);
  font-size: 13px; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,107,107,.12);
}
.field.has-error input, .field.has-error select, .field.has-error textarea {
  border-color: var(--red);
}
.field-error {
  display: block; color: var(--red); font-size: 11px; margin-top: 4px; font-weight: 500;
}
.field-hint { color: var(--muted); font-size: 11px; margin-top: 4px; }

/* Loading skeleton — animated shimmer */
.mc-skeleton { padding: 12px 0; }
.mc-skel-line {
  height: 12px; margin-bottom: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--border) 0%, var(--bg) 50%, var(--border) 100%);
  background-size: 200% 100%;
  animation: mc-shimmer 1.4s ease-in-out infinite;
}
.mc-skel-line:nth-child(2) { width: 86%; }
.mc-skel-line:nth-child(3) { width: 64%; }
@keyframes mc-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Sparkline (inline SVG) */
.mc-spark { vertical-align: middle; }

/* Sign & Lock modal */
.mc-sign-modal { padding: 6px 4px; }
.mc-sign-summary {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px;
  font-size: 13px; color: var(--text);
  max-height: 280px; overflow-y: auto;
  margin-bottom: 12px;
}
.mc-sign-summary ul, .mc-sign-summary ol { margin: 6px 0; padding-left: 18px; }
.mc-sign-summary li { margin-bottom: 4px; }
.mc-sign-attest {
  background: var(--gold-light); border: 1px solid var(--gold);
  border-radius: 8px; padding: 10px 12px;
}

/* ── Stage stepper — calm label pills + arrows (mockup style) ──────────── */
.stage-strip {
  display: flex; align-items: center;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.stage-strip::-webkit-scrollbar { height: 5px; }
.stage-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.stage-step {
  display: inline-flex; align-items: center;
  padding: 7px 14px;
  border-radius: 18px;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  background: var(--bg);
  color: var(--muted);
  white-space: nowrap;
  border: 1px solid transparent;
  flex-shrink: 0;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.stage-step:hover:not(.current) { color: var(--text); border-color: var(--border); }

/* Completed — filled green pill with the ✓ */
.stage-step.complete {
  background: var(--green); color: #fff; border-color: var(--green);
}

/* Current — filled teal pill ("you are here / editable") */
.stage-step.current {
  background: var(--teal); color: #fff; border-color: var(--teal);
  box-shadow: 0 1px 3px rgba(0,107,107,0.22);
}

/* Previewing a non-current stage — dashed teal outline */
.stage-step.viewing {
  background: var(--teal-light); color: var(--teal-dark); border: 1px dashed var(--teal);
}

/* Locked future stage — muted, still clickable for read-only preview */
.stage-step.locked { background: transparent; opacity: 0.5; }
.stage-step.locked:hover { opacity: 0.85; }

/* Arrow connector between steps */
.stage-arrow {
  color: var(--muted); font-size: 14px; line-height: 1;
  user-select: none; flex-shrink: 0; opacity: 0.6;
}

/* ── Stage preview banner (viewing a non-current stage) ───────────────── */
.stage-preview-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin-bottom: 12px;
  background: var(--teal-light, #e8f3f3);
  border: 1px solid var(--teal);
  border-radius: 8px;
  font-size: 13px; color: var(--teal-dark);
}
.stage-preview-banner .spb-eye { font-size: 15px; flex-shrink: 0; }
.stage-preview-banner .spb-text { flex: 1; line-height: 1.4; }
.stage-preview-banner .spb-go { flex-shrink: 0; white-space: nowrap; }

/* ── S0 Candidate Review — facts grid + accept CTA ────────────────────── */
.s0-intro { margin-bottom: 14px; }
.s0-intro p { font-size: 13px; line-height: 1.5; }
.s0-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px;
  padding: 14px; background: var(--bg); border-radius: 8px;
}
.s0-fact { display: flex; flex-direction: column; gap: 2px; }
.s0-fact-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.s0-fact-v { font-size: 14px; font-weight: 600; color: var(--text); }
.s0-accept-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
}
.s0-accept-btn { font-size: 14px; font-weight: 700; padding: 11px 20px; }
.s0-accept-hint { flex: 1; min-width: 220px; font-size: 12px; color: var(--muted); line-height: 1.45; }
@media (max-width: 640px) { .s0-facts { grid-template-columns: 1fr; } }

/* Stage card body (form container) — compact per mockup */
.card.stage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.card.stage-card h3 { font-size: 13px; margin: 0 0 6px; }
.card.stage-card h4 { font-size: 12px; margin: 10px 0 4px; font-weight: 700; }
.card.stage-card .muted { font-size: 11px; }

/* Advance bar (bottom of stage view) */
.stage-advance-bar {
  display: flex; align-items: center;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 8px;
  margin-top: 12px;
}
.stage-advance-bar .btn.primary {
  background: var(--teal); color: #fff; border: none;
  padding: 8px 14px; border-radius: 6px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.stage-advance-bar .btn.primary:hover { background: var(--teal-dark); }
.stage-advance-note {
  padding: 12px 14px; background: var(--gold-light);
  border-left: 3px solid var(--gold); border-radius: 6px;
  font-size: 12px; margin-top: 12px;
}

/* ── v6-mc left-rail vitals widget ─────────────────────────────────────── */
.lr-vital-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.lr-vital-row:last-of-type { border-bottom: none; }
.lr-vital-label {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
}
.lr-vital-val { font-size: 13px; font-weight: 700; }
.lr-vital-unit { font-size: 10px; font-weight: 500; color: var(--muted); }
.lr-vital-arrow {
  margin-left: 6px; font-size: 10px; font-weight: 700;
}

/* ── v6-mc Audit Trail table ────────────────────────────────────────── */
.audit-card { padding: 12px 14px; }
.audit-scroll {
  max-height: 540px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface);
}
.audit-table {
  width: 100%; border-collapse: collapse;
  font-size: 11.5px; color: var(--text);
}
/* .content prefix beats the app's global ".content table thead th" theme. */
.content .audit-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--teal); color: #fff;
  text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 10px; font-weight: 700;
  padding: 8px 12px; text-align: left;
  border-bottom: 1px solid var(--teal);
}
.content .audit-table tbody tr:nth-child(even) td { background: var(--bg); }
.audit-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .12s ease;
}
.audit-table tbody tr:last-child { border-bottom: none; }
.audit-table tbody tr:hover { background: var(--bg); }
.audit-table tbody td {
  padding: 8px 12px; vertical-align: top; line-height: 1.4;
}
.audit-when { white-space: nowrap; }
.audit-when .audit-rel {
  font-weight: 600; color: var(--text); font-size: 11.5px;
}
.audit-when .audit-abs {
  font-family: DM Mono, monospace; color: var(--muted); font-size: 10px; margin-top: 1px;
}
.audit-chip {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.02em; line-height: 1.3;
}
.audit-detail {
  font-family: DM Mono, monospace; color: var(--muted);
  font-size: 11px; word-break: break-word;
}

/* ── v6-mc S3 Care Plan tables (mockup-faithful) ─────────────────────── */
.s3-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px; margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden;
}
.content .s3-table thead th {
  background: var(--teal); color: #fff;
  text-transform: uppercase; letter-spacing: 0.03em;
  font-size: 10px; font-weight: 700;
  padding: 8px 10px; text-align: left;
  border-bottom: 1px solid var(--teal);
}
.s3-table tbody td {
  padding: 6px 10px; vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
.s3-table tbody tr:last-child td { border-bottom: none; }
.s3-table input[type=text], .s3-table input[type=date], .s3-table input[type=number],
.s3-table select, .s3-table textarea {
  width: 100%; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: 4px;
  background: var(--surface); color: var(--text);
  font-size: 12px; font-family: inherit;
}
.s3-table textarea { resize: vertical; line-height: 1.35; }
.s3-table input:focus, .s3-table select:focus, .s3-table textarea:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(0,107,107,0.12);
}
.s3-table td.row-action { width: 32px; text-align: center; }
.btn-row-del {
  background: transparent; border: none; color: var(--red);
  font-size: 16px; line-height: 1; cursor: pointer;
  padding: 2px 6px; border-radius: 4px;
  transition: background .12s ease;
}
.btn-row-del:hover { background: var(--red-light); }

.s3-row-actions { display: flex; gap: 8px; margin-top: 8px; }

.s3-script {
  background: var(--bg);
  border-left: 3px solid var(--teal-mid);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 11.5px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* S3 Inspector summary list (Sign & Lock tab) */
.s3-inspector {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.s3-inspector-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); margin-bottom: 8px;
}
.s3-inspector-list { list-style: none; padding: 0; margin: 0; }
.s3-inspector-list li {
  display: grid; grid-template-columns: 20px 1fr auto;
  gap: 8px; align-items: baseline;
  padding: 4px 0;
  font-size: 12.5px;
}
.s3-inspector-list li.pass .s3-ck { color: var(--green); font-weight: 700; }
.s3-inspector-list li.fail .s3-ck { color: var(--red); font-weight: 700; }
.s3-inspector-list .s3-ck-detail { font-size: 11px; }

/* ════════════════════════════════════════════════════════════════════════
   HRCM calm theme — light sidebar + rails framing a calm canvas (mockup feel)
   Scoped to HRCM pages only (body[data-page^="hrcm"]); the rest of the admin
   portal keeps its dark-sidebar identity. The mockup's calm comes from light
   rails (same tone) bracketing a slightly warmer content canvas — low contrast,
   nothing fights for attention. We flip the nav text to dark for legibility.
   ════════════════════════════════════════════════════════════════════════ */
body[data-page^="hrcm"] { --hrcm-canvas: #EFEADF; }

/* The calm sand canvas the content sits on; white cards + right rail pop
   against it (the framing that makes the chart feel calm, mockup-style). */
body[data-page^="hrcm"] .content { background: var(--hrcm-canvas); }

/* Sidebar: dark, calm, warm (a touch softer than the default espresso). The
   base sidebar styles already provide light, legible text on dark — we only
   deepen/warm the background and retint the ACTIVE item to teal so it ties
   into the chart's calm teal accent instead of the default gold. */
body[data-page^="hrcm"] #sidebar { background: #2A2823; }
body[data-page^="hrcm"] #sidebar .nav-item.active {
  background: rgba(0,153,153,0.16);
  border-left-color: var(--teal-mid);
  color: #F4F1EA;
}

/* ─── Code autocomplete (ICD-10 + CPT/HCPCS) — Ann 2026-05-31 ───
   Absolutely positioned so it never shifts layout. min-width lets the menu
   spill past narrow code cells (the S3 "Linked Dx" + PA "CPT" inputs are ~90px
   wide <td>s); the menu is appended to that cell, so without min-width it would
   be clipped to 90px. --surface-2 does not exist in this stylesheet -> teal-light. */
.code-ac-menu {
  display: none; position: fixed; z-index: 10001;   /* fixed + JS coords -> escapes .s3-table overflow:hidden */
  min-width: 320px; max-width: 460px;
  background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 6px 18px rgba(42,37,29,.12);
  max-height: 280px; overflow-y: auto;
}
.code-ac-item {
  padding: 8px 12px; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.code-ac-item:hover, .code-ac-item.active { background: var(--teal-light); }
.code-ac-code { font-weight: 700; color: var(--teal-dark); font-variant-numeric: tabular-nums; white-space: nowrap; }
.code-ac-desc { color: var(--text); flex: 1; }
.code-ac-hcc {
  font-size: 11px; font-weight: 700; color: #7a4d00; background: #fbeccc;
  border-radius: 4px; padding: 1px 6px; white-space: nowrap;
}
.code-ac-encoderpro {
  display: block; padding: 7px 12px; font-size: 12px; font-weight: 600;
  color: var(--teal-dark); background: var(--teal-light);
  border-top: 1px solid var(--border); text-decoration: none; white-space: nowrap;
}
.code-ac-encoderpro:hover { text-decoration: underline; }
/* Loading / no-match status row inside the autocomplete menu. */
.code-ac-status { padding: 9px 12px; font-size: 12.5px; color: var(--muted); font-style: italic; white-space: nowrap; }

