* { box-sizing: border-box; }
:root {
    --nav-w: 210px;
    --topbar-h: 48px;
    /* Signature diagonal sheen from the SvelteKit reference: a subtle
       dark→light overlay layered on top of a solid theme colour. */
    --sheen: linear-gradient(to top left, rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.15));
    --border: color-mix(in srgb, var(--text) 25%, transparent);
}
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background-color: var(--bg);
    background-image: var(--sheen);
    background-attachment: fixed; /* sheen spans the whole viewport, not per-element */
    color: var(--text);
}
main { padding: 1rem; max-width: 1200px; margin: 0 auto; }

/* ── App shell: left sidebar nav + content (hamburger drawer on mobile) ── */
.app-shell { display: flex; align-items: flex-start; }
.content-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Mobile-only top bar with the hamburger toggle; hidden on desktop. */
.topbar { display: none; }
.hamburger {
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--btn-text);
    padding: 0.1rem 0.5rem;
    user-select: none;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: stretch;
    padding: 0.75rem 0.5rem;
    background-color: var(--btn-bg);
    background-image: var(--sheen);
    width: var(--nav-w);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.main-nav a {
    color: var(--btn-text);
    text-decoration: none;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
}
.main-nav a:hover { text-decoration: none; background: rgba(255, 255, 255, 0.14); }
.nav-user {
    margin-top: auto;
    color: var(--btn-text);
    opacity: 0.85;
    padding: 0.6rem 0.6rem 0.2rem;
}
.nav-backdrop { display: none; }

/* Mobile: nav collapses into a hamburger-driven off-canvas drawer. The
   #nav-toggle checkbox (toggled by the .hamburger label) drives it, so no
   JS is needed; navigating reloads the page and resets it closed. */
@media (max-width: 640px) {
    .topbar {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        position: sticky;
        top: 0;
        z-index: 250;
        height: var(--topbar-h);
        padding: 0.4rem 0.75rem;
        background-color: var(--btn-bg);
        background-image: var(--sheen);
        color: var(--btn-text);
    }
    .topbar-title { font-weight: 600; }
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        width: 240px;
        max-width: 80vw;
        z-index: 310; /* above .notif-banner (300) so an open drawer is never covered */
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.35);
    }
    .nav-toggle:checked ~ .app-shell .main-nav { transform: translateX(0); }
    .nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 305; /* above .notif-banner (300), below the drawer (310) */
        background: rgba(0, 0, 0, 0.45);
    }
    .nav-toggle:checked ~ .app-shell .nav-backdrop { display: block; }
}

input, select, textarea {
    background: var(--bg-fields);
    color: var(--field-text);
    border: 1px solid #999;
    border-radius: 4px;
    padding: 0.4rem 0.5rem;
    font: inherit;
}
button, .btn {
    background-color: var(--btn-bg);
    background-image: var(--sheen);
    color: var(--btn-text);
    border: none;
    border-radius: 4px;
    padding: 0.45rem 1rem;
    font: inherit;
    cursor: pointer;
}
label { display: block; margin: 0.5rem 0; }
.error { color: #B00020; font-weight: 600; }
h1 { margin-top: 0.5rem; }
.logout-form { display: block; margin: 0; padding: 0 0.6rem; }
.logout-btn {
    background: none;
    border: none;
    color: var(--btn-text);
    padding: 0;
    font: inherit;
    cursor: pointer;
}
.logout-btn:hover { text-decoration: underline; }

/* ── Generic list/report tables ─────────────────────────────────────────────
   Ported from the SvelteKit reference's global table styling; the PHP port
   had none, so these tables rendered borderless like plain labels. The
   bespoke grids (.planning-tabel, .logboek-tabel, .planning-dag-tabel) keep
   their own look via higher-specificity rules. */
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--border); padding: 5px 8px; text-align: left; vertical-align: top; }
th { background-color: var(--btn-bg); background-image: var(--sheen); color: var(--btn-text); }
tr:hover td { background-color: var(--bg-fields); }

/* ── Planning (port of Planning/+page.svelte styles) ── */
[hidden] { display: none !important; }

/* ── Week navigation ── */
.week-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.week-nav .btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--btn-bg);
    background-image: var(--sheen);
    color: var(--btn-text);
    border-radius: 3px;
    border: 1px solid #555;
    text-decoration: none;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.week-nav .btn-nav:hover {
    border-color: var(--select);
    color: var(--select);
    text-decoration: none;
    opacity: 1;
}

.week-nav .btn-nav-wide {
    width: auto;
    padding: 0 12px;
    font-size: 16px;
}

.week-nav .week-label {
    margin-left: 6px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}

/* ── Table wrapper ── */
.tabel-wrapper {
    overflow-x: auto;
}

/* ── Planning table ── */
.planning-tabel {
    border-collapse: collapse;
    width: 100%;
    min-width: 600px;
    table-layout: fixed;
}

.planning-tabel th,
.planning-tabel td {
    border: none;
    padding: 0;
    vertical-align: middle;
}

.planning-tabel thead tr.header-ruimte th {
    background-color: var(--btn-bg);
    background-image: var(--sheen);
    color: var(--btn-text);
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    padding: 6px 10px;
}

/* ── Day label cell ── */
.dag-cel {
    padding: 4px 6px;
    min-width: 130px;
    vertical-align: top;
    height: 1px;
}

.dag-cel-inner {
    border: 1px solid var(--text);
    border-radius: 5px;
    padding: 4px 8px;
    height: 100%;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

tr.vandaag .dag-cel-inner {
    border: 3px solid var(--select);
}

.dag-cel-inner a.dag-link {
    color: var(--text);
    text-decoration: none;
    display: block;
}

.dag-cel-inner a.dag-link:hover {
    color: var(--text);
    text-decoration: none;
    opacity: 0.75;
}

.dag-naam {
    font-family: 'Commissioner', 'Segoe UI', sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
    display: block;
    letter-spacing: 0.02em;
}

.dag-datum {
    font-family: 'Oswald', 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.dag-opmerking {
    font-size: 11px;
    color: #888;
    font-style: italic;
    margin-top: 4px;
}

/* ── Slot buttons ── */
.planning-tabel button.slot,
.planning-tabel span.slot {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 54px;
    width: 100%;
    padding: 6px 8px;
    font-size: 15px;
    text-align: center;
    line-height: 1.3;
    box-sizing: border-box;
    border-radius: 6px;
    overflow: hidden;
}

.planning-tabel button.slot-vrij {
    background-color: var(--bg-fields);
    color: var(--field-text);
    border: 1px dashed #bbb;
    cursor: pointer;
    position: relative;
    align-items: flex-start;
    justify-content: flex-start;
}

.planning-tabel button.slot-vrij .slot-label {
    position: absolute;
    top: 5px;
    right: 7px;
    font-size: 11px;
    font-weight: 400;
    opacity: 0.55;
}

.planning-tabel button.slot-vrij:hover {
    background-color: var(--select);
    color: var(--btn-text);
    border-color: var(--select);
}

.planning-tabel button.slot-geboekt {
    background-color: var(--btn-bg);
    background-image: var(--sheen);
    color: var(--btn-text);
    font-weight: 700;
    border: 1px solid transparent;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.planning-tabel button.slot-geboekt:hover {
    opacity: 0.82;
}

.planning-tabel span.slot-gesloten {
    background-color: var(--bg);
    color: var(--text);
    opacity: 0.2;
    cursor: default;
    font-size: 13px;
    border: 1px solid currentColor;
}

/* ── Modal ── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100;
}

.dynamo-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #999;
    border-radius: 5px;
    padding: 20px 24px;
    background-color: var(--bg);
    color: var(--text);
    min-width: 320px;
    max-width: 480px;
    z-index: 101;
}

.dynamo-dialog h3 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
}

.dynamo-dialog .dlg-info {
    font-size: 13px;
    color: #888;
    margin-bottom: 14px;
}

.dynamo-dialog .dlg-veld {
    margin-bottom: 10px;
}

.dynamo-dialog .dlg-veld label {
    display: block;
    font-size: 13px;
    margin-bottom: 3px;
}

/* Dialog inputs are inside a top-layer element. Theme rules in
   +layout.svelte cascade in just fine, but if a browser ever decides
   to autofill or restyle the input on selection it falls back to UA
   defaults (white). Re-assert the theme explicitly here so a selected
   value keeps the configured background and text colour. */
.dynamo-dialog .dlg-veld input {
    width: 100%;
    box-sizing: border-box;
    background-color: var(--bg-fields);
    color: var(--field-text);
}

.dynamo-dialog .dlg-veld input:-webkit-autofill,
.dynamo-dialog .dlg-veld input:-webkit-autofill:hover,
.dynamo-dialog .dlg-veld input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-fields) inset;
    -webkit-text-fill-color: var(--field-text);
}

.dynamo-dialog .dlg-buttons {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    justify-content: flex-end;
}

.dynamo-dialog .dlg-buttons button[type='button'] {
    background-color: transparent;
    color: var(--text);
    border: 1px solid #aaa;
}

.aanmelden-verleden {
    margin: 0.4rem 0 0.8rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--select);
    color: var(--btn-text);
    border-radius: 3px;
}

.aanmelden-verleden-tekst {
    white-space: pre-wrap;
}

.boeking-error {
    background-color: #c62828;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 3px;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.planning-tabel tr:hover td {
    background-color: transparent;
}

.ruimte-cel {
    padding: 3px !important;
    min-width: 130px;
    vertical-align: top;
}

.slot-wrapper {
    margin-top: 3px;
}

.slot-wrapper:first-child {
    margin-top: 0;
}

@media (max-width: 640px) {
    .planning-tabel {
        min-width: 0;
        font-size: 11px;
    }

    .week-nav {
        gap: 4px;
        margin-bottom: 10px;
        margin-left: 48px;
    }

    .week-nav .btn-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .week-nav .btn-nav-wide {
        font-size: 13px;
        padding: 0 8px;
    }

    .week-nav .week-label {
        font-size: 12px;
        margin-left: 2px;
    }

    .planning-tabel thead tr.header-ruimte th {
        font-size: 12px;
        padding: 5px 3px;
    }

    .dag-cel-inner {
        padding: 3px 4px;
        min-height: 40px;
    }

    .dag-naam {
        font-size: 12px;
    }
    .dag-datum {
        font-size: 11px;
    }
    .dag-opmerking {
        font-size: 9px;
    }

    .planning-tabel button.slot,
    .planning-tabel span.slot {
        height: 50px;
        font-size: 11px;
        padding: 4px 5px;
    }

    .planning-tabel button.slot-vrij .slot-label {
        font-size: 9px;
    }

    .slot-wrapper {
        margin-top: 3px;
    }

    .ruimte-cel {
        padding: 3px !important;
    }

    .dynamo-dialog {
        width: calc(100vw - 32px);
        max-width: 100%;
        min-width: unset;
        padding: 16px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Keep the focus-trap intent: backdrop covers the viewport even
       when keyboards push content. */
    .modal-backdrop {
        position: fixed;
        inset: 0;
    }
}

/* ── Logboek (port of Logboek/+page.svelte + Logboek/Dag/+page.svelte styles) ── */
/* .week-nav, .dag-cel-inner, .dag-naam, .dag-datum and tr.vandaag .dag-cel-inner
   already exist from the Planning block above — the Logboek reference reuses the
   same look, not duplicated here. Note: the pre-existing `.week-nav .week-label`
   rule does NOT cover Logboek's <p class="week-label"> (it's a sibling of
   .week-nav there, not a descendant), so a standalone rule is still needed. */
.week-label {
    margin-bottom: 0.5rem;
    font-weight: bold;
}
.logboek-tabel {
    border-collapse: collapse;
    width: 100%;
}
.logboek-tabel th,
.logboek-tabel td {
    border: 1px solid var(--border, #ccc);
    padding: 0.4rem 0.6rem;
    vertical-align: top;
}
.logboek-tabel th {
    background: var(--bg, #f5f5f5);
}

/* Dag column — same look as the Planning grid's day cell. */
.logboek-tabel td.dag-cel {
    border: none;
    padding: 4px 6px;
    min-width: 130px;
    height: 1px;
}

.dag-nav {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
}
.planning-dag-tabel {
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}
.planning-dag-tabel th,
.planning-dag-tabel td {
    border: 1px solid var(--border, #ccc);
    padding: 0.4rem 0.6rem;
    vertical-align: top;
}
.planning-dag-tabel th {
    background: var(--bg, #f5f5f5);
}
.boeking {
    display: block;
}
.boeking + .boeking {
    margin-top: 0.25rem;
}
.boeking.afgezegd .band-naam {
    text-decoration: line-through;
    opacity: 0.6;
}
.boeking-opmerking {
    display: block;
    font-size: 11px;
    color: var(--text);
    opacity: 0.65;
    font-style: italic;
    white-space: pre-line;
}
.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.6rem;
    max-width: 500px;
}
.form-row-wide {
    max-width: 800px;
}
.form-row label {
    font-weight: 600;
    margin-bottom: 2px;
}
.form-knoppen {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}
.validation-summary {
    background-color: #c62828;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 3px;
    margin-bottom: 0.8rem;
    font-weight: 600;
}
.btn {
    display: inline-block;
    background-color: var(--btn-bg);
    background-image: var(--sheen);
    color: var(--btn-text);
    border-radius: 4px;
    padding: 0.4rem 0.9rem;
    text-decoration: none;
}

/* ── Bands (port of Bands/+page.svelte styles) ── */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
    margin: 0.5rem 0 1rem;
}
.alleen-actief {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.filter-form input[type='search'] {
    flex: 0 1 20em;
}
.acties {
    white-space: nowrap;
}
@media (max-width: 640px) {
    /* Bands list only: hide Contactpersoon + Telefoon on narrow screens.
       Scoped to .bands-tabel — a bare `table` selector here also hid columns
       2-3 of every other table (notably the Planning grid, which lost two of
       its three Oefenruimte columns). */
    .bands-tabel th:nth-child(2),
    .bands-tabel td:nth-child(2),
    .bands-tabel th:nth-child(3),
    .bands-tabel td:nth-child(3) {
        display: none;
    }
    .acties {
        white-space: normal;
    }
}

/* ── Bands Edit (port of Bands/Edit/+page.svelte styles) ── */
/* .form-row, .form-knoppen, .validation-summary, .btn already exist above. */
fieldset {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--border, #ccc);
}
legend {
    font-weight: bold;
    padding: 0 0.5rem;
}
.checkbox-row {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}
/* `main` sits in a column flexbox (.content-col) and has `margin: 0 auto`.
   Auto horizontal margins cancel the flex `align-items: stretch`, so main
   normally shrinks to its *content* width and never reaches its max-width:1200px.
   On form pages that left the fields sitting at their ~200px intrinsic size.
   Make main fill the column (still capped by max-width:1200px and centred by the
   auto margins) whenever it holds a form, so fields can use the full .form-row
   width. List/table pages have no .form-row and keep their content-width sizing. */
main:has(.form-row) {
    width: 100%;
}
/* Fields fill their .form-row — capped at 500px by default (.form-row's
   max-width), or the column width in the multi-column layout below — instead of
   their narrow intrinsic size. Checkboxes keep their natural size. */
.form-row input:not([type='checkbox']),
.form-row select,
.form-row textarea {
    width: 100%;
}
/* Flow the groupboxes into as many columns as the content area fits, so a tall
   form doesn't force vertical scrolling on wide screens. `column-width` means
   the browser drops to a single column once the viewport is narrower than one
   column (phones) — no extra media query needed. Fieldsets never split across a
   column break. */
.form-columns {
    column-width: 22rem;
    column-gap: 1.5rem;
}
.form-columns fieldset {
    break-inside: avoid;
}
/* In the column layout let each field fill the column width instead of the
   500px cap used on single-column forms. */
.form-columns .form-row {
    max-width: none;
}

/* ── Contracten (port of Bands/Contracten/+page.svelte + Bekijken/+page.svelte styles) ── */
/* .acties (white-space) and .btn already exist above; add spacing for multiple
   action links/forms per row, as the reference's local <style> does. */
.acties a,
.acties button {
    margin-right: 0.3rem;
}
dl.kvp {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 1rem;
    max-width: 600px;
}
dl.kvp dt {
    font-weight: 600;
}

/* ── Contracten Bewerken/Plannen/Beeindigen (port of Bewerken|Plannen|Beeindigen/+page.svelte) ── */
/* .form-row, .form-knoppen, .validation-summary, .btn, fieldset, legend,
   .checkbox-row already exist above. Only the preview banner is new. */
.preview {
    margin: 0.5rem 0 1rem;
    padding: 0.5rem;
    background: color-mix(in srgb, var(--text, #000) 6%, transparent);
    border-left: 3px solid color-mix(in srgb, var(--text, #000) 40%, transparent);
}

/* ── Pagination (port of lib/components/Pagination.svelte) ── */
.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.8em 0;
    gap: 1em;
    flex-wrap: wrap;
}
.pager-status {
    color: var(--text);
    opacity: 0.75;
    font-size: 0.9em;
}
.pager-nav {
    display: flex;
    gap: 0.25em;
    flex-wrap: wrap;
}
.pager-nav a,
.pager-nav .current,
.pager-nav .disabled,
.pager-nav .ellipsis {
    display: inline-block;
    padding: 4px 10px;
    min-width: 1.6em;
    text-align: center;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.4;
}
.pager-nav a {
    background-color: var(--btn-bg);
    background-image: linear-gradient(
        to top left,
        rgba(0, 0, 0, 0.15),
        rgba(255, 255, 255, 0.15)
    );
    color: var(--btn-text);
    text-decoration: none;
}
.pager-nav a:hover {
    opacity: 0.85;
    text-decoration: none;
}
.pager-nav .current {
    background-color: var(--select);
    background-image: linear-gradient(
        to top left,
        rgba(0, 0, 0, 0.15),
        rgba(255, 255, 255, 0.15)
    );
    color: var(--btn-text);
    font-weight: 600;
}
.pager-nav .disabled {
    background-color: var(--btn-bg);
    background-image: linear-gradient(
        to top left,
        rgba(0, 0, 0, 0.15),
        rgba(255, 255, 255, 0.15)
    );
    color: var(--btn-text);
    opacity: 0.35;
    cursor: default;
}
.pager-nav .ellipsis {
    background: transparent;
    color: var(--text);
    opacity: 0.6;
}

/* ── Betalingen (port of Bands/Betalingen/+page.svelte + Edit/+page.svelte styles) ── */
/* .filter-form, .acties, .btn, .form-row, .checkbox-row, .form-knoppen,
   .validation-summary, dl.kvp already exist above. */
.num {
    text-align: right;
}
.betalingen-totalen {
    margin: 0.5rem 0 1rem;
}
.bedrag-negatief {
    color: #c00;
}
.saldo-negatief {
    color: #c00;
    font-weight: bold;
}
.saldo-positief {
    color: green;
    font-weight: bold;
}

/* ── IncidenteleBands (port of IncidenteleBands/+page.svelte + Edit/+page.svelte styles) ── */
/* .filter-form, .acties, .num, .btn, .form-row, .checkbox-row, .form-knoppen,
   .validation-summary already exist above. */
tr.afgezegd {
    color: #888;
    text-decoration: line-through;
}
input[aria-invalid='true'],
textarea[aria-invalid='true'] {
    border-color: #B00020;
}

/* ── Beheerders (port of Beheerders/+page.svelte + Edit/+page.svelte styles) ── */
/* .filter-form, .acties, .btn, .form-row, .checkbox-row, .form-knoppen,
   .validation-summary already exist above. */
.form-row-inline {
    flex-direction: row;
    gap: 1rem;
    max-width: 600px;
}
.form-row-inline > div {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.confirm-banner {
    background-color: #2e7d32;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 3px;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

/* ── Instellingen (port of Instellingen/+page.svelte styles) ── */
/* .form-row, .form-knoppen, .checkbox-row, .btn already exist above. */
.uitleg {
    color: #666;
    font-size: 0.85em;
    max-width: 400px;
}

/* ── Vergoedingen (port of Beheerders/Aanmelden/+page.svelte + Vergoedingen/+page.svelte styles) ── */
/* .form-row, .form-knoppen, .validation-summary, .btn, .filter-form, .num,
   .acties already exist above. */
.maand-nav {
    margin-bottom: 1rem;
    display: flex;
    gap: 2rem;
}

/* ── Berichten / Memos (port of Berichten/+page.svelte + Edit/+page.svelte
   + Memos/+page.svelte + Edit/+page.svelte styles) ── */
/* .filter-form, .acties, .btn, .form-row, .form-knoppen, .validation-summary,
   fieldset, legend already exist above. */
.badge-ongelezen {
    background: #c00;
    color: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.8em;
    vertical-align: middle;
    margin-left: 0.5rem;
}
tr.ongelezen {
    font-weight: bold;
}
.checkbox-groep {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.5rem;
}
.checkbox-groep label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
}
.bericht-meta p {
    margin: 0.25rem 0;
}
.bericht-tekst {
    white-space: pre-wrap;
    max-width: 700px;
}

/* ── Overzichten (port of Overzichten/+page.svelte styles) ── */
/* .filter-form, .num, .btn, .saldo-negatief, .saldo-positief already exist above. */
.tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}
.tile {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    min-width: 18rem;
    text-align: left;
    line-height: 1.3;
}
.tile span {
    font-weight: normal;
    opacity: 0.85;
}

/* Notifications (port of web/src/lib/components/Notifications.svelte) */
.notif-banner {
    /* In-flow at the top of the content column so it pushes the page down
       instead of overlaying it; sticky keeps it visible while scrolling. */
    position: sticky;
    top: 0;
    z-index: 300;
    background-color: #c62828;
    background-image: linear-gradient(to top left, rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.15));
    color: #ffffff;
    text-align: center;
    padding: 8px 16px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
/* Mobile: hide the beheerder-warning banner entirely.
   Placed after the base rule so it wins on source order. */
@media (max-width: 640px) {
    .notif-banner { display: none; }
}
.notif-toasts {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 340px;
}
.notif-toast {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background-color: var(--bg-fields);
    color: var(--field-text);
    border-left: 4px solid #c62828;
    border-radius: 3px;
    padding: 10px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    font-size: 13px;
}
.notif-toast-close {
    background: transparent;
    background-image: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0 2px;
    font-size: 13px;
    line-height: 1;
    min-height: 0;
}

/* ── Selectable grids (row-select + action toolbar) ── */
/* touch-action: manipulation disables the double-tap-to-zoom gesture on rows
   (and its ~300ms click delay), so the dblclick primary-action shortcut fires
   reliably on touch instead of being swallowed by the browser's zoom. */
.selectable-row { cursor: pointer; touch-action: manipulation; }
.selectable-row[aria-selected="true"] > td { background-color: var(--select); color: var(--btn-text); }
.selectable-row:focus { outline: none; }
.selectable-row:focus-visible > td { outline: 2px solid var(--select); outline-offset: -2px; }
.row-acties { display: none; }
.grid-acties {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0.8rem 0;
    min-height: 2.4rem;
}
.grid-acties .grid-actie-form { display: inline; margin: 0; }
.grid-acties-leeg { opacity: 0.6; font-style: italic; }
.btn-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
