/* ============================================================
   BurgCRM — stylesheet  ·  Ronde 2: "Ink & Paper" (staalblauw op warm papier)
   Lagen: tokens → thema's → reset → layout → componenten → utilities → responsief
   Zie design-plan.md: alle styling via tokens, geen inline styles.
   ============================================================ */

/* ---- 1. Design-tokens (licht = standaard) ---- */
:root {
    /* Neutralen — warm papier */
    --color-bg: #f4f3ef;
    --color-surface: #ffffff;
    --color-surface-alt: #faf9f6;
    --color-surface-sunken: #efeee9;
    --color-border: #e6e3db;
    --color-border-strong: #d5d1c6;
    --color-text: #1b1e1d;
    --color-text-muted: #67706a;

    /* Merk-accent — gedempt staalblauw */
    --color-primary: #35577d;
    --color-primary-hover: #2c4a6c;
    --color-primary-active: #253f5c;
    --color-primary-soft: #e9eef4;
    --color-primary-on-soft: #2f4d6e;
    --color-on-primary: #ffffff;

    /* Semantisch (bewust weg van het accent) */
    --color-success: #157f3c;
    --color-success-hover: #12692f;
    --color-success-soft: #e7f4ec;
    --color-success-on-soft: #146c33;
    --color-danger: #c2362f;
    --color-danger-hover: #a72c26;
    --color-danger-soft: #fbeceb;
    --color-danger-on-soft: #ad2f29;
    --color-warning: #b26a00;
    --color-warning-soft: #f9f0df;
    --color-warning-on-soft: #935700;
    --color-info: #2563c9;
    --color-info-soft: #e9f0fb;
    --color-info-on-soft: #2058b3;

    /* Link (helderder in donker) */
    --color-link: var(--color-primary-on-soft);

    /* Sidebar — warm antraciet (in beide modi donker) */
    --color-sidebar-bg: #1c1c1a;
    --color-sidebar-text: #a6a69d;
    --color-sidebar-text-active: #ffffff;
    --color-sidebar-hover: #292926;
    --color-sidebar-line: #333330;
    --color-sidebar-accent: #e6e3db;

    /* Overlays */
    --color-backdrop: rgba(20, 20, 18, 0.5);
    --color-hover-wash: rgba(24, 24, 22, 0.06);
    --color-code-bg: rgba(24, 24, 22, 0.06);

    /* Typografie */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.9375rem;
    --text-lg: 1.125rem;
    --text-xl: 1.5rem;
    --tracking-tight: -0.014em;
    --tracking-wide: 0.06em;
    --tracking-caps: 0.08em;

    /* Ruimte & vorm */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --radius-sm: 8px;
    --radius: 13px;
    --radius-full: 999px;
    --shadow-sm: 0 1px 2px rgba(22, 33, 30, 0.06);
    --shadow: 0 6px 20px rgba(22, 33, 30, 0.09);
    --shadow-lg: 0 16px 40px rgba(22, 33, 30, 0.16);
    --ring: 0 0 0 3px var(--color-primary-soft);
    --transition: 0.15s ease; /* @kind other */
    --transition-slow: 0.22s cubic-bezier(0.22, 0.61, 0.36, 1); /* @kind other */

    --control-pad-y: var(--space-2);
    --control-pad-x: var(--space-3);

    --sidebar-width: 240px;
    --topbar-height: 54px;

    color-scheme: light;
}

/* ---- 1b. Donker thema — via variabelen ---- */
:root[data-theme="dark"] {
    --color-bg: #131312;
    --color-surface: #1c1c1a;
    --color-surface-alt: #21211f;
    --color-surface-sunken: #171716;
    --color-border: #32322e;
    --color-border-strong: #45453f;
    --color-text: #eae9e4;
    --color-text-muted: #9c9c94;

    --color-primary: #5b89b4;
    --color-primary-hover: #6b98c2;
    --color-primary-active: #4f7ba5;
    --color-primary-soft: #24313f;
    --color-primary-on-soft: #a7c4e0;
    --color-on-primary: #10161d;

    --color-success: #2f9e4d;
    --color-success-hover: #37b258;
    --color-success-soft: #133021;
    --color-success-on-soft: #6bd48c;
    --color-danger: #e05a52;
    --color-danger-hover: #e86b63;
    --color-danger-soft: #34201e;
    --color-danger-on-soft: #f0a09a;
    --color-warning: #d9902f;
    --color-warning-soft: #2f2510;
    --color-warning-on-soft: #e6b45f;
    --color-info: #5b8fe0;
    --color-info-soft: #172740;
    --color-info-on-soft: #9bbcf0;

    --color-sidebar-bg: #191918;
    --color-sidebar-hover: #242422;
    --color-sidebar-line: #2e2e2b;

    --color-backdrop: rgba(0, 0, 0, 0.6);
    --color-hover-wash: rgba(255, 255, 255, 0.06);
    --color-code-bg: rgba(255, 255, 255, 0.08);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);

    color-scheme: dark;
}

/* Automatisch donker als de gebruiker niet handmatig 'licht' koos */

/* ---- 2. Reset & basis ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--color-link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
[x-cloak] { display: none !important; }

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ---- 3. Layout: app-frame, sidebar, topbar ---- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }

.topbar { display: none; }

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--color-sidebar-bg);
    color: var(--color-sidebar-text);
    padding: var(--space-4) var(--space-3);
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
}

/* Merk / tekstlogo */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: #fff;
    font-weight: 700;
    font-size: var(--text-lg);
    letter-spacing: var(--tracking-tight);
    padding: var(--space-2) var(--space-3) var(--space-5);
}
.brand-word { display: inline-flex; align-items: baseline; gap: 1px; }
.brand-word b { font-weight: 700; }
.brand-dot { color: var(--color-sidebar-accent); }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-section {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: var(--tracking-caps);
    padding: var(--space-4) var(--space-3) var(--space-1);
    color: #6f6f68;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--color-sidebar-text);
    font-size: 1rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.nav-link:hover { background: var(--color-sidebar-hover); color: #fff; text-decoration: none; }
.nav-link.is-active {
    background: var(--color-sidebar-hover);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--color-sidebar-accent);
}

/* "Meer functies": marketing en service ingeklapt onderaan de navigatie */
.nav-more { margin-top: var(--space-3); border-top: 1px solid var(--color-sidebar-line); padding-top: var(--space-2); }
.nav-more-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--color-sidebar-text);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    transition: background var(--transition), color var(--transition);
}
.nav-more-toggle::-webkit-details-marker { display: none; }
.nav-more-toggle::after { content: "▸"; transition: transform var(--transition); }
.nav-more[open] > .nav-more-toggle::after { transform: rotate(90deg); }
.nav-more-toggle:hover { background: var(--color-sidebar-hover); color: #fff; }
.nav-more > .nav-link { margin-top: 2px; }

/* Badge-tellers in de navigatie (open taken vandaag, nieuwe aanvragen) */
.nav-badge {
    margin-left: auto;
    min-width: 20px;
    padding: 1px 7px;
    border-radius: var(--radius-full);
    background: var(--color-sidebar-accent);
    color: var(--color-sidebar-bg);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}
.nav-badge.is-empty { display: none; }

/* Zelfde teller als bolletje op de mobiele menuknop */
.topbar-toggle { position: relative; }
.topbar-badge {
    position: absolute;
    top: 0;
    right: -4px;
    min-width: 17px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    background: var(--color-sidebar-accent);
    color: var(--color-sidebar-bg);
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}
.topbar-badge.is-empty { display: none; }
.sidebar-footer {
    border-top: 1px solid var(--color-sidebar-line);
    padding-top: var(--space-3);
    margin-top: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}
.sidebar-user { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sidebar-user-name {
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-footer .btn-ghost { color: var(--color-sidebar-text); }
.sidebar-footer .btn-ghost:hover { color: #fff; background: var(--color-sidebar-hover); }
.sidebar-actions { display: flex; align-items: center; gap: var(--space-1); flex-shrink: 0; }
.sidebar-backdrop { display: none; }

/* Thema-toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--color-sidebar-text);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background var(--transition), color var(--transition);
}
.theme-toggle:hover { background: var(--color-sidebar-hover); color: #fff; }
.theme-toggle .theme-ico-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-ico-dark { display: inline; }
:root[data-theme="dark"] .theme-toggle .theme-ico-light { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .theme-ico-dark { display: inline; }
    :root:not([data-theme="light"]) .theme-toggle .theme-ico-light { display: none; }
}

.main {
    flex: 1;
    padding: var(--space-6);
    width: 100%;
    min-width: 0;
}
.main-wide { max-width: none; }

/* Content-wissel bij hx-boost: zachte fade/slide-in */
@keyframes content-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
.main.is-boosted { animation: content-in var(--transition-slow); }

/* Dunne laadbalk bovenin tijdens navigatie */
.nav-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 200;
    background: linear-gradient(90deg, var(--color-primary), var(--color-sidebar-accent));
    box-shadow: 0 0 8px var(--color-primary);
    opacity: 0;
    transition: width 0.2s ease, opacity 0.2s ease;
    pointer-events: none;
}
.nav-progress.is-active { opacity: 1; }
.nav-progress.is-done { width: 100% !important; }

/* ---- 4. Paginakop & secties ---- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-5);
}
.page-header h1 {
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    line-height: 1.15;
}

.section-title {
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    margin: 0 0 var(--space-2);
}
.section-title .muted-sm { font-weight: 500; }

/* ---- 5. Kaarten ---- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: var(--space-5);
}
.card-flush { padding: 0; overflow-x: auto; }
.card-narrow { max-width: 520px; }
.card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    margin-bottom: var(--space-4);
}

/* Overzichtspagina's (Beheer, Automatisering): tegels per onderwerp */
.hub-section { margin-bottom: var(--space-6); }
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-3);
}
.hub-tile {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4) var(--space-5);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.hub-tile:hover { text-decoration: none; border-color: var(--color-border-strong); box-shadow: var(--shadow); }
.hub-tile-title { font-weight: 700; color: var(--color-link); }
.hub-tile-text { font-size: var(--text-sm); color: var(--color-text-muted); }
.hub-tile-meta { margin-top: auto; padding-top: var(--space-2); font-size: var(--text-sm); font-weight: 600; }

/* ---- 6. Tabellen ---- */
.table { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
.table th, .table td {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.table th {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-text-muted);
    background: var(--color-surface-alt);
    white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: var(--color-surface-alt); }
.table-actions { text-align: right; white-space: nowrap; }
.row-inactive td { color: var(--color-text-muted); }
.table .th-narrow { width: 1%; }
.table th a { color: inherit; }
.table th a:hover { color: var(--color-primary); text-decoration: none; }
.sort-arrow { font-size: 0.7em; color: var(--color-primary); }

/* ---- 7. Formulieren & controls ---- */
.form-field { margin-bottom: var(--space-4); }
.form-field label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-1);
}
.form-field small { display: block; margin-top: var(--space-1); font-size: var(--text-sm); }

.form-field input, .form-field select, .form-field textarea,
.input, .select {
    width: 100%;
    padding: var(--control-pad-y) var(--control-pad-x);
    font: inherit;
    color: inherit;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus,
.input:focus, .select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--ring);
}
.form-field input[type="file"] { padding: var(--space-2); }
.form-field input[type="checkbox"], .form-field input[type="radio"] { width: auto; accent-color: var(--color-primary); }

.input.w-auto, .select.w-auto { width: auto; }
.input-plain {
    font: inherit;
    color: inherit;
    background: transparent;
    padding: var(--space-1) var(--space-2);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), background var(--transition);
}
.input-plain:hover { border-color: var(--color-border); }
.input-plain:focus { outline: none; border-color: var(--color-primary); background: var(--color-surface); box-shadow: var(--ring); }
.input-plain-lg { font-weight: 700; font-size: var(--text-lg); letter-spacing: var(--tracking-tight); }

.form-row { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: flex-start; }
.form-row .grow { flex: 1 1 180px; min-width: 0; }
.form-row .w-narrow { flex: 0 1 130px; }
.inline-form { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }

/* ---- 7b. Formulierpagina's (nieuwe/bewerken) ---- */
.card-form { max-width: 760px; }

/* Secties met een klein kopje en een scheidingslijn ertussen */
/* :first-of-type, niet :first-child — het verborgen CSRF-veld is het eerste kind */
.form-section { padding-top: var(--space-5); margin-top: var(--space-2); border-top: 1px solid var(--color-border); }
.form-section:first-of-type { padding-top: 0; margin-top: 0; border-top: none; }
.form-section-title {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

/* Twee kolommen op desktop; velden houden hun eigen ondermarge als ritme */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-4); }
.form-grid .span-2, .form-grid > div.span-2 { grid-column: 1 / -1; }

/* Prominent naamveld bovenaan */
.form-field input.input-lg { font-size: var(--text-lg); font-weight: 600; }

/* Invoerveld met vast voorvoegsel (bv. €) */
.input-affix { position: relative; }
.input-affix .input-prefix {
    position: absolute;
    left: var(--control-pad-x);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}
.input-affix input { padding-left: calc(var(--control-pad-x) + 1.2em); }

/* Fase-keuze als pills in plaats van een dropdown */
.stage-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.stage-pill {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border-strong);
    border-radius: 999px;
    background: var(--color-surface);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.stage-pill:hover { border-color: var(--color-primary); }
.stage-pill.is-active {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
    color: var(--color-primary-on-soft);
    font-weight: 600;
}
.stage-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.stage-pill:has(input:focus-visible) { box-shadow: var(--ring); }

/* Actiebalk onderaan het formulier */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

/* ---- 8. Knoppen ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--control-pad-y) var(--space-4);
    font: inherit;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-primary:active { background: var(--color-primary-active); }
.btn-success { background: var(--color-success); color: #fff; box-shadow: var(--shadow-sm); }
.btn-success:hover { background: var(--color-success-hover); }
.btn-danger { background: var(--color-danger); color: #fff; box-shadow: var(--shadow-sm); }
.btn-danger:hover { background: var(--color-danger-hover); }
.btn-ghost { background: transparent; color: var(--color-text); border-color: transparent; }
.btn-ghost:hover { background: var(--color-hover-wash); }
.btn-sm { padding: var(--space-1) var(--space-2); font-size: var(--text-sm); }
.btn-icon { padding: var(--space-1) var(--space-2); line-height: 1; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }

/* ---- 9. Badges & tags ---- */
.badge {
    display: inline-block;
    padding: 2px var(--space-2);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.badge-primary { background: var(--color-primary-soft); color: var(--color-primary-on-soft); }
.badge-success { background: var(--color-success-soft); color: var(--color-success-on-soft); }
.badge-danger { background: var(--color-danger-soft); color: var(--color-danger-on-soft); }
.badge-muted { background: var(--color-hover-wash); color: var(--color-text-muted); }

.tag-chip {
    display: inline-block;
    padding: 1px var(--space-2);
    font-size: var(--text-xs);
    font-weight: 500;
    border-radius: var(--radius-full);
    background: var(--color-primary-soft);
    color: var(--color-primary-on-soft);
    white-space: nowrap;
    transition: background var(--transition);
}
.tag-chip:hover { text-decoration: none; }
a.tag-chip:hover { background: var(--color-primary); color: var(--color-on-primary); }
.tag-chip a { color: inherit; }
.tag-list { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }

/* ---- 10. Tag-input (Alpine) ---- */
.tag-input {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    position: relative;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.tag-input:focus-within { border-color: var(--color-primary); box-shadow: var(--ring); }
.tag-input input {
    flex: 1;
    min-width: 120px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: var(--space-1) !important;
    width: auto !important;
    background: transparent;
    font: inherit;
    color: inherit;
}
.tag-input .tag-chip button {
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    padding: 0 0 0 4px;
}
.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    margin-top: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    max-height: 180px;
    overflow-y: auto;
}
.tag-suggestions button {
    display: block;
    width: 100%;
    text-align: left;
    padding: var(--space-2) var(--space-3);
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
.tag-suggestions button:hover { background: var(--color-primary-soft); }

/* ---- 11. Filterbalk & paginering ---- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
    margin-bottom: var(--space-4);
}
.filter-bar input[type="search"], .filter-bar input[type="text"], .filter-bar select {
    width: auto;
    padding: var(--control-pad-y) var(--control-pad-x);
    font: inherit;
    color: inherit;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.filter-bar input:focus, .filter-bar select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--ring);
}
.filter-bar input[type="search"] { min-width: 220px; }
.filter-bar label { display: flex; align-items: center; gap: var(--space-1); }

.pagination {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    justify-content: flex-end;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
}

/* ---- 12. Flash / toasts ---- */
.flash {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-4);
    font-size: var(--text-base);
    border: 1px solid transparent;
    border-left-width: 4px;
}
.flash-success { background: var(--color-success-soft); color: var(--color-success-on-soft); border-color: transparent; border-left-color: var(--color-success); }
.flash-error { background: var(--color-danger-soft); color: var(--color-danger-on-soft); border-color: transparent; border-left-color: var(--color-danger); }
.flash-warning { background: var(--color-warning-soft); color: var(--color-warning-on-soft); border-color: transparent; border-left-color: var(--color-warning); }

/* Onveilige installatie-instellingen — alleen zichtbaar voor admins, en bewust
   niet weg te klikken: dit is niets om aan te wennen. */
.config-warning {
    background: var(--color-danger-soft);
    color: var(--color-danger-on-soft);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    border-bottom: 2px solid var(--color-danger);
}
.config-warning ul { margin: var(--space-2) 0; padding-left: var(--space-4); }
.config-warning a { color: inherit; font-weight: 600; }

/* Versienummer onder in de sidebar — aanwezig, niet opdringerig. */
.sidebar-version {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    opacity: 0.7;
    margin-top: var(--space-1);
}

/* Toast-stack onderin gecentreerd: uit de buurt van de paginakop-knoppen */
.toast-stack {
    position: fixed;
    bottom: var(--space-5);
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    width: min(440px, calc(100vw - 2 * var(--space-4)));
    pointer-events: none;
}
@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
/* Tijdens het slepen van een kaart nooit een toast vóór de dropzones */
body.is-dragging-deal .toast-stack { visibility: hidden; opacity: 0; }
.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    width: fit-content;
    max-width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-text-muted);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: var(--text-sm);
    color: var(--color-text);
    animation: toast-in var(--transition-slow);
}
.toast-success { border-left-color: var(--color-success); }
.toast-error { border-left-color: var(--color-danger); }
.toast-warning { border-left-color: var(--color-warning); }
.toast-icon { flex-shrink: 0; font-weight: 700; line-height: 1.4; }
.toast-success .toast-icon { color: var(--color-success); }
.toast-error .toast-icon { color: var(--color-danger); }
.toast-warning .toast-icon { color: var(--color-warning); }
.toast-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast-close {
    flex-shrink: 0;
    border: none;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
}
.toast-close:hover { color: var(--color-text); }

/* ---- 13. Detailpagina's ---- */
.detail-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: var(--space-5);
    align-items: start;
}
/* Expliciete plaatsing: de DOM-volgorde van de templates verschilt, maar de
   hoofdinhoud hoort altijd in het brede vlak en de meta-kolom altijd links. */
.detail-side { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; grid-column: 1; grid-row: 1; }
.detail-main { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; grid-column: 2; grid-row: 1; }

.prop-list { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; }
.prop { display: flex; flex-direction: column; gap: 1px; }
.prop dt { font-size: var(--text-sm); color: var(--color-text-muted); }
.prop dd { margin: 0; overflow-wrap: anywhere; }

/* Kale opsomming in een zijkaart: een link met eventueel een badge erachter. */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: var(--space-2) 0;
}
.plain-list li + li { border-top: 1px solid var(--color-border); }

/* ---- 14. Tijdlijn & snelle acties ---- */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 700;
}
.timeline-icon.type-note { background: var(--color-warning-soft); color: var(--color-warning-on-soft); }
.timeline-icon.type-task { background: var(--color-success-soft); color: var(--color-success-on-soft); }
.timeline-icon.type-call { background: var(--color-primary-soft); color: var(--color-primary-on-soft); }
.timeline-icon.type-email { background: var(--color-info-soft); color: var(--color-info-on-soft); }
.timeline-icon.type-system { background: var(--color-hover-wash); color: var(--color-text-muted); }
.timeline-body { flex: 1; min-width: 0; }
.timeline-title { font-weight: 600; }
.timeline-meta { font-size: var(--text-sm); color: var(--color-text-muted); }
.timeline-text { margin-top: var(--space-1); white-space: pre-wrap; overflow-wrap: anywhere; }
.load-more { text-align: center; padding-top: var(--space-3); }

.quick-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-4); }
.quick-form {
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

/* ---- 15. Kanban-bord ---- */
.board-wrap { overflow-x: auto; padding-bottom: var(--space-4); -webkit-overflow-scrolling: touch; }
.board {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    min-height: 60vh;
}
.board-column {
    flex: 0 0 284px;
    background: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-2);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}
.board-column-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-2) var(--space-3);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.board-column-header:active { cursor: grabbing; }
.board-column-ghost { opacity: 0.4; }
.board-column-header .board-sum { color: var(--color-text-muted); font-weight: 500; }
.board-column-cards {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-height: 40px;
    padding: 2px;
    scrollbar-width: thin;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.board-column-cards.drag-over { background: var(--color-primary-soft); }
/* Lege fase: hint dat je erin kunt slepen (vereist een container zonder whitespace) */
.board-column-cards:empty::before {
    content: 'Sleep deals hierheen';
    display: block;
    padding: var(--space-3);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-sm);
}

/* Snel een deal toevoegen onderin elke kolom */
.board-add { padding: var(--space-2) 2px 2px; }
.board-add-toggle {
    width: 100%;
    padding: var(--space-2);
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font: inherit;
    font-size: var(--text-sm);
    text-align: left;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.board-add-toggle:hover { background: var(--color-surface); color: var(--color-text); }
.board-add-form { display: flex; flex-direction: column; gap: var(--space-2); }
.board-add-actions { display: flex; gap: var(--space-2); }

/* Gewonnen/verloren-dropzones: schuiven in beeld zodra er een kaart gesleept wordt */
.board-dropzones {
    position: fixed;
    left: 50%;
    bottom: var(--space-5);
    transform: translateX(-50%) translateY(12px);
    display: flex;
    gap: var(--space-3);
    z-index: 250;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
}
body.is-dragging-deal .board-dropzones {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%);
}
.board-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 60px;
    padding: var(--space-3) var(--space-5);
    border: 2px dashed;
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    transition: background var(--transition);
}
.board-dropzone > span { pointer-events: none; }
.board-dropzone-won { border-color: var(--color-success); color: var(--color-success); }
.board-dropzone-lost { border-color: var(--color-danger); color: var(--color-danger); }
.board-dropzone-won.drag-over { background: var(--color-success-soft); }
.board-dropzone-lost.drag-over { background: var(--color-danger-soft); }
/* De meegesleepte kaart (ghost) nooit ín de zone tonen */
.board-dropzone .deal-card { display: none; }
.deal-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: var(--space-3);
    cursor: grab;
    transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.deal-card:hover { box-shadow: var(--shadow); border-color: var(--color-border-strong); transform: translateY(-1px); }
.deal-card:active { cursor: grabbing; }
.deal-card-ghost { opacity: 0.4; }
.deal-card-chosen { box-shadow: var(--shadow-lg); }
.deal-card-drag { transform: rotate(2.5deg); box-shadow: var(--shadow-lg); }
.deal-card-title { font-weight: 600; margin-bottom: 2px; overflow-wrap: anywhere; }
.deal-card-title a { color: inherit; }
.deal-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}
.deal-card-company { font-size: var(--text-sm); color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-card-amount { font-weight: 600; color: var(--color-text); }

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary-on-soft);
    font-size: 0.6875rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---- 16. Dropdown (Alpine) ---- */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 40;
    min-width: 180px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: var(--space-1);
    transform-origin: top right;
}
.dropdown-menu button, .dropdown-menu a {
    display: block;
    width: 100%;
    text-align: left;
    padding: var(--space-2) var(--space-3);
    border: none;
    background: none;
    font: inherit;
    color: var(--color-text);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.dropdown-menu button:hover, .dropdown-menu a:hover { background: var(--color-surface-alt); text-decoration: none; }
.dropdown-toggle { cursor: pointer; }

/* ---- 17. Dashboard ---- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}
.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--color-border-strong); }
.stat-label { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-1); }
.stat-value { font-size: 1.375rem; font-weight: 700; letter-spacing: var(--tracking-tight); border-radius: 4px; transition: background var(--transition), color var(--transition); }
.stat-value.is-pulsing { background: var(--color-primary-soft); color: var(--color-primary-on-soft); }
.stat-sub { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 2px; }

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.bar-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; }
.bar-label { flex: 0 0 130px; font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; background: var(--color-surface-sunken); border-radius: var(--radius-full); height: 10px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--color-primary), var(--color-sidebar-accent)); border-radius: var(--radius-full); transition: width 0.5s cubic-bezier(0.22, 0.61, 0.36, 1); }
.bar-value { flex: 0 0 auto; font-size: var(--text-sm); color: var(--color-text-muted); min-width: 90px; text-align: right; }

/* ---- 18. Taken ---- */
.task-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}
.task-row:hover { background: var(--color-surface-alt); }
.task-row:last-child { border-bottom: none; }
.task-row.is-done .task-title { text-decoration: line-through; color: var(--color-text-muted); }
.task-row-flush { padding-left: 0; padding-right: 0; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 600; overflow-wrap: anywhere; }
.task-meta { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 1px; }
.task-desc { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 2px; white-space: pre-wrap; }
.task-check { margin-top: 4px; width: 17px; height: 17px; cursor: pointer; accent-color: var(--color-primary); flex-shrink: 0; }
.task-overdue { color: var(--color-danger); font-weight: 600; }

/* ---- 19. Bijlagen & rijtjes in zijkaarten ---- */
.attachment-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border);
}
.attachment-row:last-child { border-bottom: none; }
.attachment-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 20. Import ---- */
.import-errors td { font-size: var(--text-sm); }
.code {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    background: var(--color-code-bg);
    padding: 1px 5px;
    border-radius: 4px;
}

/* ---- 21. Auth-pagina's ---- */
.auth-body {
    background:
        radial-gradient(1100px 460px at 50% -8%, var(--color-primary-soft), transparent 60%),
        var(--color-bg);
    min-height: 100vh;
    min-height: 100dvh;
}
.auth-wrap {
    max-width: 400px;
    margin: 0 auto;
    padding: 10vh var(--space-4) var(--space-6);
}
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    margin-bottom: var(--space-5);
    color: var(--color-text);
}
.auth-card { box-shadow: var(--shadow); }
.auth-link { margin-top: var(--space-4); text-align: center; font-size: var(--text-sm); }

/* ---- 22. Foutpagina's ---- */
.error-page { text-align: center; padding: var(--space-6) 0; }
.error-page h1 { font-size: 2.5rem; margin-bottom: var(--space-2); letter-spacing: var(--tracking-tight); }
.error-page p { color: var(--color-text-muted); margin-bottom: var(--space-5); }
.error-detail {
    text-align: left;
    max-width: 720px;
    margin: 0 auto var(--space-5);
    padding: var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    overflow-x: auto;
    white-space: pre-wrap;
}

/* ---- 23. Lege staten & skeletons ---- */
.empty-state { color: var(--color-text-muted); padding: var(--space-4); text-align: center; }
.empty-state-rich {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-6) var(--space-4);
    text-align: center;
    color: var(--color-text-muted);
}
.empty-state-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-soft);
    color: var(--color-primary-on-soft);
    font-size: 1.5rem;
    line-height: 1;
}
.empty-state-title { font-weight: 600; color: var(--color-text); font-size: var(--text-base); }
.empty-state-text { max-width: 40ch; }
td .empty-state-rich { margin: 0 auto; }

.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--color-surface-sunken);
    border-radius: var(--radius-sm);
}
.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, var(--color-hover-wash), transparent);
    animation: skeleton-shimmer 1.3s infinite;
}
.skeleton-line { height: 12px; margin: var(--space-2) 0; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
@keyframes skeleton-shimmer { to { transform: translateX(100%); } }

/* HTMX-indicator: skeleton alleen zichtbaar tijdens een request */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: block; }

/* ---- 21b. Formbuilder ---- */
.field-list { display: flex; flex-direction: column; }
.field-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
}
.field-row:last-child { border-bottom: none; }
.field-main { flex: 1; min-width: 0; }
.field-head { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.field-label { font-weight: 600; overflow-wrap: anywhere; }
.field-actions { display: flex; align-items: center; gap: var(--space-1); flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.field-actions button[disabled] { opacity: 0.35; cursor: default; }

.card-title-inset { padding: var(--space-5) var(--space-5) var(--space-4); margin-bottom: 0; }
.submission-data div { overflow-wrap: anywhere; }

/* Aanvragen: ongelezen rijen en de detailweergave */
.table tr.is-unread td:first-child { box-shadow: inset 3px 0 0 var(--color-primary); }
.table tr.is-unread .submission-title { font-weight: 700; }
.table th.submission-label {
    width: 220px;
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: var(--text-base);
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    background: none;
    vertical-align: top;
}
.submission-value { overflow-wrap: anywhere; }
.submission-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-4) var(--space-5);
}
.submission-meta a { overflow-wrap: anywhere; }

.copy-block {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}
.copy-block pre {
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

/* ---- 21c. E-mail: merge-variabelen, preview ---- */
.tag-group { margin-bottom: var(--space-4); }
.tag-group:last-child { margin-bottom: 0; }
.tag-group-title {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-caps);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}
.merge-tag {
    display: inline-block;
    margin: 0 4px 4px 0;
    padding: 2px var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-primary-on-soft);
    background: var(--color-primary-soft);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.merge-tag:hover { background: var(--color-primary); color: var(--color-on-primary); }

.mail-preview {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.mail-preview-subject {
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface-alt);
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
}
.mail-preview-body {
    padding: var(--space-4);
    background: var(--color-surface);
    overflow-wrap: anywhere;
}
.mail-preview-body img { max-width: 100%; }
.mail-preview-body table { max-width: 100%; }

.timeline-status { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-1); }
.timeline-icon.type-form { background: var(--color-info-soft); color: var(--color-info-on-soft); }
.snippet-body { max-width: 380px; }

/* ---- 24. Utilities ---- */
.text-muted { color: var(--color-text-muted); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.inline { display: inline; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: var(--space-1); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mt-4 { margin-top: var(--space-4); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.muted-sm { font-size: var(--text-sm); color: var(--color-text-muted); font-weight: 400; }

/* ============================================================
   25. Responsief
   ============================================================ */

@media (max-width: 1000px) {
    .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .app { flex-direction: column; }

    .topbar {
        display: flex;
        align-items: center;
        gap: var(--space-3);
        position: sticky;
        top: 0;
        z-index: 60;
        height: var(--topbar-height);
        padding: 0 var(--space-4);
        background: var(--color-sidebar-bg);
        color: #fff;
    }
    .topbar-toggle {
        background: none;
        border: none;
        color: #fff;
        font-size: 1.4rem;
        line-height: 1;
        padding: var(--space-2);
        margin-left: calc(-1 * var(--space-2));
        cursor: pointer;
    }
    .topbar-brand { display: flex; align-items: center; gap: var(--space-2); font-weight: 700; font-size: var(--text-lg); }
    .topbar .theme-toggle { margin-left: auto; color: #fff; }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 80;
        height: 100dvh;
        transform: translateX(-100%);
        transition: transform var(--transition-slow);
        box-shadow: var(--shadow-lg);
    }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 70;
        background: var(--color-backdrop);
    }

    .main { padding: var(--space-4); }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-side, .detail-main { grid-column: auto; grid-row: auto; }
    .board-column { max-height: calc(100dvh - var(--topbar-height) - 170px); }
    .toast-stack { bottom: var(--space-4); }
}

@media (max-width: 700px) {
    .card { padding: var(--space-4); }
    .card-flush { padding: 0; }
    .card-flush .table { min-width: 640px; }
    .stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); }
    .stat-value { font-size: 1.2rem; }
    .board-column { flex-basis: 264px; }
    .board-dropzone { min-width: 120px; min-height: 52px; padding: var(--space-2) var(--space-3); }
    .bar-label { flex-basis: 96px; }
    .bar-value { min-width: 70px; }
    .filter-bar input[type="search"] { min-width: 0; flex: 1 1 100%; }
    .page-header .btn-group { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }

    input, select, textarea, .input, .select { font-size: 16px; }
    .btn { min-height: 40px; }
    .btn-sm, .btn-icon { min-height: 34px; }
}

/* ---- 26. Beweging respecteren ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .main.is-boosted { animation: none; }
    .skeleton::after { animation: none; }
}

/* ---- 27. Automation (fase 3) ---- */

/* Segmentbuilder: één regel per filter, op smalle schermen onder elkaar. */
.rule-list { display: flex; flex-direction: column; gap: var(--space-2); }
.rule-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface-alt);
}
.rule-row .select, .rule-row .input { flex: 1 1 140px; min-width: 0; }
.rule-row .btn-icon { flex: 0 0 auto; margin-left: auto; }
.rule-no-value { flex: 1 1 140px; }

/* Twee brede tegels naast elkaar, bv. de aantal-preview van een segment. */
.stat-grid-2 { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }

/* De lead score op de contactpagina. */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    padding: 0 var(--space-2);
    height: 1.75rem;
    border-radius: var(--radius);
    background: var(--color-primary-soft);
    color: var(--color-primary-on-soft);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Een form-field mag ook buiten een .form-row meegroeien. */
.form-field.grow { flex: 1 1 180px; min-width: 0; }

@media (max-width: 700px) {
    .rule-row { flex-wrap: wrap; }
    .rule-row .select, .rule-row .input { flex: 1 1 100%; }
}

/* ---- 28. Uitklapbare uitleg ---- */
.help-card {
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: var(--space-5);
    overflow: hidden;
}
.help-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: none;
    background: none;
    font: inherit;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
}
.help-toggle:hover { background: var(--color-surface); }
.help-title { font-weight: 600; font-size: var(--text-sm); }
.help-chevron {
    flex: 0 0 auto;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: 1;
}
.help-body {
    padding: 0 var(--space-4) var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
}
.help-body p { margin: 0 0 var(--space-3); }
.help-body strong { color: var(--color-text); }
.help-steps, .help-notes { margin: 0 0 var(--space-3); padding-left: 1.25rem; }
.help-steps li, .help-notes li { margin-bottom: var(--space-2); }
.help-steps li::marker { color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.help-notes { list-style: none; padding-left: 0; }
.help-notes li { position: relative; padding-left: 1.1rem; }
.help-notes li::before {
    content: '·';
    position: absolute;
    left: 0.25rem;
    color: var(--color-text-muted);
    font-weight: 700;
}
.help-body > :last-child { margin-bottom: 0; }

/* De keten van automation, op het enginescherm. */
.flow-chain { display: flex; flex-direction: column; gap: var(--space-3); }
.flow-step {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.flow-step-number {
    flex: 0 0 auto;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary-on-soft);
    font-size: var(--text-sm);
    font-weight: 700;
}
.flow-step-body { min-width: 0; }
.flow-step-title { font-weight: 600; margin-bottom: 2px; }

/* Uitklapbare statuslegenda onder een tabelkop. */
.status-legend summary {
    cursor: pointer;
    display: inline-block;
    padding: var(--space-1) 0;
}
.status-legend summary::marker { color: var(--color-text-muted); }
.status-legend[open] summary { margin-bottom: var(--space-1); }

/* ============================================================
   Fase 4 & 5 — Service (tickets, kennisbank) en de meeting scheduler
   ============================================================ */

/* Tijdlijn: twee nieuwe soorten activiteit. */
.timeline-icon.type-ticket { background: var(--color-danger-soft); color: var(--color-danger-on-soft); }
.timeline-icon.type-meeting { background: var(--color-primary-soft); color: var(--color-primary-on-soft); }
.timeline-icon.type-quote { background: var(--color-primary-soft); color: var(--color-primary-on-soft); }
.timeline-icon.type-invoice { background: var(--color-success-soft); color: var(--color-success-on-soft); }

/* SLA-indicatie op een ticket: oranje na 3 dagen, rood na 7 (dat is .text-danger). */
.sla-warning { color: var(--color-warning-on-soft); font-weight: 600; }

/* ---- Het gesprek in een ticket ---- */
.ticket-thread { display: flex; flex-direction: column; gap: var(--space-3); }

.ticket-message {
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-border-strong);
    border-radius: var(--radius);
    background: var(--color-surface-alt);
}
/* Bericht van de klant, ons antwoord en een interne notitie moeten in één
   oogopslag te onderscheiden zijn — vandaar de kleur op de linkerrand. */
.ticket-message-contact { border-left-color: var(--color-border-strong); }
.ticket-message-agent { border-left-color: var(--color-primary); background: var(--color-primary-soft); }
.ticket-message-internal { border-left-color: var(--color-warning); background: var(--color-warning-soft); }

.ticket-message-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}
.ticket-message-body { line-height: 1.6; overflow-wrap: anywhere; }

.ticket-system {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2);
    padding-left: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* ---- Slots: op de boekingspagina en in het beheerscherm ---- */
.slot-day + .slot-day { margin-top: var(--space-4); }
.slot-day-label {
    font-weight: 600;
    font-size: var(--text-sm);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}
.slot-grid { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.slot-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface-alt);
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
}
.slot-chip-static { color: var(--color-text-muted); }
.slot-chip-remove {
    border: 0;
    background: none;
    padding: 0 2px;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: var(--text-base);
    line-height: 1;
}
.slot-chip-remove:hover { color: var(--color-danger); }

/* Een slot is een radio-knop die als knop oogt; de input zelf is onzichtbaar
   maar blijft bereikbaar voor toetsenbord en schermlezer. */
.slot-option { display: inline-flex; cursor: pointer; }
.slot-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.slot-option-time {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 5.5rem;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    font-variant-numeric: tabular-nums;
    transition: border-color var(--transition), background var(--transition);
}
.slot-option-time:hover { border-color: var(--color-primary); }
.slot-option input:checked + .slot-option-time {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-on-primary);
}
.slot-option input:focus-visible + .slot-option-time { box-shadow: var(--ring); }
.slot-option-local { font-size: var(--text-xs); opacity: 0.75; }

.booking-form { display: flex; flex-direction: column; gap: var(--space-4); }
.booking-localnote { color: var(--color-text-muted); }

.booking-summary {
    margin: var(--space-4) 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.booking-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface-alt);
}
.booking-summary-row + .booking-summary-row { border-top: 1px solid var(--color-border); }
.booking-summary-row span { flex: 0 0 8rem; color: var(--color-text-muted); font-size: var(--text-sm); }

/* ============================================================
   Publieke pagina's (kennisbank en boekingspagina) — layouts/public.php
   Dezelfde tokens als de app, maar zonder sidebar en met een leesbare
   maximale breedte.
   ============================================================ */
.pub-body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.pub-inner { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 var(--space-4); }

.pub-header {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}
.pub-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-2);
}
.pub-brand {
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    color: var(--color-text);
}
.pub-brand:hover { text-decoration: none; }
.pub-header-note { font-size: var(--text-sm); color: var(--color-text-muted); }

.pub-main { flex: 1; padding: var(--space-6) 0; }

.pub-footer {
    padding: var(--space-4) 0;
    border-top: 1px solid var(--color-border);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.pub-hero { margin-bottom: var(--space-5); }
.pub-title { font-size: 1.75rem; letter-spacing: var(--tracking-tight); margin-bottom: var(--space-2); }
.pub-lead { margin-bottom: var(--space-3); }
.pub-meta { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.pub-note { font-style: italic; }

.pub-search { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.pub-search input {
    flex: 1;
    min-width: 0;
    padding: var(--control-pad-y) var(--control-pad-x);
    font: inherit;
    color: inherit;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
}
.pub-search input:focus { outline: none; border-color: var(--color-primary); box-shadow: var(--ring); }

.pub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}
.pub-tab {
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}
.pub-tab:hover { text-decoration: none; border-color: var(--color-primary); }
.pub-tab.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-on-primary);
}

.pub-section + .pub-section { margin-top: var(--space-6); }
.pub-section-title {
    font-size: var(--text-lg);
    letter-spacing: var(--tracking-tight);
    margin-bottom: var(--space-3);
}

.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li + li { border-top: 1px solid var(--color-border); }
.pub-list-link {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-3) 0;
    color: inherit;
}
.pub-list-link:hover { text-decoration: none; }
.pub-list-link:hover .pub-list-title { color: var(--color-link); text-decoration: underline; }
.pub-list-title { font-weight: 600; }
.pub-list-excerpt { font-size: var(--text-sm); color: var(--color-text-muted); }

.pub-crumbs { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-4); }
.pub-crumbs span { margin: 0 var(--space-1); }

.pub-article { margin-bottom: var(--space-6); }
.pub-prose { line-height: 1.7; overflow-wrap: anywhere; }
.pub-prose h2 { font-size: var(--text-lg); margin: var(--space-5) 0 var(--space-2); }
.pub-prose h3 { font-size: var(--text-base); margin: var(--space-4) 0 var(--space-2); }
.pub-prose p { margin-bottom: var(--space-4); }
.pub-prose ul, .pub-prose ol { margin: 0 0 var(--space-4); padding-left: 1.4rem; }
.pub-prose li { margin-bottom: var(--space-1); }
.pub-prose > :last-child { margin-bottom: 0; }

@media (max-width: 640px) {
    .pub-search { flex-direction: column; }
    .booking-summary-row span { flex-basis: 100%; }
}

/* Dagtabs boven de slots: met een window van dertig dagen zouden er anders
   honderden knoppen onder elkaar staan. */
.slot-daytabs {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
    scrollbar-width: thin;
}
.slot-daytab {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}
.slot-daytab:hover { border-color: var(--color-primary); }
.slot-daytab.is-active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-on-primary);
}
.slot-daytab-label { font-weight: 600; font-size: var(--text-sm); white-space: nowrap; }
.slot-daytab-count { font-size: var(--text-xs); opacity: 0.75; white-space: nowrap; }

/* ============================================================
   Offertes en facturen (fase 6)
   De regelbouwer, de leesweergave van een document en de totalen.
   ============================================================ */

/* Bedragen staan rechts uitgelijnd en in tabelcijfers, zodat kolommen
   onder elkaar uitkomen ook als de cijfers verschillen in breedte. */
.doc-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-table td, .doc-table th { vertical-align: top; }
.doc-row-section td { background: var(--color-surface-alt); }
.doc-row-text td { color: var(--color-text-muted); }
.doc-intro { margin: 0 var(--space-5) var(--space-4); color: var(--color-text-muted); }

.doc-lines { display: flex; flex-direction: column; }
.doc-line {
    padding: var(--space-3) var(--space-5);
    border-top: 1px solid var(--color-border);
}
.doc-line-section { background: var(--color-surface-alt); }
.doc-line-text { background: var(--color-surface-alt); color: var(--color-text-muted); }

.doc-line-main { display: flex; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; }
.doc-line-grip {
    align-self: center;
    cursor: grab;
    color: var(--color-text-muted);
    user-select: none;
    padding: 0 var(--space-1);
}
.doc-line-name { flex: 1 1 16rem; min-width: 12rem; }
.doc-line-numbers { display: flex; align-items: flex-end; gap: var(--space-2); flex-wrap: wrap; }
.doc-line-total {
    min-width: 6.5rem;
    padding-bottom: 6px;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.doc-line-actions { display: flex; align-items: center; gap: 2px; }
.doc-line-extra {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-3);
    padding-left: var(--space-5);
}

.doc-field { display: flex; flex-direction: column; gap: var(--space-1); }
.doc-field > span { font-size: var(--text-xs); color: var(--color-text-muted); }
.doc-field input, .doc-field select, .doc-field textarea { width: 100%; }
.doc-field input:not([type=checkbox]) { width: 6.5rem; }
.doc-field-narrow input { width: 5rem; }
.doc-field-unit select { width: 6rem; }
.doc-field-rate select { width: 12rem; }
.doc-field.grow { flex: 1 1 auto; }
.doc-field.grow textarea { width: 100%; }

.doc-lines-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-5);
    flex-wrap: wrap;
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--color-border);
}

.doc-totals { min-width: 20rem; margin-left: auto; }
.doc-totals-view { padding: 0 var(--space-5) var(--space-5); }
.doc-total-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-1) 0;
    font-variant-numeric: tabular-nums;
}
.doc-total-row-strong {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-border-strong);
    font-weight: 700;
}
.doc-legal {
    padding: 0 var(--space-5) var(--space-4);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}
.doc-legal p { margin: 0 0 var(--space-2); }

.pub-doc-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

/* Publieke formuliervelden op de pagina's die geen iframe zijn (offerte,
   boekingspagina). Dezelfde vorm als in form.css, maar die stylesheet hoort
   bij het embed-formulier en wordt hier niet geladen. */
.pf-field { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-4); }
.pf-field label { font-size: var(--text-sm); font-weight: 600; }
.pf-req { color: var(--color-danger); margin-left: 2px; }
.pf-field input:not([type=checkbox]):not([type=radio]),
.pf-field select,
.pf-field textarea {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: inherit;
    font: inherit;
}
.pf-field.has-error input, .pf-field.has-error select, .pf-field.has-error textarea { border-color: var(--color-danger); }
.pf-error { color: var(--color-danger); font-size: var(--text-sm); }
/* Honeypot: uit beeld, maar niet display:none — dat vullen bots juist wél in. */
.pf-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 720px) {
    .doc-line-numbers { width: 100%; }
    .doc-field input:not([type=checkbox]) { width: 5rem; }
    .doc-field-rate select { width: 100%; }
    .doc-totals { min-width: 100%; }
}

/* ---- 29. Bulk-acties in lijsttabellen ---- */
.th-check, .td-check { width: 1%; padding-right: 0; }
.th-check input, .td-check input {
    display: block;
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-primary);
    cursor: pointer;
}
.table tbody tr.is-selected,
.table tbody tr.is-selected:hover { background: var(--color-primary-soft); }
.task-row.is-selected { background: var(--color-primary-soft); }

/* De balk verschijnt pas bij een selectie en blijft onderin in beeld
   (sticky binnen de paginastroom, dus geen overlap met de toast-stack
   zolang er niets geselecteerd is). */
.bulk-bar {
    position: sticky;
    bottom: var(--space-4);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin: var(--space-3);
    padding: var(--space-2) var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.bulk-count { font-weight: 600; margin-right: var(--space-2); white-space: nowrap; }
.bulk-bar form { display: flex; gap: var(--space-2); align-items: center; }
.bulk-bar select { width: auto; }
.bulk-bar .bulk-spacer { flex: 1; }

/* Taken zijn geen tabel: de selectievakjes staan in de rij zelf, bewust
   kleiner en grijs zodat ze niet verward worden met de afvink-toggle. */
.task-select {
    margin: 6px 2px 0 0;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--color-text-muted);
}
/* "Alles selecteren" boven een lijst zonder tabelkop. */
.bulk-select-all {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    cursor: pointer;
}
.bulk-select-all input { width: 1rem; height: 1rem; accent-color: var(--color-primary); cursor: pointer; }
