/* Ogyefo Sika — ledger green and cowrie gold, taken from the brand mark.
   Layout: staff console = fixed left rail + working canvas; customers = single column with a status rail. */
:root {
  --bg: #F3F6F2;
  --surface: #FFFFFF;
  --surface-2: #EAF0E9;
  --ink: #142319;
  --ink-2: #3E5145;
  --muted: #6A7C70;
  --line: #D6E0D7;
  --brand: #2F8A45;
  --brand-ink: #1C5E2E;
  --brand-soft: #DDEFE0;
  --gold: #A87A16;
  --gold-bright: #E0BC5C;
  --gold-soft: #F6ECCD;
  --ok: #1E7B45;   --ok-soft: #DCF1E3;
  --warn: #A3640B; --warn-soft: #FBEBCF;
  --bad: #B3261E;  --bad-soft: #F9DEDB;
  --info: #23589E; --info-soft: #DDE8F7;
  --shadow: 0 1px 2px rgba(20, 35, 25, .06), 0 4px 16px rgba(20, 35, 25, .06);
  --logo-plate: transparent;
  --font-display: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1510; --surface: #131F17; --surface-2: #1A281F; --ink: #E4EDE6; --ink-2: #BACBBF; --muted: #8DA294;
    --line: #26372C; --brand: #4CB868; --brand-ink: #7FD496; --brand-soft: #1B3323; --gold: #E0BC5C; --gold-bright: #E8C76E;
    --gold-soft: #3A2F12; --ok: #5CC985; --ok-soft: #173322; --warn: #E9A93F; --warn-soft: #3A2A10; --bad: #F07A6F;
    --bad-soft: #3D1A17; --info: #7FAEEA; --info-soft: #172840; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 18px rgba(0,0,0,.35);
    --logo-plate: #F7F8F4; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1510; --surface: #131F17; --surface-2: #1A281F; --ink: #E4EDE6; --ink-2: #BACBBF; --muted: #8DA294;
  --line: #26372C; --brand: #4CB868; --brand-ink: #7FD496; --brand-soft: #1B3323; --gold: #E0BC5C; --gold-bright: #E8C76E;
  --gold-soft: #3A2F12; --ok: #5CC985; --ok-soft: #173322; --warn: #E9A93F; --warn-soft: #3A2A10; --bad: #F07A6F;
  --bad-soft: #3D1A17; --info: #7FAEEA; --info-soft: #172840; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 18px rgba(0,0,0,.35);
  --logo-plate: #F7F8F4; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 600; }
h4 { font-size: .95rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--brand-ink); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.num, .tbl td.num, .tbl th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: .86em; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .76rem; }
.eyebrow { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.gold { color: var(--gold); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* layout primitives */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.span-2 { grid-column: span 2; }
@media (max-width: 600px) { .span-2 { grid-column: auto; } }

/* surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.panel.tight { padding: 14px 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2, .panel-head h3 { margin: 0; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.note { background: var(--surface-2); border-radius: 8px; padding: 12px 14px; font-size: .9rem; color: var(--ink-2); }
.note.warn { background: var(--warn-soft); color: var(--ink); }
.note.bad { background: var(--bad-soft); color: var(--ink); }
.note.ok { background: var(--ok-soft); color: var(--ink); }
.note.info { background: var(--info-soft); color: var(--ink); }
.note b { color: var(--ink); }

/* buttons */
.btn { font: inherit; font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; line-height: 1.2; min-height: 38px; }
.btn:hover { border-color: var(--brand); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .btn-primary { color: #08140C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #08140C; } }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn-gold { background: var(--gold-bright); border-color: var(--gold-bright); color: #241A03; }
.btn-gold:hover { filter: brightness(.96); border-color: var(--gold); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand-ink); }
.btn-ghost:hover { background: var(--brand-soft); border-color: transparent; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); background: var(--bad-soft); }
.btn-wa { background: #1FA855; border-color: #1FA855; color: #fff; }
.btn-wa:hover { background: #178B45; }
.btn-sm { padding: 6px 11px; min-height: 32px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-ink); text-decoration: underline; cursor: pointer; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: .78rem; color: var(--muted); }
.req::after { content: " *"; color: var(--bad); }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="date"],
input[type="search"], select, textarea {
  font: inherit; font-size: .95rem; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); min-height: 40px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
input[readonly] { background: var(--surface-2); }
.row > input[type="date"], .row > input[type="month"], .row > input[type="search"], .page-head input[type="date"], .page-head input[type="month"] { width: auto; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: .9rem; background: var(--surface); }
.choice input { accent-color: var(--brand); margin: 0; }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.err { color: var(--bad); font-size: .85rem; }
.amount-input { position: relative; }
.amount-input span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; font-weight: 600; }
.amount-input input { padding-left: 48px; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.tag { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }

/* tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-weight: 600; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.clickable:hover td { background: var(--brand-soft); }
.tbl tfoot td { font-weight: 700; border-top: 2px solid var(--line); background: var(--surface-2); }
.tbl tr.paid td { color: var(--muted); }
.tbl tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.tbl tr.due-next td:first-child { box-shadow: inset 3px 0 0 var(--gold-bright); }
.tbl input { min-height: 32px; padding: 5px 8px; font-size: .86rem; }
.tbl .strong { font-weight: 600; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .kpis { grid-template-columns: minmax(0, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .k { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi .v { font-family: var(--font-display); font-size: 1.35rem; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .s { font-size: .8rem; color: var(--muted); }
.kpi.feature { background: var(--brand-ink); border-color: var(--brand-ink); color: #F2F8F3; }
.kpi.feature .k, .kpi.feature .s { color: #BFDCC6; }
.kpi.feature .v { color: var(--gold-bright); }
:root[data-theme="dark"] .kpi.feature { background: #183A23; border-color: #24502F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kpi.feature { background: #183A23; border-color: #24502F; } }

/* app shell (staff) */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; }
.brand b { font-family: var(--font-display); font-size: 1.02rem; letter-spacing: .01em; display: block; }
.brand small { color: var(--gold); font-size: .72rem; font-weight: 600; letter-spacing: .05em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .grp { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 10px 4px; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 7px; color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.nav .count { font-size: .72rem; font-weight: 700; background: var(--gold-bright); color: #241A03; padding: 1px 7px; border-radius: 999px; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: .82rem; }
.who { display: flex; flex-direction: column; padding: 10px; background: var(--surface-2); border-radius: 8px; min-width: 0; }
.who b { overflow-wrap: anywhere; }
.canvas { padding: 24px 28px 64px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: .92rem; margin-top: 4px; }
.topbar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; inset: 0 auto 0 0; width: 280px; max-width: 86vw; z-index: 40; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); padding-top: calc(18px + env(safe-area-inset-top, 0px)); }
  .shell.menu-open .rail { transform: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; }
  .canvas { padding: 18px 16px 56px; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* customer + public layout */
.site { max-width: 1120px; margin: 0 auto; padding-inline: 20px; padding-block: 0 64px; }
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; flex-wrap: wrap; }
.site-head .logo { height: 44px; width: auto; background: var(--logo-plate); border-radius: 8px; padding: 2px 6px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 28px; align-items: start; padding-block: 18px 8px; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 750; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lede { font-size: 1.06rem; color: var(--ink-2); max-width: 60ch; margin-top: 14px; }
.terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 22px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.terms div { padding: 14px 16px; border-right: 1px solid var(--line); }
.terms div:last-child { border-right: 0; }
.terms b { display: block; font-family: var(--font-display); font-size: 1.4rem; color: var(--brand-ink); }
.terms span { font-size: .8rem; color: var(--muted); }
@media (max-width: 480px) { .terms { grid-template-columns: minmax(0, 1fr); } .terms div { border-right: 0; border-bottom: 1px solid var(--line); } .terms div:last-child { border-bottom: 0; } }
.cowrie-rule { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--gold-bright), var(--gold) 60%, var(--gold-bright)); width: 72px; }
.estimate { margin-top: 18px; }
.estimate .big { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.steps-line { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.steps-line div { border-top: 3px solid var(--line); padding-top: 10px; font-size: .88rem; color: var(--ink-2); }
.steps-line div b { display: block; color: var(--ink); font-family: var(--font-display); font-size: .95rem; }
@media (max-width: 640px) { .steps-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* auth card */
.auth { max-width: 440px; margin: 24px auto; }

/* status rail for KYC / loan journey */
.journey { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.journey .st { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; color: var(--muted); min-width: 0; }
.journey .bar { height: 6px; border-radius: 6px; background: var(--line); }
.journey .st.done .bar { background: var(--brand); }
.journey .st.now .bar { background: linear-gradient(90deg, var(--brand), var(--gold-bright)); }
.journey .st.done, .journey .st.now { color: var(--ink); }
.journey .st b { font-weight: 600; font-size: .82rem; }
@media (max-width: 560px) { .journey { grid-template-columns: minmax(0, 1fr); } .journey .st { flex-direction: row; align-items: center; } .journey .bar { width: 36px; flex: none; } }

/* wizard steps */
.wizard-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.wizard-steps button { font: inherit; font-size: .82rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.wizard-steps button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.wizard-steps button.done { border-color: var(--brand); color: var(--brand-ink); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a, .tabs button { font: inherit; font-size: .88rem; font-weight: 600; padding: 9px 14px; color: var(--muted); text-decoration: none; border: 0; background: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs .on { color: var(--brand-ink); border-bottom-color: var(--brand); }

/* definition lists */
.dl { display: grid; grid-template-columns: minmax(120px, 38%) minmax(0, 1fr); gap: 8px 16px; font-size: .9rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* progress */
.meter { height: 8px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--brand); border-radius: 8px; }

/* modal, toast, drawer */
.modal-back { position: fixed; inset: 0; background: rgba(8, 16, 11, .48); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.modal { background: var(--surface); color: var(--ink); border-radius: 12px; width: min(640px, 100%); box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column; max-height: none; }
.modal.wide { width: min(980px, 100%); }
.modal header { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal .body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal footer { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.x { background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.x:hover { background: var(--surface-2); }
.toasts { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; z-index: 80; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--bg); padding: 11px 14px; border-radius: 8px; font-size: .9rem; box-shadow: var(--shadow); }
.toast.bad { background: var(--bad); color: #fff; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); border-left: 1px solid var(--line); z-index: 70; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.drawer header { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
.drawer .body { overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: .85rem; display: flex; flex-direction: column; gap: 4px; }
.msg pre { white-space: pre-wrap; font-family: var(--font-body); margin: 0; color: var(--ink-2); }
.demo-bar { background: var(--gold-soft); color: var(--ink); font-size: .84rem; padding: 8px 16px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center; }
.demo-bar b { color: var(--gold); }

/* empty and loading */
.empty { text-align: center; padding: 28px 16px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty b { color: var(--ink); font-family: var(--font-display); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 12px; padding: 40px; justify-content: center; color: var(--muted); }

/* charts */
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* printable documents */
.doc-view { background: var(--surface-2); padding: 20px; border-radius: var(--r); overflow-x: auto; }
.doc { background: #fff; color: #111; width: 100%; max-width: 820px; margin: 0 auto; padding: 36px 42px; font-family: var(--font-body); font-size: 12.5px; line-height: 1.45; box-shadow: 0 2px 14px rgba(0,0,0,.12); }
.doc h1 { font-size: 20px; text-align: center; letter-spacing: .08em; margin: 6px 0 2px; color: #111; }
.doc h2 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin: 16px 0 6px; color: #1C5E2E; border-bottom: 1.5px solid #1C5E2E; padding-bottom: 3px; }
.doc .doc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 3px solid #E0BC5C; padding-bottom: 10px; }
.doc .doc-head img { height: 54px; width: auto; }
.doc table { width: 100%; border-collapse: collapse; margin: 6px 0; }
.doc th, .doc td { border: 1px solid #9AA59D; padding: 5px 7px; text-align: left; vertical-align: top; color: #111; }
.doc th { background: #EEF3EE; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; width: 34%; }
.doc td.num, .doc th.num { text-align: right; }
.doc .sched th { width: auto; }
.doc .line { border-bottom: 1px dotted #555; display: inline-block; min-width: 180px; height: 1.1em; }
.doc .sig { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; }
.doc .sig div { border-top: 1px solid #333; padding-top: 4px; font-size: 11px; }
.doc .boxes span { display: inline-block; margin-right: 14px; }
.doc .box { display: inline-block; width: 11px; height: 11px; border: 1px solid #333; margin-right: 4px; vertical-align: -1px; text-align: center; font-size: 9px; line-height: 10px; }
.doc ol { margin: 4px 0; padding-left: 22px; }
.doc .foot { margin-top: 20px; font-size: 10px; color: #555; text-align: center; border-top: 1px solid #ccc; padding-top: 6px; }
.doc + .doc { margin-top: 22px; }
.doc.receipt th { width: 36%; }
.doc.report { max-width: 1000px; font-size: 11.5px; }
.doc.report th { width: auto; }
.doc .kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 14px; margin: 8px 0; }
.doc .kv div { border: 1px solid #C9D3CB; padding: 6px 8px; }
.doc .kv b { display: block; font-size: 15px; }
.doc .kv span { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: #444; }

@media print {
  body { background: #fff; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  #print-root .doc { box-shadow: none; padding: 0; max-width: none; }
  #print-root .doc + .doc { margin-top: 0; break-before: page; page-break-before: always; }
  @page { margin: 14mm; }
}
#print-root { display: none; }
