
/* ---------- HoneyCoin brand — ported from PSP Map ---------- */
@font-face { font-family:"PP Telegraf"; src:url("fonts/PPTelegraf-Regular.ttf") format("truetype");  font-weight:400; font-display:swap; }
@font-face { font-family:"PP Telegraf"; src:url("fonts/PPTelegraf-Semibold.ttf") format("truetype"); font-weight:600; font-display:swap; }
@font-face { font-family:"PP Telegraf"; src:url("fonts/PPTelegraf-Bold.ttf") format("truetype");     font-weight:700; font-display:swap; }

:root {
  color-scheme: light;
  --honey:#F29E22; --honey-text:#D9881A; --honey-bg:rgba(242,158,34,.14);
  --fxacc:#134E64; --fxacc-text:#134E64; --fxacc-bg:rgba(19,78,100,.10);
  --uk:#6941C6; --uk-text:#6941C6; --uk-bg:rgba(105,65,198,.10);
  --bg:#F6F8F9; --surface:#FFFFFF; --subtle:#F6F8F9;
  --cream:#FFF9F0; --cream-line:#EFD9C5;
  --night:#061920; --night-panel:#0A2330;
  --ink:#22202F; --ink-soft:#38474D; --ink-muted:#606C70; --ink-faint:#8E8D93;
  --line:#E2E2E2; --line-soft:#EFEFEF;
  --ok:#1F9D55; --ok-bg:#E6F5EC; --ok-text:#167B41;
  --warn:#F2A93D; --warn-bg:#FFF3DE; --warn-text:#8A5A0B;
  --bad:#AF513A; --bad-bg:#FBE9E2; --bad-text:#8F4230;
  --info:#6941C6; --info-bg:#F0EBFA; --info-text:#6941C6;
  --gray-dot:#9A9AA0;
  --track:#E7EAEB;
  --font-display:"PP Telegraf","Helvetica Neue",system-ui,-apple-system,sans-serif;
  --font-body:"Inter","Helvetica Neue",system-ui,-apple-system,sans-serif;
  --font-mono:"DM Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --shadow-sm:0 1px 2px rgba(34,32,47,.05);
  --shadow-md:0 6px 16px rgba(34,32,47,.06),0 1px 2px rgba(34,32,47,.04);
  --shadow-lg:0 18px 40px rgba(34,32,47,.08),0 4px 10px rgba(34,32,47,.04);
}
/* Light is the default. Dark applies only when the viewer picks it. */

:root[data-theme="dark"] {
  color-scheme: dark;
  --honey:#F29E22; --honey-text:#F5B95C; --honey-bg:rgba(242,158,34,.16);
  --fxacc:#6BAFBF; --fxacc-text:#8CC5D2; --fxacc-bg:rgba(107,175,191,.14);
  --uk:#A78BE8; --uk-text:#C3B0F0; --uk-bg:rgba(167,139,232,.14);
  --bg:#061920; --surface:#0A2330; --subtle:#0E2A38;
  --cream:#11303C; --cream-line:#1C4152;
  --night:#04141A; --night-panel:#0E2A38;
  --ink:#F2F6F7; --ink-soft:#C6D4D9; --ink-muted:#9FB3BA; --ink-faint:#6E8791;
  --line:rgba(255,255,255,.11); --line-soft:rgba(255,255,255,.06);
  --ok:#4CC38A; --ok-bg:rgba(76,195,138,.14); --ok-text:#7BD8A9;
  --warn:#F2A93D; --warn-bg:rgba(242,169,61,.14); --warn-text:#F5C880;
  --bad:#E07856; --bad-bg:rgba(224,120,86,.14); --bad-text:#EDA88F;
  --info:#A78BE8; --info-bg:rgba(167,139,232,.14); --info-text:#C3B0F0;
  --gray-dot:#6E8791;
  --track:rgba(255,255,255,.10);
  --shadow-sm:none; --shadow-md:none; --shadow-lg:0 18px 40px rgba(0,0,0,.4);
}

* { box-sizing:border-box; margin:0; }
body { background:var(--bg); color:var(--ink); font-family:var(--font-body); font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
button, input, select { font:inherit; color:inherit; }
a { color:inherit; }
.num { font-variant-numeric:tabular-nums; font-family:var(--font-mono); }
:focus-visible { outline:2px solid var(--honey); outline-offset:2px; border-radius:6px; }

/* ---------- Shell ---------- */
.dash-shell { display:flex; min-height:100vh; }
.dash-aside { width:250px; flex:none; display:flex; flex-direction:column; background:var(--surface); border-right:1px solid var(--line); padding:20px 14px 16px; gap:2px; }
.dash-brand { display:flex; align-items:center; gap:11px; padding:4px 10px 16px; }
.dash-brand__mark { width:30px; height:30px; flex:none; display:inline-flex; align-items:center; justify-content:center; color:var(--honey); }
.dash-brand__mark svg { width:100%; height:100%; }
.dash-brand__name { font:700 15.5px/1.1 var(--font-display); letter-spacing:-.01em; color:var(--ink); white-space:nowrap; }
.dash-brand__sub { font:600 9.5px/1 var(--font-body); letter-spacing:.15em; text-transform:uppercase; color:var(--honey-text); margin-top:4px; white-space:nowrap; }
.nav-section { display:flex; align-items:center; gap:9px; padding:15px 12px 6px; font:500 10.5px/1 var(--font-mono); letter-spacing:.12em; text-transform:uppercase; color:var(--ink-faint); }
.nav-section__dash { width:14px; height:2px; border-radius:2px; flex:none; background:var(--honey); }
.nav-item { display:flex; align-items:center; gap:11px; width:100%; text-align:left; border:0; cursor:pointer; padding:9px 12px; border-radius:12px; font-size:13.5px; font-weight:500; background:transparent; color:var(--ink-muted); transition:background .12s; }
.nav-item:hover { background:var(--subtle); }
.nav-item--active { background:var(--honey-bg); color:var(--honey-text); font-weight:600; }
.nav-item__label { flex:1; }
.nav-item--active .nav-badge { color:var(--honey-text); border-color:transparent; background:rgba(242,158,34,.12); }
.dash-aside__foot { margin-top:auto; padding-top:14px; }
.tier-card__inner { border-radius:14px; border:1px solid var(--cream-line); background:var(--cream); padding:13px 14px; }
.tier-card__eyebrow { font:600 10.5px/1 var(--font-body); letter-spacing:.12em; text-transform:uppercase; color:var(--honey-text); }
.tier-card__title { font:600 14px/1.25 var(--font-display); color:var(--ink); margin-top:6px; font-variant-numeric:tabular-nums; }
.tier-card__meta { font:400 11.5px/1.45 var(--font-body); color:var(--ink-muted); margin-top:4px; }
.tier-meter { height:6px; background:var(--track); border-radius:999px; margin-top:9px; overflow:hidden; }
.tier-meter i { display:block; height:100%; background:var(--honey); border-radius:999px; }

.dash-main { flex:1; min-width:0; display:flex; flex-direction:column; }
.dash-header { flex:none; min-height:62px; display:flex; align-items:center; gap:12px; padding:10px 22px; background:var(--surface); border-bottom:1px solid var(--line); flex-wrap:wrap; }
.dash-title { font:700 17px/1.1 var(--font-display); letter-spacing:-.01em; }
.header-right { margin-left:auto; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.dash-content__inner { max-width:1180px; margin:0 auto; padding:26px 28px 60px; width:100%; }

/* ---------- Primitives ---------- */
.card { background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow-sm); }
.card--pad { padding:20px 22px; }
.card + .card { margin-top:14px; }
.page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.page-h1 { font:700 25px/1.1 var(--font-display); letter-spacing:-.018em; }
.page-sub { margin:6px 0 0; max-width:92ch; font:400 13px/1.55 var(--font-body); color:var(--ink-muted); }
.eyebrow { font:600 11px/1 var(--font-body); letter-spacing:.14em; text-transform:uppercase; color:var(--honey-text); }
.section-title { font:600 15.5px/1.2 var(--font-display); }
.muted-sm { font:500 12px/1.3 var(--font-body); color:var(--ink-faint); }
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(165px,1fr)); gap:13px; margin-bottom:18px; }
.kpi-card { background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow-sm); padding:16px 17px; display:flex; flex-direction:column; gap:8px; }
.kpi-label { font:600 10.5px/1.3 var(--font-body); letter-spacing:.1em; text-transform:uppercase; color:var(--ink-muted); }
.kpi-value { font:700 25px/1 var(--font-body); letter-spacing:-.01em; font-variant-numeric:tabular-nums; }
.kpi-value--honey { color:var(--honey-text); }
.kpi-value--sm { font-size:19px; }
.kpi-sub { font-size:11.5px; line-height:1.35; color:var(--ink-faint); }
.pill { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; font:600 11px/1.3 var(--font-body); white-space:nowrap; }
.pill__dot { width:6px; height:6px; border-radius:999px; flex:none; }
.pill--ok { background:var(--ok-bg); color:var(--ok-text); } .pill--ok .pill__dot { background:var(--ok); }
.pill--warn { background:var(--warn-bg); color:var(--warn-text); } .pill--warn .pill__dot { background:var(--warn); }
.pill--bad { background:var(--bad-bg); color:var(--bad-text); } .pill--bad .pill__dot { background:var(--bad); }
.pill--info { background:var(--info-bg); color:var(--info-text); } .pill--info .pill__dot { background:var(--info); }
.pill--honey { background:var(--honey-bg); color:var(--honey-text); } .pill--honey .pill__dot { background:var(--honey); }
.pill--mute { background:var(--subtle); color:var(--ink-muted); border:1px solid var(--line); } .pill--mute .pill__dot { background:var(--gray-dot); }
.chiprow { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.chiprow .lbl { font:500 10.5px/1 var(--font-mono); letter-spacing:.12em; text-transform:uppercase; color:var(--ink-faint); margin-right:2px; }
.table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
table.dtable { border-collapse:collapse; width:100%; }
.dtable th { text-align:left; font:600 10.5px/1.4 var(--font-body); letter-spacing:.08em; text-transform:uppercase; color:var(--ink-muted); background:var(--subtle); border-bottom:1px solid var(--line); padding:10px 14px; white-space:nowrap; }
.dtable td { padding:10px 14px; border-bottom:1px solid var(--line-soft); vertical-align:middle; font-size:13px; color:var(--ink-soft); }
.dtable tr:last-child td { border-bottom:0; }
.dtable td.tname { font-weight:600; color:var(--ink); }
.dtable td.tmono, .dtable th.tmono { font-family:var(--font-mono); font-size:11.5px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.dtable td.tnum, .dtable th.tnum { font-family:var(--font-mono); font-size:12px; text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.dtable tr.done td { color:var(--ink-faint); }
.empty { padding:40px 24px; text-align:center; }
.empty__title { font:600 15px/1.2 var(--font-display); }
.empty__desc { font-size:12.5px; color:var(--ink-soft); margin:6px auto 0; max-width:48ch; line-height:1.55; }
.srclink { color:var(--honey-text); text-decoration:none; font:500 12px/1.3 var(--font-mono); }


/* ---------- Advance Control Room components ---------- */
.rec { display:flex; flex-direction:column; gap:10px; }
.rec-bar { height:24px; background:var(--track); border-radius:999px; display:flex; gap:2px; overflow:hidden; }
.rec-bar i { display:block; border-radius:999px; min-width:0; }
.rec-bar i.applied { background:var(--ok); }
.rec-bar i.owed { background:var(--warn); }
.rec-key { display:flex; gap:20px; flex-wrap:wrap; font-size:12px; }
.rec-key span { display:flex; align-items:center; gap:7px; color:var(--ink-muted); }
.rec-key b { font-family:var(--font-mono); font-weight:500; color:var(--ink); font-variant-numeric:tabular-nums; }
.sw { width:10px; height:10px; border-radius:3px; flex:none; }
.sw.applied { background:var(--ok); } .sw.owed { background:var(--warn); }
.sw.rem { background:var(--track); border:1px solid var(--line); }

.checks { display:flex; flex-direction:column; }
.check { display:flex; align-items:baseline; gap:11px; padding:8px 0; border-bottom:1px solid var(--line-soft); font-size:13px; }
.check:last-child { border-bottom:0; }
.check .g { width:16px; flex:none; font-weight:700; font-size:12px; text-align:center; font-family:var(--font-mono); }
.check .g.p { color:var(--ok-text); } .check .g.f { color:var(--bad-text); } .check .g.u { color:var(--warn-text); }
.check .t { flex:1; min-width:130px; color:var(--ink-soft); }
.check .d { font-family:var(--font-mono); font-size:11.5px; color:var(--ink-muted); text-align:right; font-variant-numeric:tabular-nums; }
.check .c { font:500 11px/1.3 var(--font-mono); color:var(--ink-faint); width:118px; flex:none; text-align:right; }

.form { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:20px 18px; align-items:start; }
/* Stacked blocks inside one panel need rhythm of their own: .form sets the gap
   BETWEEN its fields, nothing between one block and the next. */
.form + .form, .form + .fgroup, .fgroup + .form { margin-top:20px; }
.field { display:flex; flex-direction:column; gap:6px; min-width:0; }
.field--wide { grid-column:1 / -1; }
.field label {
  display:flex; align-items:baseline; gap:8px;
  font:600 12.5px/1.3 var(--font-body); letter-spacing:0; text-transform:none; color:var(--ink);
}
.field__req {
  font:600 9.5px/1 var(--font-body); letter-spacing:.08em; text-transform:uppercase;
  color:var(--honey-text); font-style:normal;
}
.field input, .field select, .field textarea {
  width:100%; padding:10px 12px; font:400 13.5px/1.3 var(--font-body); color:var(--ink);
  background:var(--surface); border:1px solid var(--line); border-radius:10px;
  transition:border-color .12s, box-shadow .12s;
}
.field input::placeholder { color:var(--ink-faint); }
.field input:hover:not(:disabled), .field select:hover:not(:disabled) { border-color:var(--ink-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline:none; border-color:var(--honey); box-shadow:0 0 0 3px var(--honey-bg);
}
.field input:disabled, .field select:disabled { background:var(--subtle); color:var(--ink-muted); cursor:not-allowed; }
.field input[type="number"] { font-variant-numeric:tabular-nums; }
.field input[type="date"] { min-height:39px; }
.field select {
  appearance:none; cursor:pointer; padding-right:34px;
  background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);
  background-position:calc(100% - 17px) 17px, calc(100% - 12px) 17px;
  background-size:5px 5px, 5px 5px; background-repeat:no-repeat;
}
.field .hint { font-size:11.5px; line-height:1.45; color:var(--ink-faint); }

/* a titled block of fields inside one panel */
.fgroup + .fgroup { margin-top:22px; padding-top:20px; border-top:1px solid var(--line-soft); }
.fgroup__title {
  font:600 11px/1.3 var(--font-body); letter-spacing:.09em; text-transform:uppercase;
  color:var(--ink-muted); margin-bottom:13px;
}
.actions { display:flex; gap:9px; align-items:center; flex-wrap:wrap; margin-top:14px; }
.btn { background:var(--honey); color:#22202F; border:1px solid var(--honey); border-radius:10px; padding:8px 15px; font:600 13px/1.3 var(--font-body); cursor:pointer; }
.btn:hover { filter:brightness(1.05); }
.btn--ghost { background:var(--surface); color:var(--ink); border-color:var(--line); }
.btn--ghost:hover { background:var(--subtle); filter:none; }
.btn--bad { background:var(--surface); color:var(--bad-text); border-color:color-mix(in oklab,var(--bad) 40%,var(--line)); }
.btn--sm { padding:6px 11px; font-size:12px; border-radius:8px; }
.btn:disabled { opacity:.45; cursor:not-allowed; filter:none; }
.note { font-size:12px; color:var(--ink-muted); margin-top:10px; line-height:1.5; }
.note--warn { color:var(--warn-text); }
.note--bad { color:var(--bad-text); }

details.adder { background:var(--surface); border:1px dashed color-mix(in oklab,var(--honey) 40%,var(--line)); border-radius:16px; margin-bottom:14px; }
details.adder > summary { padding:13px 20px; font:600 13px/1.3 var(--font-body); cursor:pointer; list-style:none; color:var(--honey-text); }
details.adder > summary::-webkit-details-marker { display:none; }
details.adder > summary::before { content:"+"; display:inline-block; width:16px; font-weight:700; }
details.adder[open] > summary { border-bottom:1px solid var(--line-soft); }
.adder-body { padding:18px 20px 20px; display:flex; flex-direction:column; gap:20px; }
.adder-body > .actions { margin-top:0; }

.approvers { display:flex; flex-direction:column; gap:8px; }
.approver { display:flex; align-items:center; gap:11px; padding:10px 13px; background:var(--subtle); border:1px solid var(--line-soft); border-radius:12px; font-size:13px; flex-wrap:wrap; }
.approver__who { font-weight:600; flex:1; min-width:140px; color:var(--ink); }
.approver__role { font:500 10.5px/1 var(--font-mono); letter-spacing:.1em; text-transform:uppercase; color:var(--ink-faint); }
.approver__at { font:500 11.5px/1.3 var(--font-mono); color:var(--ink-muted); }
.siglist { display:flex; gap:9px; flex-wrap:wrap; }
.siglist label { display:flex; align-items:center; gap:7px; font-size:12.5px; padding:7px 12px; border:1px solid var(--line); border-radius:10px; background:var(--subtle); cursor:pointer; }
.siglist input { accent-color:var(--honey); }
.row-sec { border-top:1px solid var(--line-soft); margin-top:18px; padding-top:18px; }
.row-sec:first-child { border-top:0; margin-top:0; padding-top:0; }
.head-row { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.hidden { display:none !important; }
.spin { font-size:12.5px; color:var(--ink-faint); padding:30px 0; text-align:center; }
@media (max-width:900px){
  .dash-shell { flex-direction:column; }
  .dash-aside { width:100%; border-right:0; border-bottom:1px solid var(--line); }
  .dash-aside__foot { margin-top:14px; }
  .dash-content__inner { padding:20px 16px 48px; }
  .check .c { display:none; }
}
@media (prefers-reduced-motion:reduce){ * { transition:none !important; animation:none !important; } }

/* ---------- theme switch · icons only — Y4 ---------- */
.theme-switch { display:inline-flex; border:1px solid var(--line); border-radius:999px; background:var(--subtle); padding:2px; }
.theme-switch button { border:0; background:transparent; color:var(--ink-faint); border-radius:999px; width:28px; height:26px; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; padding:0; }
.theme-switch button[aria-pressed="true"] { background:var(--surface); color:var(--honey-text); box-shadow:var(--shadow-sm); }
.theme-switch svg { width:14px; height:14px; }

/* ---------- nav footer ---------- */
.nav-spacer { margin-top:auto; }
.nav-foot { border-top:1px solid var(--line-soft); padding-top:10px; margin-top:12px; }

/* ---------- overview ---------- */
.ov-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:14px; margin-bottom:18px; }
.ov-card { background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow-sm); padding:18px 19px; display:flex; flex-direction:column; gap:9px; text-align:left; cursor:pointer; width:100%; font:inherit; color:inherit; transition:border-color .12s, transform .12s; }
.ov-card:hover { border-color:color-mix(in oklab,var(--honey) 45%,var(--line)); transform:translateY(-1px); }
.ov-card__label { font:600 10.5px/1.3 var(--font-body); letter-spacing:.1em; text-transform:uppercase; color:var(--ink-muted); }
.ov-card__value { font:700 28px/1 var(--font-body); letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.ov-card__value--honey { color:var(--honey-text); }
.ov-card__sub { font-size:11.5px; color:var(--ink-faint); line-height:1.4; }
.ov-card__go { font:600 11.5px/1 var(--font-body); color:var(--honey-text); margin-top:2px; }
.ov-facility { grid-column:1/-1; }
.ov-meter { height:9px; background:var(--track); border-radius:999px; overflow:hidden; display:flex; gap:2px; }
.ov-meter i { display:block; border-radius:999px; }
.ov-meter i.drawn { background:var(--honey); }
.ov-meter i.reserved { background:color-mix(in oklab,var(--honey) 42%, var(--surface)); }
.ov-legend { display:flex; gap:18px; flex-wrap:wrap; font-size:11.5px; color:var(--ink-muted); }
.ov-legend b { font-family:var(--font-mono); color:var(--ink); font-weight:500; }
.cta-row { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:22px; }

/* ---------- clickable table rows ---------- */
.dtable tr.rowlink { cursor:pointer; }
.dtable tr.rowlink:hover td { background:var(--subtle); }
.dtable td.chev { text-align:right; color:var(--ink-faint); width:28px; }
.list-head { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:16px; }

/* ---------- detail pages ---------- */
.back-link { display:inline-flex; align-items:center; gap:7px; border:0; background:transparent; cursor:pointer; font:600 12.5px/1 var(--font-body); color:var(--ink-muted); padding:0; margin-bottom:14px; }
.back-link:hover { color:var(--honey-text); }
.detail-head { display:flex; align-items:flex-start; gap:15px; flex-wrap:wrap; margin-bottom:20px; }
.detail-mark { width:46px; height:46px; flex:none; border-radius:14px; background:var(--cream); border:1px solid var(--cream-line); color:var(--honey-text); font:700 15px/1 var(--font-display); display:inline-flex; align-items:center; justify-content:center; }
.detail-name h1 { font:700 23px/1.15 var(--font-display); letter-spacing:-.015em; }
.detail-meta { font-size:12.5px; color:var(--ink-muted); margin-top:5px; display:flex; flex-wrap:wrap; gap:4px 14px; }
.detail-actions { margin-left:auto; display:flex; gap:9px; flex-wrap:wrap; }
.dl { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:1px; background:var(--line-soft); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.dl div { background:var(--surface); padding:12px 15px; }
.dl dt { font:600 10px/1.3 var(--font-body); letter-spacing:.09em; text-transform:uppercase; color:var(--ink-muted); }
.dl dd { font-size:13.5px; margin-top:4px; color:var(--ink); }
.dl dd.mono { font-family:var(--font-mono); font-variant-numeric:tabular-nums; }
.dl dd.none { color:var(--ink-faint); font-style:italic; }

/* ---------- settings tabs ---------- */
.tabs { display:flex; gap:3px; border-bottom:1px solid var(--line); margin-bottom:20px; }
.tabs button { border:0; background:transparent; padding:9px 14px 11px; font:500 13.5px/1 var(--font-body); color:var(--ink-muted); border-bottom:2px solid transparent; margin-bottom:-1px; cursor:pointer; }
.tabs button[aria-selected="true"] { color:var(--ink); border-bottom-color:var(--honey); font-weight:600; }

/* ---------- misc ---------- */
.frozen { background:var(--cream); border:1px solid var(--cream-line); border-radius:12px; padding:12px 14px; font-size:12.5px; color:var(--ink-soft); }
.frozen b { color:var(--honey-text); }
.audit-row { font-family:var(--font-mono); font-size:11.5px; }
.banner { border-radius:14px; padding:13px 16px; font-size:12.5px; margin-bottom:16px; border:1px solid; }
.banner--warn { background:var(--warn-bg); border-color:color-mix(in oklab,var(--warn) 35%,transparent); color:var(--warn-text); }
.banner--bad { background:var(--bad-bg); border-color:color-mix(in oklab,var(--bad) 35%,transparent); color:var(--bad-text); }

/* ---------- Phosphor icons (regular weight, MIT) ---------- */
.ico { width:18px; height:18px; flex:none; }
.nav-item .ico { color:var(--ink-faint); transition:color .12s; }
.nav-item:hover .ico { color:var(--ink-muted); }
.nav-item--active .ico { color:var(--honey-text); }

/* ---------- C1 · the sidebar stays put ---------- */
@media (min-width:901px){
  .dash-aside { position:sticky; top:0; height:100vh; overflow-y:auto; }
}
/* ---------- B2 · delete affordances ---------- */
.row-del { border:0; background:transparent; color:var(--ink-faint); cursor:pointer; padding:2px 6px; border-radius:6px; font-size:13px; line-height:1; }
.row-del:hover { color:var(--bad-text); background:var(--bad-bg); }
.dtable td.act { width:36px; text-align:right; }
.deleted-note { font-size:11.5px; color:var(--ink-faint); font-style:italic; }

/* A filename that opens the file — reads as a link, behaves as a button. */
.link-btn {
  background:none; border:0; padding:0; font:inherit; color:var(--honey-text);
  text-decoration:underline; text-underline-offset:2px; cursor:pointer;
}
.link-btn:hover { color:var(--honey); }
.link-btn:focus-visible { outline:2px solid var(--honey); outline-offset:2px; border-radius:2px; }
.field input[type="file"] {
  padding:9px 11px; color:var(--ink-muted);
  background:var(--subtle); border:1px dashed var(--line); cursor:pointer;
}
.field input[type="file"]:hover { border-color:var(--honey); }
.field input[type="file"]::file-selector-button {
  font:600 12px/1 var(--font-body); padding:7px 11px; margin-right:10px; cursor:pointer;
  color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:6px;
}

/* ---------------------------------------------------------------- wizard --- */
.btn--icon { display:inline-flex; align-items:center; gap:7px; }
.btn--icon .ico { width:16px; height:16px; }
.req { color:var(--bad); font-weight:600; }

.wiz { display:grid; grid-template-columns:232px 1fr; gap:22px; margin-top:18px; align-items:start; }
.wiz-rail { display:flex; flex-direction:column; gap:2px; position:sticky; top:18px; }
.wiz-step {
  display:flex; align-items:center; gap:11px; width:100%; padding:10px 12px; cursor:pointer;
  background:none; border:0; border-radius:9px; text-align:left;
  font:500 13px/1.3 var(--font-body); color:var(--ink-muted);
}
.wiz-step:hover { background:var(--subtle); color:var(--ink); }
.wiz-step--on { background:var(--honey-bg); color:var(--honey-text); font-weight:600; }
.wiz-step__n {
  flex:none; display:grid; place-items:center; width:22px; height:22px; border-radius:50%;
  background:var(--subtle); border:1px solid var(--line);
  font:600 11px/1 var(--font-mono); color:var(--ink-muted);
}
.wiz-step--on .wiz-step__n { background:var(--honey); border-color:var(--honey); color:#fff; }
.wiz-step--done .wiz-step__n { background:var(--ok); border-color:var(--ok); color:#fff; }
.wiz-step .d { font-weight:400; color:var(--ink-faint); }
.wiz-nav { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:16px; }

/* more-actions menu */
.more { position:relative; }
.more > summary { list-style:none; display:inline-flex; align-items:center; }
.more > summary::-webkit-details-marker { display:none; }
.more__menu {
  position:absolute; right:0; top:calc(100% + 6px); z-index:20; min-width:180px; padding:5px;
  background:var(--surface); border:1px solid var(--line); border-radius:10px; box-shadow:var(--shadow-lg);
  display:flex; flex-direction:column;
}
.more__menu button {
  padding:9px 11px; text-align:left; background:none; border:0; border-radius:7px; cursor:pointer;
  font:500 13px/1.2 var(--font-body); color:var(--ink);
}
.more__menu button:hover { background:var(--subtle); }
.more__menu .more__bad { color:var(--bad-text); }

@media (max-width:900px) {
  .wiz { grid-template-columns:1fr; }
  .wiz-rail { position:static; flex-direction:row; overflow-x:auto; padding-bottom:6px; }
  .wiz-step__t { white-space:nowrap; }
}

/* ------------------------------------------------------- list toolbar --- */
.toolbar { display:flex; align-items:center; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.search {
  flex:1 1 280px; min-width:0; padding:9px 12px; font:400 13px/1.2 var(--font-body);
  color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:9px;
}
.search:focus { outline:none; border-color:var(--honey); box-shadow:0 0 0 3px var(--honey-bg); }
.search::placeholder { color:var(--ink-faint); }
.toolbar__count { font:500 12px/1 var(--font-mono); color:var(--ink-faint); margin-left:auto; }
.chip {
  display:inline-flex; align-items:center; gap:7px; padding:6px 11px; cursor:pointer;
  font:600 12px/1 var(--font-body); color:var(--honey-text);
  background:var(--honey-bg); border:1px solid transparent; border-radius:999px;
}
.chip:hover { border-color:var(--honey); }

.ov-card--on { border-color:var(--honey); box-shadow:0 0 0 3px var(--honey-bg); }
.dtable th.sortable { cursor:pointer; user-select:none; white-space:nowrap; }
.dtable th.sortable:hover { color:var(--ink); }
.dtable th.sorted { color:var(--honey-text); }
.dtable th .caret { margin-left:5px; font-size:9px; vertical-align:1px; }

/* a bare control inside a table cell or a dense row */
.cell-input {
  padding:6px 9px; font:400 12.5px/1.2 var(--font-body); color:var(--ink);
  background:var(--surface); border:1px solid var(--line); border-radius:8px; width:150px;
}
.cell-input:focus { outline:none; border-color:var(--honey); box-shadow:0 0 0 3px var(--honey-bg); }
.cell-input--num { width:120px; text-align:right; font-variant-numeric:tabular-nums; }
/* a labelless field sitting inline in a definition list */
.field > label:empty { display:none; }

/* an empty state with a glyph, so a panel with nothing in it still reads as
   a designed thing rather than a gap */
.empty__ico {
  display:grid; place-items:center; width:46px; height:46px; margin:0 auto 14px;
  border-radius:14px; background:var(--subtle); border:1px solid var(--line);
  color:var(--ink-faint);
}
.empty__ico svg { width:22px; height:22px; }

/* an address that leaves the dashboard */
.ext { color:inherit; text-decoration:underline; text-underline-offset:2px; text-decoration-color:var(--line); }
.ext:hover { color:var(--honey-text); text-decoration-color:currentColor; }

/* ------------------------------------------------ the approval stages ---
   The wizard rail laid on its side. One way of showing progress across the
   app, so a stage on an advance reads the same as a step on a profile. */
.stage-rail { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:16px; }
.stage-step {
  display:inline-flex; align-items:center; gap:8px; padding:6px 14px 6px 7px; white-space:nowrap;
  border:1px solid var(--line); border-radius:999px; background:var(--surface);
  font:500 12.5px/1.4 var(--font-body); color:var(--ink-faint);
}
.stage-step__n {
  flex:none; display:grid; place-items:center; width:20px; height:20px; border-radius:50%;
  background:var(--subtle); border:1px solid var(--line);
  font:600 10.5px/1 var(--font-mono); color:var(--ink-faint);
}
.stage-step--done { color:var(--ink-soft); }
.stage-step--done .stage-step__n { background:var(--ok); border-color:var(--ok); color:#fff; }
.stage-step--on { background:var(--honey-bg); color:var(--honey-text); font-weight:600;
                  border-color:color-mix(in oklab,var(--honey) 40%,var(--line)); }
.stage-step--on .stage-step__n { background:var(--honey); border-color:var(--honey); color:#fff; }

/* the single live action, at the top, so nobody scrolls six cards to find
   which of them has a button on it today */
.next { display:flex; align-items:center; gap:18px; flex-wrap:wrap; margin-bottom:16px;
        border:1px solid; border-radius:16px; padding:15px 18px; }
.next__t { font:600 14.5px/1.25 var(--font-display); }
.next__d { font-size:12.5px; line-height:1.5; margin-top:3px; color:var(--ink-muted); }
.next__go { margin-left:auto; }
.next--honey { background:var(--honey-bg); border-color:color-mix(in oklab,var(--honey) 35%,transparent); }
.next--honey .next__t { color:var(--honey-text); }
.next--info  { background:var(--info-bg);  border-color:color-mix(in oklab,var(--info) 30%,transparent); }
.next--warn  { background:var(--warn-bg);  border-color:color-mix(in oklab,var(--warn) 35%,transparent); }
.next--warn .next__t { color:var(--warn-text); }
.next--ok    { background:var(--ok-bg);    border-color:color-mix(in oklab,var(--ok) 32%,transparent); }
.next--ok .next__t { color:var(--ok-text); }
.next--mute  { background:var(--subtle);   border-color:var(--line); }

/* ------------------------------------------ the live underwriting view ---
   Form left, the organizer's file right and sticky, so the answer stays on
   screen while the amount is being typed. */
.uw { display:grid; grid-template-columns:minmax(0,1fr) 384px; gap:20px; align-items:start; }
.uw-side { position:sticky; top:18px; }
.uw-figs { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; overflow:hidden;
           background:var(--line-soft); border:1px solid var(--line); border-radius:12px; }
.uw-figs > div { background:var(--surface); padding:10px 12px; }
.uw-figs dt { font:600 9.5px/1.3 var(--font-body); letter-spacing:.09em; text-transform:uppercase; color:var(--ink-muted); }
.uw-figs dd { font:500 14px/1.2 var(--font-mono); margin-top:5px; font-variant-numeric:tabular-nums; color:var(--ink); }
.gauge { height:10px; margin-top:14px; border-radius:999px; background:var(--track); overflow:hidden; }
.gauge i { display:block; height:100%; border-radius:999px; background:var(--honey); transition:width .12s; }
.gauge--over i { background:var(--bad); }
.gauge-key { display:flex; justify-content:space-between; gap:12px; margin-top:7px;
             font:500 11.5px/1.3 var(--font-mono); color:var(--ink-muted); font-variant-numeric:tabular-nums; }
.gauge-key .over { color:var(--bad-text); font-weight:600; }

@media (max-width:1020px){ .uw { grid-template-columns:1fr; } .uw-side { position:static; } }

/* a queue chip that is off until it is clicked */
.chip--off { background:var(--subtle); color:var(--ink-muted); border-color:var(--line); }
.chip--off:hover { border-color:var(--ink-faint); color:var(--ink); }
/* the row that is waiting on whoever is signed in */
.you { display:inline-block; margin-left:7px; padding:2px 7px; vertical-align:1px; border-radius:999px;
       background:var(--honey-bg); color:var(--honey-text);
       font:600 9.5px/1.5 var(--font-body); letter-spacing:.08em; text-transform:uppercase; }
.dtable .off { color:var(--bad-text); font-weight:600; }

/* ------------------------------------------------------- the checklist ---
   A condition precedent is a task, not a tick: it is owed by somebody, it is
   proved by a document, and it gets chased. The row has to carry all three. */
.tabs__n { margin-left:7px; padding:2px 7px; border-radius:999px; background:var(--subtle);
           border:1px solid var(--line); font:500 10.5px/1.5 var(--font-mono); color:var(--ink-muted); }
.tabs button[aria-selected="true"] .tabs__n { background:var(--honey-bg); border-color:transparent; color:var(--honey-text); }

.tasks { display:flex; flex-direction:column; gap:9px; margin-top:16px; }
.task { border:1px solid var(--line); border-radius:13px; background:var(--surface); padding:12px 14px; }
.task--satisfied { border-color:color-mix(in oklab,var(--ok) 32%,var(--line)); background:color-mix(in oklab,var(--ok-bg) 45%,var(--surface)); }
.task--waived    { border-color:color-mix(in oklab,var(--warn) 34%,var(--line)); background:color-mix(in oklab,var(--warn-bg) 45%,var(--surface)); }
.task--na        { opacity:.72; }
.task__head { display:flex; align-items:flex-start; gap:12px; }
.task__sel { width:132px; flex:none; }
.task__body { flex:1; min-width:0; }
.task__label { font:500 13.5px/1.4 var(--font-body); color:var(--ink); }
.task__meta { display:flex; flex-wrap:wrap; gap:4px 12px; margin-top:4px;
              font-size:11.5px; line-height:1.45; color:var(--ink-faint); }
.task__owner { font:600 9.5px/1.6 var(--font-body); letter-spacing:.08em; text-transform:uppercase;
               padding:1px 8px; border-radius:999px; background:var(--subtle);
               border:1px solid var(--line); color:var(--ink-muted); }
.task__only { font-style:italic; }
.task__reason, .task__note { margin-top:7px; padding:7px 11px; border-radius:9px;
                             font-size:12px; line-height:1.5; background:var(--subtle); color:var(--ink-soft); }
.task__reason { border-left:2px solid var(--warn); }
.task__note   { border-left:2px solid var(--line); }
.task__foot { display:flex; align-items:center; gap:14px; flex-wrap:wrap;
              margin-top:10px; padding-top:10px; border-top:1px solid var(--line-soft);
              font-size:12px; color:var(--ink-muted); }
.task__ev { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; }
.task__file { width:auto; max-width:210px; padding:4px 7px; font-size:11.5px; }
.task__file::file-selector-button { margin-right:8px; padding:3px 9px; border-radius:6px;
  border:1px solid var(--line); background:var(--subtle); color:var(--ink-muted);
  font:500 11px/1.4 var(--font-body); cursor:pointer; }

@media (max-width:640px){
  .task__head { flex-wrap:wrap; }
  .task__sel { width:100%; }
}

/* ---------------------------------------------- the checklist, grouped ---
   Tasks read as a list and open one at a time, so the page is scannable and
   the detail is one click away rather than eight rows deep. */
.tgroup { margin-top:18px; }
.tgroup__h { display:flex; align-items:center; gap:8px; margin-bottom:8px;
             font:600 10.5px/1 var(--font-body); letter-spacing:.11em;
             text-transform:uppercase; color:var(--ink-muted); }
.tgroup__n { padding:2px 7px; border-radius:999px; background:var(--subtle);
             border:1px solid var(--line); font:500 10px/1.4 var(--font-mono); letter-spacing:0; }
.tasks { display:flex; flex-direction:column; gap:8px; }

.task { display:flex; align-items:flex-start; gap:12px; width:100%; text-align:left; cursor:pointer;
        padding:12px 14px; border:1px solid var(--line); border-radius:13px;
        background:var(--surface); font:inherit; color:inherit; transition:border-color .12s; }
.task:hover { border-color:color-mix(in oklab,var(--honey) 45%,var(--line)); }
.task__glyph { flex:none; display:grid; place-items:center; width:20px; height:20px; margin-top:1px;
               border-radius:50%; border:1px solid var(--line); background:var(--subtle);
               font:700 11px/1 var(--font-mono); color:var(--ink-faint); }
.task--satisfied .task__glyph { background:var(--ok); border-color:var(--ok); color:#fff; }
.task--waived    .task__glyph { background:var(--warn); border-color:var(--warn); color:#fff; }
.task--na        .task__glyph { color:var(--ink-faint); }
.task--na { opacity:.66; }
.task__body { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.task__label { font:500 13.5px/1.4 var(--font-body); color:var(--ink); }
.task__meta { display:flex; flex-wrap:wrap; gap:3px 12px; font-size:11.5px; line-height:1.45; color:var(--ink-faint); }
.task__meta > span { min-width:0; overflow-wrap:anywhere; }
.task__short { color:var(--warn-text); font-weight:600; }
.task__reason { margin-top:4px; padding:6px 10px; border-radius:8px; border-left:2px solid var(--warn);
                background:var(--subtle); font-size:12px; line-height:1.5; color:var(--ink-soft); }
.task__chev { flex:none; color:var(--ink-faint); font-size:15px; line-height:1.4; }
.task__ev { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; font-size:12px; color:var(--ink-muted); }
.task__file { width:auto; max-width:210px; padding:4px 7px; font-size:11.5px; }
.task__file::file-selector-button { margin-right:8px; padding:3px 9px; border-radius:6px;
  border:1px solid var(--line); background:var(--subtle); color:var(--ink-muted);
  font:500 11px/1.4 var(--font-body); cursor:pointer; }

/* ------------------------------------------------------------ the overlay --- */
.ovl { position:fixed; inset:0; z-index:60; display:flex; align-items:flex-start; justify-content:center;
       padding:40px 16px; overflow-y:auto; background:rgba(34,32,47,.42);
       backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px); }
.ovl__box { width:100%; max-width:560px; background:var(--surface); border:1px solid var(--line);
            border-radius:18px; box-shadow:var(--shadow-lg); overflow:hidden; }
.ovl__head { display:flex; align-items:flex-start; gap:14px; padding:18px 20px 14px;
             border-bottom:1px solid var(--line-soft); }
/* The title has to take the slack, or the close button sits wherever the text
   happens to end rather than in the corner where people reach for it. */
.ovl__head-t { flex:1; min-width:0; }
.ovl__t { font:600 15.5px/1.3 var(--font-display); overflow-wrap:anywhere; }
.ovl__d { font-size:12.5px; line-height:1.5; margin-top:4px; color:var(--ink-muted); }
.ovl__x { flex:none; margin-left:auto; width:30px; height:30px; border-radius:8px;
          border:1px solid var(--line); background:var(--subtle); color:var(--ink-muted);
          cursor:pointer; font-size:12px; line-height:1; }
.ovl__x:hover { color:var(--ink); }
.ovl__body { padding:18px 20px; }
.ovl__sec { margin-top:18px; }
.ovl__sec:first-child { margin-top:0; }
.ovl__lbl { display:flex; align-items:center; gap:8px; margin-bottom:8px;
            font:600 10.5px/1 var(--font-body); letter-spacing:.09em; text-transform:uppercase; color:var(--ink-muted); }
.ovl__foot { display:flex; align-items:center; gap:14px; flex-wrap:wrap;
             padding:14px 20px; border-top:1px solid var(--line-soft); background:var(--subtle); }
.ovl__go { margin-left:auto; display:flex; gap:9px; align-items:center; }

.seg { display:inline-flex; padding:2px; border-radius:10px; background:var(--surface); border:1px solid var(--line); }
.seg__b { padding:6px 11px; border:0; border-radius:8px; background:transparent; cursor:pointer;
          font:500 12px/1.3 var(--font-body); color:var(--ink-muted); white-space:nowrap; }
.seg__b:hover:not(:disabled) { color:var(--ink); }
.seg__b--on { background:var(--honey-bg); color:var(--honey-text); font-weight:600; }
.seg__b:disabled { opacity:.5; cursor:not-allowed; }

@media (max-width:560px){
  .ovl { padding:16px 10px; }
  .ovl__foot { flex-direction:column; align-items:stretch; }
  .ovl__go { margin-left:0; justify-content:flex-end; }
  .seg { overflow-x:auto; }
}

/* a figure that is money someone else is holding */
.ov-card__value--warn { color:var(--warn-text); }
.dtable .owed-n { color:var(--warn-text); font-weight:600; }

/* ---------------------------------------------------------- the worklist ---
   The landing page's answer to "what needs me today". One row per thing that
   is actually outstanding; a list of zeroes is not a worklist. */
.ov-facility-card { margin-bottom:18px; }
.jobs { display:flex; flex-direction:column; gap:8px; }
.jobs__h { margin-bottom:2px; font:600 10.5px/1 var(--font-body); letter-spacing:.11em;
           text-transform:uppercase; color:var(--ink-muted); }
.job { display:flex; align-items:center; gap:14px; width:100%; text-align:left; cursor:pointer;
       padding:13px 16px; border:1px solid var(--line); border-radius:14px;
       background:var(--surface); font:inherit; color:inherit; transition:border-color .12s, transform .12s; }
.job:hover { border-color:color-mix(in oklab,var(--honey) 45%,var(--line)); transform:translateY(-1px); }
.job__n { flex:none; display:grid; place-items:center; min-width:34px; height:34px; padding:0 9px;
          border-radius:11px; font:700 15px/1 var(--font-body); font-variant-numeric:tabular-nums; }
.job__b { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.job__t { font:600 13.5px/1.35 var(--font-body); color:var(--ink); }
.job__d { font-size:12px; line-height:1.45; color:var(--ink-faint); }
.job__go { flex:none; font:600 12px/1 var(--font-body); color:var(--honey-text); }
.job--honey .job__n { background:var(--honey-bg); color:var(--honey-text); }
.job--warn  .job__n { background:var(--warn-bg);  color:var(--warn-text); }
.job--bad   .job__n { background:var(--bad-bg);   color:var(--bad-text); }
.job--info  .job__n { background:var(--info-bg);  color:var(--info-text); }
.job--mute  .job__n { background:var(--subtle);   color:var(--ink-muted); border:1px solid var(--line); }

@media (max-width:560px){
  .job { flex-wrap:wrap; }
  .job__go { margin-left:auto; }
}

/* ----------------------------------------------------------------- GATE ---
   The page before there is a book. It carries no navigation because there is
   nowhere to navigate to, and the shell is hidden rather than emptied — an
   empty sidebar beside a sign-in box reads as a dashboard that failed to
   load, which is the opposite of what this page is for. */
body.is-out .dash-aside,
body.is-out .dash-header { display:none; }
body.is-out .dash-main { background:var(--bg); }

.gate { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.gate__card { width:100%; max-width:420px; text-align:center; }
.gate__h1 { margin:0 0 10px; font:600 20px/1.25 var(--font-display); color:var(--ink);
  text-wrap:balance; }
.gate__p { margin:0 0 20px; font:400 13.5px/1.6 var(--font-body); color:var(--ink-muted); }
.gate__p strong { color:var(--ink); font-weight:600; }
.gate__do { display:flex; flex-direction:column; gap:10px; align-items:stretch; text-align:left; }
.gate__do form { display:flex; flex-direction:column; gap:8px; }
.gate__lbl { font:500 12px/1.3 var(--font-body); color:var(--ink-muted); letter-spacing:.02em; }
.gate__in { width:100%; box-sizing:border-box; background:var(--surface); color:var(--ink);
  border:1px solid var(--line); border-radius:10px; padding:11px 13px;
  font:400 14px/1.3 var(--font-body); }
.gate__in:focus { outline:2px solid var(--honey); outline-offset:1px; border-color:var(--honey); }
/* A rule with the word on it, rather than two stacked buttons that read as a
   sequence. They are alternatives, and the line says so. */
.gate__or { display:flex; align-items:center; gap:12px; margin:4px 0;
  color:var(--ink-faint); font:400 11.5px/1 var(--font-body); }
.gate__or::before, .gate__or::after { content:''; flex:1; height:1px; background:var(--line); }
/* Google's own guidance: its mark sits on a neutral surface, never on a
   brand colour. So this is the one button on the site that is not honey. */
.btn--google { display:inline-flex; align-items:center; justify-content:center; gap:10px;
  background:var(--surface); color:var(--ink); border-color:var(--line);
  padding:11px 16px; text-decoration:none; }
.btn--google:hover { background:var(--subtle); filter:none; }
.gate__do .btn { text-decoration:none; display:inline-flex; align-items:center;
  justify-content:center; gap:8px; padding:11px 16px; }
.gate__err { margin:0 0 18px; font:400 12.5px/1.5 var(--font-body); color:var(--bad-text);
  background:var(--bad-bg); border-radius:8px; padding:9px 12px; text-align:left; }
.gate__foot { margin:24px 0 0; text-align:center; font:400 11.5px/1.4 var(--font-body); color:var(--ink-faint);
  letter-spacing:.02em; }
