/*
 * Bouwfactuur – app stylesheet (no build step).
 * Mobile-first: bottom navigation on phones, sidebar from 1024px.
 * Calm grey-white surfaces, one accent colour (overridable per company).
 */

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url('../fonts/manrope-latin-ext-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url('../fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --accent: #B4501C;
    --accent-ink: #ffffff;
    --accent-soft: color-mix(in srgb, var(--accent) 10%, white);
    --accent-line: color-mix(in srgb, var(--accent) 28%, white);

    --bg: #F5F4F1;
    --surface: #ffffff;
    --surface-2: #FAF9F7;
    --line: #E6E3DE;
    --line-strong: #D6D2CB;
    --ink: #1E1C19;
    --ink-2: #4A4740;
    --muted: #77736B;

    --ok: #2F7D4F;      --ok-soft: #E7F3EC;
    --warn: #9A6B00;    --warn-soft: #FBF1D9;
    --bad: #B42318;     --bad-soft: #FDECEA;
    --info: #2D5F99;    --info-soft: #E8F0FA;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(30, 28, 25, .05), 0 2px 8px rgba(30, 28, 25, .04);
    --nav-h: 64px;
    --sidebar-w: 248px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 22px; font-weight: 750; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
p { margin: 0 0 .75em; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- App shell ---------- */

.shell { min-height: 100vh; min-height: 100dvh; }

.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 12px;
    height: 56px; padding: 0 16px;
    padding-top: env(safe-area-inset-top, 0px);
    box-sizing: content-box;
    background: rgba(245, 244, 241, .92);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; font-weight: 750; }
.topbar .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .spacer { flex: 1; }

.brand-mark {
    display: grid; place-items: center; flex: none;
    width: 32px; height: 32px; border-radius: 9px;
    background: var(--accent); color: var(--accent-ink);
    font-weight: 800; font-size: 15px;
}
.brand-logo { max-height: 32px; max-width: 120px; object-fit: contain; }

.main {
    padding: 16px 16px calc(var(--nav-h) + var(--safe-b) + 24px);
    max-width: 1120px; margin: 0 auto;
}
.main.main-wide { max-width: 1480px; }

/* Bottom navigation (phones/tablets) */
.bottomnav {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    height: calc(var(--nav-h) + var(--safe-b));
    padding-bottom: var(--safe-b);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
}
.bottomnav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 11px; font-weight: 650; color: var(--muted); text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.bottomnav a svg { width: 22px; height: 22px; }
.bottomnav a[aria-current="page"] { color: var(--accent); }

/* Sidebar (desktop) */
.sidebar { display: none; }

@media (min-width: 1024px) {
    .shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; }
    .topbar, .bottomnav { display: none; }
    .sidebar {
        display: flex; flex-direction: column;
        position: sticky; top: 0; height: 100vh;
        padding: 20px 14px; gap: 4px;
        background: var(--surface); border-right: 1px solid var(--line);
    }
    .sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 750; text-decoration: none; }
    .sidebar .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .sidebar nav { display: flex; flex-direction: column; gap: 2px; }
    .sidebar .nav-label { margin: 16px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
    .sidebar nav a {
        display: flex; align-items: center; gap: 12px;
        padding: 9px 10px; border-radius: 10px;
        font-weight: 600; color: var(--ink-2); text-decoration: none;
    }
    .sidebar nav a svg { width: 20px; height: 20px; color: var(--muted); }
    .sidebar nav a:hover { background: var(--surface-2); }
    .sidebar nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
    .sidebar nav a[aria-current="page"] svg { color: var(--accent); }
    .sidebar .user { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
    .sidebar .user strong { display: block; }
    .main { padding: 32px 40px 48px; }
}

/* ---------- Page header ---------- */

.page-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .titles { flex: 1 1 260px; min-width: 0; }
.page-head .titles p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; }
.back:hover { color: var(--ink); }

/* ---------- Cards & sections ---------- */

.card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.card + .card, .card + .stack, .stack + .card { margin-top: 16px; }
.card-body { padding: 16px; }
.card-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-head h2 { flex: 1; }
@media (min-width: 768px) { .card-body { padding: 20px; } .card-head { padding: 16px 20px; } }

.stack { display: grid; gap: 16px; }
.cols { display: grid; gap: 16px; }
@media (min-width: 900px) {
    .cols { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
    .cols.even { grid-template-columns: 1fr 1fr; }
}

.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; display: block; }
.stat .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat .value { margin-top: 4px; font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--muted); }
.stat.accent .value { color: var(--accent); }
.stat.bad .value { color: var(--bad); }

dl.details { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 8px 12px; margin: 0; }
dl.details dt { color: var(--muted); font-size: 14px; }
dl.details dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }

/* ---------- Lists (cards on mobile, rows on desktop) ---------- */

.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--line); }
.list-row {
    display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
    padding: 12px 16px; text-decoration: none; color: inherit;
}
a.list-row:hover { background: var(--surface-2); }
.list-row .primary { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .secondary { grid-column: 1; font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .end { grid-row: 1 / span 2; grid-column: 2; text-align: right; display: grid; gap: 4px; justify-items: end; }
@media (min-width: 768px) { .list-row { padding: 12px 20px; } }

.empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table th { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; }
.table tr.section td { background: var(--surface-2); font-weight: 700; }
.table tr.optional td { color: var(--muted); }
.table tfoot td { border-bottom: 0; }
@media (max-width: 640px) {
    .table.stack-sm thead { display: none; }
    .table.stack-sm tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 12px; border-bottom: 1px solid var(--line); }
    .table.stack-sm td { padding: 0; border: 0; }
    .table.stack-sm td.desc { grid-column: 1 / -1; font-weight: 600; margin-bottom: 2px; }
    .table.stack-sm tr { align-items: baseline; }
    .table.stack-sm td.qty { color: var(--muted); font-size: 13px; text-align: left; }
    .table.stack-sm td.price, .table.stack-sm td.vat { display: none; }
    .table.stack-sm td.total { text-align: right; font-weight: 650; }
    .table.stack-sm tr.section { display: block; background: var(--surface-2); }
    .table.stack-sm tr.section td { background: none; }
}

.totals { margin-left: auto; width: 100%; max-width: 360px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.totals .grand { margin-top: 6px; padding-top: 10px; border-top: 2px solid var(--ink); font-size: 17px; font-weight: 800; }

/* ---------- Badges ---------- */

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 700; white-space: nowrap;
    background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 0 16px;
    border: 1px solid var(--line-strong); border-radius: 11px;
    background: var(--surface); color: var(--ink);
    font: inherit; font-weight: 650; font-size: 14px; line-height: 1;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(0, 0, 0, .04); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: rgba(0, 0, 0, .05); }
.icon-btn svg { width: 20px; height: 20px; }
form.inline { display: inline; }

/* ---------- Forms ---------- */

.form-grid { display: grid; gap: 14px; }
@media (min-width: 640px) {
    .form-grid.two { grid-template-columns: 1fr 1fr; }
    .form-grid.three { grid-template-columns: repeat(3, 1fr); }
    .form-grid .span-all { grid-column: 1 / -1; }
}
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .error { font-size: 13px; color: var(--bad); font-weight: 600; }
.input, select.input, textarea.input {
    width: 100%; min-height: 44px; padding: 10px 12px;
    border: 1px solid var(--line-strong); border-radius: 10px;
    background: var(--surface); color: var(--ink);
    font: inherit; font-size: 16px; /* 16px avoids iOS zoom */
}
textarea.input { min-height: 88px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.is-invalid { border-color: var(--bad); }
input[type="color"].input { padding: 4px; height: 44px; }
@media (min-width: 1024px) { .input, select.input, textarea.input { font-size: 15px; min-height: 40px; } }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 550; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 639px) {
    .form-actions.sticky {
        position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 5;
        padding: 10px; margin: 20px -6px 0; border-radius: 14px;
        background: rgba(255, 255, 255, .95); border: 1px solid var(--line); box-shadow: var(--shadow);
    }
    .form-actions.sticky .btn { flex: 1; }
}
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; font-weight: 700; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .search { flex: 1 1 220px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 650; text-decoration: none; color: var(--ink-2); }
.tabs a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Line editor ----------
 * Laid out by the width of the editor itself (container queries):
 *  - narrow (phone): a card per line, labels above the fields
 *  - medium: two rows per line, labels above the fields
 *  - wide: one row per line with column headers on top
 */

.lines-wrap { container-type: inline-size; container-name: lines; }
.lines-list { display: grid; gap: 10px; min-width: 0; }
.line-row > * { min-width: 0; }
.line-row {
    display: grid; gap: 8px 10px; padding: 12px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
        "desc desc"
        "qty unit"
        "price disc"
        "cat rate"
        "opts opts"
        "total tools";
}
.line-row .f-desc { grid-area: desc; }
.line-row .f-qty { grid-area: qty; }
.line-row .f-unit { grid-area: unit; }
.line-row .f-price { grid-area: price; }
.line-row .f-disc { grid-area: disc; }
.line-row .f-cat { grid-area: cat; }
.line-row .f-rate { grid-area: rate; }
.line-row .f-opts { grid-area: opts; display: flex; align-items: center; }
.line-row .f-tools { grid-area: tools; display: flex; justify-content: flex-end; align-items: center; gap: 0; }
.line-row .f-total { grid-area: total; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.line-row .f-total .label { font-size: 12px; }
.line-row .f-total .num { font-weight: 750; font-size: 15px; white-space: nowrap; }
.line-row .field { gap: 4px; }
.line-row .field > label { font-size: 12px; color: var(--muted); }
.line-row .num-input { text-align: right; font-variant-numeric: tabular-nums; }
.line-row select.input { padding-left: 8px; padding-right: 4px; text-overflow: ellipsis; }
@media (min-width: 1024px) { .line-row .input { font-size: 14px; } .line-row .num-input { padding-left: 6px; padding-right: 8px; } }
.line-row .icon-btn { width: 34px; height: 34px; }
.line-row.is-section { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "desc tools"; background: var(--surface-2); }
.line-row.is-text { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "desc tools"; }
.line-row.is-section .f-desc .input { font-weight: 700; }
.line-row.is-section .f-tools, .line-row.is-text .f-tools { align-self: end; }
.lines-wrap .head-row { display: none; }

/* Medium: two rows per line. */
@container lines (min-width: 640px) {
    .line-row.is-item {
        grid-template-columns: 0.7fr 0.85fr 1fr 0.75fr 1.35fr 1.35fr 112px 106px;
        grid-template-areas:
            "desc desc desc desc desc desc total tools"
            "qty unit price disc cat rate opts opts";
        align-items: end;
    }
    .line-row .f-total { align-items: flex-end; text-align: right; align-self: end; padding-bottom: 8px; }
}

/* Wide: one row per line, headers on top. */
@container lines (min-width: 1000px) {
    .lines-wrap .head-row, .line-row.is-item {
        grid-template-columns: minmax(160px, 1fr) 64px 76px 100px 64px 132px 104px 104px 102px;
        column-gap: 8px;
    }
    .lines-wrap .head-row {
        display: grid; padding: 0 13px 6px;
        font-size: 12px; font-weight: 700; color: var(--muted);
        position: sticky; top: 0; z-index: 2; background: var(--surface);
    }
    .line-row.is-item {
        grid-template-areas: "desc qty unit price disc cat rate total tools" "opts opts opts opts opts opts opts opts opts";
        align-items: center; padding: 8px 12px; row-gap: 4px;
    }
    .line-row.is-item .field > label { display: none; }
    .line-row.is-item .f-total { padding-bottom: 0; align-self: center; }
    .line-row.is-item .f-total .label { display: none; }
    .line-row.is-item .f-opts:not(:has(input:checked)) { opacity: .75; }
    .line-row.is-section, .line-row.is-text { padding: 8px 12px; }
    .line-row.is-section .field > label, .line-row.is-text .field > label { display: none; }
}
@media (max-width: 1023px) { .lines-wrap .head-row { position: static; } }

.editor-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.editor-summary { margin: 16px 0 0 auto; max-width: 380px; display: grid; gap: 6px; font-size: 14px; }
.editor-summary > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.editor-summary .grand { padding-top: 8px; border-top: 2px solid var(--ink); font-weight: 800; font-size: 16px; }
.editor-summary .discount-row label { font-weight: 600; }
.editor-summary .discount-input { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.editor-summary .discount-input .input { width: 90px; min-height: 36px; padding: 6px 8px; text-align: right; }

/* ---------- Alerts ---------- */

.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-weight: 550; border: 1px solid transparent; }
.alert ul { margin: 6px 0 0; padding-left: 18px; font-weight: 500; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--info-soft); color: var(--info); }

.env-banner { padding: 6px 16px; background: #2B2A27; color: #F5F4F1; font-size: 12px; font-weight: 650; text-align: center; letter-spacing: .02em; }

/* ---------- Document preview (quote/invoice) ---------- */

.doc { padding: 20px; }
@media (min-width: 768px) { .doc { padding: 32px 36px; } }
.doc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 2px solid var(--accent); }
.doc-logo img { max-height: 90px; max-width: 260px; object-fit: contain; }
.doc-logo-name { font-size: 22px; font-weight: 800; color: var(--accent); }
.doc-seller { text-align: right; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.doc-seller strong { display: block; font-size: 15px; color: var(--ink); }
.doc-parties { display: grid; gap: 16px; margin: 20px 0 22px; }
@media (min-width: 640px) { .doc-parties { grid-template-columns: 1fr 1fr; } }
.doc-buyer { font-size: 14px; line-height: 1.5; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.doc-buyer strong { display: block; font-size: 15px; }
.doc-caption { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.doc-meta h2 { font-size: 19px; margin-bottom: 8px; }
.doc-meta dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 0; font-size: 13px; }
.doc-meta dt { color: var(--muted); }
.doc-meta dd { margin: 0; font-weight: 600; }
@media (max-width: 639px) { .doc-seller { text-align: left; } }
.doc .legal { margin-top: 16px; font-size: 12px; color: var(--ink-2); }
.doc .legal p { margin-bottom: 6px; }
.pay-box { margin-top: 16px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }

/* ---------- Menu ("Meer") ---------- */

.menu-list a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; font-weight: 600; }
.menu-list a svg { width: 22px; height: 22px; color: var(--muted); }
.menu-list a .chev { margin-left: auto; color: var(--line-strong); }

/* ---------- Auth ---------- */

.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: 100%; max-width: 400px; }
.auth .brand { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 20px; font-weight: 750; font-size: 18px; }

/* ---------- Print (quotes & invoices) ---------- */

@media print {
    @page { margin: 14mm; }
    body { background: #fff; font-size: 11pt; }
    .topbar, .bottomnav, .sidebar, .page-head, .no-print, .env-banner, .alert, .back { display: none !important; }
    .shell { display: block; }
    .main { padding: 0; max-width: none; }
    .card { border: 0; box-shadow: none; }
    .doc { padding: 0; }
    .print-only { display: block !important; }
    .doc-top { flex-wrap: nowrap; }
    .doc-seller { text-align: right; }
    .doc-parties { grid-template-columns: 1fr 1fr; }
    .doc-top, .badge, .table tr.section td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .table th { background: none; }
    a { text-decoration: none; }
}
.print-only { display: none; }
