/* Sampada — wealth desk. Ledger paper, pine ink, a line of brass. */

@font-face { font-family: "Geist"; src: url("fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f3f0e8; --surface: #fffdfa; --surface-2: #f7f4ec; --surface-3: #efebe0;
  --ink: #15201c; --ink-2: #55615b; --ink-3: #87918b;
  --line: rgba(21, 32, 28, .10); --line-2: rgba(21, 32, 28, .17);
  --pine: #0c1c17; --pine-2: #143026; --emerald: #0f7b5c; --emerald-soft: rgba(15, 123, 92, .13);
  --brass: #a8803a; --brass-2: #c9a45c; --brass-soft: #f1e7cf;
  /* chart series — validated (CVD + contrast) on --surface, fixed order, never cycled */
  --s1: #0f7b5c; --s2: #e08a1e; --s3: #2f6fdd; --s4: #e0559a; --s5: #7a55e0; --s6: #d8463f; --s-other: #b4bbb5;
  --grid: #e9e5da; --axis: #c8c4b8;
  /* status — always with an icon and a label */
  --good: #0aac23; --warning: #e9a400; --serious: #f18a59; --critical: #dc3c3d;
  --good-bg: #e3f3e5; --good-ink: #0b5a17; --warning-bg: #fbf0d0; --warning-ink: #6f4d00;
  --serious-bg: #fce5d8; --serious-ink: #8a3a12; --critical-bg: #fadfdf; --critical-ink: #8f1d1e;
  --up: #006c10; --down: #b3261e;
  --shadow: 0 1px 2px rgba(21, 32, 28, .05), 0 8px 24px -16px rgba(21, 32, 28, .18);
  --shadow-pop: 0 24px 60px -20px rgba(12, 28, 23, .45), 0 2px 8px rgba(12, 28, 23, .12);
  --r: 16px; --r-sm: 10px;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0a100e; --surface: #131b18; --surface-2: #18221e; --surface-3: #1e2a25;
  --ink: #e9eeea; --ink-2: #a0aba5; --ink-3: #6f7b75;
  --line: rgba(255, 255, 255, .085); --line-2: rgba(255, 255, 255, .16);
  --emerald: #1ba37c; --emerald-soft: rgba(27, 163, 124, .17);
  --brass: #cfa85a; --brass-2: #dfbe7a; --brass-soft: rgba(207, 168, 90, .16);
  --s1: #1ba37c; --s2: #c98717; --s3: #4b8cf0; --s4: #e2609f; --s5: #9a85f0; --s6: #e8635d; --s-other: #56615b;
  --grid: #222d28; --axis: #3a4741;
  --warning: #fbb315;
  --good-bg: rgba(10, 172, 35, .16); --good-ink: #7fdc8c; --warning-bg: rgba(251, 179, 21, .15); --warning-ink: #f3cd72;
  --serious-bg: rgba(241, 138, 89, .16); --serious-ink: #f5b294; --critical-bg: rgba(220, 60, 61, .2); --critical-ink: #f5a3a3;
  --up: #53c556; --down: #f08a84;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-pop: 0 24px 60px -20px rgba(0, 0, 0, .8), 0 2px 8px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; flex: none; }
::selection { background: var(--brass-soft); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ───────── shell ───────── */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; color: #c9d3cd; overflow: hidden;
  background: radial-gradient(120% 60% at 0% 0%, #17382c 0%, transparent 60%), linear-gradient(180deg, #0e211a, #09140f); }
.side::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 1px; background: linear-gradient(180deg, transparent, rgba(201, 164, 92, .35), transparent); }
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font: 500 22px/1 var(--serif); color: #f6f0df; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: #8fa097; margin-top: 4px; letter-spacing: .02em; }
.nav { padding: 6px 12px; display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 12px; border-radius: 10px; color: #b9c5be; font-weight: 450; position: relative; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #f1f4f1; }
.nav a.on { background: linear-gradient(90deg, rgba(201, 164, 92, .2), rgba(201, 164, 92, .05)); color: #f7ecd0; }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass-2); }
.nav .count { margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: #d8e0db; font-variant-numeric: tabular-nums; }
.nav .count.hot { background: rgba(241, 138, 89, .22); color: #ffc9ae; }
.side-label { padding: 18px 24px 8px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #6f8279; }
.side-clients { flex: 1; overflow-y: auto; padding: 0 12px 12px; scrollbar-width: thin; scrollbar-color: #2a3d35 transparent; }
.side-clients a { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 10px; color: #b9c5be; }
.side-clients a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.side-clients a.on { background: rgba(255, 255, 255, .08); color: #fff; }
.side-clients .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.side-clients .nw { font-size: 11.5px; color: #7f9088; font-variant-numeric: tabular-nums; }
.side-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); display: flex; align-items: center; gap: 10px; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; font-weight: 500; color: #f1f4f1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 11.5px; color: #7f9088; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: inherit; }
.icon-btn:hover { background: rgba(127, 127, 127, .14); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 28px;
  background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; min-width: 0; white-space: nowrap; }
.crumbs a:hover { color: var(--ink); }
.crumbs b { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { opacity: .5; }
.top .grow { flex: 1; }
.search-btn { display: flex; align-items: center; gap: 9px; height: 36px; width: 280px; padding: 0 10px 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); font-size: 13px; }
.search-btn:hover { border-color: var(--line-2); color: var(--ink-2); }
.search-btn kbd { margin-left: auto; }
kbd { font: 500 11px var(--mono); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2); }
.asof { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.asof i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-bg); }
.menu-btn { display: none; }
.content { padding: 26px 28px 56px; max-width: 1480px; width: 100%; margin: 0 auto; }
.proto-foot { margin-top: 34px; display: flex; gap: 10px; align-items: center; color: var(--ink-3); font-size: 12px; }

/* ───────── page head ───────── */
.page-head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 240px; }
.eyebrow { font-size: 11px; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
h1 { font: 500 31px/1.15 var(--serif); letter-spacing: -.015em; margin-top: 4px; }
h1 em { font-style: italic; color: var(--brass); font-weight: 400; }
.page-head p { color: var(--ink-2); margin-top: 6px; max-width: 70ch; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-weight: 500; font-size: 13px; white-space: nowrap; transition: transform .08s, background .15s, border-color .15s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pine-2); border-color: var(--pine-2); color: #f6f0df; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover { background: #1b4033; }
:root[data-theme="dark"] .btn-primary { background: var(--brass); border-color: var(--brass); color: #1a1407; }
:root[data-theme="dark"] .btn-primary:hover { background: var(--brass-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); }

/* ───────── cards & grid ───────── */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; }
.c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c9 { grid-column: span 9; } .c12 { grid-column: span 12; }
.stack { display: grid; gap: 18px; align-content: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px 0; min-height: 44px; }
.card-head h3 { font: 600 14.5px/1.3 var(--sans); letter-spacing: -.005em; }
.card-head .sub { color: var(--ink-3); font-size: 12.5px; margin-top: 1px; }
.card-head .grow { flex: 1; min-width: 0; }
.card-body { padding: 16px 20px 20px; }
.card-body.flush { padding: 10px 0 6px; }
.link { color: var(--emerald); font-weight: 500; font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* hero — the one number a view leads with */
.hero { position: relative; overflow: hidden; border-radius: var(--r); color: #f4efe0; padding: 24px 26px; min-height: 216px; display: flex; flex-direction: column;
  background: radial-gradient(90% 120% at 100% 0%, #1d4a3a 0%, transparent 55%), linear-gradient(160deg, #123026 0%, #0a1813 100%);
  box-shadow: inset 0 0 0 1px rgba(201, 164, 92, .28), var(--shadow); }
.hero .eyebrow { color: #c9b98f; }
.hero-figure { font: 600 52px/1.05 var(--sans); letter-spacing: -.035em; margin-top: 10px; }
.hero-figure small { font-size: .5em; font-weight: 500; letter-spacing: -.01em; color: #cfd8d2; margin-left: 4px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; color: #b8c6be; font-size: 13px; align-items: center; }
.hero-meta b { color: #f4efe0; font-weight: 500; }
.hero .delta { background: rgba(255, 255, 255, .1); color: #bff0c6; padding: 3px 9px; border-radius: 99px; }
.hero .delta.down { color: #ffc0ba; }
.hero-foot { margin-top: auto; padding-top: 18px; display: flex; gap: 26px; flex-wrap: wrap; position: relative; }
.hero-foot div span { display: block; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: #9db0a6; }
.hero-foot div b { font-weight: 550; font-size: 17px; letter-spacing: -.01em; }
.guilloche { position: absolute; pointer-events: none; color: var(--brass-2); opacity: .5; }
.hero .guilloche { right: -120px; top: -110px; width: 420px; height: 420px; }
.hero > :not(.guilloche) { position: relative; }

/* stat tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 13px; box-shadow: var(--shadow); min-width: 0; }
.kpi .lbl { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 12.5px; }
.kpi .lbl svg { color: var(--ink-3); }
.kpi .val { font: 600 23px/1.2 var(--sans); letter-spacing: -.025em; margin-top: 7px; white-space: nowrap; }
.kpi .ft { margin-top: 5px; font-size: 12px; color: var(--ink-3); display: flex; gap: 7px; align-items: center; flex-wrap: wrap; min-height: 18px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 550; font-size: 12.5px; color: var(--up); font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.down { color: var(--down); } .delta.flat { color: var(--ink-3); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 550; white-space: nowrap;
  background: var(--surface-3); color: var(--ink-2); }
.chip svg { width: 12px; height: 12px; }
.chip.good { background: var(--good-bg); color: var(--good-ink); } .chip.good svg { color: var(--good); }
.chip.warning { background: var(--warning-bg); color: var(--warning-ink); } .chip.warning svg { color: var(--warning); }
.chip.serious { background: var(--serious-bg); color: var(--serious-ink); } .chip.serious svg { color: var(--serious); }
.chip.critical { background: var(--critical-bg); color: var(--critical-ink); } .chip.critical svg { color: var(--critical); }
.chip.brass { background: var(--brass-soft); color: var(--brass); }
:root:not([data-theme="dark"]) .chip.brass { color: #6d5320; }
.chip.line { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }

.avatar { --sz: 36px; width: var(--sz); height: var(--sz); border-radius: calc(var(--sz) * .32); display: grid; place-items: center; flex: none;
  font: 600 calc(var(--sz) * .36)/1 var(--sans); letter-spacing: .02em; color: #f6f0df; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.avatar.sm { --sz: 26px; } .avatar.lg { --sz: 52px; } .avatar.round { border-radius: 50%; }
.avatars { display: flex; } .avatars .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); } .avatars .avatar:first-child { margin-left: 0; }

/* ───────── tables ───────── */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.t th.num { text-align: right; }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .12s; }
.t tbody tr:hover { background: var(--surface-2); }
.t tfoot td { font-weight: 600; border-top: 1px solid var(--line-2); border-bottom: 0; background: var(--surface-2); }
.t td:first-child, .t th:first-child { padding-left: 20px; } .t td:last-child, .t th:last-child { padding-right: 20px; }
.t .strong { font-weight: 550; }
.t tr.click { cursor: pointer; }
.cell-2 { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cell-2 .tx { min-width: 0; } .cell-2 b { display: block; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-2 span { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.empty { padding: 44px 20px; text-align: center; color: var(--ink-2); }
.empty svg { margin: 0 auto 12px; color: var(--ink-3); } .empty b { display: block; color: var(--ink); font-weight: 550; margin-bottom: 4px; }

/* ───────── figures: bars, meters, segmented ───────── */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--s1)); }
.legend i.ln { height: 2px; width: 14px; border-radius: 2px; } .legend i.tick { width: 2px; height: 12px; border-radius: 1px; background: var(--ink); }

.bars { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: minmax(96px, 168px) minmax(0, 1fr) 64px; gap: 12px; align-items: center; font-size: 13px; }
.bar-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.bar-row .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 550; }
.bar-track { position: relative; height: 14px; }
.bar-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--grid); }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--s1); transition: filter .12s; }
.bar-row:hover .bar-fill { filter: brightness(1.12); }
.bar-target { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; box-shadow: 0 0 0 2px var(--surface); }

.meter { height: 8px; border-radius: 99px; background: var(--emerald-soft); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--s1); min-width: 3px; }
.meter.warn { background: color-mix(in srgb, var(--warning) 18%, transparent); } .meter.warn > i { background: var(--warning); }
.meter.bad { background: color-mix(in srgb, var(--critical) 16%, transparent); } .meter.bad > i { background: var(--critical); }
.meter.thin { height: 4px; }

.seg { display: flex; gap: 2px; height: 8px; border-radius: 99px; overflow: hidden; }
.seg i { display: block; background: var(--c); min-width: 2px; transition: filter .12s; } .seg i:hover { filter: brightness(1.15); }
.seg.tall { height: 28px; border-radius: 0; overflow: visible; }
.seg.tall i { border-radius: 4px; position: relative; }
.seg.tall i b { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font: 600 11.5px var(--sans); color: #fff; white-space: nowrap; }
.seg.tall i.dk b { color: #0b0b0b; }

.chart { position: relative; width: 100%; }
.chart svg { width: 100%; overflow: visible; outline: none; }
.chart text { font: 11.5px var(--sans); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .endlbl { fill: var(--ink); font-weight: 600; font-size: 12px; }
.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--pine); color: #f1efe6; border-radius: 10px; padding: 9px 11px; font-size: 12.5px; box-shadow: var(--shadow-pop);
  max-width: 280px; opacity: 0; transform: translateY(4px); transition: opacity .1s, transform .1s; border: 1px solid rgba(201, 164, 92, .25); }
.tip.on { opacity: 1; transform: none; }
.tip .th { color: #b9c5be; font-size: 11.5px; margin-bottom: 5px; }
.tip .tr { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tip .tr i { width: 12px; height: 2px; border-radius: 2px; background: var(--c); }
.tip .tr b { font-weight: 600; font-variant-numeric: tabular-nums; } .tip .tr span { color: #b9c5be; }
.toggle { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--surface-3); gap: 2px; }
.toggle button, .toggle a { border: 0; background: transparent; height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.toggle .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }

/* ───────── lists ───────── */
.alert-list { display: grid; }
.alert { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); align-items: start; transition: background .12s; }
.alert:last-child { border-bottom: 0; } a.alert:hover { background: var(--surface-2); }
.alert .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.alert.critical .ic { background: var(--critical-bg); color: var(--critical); } .alert.serious .ic { background: var(--serious-bg); color: var(--serious); }
.alert.warning .ic { background: var(--warning-bg); color: var(--warning); } .alert.info .ic { background: var(--surface-3); color: var(--ink-2); }
.alert b { font-weight: 550; display: block; } .alert p { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.alert .who { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1px; }
.alert .lv { padding-top: 1px; }
.timeline { display: grid; gap: 16px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 12px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.tl { display: grid; grid-template-columns: 25px 1fr; gap: 12px; position: relative; }
.tl .dot { width: 25px; height: 25px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-2); }
.tl p { font-size: 13px; } .tl small { color: var(--ink-3); font-size: 12px; }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; font-size: 13px; } .dl dt { color: var(--ink-3); } .dl dd { margin: 0; font-weight: 500; }

/* ───────── client workspace ───────── */
.client-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.client-head .grow { flex: 1; min-width: 260px; }
.client-head h1 { margin: 0; font-size: 30px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 7px; color: var(--ink-2); font-size: 12.5px; }
.meta .dotsep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px 11px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; border-radius: 8px 8px 0 0; }
.tabs a:hover { color: var(--ink); background: var(--surface-3); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--brass); }
.tabs a .n { font-size: 11px; padding: 0 6px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tabs a .n.hot { background: var(--serious-bg); color: var(--serious-ink); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.input, .select { height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 12px; outline: none; min-width: 0; }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-soft); }
.input.search { padding-left: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2387918b' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='m10.5 10.5 3 3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 11px 50%; width: 260px; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; width: 100%; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chips button { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.filter-chips button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.proto-note { display: flex; gap: 10px; align-items: center; padding: 9px 14px; border-radius: 10px; background: var(--brass-soft); color: var(--ink); font-size: 12.5px; margin-bottom: 14px; }
.proto-note svg { color: var(--brass); }

/* client cards */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.client-card { display: flex; flex-direction: column; padding: 18px 20px 16px; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.client-card:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 1px 2px rgba(21, 32, 28, .05), 0 18px 34px -20px rgba(21, 32, 28, .35); }
.client-card .hd { display: flex; gap: 12px; align-items: center; }
.client-card .hd b { font: 500 18px/1.2 var(--serif); letter-spacing: -.01em; display: block; }
.client-card .hd span { font-size: 12px; color: var(--ink-3); }
.client-card .nw { display: flex; align-items: flex-end; gap: 12px; margin-top: 18px; }
.client-card .nw .fig { font: 600 27px/1 var(--sans); letter-spacing: -.03em; }
.client-card .nw .spark { margin-left: auto; }
.client-card .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.client-card .row b { display: block; color: var(--ink); font-weight: 550; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.client-card .ft { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.client-card .ft .grow { flex: 1; }
.spark path.l { fill: none; stroke: var(--s1); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark path.a { fill: var(--s1); opacity: .1; } .spark circle { fill: var(--s1); stroke: var(--surface); stroke-width: 2; }
.spark.down path.l { stroke: var(--down); } .spark.down path.a, .spark.down circle { fill: var(--down); }

/* goal cards */
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.goal { padding: 16px 18px; display: grid; gap: 12px; }
.goal .hd { display: flex; align-items: flex-start; gap: 10px; }
.goal .hd b { font-weight: 600; font-size: 14.5px; display: block; } .goal .hd span { font-size: 12px; color: var(--ink-3); }
.goal .pct { font: 600 24px/1 var(--sans); letter-spacing: -.03em; }
.goal .nums { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; font-size: 12px; color: var(--ink-3); }
.goal .nums b { display: block; font-size: 13.5px; color: var(--ink); font-weight: 550; font-variant-numeric: tabular-nums; }
.goal .sip { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); }
.goal .sip b { color: var(--ink); font-size: 14px; }
.loan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.member { padding: 16px; display: grid; gap: 12px; }

/* ───────── the sheet (monthly values) ───────── */
.sheet-wrap { overflow: auto; max-height: 68vh; border-radius: 0 0 var(--r) var(--r); }
table.sheet { border-collapse: separate; border-spacing: 0; font-size: 13px; width: max-content; min-width: 100%; }
.sheet th, .sheet td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; height: 38px; background: var(--surface); }
.sheet thead th { position: sticky; top: 0; z-index: 3; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; padding: 0 12px; text-align: right; background: var(--surface-2); white-space: nowrap; }
.sheet thead th .st { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--good); margin-right: 6px; vertical-align: 1px; }
.sheet thead th.miss .st { background: var(--warning); }
.sheet .stick { position: sticky; left: 0; z-index: 2; text-align: left; padding: 0 14px 0 20px; min-width: 250px; max-width: 290px; font-weight: 400; box-shadow: 1px 0 0 var(--line-2); }
.sheet thead .stick { z-index: 4; }
.sheet .stick b { font-weight: 550; } .sheet .stick .mono { color: var(--ink-3); margin-right: 8px; }
.sheet .stick span.sub { color: var(--ink-3); font-size: 12px; margin-left: 6px; }
.sheet td input { width: 112px; height: 37px; border: 0; background: transparent; text-align: right; padding: 0 12px; font-variant-numeric: tabular-nums; outline: none; }
.sheet td input:hover { background: var(--surface-2); }
.sheet td input:focus { background: var(--brass-soft); box-shadow: inset 0 0 0 2px var(--brass); }
.sheet td.dirty input { color: var(--emerald); font-weight: 600; }
.sheet td.blank input { background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--warning) 16%, transparent) 6px 7px); }
.sheet td.calc { padding: 0 12px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.sheet tfoot td, .sheet tfoot th { position: sticky; bottom: 0; z-index: 2; background: var(--surface-2); font-weight: 600; padding: 0 12px; text-align: right; font-variant-numeric: tabular-nums; border-top: 1px solid var(--line-2); border-bottom: 0; }
.sheet tfoot .stick { z-index: 4; padding-left: 20px; text-align: left; }
.sheet .grp th { background: var(--surface-3); height: 28px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; text-align: left; padding-left: 20px; position: sticky; left: 0; }
.sheet .grp td { background: var(--surface-3); height: 28px; }

/* ───────── dialogs, palette, toast ───────── */
dialog { border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog::backdrop { background: rgba(8, 16, 13, .55); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .18s ease-out; display: flex; flex-direction: column; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.dlg-head h3 { font: 500 20px/1.2 var(--serif); flex: 1; }
.dlg-body { padding: 18px 22px; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 18px 18px; align-items: center; }
.dlg-foot .note { margin-right: auto; font-size: 12px; color: var(--ink-3); }
.field { display: grid; gap: 5px; min-width: 0; } .field.wide { grid-column: 1 / -1; }
.field label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.field .input, .field .select { width: 100%; }
.cmdk { width: min(600px, calc(100vw - 32px)); margin-top: 12vh; }
.cmdk input { width: 100%; border: 0; outline: 0; background: transparent; height: 54px; padding: 0 20px; font-size: 16px; border-bottom: 1px solid var(--line); }
.cmdk-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.cmdk-list a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; }
.cmdk-list a.sel { background: var(--surface-3); }
.cmdk-list a span.r { margin-left: auto; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.cmdk-list .grp { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 8px 12px 4px; }
.cmdk-foot { display: flex; gap: 14px; padding: 10px 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12px; }
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: grid; gap: 8px; }
.toast { display: flex; gap: 10px; align-items: center; background: var(--pine); color: #f1efe6; padding: 11px 14px; border-radius: 12px; box-shadow: var(--shadow-pop); font-size: 13px; border: 1px solid rgba(201, 164, 92, .3); animation: pop .2s ease-out; max-width: 380px; }
.toast svg { color: var(--brass-2); }

/* ───────── login ───────── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden;
  background: radial-gradient(60% 55% at 50% 45%, #1c4a3a 0%, transparent 70%), #0a1712; }
.login .guilloche { left: 50%; top: 50%; width: 1100px; height: 1100px; margin: -550px 0 0 -550px; opacity: .4; animation: turn 240s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.login-card { position: relative; width: 100%; max-width: 392px; display: grid; gap: 16px; padding: 34px 34px 32px; border-radius: 22px; background: var(--surface);
  box-shadow: 0 0 0 1px rgba(201, 164, 92, .35), 0 40px 80px -30px rgba(0, 0, 0, .7); }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; }
.login-brand .brand-mark { width: 42px; height: 42px; }
.login-brand .brand-name { font-size: 28px; color: var(--ink); }
.login-card .input { height: 46px; font-size: 15px; width: 100%; }
.login-card .btn { height: 46px; font-size: 15px; width: 100%; margin-top: 4px; }
.login-card .pw { position: relative; } .login-card .pw button { position: absolute; right: 6px; top: 6px; }
.login-err { display: flex; gap: 9px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--critical-bg); color: var(--critical-ink); font-size: 13px; }
.login-err svg { color: var(--critical); }

/* ───────── responsive ───────── */
@media (max-width: 1240px) {
  .c3 { grid-column: span 6; } .c4, .c5, .c7, .c8, .c9 { grid-column: span 12; } .c6 { grid-column: span 12; }
  .search-btn { width: 200px; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 60; width: 272px; left: 0; transform: translateX(-100%); transition: transform .22s ease; }
  body.nav-open .side { transform: none; box-shadow: var(--shadow-pop); }
  .menu-btn { display: grid; } .asof { display: none; }
  .top { padding: 0 16px; } .content { padding: 20px 16px 48px; }
  .kpis, .kpis.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dlg-body { grid-template-columns: 1fr; } .c3 { grid-column: span 12; }
  .hero-figure { font-size: 40px; } .search-btn span, .search-btn kbd { display: none; } .search-btn { width: 40px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ───────── print (wealth statement) ───────── */
.report { max-width: 980px; margin: 0 auto; padding: 36px 40px 60px; background: var(--surface); }
.report-bar { position: sticky; top: 0; z-index: 10; display: flex; gap: 10px; align-items: center; padding: 12px 24px; background: var(--paper); border-bottom: 1px solid var(--line); }
.report-head { display: flex; gap: 20px; align-items: flex-start; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.report h2 { font: 500 17px/1.3 var(--serif); margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.report .t td, .report .t th { padding: 7px 10px; } .report .t td:first-child, .report .t th:first-child { padding-left: 0; } .report .t td:last-child, .report .t th:last-child { padding-right: 0; }
.report-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 20px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.report-kpis div { padding: 12px 16px; border-right: 1px solid var(--line); } .report-kpis div:last-child { border: 0; }
.report-kpis span { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); display: block; }
.report-kpis b { font: 600 20px/1.3 var(--sans); letter-spacing: -.02em; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; } .report-bar { display: none; } .report { padding: 0; max-width: none; }
  .report h2 { break-after: avoid; } .t tr { break-inside: avoid; }
}
