/* Full Smile billing claims. Light and clinical, in the practice's royal blue.
   Layout: top bar · queue strip (also filters) · one panel with toolbar and the claim table · slide-in claim with its note thread. */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef1f6;
  --ink: #0f1b33;
  --ink-2: #33415c;
  --muted: #667085;
  --line: #e2e7ef;
  --line-2: #edf1f6;
  --brand: #004aad;
  --brand-ink: #00357d;
  --brand-soft: #e8f0fb;
  --billing: #004aad; --billing-bg: #e8f0fb;
  --office: #067647;  --office-bg: #e6f6ec;
  --pending: #8a5300; --pending-bg: #fff4d6; --pending-dot: #f0b429;
  --dx: #5b3fb0;      --dx-bg: #f1edfb;
  --late: #b42318;    --late-bg: #fdecea;
  --done: #667085;    --done-bg: #f0f2f6;
  --hl: #fff1c2; --hl-line: #f3d47a; --hl-ink: #5c3d00;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --font: "Instrument Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1320px; margin: 0 auto; padding: 12px max(24px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin-right: auto; min-width: 0; }
.brand img { width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line); background: #fff; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand strong { font-size: 19px; font-weight: 700; letter-spacing: -.2px; }
.brand small { font-size: 13px; color: var(--muted); }
.top-acts { display: flex; align-items: center; gap: 10px; }
.mebtn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13.5px; font-weight: 600; }
.mebtn:hover { background: var(--surface-2); }
.mebtn i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--billing); color: #fff; font-style: normal; font-size: 11.5px; font-weight: 700; }
.mebtn i.Office { background: var(--office); }

.wrap { max-width: 1320px; margin: 0 auto; padding: 22px max(24px, env(safe-area-inset-left)) 64px; display: flex; flex-direction: column; gap: 18px; }
.offline { padding: 10px 14px; border-radius: 10px; background: var(--pending-bg); color: var(--pending); font-weight: 600; font-size: 14px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn:hover { border-color: #c5cedb; background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--late); }
.btn.small.danger { background: var(--late); border-color: var(--late); color: #fff; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.icon { width: 38px; padding: 0; }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------- Queue strip ---------- */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 15px 20px; border: 0; border-left: 1px solid var(--line-2); background: none; text-align: left; min-width: 0; }
.stat:first-child { border-left: 0; }
.stat:hover { background: var(--surface-2); }
.stat[aria-pressed="true"] { background: var(--brand-soft); box-shadow: inset 0 -3px 0 var(--brand); }
.stat .n { font-size: 28px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.stat .l::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.stat.is-billing { --c: var(--billing); } .stat.is-office { --c: var(--office); } .stat.is-pending { --c: var(--pending-dot); }
.stat.is-paid { --c: var(--dx); } .stat.is-done { --c: #98a2b3; }
.stat.is-paid.has .n { color: var(--dx); }
.stat.is-urgent { --c: var(--late); } .stat.is-urgent.has .n { color: var(--late); }

/* ---------- Panel + toolbar ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 10px; flex: none; }
.tab { white-space: nowrap; border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.search { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface); min-width: 0; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search input { flex: 1; border: 0; outline: 0; background: none; min-width: 0; font-size: 14px; color: var(--ink); }
.selects { display: flex; gap: 8px; flex: none; }
.sel { display: flex; align-items: center; gap: 4px; height: 38px; padding: 0 4px 0 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--muted); background: var(--surface); }
.sel:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.sel select { border: 0; background: transparent; font-size: 14px; font-weight: 600; color: var(--ink); padding: 4px 2px; width: 124px; outline: 0; text-overflow: ellipsis; }

/* ---------- Claim table ---------- */
.tr { display: grid; grid-template-columns: minmax(200px, 1.15fr) minmax(170px, 1fr) minmax(260px, 2.3fr) minmax(150px, .85fr); gap: 18px; align-items: start;
  padding: 12px 18px 12px 15px; border-top: 1px solid var(--line-2); border-left: 3px solid transparent; }
.tr > [role="cell"], .tr > [role="columnheader"] { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.th { border-top: 0; padding-top: 9px; padding-bottom: 9px; background: var(--surface-2); font-size: 12px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
#rows .tr { cursor: pointer; }
#rows .tr:hover { background: #fafbfd; }
#rows .tr:focus-visible { outline-offset: -2px; }
.tr.q-Billing { border-left-color: var(--billing); } .tr.q-Office { border-left-color: var(--office); }
.tr.q-Pending { border-left-color: var(--pending-dot); } .tr.q-Completed { border-left-color: var(--line); }
.tr.is-urgent { border-left-color: var(--late); background: #fffafa; }
#rows .tr.is-urgent:hover { background: #fff3f2; }
.cell-main { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub.none, .cell-main.none { color: #98a2b3; font-weight: 500; }

/* Patient: name, chart #, DOB. Each one copies on click. */
.ptc { gap: 4px !important; align-items: flex-start; }
.cp { position: relative; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 1px solid transparent; background: none; padding: 1px 6px; margin-left: -7px;
  border-radius: 7px; text-align: left; color: inherit; line-height: 1.35; }
.cp > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The icon sits just outside the text so showing it never shifts the layout. */
.cp .ci { position: absolute; left: calc(100% + 3px); top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted); opacity: 0; transition: opacity .12s; pointer-events: none; }
.cp:hover { background: var(--surface-3); }
.cp:hover .ci, .cp:focus-visible .ci { opacity: 1; }
.cp.done .ci { opacity: 1; color: var(--office); }
.cp.name { font-size: 15px; font-weight: 700; color: var(--ink); }
.cp.chart { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .2px; }
.cp.dob { margin-left: 0; padding: 1px 7px; border-color: var(--hl-line); background: var(--hl); color: var(--hl-ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cp.dob small { font-size: 11px; font-weight: 700; letter-spacing: .4px; opacity: .75; }
.cp.dob:hover { background: #ffe9a3; }
.cp.dob .ci { color: var(--hl-ink); }
.ptc { padding-right: 18px; }
.missing { font-size: 12.5px; color: #98a2b3; padding: 1px 0; }

/* Visit */
.kind { align-self: flex-start; margin-top: 2px; padding: 1px 7px; border-radius: 6px; background: var(--surface-3); font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--ink-2); }
.kind.k-Write-off { background: var(--late-bg); color: var(--late); }
.kind.k-Plan-terminated { background: var(--pending-bg); color: var(--pending); }
.kind.k-Office-question { background: var(--office-bg); color: var(--office); }
.amts { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.amts b { font-weight: 600; color: var(--ink-2); }
.dxs { align-self: flex-start; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--dx-bg); color: var(--dx); }
.dxs.denied { background: var(--late-bg); color: var(--late); }

/* Latest note */
.lastnote { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.who { font-size: 12px; font-weight: 700; margin-right: 6px; white-space: nowrap; }
.who.Billing { color: var(--billing); } .who.Office { color: var(--office); } .who.Ascend { color: var(--dx); }
.who:not(.Billing):not(.Office):not(.Ascend) { color: var(--muted); }

/* Status */
.pill { align-self: flex-start; display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill.Billing { background: var(--billing-bg); color: var(--billing); } .pill.Office { background: var(--office-bg); color: var(--office); }
.pill.Pending { background: var(--pending-bg); color: var(--pending); } .pill.Completed { background: var(--done-bg); color: var(--done); }
.age { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.urgent { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: var(--late-bg); color: var(--late); font-size: 12px; font-weight: 700; white-space: nowrap; }
.urgent::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--late); }
.handoff .urgent { white-space: normal; border-radius: 8px; }

.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 34px 22px; color: var(--muted); }
.empty strong { color: var(--ink); font-size: 16px; }
.empty .btn { margin-top: 8px; }
.more { display: flex; justify-content: center; padding: 14px; border-top: 1px solid var(--line-2); }

/* ---------- Claim drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(15, 27, 51, .35); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); background: var(--surface); z-index: 41; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(15, 27, 51, .18); }
.dhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 24px 14px; border-bottom: 1px solid var(--line); }
.dhead > div { min-width: 0; }
.dhead h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.2px; overflow-wrap: anywhere; }
.dhead h2 .cp.name { font-size: 21px; }
.dsub { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.ptline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.ptline .cp.chart { margin-left: -7px; }
.ptline b { font-weight: 600; }
.dbody { flex: 1; overflow-y: auto; padding: 18px 24px 24px; display: flex; flex-direction: column; gap: 18px; }
.dfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.delzone { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.delask { font-size: 13.5px; font-weight: 600; color: var(--late); }
.foot-btns { display: flex; gap: 8px; margin-left: auto; }
.handoff { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.handoff .pill { font-size: 13.5px; padding: 4px 12px; }
.dxline { font-size: 12.5px; color: var(--dx); font-weight: 600; }
.hint { font-size: 12.5px; color: var(--muted); }
.err { padding: 10px 12px; border-radius: 10px; background: var(--late-bg); color: var(--late); font-weight: 600; font-size: 14px; }

details.box { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
details.box > summary { cursor: pointer; padding: 12px 0; font-weight: 700; font-size: 14.5px; list-style-position: inside; }
details.box[open] > summary { border-bottom: 1px solid var(--line-2); margin-bottom: 12px; }
details.box > div { padding-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 14.5px; }
.field textarea { height: auto; padding: 9px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.money4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.money { position: relative; }
.money > span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.field .money input { padding-left: 22px; font-variant-numeric: tabular-nums; }

.thread-h { margin: 0 0 10px; font-size: 14.5px; font-weight: 700; }
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; border-top-left-radius: 4px; background: var(--billing-bg); align-self: flex-start; }
.msg.Office { background: var(--office-bg); align-self: flex-end; border-top-left-radius: 14px; border-top-right-radius: 4px; }
.msg.Ascend { background: var(--dx-bg); align-self: center; max-width: 94%; border-radius: 10px; }
.msg.none { background: var(--surface-2); border: 1px solid var(--line); }
.msg p { margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 3px; font-size: 12px; color: var(--muted); }
.msg .meta b { color: var(--ink-2); }
.compose { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); position: sticky; bottom: -24px; box-shadow: 0 -8px 16px rgba(255, 255, 255, .9); }
.compose:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.compose textarea { width: 100%; min-height: 70px; border: 0; outline: 0; resize: vertical; font-size: 14.5px; padding: 0; background: none; }
.compose-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.loglist { margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.loglist b { color: var(--ink-2); font-weight: 600; }

/* ---------- Dialogs (setup, import) ---------- */
.modal { position: fixed; z-index: 50; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(820px, calc(100vw - 24px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 27, 51, .3); }
.modal.small { width: min(440px, calc(100vw - 24px)); }
.modal .dbody { gap: 16px; }
.teampick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.teampick button { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; }
.teampick button b { display: block; font-size: 14.5px; }
.teampick button small { color: var(--muted); font-size: 12.5px; }
.teampick button.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 20px; border: 2px dashed #c5cedb; border-radius: 14px; text-align: center; color: var(--muted); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.drop strong { color: var(--ink); font-size: 15.5px; }
.mapgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mapgrid .field select { height: 36px; font-size: 13.5px; }
.prevwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.prev { width: 100%; border-collapse: collapse; font-size: 13px; }
.prev th, .prev td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.prev thead th { border-top: 0; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.sumrow { display: flex; gap: 10px; flex-wrap: wrap; }
.sumrow > div { flex: 1 1 120px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.sumrow b { display: block; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sumrow span { font-size: 13px; color: var(--muted); }
.okbox { padding: 10px 12px; border-radius: 10px; background: var(--office-bg); color: var(--office); font-weight: 600; font-size: 14px; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }
.perseat { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(15, 27, 51, .25); }

/* ---------- Narrower screens ---------- */
@media (max-width: 1180px) {
  .selects { flex: 1 1 100%; }
  .sel { flex: 1 1 0; } .sel select { width: 100%; }
}
@media (max-width: 1020px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(4) { border-left: 0; } .stat:nth-child(n+4) { border-top: 1px solid var(--line-2); }
  .th { display: none; }
  .tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 16px; }
  .tr > .c-note { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 640px) {
  .topbar-in { padding: 10px 16px; gap: 10px; }
  .brand strong { font-size: 17px; } .brand img { width: 36px; height: 36px; }
  .brand small, #meName { display: none; }
  .mebtn { padding: 0 4px; }
  .top-acts { gap: 6px; } .top-acts .btn { padding: 0 12px; }
  .wrap { padding: 14px 16px 48px; gap: 14px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 11px 14px; } .stat .n { font-size: 22px; }
  .stat:nth-child(n) { border-left: 1px solid var(--line-2); border-top: 1px solid var(--line-2); }
  .stat:nth-child(odd) { border-left: 0; } .stat:nth-child(-n+2) { border-top: 0; }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .toolbar { padding: 12px; }
  .tabs { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .search { flex-basis: 100%; }
  .tr { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 14px 12px 11px; }
  .tr > .c-note { grid-row: auto; }
  .tr > .c-status { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .grid2, .money4, .mapgrid { grid-template-columns: 1fr 1fr; }
  .dhead, .dbody, .dfoot { padding-left: 16px; padding-right: 16px; }
  .msg { max-width: 100%; }
  .compose-acts .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .drawer:not([hidden]) { animation: slide .22s ease-out; }
  @keyframes slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}
@media print { .topbar, .toolbar, .stats, .cp .ci { display: none; } body { background: #fff; } }

/* ---------- Welcome intro ---------- */
.intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; cursor: pointer;
  background: radial-gradient(1200px 700px at 50% 42%, #ffffff 0%, #f4f7fd 55%, #e6eefb 100%);
  animation: introOut .55s ease-in 2.35s forwards; }
.no-intro .intro { display: none; }
.intro.skip { animation: introOut .25s ease-in forwards; }
.intro-in { display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center; }
.seal { width: min(200px, 46vw); height: auto; overflow: visible; filter: drop-shadow(0 18px 34px rgba(0, 74, 173, .16)); animation: sealIn .7s cubic-bezier(.2, .8, .2, 1) both; }
/* The page's icon style (outlined strokes) must not reach the seal. */
.seal, .seal * { stroke: none; stroke-width: 0; }
.seal-fill { fill: #fff; }
.seal .seal-ring { fill: none; stroke: var(--brand); stroke-width: 4; stroke-dasharray: 100; stroke-dashoffset: 100; transform: rotate(-90deg); transform-origin: 100px 100px;
  animation: ring .95s cubic-bezier(.65, 0, .35, 1) .15s forwards; }
.seal-arc { fill: var(--brand); font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: 700; letter-spacing: 3.2px; opacity: 0; animation: fade .45s ease-out .75s forwards; }
.seal-arc-b { letter-spacing: 4px; animation-delay: .85s; }
.seal-fs { fill: var(--brand); font-family: Georgia, "Times New Roman", serif; font-size: 76px; font-weight: 600; opacity: 0; transform-origin: 100px 100px; animation: fsIn .55s cubic-bezier(.2, .8, .2, 1) .55s forwards; }
.intro-text { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.intro-text span { display: block; opacity: 0; animation: rise .6s cubic-bezier(.2, .8, .2, 1) forwards; }
.intro-text .w1 { font-size: 13px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); animation-delay: .95s; }
.intro-text .w2 { font-size: clamp(19px, 2.6vw, 26px); font-weight: 600; color: var(--ink-2); letter-spacing: -.2px; animation-delay: 1.1s; }
.intro-text .w3 { font-size: clamp(38px, 6vw, 60px); font-weight: 700; color: var(--brand); letter-spacing: -1.2px; line-height: 1.05; animation-delay: 1.25s; }
.intro-line { width: 140px; height: 3px; border-radius: 3px; background: rgba(0, 74, 173, .12); overflow: hidden; opacity: 0; animation: fade .3s ease-out 1.4s forwards; }
.intro-line i { display: block; height: 100%; width: 100%; background: var(--brand); transform: scaleX(0); transform-origin: left; animation: grow .9s ease-in-out 1.45s forwards; }
@keyframes introOut { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@keyframes sealIn { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
@keyframes ring { to { stroke-dashoffset: 0; } }
@keyframes fsIn { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes grow { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .intro { animation: introOut .4s ease-in 1.4s forwards; }
  .seal, .seal-ring, .seal-arc, .seal-fs, .intro-text span, .intro-line, .intro-line i { animation: none; opacity: 1; transform: none; stroke-dashoffset: 0; }
}
@media print { .intro { display: none; } }

/* ---------- Sign-in page ---------- */
.login-page { min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; padding: 64px clamp(32px, 6vw, 88px);
  background: radial-gradient(900px 600px at 20% 20%, #1a5fc4 0%, var(--brand) 45%, #003a8a 100%); color: #fff; }
.login-brand::after { content: ""; position: absolute; right: -180px; bottom: -180px; width: 520px; height: 520px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .1); box-shadow: 0 0 0 60px rgba(255, 255, 255, .03); pointer-events: none; }
.login-brand .seal { width: 128px; margin-bottom: 18px; filter: drop-shadow(0 16px 30px rgba(0, 20, 60, .35)); animation: none; }
.lb-1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.lb-2 { margin: 0; font-size: clamp(38px, 4.6vw, 56px); font-weight: 700; letter-spacing: -1.2px; line-height: 1.05; }
.lb-3 { margin: 8px 0 0; max-width: 30ch; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, .82); }
.login-card { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px; padding: 48px 24px; background: var(--surface); }
.login-card form { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; }
.login-card h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.4px; }
.login-card .sub { margin: -8px 0 4px; color: var(--muted); font-size: 14.5px; }
.login-card .field input, .login-card .field select { height: 46px; font-size: 15.5px; }
.login-card .help { margin: 2px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.login-foot { width: min(400px, 100%); margin: 8px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); text-align: center; }
.notice { padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; font-size: 14px; }
.btn.big { height: 48px; font-size: 15.5px; border-radius: 12px; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pw { position: relative; }
.pw input { padding-right: 70px !important; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--brand); font-size: 13px; font-weight: 700; }
.pw-toggle:hover { background: var(--brand-soft); }
/* The seal on the sign-in page doesn't animate. */
.seal .still { animation: none !important; opacity: 1 !important; }
.seal .seal-ring.still { stroke-dasharray: none; stroke-dashoffset: 0; transform: none; }
@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .login-brand { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 22px 20px; }
  .login-brand .seal { width: 64px; margin: 0; }
  .lb-1 { flex: 1 1 60%; font-size: 12px; } .lb-2 { flex-basis: 100%; font-size: 30px; } .lb-3 { display: none; }
  .login-brand::after { display: none; }
  .login-card { justify-content: flex-start; padding: 28px 20px 40px; }
}

/* ---------- Account menu ---------- */
.menu { position: fixed; z-index: 60; min-width: 230px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px rgba(15, 27, 51, .18); display: flex; flex-direction: column; }
.menu-who { display: flex; flex-direction: column; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
.menu-who b { font-size: 14.5px; } .menu-who span { font-size: 12.5px; color: var(--muted); }
.menu button { border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.menu button:hover, .menu button:focus-visible { background: var(--surface-2); }
.menu a { display: block; padding: 9px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
.menu a:hover, .menu a:focus-visible { background: var(--surface-2); }
.menu button.danger { color: var(--late); }

/* ---------- Staff accounts (admin) ---------- */
.modal.wide { width: min(1040px, calc(100vw - 24px)); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stform { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.stform h3 { margin: 0; font-size: 15.5px; }
.stform .field input:disabled { background: var(--surface-3); color: var(--muted); }
.sttools { display: flex; justify-content: flex-end; }
.stlist { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.strow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line-2); }
.strow:first-child { border-top: 0; }
.strow.off { background: var(--surface-2); }
.strow.off .stname b, .strow.off .stmeta { color: var(--muted); }
.strow .ini { margin-right: 0; flex: none; }
.stwho { flex: 1; min-width: 0; }
.stname { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.stmeta { margin-top: 3px; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.strow .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: none; }
.stmsg { margin: 0; padding: 14px; }
@media (max-width: 640px) { .strow { flex-wrap: wrap; } .strow .acts { width: 100%; justify-content: flex-start; padding-left: 42px; } }
.ini { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 6px; margin-right: 8px; border-radius: 999px; background: var(--billing); color: #fff; font-size: 11px; font-weight: 700; }
.ini.Office { background: var(--office); }
.pill.late { background: var(--late-bg); color: var(--late); }
.danger-text { color: var(--late) !important; }
.btn.confirm { background: var(--late); border-color: var(--late); color: #fff !important; }
.temp { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--office-bg); border: 1px solid #b7e4c7; }
.temp > div:first-child { display: flex; flex-direction: column; gap: 2px; max-width: 520px; }
.temp > div:first-child span { font-size: 13.5px; color: var(--ink-2); }
.temp-pw { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.temp-pw .mono { font-family: var(--mono); font-size: 14px; } .temp-pw b { font-size: 15px; letter-spacing: .5px; }
.mono { font-family: var(--mono); font-size: 13px; }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr 1fr; } }

/* ---------- Sections nav (Claims · Adjustments) ---------- */
.topnav { display: flex; gap: 4px; margin-right: 8px; }
.topnav a { padding: 8px 12px; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none; }
.topnav a:hover { background: var(--surface-2); color: var(--ink); }
.topnav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.who { font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }

/* ---------- Adjustments page ---------- */
.incoming { padding: 12px 16px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 500; font-size: 14px; }
.incoming.ok { background: var(--office-bg); color: var(--office); }
.incoming.bad { background: var(--late-bg); color: var(--late); }
.incoming .probs { margin-top: 8px; color: var(--ink-2); } .incoming ul { margin: 4px 0 0; padding-left: 20px; max-height: 160px; overflow: auto; }
.setup-in { padding: 18px 22px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
.setup h2 { margin: 0 0 6px; font-size: 18px; } .setup .sub { margin: 0; color: var(--muted); font-size: 14px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; } .steps a { color: var(--brand); font-weight: 600; }
.mono { font-family: var(--mono); font-size: 13px; }
.ctl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; }
.dates { display: flex; gap: 8px; } .sel input[type="date"] { border: 0; background: transparent; font-weight: 600; font-size: 14px; color: var(--ink); outline: 0; padding: 4px 4px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-right: auto; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.chip:hover { background: var(--surface-2); } .chip[aria-pressed="true"] { background: var(--brand-soft); border-color: #b9cdee; color: var(--brand); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 16px 12px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 13px; }
.fchip button { border: 0; background: none; color: inherit; font-size: 16px; line-height: 1; width: 22px; height: 22px; border-radius: 50%; }
.fchip button:hover { background: rgba(0, 74, 173, .12); }
.adj-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.adj-stats .stat { cursor: default; } .adj-stats .stat:hover { background: none; }
.adj-stats .stat .l::before { background: var(--c, var(--brand)); }
.stat .n.small { font-size: 16px; line-height: 1.3; letter-spacing: 0; padding-top: 6px; }
.empty-big { padding: 40px 24px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.empty-big strong { color: var(--ink); font-size: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.bd h3, .list-h { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 16px 10px; font-size: 15px; }
.list-h { padding: 0; margin-right: auto; } .list-h .hint { font-weight: 500; }
.tabs.mini { margin-left: auto; } .tabs.mini .tab { padding: 3px 9px; font-size: 12.5px; }
.bd-body { padding: 0 8px 10px; } .pad { padding: 8px; }
table.bars { width: 100%; border-collapse: collapse; font-size: 13.5px; table-layout: fixed; }
table.bars th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 8px; }
table.bars th:nth-child(2) { width: 62px; } table.bars th:nth-child(3) { width: 104px; } table.bars th.barcol { width: 30%; }
table.bars td { padding: 7px 8px; border-top: 1px solid var(--line-2); vertical-align: middle; }
table.bars tbody tr { cursor: pointer; } table.bars tbody tr:hover td { background: var(--surface-2); }
table.bars tbody tr.on td { background: var(--brand-soft); } table.bars tbody tr:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.lbl { overflow-wrap: anywhere; font-weight: 500; } .lbl small { display: block; color: var(--late); font-size: 12px; font-weight: 600; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; } .b { font-weight: 700; }
.barcol { white-space: nowrap; } .barcol small { display: inline-block; width: 34px; text-align: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.bar { display: inline-block; vertical-align: middle; width: calc(100% - 40px); height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.allbtn { margin: 4px 0 0 4px; }
.adj-list { display: flex; flex-direction: column; }
.adj { display: grid; grid-template-columns: minmax(170px, .9fr) minmax(0, 3fr) minmax(120px, .7fr); gap: 18px; padding: 14px 16px; border-top: 1px solid var(--line-2); border-left: 4px solid var(--late); }
.adj:first-child { border-top: 0; } .adj.charge { border-left-color: var(--line); }
.adj-pt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.adj-mid { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.adj-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13.5px; color: var(--ink-2); }
.adj-why { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 14px; }
.adj-why q { color: var(--ink); font-style: italic; overflow-wrap: anywhere; }
.reason { display: inline-flex; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--pending-bg); color: var(--pending); }
.reason.r-note, .reason.r-type { background: var(--billing-bg); color: var(--billing); }
.missing { color: var(--muted); font-size: 13px; }
table.procs { width: 100%; border-collapse: collapse; font-size: 13px; }
table.procs th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 3px 8px 3px 0; border-bottom: 1px solid var(--line-2); }
table.procs td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; } table.procs td small { color: var(--muted); }
.st { display: inline-block; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.st.none { background: var(--late-bg); color: var(--late); } .st.part { background: var(--surface-3); color: var(--ink-2); }
.warn { margin: 0; color: var(--late); font-weight: 600; font-size: 13px; }
.adj-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.adj-amt b { font-size: 17px; font-variant-numeric: tabular-nums; } .adj-amt small { color: var(--muted); font-size: 12.5px; }
.more { display: flex; justify-content: center; padding: 12px; } .more .btn[hidden] { display: none; }
.reads { margin: -6px 2px 0; }
@media (max-width: 1020px) {
  .grid-2 { grid-template-columns: 1fr; }
  .adj-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adj { grid-template-columns: minmax(0, 1fr) auto; } .adj-mid { grid-column: 1 / -1; grid-row: 2; }
  .setup-in { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topnav { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; } .topnav a { padding: 8px 10px; white-space: nowrap; } .topbar-in { flex-wrap: wrap; } .who { display: none; }
  .adj-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adj-stats .stat:nth-child(odd) { border-left: 0; } .adj-stats .stat { border-top: 1px solid var(--line-2); }
  .dates { width: 100%; } .dates .sel { flex: 1; } .dates input { width: 100%; }
  table.bars th.barcol, table.bars td.barcol { display: none; } table.bars th:nth-child(3) { width: 96px; }
  table.procs thead { display: none; } table.procs tr { display: grid; grid-template-columns: auto 1fr auto; gap: 0 8px; padding: 5px 0; border-bottom: 1px solid var(--line-2); }
  table.procs td { border: 0; padding: 0; } table.procs td:nth-child(3), table.procs td:nth-child(4) { display: none; } table.procs td:nth-child(6) { grid-column: 2 / -1; }
}
.old-reader { color: var(--late); font-weight: 700; font-size: 14px; }

/* ---------- Adjustments: detail panel ---------- */
body.noscroll { overflow: hidden; }
.adj-drawer { width: min(900px, 100vw); }
.adj-drawer .dhead { align-items: flex-start; }
.adj-drawer .back { margin: -4px 0 6px -8px; gap: 4px; }
.adj-drawer .back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.dkind { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.adj-drawer h2 { margin: 2px 0 0; }
.dkpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dkpis > div { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line-2); }
.dkpis > div:first-child { border-left: 0; }
.dkpis b { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.dkpis span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.dkpis .bad b { color: var(--late); }
.dminis { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.mini { border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px 6px; min-width: 0; }
.mini h4 { margin: 0 8px 4px; font-size: 13px; color: var(--ink-2); }
.adj-drawer .dbody > * { flex-shrink: 0; } /* nothing in the panel gets squeezed; the panel scrolls instead */
.mini table.bars { font-size: 13px; table-layout: auto; } .mini table.bars td { padding: 7px 8px; vertical-align: top; }
.mini td.num { padding-left: 12px !important; }
.mini .lbl { overflow-wrap: normal; word-break: normal; }
.mini td.num { width: 1%; } .mini td.num b { display: block; } .mini td.num small { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.minibar { display: block; height: 4px; margin-top: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.minibar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.mini table.bars tbody tr:first-child td { border-top: 0; }
.more-in { margin: 4px 8px 2px; }
.dlist { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.dlist-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dlist-h h3 { margin: 0; font-size: 15px; }
.dlist .adj-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.adj-drawer .adj { grid-template-columns: minmax(150px, .9fr) minmax(0, 3fr) minmax(110px, .7fr); gap: 14px; }
.ptools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
table.bars.full tbody tr:first-child td { border-top: 0; }
table.bars tbody tr[data-ddim], table.bars tbody tr[data-pick] { cursor: pointer; }
table.bars tbody tr[data-ddim]:hover td, table.bars tbody tr[data-pick]:hover td { background: var(--surface-2); }
table.bars tbody tr[data-ddim]:focus-visible, table.bars tbody tr[data-pick]:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.bd table.bars tbody tr:hover td:first-child { color: var(--brand); }
.allbtn { margin: 6px 0 2px 4px; color: var(--brand); font-weight: 600; }
@media (max-width: 760px) {
  .dkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dkpis > div:nth-child(3) { border-left: 0; } .dkpis > div:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .adj-drawer .adj { grid-template-columns: minmax(0, 1fr) auto; } .adj-drawer .adj-mid { grid-column: 1 / -1; grid-row: 2; }
  .adj-drawer .dhead, .adj-drawer .dbody, .adj-drawer .dfoot { padding-left: 16px; padding-right: 16px; }
  .adj-drawer .dfoot .hint { display: none; }
}

/* ---------- AR & Collections ---------- */
.status-line { margin: 0; padding: 0 16px 12px; }
.ar-stats .stat { cursor: default; } .ar-stats .stat:hover { background: none; }
.ar-stats .stat .l::before { display: none; }
.stat .sub { font-size: 12px; color: var(--muted); line-height: 1.35; }
.stat .n.good, .rate.good { color: var(--office); } .stat .n.warn, .rate.warn { color: var(--pending); } .stat .n.bad, .rate.bad { color: var(--late); }
.rate { font-weight: 700; }
.sec-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px 6px; }
.sec-h h3 { margin: 0; font-size: 15px; margin-right: auto; }
.chart { padding: 4px 12px 8px; } .chart svg { display: block; width: 100%; height: auto; stroke: none; stroke-width: 0; fill: currentColor; }
.chart svg text, .chart svg rect, .chart svg circle { stroke: none; }
.chart svg .pt90 { stroke: #fff; stroke-width: 2; }
.chart rect.nr, .legend .sw.nr { fill: var(--line); background: var(--line); }
table.grid td.nr-cell { color: var(--muted); font-style: italic; text-align: center; }
.chart .gl { stroke: var(--line-2); stroke-width: 1; } .chart .base { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart rect.prod { fill: #a9c1e8; } .chart rect.coll { fill: var(--brand); }
.chart .bar-g:hover rect.prod { fill: #8fadde; } .chart .bar-g:hover rect.coll { fill: var(--brand-ink); }
.chart .l60 { fill: none; stroke: #e0a03a; stroke-width: 2; } .chart .l90 { fill: none; stroke: var(--late); stroke-width: 2; }
.chart .pt90 { fill: var(--late); stroke: #fff; stroke-width: 2; } .chart .tgt { stroke: var(--office); stroke-dasharray: 4 4; stroke-width: 1.5; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 2px 4px 6px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; } .sw.prod { background: #a9c1e8; } .sw.coll { background: var(--brand); }
.sw.a60 { background: #e0a03a; height: 3px; } .sw.a90 { background: var(--late); height: 3px; } .sw.tgt { height: 0; border-top: 2px dashed var(--office); }
.tscroll { overflow-x: auto; padding: 0 8px 10px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.grid tbody tr:hover td { background: var(--surface-2); }
table.grid tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; }
table.grid tr.unread td { color: var(--muted); } table.grid tr.muted-row td { color: var(--muted); font-style: italic; }
table.grid td.late { color: var(--late); } .empty-cell { color: var(--muted); padding: 18px 10px !important; }
table.grid .cp.name { font-size: 13.5px; }
.buckets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 4px 16px 10px; }
.bucket { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bucket .bl { font-size: 12.5px; font-weight: 600; color: var(--muted); } .bucket b { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.bucket .bs { font-size: 12.5px; color: var(--ink-2); }
.bucket.b90 { border-color: #f3c1bb; background: #fff8f7; } .bucket.b90 b { color: var(--late); }
.bucket.tot { background: var(--surface-2); }
.split { display: block; height: 6px; border-radius: 99px; background: #f0b429; overflow: hidden; margin-top: 4px; } .split i { display: block; height: 100%; background: var(--brand); }
.bp { display: flex; flex-direction: column; gap: 1px; font-size: 12px; color: var(--muted); }
.bp span { display: inline-flex; align-items: center; gap: 5px; } .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; } .dot.ins { background: var(--brand); } .dot.pat { background: #f0b429; }
.acc-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 16px; }
@media (max-width: 1100px) { .buckets { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ar-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .buckets { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ar-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .chart { overflow-x: auto; } .chart svg { min-width: 560px; } }
.ar-stats .stat .n { font-size: clamp(19px, 1.65vw, 25px); }

/* Over 90: what it's made of */
.o90-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 4px 16px 12px; }
.o90-tiles > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.o90-tiles b { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; } .o90-tiles span { font-size: 12.5px; color: var(--ink-2); }
.o90-tiles b.ins { color: var(--brand); } .o90-tiles b.pat { color: #b7791f; } .o90-tiles b.good { color: var(--ok, #1a7f4b); } .o90-tiles b.warn { color: #b7791f; }
.o90-grid { padding: 0 16px; gap: 16px; } .sub-h { font-size: 13px; font-weight: 600; color: var(--muted); margin: 6px 0; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-align: left; } .linkish:hover { text-decoration: underline; }
td .linkish { color: inherit; } td.late .linkish { color: var(--late); text-decoration: underline dotted; }
.claim { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 99px; margin-top: 2px; }
.claim.open { background: #e8effb; color: var(--brand); } .claim.done { background: #eef6f1; color: #1a7f4b; }
td.codes { max-width: 220px; } .warn-t { color: #b7791f; } .o90-pick { margin: 0; }
@media (max-width: 900px) { .o90-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* By date of service */
.svc-intro { margin: -4px 0 6px; } .svc-months { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
table.grid tr.cur td { background: var(--surface-2); font-weight: 600; }
.svc-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
@media (max-width: 900px) { .svc-grid { grid-template-columns: 1fr; } } table.grid tr.later td:first-child { color: var(--ink-2); }
.sorter { font-weight: 600; color: inherit; } .sorter.on { color: var(--brand); } .sorter.on::after { content: " ↓"; }
.svc-sec .acc-tools h4 { margin: 0; }

/* By date of service: the month as a statement, and every month by collection month */
.svc-statement { padding: 0 16px 14px; } .pad-x { padding-left: 16px; padding-right: 16px; }
.stmt { border: 1px solid var(--line); border-radius: 12px; max-width: 760px; overflow: hidden; }
.stmt-h { padding: 10px 16px; font-weight: 700; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.stmt .sl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 9px 16px; border-bottom: 1px solid var(--line-2); align-items: baseline; }
.stmt .sl:last-child { border-bottom: 0; } .stmt .sl b { font-variant-numeric: tabular-nums; font-size: 15px; text-align: right; }
.stmt .sl em { grid-column: 1 / -1; font-style: normal; font-size: 12px; color: var(--muted); } .stmt .sl em:empty { display: none; }
.stmt .sl small { color: var(--muted); font-weight: 400; }
.stmt .sl.top b { font-size: 18px; } .stmt .sl.in span { padding-left: 14px; } .stmt .sl.in b { color: var(--brand); }
.stmt .sl.total { background: #eef4fd; } .stmt .sl.total b { font-size: 18px; color: var(--brand); } .stmt .sl.total span { font-weight: 700; }
.stmt .sl.owed b { color: #b7791f; font-size: 17px; } .stmt .sl.sub span { color: var(--ink-2); }
table.svc-matrix td.same { background: #eef4fd; font-weight: 600; }
table.svc-matrix th.grp { text-align: center; border-bottom: 1px solid var(--line); }

/* By date of service, simple card */
.svc-card { margin: 0 16px 16px; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.sc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.sc-head > div { display: flex; flex-direction: column; gap: 2px; } .sc-big { text-align: right; align-items: flex-end; }
.sc-l { font-size: 13px; font-weight: 600; color: var(--muted); } .sc-s { font-size: 12.5px; color: var(--muted); }
.sc-n { font-size: 26px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; } .sc-big b { font-size: 26px; color: var(--brand); letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.sc-bar { display: flex; gap: 2px; height: 18px; border-radius: 6px; overflow: hidden; background: var(--surface-3); }
.sc-bar i { display: block; height: 100%; } .sc-bar i.same, .dot.same { background: var(--brand); } .sc-bar i.later, .dot.later { background: #8fb0e6; }
.sc-bar i.wo, .dot.wo { background: #b8bfca; } .sc-bar i.owed, .dot.owed { background: #e3a83c; }
.sc-keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.sc-keys .k { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 2px 8px; align-items: center; }
.sc-keys .dot { width: 12px; height: 12px; border-radius: 3px; } .sc-keys .kl { font-size: 13px; color: var(--ink-2); }
.sc-keys b, .sc-keys .kp, .sc-keys .ks { grid-column: 2; } .sc-keys b { font-size: 18px; font-variant-numeric: tabular-nums; }
.sc-keys .kp { font-size: 12px; color: var(--muted); } .sc-keys .ks { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
@media (max-width: 760px) { .sc-keys { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sc-big { text-align: left; align-items: flex-start; } }

.svc-out { margin: 0 16px 10px; padding: 8px 12px; border-radius: 10px; background: #fff7e8; border: 1px solid #f1d49b; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.out-chip { padding: 2px 10px; font-size: 12.5px; }
table.grid td.inc, table.grid th.inc { width: 74px; text-align: center; } table.grid td.inc input { width: 16px; height: 16px; cursor: pointer; }
table.grid tr.out td { color: var(--muted); text-decoration: line-through; } table.grid tr.out td.inc { text-decoration: none; }
.sc-keys .k { align-content: start; } .sc-keys .ks b { font-size: 12.5px; font-weight: 700; }

/* Who still owes */
.svc-owed { margin: 0 16px 18px; border: 1px solid #f1d49b; border-radius: 14px; padding: 14px 16px; background: #fffdf8; }
.ow-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 12px; } .ow-head h4 { margin: 0; font-size: 16px; } .ow-head .btn { margin-left: auto; }
.ow-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ow-g { text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; }
.ow-g b { font-size: 18px; font-variant-numeric: tabular-nums; } .ow-g span { font-size: 12.5px; color: var(--ink-2); } .ow-g em { font-style: normal; font-size: 12px; color: var(--muted); }
.ow-g.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.ow-g.waiting b { color: var(--brand); } .ow-g.rejected b { color: var(--late); } .ow-g.paid b { color: #b7791f; } .ow-g.none b { color: var(--ink); }
.claim.bad { background: #fdecea; color: var(--late); }
.ow-table td.codes { max-width: 300px; } .oc { display: inline-block; margin: 1px 6px 1px 0; white-space: nowrap; font-size: 12.5px; } .oc b { font-weight: 600; }
.owed-btn { font-size: 12.5px; font-weight: 600; }
@media (max-width: 900px) { .ow-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- EOBs ---------- */
.eob-drop { border: 2px dashed var(--line); box-shadow: none; transition: border-color .12s, background .12s; }
.eob-drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop-in { display: flex; align-items: center; gap: 16px; padding: 20px 22px; flex-wrap: wrap; }
.drop-in > div:nth-child(2) { display: flex; flex-direction: column; gap: 3px; flex: 1 1 260px; min-width: 0; }
.drop-in b { font-size: 16px; }
.drop-ico { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drop-btns { display: flex; gap: 8px; flex-wrap: wrap; }
#work { display: flex; flex-direction: column; gap: 14px; }
#work:empty { display: none; }
.eob-job { overflow: visible; }
.job-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.job-head b { overflow-wrap: anywhere; } .job-head [data-state] { margin-right: auto; }
.job-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: start; gap: 16px; padding: 14px 16px 16px; }
.job-pages { display: flex; flex-direction: column; gap: 8px; max-height: 640px; overflow-y: auto; }
.job-pages .pg { position: relative; display: block; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.job-pages img { display: block; width: 100%; height: auto; }
.job-pages .pg span { position: absolute; right: 4px; bottom: 4px; padding: 0 6px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; }
.job-forms { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.job-eob { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.je-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.job-acts { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pad { padding: 10px 16px 0; margin: 0; }
.eob-form { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ef-row { display: flex; flex-wrap: wrap; gap: 10px; }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 0 1 150px; }
.fld.grow { flex: 1 1 220px; } .fld.amt { flex-basis: 120px; } .fld.pg { flex-basis: 80px; }
.fld > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.fld input, .ef-lines input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 14px; min-width: 0; }
.fld input:focus, .ef-lines input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ef-lines { min-width: 760px; } .ef-lines td { padding: 4px 4px !important; border-bottom: 0 !important; } .ef-lines th { padding: 4px !important; }
.ef-lines input { height: 32px; font-size: 13.5px; padding: 0 7px; } .ef-lines input.num { text-align: right; font-variant-numeric: tabular-nums; }
.ef-lines td:nth-child(1) { width: 24%; } .ef-lines td:nth-child(2) { width: 140px; } .ef-lines td:nth-child(n+4):nth-child(-n+6) { width: 96px; } .ef-lines td:last-child { width: 36px; }
.eob-form .tscroll { padding: 0; }
.ef-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.warn-t { color: var(--late); font-weight: 600; font-size: 13px; }
.btn.icon.small { width: 32px; padding: 0; justify-content: center; }
.eob-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat .sub { font-size: 12.5px; color: var(--muted); min-height: 1em; }
.eob-table td.num, .eob-table th.num, #byIns .num, #team .num, .mini-t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.b { font-weight: 700; }
tr.tap { cursor: pointer; }
.eob-table td.pts .hint { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st.unseen { background: var(--late-bg); color: var(--late); } .st.seen { background: var(--pending-bg); color: var(--pending); } .st.posted { background: var(--office-bg); color: var(--office); }
.chip-s { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; } .chip-s.bad { background: var(--late-bg); color: var(--late); }
.eob-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.eob-facts > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .eob-facts span { font-size: 12px; color: var(--muted); font-weight: 600; }
.eob-facts b { font-weight: 600; overflow-wrap: anywhere; } .eob-facts a { color: var(--brand); }
.sub-h { margin: 0; font-size: 14px; }
.mini-t tr.zero td { background: var(--late-bg); }
.eob-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.dfoot-l { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.ghost.danger { color: var(--late); }
body.noscroll { overflow: hidden; }
@media (max-width: 760px) {
  .job-grid { grid-template-columns: 1fr; } .job-pages { flex-direction: row; max-height: none; overflow-x: auto; } .job-pages .pg { flex: 0 0 96px; }
  .eob-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eob-facts { grid-template-columns: 1fr; }
  /* the list becomes cards: company + amount on top, then seen and posted side by side */
  .eob-table thead { display: none; }
  .eob-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 6px; border-bottom: 1px solid var(--line-2); }
  .eob-table td { border: 0 !important; padding: 0 !important; }
  .eob-table td:nth-child(3) { display: none; }
  .eob-table td:nth-child(1), .eob-table td:nth-child(2) { grid-column: 1 / -1; }
  .eob-table td:nth-child(4) { grid-column: 1; } .eob-table td:nth-child(5) { grid-column: 2; text-align: right; }
  .mini-t th:nth-child(n+2):nth-child(-n+4), .mini-t tbody td:nth-child(n+2):nth-child(-n+4), .mini-t tfoot td:nth-child(2) { display: none; }
  .mini-t .cp > span { white-space: normal; }
  .drop-in { padding: 16px; }
}
.eob-job.done .job-head [data-state] { color: var(--office); font-weight: 600; }
.job-done { list-style: none; margin: 0; padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.job-done li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 14px; }
.linkish { border: 0; background: none; padding: 0; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.eob-table .nm { font-weight: 500; }
.eob-open { align-self: flex-start; }
.nm-show { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nm-show li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.nm-list { display: flex; flex-direction: column; gap: 6px; }
.nm-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 32px; gap: 6px; align-items: center; }
.nm-row input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 14px; min-width: 0; }
.nm-row input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.eob-form .btn.small { align-self: flex-start; }
@media (max-width: 760px) { .nm-row { grid-template-columns: minmax(0, 1fr) 130px 32px; } }
.eob-form .fld { flex: none; }
.imp-in { display: flex; flex-direction: column; gap: 6px; padding: 0 16px 16px; }
.imp-in p { margin: 0; } #impState { font-weight: 600; }
#impBar { width: 100%; height: 10px; accent-color: var(--brand); }
.imp-now { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#impFailed summary { cursor: pointer; font-weight: 600; color: var(--late); font-size: 13.5px; }
#impFailed ul { margin: 6px 0; padding-left: 18px; font-size: 13px; max-height: 200px; overflow-y: auto; }
/* ---------- Bank ---------- */
.month-pick { display: inline-flex; align-items: center; gap: 8px; }
.month-pick select { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 14px; color: var(--ink); }
.pad-x { margin: 0; padding: 0 16px 14px; }
.bk-desc { overflow-wrap: anywhere; max-width: 420px; }
.bk-pays { list-style: none; margin: 4px 0 0; padding: 0; font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; }
.bk-why { display: flex; gap: 6px; min-width: 260px; }
.bk-why input { flex: 1; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; min-width: 0; }
.stat.is-urgent.has .n { color: var(--late); } .stat.is-pending.has .n { color: var(--pending); }
#kinds .num, #missing .num, #extra .num, #matched .num, #excl .num, #stmts .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.bk-pays summary { cursor: pointer; font-size: 12.5px; color: var(--muted); } .bk-pays ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
/* ---------- Alerts ---------- */
.al-steps ol { margin: 6px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; } .al-steps p { margin: 6px 0; }
.al-form { display: flex; flex-wrap: wrap; gap: 12px 16px; padding: 4px 16px 16px; align-items: flex-end; }
.al-form .fld select { height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--surface); font-size: 14px; }
.al-days { display: flex; flex-wrap: wrap; gap: 6px 12px; min-height: 36px; align-items: center; }
.al-day, .al-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; } .al-check { flex-basis: 100%; }
.al-acts { display: flex; align-items: center; gap: 10px; flex-basis: 100%; padding-bottom: 14px; }
.al-pv { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 10px; background: #f4f6fa; }
/* ---------- AR Watch ---------- */
.wt-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 4px 16px 14px; }
.wt-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.wt-card.alert-up { border-color: var(--late); box-shadow: inset 4px 0 0 var(--late); } .wt-card.alert-down { border-color: var(--office); box-shadow: inset 4px 0 0 var(--office); }
.wt-card > b { font-size: 24px; font-variant-numeric: tabular-nums; }
.wt-l { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink-2); font-size: 13.5px; }
.wt-dot, .wt-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.wt-dot.b30 { background: #2f6fd6; } .wt-dot.b60 { background: #d98a0b; } .wt-dot.b90 { background: #c0392b; }
.wt-row { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; flex-wrap: wrap; } .wt-row > span:first-child { width: 46px; color: var(--muted); }
.wt-ch { font-weight: 700; font-variant-numeric: tabular-nums; } .wt-ch.up { color: var(--late); } .wt-ch.down { color: var(--office); }
.wt-flag { align-self: flex-start; margin-top: 4px; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--late-bg); color: var(--late); }
.wt-card.alert-down .wt-flag { background: var(--office-bg); color: var(--office); }
.wt-chart { width: 100%; overflow: hidden; } .wt-chart svg { display: block; width: 100%; height: auto; stroke-width: 1; }
.wt-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-top: 4px; } .wt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wt-days { width: 90px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
#risk .num, #whoUp .num, #whoDown .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 760px) { .wt-cards { grid-template-columns: 1fr; } }
/* ---------- Adjustments by doctor ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; padding: 0 16px 16px; }
.doc-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.doc-card header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.doc-tot { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.doc-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); } .doc-sub .late { color: var(--late); } .doc-sub .ok { color: var(--office); }
.doc-reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.doc-reasons li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(40px, 1fr) auto; gap: 8px; align-items: center; }
.doc-rl { overflow: hidden; text-overflow: ellipsis; } .doc-rl em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--late); background: var(--late-bg); border-radius: 5px; padding: 0 5px; }
.doc-bar { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; } .doc-bar i { display: block; height: 100%; background: #98a2b3; border-radius: 4px; }
.doc-reasons li.prev .doc-bar i { background: var(--late); }
.doc-rv { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.doc-codes { margin: 0; } .doc-card details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand); }
.doc-ex { margin: 6px 0 0; padding-left: 16px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) { .doc-grid { grid-template-columns: 1fr; } }
/* ---------- Page layout: every page starts with its title, a line on what it's for, and its own controls ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 4px 2px 2px; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -.3px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.page-head .page-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-tabs .tab { padding: 7px 14px; font-size: 14px; }
.set-reader .steps { margin: 6px 0 14px; } .set-reader p { margin: 0 0 6px; }
body.no-bank [data-needs-bank] { display: none !important; }
#looseA tbody, #looseB tbody { max-height: none; }
.loose-d { padding-bottom: 14px; } .loose-d summary { cursor: pointer; font-weight: 600; color: var(--brand); font-size: 14px; margin-bottom: 8px; }
.set-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; padding: 4px 16px 16px; }
.set-form .fld { flex: none; } .set-form .fld select { height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--surface); font-size: 14px; }
.set-checks, .set-form .al-acts { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; } .set-form .al-acts { flex-direction: row; padding: 0; }
@media (max-width: 760px) { .set-form { grid-template-columns: 1fr; } }
/* ---------- Side menu (wide screens): the sections down the left, your account at the bottom ---------- */
.topnav a svg { width: 18px; height: 18px; flex: none; } .nav-sep { display: none; }
@media (max-width: 999px) { .topnav a svg { display: none; } }
@media (min-width: 1000px) {
  body { padding-left: 236px; }
  .topbar { position: fixed; inset: 0 auto 0 0; width: 236px; border-bottom: 0; border-right: 1px solid var(--line); z-index: 30; }
  .topbar-in { flex-direction: column; align-items: stretch; height: 100%; max-width: none; padding: 18px 12px 14px; gap: 22px; }
  .brand { margin: 0 4px; }
  .topnav { flex-direction: column; gap: 2px; margin: 0; flex: 1; }
  .topnav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; font-size: 14.5px; }
  .topnav a[aria-current="page"] svg { color: var(--brand); }
  .nav-sep { display: block; margin-top: auto; }
  .top-acts { flex-direction: column; align-items: stretch; gap: 8px; }
  .mebtn { width: 100%; justify-content: flex-start; }
  .wrap { max-width: 1240px; }
}
/* ---------- Page tabs: one view at a time ---------- */
.tab-off { display: none !important; }
.page-tabs { width: 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; background: none; padding: 0; gap: 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
.page-tabs .tab { border-radius: 0; padding: 10px 14px; font-size: 14.5px; color: var(--ink-2); box-shadow: none !important; background: none !important; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.page-tabs .tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.page-head { flex-wrap: wrap; } .page-head + .page-tabs { margin-top: -6px; }
.min-amt { gap: 6px; } .min-in { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.min-amt input { width: 74px; border: 0; outline: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); }
/* ---------- Clean up old claims ---------- */
.clean-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; max-height: 52vh; overflow-y: auto; }
.clean-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.clean-row:last-child { border-bottom: 0; } .clean-row:hover { background: var(--surface-2); } .clean-row input { margin-top: 3px; width: 16px; height: 16px; }
.clean-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .clean-note { font-size: 13px; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.clean-why { font-size: 12px; font-weight: 700; color: var(--ink-2); background: var(--surface-3); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
#cleanTabs { margin: 0 0 10px; flex-wrap: wrap; }
#cleanDlg .dfoot { justify-content: space-between; }

/* ---------- billing tools: EOB arrived, denial reasons, insurance cards, underpaid ---------- */
.eobtag, .dentag { align-self: flex-start; display: inline-flex; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.eobtag { background: var(--office-bg); color: var(--office); }
.dentag { background: var(--surface-3); color: var(--ink-2); font-weight: 600; white-space: normal; }
.eob-hit { border: 1px solid var(--office); border-radius: 12px; background: var(--office-bg); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.eob-hit-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; } .eob-hit-h b { color: var(--office); }
.eob-hit-row { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; background: var(--surface); border-radius: 10px; padding: 10px 12px; }
.eob-hit-row.zero { box-shadow: inset 4px 0 0 var(--late); }
.eob-hit-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13.5px; }
.eob-hit-line { color: var(--ink-2); } .eob-hit-amts { font-variant-numeric: tabular-nums; }
.eob-hit-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.denial-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 2px 2px 0; font-size: 13.5px; }
.denial-row label { font-weight: 600; color: var(--ink-2); }
.denial-row select { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font: inherit; max-width: 100%; background: var(--surface); }
.inslink { display: inline-flex; align-items: baseline; gap: 6px; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.inslink small { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ins-line { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.ins-line:first-child { border-top: 0; } .ins-l { color: var(--muted); font-weight: 600; } .ins-v a { color: var(--brand); word-break: break-all; }
.pre { white-space: pre-wrap; }
.ins-tips { background: var(--pending-bg, #fff7e6); border-radius: 10px; padding: 10px 12px; font-size: 14px; } .ins-tips p { margin: 4px 0 0; }
.fixtag { font-style: normal; font-size: 11px; font-weight: 700; color: var(--late); background: var(--late-bg); border-radius: 5px; padding: 0 5px; white-space: nowrap; }
.den-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.den-table td.num, .den-table th.num { text-align: right; }
.den-table td { white-space: normal; }
.den-needs { display: flex; flex-direction: column; padding: 0 16px 14px; }
.den-need { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.den-need:first-child { border-top: 0; } .den-need .hint { margin-right: auto; }
.den-need select { height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font: inherit; max-width: 100%; }
@media (max-width: 760px) { .den-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ins-line { grid-template-columns: 1fr; gap: 2px; } }
/* Insurance page */
.ins-grid { display: grid; align-items: start; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; padding: 4px 16px 16px; }
.ins-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; background: var(--surface); }
.ins-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.ins-card h3 { margin: 0; font-size: 16px; } .ins-card .ins-aka { font-size: 12.5px; color: var(--muted); }
.ins-card .ins-counts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink-2); }
.ins-card.empty-card { border-style: dashed; }
.ins-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ins-form .full { grid-column: 1 / -1; }
.ins-form textarea { min-height: 76px; }
@media (max-width: 640px) { .ins-form { grid-template-columns: 1fr; } }
/* Underpaid (Adjustments page) */
.up-list { display: flex; flex-direction: column; padding: 0 16px 14px; }
.up-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.up-row:first-child { border-top: 0; }
.up-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.up-money { font-variant-numeric: tabular-nums; display: flex; flex-direction: column; gap: 2px; }
.up-money .short { color: var(--late); font-weight: 700; font-size: 15px; }
.up-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.up-row.done { opacity: .75; }
@media (max-width: 760px) { .up-row { grid-template-columns: 1fr; } .up-acts { justify-content: flex-start; } }
body[data-current-tab="denials"] .page-acts { display: none; }
/* Urgent alert (every page) */
.urg-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.urg-pop { position: fixed; right: 18px; bottom: 18px; z-index: 70; width: min(400px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--late); border-radius: 14px;
  box-shadow: 0 18px 40px -12px rgba(16, 24, 40, .35); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; animation: urgIn .25s ease-out; }
@keyframes urgIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.urg-pop-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; } .urg-pop-h b { color: var(--late); font-size: 15px; }
.urg-x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 2px; }
.urg-pop ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; }
.urg-pop li { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; background: var(--late-bg); border-radius: 10px; font-size: 13.5px; }
.urg-pop li a { color: var(--ink); text-decoration: none; } .urg-pop li a span { color: var(--muted); font-size: 12.5px; }
.urg-pop li a:hover b { text-decoration: underline; }
.urg-by { color: var(--ink-2); font-size: 12.5px; } .urg-note { color: var(--muted); font-size: 12.5px; font-style: italic; }
.urg-more { margin: 0; font-size: 12.5px; color: var(--muted); }
.urg-acts { display: flex; justify-content: flex-end; gap: 8px; }
@media print { .urg-pop { display: none; } }
/* 30 / 60 / 90 */
.o90-buckets { margin: 0 0 6px; }
.agetag { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 0 6px; margin-top: 2px; white-space: nowrap; }
.agetag.a30 { background: var(--pending-bg, #fff7e6); color: #93370d; } .agetag.a60 { background: #fdebd8; color: #b54708; } .agetag.a90 { background: var(--late-bg); color: var(--late); }
.claim-notes { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; max-width: 420px; }
.claim-notes .cn { display: block; background: var(--surface-2, #f6f7f9); border-radius: 6px; padding: 3px 7px; white-space: normal; }
.claim-notes .cn i { font-style: normal; font-weight: 600; color: var(--ink-2); }
.claim-notes details summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 12px; margin: 2px 0; }
.claim-notes details .cn { margin-top: 3px; }
td.codes .pc { display: block; white-space: normal; font-size: 12.5px; min-width: 180px; } td.codes .pc b { font-family: var(--mono, ui-monospace, monospace); }
.acc-open { font-weight: 600; text-align: left; }
.unnamed-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0 16px 12px; padding: 10px 14px; border-radius: 10px; background: var(--pending-bg, #fff7e6); font-size: 13.5px; }
/* AR by insurance */
.ins-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 16px 12px; }
.ins-tiles > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.ins-tiles b { font-size: 22px; font-variant-numeric: tabular-nums; } .ins-tiles span { font-size: 12.5px; color: var(--ink-2); } .ins-tiles em { font-style: normal; font-weight: 700; }
.good { color: var(--ok, #067647); }
.ins-ar td.num { white-space: nowrap; } .ins-ar tr.total td { border-top: 2px solid var(--line); background: var(--surface-2, #f6f7f9); }
.agebar-c { min-width: 140px; }
.agebar { display: flex; height: 10px; border-radius: 4px; overflow: hidden; gap: 2px; background: transparent; min-width: 4px; }
.agebar i { display: block; height: 100%; flex-grow: 0; flex-shrink: 0; }
.agebar .a30 { background: #fdb022; } .agebar .a60 { background: #f79009; } .agebar .a90 { background: var(--late); }
@media (max-width: 760px) { .ins-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* By date of service: weekly / every 2 weeks */
.wk-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.wk-chart { margin-bottom: 6px; } .wk-chart svg { width: 100%; height: auto; display: block; }
.wk-chart rect.prod { fill: #a9c1e8; } .wk-chart rect.coll { fill: var(--brand); }
.wk-chart .gl { stroke: var(--line-2); } .wk-chart .base { stroke: var(--line); } .wk-chart .ax { font-size: 11px; fill: var(--muted); }
.wk-bar-c { min-width: 150px; }
.wk-bar { display: flex; height: 10px; border-radius: 4px; overflow: hidden; background: var(--line-2); }
.wk-bar i { display: block; height: 100%; } .wk-bar i.same { background: var(--brand); } .wk-bar i.wo { background: #b8bfca; } .wk-bar i.owed { background: #e3a83c; }
.svc-matrix tr.total td { border-top: 2px solid var(--line); background: var(--surface-2, #f6f7f9); }
.wk-chart svg { stroke: none; stroke-width: 0; fill: currentColor; } .wk-chart svg rect, .wk-chart svg text { stroke: none; }
.wk-chart .gl, .wk-chart .base { stroke-width: 1; }
.wk-tools .tabs.mini { align-self: flex-start; margin-left: 0; }
.wk-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin: 8px 0 0; }
.wk-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.wk-legend i.same { background: var(--brand); } .wk-legend i.wo { background: #b8bfca; } .wk-legend i.owed { background: #e3a83c; }
/* Sign-in: forgot password */
.lbl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.linkish.small { font-size: 13px; }
.ok-box { background: #ecfdf3; color: #05603a; border: 1px solid #abefc6; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.login-card form .btn.ghost { width: 100%; margin-top: 8px; }
.grid3 .span2 { grid-column: span 2; } @media (max-width: 640px) { .grid3 .span2 { grid-column: auto; } }
.wk-ins { position: relative; align-self: flex-start; font-size: 13.5px; }
.wk-ins summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); font-weight: 600; }
.wk-ins summary::-webkit-details-marker { display: none; } .wk-ins summary::after { content: "▾"; font-size: 11px; color: var(--muted); } .wk-ins summary b { color: var(--ink); }
.wk-ins-pop { position: absolute; z-index: 30; top: 40px; left: 0; width: min(340px, calc(100vw - 48px)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px -10px rgba(16, 24, 40, .3); padding: 10px 12px; }
.wk-ins-acts { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; } .wk-ins-acts input { flex: 1; min-width: 0; height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; font: inherit; }
.wk-ins-list { max-height: 300px; overflow: auto; display: flex; flex-direction: column; }
.wk-ins-list label { display: flex; align-items: center; gap: 8px; padding: 5px 2px; border-bottom: 1px solid var(--line-2); cursor: pointer; } .wk-ins-list label span { flex: 1; } .wk-ins-list input { width: 16px; height: 16px; }
.wk-ins-pop .hint { margin: 6px 0 0; font-size: 12px; }
.wk-ins-h { margin-top: 14px; } .svc-matrix tr.tap { cursor: pointer; } .svc-matrix tr.picked td { background: #eef4ff; }
.svc-readnotes { font-size: 13px; color: #7a4b00; margin: 0 0 8px; } .svc-readnotes summary { cursor: pointer; font-weight: 600; } .svc-readnotes ul { margin: 6px 0 0; padding-left: 18px; }
.owed-sub > td { background: #fafbfd; padding: 4px 8px 12px 22px !important; }
.owed-list { font-size: 13px; } .owed-list th, .owed-list td { padding: 6px 8px; } .owed-list tfoot td { border-top: 1px solid var(--line); }

/* ---------- Tasks ---------- */
.nav-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nav-count.late { background: var(--late); } .nav-count[hidden] { display: none; }
.head-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.panel-h { margin: 0; font-size: 16px; }
.table-box { overflow-x: auto; }
.task-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.task-stats .stat { cursor: default; } .task-stats .stat:hover { background: none; }
.task-stats .k-todo { --c: var(--brand); } .task-stats .k-late { --c: var(--late); } .task-stats .k-money { --c: var(--pending-dot); } .task-stats .k-done { --c: var(--office); }
.team-pick { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.team-pick select { height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: var(--surface); }
.task-list { display: flex; flex-direction: column; }
.task-h { margin: 0; padding: 14px 18px 6px; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.task-h.late { color: var(--late); }
.task { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto auto; align-items: center; gap: 6px 14px; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.task.late { background: #fffafa; } .task.is-done { opacity: .85; }
.task-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: var(--ink); }
.task-main b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; } .task-main:hover b { color: var(--brand); text-decoration: underline; }
.task-detail { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; } .task-meta { font-size: 12.5px; color: var(--muted); }
.due-late { color: var(--late) !important; font-weight: 700; }
.task-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.task-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.kind-pill { justify-self: start; display: inline-block; padding: 3px 9px; border-radius: 7px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.kind-pill.k-follow, .kind-pill.k-weekly { background: #fff1e6; color: #9a3b0b; }
.kind-pill.k-eob, .kind-pill.k-eft, .kind-pill.k-monthly { background: var(--brand-soft); color: var(--brand); }
.kind-pill.k-complete { background: var(--office-bg); color: var(--office); }
.kind-pill.k-deadline { background: var(--late-bg); color: var(--late); }
.kind-pill.k-denial, .kind-pill.k-shortpay { background: var(--dx-bg); color: var(--dx); }
.kind-pill.k-handoff { background: var(--pending-bg); color: var(--pending); }
#taskDlg .kind-pill { margin-bottom: 8px; }
.task-claim { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 12px; }
.task-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; font-size: 14px; }
.task-facts span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; } .task-facts > div { overflow-wrap: anywhere; }
.task-notes { font-size: 13.5px; } .task-notes p { margin: 6px 0 0; }
.task-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
#tWork { display: flex; flex-direction: column; gap: 14px; } #tWork .task-row2 { margin-top: 0; }
.task-hist summary { cursor: pointer; font-weight: 600; font-size: 14px; } .task-hist ol { margin: 8px 0 0; padding-left: 20px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.task-team, .task-rules { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.task-team th, .task-rules th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding: 10px 16px; }
.task-team td, .task-rules td { padding: 11px 16px; border-top: 1px solid var(--line-2); vertical-align: top; }
.task-rules td:first-child { width: 1%; } .task-rules input[type=checkbox] { width: 18px; height: 18px; }
.rule-n { width: 64px; height: 30px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; font-weight: 700; text-align: center; }
.rules-foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.rules-foot .field { flex: 1 1 360px; }
@media (max-width: 760px) {
  .task { grid-template-columns: minmax(0, 1fr) auto; }
  .task .kind-pill { grid-column: 1 / -1; } .task-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .task-facts, .task-row2 { grid-template-columns: minmax(0, 1fr); }
  .task-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-pick { margin-left: 0; }
}
.task-acts a.btn, #taskDlg .dfoot a.btn { text-decoration: none; }

/* ---------- Claim accountability (responsible, next step, resolution, approvals, document requests) ---------- */
.acct-bar { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.acct-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; } .acct-grid select { max-width: 380px; }
.acct-grid select.needs { border-color: var(--late); background: var(--late-bg); }
.acct-next-row { display: flex; gap: 8px; flex-wrap: wrap; } .acct-next-row input:first-child { flex: 1 1 200px; min-width: 0; } .acct-next-row input[type=date] { flex: 0 0 150px; }
.acct-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-res { font-size: 14px; } .acct-res b { margin-right: 6px; }
.acct-approval { border: 1px solid var(--pending-dot); background: var(--pending-bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.acct-approval p { margin: 6px 0 0; color: var(--ink-2); } .acct-approve { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; } .acct-approve input { flex: 1 1 200px; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }
.resolve-box, .docs-box { border: 2px solid var(--brand); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
.resolve-box h3, .docs-box h3 { margin: 0; font-size: 16px; } .resolve-box > .hint { margin: 0; }
.rs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rs-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rs-checks { display: flex; flex-direction: column; gap: 6px; font-size: 14px; } .rs-checks label, .docs-items label { display: flex; gap: 8px; align-items: center; }
.rs-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rs-sum { font-weight: 700; font-size: 14px; } .rs-sum.ok { color: var(--office); } .rs-sum.off { color: var(--late); }
.docs-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 14px; font-size: 14px; }
@media (max-width: 760px) { .acct-grid, .rs-row { grid-template-columns: minmax(0, 1fr); } .rs-grid, .docs-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tasks: priority and escalation */
.prio { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; margin-right: 6px; vertical-align: 1px; }
.prio.high { background: var(--late-bg); color: var(--late); } .prio.low { background: var(--surface-3); color: var(--muted); }
.esc-tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 5px; background: var(--late); color: #fff; margin-right: 6px; vertical-align: 1px; }
.task.escalated { box-shadow: inset 4px 0 0 var(--late); }
.targets-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; padding: 14px 16px; }
.targets-grid .field input { width: 100px; } .targets-grid .unit { font-size: 13px; color: var(--muted); margin-left: 6px; }
.task-approve { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) { .targets-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Dashboard ---------- */
.dash { --s1: #1a56db; --s2: #c2620a; --s0: #667085; }
.dash-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dash-custom { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.dash-custom input { height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: var(--surface); }
.dash-period { margin: 0 0 14px; }
.dash-attn { padding: 14px 18px; } .dash-attn ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dash-attn li { display: flex; gap: 12px; align-items: baseline; font-size: 14.5px; } .dash-attn li a { color: var(--ink); font-weight: 600; }
.dash-attn .lv { flex: 0 0 92px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.dash-attn .critical .lv { color: var(--late); } .dash-attn .serious .lv { color: #b93815; } .dash-attn .warning .lv { color: var(--pending); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 16px 0; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; min-height: 118px; }
.kpi:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(16, 24, 40, .08); }
.kpi.bad { border-color: #f4b8b2; }
.k-l { font-size: 13px; font-weight: 600; color: var(--ink-2); } .k-v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.k-s, .k-c { font-size: 12.5px; color: var(--muted); } .k-c { line-height: 1.5; }
.st { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.st.ok { background: var(--office-bg); color: var(--office); } .st.bad { background: var(--late-bg); color: var(--late); } .st.warn { background: var(--pending-bg); color: var(--pending); }
.dl { font-weight: 700; } .dl.good { color: var(--office); } .dl.bad { color: var(--late); } .dl.flat { color: var(--muted); font-weight: 500; }
.dash .panel { margin-bottom: 16px; } .dash .panel .toolbar { flex-wrap: wrap; }
.dash-say { margin: 0; padding: 0 18px 8px; font-size: 14.5px; line-height: 1.55; max-width: 980px; }
.chart-box { padding: 4px 14px 10px; } .chart-box svg { width: 100%; height: auto; display: block; overflow: visible; stroke: none; stroke-width: 0; fill: none; }
.chart-box svg rect, .chart-box svg path, .chart-box svg circle, .chart-box svg text { stroke: none; }
.chart-box svg .grid { stroke: var(--line-2); stroke-width: 1; } .chart-box svg .ax { font-size: 11px; fill: var(--muted); font-family: inherit; }
.chart-box svg .tgt-l, .chart-box svg .end-l { fill: var(--ink-2); font-weight: 600; }
.chart-box svg .bar.s1, .chart-box svg .wfb.s1, .chart-box svg .dot.s1 { fill: var(--s1); } .chart-box svg .bar.s2, .chart-box svg .wfb.s2, .chart-box svg .dot.s2 { fill: var(--s2); } .chart-box svg .wfb.s0 { fill: var(--s0); }
.chart-box svg .dot { stroke: var(--surface); stroke-width: 2; }
.chart-box svg .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; } .chart-box svg .line.s1 { stroke: var(--s1); } .chart-box svg .line.s2 { stroke: var(--s2); }
.chart-box svg .target { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; } .chart-box svg .conn { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; }
.chart-box svg .hit { fill: transparent; cursor: default; } .chart-box .hit:focus { outline: 2px solid var(--brand); }
.chart-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; padding: 6px 9px; border-radius: 7px; max-width: 280px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 0 18px; font-size: 12.5px; color: var(--ink-2); }
.lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg.s1::before { background: var(--s1); } .lg.s2::before { background: var(--s2); } .lg.tgt::before { height: 0; border-top: 2px dashed var(--ink-2); border-radius: 0; width: 14px; vertical-align: 3px; }
.dash-sub { margin: 14px 18px 4px; font-size: 14px; } .dash-sub .hint { font-weight: 400; }
.dash-tbl { padding: 0 18px 14px; } .dash-tbl summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--brand); }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dash-table th, .dash-table td { padding: 8px 14px; border-top: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.dash-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); background: var(--surface-2); border-top: 0; }
.dash-table tbody th { font-weight: 600; } .dash-table tr.tot th, .dash-table tr.tot td { font-weight: 700; background: var(--surface-2); }
.dash-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; } .dash-two.inner { padding: 0 4px 12px; }
.aging-bars { display: flex; flex-direction: column; gap: 8px; padding: 6px 18px 4px; }
.ab-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 140px; gap: 10px; align-items: center; font-size: 13.5px; }
.ab-track { height: 14px; background: var(--surface-3); border-radius: 4px; overflow: hidden; } .ab-fill { display: block; height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; }
.ab-row.old .ab-fill { background: var(--s2); } .ab-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.leak-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 6px 18px 14px; }
.leak-tile { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.leak-tile[aria-pressed="true"] { border: 2px solid var(--brand); padding: 11px 13px; background: var(--brand-soft); }
.leak-tile .hint { font-size: 12px; } .leak-tile.permanent .k-v { color: var(--late); } .leak-tile.recovered .k-v { color: var(--office); }
.dash-notes { padding: 4px 4px 20px; font-size: 13.5px; color: var(--ink-2); } .dash-notes ul { margin: 8px 0 0; padding-left: 20px; }
@media (max-width: 900px) { .dash-two, .leak-tiles { grid-template-columns: minmax(0, 1fr); } .ab-row { grid-template-columns: 70px minmax(0, 1fr) 120px; } }

/* ---------- Approvals ---------- */
.appr-tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.kpi.warn { border-color: var(--pending-dot); }
.ap-list { display: flex; flex-direction: column; }
.ap-card { padding: 14px 18px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.ap-top { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.ap-amt { font-size: 18px; font-variant-numeric: tabular-nums; } .ap-who { font-size: 14px; color: var(--ink-2); flex: 1 1 320px; min-width: 0; }
.ap-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.flag { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--late); background: var(--late-bg); padding: 2px 8px; border-radius: 6px; }
.ap-just { margin: 0; font-size: 14px; } .ap-just b { margin-right: 6px; }
.ap-acts { display: flex; gap: 8px; flex-wrap: wrap; } .ap-acts input { flex: 1 1 240px; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }
.ap-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; } .ap-form .field { flex: 0 1 220px; margin: 0; } .ap-form .field.grow { flex: 1 1 320px; }
.ap-form input[type=file] { font-size: 13px; }
.ap-empty { padding: 16px 18px; margin: 0; }
.sc-score { font-weight: 700; color: var(--ink-2); font-size: 14px; }

.svc-wo { border-color: #d0d5dd; background: #fafbfc; } .ow-groups.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ow-g.wo-prev b, .ow-g.wo-over b { color: var(--late); } .ow-g.wo-fee b, .ow-g.wo-other b { color: var(--ink-2); }
.wo-kind { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: #eef2f6; color: var(--ink-2); white-space: nowrap; }
.wo-kind.writeoff { background: #fdecea; color: var(--late); }
@media (max-width: 900px) { .ow-groups.three { grid-template-columns: 1fr; } }

.svc-insbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; } .svc-insbar .hint { font-size: 12.5px; }

.pv-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 16px 14px; }
.pv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; margin-bottom: 10px; } .pv-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pv-bar { display: block; height: 8px; border-radius: 99px; background: #eef2f6; position: relative; min-width: 80px; } .pv-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--late); }
.pv-bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.pv-who { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: #eef2f6; color: var(--ink-2); white-space: nowrap; } .pv-who.Office { background: #fef3e2; color: #8a5300; } .pv-who.Owner { background: #eef4ff; color: #1a56db; } .pv-who.Billing { background: #fdecea; color: var(--late); }
.pv-fix { font-size: 12.5px; color: var(--ink-2); } tr.pv-on { background: #f5f8ff; }
@media (max-width: 1000px) { .pv-grid, .pv-grid.three { grid-template-columns: 1fr; } .pv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.st-boxes { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.st-box { display: grid; text-align: left; gap: 1px; min-width: 150px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; }
.st-box b { font-size: 17px; } .st-box span { font-size: 13px; font-weight: 600; } .st-box em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.st-box.open b { color: #1a56db; } .st-box.bad b { color: var(--late); } .st-box.done b { color: #067647; } .st-box.none b { color: #8a5300; }
.st-box.on { border-color: var(--brand); box-shadow: 0 0 0 2px #dbe6ff; }
.claim.none { background: #fef3e2; color: #8a5300; } .acc-st { margin-top: 3px; display: flex; flex-wrap: wrap; gap: 3px; } .acc-st .claim { font-size: 11.5px; }

.claim-notes .cn.staff { background: #fff4c2; border-left: 3px solid #e0a800; color: var(--ink); }
.claim-notes .cn-tag { font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #8a5300; margin-right: 2px; }

/* ---------- Billing View / Office View ---------- */
.vbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.vfield { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.vfield select, .vfield input { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 14px; color: var(--ink); }
.vswitch a.tab { text-decoration: none; display: inline-flex; align-items: center; }
.vswitch a.tab[aria-current="page"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.bv-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bv-stats a.stat { text-decoration: none; color: inherit; }
.bv-right { margin-left: auto; }
.bv-pad { padding: 10px 16px; margin: 0; }
.bv-lead { margin: 0; padding: 16px 18px 6px; font-size: 18px; line-height: 1.5; font-weight: 500; color: var(--ink); max-width: 75ch; }
.bv-body { padding: 6px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.bv-inc summary { cursor: pointer; padding: 6px 0; font-size: 14.5px; }
.bv-queue { padding: 0 0 8px; }
.bv-queue .task-h { padding: 14px 16px 6px; margin: 0; }
table.bv-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.bv-t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.bv-t td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.bv-t th.num, table.bv-t td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.bv-t tr.strong-row td { font-weight: 700; background: var(--surface-2); }
table.bv-t tr.muted-row td { color: var(--muted); background: var(--surface-2); }
table.bv-log tbody tr { cursor: pointer; } table.bv-log tbody tr:hover td { background: var(--brand-soft); }
.num-btn { font-weight: 700; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.bv-hd { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.bv-id { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.tag-auto, .tag-back { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.tag-auto { background: var(--dx-bg); color: var(--dx); }
.tag-back { background: var(--pending-bg); color: var(--pending); }
.due-late { color: var(--late); font-weight: 600; }
.stat .n.bad { color: var(--late); }
.bv-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
.bv-facts dt { font-size: 12px; color: var(--muted); font-weight: 600; } .bv-facts dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.bv-facts code { font-size: 12px; }
.bv-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bv-work { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.bv-hist { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.bv-hist li.auto { color: var(--ink-2); }
.bv-hist .hint { display: block; }
.bv-defs { margin: 0; padding: 12px 16px 16px; display: grid; gap: 12px; }
.bv-defs dt { font-weight: 700; font-size: 14px; } .bv-defs dd { margin: 2px 0 0; color: var(--ink-2); font-size: 13.5px; max-width: 95ch; }
@media (max-width: 760px) {
  .bv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bv-facts { grid-template-columns: 1fr; }
  .table-box { overflow-x: auto; }
  table.bv-t { min-width: 680px; }
  .vbar { width: 100%; }
  .bv-lead { font-size: 16px; }
}

/* Keep on top (personal pin) */
.pinbtn { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.pinbtn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.pinbtn:hover { border-color: var(--brand); color: var(--brand); }
.pinbtn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pinbtn.on svg { fill: currentColor; }
.tr.is-pinned { box-shadow: inset 3px 0 0 var(--brand); background: var(--brand-soft); }
#rows .tr.is-pinned:hover { background: var(--brand-soft); filter: brightness(.98); }
