:root {
  --ground: #F2F3EF;
  --panel: #FFFFFF;
  --panel-2: #F7F8F5;
  --line: #DADDD4;
  --line-soft: #E8EAE4;
  --ink: #18221C;
  --ink-2: #4B5850;
  --ink-3: #7B887F;
  --brand: #1F4D36;
  --brand-hover: #173D2A;
  --brand-on: #FFFFFF;
  --brand-soft: #E2ECE5;
  --rail: #1F4D36;
  --rail-ink: #D9E6DD;
  --rail-dim: #8FB09B;
  --rail-active: rgba(255, 255, 255, 0.10);
  --citrine: #D69E12;
  --citrine-soft: #FAF0D2;
  --citrine-ink: #775804;
  --ok: #2E7D4F;
  --ok-soft: #E0EFE5;
  --warn: #A86B12;
  --warn-soft: #FBEEDA;
  --bad: #B2413A;
  --bad-soft: #F7E2E0;
  --leave: #34688C;
  --leave-soft: #E0EBF3;
  --off: #9AA39D;
  --off-soft: #ECEEEA;
  --focus: #D69E12;
  --r: 4px;
  --sans: 'Schibsted Grotesk', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #101512; --panel: #171E1A; --panel-2: #1C2520; --line: #2B3630; --line-soft: #222B26;
    --ink: #E2E9E4; --ink-2: #A6B4AB; --ink-3: #72817A;
    --brand: #5FB184; --brand-hover: #74C296; --brand-on: #0C1A11; --brand-soft: #18291F;
    --rail: #0B110D; --rail-ink: #CFDDD4; --rail-dim: #6F8A7A; --rail-active: rgba(255, 255, 255, 0.06);
    --citrine: #E5B43C; --citrine-soft: #2C2410; --citrine-ink: #EFCB6E;
    --ok: #62B587; --ok-soft: #15281C; --warn: #E0A548; --warn-soft: #2B2111;
    --bad: #E27870; --bad-soft: #2E1715; --leave: #82B3D6; --leave-soft: #15232D;
    --off: #6A756F; --off-soft: #202824; --focus: #E5B43C;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
a { color: var(--brand); }

/* ── Shell ── */
.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.rail {
  background: var(--rail); color: var(--rail-ink);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 20px 12px;
}
.mark { padding: 0 10px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 14px; }
.mark b { display: block; font-size: 16px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.mark small { color: var(--rail-dim); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--rail-dim); padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: var(--rail-ink); text-decoration: none; padding: 7px 10px; border-radius: var(--r); font-weight: 500;
}
.nav a:hover { background: var(--rail-active); color: #fff; }
.nav a[aria-current="page"] { background: var(--rail-active); color: #fff; box-shadow: inset 2px 0 0 var(--citrine); }
.pill-count { font-family: var(--mono); font-size: 11px; background: var(--citrine); color: #2A1E00; border-radius: 3px; padding: 0 5px; }
.rail-foot { margin-top: auto; padding: 12px 10px 0; font-size: 12.5px; border-top: 1px solid rgba(255, 255, 255, 0.08); display: grid; gap: 2px; }
.rail-foot b { color: #fff; font-weight: 600; }
.rail-foot span { color: var(--rail-dim); font-size: 12px; }
.rail-foot .links { display: flex; gap: 12px; margin-top: 6px; }
.rail-foot a, .rail-foot button { color: var(--rail-ink); background: none; border: 0; padding: 0; cursor: pointer; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.3); }

.main { min-width: 0; padding: 26px 32px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; font-weight: 700; }
.page-head p { margin: 2px 0 0; color: var(--ink-2); }
.head-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.loading { color: var(--ink-3); padding: 40px 0; }

.notice { border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--r); padding: 10px 14px; color: var(--ink-2); margin-bottom: 18px; }
.notice.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.notice.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }

/* ── Controls ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); border-radius: var(--r); padding: 6px 12px;
  font-weight: 500; cursor: pointer; white-space: nowrap; line-height: 1.4; text-decoration: none;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.small { padding: 3px 9px; font-size: 12.5px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { color: var(--ink); background: var(--panel-2); }
.btn.danger { color: var(--bad); }
.btn.danger-fill { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.stepper button { border: 0; background: none; padding: 6px 10px; cursor: pointer; color: var(--ink-2); }
.stepper button:hover { color: var(--ink); }
.stepper span { padding: 0 6px; font-weight: 600; min-width: 64px; text-align: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 3px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }

label.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); padding: 6px 9px; min-width: 0; width: 100%;
}
textarea { resize: vertical; min-height: 60px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.hint { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.form-error { color: var(--bad); font-size: 13px; margin: 10px 0 0; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); }

/* ── Sections / tables ── */
.section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.section-head h2 { font-size: 14.5px; font-weight: 600; }
.section-head .sub { font-size: 12.5px; color: var(--ink-3); }
.section-body { padding: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel-2); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
.who b { font-weight: 600; display: block; }
.who small { color: var(--ink-3); font-size: 12px; }
.empty { padding: 28px 16px; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink-2); font-weight: 600; margin-bottom: 2px; }

.chip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 3px; white-space: nowrap; }
.chip.pending { background: var(--warn-soft); color: var(--warn); }
.chip.approved { background: var(--ok-soft); color: var(--ok); }
.chip.declined, .chip.cancelled, .chip.muted { background: var(--off-soft); color: var(--ink-3); }
.chip.hol { background: var(--citrine-soft); color: var(--citrine-ink); }
.chip.leave { background: var(--leave-soft); color: var(--leave); }
.chip.role-admin { background: var(--brand-soft); color: var(--brand); }
.chip.role-supervisor { background: var(--leave-soft); color: var(--leave); }
.chip.role-staff { background: var(--off-soft); color: var(--ink-2); }

/* ── Figures strip ── */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 20px; }
.fig { padding: 14px 18px; border-left: 1px solid var(--line-soft); min-width: 0; }
.fig:first-child { border-left: 0; }
.fig .k { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.fig .v { font-family: var(--mono); font-size: 26px; font-weight: 500; line-height: 1.2; margin-top: 2px; }
.fig .v small { font-size: 13px; color: var(--ink-3); }
.fig .d { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.cols > .section { margin-bottom: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 160px; }
.date-tag { font-family: var(--mono); font-size: 12px; color: var(--ink-2); white-space: nowrap; }

.year-strip { display: grid; grid-template-columns: repeat(6, 1fr); }
.year-strip > div { padding: 12px 16px; border-left: 1px solid var(--line-soft); }
.year-strip > div:first-child { border-left: 0; }
.year-strip .k { font-size: 12px; color: var(--ink-3); }
.year-strip .v { font-family: var(--mono); font-size: 20px; }
.year-bar { height: 6px; background: var(--line-soft); margin: 0 16px 14px; border-radius: 3px; overflow: hidden; }
.year-bar i { display: block; height: 100%; background: var(--brand); }

/* ── Attendance ── */
.reg-status { display: inline-flex; gap: 2px; }
.reg-status button {
  border: 1px solid var(--line); background: var(--panel); border-radius: 3px; min-width: 34px; padding: 3px 6px;
  font-family: var(--mono); font-size: 12px; cursor: pointer; color: var(--ink-3);
}
.reg-status button:hover { border-color: var(--ink-3); color: var(--ink); }
.reg-status button:disabled { cursor: not-allowed; opacity: 0.6; }
.reg-status button[aria-pressed="true"].P { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.reg-status button[aria-pressed="true"].L { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.reg-status button[aria-pressed="true"].A { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.reg-status button[aria-pressed="true"].O { background: var(--off-soft); border-color: var(--off); color: var(--ink-2); }
.reg-time { width: 100px !important; font-family: var(--mono); font-size: 12.5px; padding: 4px 6px !important; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.grid-month td, .grid-month th { padding: 0; text-align: center; border-bottom: 1px solid var(--line-soft); }
.grid-month th { padding: 6px 0; font-size: 10.5px; letter-spacing: 0; min-width: 24px; }
.grid-month th.name, .grid-month td.name { text-align: left; padding: 6px 12px; position: sticky; left: 0; background: var(--panel); z-index: 1; min-width: 170px; white-space: nowrap; }
.grid-month th.name { background: var(--panel-2); }
.grid-month td.cell { font-family: var(--mono); font-size: 11px; height: 30px; min-width: 24px; border-left: 1px solid var(--line-soft); }
.grid-month th.tot { padding: 6px 8px; text-align: right; }
.cell.P { background: var(--ok-soft); color: var(--ok); }
.cell.L { background: var(--warn-soft); color: var(--warn); }
.cell.A { background: var(--bad-soft); color: var(--bad); }
.cell.O { background: var(--off-soft); color: var(--ink-3); }
.cell.LV { background: var(--leave-soft); color: var(--leave); }
.cell.PH { background: var(--citrine-soft); color: var(--citrine-ink); }
.cell.WE { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--line-soft) 4px 5px); }
.grid-month td.tot { font-family: var(--mono); font-size: 12px; padding: 0 8px; border-left: 1px solid var(--line); text-align: right; }
.grid-month th.today { color: var(--citrine-ink); background: var(--citrine-soft); }

/* ── Balances ── */
.bal-remaining { font-weight: 600; }
.bal-remaining.low { color: var(--warn); }
.bal-remaining.neg { color: var(--bad); }
.meter { height: 5px; background: var(--line-soft); border-radius: 3px; overflow: hidden; width: 90px; display: inline-block; vertical-align: middle; margin-left: 8px; }
.meter i { display: block; height: 100%; background: var(--brand); }
.card-detail > td { background: var(--panel-2); }
.types-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.types-grid > div { border: 1px solid var(--line-soft); background: var(--panel); border-radius: var(--r); padding: 8px 10px; }
.types-grid .k { font-size: 12px; color: var(--ink-3); }
.types-grid .v { font-family: var(--mono); }

/* ── Leave card (paper-form style ledger) ── */
.ledger { display: grid; grid-template-columns: 1fr auto; }
.ledger div { padding: 9px 16px; border-bottom: 1px solid var(--line-soft); }
.ledger div:nth-child(even) { font-family: var(--mono); text-align: right; }
.ledger .total { font-weight: 600; border-bottom: 0; border-top: 1px solid var(--ink-3); }

/* ── Leave form ── */
.calc { border: 1px dashed var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--panel-2); font-size: 13px; color: var(--ink-2); min-height: 44px; }
.calc strong { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.calc .warn { color: var(--warn); display: block; margin-top: 4px; }

/* ── Holidays ── */
.hol-layout { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 20px; align-items: start; }
.hol-layout > .section { margin-bottom: 0; }
.hol-row.past { color: var(--ink-3); }
.hol-row.next td { background: var(--citrine-soft); }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 18px 20px; }
.mcal h3 { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: flex; justify-content: space-between; }
.mcal h3 small { font-weight: 400; color: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.mcal .g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mcal .g span { font-family: var(--mono); font-size: 11px; text-align: center; padding: 3px 0; border-radius: 2px; }
.mcal .g .dow { color: var(--ink-3); font-size: 10px; }
.mcal .g .we { color: var(--ink-3); }
.mcal .g .ph { background: var(--citrine); color: #231A00; font-weight: 500; }
.mcal .g .today { outline: 1.5px solid var(--brand); outline-offset: -1.5px; }

/* ── Readiness ── */
.rd-progress { display: flex; align-items: center; gap: 14px; padding: 12px 16px; flex-wrap: wrap; }
.rd-track { flex: 1; min-width: 120px; height: 8px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
.rd-track i { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.rd-task { display: grid; grid-template-columns: 40px 1fr 150px 116px; gap: 12px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line-soft); }
.rd-task:last-child { border-bottom: 0; }
.rd-task .id { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.rd-task .nm { font-weight: 500; }
.rd-task.done .nm { color: var(--ink-3); text-decoration: line-through; }
.rd-meta { display: flex; gap: 8px; font-size: 12px; color: var(--ink-3); margin-top: 1px; flex-wrap: wrap; }
.rd-meta .pri-high { color: var(--bad); }
.rd-meta .pri-medium { color: var(--warn); }
.rd-meta .overdue { color: var(--bad); font-weight: 600; }
.rd-meta .soon { color: var(--warn); font-weight: 600; }
.rd-owner { font-size: 12.5px; padding: 4px 8px !important; }
.rd-status { border: 1px solid var(--line); background: var(--panel); border-radius: 3px; padding: 4px 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--ink-3); }
.rd-status:disabled { cursor: default; }
.rd-status.in_progress { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.rd-status.complete { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }

/* ── Dialog ── */
.overlay { position: fixed; inset: 0; background: rgba(8, 14, 10, 0.45); display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px 16px; z-index: 50; overflow-y: auto; }
.dialog { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; width: 100%; max-width: 640px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
.dialog .section-head h2 { font-size: 16px; }
.dialog.small { max-width: 440px; }

.toast { position: fixed; right: 20px; bottom: 20px; background: var(--ink); color: var(--ground); padding: 9px 14px; border-radius: var(--r); font-size: 13px; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; pointer-events: none; z-index: 60; max-width: calc(100% - 40px); }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--bad); color: #fff; }

/* ── Sign in ── */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 440px) 1fr; }
.login-side { background: var(--rail); color: var(--rail-ink); padding: 40px; display: flex; flex-direction: column; gap: 28px; }
.login-side .mark { padding: 0; border: 0; margin: 0; }
.login-side .mark b { font-size: 20px; }
.login-today { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 18px; display: grid; gap: 10px; font-size: 13px; }
.login-today div { display: flex; justify-content: space-between; gap: 12px; }
.login-today span { color: var(--rail-dim); }
.login-today b { color: #fff; font-weight: 500; text-align: right; }
.login-main { display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.login-form { width: 100%; max-width: 360px; display: grid; gap: 14px; }
.login-form h1 { font-size: 22px; }
.login-form p { margin: 0; color: var(--ink-2); }
.login-form .btn { justify-content: center; padding: 9px 12px; }

@media (max-width: 1080px) {
  .cols, .hol-layout { grid-template-columns: 1fr; }
  .year-strip { grid-template-columns: repeat(3, 1fr); }
  .year-strip > div:nth-child(4) { border-left: 0; }
  .year-strip > div:nth-child(n+4) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { min-width: 0; }
  .rail { position: sticky; height: auto; padding: 10px 16px 0; z-index: 20; }
  .mark { padding: 0 0 8px; border: 0; margin: 0; display: flex; align-items: baseline; gap: 8px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 2px; padding-bottom: 8px; scrollbar-width: none; }
  .nav-group { display: none; }
  .rail-foot { display: none; }
  .nav a { white-space: nowrap; }
  .nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--citrine); }
  .main { padding: 18px 16px 48px; }
  .figures { grid-template-columns: 1fr 1fr; }
  .fig:nth-child(3) { border-left: 0; }
  .fig:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .rd-task { grid-template-columns: 1fr; gap: 6px; }
  .rd-task .id { display: none; }
  .login { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .login-side { padding: 24px 16px; }
  .login-today { margin-top: 0; }
}
@media (max-width: 480px) {
  .year-strip { grid-template-columns: 1fr 1fr; }
  .year-strip > div { border-left: 0 !important; border-top: 1px solid var(--line-soft); }
  .year-strip > div:nth-child(even) { border-left: 1px solid var(--line-soft) !important; }
  .fig .v { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── Shared across sites ── */
.site-link { color: var(--rail-dim) !important; }
.site-link:hover { color: #fff !important; }
.site-list { display: flex; gap: 8px; flex-wrap: wrap; }
.ledger-text div:nth-child(even) { font-family: var(--sans); }
.chip.role-other { background: var(--leave-soft); color: var(--leave); }
.access-row { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 12px; align-items: end; }
.access-row .hint { padding-bottom: 7px; }
@media (max-width: 560px) { .access-row { grid-template-columns: 1fr; } .access-row .hint { padding: 0; } }

/* ── Property ── */
.owed { color: var(--bad); }
.credit { color: var(--ok); }
.fig .v.money-v { font-size: 18px; line-height: 1.35; padding-top: 4px; }
.v-big { font-family: var(--mono); font-size: 20px; line-height: 1.4; }
.crumb { margin: 0 0 6px; font-size: 13px; }
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a::before { content: '‹ '; }
.crumb a:hover { color: var(--ink); }
table.clickable tbody tr { cursor: pointer; }
table.clickable tbody tr:hover td { background: var(--panel-2); }
td a, .who a { color: inherit; text-decoration: none; }
td a:hover, .who a:hover { color: var(--brand); text-decoration: underline; }
tr.voided td { color: var(--ink-3); }
tr.voided td.num { text-decoration: line-through; }
.chip.prio-urgent { background: var(--bad-soft); color: var(--bad); }
.chip.prio-normal { background: var(--off-soft); color: var(--ink-2); }
.chip.prio-low { background: transparent; color: var(--ink-3); border: 1px solid var(--line); }
.lease-card .section-head { align-items: flex-start; }
.lease-card h2 a { color: inherit; }
.lease-card .sub { margin-top: 2px; }
.lease-sum { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line-soft); }
.lease-sum > div { padding: 10px 16px; border-left: 1px solid var(--line-soft); }
.lease-sum > div:first-child { border-left: 0; }
.lease-sum .k, .ageing .k, .statement-top .k { font-size: 12px; color: var(--ink-3); }
.lease-sum .v { font-family: var(--mono); font-size: 16px; }
.ledger-table td, .ledger-table th { padding: 7px 12px; }
.ledger-table tfoot td { border-top: 1px solid var(--line); border-bottom: 0; }
.ageing { display: grid; grid-template-columns: repeat(5, 1fr); }
.ageing > div { padding: 10px 16px; border-left: 1px solid var(--line-soft); }
.ageing > div:first-child { border-left: 0; }
.statement-top { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 16px; margin-bottom: 18px; font-size: 13px; }
.statement-top b { display: block; font-size: 14px; }
.report-h { font-size: 17px; margin: 8px 0 12px; }
@media (max-width: 820px) {
  .lease-sum, .ageing { grid-template-columns: 1fr 1fr; }
  .lease-sum > div:nth-child(3), .ageing > div:nth-child(odd) { border-left: 0; }
  .lease-sum > div:nth-child(n+3), .ageing > div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .statement-top { grid-template-columns: 1fr; }
}

/* ── Printing (statements) ── */
@media print {
  :root { --ground: #fff; --panel: #fff; --panel-2: #fff; --ink: #000; --ink-2: #222; --ink-3: #555; --line: #999; --line-soft: #ccc; }
  body { background: #fff; color: #000; font-size: 12px; }
  .rail, .no-print, .toast, #modal-root { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .section { break-inside: avoid; border-color: #999; }
  a { color: #000; text-decoration: none; }
}
td.who { min-width: 170px; }
