/* ===== PayRec design system — EFF green, QuickBooks-style ===== */
:root{
  color-scheme:light;
  --green:#1E6332; --green-2:#2F8542; --green-deep:#173F22; --sher:#214A3E;
  --caramel:#C19A6B; --caramel-deep:#9E7A46;
  --bg:#F3F2EC; --surface:#FFFFFF; --surface-2:#FBFAF5; --rail:#EFEEE7;
  --ink:#17211B; --muted:#5C6B60; --faint:#8A968C; --line:#E3E6DD; --line-2:#EDEDE6;
  --good:#2F8542; --good-bg:#E7F1E8; --amber:#A9741A; --amber-bg:#FBF1DA;
  --crit:#B23B3B; --crit-bg:#F8E5E1; --info:#2C6E8F; --info-bg:#E4EFF4;
  --ring:rgba(30,99,50,.26); --shadow:0 1px 2px rgba(23,33,27,.06),0 8px 22px rgba(23,33,27,.06);
  --shadow-lg:0 14px 44px rgba(23,33,27,.16);
  --sidebar-w:238px; --font:"Jost",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--font);font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased}
.tnum{font-variant-numeric:tabular-nums}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer}
:focus-visible{outline:2px solid var(--ring);outline-offset:2px;border-radius:6px}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
svg.i{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}

.demo-ribbon{background:var(--caramel);color:#3a2a12;font-size:11.5px;font-weight:600;text-align:center;padding:4px 10px;letter-spacing:.2px;position:relative}
.demo-ribbon button{position:absolute;right:10px;top:2px;background:none;border:0;color:inherit;opacity:.6;font-size:12px}
.demo-ribbon.hide{display:none}

/* ---- shell ---- */
.shell{display:grid;grid-template-columns:var(--sidebar-w) 1fr;height:100vh;overflow:hidden;
  transition:grid-template-columns .34s cubic-bezier(.4,0,.2,1)}
/* ---------- collapsible sidebar (rail) ----------
   GEOMETRY IS LOCKED: every row has a FIXED height and the SAME vertical padding/margins in all three
   states (expanded · collapsed rail · hover-peek). Only HORIZONTAL values and text visibility change,
   so an icon never moves up or down between states — you can track it with your eye.
   Heights: brand 64 · nav-item 40 (+3 gap) · nav-group 32 (+7 top). Change them here, once. */
.brand{height:64px;box-sizing:border-box}
.nav-item{position:relative;height:40px;box-sizing:border-box;padding:0;margin-bottom:3px}
.nav-group{height:32px;box-sizing:border-box;overflow:hidden}
.sidebar{overflow-x:hidden}                       /* no stray horizontal scrollbar on the rail */

.shell.nav-collapsed{grid-template-columns:70px 1fr}
/* text gives up its SPACE as well as its opacity, otherwise it keeps pushing icons off-centre */
.shell.nav-collapsed .nav-item span,
.shell.nav-collapsed .brand-logo,
.shell.nav-collapsed .uc-name,
.shell.nav-collapsed .uc-more{opacity:0;width:0;padding:0;margin:0;overflow:hidden;white-space:nowrap;pointer-events:none}
/* collapsed = HORIZONTAL changes only (vertical padding/margins stay identical) */
.shell.nav-collapsed .brand{justify-content:center;padding-left:0;padding-right:0}
.shell.nav-collapsed .nav-item svg.i{opacity:1}
/* the group keeps its full 32px box (so nothing below shifts) — only the label is hidden, leaving
   its border-top as a clear separator with breathing room */
.shell.nav-collapsed .nav-group{padding-left:0;padding-right:0;font-size:0;line-height:0;color:transparent}
/* On the collapsed rail, hide the count badge entirely (user 2026-07-23 — the little green dot read
   as noise). It comes back as a full pill when the sidebar is expanded or peeked. */
.shell.nav-collapsed .nav-item .badge{display:none}
.nav-item span,.brand-logo,.uc-name,.uc-more{transition:opacity .26s ease}
/* ---------- hover-to-peek ----------
   While collapsed, hovering the rail temporarily shows the full menu. It OVERLAYS the content (fixed,
   above the page) rather than widening the grid — otherwise the whole app would reflow on every pass
   of the mouse. Leaving snaps back. Never peeks when pinned expanded. (Peek replaces per-icon
   tooltips — those were absolutely positioned past the rail edge and caused a horizontal scrollbar.) */
.shell.nav-collapsed .sidebar{position:fixed;left:0;top:0;bottom:0;width:70px;z-index:65;
  transition:width .34s cubic-bezier(.4,0,.2,1),box-shadow .34s}
.shell.ribbon.nav-collapsed .sidebar{top:25px}
/* ⚠️ the fixed sidebar leaves the grid flow, so .main would auto-place into column 1 (the 70px rail)
   and the 1fr column would sit empty — a blank page. Pin it to column 2. */
.shell.nav-collapsed .main{grid-column:2}
.shell.nav-collapsed.nav-peek .sidebar{width:var(--sidebar-w);box-shadow:6px 0 28px -8px rgba(0,0,0,.45)}
/* peek = restore the HORIZONTAL values only; heights/margins are untouched, so nothing moves */
.shell.nav-collapsed.nav-peek .nav-item span,
.shell.nav-collapsed.nav-peek .brand-logo,
.shell.nav-collapsed.nav-peek .uc-name,
.shell.nav-collapsed.nav-peek .uc-more{opacity:1;width:auto;overflow:visible;pointer-events:auto}
.shell.nav-collapsed.nav-peek .brand{justify-content:flex-start;padding-left:18px;padding-right:18px}
.shell.nav-collapsed.nav-peek .nav-group{padding-left:10px;padding-right:10px;font-size:10px;line-height:normal;color:#6E9079}
.shell.nav-collapsed.nav-peek .nav-item .badge{display:inline-block;position:static;width:auto;height:auto;min-width:20px;
  padding:1px 7px;border-radius:20px;font-size:10.5px;line-height:normal;box-shadow:none;margin-left:auto}
/* ---------- Simple / Advanced switch (top of the nav) ----------
   ⚠️ GEOMETRY: the wrapper is a FIXED 34px row in every rail state (expanded / collapsed / peek) —
   only which control is visible changes. If this row ever changed height, every nav icon below it
   would jump when the rail collapses or peeks (the "icons shake" bug). */
.viewsw-wrap{height:34px;box-sizing:border-box;margin:0 12px 10px;display:flex;align-items:center}
.viewsw{display:flex;width:100%;height:100%;background:rgba(255,255,255,.08);border-radius:9px;padding:3px;gap:3px;box-sizing:border-box}
.vs-b{flex:1;border:0;border-radius:7px;background:transparent;color:#BFD8C6;font-family:inherit;font-size:11.5px;
  font-weight:700;letter-spacing:.2px;cursor:pointer;padding:0;transition:background .16s,color .16s;white-space:nowrap}
.vs-b:hover{color:#fff}
.vs-b.on{background:rgba(255,255,255,.92);color:var(--green-deep)}
.viewsw-mini{display:none;width:34px;height:34px;margin:0 auto;border:0;border-radius:9px;cursor:pointer;
  background:rgba(255,255,255,.08);color:#DCEDE1;place-items:center;transition:background .14s}
.viewsw-mini:hover{background:rgba(255,255,255,.18);color:#fff}
.viewsw-mini svg.i{width:17px;height:17px}
.shell.view-advanced .viewsw-mini{background:rgba(255,255,255,.92);color:var(--green-deep)}
/* collapsed rail: the segmented control gives up its width, the mini button takes over — same 34px row */
.shell.nav-collapsed .viewsw{display:none}
.shell.nav-collapsed .viewsw-mini{display:grid}
.shell.nav-collapsed.nav-peek .viewsw{display:flex}
.shell.nav-collapsed.nav-peek .viewsw-mini{display:none}
/* Simple view hides everything marked advanced-only — no re-render needed.
   Scoped to BODY, not .shell: modals live outside the shell and must obey the switch too. */
body.view-simple [data-adv]{display:none !important}
/* the inverse: shown ONLY in Simple view (e.g. the compact "Why this score?" affordance that
   replaces the full verdict line + reason chips) */
body.view-advanced [data-simple]{display:none !important}
/* ===== daily collections line chart (dashboard, advanced view) =====
   One series in brand green — validated against the white card surface. Grid/axis are recessive;
   the hover layer (crosshair + dot + tooltip) is the interaction, not per-point labels. */
.dch-sum{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 26px;margin:10px 0 4px}
.dch-sum>div{display:flex;flex-direction:column;gap:1px}
.dch-sum .l{font-size:10.5px;text-transform:uppercase;letter-spacing:.5px;color:var(--faint)}
.dch-sum b{font-size:17px;font-weight:700}
.dch-sum .dch-tbl{margin-left:auto;color:var(--green);font-weight:600;font-size:12.5px;text-decoration:none;align-self:center}
/* ⚠️ the SVG is drawn at REAL pixel size (1 unit = 1px) — never set a fixed viewBox with
   preserveAspectRatio:none here, it stretches text and turns the hover dot into an ellipse. */
.dchart{position:relative;margin-top:10px;min-height:300px}
.dchart svg{display:block;max-width:100%;overflow:visible}
.dch-grid{stroke:var(--line-2);stroke-width:1}
.dch-ax{fill:var(--faint);font-size:11.5px;font-family:inherit;letter-spacing:.2px}
.dch-area{fill:url(#dchFill)}
.dch-line{fill:none;stroke:url(#dchStroke);stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round;
  filter:drop-shadow(0 3px 5px rgba(30,99,50,.18))}
.dch-dot{fill:#2F8542;stroke:var(--surface);stroke-width:2}
.dch-cross{stroke:var(--line);stroke-width:1;stroke-dasharray:4 4}
.dch-hit{fill:#1E6332;stroke:var(--surface);stroke-width:3;filter:drop-shadow(0 2px 4px rgba(30,99,50,.4))}
.dch-tip{position:absolute;pointer-events:none;background:var(--ink);color:#fff;border-radius:8px;padding:7px 10px;
  font-size:12px;line-height:1.35;box-shadow:0 6px 18px -6px rgba(0,0,0,.5);white-space:nowrap;z-index:3}
.dch-tip b{display:block;font-size:14px;font-variant-numeric:tabular-nums}
.dch-tip span{color:#C9D6CD;font-size:11.5px}
/* the collapse/expand control */
.side-toggle{margin-left:auto;width:26px;height:26px;flex:0 0 auto;border:0;border-radius:7px;cursor:pointer;
  background:rgba(255,255,255,.08);color:#DCEDE1;display:grid;place-items:center;transition:background .14s}
.side-toggle:hover{background:rgba(255,255,255,.18);color:#fff}
.side-toggle::before{content:"";width:9px;height:9px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:rotate(45deg) translate(1px,-1px);transition:transform .34s cubic-bezier(.4,0,.2,1)}
.shell.nav-collapsed .side-toggle{margin:0}
.shell.nav-collapsed .side-toggle::before{transform:rotate(-135deg) translate(0,-2px)}
/* while Scan Review holds it collapsed, the manual toggle is inert (it restores on leaving) */
.shell.nav-locked .side-toggle{opacity:.45;cursor:not-allowed}
@media (prefers-reduced-motion:reduce){
  .shell,.nav-item span,.nav-group,.brand-logo,.uc-name,.uc-more,.side-toggle::before{transition:none}
}
.shell.ribbon{height:calc(100vh - 25px)}
.sidebar{background:var(--green-deep);color:#DCEDE1;display:flex;flex-direction:column;overflow-y:auto}
.brand{display:flex;align-items:center;gap:11px;padding:16px 18px 14px}
.brand .mark{width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,#2F8542,#20c997);display:grid;place-items:center;color:#fff;font-weight:700;font-size:15px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)}
.brand b{font-size:17px;color:#fff;display:block;line-height:1.1}
.brand .bt span{font-size:10px;color:#8FB29A;letter-spacing:1.1px;text-transform:uppercase}
.side-nav{flex:1;padding:6px 13px}
.nav-group{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:#6E9079;padding:14px 10px 5px;font-weight:600;
  margin-top:7px;border-top:1px solid rgba(255,255,255,.09)}   /* a light rule so groups read as groups */
.nav-item{display:flex;align-items:center;gap:0;padding:0;border-radius:9px;color:#B9D2C0;font-size:13.5px;font-weight:500;transition:background .14s,color .14s}
.nav-item:hover{background:rgba(255,255,255,.07);color:#fff}
.nav-item.on{background:rgba(255,255,255,.14);color:#fff}
.nav-item svg.i{width:19px;height:19px;opacity:.92;flex:none;margin:0 12.5px}   /* 44px slot: icon x never moves */
.nav-item .badge{margin-right:11px}
.nav-item .badge{margin-left:auto;background:rgba(255,255,255,.16);color:#fff;font-size:10.5px;font-weight:700;border-radius:20px;padding:1px 7px;min-width:20px;text-align:center}
.nav-item .badge:empty{display:none}
.nav-item .badge.crit{background:var(--crit);color:#fff}
.side-foot{padding:10px 13px;border-top:1px solid rgba(255,255,255,.08)}
.userchip{display:flex;align-items:center;gap:9px}
.userchip .av{width:30px;height:30px;margin-left:7px;flex:none;border-radius:50%;background:linear-gradient(135deg,#198754,#20c997);color:#fff;display:grid;place-items:center;font-size:12px;font-weight:600}
.userchip .nm{font-size:12.5px;color:#EAF3EC}.userchip .rl{font-size:10px;color:#8FB29A}

.main{display:flex;flex-direction:column;min-width:0;overflow:hidden}
.topbar{height:56px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px;padding:0 18px;flex:none}
.icon-btn{width:36px;height:36px;border-radius:9px;border:1px solid transparent;background:transparent;color:var(--muted);display:grid;place-items:center;font-size:15px}
.icon-btn:hover{background:var(--rail);color:var(--ink)}
#menuBtn{display:none}
.searchbox{flex:1;max-width:560px;display:flex;align-items:center;gap:9px;background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:8px 12px;color:var(--faint)}
.searchbox input{border:0;background:none;outline:none;flex:1;font-family:inherit;font-size:13.5px;color:var(--ink)}
.top-right{margin-left:auto;display:flex;align-items:center;gap:12px}
/* Where am I? — the topbar always names the section + page, so a detail screen you were sent to
   (claim detail, a report, a scan job) is never anonymous (Jesus, 2026-07-22). */
.crumb{display:flex;align-items:baseline;gap:7px;font-size:13px;min-width:0;flex:none;max-width:46%}
.crumb .cb-sec{font-weight:700;color:var(--ink);white-space:nowrap;text-decoration:none}
a.cb-sec:hover{color:var(--green)}   /* the section is the way back — detail pages carry no back link */
.crumb .cb-sep{color:var(--faint);font-size:12px}
.crumb .cb-page{color:var(--muted);white-space:nowrap}
.crumb .cb-det{color:var(--green);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:1100px){.crumb .cb-det{display:none}}
@media(max-width:820px){.crumb{display:none}}
.ver{font-size:11.5px;color:var(--faint)}.ver b{color:var(--muted)}
/* flex column so full-height pages (the cockpit) can simply flex to fit — counting chrome pixels in a
   calc() is what left a 1–2px dead strip at the bottom of Scan Review (2026-07-22) */
.app-main{flex:1;min-height:0;overflow-y:auto;position:relative;display:flex;flex-direction:column}

/* ---- shared components ---- */
/* near full-width everywhere — only a slim gutter (user: "barely need 20% of the old gap") */
.wrap{max-width:none;margin:0;padding:22px 26px 48px}
.wrap-rpt{max-width:none;margin:0;padding:22px 26px 48px}
th.sortable{cursor:pointer;user-select:none;white-space:nowrap}
th.sortable:hover{color:var(--green)}
tr.rpt-total{font-weight:700;background:var(--surface-2)}
tr.rpt-total td{border-top:2px solid var(--line)}
tr.grp-hdr td{background:var(--surface-2);font-size:12.5px}
tr.grp-hdr.grp-l0 td{background:var(--good-bg);border-top:1px solid var(--line)}
tr.grp-hdr.grp-l1 td{background:var(--surface-2)}
.pg-h{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:18px;flex-wrap:wrap}
.pg-h h2{margin:0;font-size:23px;letter-spacing:-.4px}
.pg-h p{margin:4px 0 0;color:var(--muted);font-size:13px}
.btn{border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:9px 15px;border-radius:9px;font-size:13px;font-weight:600;display:inline-flex;align-items:center;gap:8px;transition:.15s}
.btn:hover{border-color:var(--green);color:var(--green)}
.btn.primary{background:var(--green);border-color:var(--green);color:#fff;box-shadow:0 2px 8px var(--ring)}
.btn.primary:hover{background:var(--green-deep);color:#fff}
.btn.ghost{background:transparent}
.btn.sm{padding:6px 11px;font-size:12px;border-radius:8px}
.btn:disabled{opacity:.5;cursor:not-allowed}
.card{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:16px 17px;box-shadow:var(--shadow)}
.card h3{margin:0 0 3px;font-size:15px}.card .csub{color:var(--muted);font-size:12px;margin-bottom:12px}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(186px,1fr));gap:14px;margin-bottom:18px}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:15px 16px;box-shadow:var(--shadow)}
.kpi .l{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.6px;display:flex;align-items:center;gap:7px}
.kpi .l .ic{width:24px;height:24px;border-radius:7px;background:var(--good-bg);color:var(--good);display:grid;place-items:center}
.kpi .v{font-size:26px;font-weight:700;margin-top:8px;letter-spacing:-.5px}
.kpi .d{font-size:12px;margin-top:3px;color:var(--muted)}
/* executive KPIs can hold big dollar figures (e.g. $1.8B) — shrink the value so it never overflows the tile */
.exec-kpis{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.exec-kpis .kpi .v{font-size:clamp(17px,1.5vw,22px);letter-spacing:-.4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kpi .d.up{color:var(--good)} .kpi .d.dn{color:var(--crit)}
.grid2{display:grid;grid-template-columns:1.6fr 1fr;gap:14px}
.grid2.even{grid-template-columns:1fr 1fr}
@media(max-width:900px){.grid2,.grid2.even{grid-template-columns:1fr}}
.pill{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;padding:2px 8px;border-radius:20px;display:inline-block}
.pill.ready,.pill.Closed{background:var(--good-bg);color:var(--good)} .pill.review{background:var(--amber-bg);color:var(--amber)}
.pill.exception{background:var(--crit-bg);color:var(--crit)} .pill.done{background:var(--good);color:#fff}
.pill.open{background:var(--amber-bg);color:var(--amber)} .pill.nopay{background:var(--line-2);color:var(--muted)}
.pill.overage{background:var(--info-bg);color:var(--info)}
.ftag{font-size:10px;padding:1px 6px;border-radius:5px;background:var(--amber-bg);color:var(--amber);font-weight:600}
.ftag.crit{background:var(--crit-bg);color:var(--crit)} .ftag.info{background:var(--info-bg);color:var(--info)}
.bars{display:flex;align-items:flex-end;gap:8px;height:152px;padding-top:10px}
.bar{flex:1;background:linear-gradient(180deg,var(--green-2),var(--green));border-radius:6px 6px 0 0;position:relative;min-height:4px;transition:.2s}
.bar:hover{filter:brightness(1.1)}
.bar span{position:absolute;bottom:-19px;left:0;right:0;text-align:center;font-size:9.5px;color:var(--faint)}
.aging{display:flex;flex-direction:column;gap:10px}
.aging .ar{display:grid;grid-template-columns:78px 1fr 86px;align-items:center;gap:10px}
.aging .arl{font-size:12px;color:var(--muted)}
.aging .art{height:9px;border-radius:6px;background:var(--line-2);overflow:hidden}
.aging .art i{display:block;height:100%;border-radius:6px}
.aging .arv{font-size:12.5px;font-weight:600;text-align:right;font-variant-numeric:tabular-nums}
.stub{padding:56px 24px;text-align:center;color:var(--faint);max-width:560px;margin:22px auto}
.stub .si{width:56px;height:56px;border-radius:15px;background:var(--good-bg);color:var(--green);display:grid;place-items:center;margin:0 auto 14px}
.stub h3{color:var(--ink);margin:0 0 6px;font-size:18px}
.stub p{margin:0 0 4px;font-size:13.5px;line-height:1.6}

/* data table */
.tablecard{background:var(--surface);border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow);overflow:hidden}
.toolbar{display:flex;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chip{border:1px solid var(--line);background:var(--surface);color:var(--muted);font-size:12px;font-weight:600;padding:5px 11px;border-radius:30px;display:inline-flex;gap:6px;align-items:center}
.chip .n{background:var(--line-2);color:var(--muted);border-radius:20px;padding:0 6px;font-size:11px}
.chip.on{background:var(--green);border-color:var(--green);color:#fff}
.chip.on .n{background:rgba(255,255,255,.25);color:#fff}
.chip.on.amber{background:var(--amber);border-color:var(--amber)} .chip.on.crit{background:var(--crit);border-color:var(--crit)}
.tbl-scroll{overflow-x:auto;max-height:calc(100vh - 320px)}
table.dt{width:100%;border-collapse:collapse;font-size:13px}
table.dt th{text-align:left;color:var(--faint);font-weight:600;font-size:10.5px;text-transform:uppercase;letter-spacing:.5px;padding:10px 12px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--surface);z-index:1;white-space:nowrap;cursor:pointer}
table.dt th:hover{color:var(--green)}
table.dt td{padding:10px 12px;border-bottom:1px solid var(--line-2);white-space:nowrap}
table.dt tr:hover td{background:var(--surface-2)}
table.dt .num{text-align:right;font-variant-numeric:tabular-nums}
.ic-badge{width:22px;height:22px;border-radius:6px;color:#fff;font-size:9px;font-weight:700;display:inline-grid;place-items:center;flex:none;vertical-align:middle;margin-right:7px}
.cellname{font-weight:600}
.muted{color:var(--muted)} .faint{color:var(--faint)}

/* ===== cockpit (agent review) ===== */
/* ONE compact row — job identity on the left, deposit + approve on the right (2026-07-22) */
.ctxbar{background:var(--surface);border-bottom:1px solid var(--line);padding:7px 16px;display:flex;
  align-items:center;gap:14px;min-height:46px;flex:none}
.ctx-id{display:flex;align-items:baseline;gap:9px;min-width:0;flex:1}
.ctx-id > b{font-size:13.5px;font-weight:700;white-space:nowrap}
.ctx-meta{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
/* ---- the pile at a glance (user, 2026-07-23) ----
   Scanned − Deposited = Remaining, with Ignored set aside. Each figure carries its own count, and
   the whole strip goes green when the pile is cleared (remaining 0, every scanned dollar deposited). */
.ctx-tally{display:flex;align-items:stretch;gap:10px;flex:0 0 auto;margin-left:auto;white-space:nowrap}
.tly{display:flex;flex-direction:column;justify-content:center;gap:1px;padding:2px 11px;border-radius:9px;
  border:1px solid transparent;background:var(--surface-2)}
.tly i{font-style:normal;font-size:9.5px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;opacity:.9}
.tly b{font-size:16px;font-weight:800;line-height:1.05}
/* the count leads its own label */
.tly u{text-decoration:none;font-size:11px;font-weight:900;font-variant-numeric:tabular-nums;margin-right:2px}
.tly-op{align-self:center;font-size:15px;font-weight:800;color:var(--faint)}
/* blue scanned · green deposited · amber remaining · red ignored */
.tly-scan{background:#eaf1fb;border-color:#bcd4f2;color:#1c4e8a}
.tly-dep{background:var(--good-bg);border-color:#b6dcc2;color:var(--green)}
.tly-rem{background:var(--amber-bg,#fdf6e3);border-color:#e8d5a0;color:#8a6410}
.tly-ign{background:var(--crit-bg);border-color:#f0c3c3;color:var(--crit)}
/* nothing left to work: remaining reads as done rather than as an outstanding amber figure */
.ctx-tally.done .tly-rem{background:var(--good-bg);border-color:#b6dcc2;color:var(--green)}
@media (max-width:1500px){ .tly b{font-size:15px} }
@media (max-width:1240px){ .tly i{display:none} .ctx-tally{gap:7px} .tly{padding:2px 8px} }
.ctx-metrics{display:flex;gap:24px}
.metric .v{font-size:19px;font-weight:600;line-height:1.1}
.metric .l{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.6px;margin-top:2px}
.metric.good .v{color:var(--good)}.metric.amber .v{color:var(--amber)}.metric.crit .v{color:var(--crit)}
/* fills whatever is left under the context bar — no pixel-counting calc(), no dead strip */
/* Column widths (user, 2026-07-23): now that the whole check fits vertically, a portrait page leaves
   a lot of dead space either side of it — so the side panels take that width back. The check itself
   doesn't shrink: it's height-constrained, so a narrower middle changes nothing about how it renders. */
.cockpit{display:grid;grid-template-columns:344px 1fr 560px;flex:1 1 auto;min-height:480px}
.pane{overflow-y:auto;overflow-x:hidden}
/* detail pane = scroll area (match/fields/inputs) + a FIXED footer (open balance + actions) */
.pane.detail{overflow:hidden;display:flex;flex-direction:column}
.detail-scroll{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:8px 12px 6px}
.queue{background:var(--rail);border-right:1px solid var(--line)}
.queue-head{padding:12px 12px 8px;position:sticky;top:0;background:var(--rail);z-index:2}
.qlist{padding:6px 8px 20px;display:flex;flex-direction:column;gap:6px}
.qcard{background:var(--surface);border:1px solid var(--line);border-radius:11px;padding:14px 12px;display:flex;gap:12px;align-items:stretch;cursor:pointer;transition:.14s;border-left-width:3px;overflow:hidden}
.qcard:hover{box-shadow:var(--shadow);transform:translateY(-1px)}
.qcard.sel{border-color:var(--green);box-shadow:0 0 0 2px var(--ring)}
.qcard.r-ready,.qcard.r-matched,.qcard.r-completed{border-left-color:var(--good)}.qcard.r-review{border-left-color:var(--amber)}.qcard.r-exception{border-left-color:var(--crit)}
.qcard.r-ignored{border-left-color:var(--line)}
.qcard.ignored{opacity:.62;background:repeating-linear-gradient(135deg,transparent,transparent 9px,rgba(0,0,0,.02) 9px,rgba(0,0,0,.02) 18px)}
.qcard.ignored .qname{text-decoration:line-through;color:var(--faint)}
/* keep amounts + pills inside their cards (no overflow) */
.qmeta .pill{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9.5px;padding:2px 8px;letter-spacing:.2px}
.conf-txt{flex:0 0 auto;white-space:nowrap}
.pf-amt{flex:0 0 auto;white-space:nowrap} .pf-row .pill{flex:0 0 auto;white-space:nowrap}
.proc-tally .pt-v{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Agent Review: keep the approve / flag / ignore buttons ALWAYS visible (sticky footer) */
/* claim-detail modal (opened from the matched-claim panel) */
.modal-claim{background:var(--surface);border-radius:14px;width:90vw;max-height:92vh;overflow:auto;position:relative;box-shadow:0 24px 70px rgba(0,0,0,.35);animation:pr-rise .22s ease both}
/* ⚠️ `button.` beats the later `.icon-btn{position:relative}` rule — without it the close button
   fell back into the flow and landed at the modal's TOP-LEFT (Jesus, 2026-07-22). */
button.modal-x{position:static;background:transparent}
/* sticky bar so the close control is always reachable while the modal body scrolls */
.modal-topbar{position:sticky;top:0;z-index:6;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:8px 12px 8px 18px;background:var(--surface);border-bottom:1px solid var(--line-2)}
.modal-topbar .mt-title{font-size:12px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--faint)}
/* every control that CLOSES something goes red on hover, app-wide */
.x-close{transition:background .13s,color .13s}
.x-close:hover{background:var(--crit-bg);color:var(--crit)}
.modal-claim .wrap{padding:14px 20px 26px;max-width:none}
.qcard.done{opacity:.55}
/* ---- queue card: thumbnail + three tidy rows (user, 2026-07-23) ----
       NAME
       insurer ................  82%    <- accuracy
       $5,028.13 ........ [MATCHED]     <- status directly beneath it
   Left column = what/who/how much, right column = how sure / what state. Every row is one line and
   ellipsises, so nothing can wrap or spill however long a name, insurer or status label gets. */
.qside{flex:none;width:66px;align-self:stretch}
.qthumb{width:66px;height:100%;min-height:82px;border-radius:7px;object-fit:cover;object-position:top;
  border:1px solid var(--line);background:#fff;display:block}
.qbody{min-width:0;flex:1;display:flex;flex-direction:column;justify-content:center;gap:4px}
.qname{min-width:0;font-weight:700;font-size:13.5px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* row 2: insurer left, accuracy right */
.qic{display:flex;align-items:baseline;justify-content:space-between;gap:8px;
  font-size:11.5px;color:var(--muted);line-height:1.3;min-width:0}
.qic-t{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qic .conf-txt{font-size:18px;font-weight:800;font-variant-numeric:tabular-nums;flex:0 0 auto;line-height:1}
.qic .conf-txt.muted{color:var(--faint)}
/* row 3: amount left, status right — never wraps */
.qmeta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:5px;flex-wrap:nowrap;min-width:0}
.qamt{font-weight:700;font-size:13.5px;white-space:nowrap;flex:0 0 auto;font-variant-numeric:tabular-nums}
.conf-txt{font-size:11px;font-weight:700;font-variant-numeric:tabular-nums}
.qflags{display:flex;gap:3px;margin-top:6px;flex-wrap:wrap}
.viewer{background:var(--surface-2);border-right:1px solid var(--line);padding:16px;display:flex;flex-direction:column;gap:12px}
/* ONE compact row — title, the check's details inline, nav pushed right (2026-07-22) */
.viewer-head{display:flex;align-items:center;gap:10px;min-height:30px}
.viewer-head h3{margin:0;font-size:14px;white-space:nowrap}
.viewer-head .meta{font-size:11.5px;color:var(--muted);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.viewer-head .viewer-nav{margin-left:auto;flex:none}
.docstage{position:relative;flex:1;display:flex;min-height:0}
/* The WHOLE check is always visible — no scrolling (user, 2026-07-23; the loupe covers reading detail).
   ⚠️ Must be FLEX centring, not grid: in an auto-sized grid row the image's own height is what sizes
   the row, so `max-height:100%` on it is circular and the browser ignores it — which is exactly why
   this pane used to scroll. A stretched flex item gives a definite height for the % to resolve against.
   ⚠️ Do NOT use object-fit here: the loupe maps cursor -> image coordinates from the <img> element's
   own rect, so the element box must stay equal to the rendered image. */
.docwrap{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;
  background:repeating-conic-gradient(var(--rail) 0% 25%,var(--surface-2) 0% 50%) 50%/22px 22px;
  border:1px solid var(--line);border-radius:12px;padding:14px;overflow:hidden}
/* Floating page tools — a faint gear in the check's lower-right that opens Rotate/Reset/Audit on hover.
   Keeps the tools reachable without a toolbar row sitting on screen at all times (user, 2026-07-22). */
.doc-tools{position:absolute;right:10px;bottom:10px;z-index:4;display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.doc-gear{width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:var(--surface);
  color:var(--muted);font-size:15px;line-height:1;cursor:pointer;opacity:.45;box-shadow:var(--shadow);
  transition:opacity .18s ease,color .18s ease,transform .18s ease}
.doc-tools:hover .doc-gear,.doc-tools:focus-within .doc-gear{opacity:1;color:var(--green);transform:rotate(45deg)}
.doc-menu{display:none;flex-direction:column;gap:2px;background:var(--surface);border:1px solid var(--line);
  border-radius:10px;padding:5px;box-shadow:var(--shadow-lg);min-width:132px}
.doc-tools:hover .doc-menu,.doc-tools:focus-within .doc-menu{display:flex}
.doc-menu button{background:none;border:0;text-align:left;font:inherit;font-size:12.5px;color:var(--ink);
  padding:7px 10px;border-radius:7px;cursor:pointer;white-space:nowrap}
.doc-menu button:hover{background:var(--good-bg);color:var(--green)}
/* no object-fit: the default scales the image to the box max-width/max-height gives it, keeping the
   element rect == the rendered image (which the loupe's coordinate maths depends on) */
.docwrap img{max-width:100%;max-height:100%;width:auto;height:auto;
  border-radius:6px;box-shadow:var(--shadow-lg);background:#fff}
.qualtag{font-size:11px;color:var(--muted);display:inline-flex;align-items:center;gap:5px;flex:none;white-space:nowrap}
.qdot{width:8px;height:8px;border-radius:50%}
.detail{background:var(--surface)}
.dsec{padding:8px 4px 10px;border-bottom:1px solid var(--line)}
.dsec h4{margin:0 0 6px;font-size:10.5px;text-transform:uppercase;letter-spacing:.9px;color:var(--faint);display:flex;align-items:center;gap:8px}
.matchcard{background:var(--surface-2);border:1px solid var(--line);border-radius:11px;padding:9px 11px}
.matchcard.strong{border-color:var(--good);background:var(--good-bg)}
.matchcard.warn{border-color:var(--amber)} .matchcard.none{border-color:var(--crit);background:var(--crit-bg)}
.mrow{display:flex;justify-content:space-between;gap:10px;font-size:12.5px;padding:1px 0;line-height:1.35}
.mrow .k{color:var(--muted)}.mrow .v{font-weight:600;text-align:right}
.mc-top{display:flex;align-items:flex-start;gap:8px}
.mclaim{font-size:15px;font-weight:700;color:var(--green);flex:1;min-width:0}
/* icon-only "open claim detail" in the card's top-right corner */
.mc-open{flex:none;width:28px;height:28px;margin:-2px -2px 0 0;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--muted);cursor:pointer;
  transition:color .15s ease,border-color .15s ease,background .15s ease}
.mc-open:hover{color:var(--green);border-color:var(--green);background:var(--good-bg)}
.mc-open svg.i{width:15px;height:15px;margin:0}
/* Matched-claim card: SIMPLE view keeps only the essentials (.mc-key) and reveals the rest on hover;
   ADVANCED view is always open. Height-agnostic 0fr→1fr grid so nothing jumps or re-orders. */
/* The matched claim is ALWAYS fully shown (user, 2026-07-23) — no hover-to-reveal in either view.
   The grid wrapper stays so the markup and its field ORDER are untouched; it is simply always open. */
.mc-more{display:grid;grid-template-rows:1fr;opacity:1}
.mc-more-in{overflow:hidden;min-height:0}
.mc-sub{margin:8px 0 3px;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.7px;color:var(--faint);border-top:1px solid var(--line-2);padding-top:6px}
/* nothing is hidden, so there is nothing to hint at */
.mc-hint{display:none}
.reasons{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}
.rc{font-size:11px;font-weight:600;padding:3px 8px;border-radius:6px;background:var(--good-bg);color:var(--good)}
.rc.cap{background:var(--amber-bg);color:var(--amber)}.rc.flag{background:var(--crit-bg);color:var(--crit)}
.fields{display:flex;flex-direction:column}
/* Extracted fields: ALWAYS fully expanded (user 2026-07-23) — in Simple view too. It used to rest on
   the amount alone and reveal the rest on hover; a reviewer checking a read against the image needs
   every field visible without hunting. The collapsed state is retired (the full list already
   contains the amount), so the hover/pinned/advanced rules below are no longer needed. */
.fields-min{display:flex;flex-direction:column;gap:4px}
.fm-amt{display:flex;align-items:center;gap:10px;padding:6px 0}
.fm-amt .fk{font-size:11.5px;color:var(--muted);flex:0 0 auto}
.fm-amt .fv{font-size:17px;font-weight:800;font-variant-numeric:tabular-nums}
.fm-amt .fv.empty{font-size:13px;font-weight:400;font-style:italic;color:var(--faint)}
.fx-hint{font-size:11.5px;color:var(--faint)}
.fx-hint.warn{color:var(--amber);font-weight:600}
.fx-more{display:block}
.fx-more-in{min-height:0}
.frow{display:grid;grid-template-columns:88px 1fr auto;align-items:center;gap:7px;padding:4px 0;border-bottom:1px dashed var(--line-2)}
.frow:last-child{border-bottom:0}
.frow .fk{font-size:11.5px;color:var(--muted)}
.frow .fv{font-size:13px;font-weight:600;word-break:break-word}
.frow .fv.empty{color:var(--faint);font-weight:400;font-style:italic}
/* ---- what the check said vs what the CLAIM holds (user, 2026-07-23) ----
   The claim's own value sits directly under the read value so the two read as a pair, and the row's
   chip states the verdict. Tinted only when it needs attention — an agreeing row stays quiet. */
/* ---- COMPARE CLAIMS modal (user, 2026-07-23) ----
   The attached claim beside up to 3 alternatives, each with the same facts + its fit, so the choice
   is made on evidence. Columns share the width evenly; the whole thing scrolls as one if it's tall. */
.modal-compare{width:94vw;max-width:1900px}
.cc-wrap{padding:18px 22px 26px}
/* what was read + why the agent scored it, side by side above the columns */
.cc-top{margin-bottom:18px}
.cc-read{background:var(--surface-2);border:1px solid var(--line);border-radius:11px;padding:12px 14px}
/* ---- AI reasoning on HOVER (user, 2026-07-23) ----
   It lives behind the confidence number instead of occupying the page. position:fixed so it escapes
   the queue's scroller and the modal's clip; JS places it beside whatever was hovered. */
.ai-chip{margin-left:auto;background:none;border:1px solid currentColor;border-radius:20px;
  padding:1px 8px;font:inherit;font-size:10px;font-weight:800;letter-spacing:.3px;cursor:help;
  text-transform:none;font-variant-numeric:tabular-nums;opacity:.9}
.ai-chip:hover{opacity:1;background:currentColor}
.ai-chip:hover{color:var(--ink)}
.conf-txt.has-ai{cursor:help}
.ai-panel{position:fixed;z-index:200;display:none;max-height:min(70vh,560px);overflow-y:auto;
  background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:13px 15px;
  box-shadow:0 22px 56px -16px rgba(0,0,0,.48);font-size:12.5px;line-height:1.5}
.ai-panel.on{display:block}
.aip-hd{font-size:10px;font-weight:800;letter-spacing:.7px;text-transform:uppercase;color:var(--faint);
  margin-bottom:7px;display:flex;align-items:center;gap:8px}
.aip-hd b{margin-left:auto;font-size:11.5px;letter-spacing:.2px;font-variant-numeric:tabular-nums}
.aip-verdict{margin:0 0 6px;font-size:13px;font-weight:700;line-height:1.4}
.ai-panel .xp-sum{margin:0 0 8px;color:var(--muted)}
.ai-panel .reasons{margin-bottom:8px}
.cc-rds{display:flex;flex-wrap:wrap;gap:8px 22px;align-items:baseline}
.cc-rd{font-size:13px;font-weight:700;color:var(--ink);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cc-rd i{font-style:normal;font-size:9.5px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:var(--faint);margin-right:6px}
.cc-sub{font-size:10px;font-weight:800;letter-spacing:.7px;text-transform:uppercase;color:var(--faint);
  margin:0 0 8px;display:flex;align-items:center;gap:8px}
.cc-col .cc-sub{margin:14px 0 7px;padding-top:11px;border-top:1px solid var(--line-2)}
/* previous payments, per column — hover the count (same as the pay bar) */
.cc-prev{position:relative;margin:10px 0 2px;min-height:18px}
.cc-prevlbl{font-size:11.5px;color:var(--muted)}
.cc-prev-none,.cc-prev-load{font-size:11.5px;color:var(--faint);font-style:italic}
.cc-prevlist{position:absolute;left:0;top:calc(100% + 6px);z-index:8;width:max(100%,560px);max-width:82vw;
  max-height:320px;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:11px;
  padding:11px 13px;box-shadow:0 18px 44px -14px rgba(0,0,0,.42)}
.cc-prevlist.hide{display:none}
.cc-col:last-child .cc-prevlist,.cc-col:nth-last-child(2) .cc-prevlist{left:auto;right:0}
.cc-cols{display:grid;gap:16px;align-items:stretch}
.cc-n1{grid-template-columns:minmax(0,460px)} .cc-n2{grid-template-columns:repeat(2,minmax(0,1fr))}
.cc-n3{grid-template-columns:repeat(3,minmax(0,1fr))} .cc-n4{grid-template-columns:repeat(4,minmax(0,1fr))}
.cc-col{border:1px solid var(--line);border-radius:13px;padding:15px 16px;background:var(--surface);min-width:0;
  display:flex;flex-direction:column;position:relative}
.cc-col.cur{border-color:var(--green);box-shadow:0 0 0 2px var(--ring)}
.cc-col.best{border-color:var(--good);background:var(--good-bg)}
.cc-col.cur.best{border-color:var(--green)}
.cc-head{border-bottom:1px solid var(--line-2);padding-bottom:11px;margin-bottom:11px}
.cc-tag{font-size:9.5px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;color:var(--faint)}
.cc-col.cur .cc-tag{color:var(--green)} .cc-col.best .cc-tag{color:var(--good)}
.cc-name{font-size:15px;font-weight:800;line-height:1.3;margin:4px 0 7px;word-break:break-word;min-height:2.6em}
.cc-pct{font-size:30px;font-weight:800;line-height:1;font-variant-numeric:tabular-nums}
.cc-pct i{font-style:normal;font-size:11px;font-weight:700;margin-left:3px}
.cc-facts .mrow{padding:4px 0;font-size:12.5px}
.cc-fields{display:flex;flex-direction:column;gap:4px}
.cc-f{display:grid;grid-template-columns:82px 1fr auto;gap:8px;align-items:center;font-size:12px;
  padding:6px 0;border-bottom:1px dashed var(--line-2)}
.cc-f:last-child{border-bottom:0}
.cc-fk{color:var(--muted)} .cc-fv{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cc-act{margin-top:auto;padding-top:14px}
.cc-act .btn{width:100%;justify-content:center}
.cc-none{margin-top:12px;font-size:12.5px;color:var(--muted)}
@media(max-width:1200px){ .cc-n3,.cc-n4{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media(max-width:760px){ .cc-cols{grid-template-columns:minmax(0,1fr)!important} }
/* who made the match, and how well it fits — in the section heading */
.mc-origin{font-size:9.5px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;
  border-radius:20px;padding:2px 8px;margin-left:8px;white-space:nowrap}
/* the 'Matched claim' words were dropped, so the chip now leads the row */
.dsec h4 > .mc-origin:first-child{margin-left:0}
.mc-origin.auto{background:var(--good-bg);color:var(--green);border:1px solid var(--good)44}
.mc-origin.man{background:var(--rail);color:var(--muted);border:1px solid var(--line)}
.mc-fit{font-size:11px;font-weight:800;letter-spacing:.2px;margin-left:8px;font-variant-numeric:tabular-nums;text-transform:none}
/* a closer claim exists — never auto-swapped, the reviewer decides */
.mc-better{display:flex;align-items:center;gap:9px;margin:0 0 9px;padding:7px 9px;border-radius:9px;
  background:var(--amber-bg,#fdf6e3);border:1px solid var(--amber);color:var(--amber);font-size:12px;line-height:1.4}
.mc-better svg.i{width:16px;height:16px;flex:none;margin:0}
.mc-better b{color:var(--ink)} .mc-better .mcb-name{font-weight:700;color:var(--ink)}
.mc-better .btn{flex:none;margin-left:auto}
/* the queue card flags it too, so you can spot it without opening the check */
.conf-txt .better-dot{font-style:normal;color:var(--amber);margin-left:3px;font-size:11px}
.fv-wrap{min-width:0;display:flex;flex-direction:column;gap:2px}
.fx-cmp{font-size:11.5px;color:var(--muted);word-break:break-word;line-height:1.35}
.fx-cmp i{font-style:normal;font-size:9.5px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;
  color:var(--faint);margin-right:6px}
.fx-cmp.warn{color:var(--amber)} .fx-cmp.bad{color:var(--crit);font-weight:600}
.frow.cmp-differ{background:linear-gradient(90deg,var(--crit-bg) 0,transparent 70%);border-radius:6px}
.frow.cmp-close{background:linear-gradient(90deg,var(--amber-bg,#fdf6e3) 0,transparent 70%);border-radius:6px}
.frow.cmp-differ .fk,.frow.cmp-close .fk{font-weight:600;color:var(--ink)}
/* the verdict chip belongs at the TOP of a two-line cell, not floating in the middle */
.frow:has(.fx-cmp){align-items:start}
.frow:has(.fx-cmp) .fk{padding-top:1px}
.frow.fld-med{background:linear-gradient(90deg,var(--amber-bg,#fdf6e3) 0,transparent 70%);border-radius:6px}
.frow.fld-low{background:linear-gradient(90deg,var(--crit-bg) 0,transparent 70%);border-radius:6px}
.frow.fld-low .fk,.frow.fld-med .fk{font-weight:600;color:var(--ink)}
.frow .fedit{width:100%;font-family:inherit;font-size:13px;font-weight:600;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:7px;padding:5px 8px}
.frow .fedit:focus{outline:0;border-color:var(--green);box-shadow:0 0 0 3px var(--ring)}
.fc-chip{font-size:10px;font-weight:700;letter-spacing:.3px;border:1px solid;border-radius:20px;padding:1px 7px;white-space:nowrap;justify-self:end}
/* the agreement chip carries a number, so give it tabular figures and a little more room */
.fc-chip.cmp-chip{font-size:11px;padding:2px 8px;font-variant-numeric:tabular-nums}
.fc-summary .cmp-overall{font-variant-numeric:tabular-nums}
.cdot{width:9px;height:9px;border-radius:50%;justify-self:end}
/* sub-header inside a section box (e.g. "Extracted fields" under "What the agent read") */
.dsec-sub{margin:9px 0 5px;padding-top:7px;border-top:1px solid var(--line-2);font-size:11px;text-transform:uppercase;letter-spacing:.9px;color:var(--faint);display:flex;align-items:center;gap:8px}
/* boxed section body — the same card look as .matchcard, so the detail pane reads as 3 tidy boxes:
   the matched claim, what-the-agent-read (+ extracted fields), and the payment application (+ notes) */
.dcard{background:var(--surface-2);border:1px solid var(--line);border-radius:11px;padding:9px 11px}
/* border tone mirrors .matchcard so the claim box and the read box read as one decision.
   BORDER ONLY (no background tint) — the field rows carry their own Clear/Check/Verify chips. */
.dcard.strong{border-color:var(--good)} .dcard.warn{border-color:var(--amber)} .dcard.none{border-color:var(--crit)}
.dcard .dsec-sub:first-child{margin-top:0;padding-top:0;border-top:0}
.dsec-act{font-weight:600;color:var(--green);cursor:pointer;font-size:11px}
.dsec-act.muted{color:var(--muted)}
.dsec-act:hover{text-decoration:underline}
.fc-summary{font-size:11.5px;padding:5px 9px;border-radius:8px;margin-bottom:6px;background:var(--surface-2);color:var(--muted)}
.fc-summary.warn{background:var(--crit-bg);color:var(--crit);font-weight:600}
.fc-summary.ok{background:var(--good-bg);color:var(--green);font-weight:600}
.fc-notes{font-size:11.5px;color:var(--crit);background:var(--crit-bg);border-radius:8px;padding:7px 10px;margin-bottom:9px;display:flex;gap:6px;align-items:flex-start;line-height:1.4}
.fc-notes svg{flex:0 0 auto;width:14px;height:14px;margin-top:1px}
/* "Attach this check to a claim" (2026-07-23): the search bar sits at the TOP and the candidate list
   scrolls INSIDE its own bounded box, so a long list can never push the rest of the pane off screen. */
.srch-sec .srch-box{margin-bottom:6px}
.srch-hint{font-size:11.5px;color:var(--muted);margin:0 2px 8px}
.srch-scroll{max-height:min(52vh,460px);overflow-y:auto;overscroll-behavior:contain;
  border:1px solid var(--line);border-radius:10px;padding:4px 8px 8px;background:var(--surface-2)}
.srch-scroll .cand{background:var(--surface)}
.srch-sub{position:sticky;top:0;z-index:1;background:var(--surface-2);margin:0 -8px;padding:8px;
  font-size:10.5px;text-transform:uppercase;letter-spacing:.7px;color:var(--faint);font-weight:700;
  display:flex;align-items:center;gap:8px}
.srch-back{margin-left:auto;background:none;border:0;padding:0;cursor:pointer;color:var(--green);
  font:inherit;font-size:10.5px;font-weight:700;letter-spacing:.4px;text-transform:none}
.srch-back:hover{text-decoration:underline}
/* the action never wraps to "Use / this" */
.cand .btn{flex:none;white-space:nowrap}
.srch-box{display:flex;gap:7px;margin-bottom:10px}
.srch-box input{flex:1;font-family:inherit;font-size:13px;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:8px;padding:7px 10px}
.srch-box input:focus{outline:0;border-color:var(--green);box-shadow:0 0 0 3px var(--ring)}
.lg-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px;vertical-align:middle}
.fb-sub{font-size:10px;text-transform:uppercase;letter-spacing:.8px;color:var(--faint);font-weight:700;margin:12px 0 4px}
.fin-sep{height:1px;background:var(--line);margin:8px 0}
.fin-total{display:flex;justify-content:space-between;align-items:baseline;padding:4px 0}
.fin-total .k{font-size:13px;font-weight:600}
.fin-total .v{font-size:19px;font-weight:700;font-variant-numeric:tabular-nums}
.fin-total .v.zero{color:var(--good)}.fin-total .v.open{color:var(--amber)}
.act-row{display:flex;gap:8px;margin-top:12px}.act-row .btn{flex:1;justify-content:center}
.cand{border:1px solid var(--line);border-radius:9px;padding:9px 10px;margin-top:7px;display:flex;justify-content:space-between;align-items:center;gap:8px;cursor:pointer;background:var(--surface-2)}
.cand:hover{border-color:var(--green)}
.cand .cn{font-weight:600;font-size:13px}.cand .cs{font-size:11.5px;color:var(--muted)}
.empty-panel{padding:44px 20px;text-align:center;color:var(--faint)}

/* exceptions grid */
.exgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:14px}
.exc{background:var(--surface);border:1px solid var(--line);border-left:3px solid var(--crit);border-radius:12px;padding:13px;box-shadow:var(--shadow);display:flex;gap:11px}
.exc img{width:54px;height:68px;object-fit:cover;object-position:top;border-radius:6px;border:1px solid var(--line);flex:none;background:#fff}
.exc .exn{font-weight:600;font-size:13.5px}.exc .exr{font-size:11.5px;color:var(--muted);margin-top:2px}
.exc .exwhy{font-size:11.5px;margin-top:8px;background:var(--crit-bg);color:var(--crit);padding:5px 8px;border-radius:7px;font-weight:600}
.exc .exwhy.info{background:var(--info-bg);color:var(--info)}
/* Needs-review worklist: pending checks grouped by the scan job they came from (v38) */
.ex-count{font-size:12.5px;color:var(--muted);margin:0 0 12px;font-weight:600}
.ex-job{margin-bottom:20px}
.ex-job-h{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  padding:0 0 8px;margin-bottom:10px;border-bottom:1px solid var(--line);font-size:12.5px}
.ex-job-h .mono{font-size:13px}

/* ai ops + changelog */
.modelbar{display:flex;flex-direction:column;gap:10px}
.mb{display:grid;grid-template-columns:160px 1fr 92px;align-items:center;gap:12px}
.mb .mbn{font-size:12.5px;font-weight:600;display:flex;align-items:center;gap:7px}
.mb .mbt{height:12px;border-radius:7px;background:var(--line-2);overflow:hidden}.mb .mbt i{display:block;height:100%}
.mb .mbv{font-size:12.5px;text-align:right;font-variant-numeric:tabular-nums;color:var(--muted)}
.legend-dot{width:10px;height:10px;border-radius:3px;display:inline-block}
.budget .bt{height:14px;border-radius:8px;background:var(--line-2);overflow:hidden;margin:8px 0 6px}
.budget .bt i{display:block;height:100%;background:linear-gradient(90deg,var(--green-2),var(--green))}
.cl-list{display:flex;flex-direction:column;gap:1px}
.cl-item{display:flex;gap:14px;padding:13px 4px;border-bottom:1px solid var(--line-2)}
.cl-num{font-variant-numeric:tabular-nums;color:var(--faint);font-weight:700;font-size:13px;width:42px;flex:none}
.cl-type{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;padding:2px 8px;border-radius:20px;height:fit-content;background:var(--good-bg);color:var(--good)}
.cl-type.fix{background:var(--crit-bg);color:var(--crit)}.cl-type.polish{background:var(--info-bg);color:var(--info)}.cl-type.data{background:var(--amber-bg);color:var(--amber)}
.cl-body .cl-desc{font-size:13.5px}.cl-body .cl-meta{font-size:11.5px;color:var(--muted);margin-top:2px}

/* ---- Scan Review, small screens (user, 2026-07-23) ----
   On a laptop the three right-hand sections have to stay readable together, so the cockpit steps down
   in tiers: the columns narrow AND the type/padding compact, rather than one column just getting
   squeezed. The check itself is height-constrained, so a narrower middle costs nothing. */
@media(max-width:1600px){.cockpit{grid-template-columns:320px 1fr 520px}}
@media(max-width:1400px){
  .cockpit{grid-template-columns:280px 1fr 470px}
  .viewer{padding:12px}
  .qcard{padding:11px 10px;gap:10px}
  .qside,.qthumb{width:56px} .qthumb{min-height:70px}
  .qic .conf-txt{font-size:16px}
  .qname{font-size:12.5px} .qamt{font-size:12.5px} .qic{font-size:11px}
  .matchcard,.dcard,.paybar{padding:10px}
  .pb-f input{font-size:12.5px;padding:6px 8px}
  .pb-f > span{font-size:9.5px}
  .pb-row{gap:8px} .pb-f{flex:1 1 calc(50% - 4px)}
  .mrow{font-size:11.5px}
  .dsec h4{font-size:10px;letter-spacing:.6px}
}
@media(max-width:1250px){
  .cockpit{grid-template-columns:245px 1fr 415px}
  .frow .fk{font-size:10.5px} .frow .fv{font-size:11.5px}
  .fc-chip{font-size:9px;padding:1px 5px}
  .pb-actions .btn{font-size:11.5px;padding:6px 8px}
  .mc-key .mrow,.mc-more .mrow{line-height:1.3}
}
@media(max-width:1100px){.cockpit{grid-template-columns:240px 1fr 340px}}
@media(max-width:960px){
  :root{--sidebar-w:0px}.sidebar{position:fixed;left:-260px;top:0;bottom:0;width:238px;z-index:60;transition:left .2s}
  .sidebar.open{left:0}.shell{grid-template-columns:1fr}#menuBtn{display:grid}
  .cockpit{grid-template-columns:1fr;height:auto}.viewer,.detail{border-right:0}
}

/* ===== batch chip + processing pill (topbar) ===== */
.tag-ai{font-size:8.5px;font-weight:700;background:rgba(255,255,255,.18);color:#CFE9D8;border-radius:5px;padding:1px 5px;margin-left:5px;letter-spacing:.5px;vertical-align:middle}
.batch-chip{display:flex;align-items:center;gap:8px;background:var(--green);color:#fff;border:1px solid var(--green-deep);border-radius:10px;padding:9px 15px;font-size:13px;font-weight:700;max-width:320px;cursor:pointer;box-shadow:0 2px 6px rgba(23,63,34,.22);transition:filter .12s,transform .04s}
.batch-chip:hover{filter:brightness(1.07)}
.batch-chip:active{transform:translateY(1px)}
.batch-chip.none{background:var(--amber);color:#fff;border-color:var(--amber);box-shadow:0 2px 8px rgba(193,140,60,.32)}
.batch-chip.none:hover{filter:brightness(1.05)}
.batch-chip b{font-weight:800}
/* display-only variant: an awareness indicator, not a control — no pointer, no hover/press affordance */
.batch-chip.static{cursor:default;box-shadow:0 2px 6px rgba(23,63,34,.18)}
.batch-chip.static:hover{filter:none}
.batch-chip.static:active{transform:none}
.proc-pill{display:flex;align-items:center;gap:8px;background:var(--info-bg);color:var(--info);border:1px solid transparent;border-radius:9px;padding:7px 13px;font-size:12.5px;font-weight:700;text-decoration:none;transition:.15s}
.proc-pill .spin{width:13px;height:13px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .7s linear infinite}
.proc-pill.reading{border-color:var(--info)}
.proc-pill.done{background:var(--green);color:#fff;border-color:var(--green);box-shadow:0 3px 12px rgba(30,99,50,.35);animation:pill-shake .55s ease 3,pill-glow 1.7s ease-in-out infinite}
.proc-pill.done:hover{filter:brightness(1.07)}
@keyframes pill-shake{0%,100%{transform:translateX(0)}15%{transform:translateX(-4px)}30%{transform:translateX(4px)}45%{transform:translateX(-3px)}60%{transform:translateX(3px)}75%{transform:translateX(-2px)}}
@keyframes pill-glow{0%,100%{box-shadow:0 0 0 0 rgba(46,133,66,.5)}50%{box-shadow:0 0 0 7px rgba(46,133,66,0)}}
@keyframes spin{to{transform:rotate(360deg)}}

/* ===== payment entry (manual PayRec) ===== */
.pe-topbar{background:var(--surface);border-bottom:1px solid var(--line);padding:12px 22px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.pe-topbar .cur{display:flex;flex-direction:column}.pe-topbar .cur .t{font-size:14px;font-weight:600}.pe-topbar .cur .s{font-size:11.5px;color:var(--muted)}
.pe-search{flex:1;max-width:520px;position:relative}
.pe-search input{width:100%;border:1px solid var(--line);background:var(--surface-2);border-radius:10px;padding:10px 13px;font-family:inherit;font-size:13.5px;color:var(--ink)}
.pe-search input:focus{outline:0;border-color:var(--green);box-shadow:0 0 0 3px var(--ring)}
.pe-searchwrap{padding:16px 22px 0}
.pe-searchwrap .pe-search{max-width:640px}
.pe-results{position:absolute;top:46px;left:0;right:0;background:var(--surface);border:1px solid var(--line);border-radius:11px;box-shadow:var(--shadow-lg);max-height:340px;overflow-y:auto;z-index:20}
.pe-opt{padding:9px 13px;cursor:pointer;border-bottom:1px solid var(--line-2);display:flex;justify-content:space-between;gap:10px;font-size:13px}
.pe-opt:hover{background:var(--good-bg)}
.pe-opt .on{font-weight:600}.pe-opt .om{color:var(--muted);font-size:11.5px}
.pe-body{padding:20px 22px 22px;max-width:1180px;margin:0 auto}
.claiminfo{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:2px 18px;background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:16px 18px;box-shadow:var(--shadow)}
.ci{padding:6px 0}.ci .k{font-size:10.5px;text-transform:uppercase;letter-spacing:.5px;color:var(--faint)}
.ci .v{font-size:14.5px;font-weight:600;margin-top:2px}
.ci .v.money{font-variant-numeric:tabular-nums}.ci .v.open{color:var(--amber)}.ci .v.good{color:var(--good)}
.stop-banner{background:var(--crit);color:#fff;border-radius:11px;padding:12px 16px;margin-bottom:14px;display:flex;align-items:center;gap:12px;font-weight:600;box-shadow:var(--shadow)}
.stop-banner .si{font-size:20px}
/* block flow (NOT flex) so the leading icon + inline <b> amounts read as one sentence
   instead of each becoming a separate flex column */
.alert-inline{border-radius:10px;padding:9px 13px;margin:10px 0;font-size:12.5px;line-height:1.5}
.alert-inline svg.i,.alert-inline .i{width:15px;height:15px;display:inline-block;vertical-align:-3px;margin-right:7px}
.alert-inline b{font-variant-numeric:tabular-nums;white-space:nowrap}
.alert-inline.warn{background:var(--amber-bg);color:var(--amber)} .alert-inline.info{background:var(--info-bg);color:var(--info)} .alert-inline.crit{background:var(--crit-bg);color:var(--crit)}
/* keep footer alerts compact so the fixed action bar stays reachable */
.subform{background:var(--surface);border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow);overflow:hidden;margin-top:16px}
.subform .sf-head{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;border-bottom:1px solid var(--line)}
.subform h3{margin:0;font-size:15px}
.sf-scroll{overflow-x:auto}
table.sf{width:100%;border-collapse:collapse;font-size:13px;min-width:1040px}
table.sf th{text-align:left;color:var(--faint);font-weight:600;font-size:10px;text-transform:uppercase;letter-spacing:.5px;padding:9px 8px;border-bottom:1px solid var(--line);white-space:nowrap}
table.sf td{padding:6px 8px;border-bottom:1px solid var(--line-2);vertical-align:middle}
table.sf input,table.sf select{width:100%;border:1px solid var(--line);background:var(--surface-2);color:var(--ink);border-radius:7px;padding:6px 8px;font-family:inherit;font-size:12.5px}
table.sf input.money{text-align:right;font-variant-numeric:tabular-nums}
table.sf input:focus,table.sf select:focus{outline:0;border-color:var(--green);background:var(--surface);box-shadow:0 0 0 2px var(--ring)}
table.sf .rn{width:26px;text-align:center;color:var(--faint);font-weight:600}
table.sf .del{width:30px}
.sf-del{background:none;border:0;color:var(--faint);width:26px;height:26px;border-radius:6px}
.sf-del:hover{background:var(--crit-bg);color:var(--crit)}
.sf-add{margin:12px 16px;color:var(--green);font-weight:600;font-size:13px;background:none;border:0;display:flex;align-items:center;gap:6px}
.totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-top:16px}
.tot{background:var(--surface);border:1px solid var(--line);border-radius:11px;padding:12px 14px;box-shadow:var(--shadow)}
.tot .k{font-size:10.5px;text-transform:uppercase;letter-spacing:.5px;color:var(--muted)}
.tot .v{font-size:19px;font-weight:700;margin-top:4px;font-variant-numeric:tabular-nums}
.tot.hi{background:var(--green-deep);border-color:var(--green-deep)}.tot.hi .k{color:#9FC4AB}.tot.hi .v{color:#fff}
.tot.open .v{color:var(--amber)}.tot.closed .v{color:var(--good)}
.pe-actions{display:flex;gap:10px;margin-top:18px;align-items:center;flex-wrap:wrap}
.attach{border:1.5px dashed var(--line);border-radius:11px;padding:14px;text-align:center;color:var(--muted);font-size:12.5px;background:var(--surface-2);cursor:pointer;flex:1;min-width:220px;max-width:320px}
.attach:hover{border-color:var(--green);color:var(--green)}
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(20px);background:var(--green-deep);color:#fff;padding:13px 20px;border-radius:11px;box-shadow:var(--shadow-lg);font-weight:600;font-size:13.5px;opacity:0;transition:.3s;z-index:200;display:flex;align-items:center;gap:10px}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ===== scan processing progress ===== */
.dropzone{border:2px dashed var(--line);border-radius:16px;padding:44px 20px;text-align:center;cursor:pointer;transition:.15s;background:var(--surface)}
.dropzone:hover{border-color:var(--green);background:var(--good-bg)}
.dropzone .di{width:60px;height:60px;border-radius:16px;background:var(--good-bg);color:var(--green);display:grid;place-items:center;margin:0 auto 14px}
.proc-wrap{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:26px 24px;box-shadow:var(--shadow);max-width:760px;margin:0 auto}
.proc-ring{display:flex;align-items:center;gap:22px;margin-bottom:20px}
.proc-pct{font-size:44px;font-weight:800;color:var(--green);font-variant-numeric:tabular-nums;letter-spacing:-1px;min-width:120px}
.proc-now{font-size:14px;color:var(--muted)}.proc-now b{color:var(--ink)}
.proc-track{height:12px;border-radius:8px;background:var(--line-2);overflow:hidden;margin:6px 0 22px}
.proc-track i{display:block;height:100%;background:linear-gradient(90deg,var(--green-2),var(--green));border-radius:8px;transition:width .3s}
.proc-stages{display:flex;flex-direction:column;gap:2px}
.pstage{display:flex;align-items:center;gap:12px;padding:9px 4px;font-size:13.5px;border-bottom:1px solid var(--line-2)}
.pstage .pdot{width:22px;height:22px;border-radius:50%;border:2px solid var(--line);display:grid;place-items:center;flex:none;font-size:12px;color:var(--faint)}
.pstage.done .pdot{background:var(--good);border-color:var(--good);color:#fff}
.pstage.active .pdot{border-color:var(--green);color:var(--green)}
.pstage.active{font-weight:600}
.pstage .pmeta{margin-left:auto;font-size:11.5px;color:var(--faint)}
.proc-note{margin-top:18px;background:var(--info-bg);color:var(--info);border-radius:10px;padding:11px 14px;font-size:12.5px}
/* live scan findings feed + running tally */
.proc-ring .proc-logo{height:30px;width:auto}
.proc-pct{min-width:96px}
.proc-tally{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:10px;margin:0 0 16px}
.pt{background:var(--surface-2);border:1px solid var(--line-2);border-radius:10px;padding:9px 10px;text-align:center;transition:background .12s,border-color .12s,box-shadow .12s}
/* tally cells double as filter chips for the findings feed */
.pt-click{cursor:pointer;user-select:none}
.pt-click:hover{background:var(--surface);border-color:var(--green-2);box-shadow:var(--shadow)}
.pt.on{background:var(--good-bg);border-color:var(--green);box-shadow:inset 0 0 0 1px var(--green)}
.pt.on .pt-l{color:var(--green);font-weight:700}
.pt-v{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums}
.pt-l{font-size:11px;color:var(--muted);margin-top:1px}
.proc-findings{max-height:360px;overflow:auto;border:1px solid var(--line-2);border-radius:12px;background:var(--surface)}
/* in the two-column reading view: the progress card fills its column + the findings feed has real height */
.scan-split .proc-wrap{max-width:none;margin:0}
.scan-split .proc-findings{min-height:42vh;max-height:60vh}
.scan-split{align-items:stretch}
.scan-side{max-height:none}
.pf-row{display:flex;align-items:center;gap:11px;padding:8px 12px;border-bottom:1px solid var(--line-2);border-left:3px solid transparent}
.pf-row:last-child{border-bottom:0}
.pf-row.r-ready,.pf-row.r-matched,.pf-row.r-completed{border-left-color:var(--good)}
.pf-row.r-review{border-left-color:var(--amber)}
.pf-row.r-exception{border-left-color:var(--crit)}
.pf-row.r-ignored{border-left-color:var(--line);opacity:.6}
.pf-thumb{width:44px;height:30px;object-fit:cover;border-radius:5px;background:var(--line-2);border:1px solid var(--line-2);flex:0 0 auto}
.pf-main{flex:1;min-width:0}
.pf-top{display:flex;justify-content:space-between;gap:10px;align-items:baseline}
.pf-name{font-weight:650;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pf-amt{font-size:13px;font-weight:700;flex:0 0 auto}
.pf-sub{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}
/* recent-scans table: highlight the row that's reading right now; truncate long doc names */
tr.row-reading{background:var(--info-bg,#eef4ff)}
tr.row-reading td:first-child{box-shadow:inset 3px 0 0 var(--info)}
.doc-cell{max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Scan Intake — two-column split (result/progress on the left, recent scans on the right) */
@keyframes pr-rise{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
.scan-split{display:grid;grid-template-columns:1fr 372px;gap:18px;align-items:start;animation:pr-rise .3s ease both}
.scan-side{position:sticky;top:12px}
.scan-list{display:flex;flex-direction:column;gap:8px;max-height:72vh;overflow:auto;padding-right:2px}
.scan-card{border:1px solid var(--line);border-radius:10px;padding:9px 11px;background:var(--surface);cursor:pointer;transition:border-color .16s ease,transform .16s ease,box-shadow .16s ease;animation:pr-rise .3s ease both}
.scan-card:hover{border-color:var(--green);transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.07)}
.scan-card.row-reading{border-color:var(--info);background:var(--info-bg,#eef4ff)}
.sc-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11.5px;font-weight:600}
.sc-doc{font-size:11.5px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
.sc-meta{font-size:11px;color:var(--faint);margin-top:3px}
@media(max-width:980px){.scan-split{grid-template-columns:1fr}.scan-side{position:static}}
/* subtle enter animation across the app (the "smooth transitions everywhere") */
.wrap,.ctxbar,.cockpit,.proc-wrap{animation:pr-rise .26s ease both}
.rep-card{transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.rep-card:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.08)}

/* ===== claim detail drill-down ===== */
.cd-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.cd-head .cd-title{font-size:24px;font-weight:700;letter-spacing:-.4px}
.cd-head .cd-sub{color:var(--muted);font-size:13.5px;margin-top:3px}
.cd-grid{display:grid;grid-template-columns:1.85fr 1fr;gap:14px}
@media(max-width:900px){.cd-grid{grid-template-columns:1fr}}
.people{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:560px){.people{grid-template-columns:1fr}}
.person{background:var(--surface-2);border:1px solid var(--line);border-radius:11px;padding:12px}
.person .pr-role{font-size:10px;text-transform:uppercase;letter-spacing:.6px;color:var(--faint)}
.person .pr-name{font-size:15px;font-weight:600;margin-top:3px}
.person .pr-line{font-size:12px;color:var(--muted);margin-top:2px}
/* a party card that links to a REAL record (decedent / IC / beneficiary) — v39 */
.person.linked{cursor:pointer;transition:border-color .15s, box-shadow .15s, transform .15s}
.person.linked:hover{border-color:var(--green);box-shadow:0 4px 14px rgba(30,99,50,.13);transform:translateY(-1px)}
.person .pr-role{display:flex;align-items:center;justify-content:space-between;gap:6px}
.person .pr-go{color:var(--green);font-weight:700;letter-spacing:0;text-transform:none;font-size:11px;opacity:0;transition:opacity .15s}
.person.linked:hover .pr-go{opacity:1}
/* party detail modal (decedent / beneficiary / insurance company) */
.party-modal{background:var(--surface);border-radius:14px;width:min(560px,94vw);max-height:88vh;display:flex;flex-direction:column;
  box-shadow:0 24px 70px rgba(0,0,0,.35);animation:pr-rise .2s ease both}
.party-modal .modal-h{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 18px 12px;border-bottom:1px solid var(--line)}
.party-modal .modal-h h3{margin:0;font-size:17px}
.party-modal .modal-b{padding:14px 18px 20px;overflow:auto}
.party-modal .mrow .v{text-align:right}
.doc-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--line-2);font-size:13px}
.doc-row .dot{width:8px;height:8px;border-radius:50%;flex:none}
.fundbar{display:flex;height:30px;border-radius:8px;overflow:hidden;margin:6px 0 12px;border:1px solid var(--line)}
.fundbar div{display:grid;place-items:center;font-size:11px;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden}

/* ===== audit drawer ===== */
.drawer-ov{position:fixed;inset:0;background:rgba(10,20,14,.44);opacity:0;pointer-events:none;transition:.2s;z-index:150}
.drawer-ov.show{opacity:1;pointer-events:auto}
.drawer{position:fixed;top:0;right:0;bottom:0;width:440px;max-width:94vw;background:var(--surface);border-left:1px solid var(--line);box-shadow:var(--shadow-lg);transform:translateX(100%);transition:transform .25s;z-index:151;display:flex;flex-direction:column}
.drawer.show{transform:none}
.drawer-head{padding:15px 18px;border-bottom:1px solid var(--line);display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.drawer-head h3{margin:0;font-size:16px}.drawer-head .dsub{font-size:12px;color:var(--muted);margin-top:2px}
.drawer-body{overflow-y:auto;padding:16px 18px 40px;flex:1}
.tl{position:relative;padding-left:24px}
.tl:before{content:"";position:absolute;left:8px;top:4px;bottom:4px;width:2px;background:var(--line)}
.tl-item{position:relative;padding:0 0 18px}
.tl-dot{position:absolute;left:-24px;top:1px;width:18px;height:18px;border-radius:50%;background:var(--surface);border:2px solid var(--green);display:grid;place-items:center;font-size:9px;color:var(--green)}
.tl-dot.human{border-color:var(--caramel);color:var(--caramel-deep)}
.tl-dot.crit{border-color:var(--crit);color:var(--crit)}
.tl-t{font-weight:600;font-size:13.5px}.tl-time{font-size:11px;color:var(--faint);margin-top:1px}
.tl-detail{font-size:12.5px;color:var(--muted);margin-top:5px;background:var(--surface-2);border:1px solid var(--line);border-radius:9px;padding:8px 10px}
.tl-detail .kv{display:flex;justify-content:space-between;gap:10px;padding:1px 0}
.tl-detail .kv .k{color:var(--faint)}.tl-detail .kv .v{font-weight:600;font-variant-numeric:tabular-nums}
.diff{display:flex;align-items:center;gap:6px;font-size:12px}
.diff .old{color:var(--crit);text-decoration:line-through}.diff .new{color:var(--good);font-weight:600}

/* ===== mini modal (export) ===== */
.modal-ov{position:fixed;inset:0;background:rgba(10,20,14,.44);display:grid;place-items:center;z-index:160;opacity:0;pointer-events:none;transition:.15s}
/* a modal opened from inside another modal (check preview / party record) — must sit ABOVE it.
   Don't rely on DOM order: these overlays are created lazily and reused across pages. */
.modal-ov.stack-top{z-index:175;background:rgba(10,20,14,.55)}
.modal-ov.show{opacity:1;pointer-events:auto}
.modal-mini{background:var(--surface);border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow-lg);width:400px;max-width:92vw;padding:20px;transform:translateY(8px);transition:.15s}
.modal-ov.show .modal-mini{transform:none}
.modal-mini h3{margin:0 0 4px;font-size:17px}.modal-mini p{margin:0 0 16px;color:var(--muted);font-size:13px}
.fmt-row{display:flex;gap:10px}.fmt-row .btn{flex:1;justify-content:center;flex-direction:column;padding:14px 8px;gap:4px}
.fmt-row .btn b{font-size:14px}.fmt-row .btn span{font-size:11px;color:var(--muted);font-weight:400}
tr.clickrow{cursor:pointer}

/* ===== brand logo + splash ===== */
.brand-logo{height:34px;width:auto;max-width:196px;display:block}
.splash{position:fixed;inset:0;background:var(--green-deep);display:grid;place-items:center;z-index:300;transition:opacity .45s}
.splash.hide{opacity:0;pointer-events:none}
.sp-wrap{text-align:center;display:flex;flex-direction:column;align-items:center}
.sp-mark{position:relative;overflow:hidden;border-radius:16px;margin-bottom:30px;animation:pr-breathe 2s ease-in-out infinite}
.sp-mark img{width:250px;max-width:62vw;display:block}
.sp-mark::after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 38%,rgba(255,255,255,.45) 50%,transparent 62%);transform:translateX(-130%);animation:pr-shimmer 2s ease-in-out infinite}
.sp-dots{display:flex;gap:9px;justify-content:center}
.sp-dots i{width:9px;height:9px;border-radius:50%;background:#fff;opacity:.3;animation:pr-bounce 1.15s ease-in-out infinite}
.sp-dots i:nth-child(2){animation-delay:.14s}
.sp-dots i:nth-child(3){animation-delay:.28s}
.proc-logo{height:56px;width:auto;display:block;margin:2px auto 24px}

/* ===== global search results ===== */
.searchbox{position:relative}
.search-results{position:absolute;top:calc(100% + 7px);left:0;right:0;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-lg);z-index:60;overflow:hidden;max-height:60vh;overflow-y:auto}
.sr-item{display:block;padding:9px 14px;border-bottom:1px solid var(--line-2)}
.sr-item:hover{background:var(--good-bg)}
.sr-n{display:block;font-weight:600;font-size:13.5px}
.sr-m{display:block;font-size:11.5px;color:var(--muted);margin-top:2px}
.sr-empty{padding:16px;color:var(--faint);font-size:13px;text-align:center}
.sr-all{display:block;padding:10px 14px;font-weight:600;color:var(--green);font-size:12.5px;background:var(--surface-2)}
.sr-all:hover{background:var(--good-bg)}

/* ===== popover menus (columns / views) ===== */
.pop{position:relative;display:inline-block}
.pop-menu{position:absolute;top:calc(100% + 6px);right:0;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-lg);z-index:45;min-width:230px;padding:8px}
.pop-menu.hide{display:none}
.pm-h{font-size:10px;text-transform:uppercase;letter-spacing:.6px;color:var(--faint);padding:6px 8px 3px;font-weight:600}
.pm-item{display:flex;align-items:center;gap:9px;padding:6px 8px;border-radius:7px;font-size:13px;cursor:pointer}
.pm-item:hover{background:var(--surface-2)}
.pm-item input{accent-color:var(--green)}
.pm-item .del{margin-left:auto;color:var(--faint);background:none;border:0;font-size:12px}
.pm-item .del:hover{color:var(--crit)}
.pm-sep{height:1px;background:var(--line);margin:6px 0}
.pm-save{display:flex;gap:6px;padding:6px 8px}
.pm-save input{flex:1;border:1px solid var(--line);background:var(--surface-2);color:var(--ink);border-radius:7px;padding:6px 8px;font-family:inherit;font-size:12.5px}

/* ===== reports ===== */
.rep-card{cursor:pointer;transition:.15s}.rep-card:hover{border-color:var(--green);box-shadow:var(--shadow-lg);transform:translateY(-2px)}
.scorecard-bar{height:8px;border-radius:6px;background:var(--line-2);overflow:hidden;min-width:60px}
.scorecard-bar i{display:block;height:100%;border-radius:6px}

/* ===== notifications ===== */
.icon-btn{position:relative}
.notif-dot{position:absolute;top:3px;right:3px;min-width:15px;height:15px;background:var(--crit);color:#fff;font-size:9px;font-weight:700;border-radius:10px;display:grid;place-items:center;padding:0 3px;border:2px solid var(--surface)}
.notif-dot:empty{display:none}
#notifMenu{min-width:326px;max-width:360px;padding:6px}
.notif-item{display:flex;gap:11px;padding:10px 11px;border-radius:9px;align-items:flex-start}
.notif-item:hover{background:var(--surface-2)}
.ni-ic{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;flex:none;background:var(--good-bg);color:var(--good)}
.notif-item.crit .ni-ic{background:var(--crit-bg);color:var(--crit)} .notif-item.info .ni-ic{background:var(--info-bg);color:var(--info)}
.ni-b{display:flex;flex-direction:column;min-width:0}
.ni-t{font-weight:600;font-size:13px}.ni-d{font-size:11.5px;color:var(--muted);margin-top:1px}
.notif-empty{padding:26px;text-align:center;color:var(--faint);font-size:13.5px}

/* ===== document preview ===== */
.doc-preview{margin-top:14px}
.dp-page{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:26px 24px;text-align:center}
.dp-t{font-size:16px;font-weight:700;margin-bottom:6px}
.dp-meta{font-size:12.5px;color:var(--muted);line-height:1.6}
.dp-lines{margin:18px auto;max-width:280px;display:flex;flex-direction:column;gap:9px}
.dp-lines i{height:8px;border-radius:5px;background:var(--line);display:block}
.dp-lines i:nth-child(2){width:82%}.dp-lines i:nth-child(3){width:64%}.dp-lines i:nth-child(4){width:74%}
.dp-note{font-size:11.5px;color:var(--faint);font-style:italic;margin-top:6px}
.reco-ok{background:var(--good-bg);color:var(--good);padding:8px 14px;border-radius:9px;font-weight:600;font-size:13.5px}
.reco-off{background:var(--crit-bg);color:var(--crit);padding:8px 14px;border-radius:9px;font-weight:600;font-size:13.5px}

/* ===== profile menu + splash wordmark ===== */
.side-foot .userchip{position:relative}
.uc-name{min-width:0}
.uc-more{margin-left:auto;background:none;border:0;color:#8FB29A;font-size:20px;line-height:1;width:30px;height:30px;border-radius:8px;flex:none}
.uc-more:hover{background:rgba(255,255,255,.12);color:#fff}
.uc-menu{position:absolute;bottom:calc(100% + 10px);left:0;right:0;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-lg);padding:6px;z-index:80}
.uc-menu.hide{display:none}
.uc-menu button{display:block;width:100%;text-align:left;background:none;border:0;padding:9px 11px;border-radius:8px;font-size:13px;color:var(--ink);font-weight:500}
.uc-menu button:hover{background:var(--surface-2)}
.uc-menu button.danger{color:var(--crit)}
.uc-menu button.danger:hover{background:var(--crit-bg)}
.sp-word{font-size:34px;font-weight:700;color:#fff;letter-spacing:.5px;margin-bottom:22px}

/* ===== payment entry — QuickBooks style ===== */
.pe-hero{display:flex;gap:16px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:18px 20px;box-shadow:var(--shadow)}
.pe-hero-ic{width:48px;height:48px;border-radius:13px;background:var(--good-bg);color:var(--green);display:grid;place-items:center;flex:none}
.pe-hero h3{margin:0 0 3px;font-size:18px}.pe-hero p{margin:0;color:var(--muted);font-size:13px;max-width:660px}
.pe-claimcard{background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);overflow:hidden}
.pe-band{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 20px;background:linear-gradient(180deg,var(--good-bg),var(--surface));border-bottom:1px solid var(--line)}
.pe-band-name{font-size:19px;font-weight:700;letter-spacing:-.3px}
.pe-band-sub{font-size:12.5px;color:var(--muted);margin-top:3px;display:flex;align-items:center;flex-wrap:wrap}
.pe-band-r{display:flex;align-items:center;gap:12px;flex:none}
.pe-band-r .pill{font-size:11px;padding:4px 11px}
.pe-band-link{color:var(--green);font-weight:600;font-size:12.5px;white-space:nowrap}
/* fixed 3-up grid so the 6 header facts sit as two balanced rows of 3, never 5 + a lonely 1 */
.pe-claimcard .claiminfo{border:0;border-radius:0;box-shadow:none;padding:14px 20px 16px;
  grid-template-columns:repeat(3,minmax(0,1fr));row-gap:14px}
@media (max-width:720px){ .pe-claimcard .claiminfo{grid-template-columns:repeat(2,minmax(0,1fr))} }
.pe-foot{display:flex;justify-content:flex-end;margin-top:16px}
.pe-summary{width:342px;max-width:100%;background:var(--surface);border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow);padding:14px 16px}
.sum-row{display:flex;justify-content:space-between;align-items:center;padding:5px 0;font-size:13px;color:var(--muted)}
.sum-row b{color:var(--ink);font-weight:600}
.sum-div{height:1px;background:var(--line);margin:8px 0}
.sum-open{display:flex;justify-content:space-between;align-items:baseline;padding:4px 0}
.sum-open span{font-size:14px;font-weight:600}
.sum-open b{font-size:24px;font-weight:800;font-variant-numeric:tabular-nums}
.sum-open.open b{color:var(--amber)}.sum-open.closed b{color:var(--good)}
.sum-status{display:flex;justify-content:space-between;align-items:center;margin-top:8px;padding-top:8px;border-top:1px dashed var(--line-2);font-size:12.5px;color:var(--muted)}

/* ===== batch chip dropdown menu ===== */
#batchMenu{min-width:220px}
.pop-menu .mbtn{display:flex;align-items:center;gap:9px;width:100%;text-align:left;background:none;border:0;padding:8px 10px;border-radius:8px;font-size:13px;color:var(--ink);font-weight:500}
.pop-menu .mbtn:hover{background:var(--surface-2)}
.pop-menu .mbtn svg.i{width:15px;height:15px;color:var(--muted)}
.pop-menu .mbtn.danger{color:var(--crit)}
.pop-menu .mbtn.danger:hover{background:var(--crit-bg)}
.pop-menu .mbtn.danger svg.i{color:var(--crit)}

/* ===== full-width pages ===== */
.wrap.wide{max-width:none}
/* Full-height list pages (Claims A/R, Payments received). The rows area used to be capped at
   `100vh - 320px` INSIDE a page that also scrolled: two scrollbars, and a dead band of background
   under the card once you scrolled to the bottom (Jesus, 2026-07-22). Now the card fills the main
   area, only the rows scroll, and the pager stays pinned to the bottom of the card. */
.wrap.page-fill{display:flex;flex-direction:column;height:100%;box-sizing:border-box;padding-bottom:18px}
.wrap.page-fill .pg-h{flex:none}
.wrap.page-fill .tablecard{flex:1;min-height:0;display:flex;flex-direction:column}
.wrap.page-fill .tablecard .toolbar{flex:none}
.wrap.page-fill .tbl-scroll{flex:1;min-height:180px;max-height:none;overflow:auto}

/* ===== payment entry two-column layout ===== */
.pe-grid{display:grid;grid-template-columns:1fr 330px;gap:18px;align-items:start;margin-top:14px}
@media(max-width:980px){.pe-grid{grid-template-columns:1fr}}
.pe-right{position:sticky;top:16px;display:flex;flex-direction:column;gap:14px}
.pe-right .pe-summary{width:100%}
.attach-card{background:var(--surface);border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow);padding:14px 16px}
.ac-h{font-size:11px;text-transform:uppercase;letter-spacing:.6px;color:var(--faint);margin-bottom:8px;font-weight:600}
.attach-card .attach{max-width:none;margin:0}
.pe-right .pe-actions{flex-direction:column;gap:8px;margin-top:0}
.pe-right .pe-actions .btn{width:100%;justify-content:center}
.pe-foot{display:flex;justify-content:flex-end;margin-top:16px}

/* ===== agent review viewer nav ===== */
.viewer-nav{display:flex;align-items:center;gap:6px}
.viewer-nav .vcount{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;min-width:48px;text-align:center}
.docwrap img{transition:transform .2s}

/* ===== claim detail: no stretch + check facsimile ===== */
/* 65/35 — the left column holds the payment history (date · batch · 7 money cols · note), the
   right column is the money summary, so it needs far less room (Jesus, 2026-07-22). */
.cd-grid{align-items:start;grid-template-columns:1.85fr 1fr}
/* Compact header: identity + status on ONE row, context on the next, actions right. */
.cd-head{margin-bottom:12px;align-items:center}
.cd-head .cd-title{font-size:21px}
.cd-head .cd-sub{font-size:12.5px;margin-top:2px}
.cd-titlerow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.cd-titlerow .pill{font-size:11px;padding:3px 10px}
.cd-acts{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.ic-link.linked{cursor:pointer;border-bottom:1px dashed var(--line)}
.ic-link.linked:hover{color:var(--green);border-bottom-color:var(--green)}
/* Claim facts read ACROSS instead of stacking down a rail — that stacking is what made this page
   scroll. Only the working fields show; the rest lives behind "More details" (Jesus, 2026-07-22). */
.cd-summary{margin-bottom:14px}
.cs-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.cs-head h3{margin:0}
.cd-extra{margin-top:12px;border-top:1px solid var(--line-2);padding-top:12px}
.cd-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:0 18px;margin-top:6px}
.cd-facts .ci .v{font-size:13.5px}
.cd-note{margin-top:10px;display:flex;gap:10px;align-items:baseline;font-size:13px;border-top:1px solid var(--line-2);padding-top:9px}
.cd-note .k{font-size:10.5px;text-transform:uppercase;letter-spacing:.5px;color:var(--faint);flex:none}
.cd-note .v{color:var(--muted)}
.cd-note.stop .v{color:var(--crit);font-weight:700}
.cd-summary .people{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.cd-summary .person{padding:9px 11px}
.cd-summary .person .pr-name{font-size:13.5px}
.mrow.open-row{border-top:1px solid var(--line-2);border-bottom:1px solid var(--line-2);padding:5px 0;margin:3px 0}
.mrow.open-row .k{font-weight:600;color:var(--ink)}
.mrow.open-row .v{font-size:15px;font-weight:700}
.check-facsimile{margin-top:14px;background:linear-gradient(135deg,#eef4ee,#e6efe6);border:1px solid var(--line);border-radius:10px;padding:18px 20px}
.cf-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.cf-payer{font-weight:700;font-size:15px}
.cf-num{font-size:10px;font-weight:700;letter-spacing:.5px;color:var(--muted);border:1px solid var(--line);border-radius:5px;padding:2px 7px}
.cf-row{display:flex;justify-content:space-between;font-size:12px;margin-bottom:10px;color:var(--muted)}
.cf-row b{color:var(--ink)}
.cf-payee{font-size:13px;margin-bottom:6px}
.cf-amt{text-align:right;font-size:24px;font-weight:800;color:var(--green-deep)}
.cf-memo{font-size:11.5px;color:var(--muted);margin-top:8px}
.cf-micr{margin-top:14px;font-size:15px;letter-spacing:2px;color:#555;border-top:1px solid var(--line);padding-top:10px;font-family:ui-monospace,monospace}

/* ===== help tooltips ===== */
.help{display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;background:var(--line-2);color:var(--muted);font-size:10px;font-weight:700;cursor:help;margin-left:6px;vertical-align:middle;flex:none}
.help:hover{background:var(--green);color:#fff}
.tip-pop{position:fixed;z-index:500;background:var(--green-deep);color:#EAF3EC;border-radius:11px;padding:12px 14px;font-size:12px;line-height:1.55;box-shadow:var(--shadow-lg);max-width:340px;display:none;pointer-events:none}
.tip-pop b{color:#fff}
.tip-pop .ex{display:block;margin-top:7px;color:#AFCBB9;font-style:italic}
.tip-pop .rec{display:block;margin-top:7px;color:#D8B384;font-weight:600;font-style:normal}
.set-label{display:flex;align-items:center}

/* ===== payment entry layout fix (claim+payments+actions left, totals+attach right sidebar from top) ===== */
.pe-body{max-width:none}
.pe-left{display:flex;flex-direction:column;gap:14px}
.pe-left .subform{margin-top:0}
.pe-left .pe-actions{margin-top:2px;display:flex;gap:10px}
.pe-left .pe-actions .btn.primary{padding:11px 22px}

/* ---------------- LOGIN GATE (QuickBooks-style) ---------------- */
/* Sign-in backdrop: a deep-green brand mesh rather than the flat grey it used to be. Layered radial
   glows over a dark green base give it depth, and the white card lifts off it. Pure CSS gradients —
   no image, so it stays CSP-safe and adds nothing to load. */
.login-ov{position:fixed;inset:0;z-index:500;display:flex;align-items:center;justify-content:center;padding:20px;
  background:
    radial-gradient(900px 520px at 14% 16%, rgba(47,133,66,.42) 0%, rgba(47,133,66,0) 62%),
    radial-gradient(820px 540px at 86% 84%, rgba(33,74,62,.55) 0%, rgba(33,74,62,0) 64%),
    radial-gradient(680px 420px at 78% 10%, rgba(30,99,50,.34) 0%, rgba(30,99,50,0) 58%),
    radial-gradient(700px 500px at 8% 92%, rgba(193,154,107,.16) 0%, rgba(193,154,107,0) 60%),
    linear-gradient(158deg,#0e2d19 0%,#123620 46%,#0a1f12 100%)}
/* a soft vignette keeps the eye on the card */
.login-ov::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(120% 90% at 50% 45%, rgba(0,0,0,0) 40%, rgba(0,0,0,.30) 100%)}
.login-ov > *{position:relative;z-index:1}
.login-card{width:100%;max-width:400px;background:var(--surface);border-radius:16px;padding:40px 34px 28px;
  box-shadow:0 1px 2px rgba(23,63,34,.06),0 18px 50px rgba(23,63,34,.14);text-align:center;border:1px solid var(--line)}
.login-logo{height:46px;margin-bottom:22px;object-fit:contain}
.login-h{font-size:22px;font-weight:700;color:var(--ink);letter-spacing:-.2px}
.login-sub{font-size:13px;color:var(--muted);margin:5px 0 26px}
#loginForm{text-align:left}
.login-lbl{display:block;font-size:12px;font-weight:600;color:var(--ink);margin:0 0 6px}
#loginForm input{width:100%;border:1px solid var(--line);background:#fff;color:var(--ink);
  border-radius:10px;padding:12px 13px;font-family:inherit;font-size:14.5px;margin-bottom:16px;box-sizing:border-box;transition:border-color .15s,box-shadow .15s}
#loginForm input:focus{outline:none;border-color:var(--green);box-shadow:0 0 0 3px rgba(30,99,50,.14)}
#loginForm .btn.primary{width:100%;padding:13px;font-size:15px;font-weight:700;margin-top:4px;border-radius:10px}
/* password field + show/hide eye. The wrapper carries the field's bottom margin so the input can
   sit flush against the button. */
.pw-wrap{position:relative;margin-bottom:16px}
.pw-wrap input{margin-bottom:0!important;padding-right:44px!important}
.pw-eye{position:absolute;top:50%;right:6px;transform:translateY(-50%);width:32px;height:32px;
  display:grid;place-items:center;background:none;border:0;border-radius:8px;cursor:pointer;
  color:var(--faint);transition:color .15s,background .15s}
.pw-eye:hover{color:var(--green);background:var(--green-bg,rgba(30,99,50,.08))}
.pw-eye:focus-visible{outline:2px solid var(--green);outline-offset:1px}
.pw-eye svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pw-eye.on{color:var(--green)}
.login-err{color:var(--crit);font-size:12.5px;min-height:16px;margin-bottom:8px}
.login-forgot{display:block;margin:16px auto 0;background:none;border:0;color:var(--green);
  font-family:inherit;font-size:12.5px;font-weight:600;cursor:pointer}
.login-forgot:hover{text-decoration:underline}
.login-foot{margin-top:22px;font-size:11px;color:var(--faint);border-top:1px solid var(--line-2);padding-top:16px}
body.pre-auth .shell{display:none}
/* branded loading caption under the boot splash */
.sp-msg{color:#CDE5D3;font-size:13px;margin-top:16px;letter-spacing:.2px}

/* ---------------- BRANDED LOADER (pulsing logo + shimmer + dots) ---------------- */
.pr-loader{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;padding:54px 20px;text-align:center}
.pr-loader-mark{position:relative;overflow:hidden;border-radius:10px;animation:pr-breathe 1.7s ease-in-out infinite}
.pr-loader-mark img{height:38px;display:block;object-fit:contain}
.pr-loader-mark::after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 35%,rgba(255,255,255,.55) 50%,transparent 65%);transform:translateX(-130%);animation:pr-shimmer 1.7s ease-in-out infinite}
.pr-loader-dots{display:flex;gap:6px}
.pr-loader-dots i{width:7px;height:7px;border-radius:50%;background:var(--green);opacity:.3;animation:pr-bounce 1.15s ease-in-out infinite}
.pr-loader-dots i:nth-child(2){animation-delay:.14s}
.pr-loader-dots i:nth-child(3){animation-delay:.28s}
.pr-loader-cap{font-size:11.5px;color:var(--muted);letter-spacing:.7px;text-transform:uppercase;font-weight:700}
@keyframes pr-breathe{0%,100%{transform:scale(.95)}50%{transform:scale(1.05)}}
@keyframes pr-shimmer{0%{transform:translateX(-130%)}55%,100%{transform:translateX(130%)}}
@keyframes pr-bounce{0%,100%{opacity:.25;transform:translateY(0)}50%{opacity:1;transform:translateY(-6px)}}

/* ---------------- DATA-QUALITY TILES ---------------- */
.qgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(146px,1fr));gap:10px;margin-top:10px}
.qtile{text-align:left;background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:13px 14px;
  font-family:inherit;display:flex;flex-direction:column;gap:3px;min-width:0}
button.qtile{cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .05s}
button.qtile:hover{border-color:var(--green);box-shadow:0 4px 12px rgba(30,99,50,.11)}
button.qtile:active{transform:translateY(1px)}
.qtile.ok{background:var(--good-bg);border-color:#CBE4CF}
.qtile-top{display:flex;align-items:flex-start;gap:6px}
.qtile-label{font-size:11.5px;color:var(--muted);font-weight:600;line-height:1.3;flex:1}
.qtile-dot{width:8px;height:8px;border-radius:50%;flex:none;margin-top:3px}
.qtile-num{font-size:27px;font-weight:800;line-height:1.05;font-variant-numeric:tabular-nums}
.qtile-foot{font-size:11px;color:var(--faint)}
button.qtile .qtile-foot{color:var(--green);font-weight:600}
.qtile.ok .qtile-foot{color:var(--good);font-weight:600}
/* migration-orphans modal — wide, all columns, sortable */
.morph-modal{width:96vw;max-width:1600px}
.morph-tbl{min-width:1400px}
.morph-tbl td,.morph-tbl th{white-space:nowrap;padding-right:18px}
.morph-tbl th{user-select:none}
.morph-tbl th:hover{color:var(--green)}
/* filter bars (Payments Received, reports, ledger) */
.pay-filters{flex-wrap:wrap;gap:10px;align-items:flex-end;padding:12px 14px}
.pf{display:flex;flex-direction:column;gap:3px;font-size:11px;color:var(--muted)}
.pf>span{font-weight:600}
.pf input,.pf select{border:1px solid var(--line);background:var(--surface-2);color:var(--ink);border-radius:8px;padding:7px 9px;font-family:inherit;font-size:13px}
.pf input:focus,.pf select:focus{outline:0;border-color:var(--green);box-shadow:0 0 0 3px var(--ring)}
/* a table number that drills down (e.g. the sync errors count) */
.linkbtn{background:none;border:0;padding:0;font:inherit;cursor:pointer;font-weight:700;font-variant-numeric:tabular-nums;
  color:var(--green);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}
.linkbtn:hover{opacity:.75}
.linkbtn.crit{color:var(--crit)}
/* real scanned-check viewer (claim detail → View check) */
.check-view{background:var(--surface-2);border:1px solid var(--line);border-radius:11px;overflow:auto;
  margin-top:10px;flex:1;min-height:0;display:grid;place-items:center;padding:10px}
.check-view img{max-width:100%;transition:transform .2s ease;transform-origin:center}
.check-view-tools{display:flex;align-items:center;gap:7px;margin-top:9px}
/* "why this score?" — the agent's reasoning, in words (v45) */
.xp{margin-top:8px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);padding:10px 12px}
.xp summary{cursor:pointer;font-size:12.5px;display:flex;align-items:center;gap:8px;list-style:none;flex-wrap:wrap}
.xp summary::-webkit-details-marker{display:none}
.xp-verdict{font-size:12.5px;font-weight:600;line-height:1.5;min-width:0;flex:1 1 auto}
.xp summary:hover .xp-toggle{text-decoration:underline}
.xp .xp-toggle{margin-left:auto;color:var(--green);font-weight:700;font-size:11px;flex:0 0 auto}
.xp[open] .xp-toggle{opacity:.55}
.xp-sum{font-size:12.5px;line-height:1.6;color:var(--ink);margin:8px 0 2px}
.xp-steps{margin-top:6px}
.xp-step{display:flex;gap:8px;padding:6px 0;border-top:1px solid var(--line-2);font-size:12px}
.xp-mark{font-weight:800;flex:0 0 14px;text-align:center}
.xp-up .xp-mark{color:var(--good)} .xp-down .xp-mark{color:var(--crit)} .xp-none .xp-mark{color:var(--faint)}
.xp-imp{font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:var(--faint)}
.xp-detail{color:var(--muted);line-height:1.55;margin-top:2px}
.xp-sub{font-size:10px;text-transform:uppercase;letter-spacing:.6px;color:var(--faint);margin:10px 0 4px}
.xp-cav{font-size:12px;color:var(--crit);line-height:1.55;padding:3px 0}
.xp-note{font-size:12px;color:var(--muted);line-height:1.55;padding:3px 0}
.xp-srch{font-size:11.5px;color:var(--faint);line-height:1.5;padding:2px 0}

/* ---------- dialog boxes (must be X'd out) ---------- */
.dlg-ov{position:fixed;inset:0;z-index:400;background:rgba(12,26,16,.42);backdrop-filter:blur(2px);
  display:flex;align-items:center;justify-content:center;padding:20px;animation:dlg-fade .12s ease-out}
.dlg{position:relative;width:min(460px,100%);background:var(--surface);border:1px solid var(--line);
  border-radius:14px;box-shadow:0 24px 60px -18px rgba(0,0,0,.45);padding:18px 20px 16px;animation:dlg-pop .14s ease-out}
.dlg::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;border-radius:14px 0 0 14px;background:var(--info)}
.dlg.warn::before{background:var(--amber)} .dlg.crit::before{background:var(--crit)} .dlg.good::before{background:var(--green)}
.dlg-x{position:absolute;top:10px;right:10px;width:28px;height:28px;border:0;border-radius:8px;background:transparent;
  color:var(--muted);font-size:14px;cursor:pointer;line-height:1}
.dlg-x:hover{background:var(--surface-2);color:var(--ink)}
.dlg-h{display:flex;align-items:center;gap:9px;font-size:15px;font-weight:700;padding-right:30px}
.dlg.warn .dlg-h{color:var(--amber)} .dlg.crit .dlg-h{color:var(--crit)} .dlg.info .dlg-h{color:var(--info)}
.dlg-h svg.i,.dlg-h .i{width:18px;height:18px;flex:none}
.dlg-b{margin-top:11px;font-size:13px;line-height:1.6;color:var(--ink)}
.dlg-b b{font-variant-numeric:tabular-nums;white-space:nowrap}
.dlg-b .dlg-hint{display:block;margin-top:8px;font-size:12px;color:var(--muted)}
/* header "?" — hover reveals the wordy explanation (kept out of the clean default view) */
.dlg-tip{margin-left:6px;width:18px;height:18px;flex:none;border-radius:50%;display:inline-flex;
  align-items:center;justify-content:center;font-size:11px;font-weight:700;cursor:help;
  background:var(--line-2);color:var(--muted)}
.dlg-tip:hover{background:var(--green);color:#fff}
/* clean figures breakdown: received / open balance / the extra */
.dlg-figs{display:flex;flex-direction:column}
.dlg-figs > div{display:flex;justify-content:space-between;align-items:center;gap:16px;
  padding:9px 0;border-bottom:1px solid var(--line-2)}
.dlg-figs > div:last-child{border-bottom:0}
.dlg-figs > div span{color:var(--muted);font-size:13px}
.dlg-figs > div b{font-variant-numeric:tabular-nums;font-size:15px}
.dlg-figs > div.hl{margin-top:2px}
.dlg-figs > div.hl span{color:var(--ink);font-weight:600}
.dlg.warn .dlg-figs .hl b{color:var(--amber)}
.dlg.info .dlg-figs .hl b{color:var(--info)}
.dlg.crit .dlg-figs .hl b{color:var(--crit)}
.dlg-f{display:flex;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap;margin-top:16px}
.dlg-f .btn{flex:0 0 auto;white-space:nowrap}
@keyframes dlg-fade{from{opacity:0}to{opacity:1}}
@keyframes dlg-pop{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
/* acknowledged triggers stay visible as a compact recap under the payment rows */
.pe-recap{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 0}
.pe-recap .rc-chip{font-size:11.5px;padding:3px 9px;border-radius:20px;background:var(--surface-2);
  border:1px solid var(--line-2);color:var(--muted);display:inline-flex;align-items:center;gap:5px}
.pe-recap .rc-chip.warn{background:var(--amber-bg);border-color:transparent;color:var(--amber);font-weight:600}
.pe-recap .rc-chip.crit{background:var(--crit-bg);border-color:transparent;color:var(--crit);font-weight:600}
.pe-recap .rc-chip.info{background:var(--info-bg);border-color:transparent;color:var(--info)}

/* ---------- inline loading affordances ---------- */
.pr-spin{display:inline-flex;align-items:center;gap:7px;color:var(--muted)}
.pr-spin i{width:12px;height:12px;flex:none;border-radius:50%;border:2px solid var(--line);
  border-top-color:var(--green);animation:pr-spin .7s linear infinite}
@keyframes pr-spin{to{transform:rotate(360deg)}}
/* shimmering placeholder bar for KPI values still loading */
.sk-bar{display:block;height:22px;width:70%;max-width:150px;border-radius:6px;position:relative;overflow:hidden;
  background:var(--surface-2)}
.sk-bar::after{content:"";position:absolute;inset:0;transform:translateX(-130%);
  background:linear-gradient(110deg,transparent 38%,rgba(0,0,0,.06) 50%,transparent 62%);
  animation:pr-shimmer 1.4s ease-in-out infinite}

/* payment subform: money columns — the label sits CENTERED over the field (looks tidier than hard
   right), the input box centers in its cell, and the number stays right-aligned inside the box */
table.sf th.m{text-align:center}
table.sf td.m{text-align:center}
table.sf td.m .money{width:100px;max-width:100%;text-align:right}
/* read-only batch stamp per row — which batch that payment sits under */
table.sf td.bt{color:var(--muted);font-size:11.5px;white-space:nowrap}

/* ---------- payment bar (under the check in Scan Review, 2026-07-22) ----------
   The payment you're about to post sits with the check that pays it, as ONE WIDE ROW — the same
   shape as a manual payment-entry line. The batch is shown but never editable. */
.pane.viewer{display:flex;flex-direction:column;gap:10px}
/* The pay bar is a .dcard now (2026-07-23) — the middle of the three right-pane boxes — so the box
   itself (border tone, radius, ground) comes from .dcard and this rule only sets its own spacing. */
.paybar{padding:9px 11px}
.pb-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12.5px;margin-bottom:6px}
.pb-spacer{flex:1}
.pb-batch{display:inline-flex;align-items:center;gap:6px;background:var(--good-bg);color:var(--green);
  font-weight:700;border-radius:20px;padding:3px 10px;font-size:11.5px;cursor:default}
.pb-batch svg.i{width:13px;height:13px;margin:0}
.pb-tot{color:var(--muted)}
.pb-tot b{font-size:15px;margin-left:6px;color:var(--ink)}
.pb-tot b.zero{color:var(--good)} .pb-tot b.open{color:var(--amber)}
.pb-warn{display:flex;align-items:center;gap:7px;background:var(--amber-bg);color:var(--amber);
  font-size:12px;font-weight:600;border-radius:8px;padding:6px 9px;margin-bottom:8px}
.pb-warn svg.i{width:14px;height:14px;flex:none;margin:0}
.pb-warn a{color:inherit;font-weight:800}
/* The entry row wraps to the narrow right column: money fields TWO per line
   (received | interest  /  write-off | overage), notes on its own full-width line. */
.pb-row{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap}
.pb-f{display:flex;flex-direction:column;gap:3px;flex:1 1 calc(50% - 5px);min-width:0}
/* labels sit CENTRED over their field (money inputs stay right-aligned) */
.pb-f > span{font-size:10.5px;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);font-weight:600;text-align:center}
/* WHITE fields (user, 2026-07-23): the bar sits on --surface-2 now, so a --surface-2 input was
   near-invisible against its own card. */
.pb-f input{width:100%;text-align:right;font-family:inherit;font-size:13px;font-weight:600;
  font-variant-numeric:tabular-nums;border:1px solid var(--line);background:var(--surface);color:var(--ink);
  border-radius:8px;padding:6px 8px}
.pb-f input:focus{outline:0;border-color:var(--green);background:var(--surface);box-shadow:0 0 0 3px var(--ring)}
.pb-f input:disabled{opacity:.6;cursor:not-allowed}
.pb-grow{flex:1 1 100%}
.pb-grow input{text-align:left;font-weight:400}
/* actions: the previous-payments toggle gets its own line above the buttons, which then share the
   width evenly (Approve / Flag / Ignore all fit across the column). */
.pb-actions{margin-top:8px;padding-top:8px;border-top:1px solid var(--line-2);align-items:center;gap:7px}
.pb-actions .pb-prev{flex:1 1 100%}
.pb-actions .pb-spacer{display:none}
.pb-actions .btn{flex:1 1 auto;justify-content:center;white-space:nowrap}
/* each outcome wears the colour of the state it sends the check to (user, 2026-07-23) */
.btn.act-flag{color:var(--amber)} .btn.act-flag:hover:not(:disabled){border-color:var(--amber);background:var(--amber-bg,#fdf6e3)}
.btn.act-ignore{color:var(--crit)} .btn.act-ignore:hover:not(:disabled){border-color:var(--crit);background:var(--crit-bg)}
.btn.act-flag:disabled{color:var(--faint)}
.pb-note{font-size:12px;color:var(--muted)}
/* previous payments already on the matched claim */
.pb-prev{min-width:0}
.pb-prevbtn{background:none;border:0;color:var(--green);font-weight:700;font-size:12px;cursor:pointer;padding:0}
.pb-prevbtn:hover{text-decoration:underline}
/* FIXED, positioned in JS from the pay bar — an absolute popover was clipped by the viewer pane's
   overflow-x:hidden, which is what forced that ugly inner scrollbar. Spans the pay bar's full width. */
.pb-prevlist{position:fixed;max-height:min(360px,52vh);overflow-y:auto;overflow-x:hidden;
  background:var(--surface);border:1px solid var(--line-2);border-radius:12px;
  box-shadow:0 18px 46px -14px rgba(0,0,0,.4),0 0 0 1px rgba(0,0,0,.04);padding:12px 14px 14px;z-index:130}
.pb-prevlist.hide{display:none}
.pb-actions{position:relative}
.pb-prevhd{font-size:11px;text-transform:uppercase;letter-spacing:.7px;color:var(--faint);margin-bottom:8px}
.pb-prevhd b{color:var(--ink);text-transform:none;letter-spacing:0;font-size:12.5px}
table.pb-ptbl{width:100%;table-layout:auto;border-collapse:collapse;font-size:12.5px}
table.pb-ptbl th{text-align:left;font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:var(--faint);
  font-weight:700;padding:0 10px 7px;border-bottom:1px solid var(--line);white-space:nowrap}
table.pb-ptbl th.num,table.pb-ptbl td.num{text-align:right}
table.pb-ptbl td{padding:8px 10px;border-bottom:1px solid var(--line-2);white-space:nowrap}
table.pb-ptbl tbody tr:hover{background:var(--surface-2)}
table.pb-ptbl td.strong{font-weight:700}
table.pb-ptbl td.neg{color:var(--crit)}
table.pb-ptbl tfoot td{border-top:1px solid var(--line);border-bottom:0;font-weight:700;padding-top:8px}
/* the Note column is what used to push the table past the popover's edge and get clipped —
   it now gives way first (hover the cell for the full text via its title attribute) */
.pb-pnote{color:var(--muted);max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pb-prevfoot{margin-top:9px;padding-top:9px;border-top:1px solid var(--line-2);font-size:12px;color:var(--muted)}
.pb-prevfoot b{color:var(--ink);font-variant-numeric:tabular-nums}
.pb-prevfoot b.open{color:var(--amber)} .pb-prevfoot b.zero{color:var(--good)}

/* ---------- magnifier loupe (Scan Review, 2026-07-22) ----------
   Press & hold on the check to inspect a spot. Replaces the old Zoom toggle. */
.docwrap img{cursor:zoom-in}
.docwrap img.magnifying{cursor:none}
.loupe{position:fixed;width:210px;height:210px;border-radius:50%;overflow:hidden;pointer-events:none;
  z-index:120;display:none;background:#fff;border:3px solid rgba(255,255,255,.9);
  box-shadow:0 0 0 1px rgba(0,0,0,.28),0 18px 40px -12px rgba(0,0,0,.55),inset 0 0 22px -8px rgba(0,0,0,.35)}
.loupe.on{display:block}
.loupe-img{position:absolute;max-width:none;max-height:none;image-rendering:auto}
/* crosshair so you know exactly which point is centred */
.loupe::after{content:"";position:absolute;left:50%;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;
  border-radius:50%;border:1px solid rgba(30,99,50,.55);box-shadow:0 0 0 1px rgba(255,255,255,.6)}
@media (prefers-reduced-motion:reduce){ .loupe{box-shadow:0 0 0 1px rgba(0,0,0,.3)} }
/* Interest in the pay bar is DERIVED (legacy Gross equation), never typed — show it as a readout
   so what the reviewer sees is exactly what the server will store. */
.pb-f.pb-ro input{background:var(--rail);color:var(--muted);cursor:default;border-style:dashed}
.pb-f.pb-ro .pb-auto{font-style:normal;font-size:9px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;
  color:var(--green);background:rgba(30,99,50,.10);border-radius:4px;padding:1px 4px;margin-left:4px;vertical-align:middle}
/* write-off bounds: a "max" hint while editable, a "locked" chip when nothing is owed */
.pb-f.pb-locked input{background:var(--rail);color:var(--muted);cursor:not-allowed;border-style:dashed}
.pb-f .pb-max{font-style:normal;font-size:9px;font-weight:700;letter-spacing:.3px;color:var(--muted);
  background:var(--line-2);border-radius:4px;padding:1px 4px;margin-left:4px;vertical-align:middle}
table.sf input[disabled]{background:var(--surface-2);color:var(--muted);cursor:not-allowed;border-style:dashed}
/* a clipped long value (funeral home / insurer) — the full text is in its title tooltip */
.trunc{cursor:help;border-bottom:1px dotted var(--line)}
/* the "AI Results" control sits beside Edit and reveals the reasoning panel */
.dsec-act.on{color:var(--green);font-weight:700}
/* Scan Review cockpit: hide the search/crumb row to give the queue + check viewer the height
   (user 2026-07-23). Safe because the cockpit's own context bar carries "‹ All scans" and the
   batch state, and the pay bar names the batch a payment will attach to. */
body.hide-topbar .topbar{display:none}
