/* Finance System — corporate finance UI */
:root {
  --navy: #0b2545; --navy-2: #13315c; --navy-3: #1d4473;
  --accent: #0e7c66; --accent-soft: #e6f4f0;
  --blue: #1e5bb8; --blue-soft: #eaf1fb;
  --bg: #f3f5f8; --surface: #ffffff; --surface-2: #f8fafc;
  --line: #e2e7ee; --line-2: #cfd7e2;
  --text: #0f1b2d; --muted: #5a6577; --faint: #8a94a5;
  --ok: #067647; --ok-soft: #e7f6ee;
  --warn: #9a4b00; --warn-soft: #fff4e5;
  --danger: #b42318; --danger-soft: #fdecea;
  --violet: #5b3cc4; --violet-soft: #f1edfd;
  --slate-soft: #eef1f5;
  --radius: 10px; --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 1px 3px rgba(15, 27, 45, .06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0 0 .75em; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.sr-only { 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: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #c9d5e6; display: flex; flex-direction: column; position: sticky; top: 0;
  height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #1aa086, #0e7c66);
  display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 18px; height: 18px; }
.brand b { display: block; font-size: 14px; }
.brand span { display: block; font-size: 11.5px; color: #8fa3bf; }
.nav { padding: 6px 10px 16px; flex: 1; }
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #6f86a6; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; color: #c9d5e6; padding: 8px 10px; border-radius: 7px; font-weight: 500; }
.nav a:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
.nav a.active { background: var(--navy-3); color: #fff; box-shadow: inset 3px 0 0 #2fc4a3; }
.nav svg { width: 17px; height: 17px; flex: none; opacity: .9; }
.nav .count { margin-left: auto; background: #2fc4a3; color: var(--navy); font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 0 7px; line-height: 18px; }
.sidebar-foot { padding: 12px 18px 18px; border-top: 1px solid #1c3a63; font-size: 12px; color: #8fa3bf; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: var(--surface);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.user-chip .who { line-height: 1.2; }
.user-chip .who small { display: block; color: var(--muted); font-size: 11.5px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  color: var(--muted); border: 1px solid var(--line); background: var(--surface); }
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff; font-size: 10px;
  font-weight: 700; min-width: 17px; height: 17px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }
.content { padding: 24px 28px 48px; max-width: 1360px; width: 100%; }
.menu-toggle { display: none; }
.menu-btn { display: none; }
.menu-scrim { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--line); }
.card-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.card-body { padding: 16px 18px; }
.card + .card, .stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.grid-dash { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow); min-width: 0; }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 550; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 22px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .value small { font-size: 12px; color: var(--muted); font-weight: 600; margin-right: 3px; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.kpi.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.kpi.primary .label, .kpi.primary .sub, .kpi.primary .value small { color: #a9bbd3; }
.kpi .pip { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.2px; }
table.data th { text-align: left; font-weight: 600; font-size: 11.5px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; background: var(--surface-2); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tbody tr:hover { background: #fafcff; }
table.data tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--line-2); }
table.data .ref { font-weight: 600; white-space: nowrap; }
table.data td.desc { max-width: 340px; }
table.kv { width: 100%; border-collapse: collapse; }
table.kv th { text-align: left; font-weight: 500; color: var(--muted); padding: 7px 12px 7px 0; width: 42%; vertical-align: top; font-size: 13px; }
table.kv td { padding: 7px 0; font-weight: 550; }
table.kv tr + tr th, table.kv tr + tr td { border-top: 1px dashed var(--line); }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
  font-weight: 650; white-space: nowrap; background: var(--slate-soft); color: #44516a; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.returned, .badge.info_requested { background: var(--violet-soft); color: var(--violet); }
.badge.approved, .badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.rejected, .badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.cancelled, .badge.waiting { background: var(--slate-soft); color: #5a6577; }
.badge.confirmed { background: var(--ok-soft); color: var(--ok); }
.badge.disputed { background: var(--danger-soft); color: var(--danger); }
.badge.reversed { background: var(--blue-soft); color: var(--blue); }
.badge.plain::before { display: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent;
  border-radius: var(--radius-sm); padding: 8px 14px; font: 600 13.5px/1.2 var(--font); cursor: pointer; white-space: nowrap;
  text-decoration: none !important; transition: background .12s, border-color .12s; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-3); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #0b6a57; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #962015; }
.btn-ghost { background: transparent; color: var(--blue); padding-left: 8px; padding-right: 8px; }
.btn-ghost:hover { background: var(--blue-soft); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* forms */
form .row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
form .row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field label, .label { font-size: 12.8px; font-weight: 600; color: #26344a; }
.field .hint { font-size: 12px; color: var(--muted); }
.field .error { font-size: 12.3px; color: var(--danger); font-weight: 550; }
.req { color: var(--danger); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search],
select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 8px 10px; min-height: 38px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible {
  outline: 3px solid rgba(30, 91, 184, .25); outline-offset: 0; border-color: var(--blue); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
input.amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.check { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--navy); }
.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; }
.segmented label { padding: 7px 12px; font-weight: 600; font-size: 12.8px; cursor: pointer; color: var(--muted); background: #fff; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + span { color: var(--navy); }
.segmented label:has(input:checked) { background: var(--blue-soft); color: var(--navy); }
.segmented label + label { border-left: 1px solid var(--line-2); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 6px; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filters .field { margin: 0; min-width: 140px; flex: 1 1 140px; }
.filters .field.wide { flex: 2 1 220px; }

/* calculator panel */
.calc { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.calc .line { display: flex; justify-content: space-between; padding: 5px 0; font-variant-numeric: tabular-nums; }
.calc .line + .line { border-top: 1px dashed var(--line-2); }
.calc .total { font-size: 18px; font-weight: 750; color: var(--navy); }
.calc .note { font-size: 11.8px; color: var(--muted); margin-top: 8px; }

/* alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 14px;
  border: 1px solid; font-weight: 500; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert.success { background: var(--ok-soft); border-color: #b7e2c8; color: #05512f; }
.alert.error { background: var(--danger-soft); border-color: #f5c2bc; color: #8a1b12; }
.alert.warn { background: var(--warn-soft); border-color: #f6d3a6; color: #7a3b00; }
.alert.info { background: var(--blue-soft); border-color: #c8d9f3; color: #183f7d; }
.alert b { font-weight: 700; }

/* approval timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 30px; }
.timeline li::before { content: ""; position: absolute; left: 9px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .node { position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; display: grid;
  place-items: center; background: var(--slate-soft); color: #5a6577; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.timeline .node svg { width: 12px; height: 12px; }
.timeline .approved .node { background: var(--ok); color: #fff; }
.timeline .rejected .node { background: var(--danger); color: #fff; }
.timeline .returned .node { background: var(--violet); color: #fff; }
.timeline .pending .node { background: var(--warn); color: #fff; }
.timeline .title { font-weight: 650; }
.timeline .meta { font-size: 12px; color: var(--muted); }
.timeline .comment { margin-top: 5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px;
  padding: 7px 10px; font-size: 13px; white-space: pre-wrap; }
.history { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.history li { padding: 8px 0; border-top: 1px solid var(--line); }
.history li:first-child { border-top: 0; }

/* documents */
.docs { list-style: none; margin: 0; padding: 0; }
.docs li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.docs li:first-child { border-top: 0; }
.doc-icon { width: 38px; height: 44px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); display: grid;
  place-items: center; font-size: 10px; font-weight: 800; flex: none; }
.doc-icon.pdf { background: var(--danger-soft); color: var(--danger); }
.docs .info { min-width: 0; flex: 1; }
.docs .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs li.voided .name { text-decoration: line-through; color: var(--faint); }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 16px; background: var(--surface-2); }
.dropzone.drag { border-color: var(--blue); background: var(--blue-soft); }
.file-rows { margin-top: 10px; display: grid; gap: 8px; }
.file-row { display: grid; grid-template-columns: 1fr 180px; gap: 8px; align-items: center; font-size: 13px; }
.file-row .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.preview-frame { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: var(--radius); background: #525659; }
.preview-img { max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: block; margin: 0 auto; }

/* charts */
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--faint); font-size: 10.5px; }
.chart .bar { fill: #9fb6d6; }
.chart .bar-gst { fill: var(--navy); }
.chart .bar-label { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.legend .l1 { background: #9fb6d6; } .legend .l2 { background: var(--navy); }
.hbars { list-style: none; margin: 0; padding: 0; }
.hbars li { padding: 7px 0; }
.hbars .top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.hbars svg { width: 100%; height: 8px; display: block; margin-top: 5px; }
.hbars .track { fill: var(--slate-soft); }
.hbars .fill { fill: var(--accent); }
.fund-list { list-style: none; margin: 0; padding: 0; }
.fund-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.fund-list li:first-child { border-top: 0; }
.meter { width: 100%; height: 6px; display: block; margin-top: 6px; }
.meter .track { fill: var(--slate-soft); } .meter .fill { fill: var(--accent); } .meter .fill.low { fill: var(--danger); }

/* auth pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); }
.auth-side { background: radial-gradient(1200px 600px at -10% -10%, #1d4473 0%, var(--navy) 55%); color: #d7e1ef; padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { color: #fff; font-size: 28px; line-height: 1.2; margin: 22px 0 12px; max-width: 420px; }
.auth-side ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; max-width: 420px; }
.auth-side li { display: flex; gap: 10px; align-items: flex-start; }
.auth-side li svg { width: 18px; height: 18px; color: #2fc4a3; flex: none; margin-top: 2px; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 22px; }
.qr { display: block; width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 10px; margin: 10px auto; }
.secret { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px;
  text-align: center; letter-spacing: .06em; word-break: break-all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-family: var(--mono); font-size: 15px; margin: 14px 0; }
.codes span { background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 8px; text-align: center; }

/* dialog */
dialog.confirm { border: 0; border-radius: 12px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(15,27,45,.3); }
dialog.confirm::backdrop { background: rgba(11, 37, 69, .45); }
dialog.confirm .dlg-body { padding: 20px 22px 8px; }
dialog.confirm .dlg-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 22px 18px; }

.pagination { display: flex; gap: 6px; justify-content: flex-end; align-items: center; padding: 12px 18px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; }
.tabs a { padding: 11px 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--navy); border-color: var(--navy); }
.tabs a:hover { text-decoration: none; color: var(--navy); }
.perm-group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; }
.perm-group h3 { margin-bottom: 8px; }
.perm-group .check { margin-bottom: 6px; }
.perm-group code { font-size: 11.5px; color: var(--faint); }
.summary-strip { display: flex; flex-wrap: wrap; gap: 24px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.summary-strip div { font-size: 12px; color: var(--muted); }
.summary-strip b { display: block; font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.report-meta { font-size: 12.5px; color: var(--muted); padding: 10px 18px; border-bottom: 1px solid var(--line); }
.inline-form { display: inline; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.error-page .code { font-size: 54px; font-weight: 800; color: var(--navy); }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main, .grid-dash { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; }
  .menu-toggle:checked ~ .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(11, 37, 69, .45); }
  .menu-btn { display: inline-grid; }
  .menu-toggle:checked ~ .menu-scrim { display: block; position: fixed; inset: 0; z-index: 45; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px 40px; }
  .grid-2, .grid-3, form .row, form .row.three { grid-template-columns: 1fr; }
  .user-chip .who { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .file-row { grid-template-columns: 1fr; }
  h1 { font-size: 19px; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; }
  .kpi.primary { grid-column: 1 / -1; }
  .kpi .value { font-size: 17px; }
  .kpi .value small { display: block; font-size: 11px; }
  .kpi .sub { font-size: 11.5px; }
  .page-head .actions .btn { flex: 1; }
}
@media print {
  .sidebar, .topbar, .no-print, .filters, .pagination, .form-actions { display: none !important; }
  .shell { display: block; } .content { padding: 0; max-width: none; } body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}

.text-danger { color: var(--danger); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.route { margin: 0; padding-left: 20px; font-size: 13px; }
.route li { padding: 6px 0; }
.badge.submitted { background: var(--warn-soft); color: var(--warn); }
.badge.verified { background: var(--ok-soft); color: var(--ok); }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi.good { border-color: #b7e3cb; background: var(--ok-soft); }
.kpi.bad { border-color: #f4c3bd; background: var(--danger-soft); }
.kpi.bad .value { color: var(--danger); }
.kpi.warnk { border-color: #f3d9b1; background: var(--warn-soft); }
table.cashcount input.qty { width: 110px; text-align: right; margin-left: auto; }
table.cashcount tr.sep td { padding: 0; border-bottom: 2px solid var(--line-2); }
table.cashcount tr.has-error input { border-color: var(--danger); }
table.cashcount tr.zero td { color: var(--faint); }
table.cashcount tr.grand td { font-size: 15px; background: var(--accent-soft); }
.total-box { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--navy); color: #fff; }
.total-box b { font-size: 20px; font-variant-numeric: tabular-nums; }
.total-box small { color: #a9bbd3; font-size: 12px; }
.setup { border-color: #c9d8ee; background: var(--blue-soft); }
.setup-list { margin: 0; padding-left: 20px; }
.setup-list li { padding: 5px 0; }
.route li.skipped b { color: var(--muted); text-decoration: line-through; }
.round-label { margin: 4px 0 8px; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
.pip-accent { background: var(--accent); }
.split { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.grid-dash { align-items: start; }
@media (min-width: 881px) { .shell { background: linear-gradient(to right, var(--navy) 248px, transparent 248px); } }
.crumbs svg { width: 14px; height: 14px; vertical-align: -2px; }
.empty svg { width: 30px; height: 30px; color: var(--ok); margin-bottom: 6px; }
.calc .line { gap: 12px; align-items: baseline; }
.install { max-width: 880px; margin: 0 auto; }
.install-head { margin: 8px 0 18px; }
.install-head h1 { font-size: 26px; }
@media (max-width: 880px) { .kpis.kpis-3 { grid-template-columns: 1fr; } table.cashcount input.qty { width: 84px; } }
table.data th.num { text-align: right; }
@media (max-width: 520px) { table.cashcount td, table.cashcount th { padding-left: 8px; padding-right: 8px; } }
.grid > *, .stack > * { min-width: 0; }
.error-detail { text-align: left; max-width: 720px; margin-left: auto; margin-right: auto; overflow-wrap: anywhere; }

/* invoice handovers */
.pt0 { padding-top: 0 !important; }
form[data-handover] .segmented label { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; font-size: 13.5px; }
form[data-handover] .segmented label { white-space: nowrap; }
form[data-handover] .segmented svg { width: 18px; height: 18px; flex: none; }
.segmented.has-error { border-color: var(--danger); }
#ho-diff.ok { color: var(--ok); } #ho-diff.bad { color: var(--danger); font-weight: 600; }
.card.decision { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
