/* KitaAgad Office: light, neutral, charcoal. Pastel pills. Tabular numbers. */
:root {
  --bg: #f6f6f3; --surface: #ffffff; --soft: #f1f1ed; --line: #e6e5df; --line-2: #d9d8d0;
  --text: #1d1f23; --muted: #666a72; --faint: #8b8f97;
  --ink: #202328; --ink-2: #33373d; --on-ink: #ffffff;
  --mint: #dcf2e4; --mint-t: #17603a; --butter: #fbefc6; --butter-t: #75560a;
  --peach: #fddfcb; --peach-t: #873a10; --rose: #fad6dc; --rose-t: #8d1d31; --grey: #ebebe7; --grey-t: #52565d;
  --bar-mint: #6dc590; --bar-butter: #e8c34f; --bar-peach: #ee9a63; --bar-rose: #de6579;
  --radius: 12px; --shadow: 0 1px 2px rgba(29, 31, 35, .05), 0 4px 14px rgba(29, 31, 35, .045);
  --side: 232px;
  --font: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; overflow-x: hidden; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
.num, td.num, th.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.col { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.col .main { flex: 1 0 auto; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.brand b { display: block; font-size: 15px; letter-spacing: .02em; } .brand small { color: var(--muted); font-size: 11px; display: block; margin-top: -2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav a svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.nav a:hover { background: var(--soft); }
.nav a[aria-current=page] { background: var(--ink); color: #fff; } .nav a[aria-current=page] svg { opacity: 1; }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: grid; gap: 4px; }
.main { min-width: 0; padding: 26px 32px 60px; max-width: 1280px; width: 100%; }
.topbar { display: none; }
.tabbar { display: none; }
.sheet { display: none; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; } .page-head .sub { color: var(--muted); margin-top: 2px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb { font-size: 12px; color: var(--muted); margin-bottom: 4px; } .crumb a { text-decoration: none; } .crumb a:hover { text-decoration: underline; }

/* ---------- cards, grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 15px; } .card-head .sub { color: var(--muted); font-size: 12px; }
.grid { display: grid; gap: 16px; } .grid .card + .card { margin-top: 0; }
.g-kpi { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; margin-bottom: 16px; }
.stack { display: grid; gap: 16px; }
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi .value { font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; }
.kpi .meta { color: var(--muted); font-size: 12px; }
.kpi.par { background: var(--grey); border-color: transparent; }
.kpi.par.mint { background: var(--mint); } .kpi.par.butter { background: var(--butter); } .kpi.par.peach { background: var(--peach); } .kpi.par.rose { background: var(--rose); }
.kpi.par .value { font-size: 34px; font-weight: 700; } .kpi.par .label, .kpi.par .meta { color: inherit; opacity: .8; }
.kpi.par.mint { color: var(--mint-t); } .kpi.par.butter { color: var(--butter-t); } .kpi.par.peach { color: var(--peach-t); } .kpi.par.rose { color: var(--rose-t); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; } .kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-weight: 550; }
.banner { background: var(--butter); color: var(--butter-t); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; }
.banner.info { background: var(--soft); color: var(--ink-2); }
.demo-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--butter); color: var(--butter-t); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }

/* ---------- pills, buttons ---------- */
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--grey); color: var(--grey-t); }
.pill.mint { background: var(--mint); color: var(--mint-t); } .pill.butter { background: var(--butter); color: var(--butter-t); }
.pill.peach { background: var(--peach); color: var(--peach-t); } .pill.rose { background: var(--rose); color: var(--rose-t); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; } .btn.primary:hover { background: var(--ink-2); }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { border: 0; background: none; font-size: 24px; line-height: 1; padding: 4px 10px; cursor: pointer; color: var(--muted); border-radius: 8px; } .icon-btn:hover { background: var(--soft); }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; font-weight: 500; }
.chip[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .n { opacity: .6; margin-left: 4px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -18px; padding: 0 18px; }
.table-wrap.tall { max-height: 460px; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; z-index: 1; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: #fafaf8; }
td a.row-link { text-decoration: none; font-weight: 550; } td a.row-link:hover { text-decoration: underline; }
tfoot td { font-weight: 650; border-top: 1px solid var(--line-2); background: #fafaf8; }
.cell-sub { color: var(--muted); font-size: 12px; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 4px; align-content: start; min-width: 0; }
.field label { font-weight: 550; font-size: 13px; } .field .req { color: var(--rose-t); margin-left: 2px; }
input[type=text], input[type=number], input[type=date], input[type=search], input[type=tel], select, textarea {
  width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); }
textarea { resize: vertical; }
input[type=range] { width: 100%; accent-color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
input.invalid, select.invalid { border-color: #d36a7c; background: #fff8f9; }
.help { color: var(--muted); font-size: 12px; } .err { color: var(--rose-t); font-size: 12px; font-weight: 550; } .err:empty { display: none; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; } .check input { width: 18px; height: 18px; accent-color: var(--ink); }
.form-alert { background: var(--rose); color: var(--rose-t); padding: 8px 12px; border-radius: 9px; font-weight: 550; font-size: 13px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.searchbar { position: relative; } .searchbar input { padding-left: 34px; }
.searchbar svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--faint); fill: none; stroke-width: 2; stroke-linecap: round; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; } .toolbar .searchbar { flex: 1 1 260px; max-width: 420px; }
.results { display: grid; gap: 4px; margin-top: 8px; }
.result { display: flex; justify-content: space-between; gap: 12px; text-align: left; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; width: 100%; }
.result:hover, .result:focus-visible { background: var(--soft); }
.result.sel { border-color: var(--ink); background: var(--soft); }

/* ---------- bits ---------- */
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 118px; gap: 12px; align-items: center; }
.bar-track { height: 12px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; min-width: 3px; } .bar-fill.current { background: var(--bar-mint); } .bar-fill.b1 { background: var(--bar-butter); } .bar-fill.b2 { background: var(--bar-peach); } .bar-fill.b3 { background: var(--bar-rose); }
.stackbar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--soft); margin: 10px 0; } .stackbar span { display: block; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; } .legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.big { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.list { display: grid; } .list-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: center; text-decoration: none; } .list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: #fafaf8; }
.checklist { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; } .checklist label { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; cursor: pointer; } .checklist input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--ink); flex: none; }
.checklist input:checked + span { color: var(--faint); text-decoration: line-through; }
.countdown { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.countdown .big { font-size: 44px; line-height: 1; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); } .empty strong { display: block; color: var(--text); margin-bottom: 4px; }
.loading { display: grid; place-items: center; min-height: 50vh; color: var(--muted); gap: 12px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--soft), #f8f8f5, var(--soft)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.steps { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 550; color: var(--muted); cursor: pointer; }
.step b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-size: 12px; color: var(--ink); }
.step.on { color: var(--text); border-color: var(--ink); } .step.on b { background: var(--ink); color: #fff; }
.msg { display: grid; gap: 6px; margin-bottom: 8px; } .msg > div { padding: 9px 12px; border-radius: 9px; font-size: 13px; }
.msg .e { background: var(--rose); color: var(--rose-t); } .msg .w { background: var(--butter); color: var(--butter-t); } .msg .ok { background: var(--mint); color: var(--mint-t); }
.msg small { display: block; opacity: .75; margin-top: 2px; }
.alloc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; } .alloc > div { background: var(--soft); border-radius: 10px; padding: 10px 12px; } .alloc small { display: block; color: var(--muted); } .alloc b { font-size: 16px; }
.settings-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; } .settings-row:last-child { border-bottom: 0; }
.settings-row .t { font-weight: 600; } .settings-row .help { margin-top: 2px; }
.report-card { display: flex; flex-direction: column; gap: 6px; } .report-card .actions { margin-top: auto; justify-content: flex-start; }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; max-width: 90vw; font-weight: 550; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
#toast.show { opacity: 1; transform: translate(-50%, 0); } #toast.error { background: var(--rose-t); }

dialog.modal { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); color: var(--text); background: var(--surface); }
dialog.modal.wide { width: min(760px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(29, 31, 35, .4); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; } .modal-head h2 { font-size: 16px; }
.modal-body { padding: 18px; }

/* ---------- print doc ---------- */
.print-only { display: none; }
.print-doc { background: var(--surface); }
.print-doc h2 { font-size: 15px; margin: 22px 0 8px; } .print-doc table { font-size: 12px; } .print-doc th, .print-doc td { padding: 5px 8px; }
.print-doc .doc-head { border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 14px; }
.print-doc .doc-head h1 { font-size: 22px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .g-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g-main { grid-template-columns: minmax(0, 1fr); } .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .app { display: block; }
  .sidebar { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .topbar .brand { padding: 0; }
  .main { padding: 18px 14px 96px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 550; color: var(--muted); text-decoration: none; background: none; border: 0; padding: 4px 0; cursor: pointer; }
  .tabbar svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current=page] { color: var(--text); }
  .sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-radius: 18px 18px 0 0; padding: 14px 14px calc(76px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .2); }
  .sheet:not([hidden]) { display: grid; gap: 4px; }
  .sheet a { display: flex; gap: 12px; padding: 12px; border-radius: 10px; text-decoration: none; font-weight: 550; align-items: center; } .sheet a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; }
  .sheet a:active, .sheet a[aria-current=page] { background: var(--soft); }
  .g-kpi, .g-2, .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-kpi .kpi.par { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 21px; }
  .card { padding: 14px; } .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .bar-row { grid-template-columns: 96px minmax(0, 1fr); } .bar-row .bar-val { grid-column: 1 / -1; margin-top: -6px; }
  .alloc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .countdown .big { font-size: 38px; }
  dialog.modal { margin: auto auto 0; width: 100vw; max-width: 100vw; border-radius: 18px 18px 0 0; max-height: 92vh; }
}
@media (max-width: 420px) { .g-kpi { gap: 10px; } .kpi .value { font-size: 18px; } .kpi.par .value { font-size: 30px; } }

/* ---------- print ---------- */
@page { size: A4; margin: 20mm 14mm 18mm; @bottom-right { content: 'Page ' counter(page) ' of ' counter(pages); font: 9pt 'Hanken Grotesk', sans-serif; color: #666; } @bottom-left { content: 'KitaAgad Office'; font: 9pt 'Hanken Grotesk', sans-serif; color: #999; } }
@media print {
  body { background: #fff; font-size: 11pt; }
  .sidebar, .topbar, .tabbar, .sheet, .no-print, #toast, dialog { display: none !important; }
  .app { display: block; } .main { padding: 0; max-width: none; }
  .print-only { display: block; }
  .print-run { position: fixed; top: -14mm; left: 0; right: 0; display: flex; justify-content: space-between; font-size: 9pt; color: #555; border-bottom: 1px solid #bbb; padding-bottom: 3px; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .print-doc h2 { break-after: avoid; } .print-doc section { break-before: page; } .print-doc section.first { break-before: auto; }
  tr { break-inside: avoid; } thead { display: table-header-group; }
  th { position: static; }
  .table-wrap, .table-wrap.tall { overflow: visible; max-height: none; margin: 0; padding: 0; }
  .pill { border: 1px solid #ccc; background: #fff !important; color: #000 !important; }
}

/* =====================================================================
   KitaAgad Office additions
   ===================================================================== */
.rose-t { color: var(--rose-t); } .mint-t { color: var(--mint-t); } .butter-t { color: var(--butter-t); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.nav a { position: relative; }
.nav a .nav-t { display: grid; line-height: 1.2; flex: 1; min-width: 0; }
.nav a .nav-t small { font-size: 11px; font-weight: 450; color: var(--faint); margin-top: 1px; }
.nav a[aria-current=page] .nav-t small { color: rgba(255, 255, 255, .62); }
.nav-lock svg, svg.lock { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .6; }
.nav a .nav-lock { margin-left: auto; display: inline-flex; } .nav a .nav-lock svg { opacity: .55; }
.btn svg.lock { width: 13px; height: 13px; margin-left: 2px; }
.sheet a .nav-t { display: grid; flex: 1; } .sheet a .nav-t small { display: none; }
.sheet a .nav-lock { margin-left: auto; display: inline-flex; }
.brand-mark { background: linear-gradient(145deg, #2a2d33, #14161a); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 3px 8px rgba(20, 22, 26, .25); }
.branch-wrap { padding: 4px 10px 12px; } .branch-wrap label { display: grid; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.branch-wrap select { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--text); min-height: 34px; }
.branch-wrap.mobile { display: none; }
.honesty { padding: 14px 32px 22px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); background: var(--bg); max-width: 1280px; width: 100%; }
.honesty .faint { margin-left: 8px; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 26px 28px 22px; margin-bottom: 16px; border-color: #dfe6df;
  background: radial-gradient(900px 260px at 100% 0%, rgba(109, 197, 144, .28), transparent 62%), radial-gradient(520px 220px at 0% 110%, rgba(232, 195, 79, .20), transparent 60%), linear-gradient(135deg, #ffffff 0%, #f4f8f3 55%, #eef4ee 100%);
  box-shadow: 0 1px 2px rgba(29, 31, 35, .06), 0 10px 30px rgba(40, 70, 50, .08); }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; border: 1px solid rgba(23, 96, 58, .12); box-shadow: 0 0 0 26px rgba(23, 96, 58, .03), 0 0 0 52px rgba(23, 96, 58, .02); pointer-events: none; }
.hero-k { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mint-t); }
.hero-v { font-size: 52px; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.hero-v.neg { color: var(--rose-t); }
.hero-x { margin: 0; color: var(--ink-2); max-width: 640px; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.tile { position: relative; background: linear-gradient(180deg, #fff, #fcfcfa); text-decoration: none; transition: transform .12s, box-shadow .12s; }
a.tile:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(29, 31, 35, .06), 0 10px 22px rgba(29, 31, 35, .08); }
.tile::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--line-2); }
.tile.cash::before { background: var(--bar-mint); } .tile.recv::before { background: var(--bar-butter); } .tile.pay::before { background: var(--bar-peach); }
.tile.late::before { background: var(--bar-rose); } .tile.soon::before { background: var(--bar-butter); }
.g-kpi4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.g-accts { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin-bottom: 16px; }
.g-split { grid-template-columns: minmax(0, 1fr); align-items: start; margin-top: 16px; }
.g-split .list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.row-link { white-space: nowrap; }
table.stk td[data-l="Status"] { white-space: nowrap; }
.acct { text-align: left; display: flex; flex-direction: column; gap: 3px; cursor: pointer; padding: 14px 16px; background: linear-gradient(180deg, #fff, #fcfcfa); }
.acct:hover { border-color: var(--line-2); } .acct.sel { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--shadow); }
.acct .label { color: var(--muted); font-size: 12px; font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.acct .value { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.acct .meta { color: var(--muted); font-size: 12px; }
.acct.total { background: linear-gradient(135deg, #2a2d33, #1a1c20); border-color: #1a1c20; color: #fff; cursor: default; }
.acct.total .label, .acct.total .meta { color: rgba(255, 255, 255, .7); }

.agenda .list-row { text-align: left; gap: 12px; }
.ag { align-items: center; padding: 10px 6px; border-radius: 8px; }
.ag .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--line-2); }
.dot.red { background: var(--bar-rose); box-shadow: 0 0 0 4px var(--rose); } .dot.amber { background: var(--bar-butter); box-shadow: 0 0 0 4px var(--butter); } .dot.grey { background: #b9bcc2; box-shadow: 0 0 0 4px var(--grey); }
.ag-main { flex: 1; min-width: 0; } .ag-side { text-align: right; flex: none; }
.big-kv dd { font-size: 16px; } .big-kv { gap: 8px 16px; }
.xs-list { display: grid; gap: 8px; }
.xs { display: grid; gap: 1px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: linear-gradient(180deg, #fff, #f9f9f6); }
.xs:hover { border-color: var(--line-2); background: var(--soft); } .xs span { color: var(--muted); font-size: 12px; }
.note-pay { margin-top: 16px; background: var(--soft); box-shadow: none; }
.note-pay a { font-weight: 600; }

.aging-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ag-b { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; background: linear-gradient(180deg, #fff, #fbfbf9); }
.ag-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.ag-val { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.as-btn { background: none; border: 0; border-bottom: 1px solid var(--line); width: 100%; cursor: pointer; text-align: left; font: inherit; }
.as-btn:hover { background: #fafaf8; }
.msg-box { margin: 0; white-space: pre-wrap; word-break: break-word; font: inherit; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
tr.void td { opacity: .55; } tr.void td .btn { opacity: 1; }
tr.hl td { background: var(--butter) !important; transition: background .6s; }
tr.soon td:first-child { box-shadow: inset 3px 0 var(--bar-butter); }
tr.neg-row td { background: #fff6f7; }
textarea[readonly] { background: var(--soft); }
.inline-l { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.upgrade { text-align: center; padding: 34px 20px; background: linear-gradient(180deg, #fff, #f6f6f2); border-style: dashed; border-color: var(--line-2); }
.upgrade h2 { font-size: 17px; margin: 10px auto 6px; max-width: 520px; } .upgrade p { margin: 0 auto; max-width: 480px; }
.lock-badge { width: 44px; height: 44px; border-radius: 14px; margin: 0 auto; display: grid; place-items: center; background: var(--butter); color: var(--butter-t); box-shadow: 0 2px 6px rgba(117, 86, 10, .15); }
.lock-badge svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.banner.warn-neg { background: var(--rose); color: var(--rose-t); font-weight: 600; } .banner.ok-pos { background: var(--mint); color: var(--mint-t); font-weight: 600; }
.trend-svg { width: 100%; height: auto; display: block; }
.csv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.csv-item { display: grid; gap: 6px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, #fff, #fafaf8); }
.tier-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tier-opt { text-align: left; display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); cursor: pointer; }
.tier-opt span { color: var(--muted); } .tier-opt:hover { background: var(--soft); }
.tier-opt.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: linear-gradient(180deg, #fff, #f1f1ed); }
.id-list { display: grid; } .id-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); } .id-row:last-child { border-bottom: 0; } .id-row > span { color: var(--muted); }

/* statement of account */
.statement { padding: 26px 28px; }
.statement .doc-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.statement .doc-title { text-align: right; } .statement .doc-title b { letter-spacing: .08em; font-size: 14px; }
.statement .doc-to { margin: 4px 0 16px; } .statement .doc-to b { font-size: 17px; display: block; }
.stmt-sum { display: flex; gap: 32px; margin: 18px 0 6px; flex-wrap: wrap; } .stmt-sum div { display: grid; } .stmt-sum b { font-size: 22px; }
.statement .fine { margin: 22px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) { .aging-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g-split { grid-template-columns: minmax(0, 1fr); } .g-kpi4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero-v { font-size: 44px; } }
@media (max-width: 760px) {
  .col { display: block; min-height: 0; }
  .branch-wrap.mobile:not([hidden]) { display: block; padding: 8px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .branch-wrap.mobile label { display: flex; align-items: center; gap: 10px; } .branch-wrap.mobile select { flex: 1; }
  .honesty { padding: 14px 14px 100px; }
  .main { padding-bottom: 20px; }
  .hero { padding: 20px 18px 16px; } .hero-v { font-size: 38px; }
  .tiles, .tier-switch, .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .list-row { flex-wrap: wrap; }
  .kv dd { word-break: break-word; }
  .g-accts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-accts .acct.total { grid-column: 1 / -1; }
  .g-kpi4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aging-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ag-b:last-child { grid-column: 1 / -1; }
  .g-split .list { grid-template-columns: minmax(0, 1fr); }
  .statement { padding: 16px 14px; } .statement .doc-title { text-align: left; }
  .ag-side { max-width: 38%; }
  /* tables become stacked cards */
  table.stk thead { display: none; }
  table.stk, table.stk tbody, table.stk tr, table.stk td, table.stk tfoot { display: block; width: 100%; }
  table.stk tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; background: var(--surface); box-shadow: var(--shadow); }
  table.stk tr.click:hover td { background: transparent; }
  table.stk td { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; border: 0; padding: 5px 0; text-align: right; }
  table.stk td::before { content: attr(data-l); color: var(--muted); font-size: 12px; font-weight: 500; text-align: left; flex: none; }
  table.stk td:not([data-l])::before { content: none; }
  table.stk td:first-child, table.stk td[data-l="Details"] { display: block; text-align: left; }
  table.stk td:first-child::before, table.stk td[data-l="Details"]::before { content: none; }
  table.stk td[data-l="Details"] { padding-bottom: 6px; }
  table.stk td.act { justify-content: flex-end; flex-wrap: wrap; padding-top: 8px; }
  table.stk td > div.cell-sub { text-align: right; }
  table.stk td[colspan] { display: block; text-align: center; }
  .table-wrap:has(table.stk) { overflow: visible; margin: 0; padding: 0; }
}
@media print {
  .honesty, .branch-wrap { display: none !important; }
  .statement { padding: 0; } .statement .doc-title { text-align: right; }
  .pill.mint, .pill.rose, .pill.butter, .pill.peach { background: #fff !important; }
}

/* brand-mark v2 */
.brand-mark { width: 36px; height: 36px; background: none !important; box-shadow: none !important; border-radius: 0; padding: 0; flex: none; }
.brand-mark svg { width: 100%; height: 100%; display: block; }

/* fluid width v2 */
.main { max-width: none; }
@media (min-width: 1700px) { .main { padding-left: 44px; padding-right: 44px; } }
