/* iNvoicing - dark theme.
   Every colour is a token in this :root block; change the theme here only.
   Printed/PDF documents (templates/print/document.html) do not use this file and stay light. */
:root {
    color-scheme: dark;
    --bg: #15171a;            /* page background */
    --panel: #1f2226;         /* cards, stats, modals, drop-downs */
    --panel-2: #272a2f;       /* table headers, row hover, internal columns */
    --input-bg: #17191c;
    --sidebar-bg: #0d0e10;
    --rail-w: 64px;           /* sidebar: the rail of areas */
    --panel-w: 220px;         /* sidebar: one area's links */
    --sidebar-w: calc(var(--rail-w) + var(--panel-w));
    --side-panel-bg: #121417; /* sidebar panel, a step lighter than the rail */
    --side-head-bg: #1a1d21;  /* open rail area, hovered sub-heading */
    --side-rule: #3a3f46;     /* guide line left of a sub-heading's links */
    --pin: #e0b060;           /* pinned star */
    --border: #33373d;
    --border-strong: #4a4f56;
    --text: #e6e6e6;
    --text-strong: #ffffff;
    --text-soft: #c4c8cd;     /* labels, headings, secondary text */
    --muted: #9aa0a6;
    --accent: #e6e6e6;        /* primary buttons, active nav, paid badges */
    --accent-hover: #ffffff;
    --on-accent: #111111;     /* text on --accent */
    --on-accent-soft: #444444;
    --link: #9cc4ff;
    --danger: #e57373;
    --danger-bg: #3a1e1e;
    --on-danger: #111111;     /* text on --danger (menu count bubbles) */
    --warn: #e0b060;          /* bank lines only suggested by a rule */
    --money-in: #8fd19e;      /* bank lines: money coming in */
    --ok: #8fd19e;            /* checks that pass (e.g. totals match) */
    --ok-bg: #1d3324;
    --warn-bg: #3a2c14;       /* new / needs attention: bank import new lines, price differs from last charged */
    --row-known-bg: #18281d;  /* bank import check: line already imported */
    --row-new-bg: #33270f;    /* bank import check: new line (to assign once imported) */
    --qr-on: #000000;         /* two-step set-up QR code: dark modules (scanners want dark on light) */
    --qr-off: #ffffff;        /* two-step set-up QR code: background and quiet zone */
    --backdrop: rgba(0, 0, 0, .6);
    --shadow: rgba(0, 0, 0, .5);
    --radius: 4px;
    --font: "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
    --mono: Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.45; }
a { color: var(--link); }
h1 { font-size: 22px; margin: 0; letter-spacing: .3px; color: var(--text-strong); }
h2 { font-size: 16px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-soft); }
h3 { font-size: 14px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.warn-text { color: var(--danger); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; }

/* ---------- sidebar menu v2 (templates/fragments.html :: topbar, js/side-menu.js) ----------
   A rail of areas (icons, red counts) and a panel with one area's links; sub-headings fold; the panel can close
   (html.side-closed, remembered in the browser). Spec docs/superpowers/specs/2026-11-25-sidebar-rework-v2.md. */
body { padding-left: var(--sidebar-w); }
html.side-closed body { padding-left: var(--rail-w); }
.sidebar { position: fixed; top: 0; left: 0; bottom: 0; display: flex; z-index: 20; color: var(--text); }
.rail { width: var(--rail-w); background: var(--sidebar-bg); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: stretch; padding: 10px 0 8px; overflow-y: auto; scrollbar-width: none; }
.brand { font-weight: 700; letter-spacing: 1px; text-decoration: none; color: var(--text-strong); font-size: 15px; white-space: nowrap; padding: 0 8px; }
.brand span { color: var(--muted); font-weight: 400; letter-spacing: 1px; }
.rail-brand { display: flex; flex-direction: column; align-items: center; font-size: 18px; letter-spacing: 0; padding: 0 0 8px; }
.rail-brand .version { margin: 0; font-size: 9px; }
.rail .ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rail-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; background: none; border: 0; border-left: 3px solid transparent; color: var(--muted); font: 10px var(--font); text-decoration: none; cursor: pointer; list-style: none; }
.rail-btn::-webkit-details-marker { display: none; }
.rail-btn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-btn:hover, .rail-btn:focus-visible { color: var(--text-strong); }
.rail-btn.on { color: var(--text-strong); background: var(--side-head-bg); border-left-color: var(--accent); }
html.side-closed .rail-btn.on:not(a) { background: none; border-left-color: transparent; }
.rail-btn.here::after { content: ""; position: absolute; left: 4px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--accent); }
.rail-pinned .ic { color: var(--pin); }
.rail-count { position: absolute; top: 3px; right: 9px; min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: var(--on-danger); font-size: 10px; font-weight: 700; line-height: 15px; text-align: center; }
.rail-rule { border: 0; border-top: 1px solid var(--border); margin: 4px 12px; }
.rail-spacer { flex: 1; min-height: 8px; }
.rail-account { position: relative; }
.rail-pop { position: fixed; left: calc(var(--rail-w) + 4px); min-width: 190px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 12px var(--shadow); padding: 4px; z-index: 30; }
.rail-pop { bottom: 8px; padding: 10px; }
.rail-account .rail-count { top: 2px; }
.side-panel { width: var(--panel-w); background: var(--side-panel-bg); border-right: 1px solid var(--border); overflow-y: auto; padding: 12px 0 24px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
html.side-closed .side-panel { display: none; }
.side-title { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 14px; margin-bottom: 6px; }
.side-title h2 { margin: 0; font-size: 16px; color: var(--text-strong); flex: 1; }
.side-close { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 6px; cursor: pointer; border-radius: var(--radius); }
.side-close:hover { color: var(--text-strong); background: var(--panel-2); }
.side-tools { display: flex; gap: 12px; padding: 0 14px 6px; }
.side-tools button { background: none; border: 0; padding: 0; color: var(--link); font: 12px var(--font); cursor: pointer; }
/* Sub-headings: click rows that fold; a closed one shows how many links it holds and their red counts */
.side-sec { margin: 0; }
.side-sub { list-style: none; display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 9px; border-left: 3px solid transparent; cursor: pointer; user-select: none; font-size: 13px; font-weight: 700; color: var(--text-soft); }
.side-sub::-webkit-details-marker { display: none; }
.side-sub:hover { color: var(--text-strong); background: var(--side-head-bg); }
.side-sec[open] > .side-sub { color: var(--text-strong); }
.side-sub .chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; opacity: .7; transition: transform .12s ease; flex: none; }
.side-sec[open] > .side-sub .chev { transform: rotate(90deg); }
.side-sub small { color: var(--muted); font-weight: 400; font-size: 11px; }
.side-sec[open] > .side-sub .nav-count { display: none; }
.side-links { margin: 0 6px 6px 18px; border-left: 1px solid var(--side-rule); display: flex; flex-direction: column; gap: 1px; }
.side-links.flat { margin-left: 6px; border-left: 0; }
.side-row { display: flex; align-items: center; position: relative; }
.side-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--text-soft); text-decoration: none; padding: 4px 8px 4px 10px; border-radius: var(--radius); font-size: 13px; }
.side-link:hover { color: var(--text-strong); background: var(--panel-2); }
.side-link.active { color: var(--on-accent); background: var(--accent); }
.nav-count { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: var(--on-danger); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; letter-spacing: 0; text-transform: none; }
.pin-btn { flex: none; background: none; border: 0; padding: 3px; margin-left: 2px; color: var(--muted); cursor: pointer; opacity: 0; border-radius: var(--radius); }
.pin-btn .ic { width: 13px; height: 13px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.side-row:hover .pin-btn, .pin-btn:focus-visible { opacity: 1; }
.pin-btn:hover { color: var(--text-strong); }
.pin-btn.on { opacity: 1; color: var(--pin); }
.pin-btn.on .ic { fill: currentColor; }
@media (hover: none) { .pin-btn { opacity: .55; } }
.pin-list { list-style: none; margin: 0 6px 6px; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.pin-list .side-row { cursor: grab; }
.pin-list .side-row.dragging { opacity: .4; }
.pin-error { color: var(--danger); font-size: 12px; padding: 2px 14px 6px; margin: 0; }
.pin-empty, .pin-hint { color: var(--muted); font-size: 12px; padding: 4px 14px; margin: 0; }
.side-foot { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.side-foot .who { color: var(--text-soft); text-decoration: none; font-size: 13px; }
.side-foot .who:hover { color: var(--text-strong); }
.sidebar .btn.ghost { color: var(--text-soft); border-color: var(--border-strong); }
.sidebar .btn.ghost:hover { color: var(--on-accent); background: var(--accent); }
.go-to { width: min(520px, calc(100vw - 32px)); padding: 12px; }
.go-to input[type=search] { width: 100%; }
.go-to-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.go-to-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 8px; border-radius: var(--radius); }
.go-to-list li.active { background: var(--panel-2); }
.go-to-list a { color: var(--text); text-decoration: none; }
.go-to-where { color: var(--muted); font-size: 12px; white-space: nowrap; }
.go-to-list li.go-to-note { color: var(--muted); font-size: 12px; }
.settings-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.mobile-bar, .side-backdrop { display: none; }
@media (max-width: 900px) {
    body, html.side-closed body { padding-left: 0; }
    .mobile-bar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 10; height: 48px; padding: 0 16px; background: var(--sidebar-bg); border-bottom: 1px solid var(--border); }
    .burger { font-size: 20px; cursor: pointer; color: var(--text-strong); user-select: none; }
    .sidebar { transform: translateX(-100%); transition: transform .15s ease; }
    html.side-closed .side-panel { display: block; }
    .side-close { display: none; }
    .side-toggle:checked ~ .sidebar { transform: none; }
    .side-toggle:checked ~ .side-backdrop { display: block; position: fixed; inset: 0; background: var(--backdrop); z-index: 15; }
}

/* ---------- layout ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 24px; }
main.wide { max-width: 1560px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } main { padding: 16px; } }

/* ---------- stats ---------- */
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.stat .value { font-size: 22px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat.dark { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.stat.dark .label { color: var(--on-accent-soft); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); text-decoration: none; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.secondary { background: var(--panel-2); color: var(--text); border-color: var(--border-strong); }
.btn.secondary:hover { border-color: var(--text-soft); color: var(--text-strong); }
.btn.ghost { background: transparent; color: var(--text-soft); border-color: transparent; }
.btn.ghost:hover { color: var(--text-strong); background: var(--panel-2); }
.btn.danger { background: transparent; color: var(--danger); border: 1px dashed var(--danger); }
.btn.danger:hover { background: var(--danger); color: var(--on-accent); }
.btn.sm { padding: 3px 9px; font-size: 12px; }
form.inline { display: inline; }

/* ---------- tables ---------- */
/* A list table never spills out of its card: long words break, and if the columns still don't fit
   (narrow screens) the table scrolls sideways inside the card. */
.card:has(> table.data) { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.data th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--text-soft); background: var(--panel-2); border-bottom: 1px solid var(--border-strong); padding: 8px 10px; white-space: nowrap; }
table.data td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--panel-2); }
table.data tfoot td { font-weight: 600; border-top: 2px solid var(--text-soft); border-bottom: none; }
table.data th.right, table.data td.right { text-align: right; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; border: 1px solid var(--muted); color: var(--text-soft); white-space: nowrap; }
.badge.UNPAID, .badge.OPEN { border-color: var(--text-strong); color: var(--text-strong); font-weight: 600; }
.badge.PAID, .badge.CONVERTED, .badge.CREDITED, .badge.WRITTEN_OFF { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.badge.CANCELLED, .badge.DECLINED { text-decoration: line-through; color: var(--muted); border-color: var(--border-strong); }
.badge.DRAFT { border-style: dashed; color: var(--warn); border-color: var(--warn); }
.badge.ACCEPTED { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.badge.EXPIRED { color: var(--muted); border-color: var(--border-strong); }

/* ---------- forms ---------- */
/* The hidden attribute always hides (rules like label/.split { display: block } would otherwise show hidden boxes). */
[hidden] { display: none !important; }
label { display: block; font-size: 12px; color: var(--text-soft); margin-bottom: 4px; font-weight: 600; }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=email], input[type=month], input[type=password], select, textarea {
    width: 100%; padding: 7px 9px; border: 1px solid var(--border-strong); border-radius: var(--radius); font: inherit; background: var(--input-bg); color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--text-soft); outline-offset: -1px; border-color: var(--text-soft); }
textarea { resize: vertical; min-height: 60px; }
.field { margin-bottom: 14px; }
.field .hint { font-size: 11px; color: var(--muted); margin-top: 3px; }
.field-error { font-size: 12px; color: var(--danger); font-weight: 600; margin-top: 3px; }
.field-error::before { content: "! "; }
.overdue { color: var(--danger); font-weight: 600; margin-left: 6px; }
.checkbox { display: flex; gap: 8px; align-items: center; font-weight: normal; color: var(--text); font-size: 13px; }
.checkbox input { width: auto; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

/* ---------- flash ---------- */
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; background: var(--panel); border: 1px solid var(--border-strong); border-left-width: 4px; border-left-color: var(--text-soft); }
.flash.error { background: var(--danger-bg); color: var(--text-strong); border-color: var(--danger); }
.flash.error a { color: inherit; text-decoration: underline; }

/* ---------- document editor ---------- */
.lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lines th { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-soft); text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.lines th.internal, .lines td.internal { background: var(--panel-2); }
.lines td { padding: 4px; vertical-align: top; border-bottom: 1px solid var(--border); }
.lines input, .lines select, .lines textarea { padding: 5px 6px; font-size: 13px; }
.lines textarea { min-height: 32px; height: 32px; }
.lines .num { text-align: right; }
/* Many columns at laptop widths: no spinners (they hid the typed number), and the small boxes keep a readable width. */
.lines input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.lines input[type=number]::-webkit-inner-spin-button, .lines input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.lines .w-qty input, .lines .w-pct input { min-width: 52px; }
.lines .calc { font-size: 12px; text-align: right; padding-top: 10px; white-space: nowrap; color: var(--text-soft); }
.lines .calc.strong { font-weight: 700; color: var(--text-strong); }
.lines .neg { text-decoration: underline; font-weight: 700; }
.lines .w-code { width: 120px; }
.lines .w-sup { width: 150px; }
.lines .w-part { width: 130px; }
.lines .w-qty { width: 64px; }
.lines .w-unit { width: 84px; }
.lines .w-money { width: 100px; }
.lines .w-pct { width: 72px; }
.lines .rowno { color: var(--muted); font-size: 12px; padding-top: 10px; width: 20px; }
.legend { font-size: 12px; color: var(--text-soft); display: flex; gap: 18px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.legend .swatch { display: inline-block; width: 14px; height: 14px; background: var(--panel-2); border: 1px solid var(--border-strong); vertical-align: middle; margin-right: 4px; }
.totals-box { display: grid; grid-template-columns: auto auto; gap: 4px 18px; justify-content: end; font-variant-numeric: tabular-nums; }
.totals-box .k { color: var(--text-soft); text-align: right; }
.totals-box .v { text-align: right; font-weight: 600; min-width: 120px; }
.totals-box .big { font-size: 18px; border-top: 2px solid var(--text-soft); padding-top: 4px; }
.match-status { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: var(--radius); font-size: 12px; font-weight: 600; border: 1px solid var(--border-strong); color: var(--muted); }
.match-status.ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok); }
.match-status.bad { color: var(--danger); background: var(--danger-bg); border-color: var(--danger); }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; }
.kv .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; padding-top: 2px; }

.month-nav { display: flex; gap: 8px; align-items: center; }
.month-nav input { width: 170px; }

@media print {
    /* app pages printed from the browser (e.g. issued login details) print light */
    :root {
        color-scheme: light;
        --bg: #fff; --panel: #fff; --panel-2: #f2f2f2; --input-bg: #fff; --border: #e2e2e2; --border-strong: #c8c8c8;
        --text: #222; --text-strong: #111; --text-soft: #555; --muted: #888;
        --accent: #111; --accent-hover: #333; --on-accent: #fff; --on-accent-soft: #c8c8c8; --link: #111;
        --danger: #111; --danger-bg: #fff; --on-danger: #fff; --warn: #111; --money-in: #111; --ok: #111; --ok-bg: #fff;
        --warn-bg: #fff3dc; --row-known-bg: #eef7f0; --row-new-bg: #fff3dc;
    }
    .sidebar, .mobile-bar, .side-backdrop, .page-head .actions, .no-print, .flash, .list-filter { display: none !important; }
    body, html.side-closed body { padding-left: 0; }
    main { padding: 0; max-width: none; }
    .card { border: none; padding: 0; overflow: visible !important; }
}

.brand .version { font-size: 10px; font-weight: normal; opacity: .6; margin-left: 4px; }
.last-bought { font-size: 11px; color: var(--muted); margin-top: 2px; }
.last-bought:empty { display: none; }
.lots-input { width: 100%; min-width: 120px; margin-top: 4px; font-size: 12px; }
.lots-input[hidden] { display: none; }
.line-lots { font-size: 11px; color: var(--muted); }
.line-note { font-size: 11px; margin-top: 2px; }
.line-note:empty { display: none; }
.lines [hidden] { display: none; }   /* label { display: block } would otherwise show hidden line boxes */
.line-note .btn { padding: 0 6px; font-size: 11px; }
.lines tr.short-stock td.w-qty input { border-color: var(--danger); color: var(--danger); }

.strong { font-weight: 600; }

/* ---------- bank ---------- */
a.stat-link { display: block; text-decoration: none; color: var(--text); }
a.stat-link:hover { border-color: var(--border-strong); background: var(--panel-2); }
a.bank-card { display: block; text-decoration: none; color: var(--text); }
a.bank-card:hover { border-color: var(--border-strong); background: var(--panel-2); }
a.bank-card h2 { margin: 4px 0 8px; color: var(--text-strong); text-transform: none; letter-spacing: 0; font-size: 16px; }
.bank-balance { font-size: 22px; font-weight: 600; color: var(--text-strong); }
.money-in { color: var(--money-in); }
.money-out { color: var(--text); }
tr.gap-row td { color: var(--danger); background: var(--danger-bg); font-size: 12px; }
tr.to-assign td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.badge.to-assign-badge { color: var(--danger); border-color: var(--danger); }
.badge.suggested { color: var(--warn); border-color: var(--warn); }
tr.month-row td { font-weight: 700; color: var(--text-soft); background: var(--panel-2); }
form.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; }
form.filters select, form.filters input { width: auto; }
/* Type-to-search box on list pages (fragments :: listFilter). */
.list-filter { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-filter input[type=search] { width: 260px; max-width: 100%; }
.list-filter select { width: auto; }
.card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.raw-lines { border-collapse: collapse; width: 100%; }
.raw-lines td { padding: 1px 8px; vertical-align: top; overflow-wrap: anywhere; }
.raw-lines td:first-child { width: 36px; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
/* item search drop-down */
.picker { position: relative; }
.picker-list { position: absolute; z-index: 30; left: 0; top: 100%; min-width: 460px; max-width: 640px; max-height: 320px; overflow-y: auto;
    background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 6px 18px var(--shadow); margin-top: 2px; }
.picker-list div { padding: 6px 10px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.3; }
.picker-list div:last-child { border-bottom: none; }
.picker-list div.on, .picker-list div:hover { background: var(--panel-2); }
.picker-list .code { font-family: var(--mono); font-weight: 600; margin-right: 8px; }
.picker-list .part { font-family: var(--mono); color: var(--muted); font-size: 11px; margin-right: 8px; }
.picker-list .new { font-style: italic; color: var(--text-soft); }

/* update popup */
.modal-backdrop { position: fixed; inset: 0; background: var(--backdrop); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-backdrop[hidden] { display: none; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; max-width: 440px; width: 100%; box-shadow: 0 10px 40px var(--shadow); }
.modal .form-actions { justify-content: flex-end; margin-top: 16px; }

/* Audit trail: one change per line */
.audit-details { white-space: pre-line; overflow-wrap: anywhere; }

/* Keyboard entry (supplier invoices): the fields typed from the paper stacked on the left, the rest beside them */
.quick-head { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 0 28px; align-items: start; }
.quick-box { display: flex; align-items: center; gap: 6px; }
.quick-box > input[type=text] { flex: 1; min-width: 0; }
.quick-box .picker-list { top: 100%; }
/* "Delivery for" picker on supplier invoices */
.field.span-all { grid-column: 1 / -1; }
.delivery-picker .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.delivery-picker .chips:empty { display: none; }
.delivery-picker .chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 8px; background: var(--panel-2);
    border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; max-width: 100%; }
.delivery-picker .chip-text { overflow-wrap: anywhere; }
.delivery-picker .chip-x { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.delivery-picker .chip-x:hover { color: var(--text-strong); }
.entry-mark { width: 18px; font-weight: 700; text-align: center; }
.entry-mark.ok { color: var(--ok); }
.entry-mark.bad { color: var(--danger); }
.date-said { font-size: 11px; color: var(--muted); margin-top: 3px; min-height: 14px; }
.keys-hint { margin-top: 4px; }
@media (max-width: 900px) { .quick-head { grid-template-columns: minmax(0, 1fr); } .quick-rest.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Fixed asset card: months after the last complete month are a forecast, not yet in the ledger */
table.data tr.forecast td { color: var(--muted); font-style: italic; }
.method-help, .allowance-help { white-space: pre-line; }

/* Lots and serial numbers (M6) */
dl.facts { display: grid; grid-template-columns: 170px 1fr; gap: 4px 12px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; padding-top: 2px; }
dl.facts dd { margin: 0; }
.form-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.form-row > div { min-width: 120px; }
ul.trace { list-style: none; margin: 4px 0 0 0; padding-left: 16px; border-left: 1px solid var(--border); }
ul.trace > li { margin: 4px 0; }
.card > ul.trace { border-left: 0; padding-left: 0; }
@media (max-width: 700px) { dl.facts { grid-template-columns: 1fr; } }
.badge.danger { color: var(--danger); border-color: var(--danger); }
.badge.warn { color: var(--warn); border-color: var(--warn); }

/* ---------- shared building blocks (UI core: js/entry.js, picker.js, confirm.js, list-filter.js) ---------- */
/* Column filters (U1) and sorting (U4): a row of boxes under a list's headings */
table.data tr.col-filters td { padding: 4px 6px; background: var(--panel-2); border-bottom: 1px solid var(--border-strong); vertical-align: top; }
table.data tr.col-filters input, table.data tr.col-filters select { width: 100%; min-width: 64px; padding: 3px 6px; font-size: 12px; }
table.data tr.col-filters .range { display: flex; flex-direction: column; gap: 3px; min-width: 80px; }
table.data tr.col-filters .date-box { display: block; }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover, table.data th.sortable:focus { color: var(--text-strong); outline: none; }
table.data th.sortable::after { content: " \2195"; color: var(--muted); font-size: 10px; }
table.data th[aria-sort=ascending]::after { content: " \25B2"; color: var(--text-strong); }
table.data th[aria-sort=descending]::after { content: " \25BC"; color: var(--text-strong); }
.filter-empty .btn { margin-left: 6px; }
/* Rows that open a record (U5): the first cell has a.row-link */
table.data a.row-link { color: inherit; text-decoration: none; }
table.data a.row-link:hover, table.data a.row-link:focus { text-decoration: underline; }
table.data tr.clickable:focus-within td { background: var(--panel-2); }
/* Pager (U3, fragments :: pager) */
.pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 10px; }
.pager-at { font-size: 13px; color: var(--text-soft); }
/* Typed dates (U9, fragments :: dateField / dateBox) */
.date-box { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; max-width: 100%; }
.date-box > input[type=text] { width: 120px; flex: 0 0 auto; }
.date-box > .date-said { flex-basis: 100%; margin-top: 0; }
.field > .date-box { display: flex; }
/* Picker (U7, fragments :: picker) */
.picker-field { display: flex; align-items: center; gap: 6px; }
.picker-field > input[type=text] { flex: 1; min-width: 0; }
.picker-list .new-row { color: var(--text-soft); font-weight: 600; }
/* Dialogs (U8 confirm, quick add, shortcut sheet; js/confirm.js) */
dialog.dialog { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
    width: min(440px, calc(100vw - 32px)); box-shadow: 0 10px 40px var(--shadow); }
dialog.dialog::backdrop { background: var(--backdrop); }
dialog.dialog .form-actions { justify-content: flex-end; margin-top: 16px; }
dialog.dialog .dialog-text { white-space: pre-line; }
dialog.keys-sheet { width: min(520px, calc(100vw - 32px)); }
dl.keys { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: 13px; }
dl.keys dt { white-space: nowrap; }
dl.keys dd { margin: 0; color: var(--text-soft); }
kbd { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--radius);
    background: var(--panel-2); font-family: var(--mono); font-size: 12px; text-align: center; color: var(--text-strong); }
.side-foot .keys-button { padding: 1px 8px; }
@media print { dialog { display: none !important; } table.data tr.col-filters { display: none; } }

/* ---- B9 credit control (filter bars, worklist tiles, run progress); colours are the tokens above ---- */
form.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; }
form.filter-bar input.num { width: 70px; }
.cc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.cc-progress { height: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 8px 0; }
.cc-progress > span { display: block; height: 100%; background: var(--ok); }
.cc-flag { display: inline-block; padding: 0 6px; margin-left: 4px; border-radius: 10px; font-size: 11px; border: 1px solid var(--warn); color: var(--warn); white-space: nowrap; }
.cc-flag.bad { border-color: var(--danger); color: var(--danger); }
.cc-flag.ok { border-color: var(--ok); color: var(--ok); }

/* ---- B5b bank core v2: review screen, splits, cash, reconciliation (colours are the tokens above) ---- */
.badge.green { color: var(--ok); border-color: var(--ok); }
.badge.amber { color: var(--warn); border-color: var(--warn); }
.badge.grey { color: var(--muted); border-color: var(--border-strong); }
table.review .suggestion { margin-top: 4px; font-family: var(--font); }
table.review .suggestion .reasons { margin: 2px 0 0 18px; padding: 0; color: var(--muted); font-size: 12px; }
table.review tr.row-done td { opacity: .65; }
table.review tr.row-done td.assign { opacity: 1; }
table.review .what-line { display: flex; gap: 6px; align-items: center; }
table.review .what-box { flex: 1; min-width: 220px; }
table.review .what-box input { width: 100%; }
table.review .row-msg { margin-top: 2px; }
table.review .error-text { color: var(--danger); }
table.review .diff-box, table.review .split, table.review .payment-option { display: block; margin-top: 4px; }
table.split-grid td { padding: 2px 4px 2px 0; border: 0; }
table.split-grid input.part-amount { width: 110px; }
table.split-grid .part-box input { min-width: 200px; }
.recon-figures .ok-text { color: var(--ok); }
.recon-figures .warn-text { color: var(--warn); }


/* ---- online imports (K16 settlement files, S19 daily sales): own block, existing tokens only ---- */
.oi-warn { border-color: var(--warn); }
.oi-warn strong { color: var(--warn); }
.oi-tick { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.oi-apply { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0 24px; }
table.oi-grid input { width: 100%; min-width: 80px; }
table.oi-grid input.num { width: 110px; min-width: 0; }

/* ---- B11 approvals: request status badges and the approval card's steps (existing tokens only) ---- */
.badge.PENDING { border-color: var(--warn); color: var(--warn); }
.badge.APPROVED { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.badge.REJECTED { color: var(--danger); border-color: var(--danger); }
.badge.WITHDRAWN, .badge.LAPSED { color: var(--muted); border-color: var(--border-strong); }
.approval-steps { margin: 6px 0 10px 18px; padding: 0; }
.approval-decide { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.approval-decide .field { flex: 1 1 240px; margin: 0; }


/* ---- B8 sales orders, delivery notes, deposits and progress claims: own block, existing tokens only ---- */
.badge.CLOSED { color: var(--muted); border-color: var(--border-strong); }
.b8-actions .form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
table.b8-progress td.strong { color: var(--text-strong); }

/* ---- S16 / P16 sales and purchase reports (reports/sales-*.html, reports/purchases-*.html) ---------------------- */
.report-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.report-ranges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.report-stats { margin-bottom: 18px; }
table.report-bridge td:last-child { width: 1%; }
@media print { .report-tabs, .report-ranges { display: none; } }

/* ---- P11 bill inbox (templates/inbox/*, the capture panel on the supplier invoice / credit note forms) ---- */
.inbox-drop { border-style: dashed; }
.inbox-drop.dragging { border-color: var(--accent); background: var(--panel-2); }
.inbox-drop-zone { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; cursor: pointer; }
.inbox-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.inbox-viewer iframe { width: 100%; height: 78vh; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel-2); }
.inbox-viewer img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.inbox-viewer .small { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.inbox-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 32vw; z-index: 15; overflow-y: auto; background: var(--panel); border-left: 1px solid var(--border); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.inbox-panel .inbox-viewer iframe { height: 68vh; }
.inbox-panel-head { display: flex; flex-direction: column; gap: 2px; }
main:has(.inbox-panel) { max-width: none; margin: 0 32vw 0 0; }
.inbox-lines { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 1500px) {
    .inbox-split { grid-template-columns: minmax(0, 1fr); }
    .inbox-panel { position: static; width: auto; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; }
    main:has(.inbox-panel) { margin: 0 auto; }
    .inbox-panel .inbox-viewer iframe { height: 60vh; }
}
@media print { .inbox-panel, .inbox-drop { display: none; } }

/* ---- C13 projects: weekly timesheet grid (templates/projects/timesheet.html, js/timesheet.js) ---- */
.ts-grid .ts-h { width: 4.5em; }
.ts-grid .ts-total, .ts-grid tfoot th { font-variant-numeric: tabular-nums; }
.ts-grid .ts-over { color: var(--warn); font-weight: 600; }
.ts-grid .ts-bad { border-color: var(--danger); }
/* ---- end C13 ---- */

/* ---- C3 counts, reorder, stock reviews ---- */
.count-box { max-width: 120px; }
.scan-input { font-size: 1.4em; letter-spacing: .04em; }
.scan-said { min-height: 1.6em; margin-top: 10px; font-size: 1.15em; color: var(--text-strong); }
.scan-said.danger-text { color: var(--danger); }
table.data tr.attention td { border-left-color: var(--warn); background: var(--panel-2); }
/* ---- end C3 ---- */

/* ---- C14 project costs: the "For" / "Project" picker on cost lines ------------------------------------------------ */
td.w-for { min-width: 13rem; }
td.w-for .picker-field input[type="text"] { width: 100%; }
td.w-for .for-project, td.w-for select.sm { margin-top: 4px; }
.w-pct { width: 6.5rem; }

/* ---- C10 material planning and capacity (templates/planning/*) ---- */
table.cap-grid td.cap-over { color: var(--danger); font-weight: 600; background: var(--panel-2); }
/* ---- end C10 ---- */

/* ---------- bank import check (2026-11-24) ---------- */
table.data tr.row-known td { background: var(--row-known-bg); }
table.data tr.row-new td { background: var(--row-new-bg); }
svg.qr { display: block; width: 200px; height: 200px; margin: 8px 0; shape-rendering: crispEdges; }
svg.qr .qr-off { fill: var(--qr-off); }
svg.qr .qr-on { fill: var(--qr-on); }
.badge.known { border-color: var(--ok); color: var(--ok); }
.badge.new { border-color: var(--warn); color: var(--warn); font-weight: 600; }
.import-confirm { display: grid; grid-template-columns: max-content 160px; gap: 8px 16px; align-items: center; margin: 14px 0; }
.import-confirm .figure { text-align: right; font-weight: 600; color: var(--text-strong); }
.import-confirm input { text-align: right; }
.agrees { color: var(--ok); font-weight: 600; }
.disagrees { color: var(--danger); font-weight: 600; }
.drop-zone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 10px 12px; }
.drop-zone.over { border-color: var(--warn); background: var(--warn-bg); }

/* ---------- sales editor: price differs from the last charged (2026-11-24) ---------- */
.lines input.price-differs { border: 2px solid var(--warn); background: var(--warn-bg); color: var(--text-strong); font-weight: 600; }
.line-note.last-price-chip { display: inline-block; padding: 3px 8px; border-radius: var(--radius); border: 1px solid var(--warn);
    background: var(--warn-bg); color: var(--warn); font-size: 12px; font-weight: 600; }
.line-note.last-price-chip .btn { color: var(--text-strong); border-color: var(--warn); margin-left: 4px; }
/* ---- C12 shop floor (templates/shopfloor/*): large, high-contrast, touch-sized; existing tokens only ---- */
body.floor .floor-main { font-size: 17px; }
.floor .page-head .floor-centre { font-size: 20px; font-weight: 600; color: var(--text-strong); }
.floor .btn.big { min-height: 56px; min-width: 56px; padding: 10px 22px; font-size: 20px; justify-content: center; }
.floor-hint { color: var(--text-soft); font-size: 17px; }
.floor-tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.floor-tile { display: flex; flex-direction: column; gap: 6px; padding: 22px; min-height: 130px; background: var(--panel); border: 2px solid var(--border-strong); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.floor-tile:hover, .floor-tile:focus { border-color: var(--accent); color: var(--text-strong); }
.floor-tile-code { font-size: 28px; font-weight: 700; color: var(--text-strong); }
.floor-tile-name { font-size: 18px; }
.floor-tile-count { color: var(--muted); font-size: 15px; }
.floor-who summary { cursor: pointer; font-size: 18px; padding: 4px 0; }
.floor-people, .floor-lots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.floor-filter input { width: 100%; max-width: 480px; font-size: 18px; padding: 12px; margin-bottom: 14px; }
.floor-queue { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-bottom: 18px; }
.floor-card { background: var(--panel); border: 2px solid var(--border); border-left-width: 8px; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.floor-card.state-RUNNING { border-color: var(--ok); }
.floor-card.state-PAUSED { border-left-color: var(--warn); }
.floor-card.state-LATER { opacity: .7; }
.floor-card-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.floor-order { font-size: 24px; font-weight: 700; color: var(--text-strong); font-family: var(--mono); }
.floor-state { font-size: 14px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-soft); border: 1px solid var(--border-strong); border-radius: 10px; padding: 1px 10px; }
.state-RUNNING .floor-state { color: var(--ok); border-color: var(--ok); }
.state-PAUSED .floor-state { color: var(--warn); border-color: var(--warn); }
.floor-date { margin-left: auto; color: var(--muted); }
.floor-what { font-size: 20px; font-weight: 600; color: var(--text-strong); }
.floor-qty { font-size: 22px; }
.floor-step { font-size: 18px; color: var(--text-soft); }
.floor-last { margin-left: 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; }
.floor-note { color: var(--warn); font-size: 15px; }
.floor-hours { display: flex; gap: 18px; color: var(--muted); font-size: 15px; }
.floor-timers { list-style: none; margin: 0; padding: 0; }
.floor-timers li { display: flex; justify-content: space-between; font-size: 18px; padding: 4px 0; border-top: 1px solid var(--border); }
.floor-clock { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--ok); }
.floor-clock.floor-clock-long { color: var(--danger); }
.floor-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.floor-buttons form { margin: 0; }
.floor-long { border-color: var(--danger); }
.floor-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 14px; }
.floor-num { width: 140px; min-height: 56px; font-size: 24px; text-align: center; }
.floor-text { min-width: 260px; min-height: 56px; font-size: 20px; padding: 6px 12px; }
.floor-label { display: block; font-size: 17px; color: var(--text-soft); margin-top: 10px; }
.floor-tick { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 12px 0; }
.floor-tick input { width: 28px; height: 28px; }
.floor .btn.floor-picked { border-color: var(--accent); color: var(--text-strong); }
.floor-table td, .floor-table th { font-size: 16px; padding-top: 10px; padding-bottom: 10px; }
tr.floor-ok td { color: var(--ok); }
.floor-scan-line { display: flex; align-items: center; gap: 8px; }
.floor-out, .floor-done-list { list-style: none; padding: 0; margin: 0 0 12px; }
.floor-out li, .floor-done-list li { padding: 8px 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 800px) { .floor-queue { grid-template-columns: 1fr; } .floor-text { min-width: 0; width: 100%; } }
/* ---- end C12 ---- */

/* ---- Home work list (templates/index.html, js/home-cards.js; spec 2026-11-26-home-work-list): existing tokens only ---- */
.home-figures { margin: 18px 0; }
.home-figures .stat { padding: 10px 14px; }
.home-figures .stat .value { font-size: 18px; }
.home-clear { margin: 0 0 12px; }
.home-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: start; }
.home-card { margin-bottom: 0; }
.home-card h2 { display: flex; align-items: center; gap: 8px; }
.home-card h2 .ic { width: 18px; height: 18px; stroke: var(--text-soft); fill: none; stroke-width: 1.8; }
.home-rows { list-style: none; margin: 0; padding: 0; }
.home-rows li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.home-rows li:last-child { border-bottom: 0; }
.home-rows a { color: var(--link); text-decoration: none; }
.home-rows a:hover { text-decoration: underline; }
.home-others { margin-top: 10px; }
.home-others h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 0 0 4px; font-weight: 600; }
.home-others .home-rows a { color: var(--muted); }
.home-customise-list { list-style: none; margin: 0; padding: 0; }
.home-customise-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.home-customise-list li:focus-within { background: var(--panel-2); }
.home-customise-list li.is-hidden .home-customise-name { color: var(--muted); text-decoration: line-through; }
.home-customise-name { flex: 1; }
.home-customise-count { font-variant-numeric: tabular-nums; color: var(--warn); font-weight: 600; }
.home-customise-actions { display: flex; gap: 6px; }
.btn.btn-mini { padding: 3px 10px; font-size: 12px; }
.home-error { color: var(--danger); }
.home-n { color: var(--text-strong); font-weight: 700; font-variant-numeric: tabular-nums; }
.home-others .home-n { color: var(--text-soft); }
.home-clear-line { margin: 12px 0 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* ---- end home work list ---- */

/* D7 UI sweep: small layout helpers that replace inline style="..." (U10). Width helpers win over the input rules. */
.gap-tight { gap: 0 14px; }
.gap-end { gap: 10px; align-items: end; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.w-60 { width: 60px !important; }
.w-110 { width: 110px !important; }
.w-140 { width: 140px !important; }
.w-160 { width: 160px !important; }
.w-170 { width: 170px !important; }
.w-180 { width: 180px !important; }
.w-260 { width: 260px !important; max-width: 100%; }
.w-auto { width: auto !important; }
.mw-90 { max-width: 90px !important; }
.mw-120 { max-width: 120px !important; }
.mw-140 { max-width: 140px !important; }
.mw-460 { max-width: 460px; }
.mw-560 { max-width: 560px; }
.pre-line { white-space: pre-line; }
.break-all { word-break: break-all; }
.justify-start { justify-content: start; }
.code-big { font-family: var(--mono); font-size: 15px; }
/* ---- end D7 UI sweep ---- */
