/* Host Daftar: a quiet ledger. White sheets on a tinted page, one accent colour, few boxes.
   The viewer picks mode, accent and font (Appearance menu); they are set as data-* on <html>. */
:root {
  --bg: #f4f3ef; --card: #ffffff; --ink: #24231f; --muted: #77756e; --line: #ebe9e4; --field: #ffffff;
  --brand: #1f6fd0; --brand-soft: #e6f0fb; --brand-ink: #ffffff; --danger: #b8473f;
  --warn-bg: #fdecea; --warn-line: #f1c7c2; --note-bg: #fbf4dc; --note-line: #eadca8;
  --ok: #dff0e2; --ok-ink: #1f4a2e; --wait: #fbecc9; --wait-ink: #5a4310; --bad: #fde3de; --bad-ink: #7a221b;
  --radius: 14px;
  --font: "Figtree";
  color-scheme: light;
}
[data-theme=violet] { --bg: #f4f3fb; --ink: #272238; --muted: #74718a; --line: #e7e5f2; --brand: #5b3bd6; --brand-soft: #ebe6fd; }
[data-theme=sage] { --bg: #f3f2ec; --ink: #25302b; --muted: #6d7872; --line: #e5e3da; --brand: #2c6a59; --brand-soft: #e0eee8; }
[data-mode=dark] {
  --bg: #121418; --card: #1a1d23; --ink: #e4e6e9; --muted: #8b9099; --line: #282c35; --field: #121418;
  --brand: #72aef0; --brand-soft: #1b2a3d; --brand-ink: #0f1115; --danger: #ec8c85;
  --warn-bg: #3a2224; --warn-line: #6b3a3c; --note-bg: #332e1b; --note-line: #5c5227;
  --ok: #1f3a2c; --ok-ink: #a8dcbf; --wait: #3d3419; --wait-ink: #f0d58c; --bad: #45262a; --bad-ink: #f3b1ab;
  color-scheme: dark;
}
[data-mode=dark][data-theme=violet] { --bg: #14121f; --card: #1c1930; --ink: #e7e4f5; --muted: #9a96b5; --line: #2b2743; --field: #14121f; --brand: #a892f6; --brand-soft: #2a2350; --brand-ink: #14121f; }
[data-mode=dark][data-theme=sage] { --bg: #191f1d; --card: #212926; --ink: #e4e9e6; --muted: #96a19c; --line: #303a36; --field: #191f1d; --brand: #74bda7; --brand-soft: #29393400; --brand-soft: #293934; --brand-ink: #10201b; }
[data-font=inter] { --font: "Inter"; }
[data-font=plex] { --font: "IBM Plex Sans"; }
[data-font=system] { --font: "Segoe UI"; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.55 var(--font), "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 30px; line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 600; color: var(--muted); }
.sub { margin: 4px 0 0; color: var(--muted); }
.muted, small { color: var(--muted); }
small { display: block; font-size: 13px; font-weight: 400; margin-top: 5px; }
.ico { flex: none; }

/* Shell */
.app { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 22px 14px 16px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; color: var(--ink); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a, .side-btn, .look summary { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 15px; }
.side nav a:hover, .side-btn:hover, .look summary:hover { color: var(--ink); text-decoration: none; }
.side nav a.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.side nav a.on .ico { color: var(--brand); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.side-btn { border: 0; background: none; cursor: pointer; font-family: inherit; width: 100%; text-align: left; }
.side-btn .to-light, [data-mode=dark] .side-btn .to-dark { display: none; }
[data-mode=dark] .side-btn .to-light { display: inline; }
.who { display: flex; align-items: center; gap: 10px; padding: 12px 6px 0 10px; margin-top: 8px; border-top: 1px solid var(--line); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.who .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.icon-btn { border: 0; background: none; color: var(--muted); cursor: pointer; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; }
.icon-btn:hover { color: var(--ink); }
.content { min-width: 0; }
.mobile-bar { display: none; align-items: center; gap: 6px; padding: 8px 12px; background: var(--bg); position: sticky; top: 0; z-index: 10; }
main { max-width: 1040px; margin: 0 auto; padding: 44px 40px 96px; }
.guest main { max-width: none; padding: 24px 16px; }
.focus { max-width: 680px; margin: 0 auto; }
.scrim { display: none; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bar.foot { margin-top: 16px; }

/* Surfaces */
.sheet, .card { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
[data-mode=dark] .sheet, [data-mode=dark] .card { box-shadow: none; border: 1px solid var(--line); }
.card { padding: 24px; margin: 20px 0; }
.narrow { max-width: 420px; margin: 9vh auto 0; padding: 32px; }
.narrow h1 { font-size: 24px; margin-bottom: 4px; }
.narrow > .muted { margin: 0 0 20px; }

.flash { padding: 11px 16px; border-radius: 10px; margin: 0 0 20px; background: var(--ok); color: var(--ok-ink); font-weight: 500; }
.flash.err { background: var(--warn-bg); color: var(--bad-ink); }
.flash.note { background: var(--note-bg); color: var(--wait-ink); }
button.link { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }

/* Forms */
label, .field { display: block; font-weight: 600; font-size: 14px; margin-bottom: 18px; }
.lbl { display: block; font-weight: 600; font-size: 14px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 9px 12px; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-weight: 400; background: var(--field); color: var(--ink); }
input::placeholder { color: var(--muted); opacity: .8; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; margin: 0 6px 0 0; }
label.check { font-weight: 400; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); }
.btn.danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn.danger:hover { background: var(--warn-bg); }
.btn.ok { background: var(--ok); border-color: transparent; color: var(--ok-ink); }
.btn.small { min-height: 32px; padding: 3px 12px; font-size: 13.5px; border-radius: 8px; }
.btn.has { border-color: var(--brand); color: var(--brand); }
.btn b { background: var(--brand); color: var(--brand-ink); border-radius: 99px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; font-size: 12px; }

.pw { position: relative; display: block; flex: 1; }
.pw input { padding-right: 46px; }
.eye { position: absolute; right: 4px; bottom: 3px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; }
.eye:hover { color: var(--ink); }
.eye.shown { color: var(--brand); }
.eye.shown .slash { display: none; }
form.inline .pw { flex: 0 1 auto; }
form.inline .eye { width: 28px; height: 28px; bottom: 2px; }

/* Dashboard */
.stats { display: flex; flex-wrap: wrap; gap: 14px 56px; margin: 30px 0 34px; }
.stats a { display: flex; flex-direction: column; color: var(--ink); }
.stats a:hover { text-decoration: none; }
.stats a:hover b { color: var(--brand); }
.stats b { font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); margin-top: 4px; }
.delta { font-size: 13.5px; }
.stats .delta.up { color: var(--ok-ink); }
.stats .delta.down { color: var(--danger); }
.nudge { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; padding: 14px 18px; margin-bottom: 34px; border-radius: 12px; background: var(--note-bg); color: var(--wait-ink); }
.nudge:hover { text-decoration: none; filter: brightness(.98); }
.nudge span { opacity: .85; }
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 34px; margin-bottom: 38px; }
.split.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rows { list-style: none; margin: 0; padding: 6px 18px; }
.rows li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows .main { flex: 1; min-width: 0; color: var(--ink); display: flex; flex-direction: column; }
.rows .main:hover { text-decoration: none; }
.rows .main:hover b { color: var(--brand); }
.rows .main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .main span { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-note { color: var(--muted); margin: 0; }
.more { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 14.5px; }
.chart { display: flex; align-items: flex-end; gap: 10px; height: 210px; padding: 20px 20px 14px; }
.chart .col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.chart .col:hover { text-decoration: none; color: var(--ink); }
.chart .val { font-weight: 600; color: var(--ink); }
.chart .bar-fill { width: 100%; max-width: 44px; border-radius: 6px 6px 2px 2px; background: var(--line); }
.chart .col.now .bar-fill, .chart .col:hover .bar-fill { background: var(--brand); }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.plain li:first-child { border-top: 0; padding-top: 0; }
.plain a { color: var(--ink); }
.plain span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Orders */
.tabs { display: flex; gap: 26px; margin: 26px 0 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a { padding: 10px 0 12px; color: var(--muted); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); font-weight: 600; border-color: var(--ink); }
.tabs span { margin-left: 7px; font-size: 13px; color: var(--muted); font-weight: 500; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 0; }
.toolbar > input, .toolbar > select { width: auto; margin: 0; flex: 0 1 170px; }
.toolbar > .grow { flex: 1 1 240px; }
.adv { flex-basis: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 16px; padding: 22px; margin-top: 4px; background: var(--card); border-radius: var(--radius); }
.adv label, .adv .range { margin: 0; }
.adv .range { grid-column: span 2; }
.range div { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.range input { margin: 0; }
.range div span { color: var(--muted); font-size: 14px; }
.adv-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 12px; border-radius: 999px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; }
.pill span { color: var(--muted); font-size: 16px; line-height: 1; }
.pill:hover { text-decoration: none; }
.pill:hover span { color: var(--danger); }
.clear { font-size: 14px; color: var(--muted); }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 26px 2px 10px; color: var(--muted); }
.list-head p { margin: 0; }
.list-head b { color: var(--ink); font-weight: 600; }
select.quiet { width: auto; min-height: 34px; margin: 0; padding: 4px 8px; border-color: transparent; background-color: transparent; color: var(--muted); font-weight: 500; cursor: pointer; }
select.quiet:hover { color: var(--ink); }

/* Tables */
.table-wrap { padding: 0; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 14px 16px; text-align: left; border-top: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
thead th { border-top: 0; font-size: 13px; color: var(--muted); font-weight: 500; padding-top: 14px; padding-bottom: 10px; }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
/* The orders ledger uses the full width of the screen and groups its columns:
   who and what | status | money. A slightly stronger rule marks each group. */
main:has(.ledger) { max-width: 1560px; }
.ledger thead th { background: color-mix(in srgb, var(--bg) 55%, var(--card)); color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line); }
.ledger thead th:first-child { border-top-left-radius: var(--radius); }
.ledger thead th:last-child { border-top-right-radius: var(--radius); }
.ledger tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg) 35%, transparent); }
.ledger th.sep, .ledger td.sep { border-left: 1px solid var(--line); padding-left: 20px; }
.ledger td.soft { color: var(--muted); font-size: 14.5px; }
.ledger td.clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.totals { display: flex; flex-wrap: wrap; gap: 6px 0; }
.totals span + span { margin-left: 16px; padding-left: 16px; border-left: 1px solid var(--line); }
@media (max-width: 1500px) { .ledger .c3 { display: none; } }
@media (max-width: 1200px) { .ledger .c2 { display: none; } }
/* Grid lines between every piece of information, and colour that carries meaning:
   one colour per client and per hosting company, one per order type, and a tinted money block. */
.ledger th + th, .ledger td + td { border-left: 1px solid var(--line); }
.ledger th.sep, .ledger td.sep { border-left: 2px solid color-mix(in srgb, var(--muted) 35%, var(--line)); }
.ledger th, .ledger td { border-top-color: color-mix(in srgb, var(--muted) 18%, var(--line)); }
.who-dot, .host-mark { display: inline-block; width: 9px; height: 9px; margin-right: 8px; background: hsl(var(--h) 58% 50%); vertical-align: 1px; }
.who-dot { border-radius: 50%; }
.host-mark { border-radius: 2px; width: 4px; height: 14px; vertical-align: -2px; }
.tag.t-new { background: hsl(210 80% 93%); color: hsl(212 62% 32%); }
.tag.t-transfer { background: hsl(272 70% 94%); color: hsl(272 45% 36%); }
.tag.t-renew { background: hsl(168 50% 89%); color: hsl(170 60% 22%); }
[data-mode=dark] .tag.t-new { background: hsl(212 40% 22%); color: hsl(210 80% 82%); }
[data-mode=dark] .tag.t-transfer { background: hsl(272 30% 24%); color: hsl(272 70% 84%); }
[data-mode=dark] .tag.t-renew { background: hsl(170 35% 18%); color: hsl(168 50% 76%); }
.ledger td.money, .ledger th.money { background: color-mix(in srgb, var(--ok) 28%, transparent); }
.ledger td.paid { font-weight: 600; }
.ledger td.comm { color: var(--ok-ink); font-weight: 600; }
.ledger .unset { color: var(--wait-ink); background: var(--wait); padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.ledger tbody tr[data-href] { cursor: pointer; }
.ledger tbody tr[data-href]:hover { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.ledger td.date { color: var(--muted); font-variant-numeric: tabular-nums; width: 1%; }
.ledger .title { color: var(--ink); font-weight: 600; }
.ledger tr:hover .title { color: var(--brand); text-decoration: none; }
td .under { display: block; font-size: 13.5px; color: var(--muted); margin-top: 1px; }
.unset { color: var(--muted); font-size: 14px; }
td.empty { text-align: center; color: var(--muted); padding: 56px 20px; white-space: normal; }
td.row-actions { text-align: right; width: 1%; }
form.inline { display: flex; gap: 6px; align-items: center; }
form.inline input { margin: 0; min-width: 150px; min-height: 34px; padding: 5px 10px; }
.row-actions form.inline { display: inline-flex; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; }
.filters { padding: 14px; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-row input, .filter-row select { width: auto; margin: 0; min-width: 150px; flex: 0 1 auto; }
.filter-row .grow { flex: 1 1 240px; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--line); color: var(--ink); white-space: nowrap; }
.s-delivered { background: var(--ok); color: var(--ok-ink); }
.s-purchased { background: var(--brand-soft); color: var(--brand); }
.s-pending { background: var(--wait); color: var(--wait-ink); }
.s-not_delivered, .s-canceled, .s-refunded { background: var(--bad); color: var(--bad-ink); }
.s-none { background: none; color: var(--muted); font-weight: 400; padding: 0; }

/* Order form */
.stepper { list-style: none; display: flex; gap: 6px; padding: 0; margin: 22px 0 0; counter-reset: step; }
.stepper li { flex: 1; counter-increment: step; }
.stepper button { width: 100%; border: 0; border-top: 3px solid var(--line); background: none; padding: 9px 2px; font: inherit; font-size: 13.5px; color: var(--muted); cursor: pointer; text-align: left; }
.stepper button::before { content: counter(step) ". "; }
.stepper .done button { border-color: var(--brand); color: var(--ink); }
.stepper .on button { border-color: var(--brand); color: var(--ink); font-weight: 700; }
.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form legend { font-weight: 700; font-size: 18px; padding: 0; margin-bottom: 18px; }
.form.all fieldset + fieldset, .form:not([data-wizard]) fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 8px; }
.sub-box { background: var(--bg); border-radius: 12px; padding: 16px 16px 2px; margin-bottom: 18px; }
.choices { display: flex; gap: 8px; margin-top: 6px; }
.choices label { flex: 1; margin: 0; cursor: pointer; }
.choices input { position: absolute; opacity: 0; }
.choices span { display: block; text-align: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); font-weight: 600; }
.choices input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.choices input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
.secret { display: flex; gap: 8px; margin-top: 6px; }
.secret input { margin: 0; font-family: Consolas, "Courier New", monospace; font-size: 14.5px; }
.copy { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 10px; padding: 0 14px; cursor: pointer; font: inherit; font-size: 13.5px; }
.copy:hover { color: var(--ink); border-color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.actions.plain { border-top: 0; padding-top: 0; margin-top: 4px; }
.danger-zone { margin-top: 4px; text-align: right; }
.steps { padding-left: 20px; margin-top: 0; }

/* Appearance picker */
.look { position: relative; font-size: 14px; }
.look summary { list-style: none; cursor: pointer; }
.look summary::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); flex: none; box-shadow: inset 0 0 0 4px var(--bg); border: 1px solid var(--brand); }
.look summary::-webkit-details-marker { display: none; }
.look .panel { position: absolute; bottom: 44px; left: 0; width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: 0 12px 32px rgba(0, 0, 0, .14); z-index: 30; }
.guest .look { position: fixed; bottom: 14px; left: 14px; }
.guest .look summary { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 6px 10px; }
.look p { margin: 0 0 8px; font-weight: 600; color: var(--muted); font-size: 13px; }
.look .row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 16px; }
.look .row:last-child { margin-bottom: 0; }
.look .row button { border: 1px solid var(--line); background: var(--field); color: var(--ink); border-radius: 8px; padding: 7px 8px; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 8px; font-family: inherit; }
.look .row button.on { border-color: var(--ink); font-weight: 600; }
.look i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(128, 128, 128, .4); flex: none; }

@media (prefers-reduced-motion: no-preference) {
  .btn, input, select, .side nav a, .tabs a { transition: border-color .15s, background-color .15s, color .15s; }
  .side { transition: transform .2s; }
}
@media (max-width: 1000px) {
  .split, .split.even { grid-template-columns: minmax(0, 1fr); }
  .adv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; width: 250px; background: var(--card); transform: translateX(-100%); }
  .side nav a.on { background: var(--bg); box-shadow: none; }
  .nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 15; }
  .mobile-bar { display: flex; }
  main { padding: 16px 16px 72px; }
  h1 { font-size: 26px; }
  .card { padding: 18px; }
  .stats { gap: 18px 36px; margin: 22px 0 26px; }
  .stats b { font-size: 32px; }
  .stepper button { font-size: 0; }
  .stepper button::before { font-size: 13px; content: counter(step); }
}
@media (max-width: 520px) {
  .rows li { flex-wrap: wrap; row-gap: 8px; }
  .rows .main { flex-basis: 100%; }
  .adv { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .adv .range { grid-column: auto; }
  .toolbar > select { flex: 1 1 130px; }
  .ledger thead { display: none; }
  .ledger td.date, .ledger td.num:empty { display: none; }
  th, td { padding: 12px 10px; }
}
