:root {
  --bg: #0b0f19; --bg2: #131a2a; --bg3: #1c263c;
  --text: #f0f4f8; --muted: #94a3b8;
  --accent: #3b82f6; --accent2: #8b5cf6;
  --ok: #10b981; --warn: #f59e0b; --bad: #ef4444; --info: #0ea5e9;
  --line: rgba(255, 255, 255, 0.08);
  --side-bg: rgba(0, 0, 0, 0.25); --hover: rgba(255, 255, 255, 0.03); --track: rgba(255, 255, 255, 0.08); --chip: rgba(255, 255, 255, 0.06);
  --soft: #cbd5e1; --shadow: 0 10px 25px rgba(0, 0, 0, 0.5); --tip-bg: #000; --tip-text: #f0f4f8;
  --radius: 10px;
  /* chart palette, readable on the dark background and distinguishable in this order */
  --c1: #3b82f6; --c2: #10b981; --c3: #f59e0b; --c4: #8b5cf6; --c5: #ec4899; --c6: #0ea5e9; --c7: #84cc16; --c8: #f97316;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f5f9; --bg2: #ffffff; --bg3: #e8edf5;
  --text: #1a2233; --muted: #5a6577;
  --accent: #2563eb; --accent2: #7c3aed;
  --ok: #047857; --warn: #b45309; --bad: #dc2626; --info: #0369a1;
  --line: rgba(15, 23, 42, 0.12);
  --side-bg: #ffffff; --hover: rgba(15, 23, 42, 0.04); --track: rgba(15, 23, 42, 0.1); --chip: rgba(15, 23, 42, 0.06);
  --soft: #334155; --shadow: 0 8px 22px rgba(15, 23, 42, 0.18); --tip-bg: #1a2233; --tip-text: #f8fafc;
  --c1: #2563eb; --c2: #059669; --c3: #d97706; --c4: #7c3aed; --c5: #db2777; --c6: #0284c7; --c7: #65a30d; --c8: #ea580c;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- layout */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 244px; flex: none; background: var(--side-bg); border-right: 1px solid var(--line); padding: 1.25rem 0.9rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.side-body { display: flex; flex-direction: column; flex: 1; }
.sidebar .menu-btn { display: none; }
.brand { padding: 0 0.75rem 1rem; }
.brand h1 { font-size: 1.25rem; color: var(--accent); }
.brand small { color: var(--muted); }
.nav a { display: block; padding: 0.5rem 0.75rem; border-radius: var(--radius); color: var(--text); margin-bottom: 2px; }
.nav a.sub { padding-left: 1.6rem; font-size: 0.93rem; color: var(--soft); }
.nav a:hover { background: var(--bg3); text-decoration: none; }
.nav a.active { background: var(--bg3); color: var(--accent); }
.nav-title { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.9rem 0.75rem 0.3rem; }
.signout { margin: auto 0.5rem 0; padding-top: 1rem; }
.signout .who { font-size: 0.85rem; margin-bottom: 0.5rem; word-break: break-word; }
.signout .btn { width: 100%; }
main { flex: 1; min-width: 0; padding: 1.75rem 2.25rem; max-width: 1500px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head h2 { font-size: 1.7rem; }
.sub { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.card-head a { font-size: 0.85rem; }
.sheet-date { margin: 0 0 1rem; font-size: 1.2rem; color: var(--muted); }
.print-title { display: none; }

.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem; margin-bottom: 1.25rem; min-width: 0; }
.card h3 { margin-bottom: 0.9rem; font-size: 1.05rem; }
.card h3 .sub { font-weight: 400; }
.card.narrow { max-width: 480px; }
.grid { display: grid; gap: 1rem; margin-bottom: 1.25rem; }
.grid .card { margin-bottom: 0; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi .label { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi .value { font-size: 1.65rem; font-weight: 600; margin-top: 0.25rem; font-variant-numeric: tabular-nums; }
.kpi .note { color: var(--muted); font-size: 0.78rem; margin-top: 0.15rem; }
.c-ok { color: var(--ok); } .c-info { color: var(--info); } .c-accent { color: var(--accent); } .c-bad { color: var(--bad); } .c-warn { color: var(--warn); } .c-muted { color: var(--muted); }

/* ---------- tables: sticky headers, aligned numbers */
.table-wrap { overflow: auto; max-height: 75vh; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 0.78rem; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--bg2); z-index: 1; }
td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:hover td { background: var(--hover); }
tbody tr:last-child td { border-bottom: 0; }
tfoot th { position: sticky; bottom: 0; top: auto; color: var(--text); border-top: 1px solid var(--line); border-bottom: 0; background: var(--bg3); font-weight: 600; font-size: 0.88rem; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sortable-th { cursor: pointer; user-select: none; }
.sortable-th:hover { color: var(--text); }
th[aria-sort="ascending"]::after { content: " ▲"; font-size: 0.65rem; }
th[aria-sort="descending"]::after { content: " ▼"; font-size: 0.65rem; }
th a { color: inherit; } th a.sorted { color: var(--accent); } th a.sorted::after { content: " ▼"; font-size: 0.65rem; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.small { font-size: 0.8rem; }
.err-pre { white-space: pre-wrap; max-width: 520px; margin: 0.4rem 0 0; font-size: 0.78rem; color: var(--muted); }
.meter { display: inline-block; width: 56px; height: 6px; border-radius: 3px; background: var(--track); vertical-align: middle; margin-right: 0.35rem; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }

.badge { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.75rem; border: 1px solid transparent; }
.b-ok { background: rgba(16, 185, 129, 0.15); color: var(--ok); border-color: rgba(16, 185, 129, 0.3); }
.b-warn { background: rgba(245, 158, 11, 0.15); color: var(--warn); border-color: rgba(245, 158, 11, 0.3); }
.b-bad { background: rgba(239, 68, 68, 0.15); color: var(--bad); border-color: rgba(239, 68, 68, 0.3); }
.b-info { background: rgba(14, 165, 233, 0.15); color: var(--info); border-color: rgba(14, 165, 233, 0.3); }
.b-plain { background: var(--chip); color: var(--muted); }

/* ---------- buttons, forms */
.btn { display: inline-block; border: 1px solid var(--line); background: var(--bg3); color: var(--text); padding: 0.5rem 0.9rem; border-radius: var(--radius); cursor: pointer; font: inherit; line-height: 1.3; }
.btn:hover { filter: brightness(1.15); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-danger { background: rgba(239, 68, 68, 0.15); color: var(--bad); border-color: rgba(239, 68, 68, 0.4); }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.82rem; }
.btn[disabled] { opacity: 0.5; cursor: wait; }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

.field { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.75rem; }
.field label { color: var(--muted); font-size: 0.8rem; }
.field.grow { flex: 1; }
input, select { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 0.7rem; font: inherit; min-width: 0; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input.slim { padding: 0.25rem 0.5rem; width: 11rem; }
input.slim.qty { width: 6.5rem; text-align: right; }
.money-in { display: inline-flex; align-items: center; }
.money-in .cur { padding: 0.25rem 0.45rem; border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--bg3); color: var(--muted); }
.money-in input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
textarea { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 0.7rem; font: inherit; width: 100%; resize: vertical; }
.filters { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1rem; }
.filters .field { margin: 0; }
table.kv { width: auto; margin-bottom: 1rem; }
table.kv th { text-align: left; color: var(--muted); font-weight: normal; padding-right: 1.5rem; }
label.check { display: flex; gap: 0.5rem; align-items: center; color: var(--muted); font-size: 0.85rem; flex-basis: 100%; }
label.check input { padding: 0; }
form.inline { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.inline-group { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.filterbar { margin-bottom: 1.25rem; }
.filterbar .sub { margin-top: 0; }
.daynav { margin-bottom: 1rem; }

.pills { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.pill { padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 0.85rem; border: 1px solid transparent; font-family: inherit; cursor: pointer; }
.pill.on { background: rgba(59, 130, 246, 0.2); color: var(--text); border-color: var(--accent); }
.pill:hover { text-decoration: none; filter: brightness(1.2); }

.pager { display: flex; gap: 0.4rem; align-items: center; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.pager a, .pager span { padding: 0.25rem 0.7rem; border-radius: var(--radius); background: var(--bg3); font-size: 0.85rem; }
.pager span.cur { background: var(--accent); }

.alert { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid; }
.alert-ok { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.4); color: var(--ok); }
.alert-bad { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.4); color: var(--bad); }
.alert-info { background: rgba(14, 165, 233, 0.1); border-color: rgba(14, 165, 233, 0.4); color: var(--text); }
.toast { position: fixed; right: 1.5rem; bottom: 1.5rem; max-width: 360px; background: var(--bg3); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1rem; box-shadow: var(--shadow); display: none; z-index: 10; }
.code-big { font-family: ui-monospace, Consolas, monospace; font-size: 1.4rem; letter-spacing: 0.05em; color: var(--accent); margin: 0.5rem 0; }

/* ---------- charts (drawn by charts.js; colours from the --c1.. variables) */
.chart-box { margin: 0; }
.chart { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg text { fill: var(--muted); font-size: 11px; }
.chart-svg .axis2 { fill: var(--c3); }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .bar { fill: var(--c1); transition: fill 0.1s; }
.chart-svg .hit:hover .bar, .chart-svg a:focus .bar { fill: var(--accent2); }
.chart-svg .hit-area { fill: transparent; }
.chart-svg .hit:hover .hit-area { fill: var(--hover); }
.chart-svg .line { fill: none; stroke: var(--c1); stroke-width: 2; stroke-linejoin: round; }
.chart-svg .area { fill: var(--c1); opacity: 0.12; }
.chart-svg .dot { fill: var(--c1); }
.chart-svg .line2 { fill: none; stroke: var(--c3); stroke-width: 2; stroke-linejoin: round; }
.chart-svg .dot2 { fill: var(--c3); }
.chart-svg a { cursor: pointer; }
.chart-svg .row-label { fill: var(--text); font-size: 12px; }
.chart-svg .row-value { fill: var(--muted); font-size: 12px; }
.chart-svg .center-value { fill: var(--text); font-size: 18px; font-weight: 600; }
.chart-svg .slice { stroke: var(--bg2); stroke-width: 2; }
.chart-svg .hbars { max-height: 480px; }
.s1 { fill: var(--c1); background: var(--c1); } .s2 { fill: var(--c2); background: var(--c2); } .s3 { fill: var(--c3); background: var(--c3); } .s4 { fill: var(--c4); background: var(--c4); }
.s5 { fill: var(--c5); background: var(--c5); } .s6 { fill: var(--c6); background: var(--c6); } .s7 { fill: var(--c7); background: var(--c7); } .s8 { fill: var(--c8); background: var(--c8); }
.chart-svg .slice:hover { opacity: 0.85; }
.chart-toggle { margin-bottom: 0.5rem; }
.donut-wrap { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.donut-wrap .chart-svg { width: 220px; flex: none; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 200px; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto 3.5rem; gap: 0.5rem; align-items: center; padding: 0.2rem 0; font-size: 0.88rem; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend b { font-weight: 500; font-variant-numeric: tabular-nums; }
.legend small { color: var(--muted); text-align: right; }
.chart-tip { position: fixed; display: none; z-index: 20; pointer-events: none; background: var(--tip-bg); color: var(--tip-text); border: 1px solid var(--line); border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 0.8rem; white-space: pre-line; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); }
/* the text table: visible without JavaScript, screen-reader only once the chart is drawn */
.chart-fallback { font-size: 0.85rem; }
.chart-fallback caption { text-align: left; color: var(--muted); padding-bottom: 0.4rem; }
.chart[data-ready] .chart-fallback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- sign-in and error pages */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: 100%; max-width: 360px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.75rem; }
.login-card .brand { padding: 0 0 1.5rem; }
.login-card form { display: grid; gap: 0.5rem; }
.login-card label { color: var(--muted); font-size: 0.85rem; margin-top: 0.5rem; }
.login-card .btn { margin-top: 1rem; width: 100%; }
.login-error { color: var(--bad); margin: 0.5rem 0 0; font-size: 0.9rem; }
.login-ok { color: var(--ok); margin: 0.5rem 0 0; font-size: 0.9rem; }
.login-alt { margin: 1rem 0 0; text-align: center; font-size: 0.9rem; }
.login-card .login-clover { display: block; text-align: center; margin: 0 0 0.75rem; }

/* ---------- public pages: support, privacy, terms */
.public-body { min-height: 100vh; display: flex; flex-direction: column; }
.public-head { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--bg2); }
.public-brand { font-weight: 700; font-size: 1.25rem; color: var(--accent); text-decoration: none; }
.public-head nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.public-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 1.5rem 1rem 2.5rem; }
.public-foot { padding: 1rem 1.25rem; border-top: 1px solid var(--line); font-size: 0.85rem; text-align: center; }
.public-foot p { margin: 0.25rem 0; }
.legal h1 { margin-bottom: 0.25rem; }
.legal h2 { margin-top: 1.75rem; font-size: 1.15rem; }
.legal h3 { margin-top: 1.25rem; font-size: 1rem; }
.legal p, .legal li { line-height: 1.6; }
.legal .missing { background: rgba(245, 158, 11, 0.2); color: var(--warn); padding: 0 0.25rem; border-radius: 4px; font-weight: 600; }
.login-legal { margin: 0.75rem 0 0; text-align: center; font-size: 0.8rem; }
.login-legal a { margin: 0 0.4rem; }
.login-card .login-or { text-align: center; margin: 0.5rem 0 0; }
.login-card .lead { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.5rem; }

/* ---------- gift cards: value picker, found card, voucher, balance page */
.choices { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.9rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-block; padding: 0.55rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg3); cursor: pointer; font-weight: 600; font-variant-numeric: tabular-nums; }
.choice input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.other-amount { width: 9.5rem; }
.card-found { margin: 0.25rem 0 0.75rem; }
.card-found .code-big { margin-bottom: 0.1rem; }
.found-balance { font-size: 2.4rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.redeem { margin-bottom: 0.75rem; }
.more { margin: 0 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.9rem; }
.more summary { cursor: pointer; color: var(--muted); }
.more form { margin-top: 0.75rem; }
.void-form { border-top: 1px solid var(--line); padding-top: 0.75rem; }

.balance-card { max-width: 400px; }
.balance-result { text-align: center; padding: 0.5rem 0 1.25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.balance-result .found-balance { font-size: 2.8rem; margin: 0.2rem 0 0.4rem; }
.balance-result p { margin: 0; }
.pairing { border-color: var(--accent); }
.pairing-code { font-size: 2.2rem; letter-spacing: 0.15em; }
.v-label { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* the voucher is always black on white, on screen and on paper */
.voucher-body { background: #eef1f5; color: #111; min-height: 100vh; padding: 1.5rem 1rem; color-scheme: light; }
.voucher-tools { max-width: 560px; margin: 0 auto 1rem; }
.voucher-tools .btn { background: #fff; color: #111; border-color: #c5ccd6; }
.voucher-tools .btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.voucher-tools .alert-ok { color: #047857; }
.voucher { max-width: 560px; margin: 0 auto; background: #fff; color: #111; border: 2px solid #111; border-radius: 14px; padding: 1.4rem 1.6rem; }
.voucher header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid #ccc; padding-bottom: 0.6rem; margin-bottom: 1rem; }
.v-shop { font-size: 1.35rem; font-weight: 700; }
.v-kind { text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.8rem; color: #555; }
.voucher .v-label { color: #555; margin-top: 0.5rem; }
.v-main { display: flex; justify-content: space-between; gap: 1.25rem; align-items: center; }
.v-amount { font-size: 2.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.v-code { font-family: ui-monospace, Consolas, monospace; font-size: 1.3rem; letter-spacing: 0.06em; font-weight: 600; }
.v-exp { margin-top: 0.6rem; font-weight: 600; }
.v-qr { width: 150px; flex: none; }
.v-qr svg { width: 100%; height: auto; display: block; }
.voucher footer { margin-top: 1rem; padding-top: 0.6rem; border-top: 1px solid #ccc; font-size: 0.8rem; color: #444; }
@media (max-width: 480px) {
  .v-main { flex-direction: column; align-items: flex-start; }
  .v-qr { width: 140px; align-self: center; }
}
@media print {
  .voucher-body { background: #fff; padding: 0; min-height: 0; }
  .voucher { margin: 0; break-inside: avoid; }
}

/* ---------- small screens */
@media (max-width: 1100px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; padding: 0.75rem 1rem; overflow: visible; }
  .side-top { display: flex; justify-content: space-between; align-items: center; }
  .brand { padding: 0; }
  .sidebar .menu-btn { display: inline-block; }
  .side-body { display: none; padding-top: 0.75rem; }
  .sidebar.open .side-body { display: flex; }
  main { padding: 1rem; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .page-head h2 { font-size: 1.4rem; }
  .table-wrap { max-height: none; }
}

/* ---------- print: the daily sheet (and any other page) on white paper */
@media print {
  :root, :root[data-theme] { --bg: #fff; --bg2: #fff; --bg3: #f1f5f9; --text: #000; --muted: #444; --line: #bbb; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .sidebar, .no-print, .toast, .pager, .btn { display: none !important; }
  main { padding: 0; max-width: none; }
  .print-title { display: block; margin-bottom: 0.25rem; }
  .card { border: 1px solid #bbb; break-inside: avoid; margin-bottom: 0.75rem; padding: 0.6rem; }
  .grid { gap: 0.5rem; }
  .cols-4 { grid-template-columns: repeat(4, 1fr); }
  .cols-2 { grid-template-columns: repeat(2, 1fr); }
  .table-wrap { max-height: none; overflow: visible; }
  th, tfoot th { position: static; background: #fff; color: #000; }
  .sheet-orders tr { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  .badge { border: 1px solid #999; color: #000; background: none; }
  .c-ok, .c-accent, .c-info, .c-bad, .c-warn { color: #000; }
}

/* ---------- theme switch */
.theme-toggle { width: 100%; margin-top: 1rem; }
.signout { margin-top: 0.75rem; }
.login-body .theme-toggle { width: auto; margin: 1rem auto 0; display: block; }
