/* LinkSecure designsysteem (B80): tokens voor licht en donker, het lettertype, de basis en de
   componenten. Alleen tokens uit dit bestand; nergens een losse kleur buiten @media print.
   Merk: Power Grey #3D3D3B, Bright Orange #F8B133, Action Blue #302D7D, Inter. */

@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin-var.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --brand-grey: #3d3d3b; --brand-orange: #f8b133; --brand-blue: #302d7d;
  --grey-950: #232322; --grey-900: #2c2c2a; --grey-800: #3d3d3b; --grey-700: #52514f; --grey-600: #6b6a66;
  --grey-500: #8a8985; --grey-400: #adaca7; --grey-300: #cfceca; --grey-200: #e4e3de; --grey-100: #f1f0ec; --grey-50: #f8f7f4;
  --orange-800: #8a5d0e; --orange-700: #b87d13; --orange-600: #e39a1f; --orange-500: #f8b133; --orange-400: #fbc260;
  --orange-300: #fdd78f; --orange-200: #fee6bb; --orange-100: #fef3dc;
  --blue-900: #1e1b52; --blue-800: #24215e; --blue-700: #302d7d; --blue-600: #3f3ba0; --blue-500: #524fbb;
  --blue-300: #a9a7e0; --blue-200: #cbcaee; --blue-100: #e8e7f7;
  --success-700: #176546; --success-600: #1f7d53; --success-500: #2e9e6b; --success-100: #dcf1e7;
  --danger-700: #9a2f2f; --danger-600: #b73b3b; --danger-500: #d84b4b; --danger-100: #f8e0e0;

  /* Vlakken */
  --surface-page: #ffffff; --surface-muted: var(--grey-50); --surface-sunken: var(--grey-100); --surface-card: #ffffff;
  --surface-inverse: var(--grey-800); --surface-accent-soft: var(--orange-100); --surface-action-soft: var(--blue-100);
  --inverse-border: transparent;
  /* Tekst. Afwijking van de mock-up voor leesbaarheid (AA): gedempt is grijs-600, oranje tekst op licht is oranje-800. */
  --text-heading: var(--grey-800); --text-body: var(--grey-700); --text-muted: var(--grey-600); --text-faint: var(--grey-500);
  --text-on-dark: #ffffff; --text-on-dark-muted: var(--grey-300);
  --text-accent: var(--orange-800); --text-accent-on-dark: var(--orange-500);
  --text-link: var(--blue-700); --text-link-hover: var(--blue-600);
  /* Acties */
  --accent: var(--orange-500); --accent-hover: var(--orange-600); --accent-press: var(--orange-600); --on-accent: var(--grey-800);
  --action: var(--blue-700); --action-hover: var(--blue-600); --action-press: var(--blue-800); --action-text: var(--blue-700); --on-action: #ffffff;
  /* Randen en focus */
  --border: var(--grey-200); --border-strong: var(--grey-300); --border-dark: var(--grey-700); --border-input-hover: var(--grey-400);
  --focus-ring: var(--blue-700); --focus-shadow: 0 0 0 3px rgba(48, 45, 125, .35);
  --focus-ring-on-dark: var(--orange-500); --focus-shadow-on-dark: 0 0 0 3px rgba(248, 177, 51, .55);
  /* Status: vlak, tekst, zachte rand */
  --ok-soft: var(--success-100); --ok-text: var(--success-700); --ok-line: #bfe6d3;
  --bad-soft: var(--danger-100); --bad-text: var(--danger-700); --bad-line: #eec4c4;
  --warn-soft: var(--orange-100); --warn-text: var(--orange-800); --warn-line: var(--orange-300);
  --info-soft: var(--blue-100); --info-text: var(--blue-700); --info-line: var(--blue-200);
  --switch-track: var(--grey-300); --switch-track-hover: var(--grey-400);
  /* Achter een voorbeeld in de mediabibliotheek: licht, ook in donker, zodat een transparante PNG met donkere lijnen zichtbaar blijft. */
  --media-backdrop: var(--grey-100);
  --overlay-light: rgba(255, 255, 255, .06); --overlay-strong: rgba(255, 255, 255, .14); --overlay-accent: rgba(248, 177, 51, .18); --overlay-dark: rgba(35, 35, 34, .72);
  /* Schaduw */
  --shadow-sm: 0 1px 2px rgba(35, 35, 34, .06);
  --shadow-card: 0 2px 8px rgba(35, 35, 34, .06);
  --shadow-md: 0 4px 12px rgba(35, 35, 34, .08), 0 2px 4px rgba(35, 35, 34, .05);
  --shadow-lg: 0 12px 28px rgba(35, 35, 34, .12), 0 4px 8px rgba(35, 35, 34, .06);
  /* Vorm, beweging, letter */
  --radius-sm: 4px; --radius-md: 6px; --radius-lg: 10px; --radius-xl: 16px; --radius-2xl: 24px; --radius-pill: 999px;
  --ease: cubic-bezier(.2, .8, .2, 1); --dur: 200ms; --dur-fast: 120ms; --dur-slow: 320ms;
  --font-sans: Inter, Arial, system-ui, sans-serif; --font-mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-16: 16px; --fs-18: 18px; --fs-20: 20px; --fs-24: 24px;
  --fs-30: 30px; --fs-34: 34px; --fs-38: 38px; --fs-48: 48px;
  --lh-tight: 1.1; --lh-body: 1.5; --lh-relaxed: 1.65; --track-tight: -.02em; --track-caps: .14em; --track-pill: .06em;
}

/* Donker: dezelfde tokens, afgeleid van dezelfde rampen. De bovenbalk en de donkere panelen blijven Power Grey.
   Het systeem bepaalt, tenzij iemand in het accountmenu Licht of Donker koos (data-theme op <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface-page: var(--grey-950); --surface-muted: var(--grey-950); --surface-sunken: var(--grey-800); --surface-card: var(--grey-900);
    --surface-inverse: var(--grey-800); --surface-accent-soft: #3f3118; --surface-action-soft: #2a2850; --inverse-border: var(--grey-700);
    --text-heading: var(--grey-100); --text-body: var(--grey-300); --text-muted: var(--grey-400); --text-faint: var(--grey-500);
    --text-accent: var(--orange-400); --text-link: var(--blue-300); --text-link-hover: var(--blue-200);
    --accent-hover: var(--orange-400); --accent-press: var(--orange-600);
    --action: var(--blue-500); --action-hover: var(--blue-600); --action-press: var(--blue-700); --action-text: var(--blue-300);
    --border: var(--grey-700); --border-strong: var(--grey-600); --border-input-hover: var(--grey-500);
    --focus-ring: var(--orange-500); --focus-shadow: 0 0 0 3px rgba(248, 177, 51, .55);
    --ok-soft: #173627; --ok-text: #7fd3a6; --ok-line: var(--success-600);
    --bad-soft: #432422; --bad-text: #f2a48c; --bad-line: var(--danger-600);
    --warn-soft: #3f3118; --warn-text: var(--orange-300); --warn-line: var(--orange-700);
    --info-soft: #2a2850; --info-text: var(--blue-200); --info-line: var(--blue-600);
    --switch-track: var(--grey-700); --switch-track-hover: var(--grey-600);
    --media-backdrop: var(--grey-100);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow-card: 0 2px 8px rgba(0, 0, 0, .35);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .4), 0 2px 4px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 28px rgba(0, 0, 0, .5), 0 4px 8px rgba(0, 0, 0, .35);
  }
}
/* Donker gekozen in het accountmenu (theme.js): dezelfde tokens. test/shell.test.js houdt beide blokken gelijk. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-page: var(--grey-950); --surface-muted: var(--grey-950); --surface-sunken: var(--grey-800); --surface-card: var(--grey-900);
  --surface-inverse: var(--grey-800); --surface-accent-soft: #3f3118; --surface-action-soft: #2a2850; --inverse-border: var(--grey-700);
  --text-heading: var(--grey-100); --text-body: var(--grey-300); --text-muted: var(--grey-400); --text-faint: var(--grey-500);
  --text-accent: var(--orange-400); --text-link: var(--blue-300); --text-link-hover: var(--blue-200);
  --accent-hover: var(--orange-400); --accent-press: var(--orange-600);
  --action: var(--blue-500); --action-hover: var(--blue-600); --action-press: var(--blue-700); --action-text: var(--blue-300);
  --border: var(--grey-700); --border-strong: var(--grey-600); --border-input-hover: var(--grey-500);
  --focus-ring: var(--orange-500); --focus-shadow: 0 0 0 3px rgba(248, 177, 51, .55);
  --ok-soft: #173627; --ok-text: #7fd3a6; --ok-line: var(--success-600);
  --bad-soft: #432422; --bad-text: #f2a48c; --bad-line: var(--danger-600);
  --warn-soft: #3f3118; --warn-text: var(--orange-300); --warn-line: var(--orange-700);
  --info-soft: #2a2850; --info-text: var(--blue-200); --info-line: var(--blue-600);
  --switch-track: var(--grey-700); --switch-track-hover: var(--grey-600);
  --media-backdrop: var(--grey-100);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow-card: 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .4), 0 2px 4px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 28px rgba(0, 0, 0, .5), 0 4px 8px rgba(0, 0, 0, .35);
}

/* ---------- basis en typografie ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: 104px; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font-sans); font-size: var(--fs-16); line-height: var(--lh-body); color: var(--text-body); background: var(--surface-muted); -webkit-font-smoothing: antialiased; }
::selection { background: var(--orange-200); color: var(--grey-800); }
h1, h2, h3, h4 { margin: 0 0 8px; color: var(--text-heading); line-height: var(--lh-tight); letter-spacing: var(--track-tight); text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: var(--fs-30); font-weight: 800; }
h2 { font-size: var(--fs-24); font-weight: 700; margin-bottom: 12px; }
h3 { font-size: var(--fs-20); font-weight: 700; }
h4 { font-size: var(--fs-16); font-weight: 600; letter-spacing: 0; }
h1:focus, h2:focus, h3:focus { outline: none; }
p { margin: 0 0 16px; text-wrap: pretty; }
a { color: var(--text-link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--text-link-hover); }
strong { font-weight: 600; }
code { font-family: var(--font-mono); font-size: .9em; padding: 1px 5px; border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--text-heading); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.lead { color: var(--text-muted); font-size: var(--fs-18); }
.muted { color: var(--text-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Gesaneerde module-HTML (p br strong em code h3 ul ol li a, geen class): alleen elementselectors. */
.prose { line-height: var(--lh-relaxed); }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose h3 { margin: 28px 0 10px; }
.prose a { color: var(--text-link); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- componenten ---------- */

/* Eyebrow; .tag (uit core.cardHead) krijgt hetzelfde uiterlijk. */
.eyebrow, .tag { display: block; margin: 0 0 6px; font-size: var(--fs-12); font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--text-muted); }
.eyebrow.accent { color: var(--text-accent); }
.hero .eyebrow, .card.dark .eyebrow, .topbar .eyebrow { color: var(--text-accent-on-dark); }

/* Knoppen: .btn primair, .btn.ghost secundair met rand (= .btn-quiet), .btn.plain zonder rand, .btn.accent, .btn.on-dark. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border: 2px solid transparent; border-radius: var(--radius-pill); background: var(--action); color: var(--on-action); font-size: var(--fs-16); font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur-fast) var(--ease); }
.btn:hover { background: var(--action-hover); color: var(--on-action); }
.btn:active { background: var(--action-press); transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-shadow); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.sm { padding: 8px 16px; font-size: var(--fs-14); }
.btn.lg { padding: 15px 30px; font-size: var(--fs-18); }
.btn.block { display: flex; width: 100%; }
.btn.accent { background: var(--accent); color: var(--on-accent); }
.btn.accent:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn.accent:active { background: var(--accent-press); }
.btn.ghost, .btn.btn-quiet { background: transparent; color: var(--action-text); border-color: var(--action-text); }
.btn.ghost:hover, .btn.btn-quiet:hover, .btn.ghost:active, .btn.btn-quiet:active { background: var(--surface-action-soft); color: var(--action-text); }
.btn.plain { background: transparent; color: var(--text-heading); border-color: transparent; }
.btn.plain:hover { background: var(--surface-sunken); color: var(--text-heading); }
.btn.on-dark { background: #ffffff; color: var(--grey-800); border-color: #ffffff; }
.btn.on-dark:hover { background: var(--grey-100); border-color: var(--grey-100); color: var(--grey-800); }
.btn + .btn { margin-left: 8px; }

/* Badge, pill (groot, toetsresultaat), chip. */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--text-body); font-size: var(--fs-12); font-weight: 600; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok-text); }
.badge.bad { background: var(--bad-soft); color: var(--bad-text); }
.badge.warn { background: var(--warn-soft); color: var(--warn-text); }
.badge.info { background: var(--info-soft); color: var(--info-text); }
.badge.accent { background: var(--surface-accent-soft); color: var(--text-accent); }
.badge.solid { background: var(--action); color: var(--on-action); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--text-body); font-size: var(--fs-14); font-weight: 600; line-height: 1.2; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok-text); }
.pill.bad { background: var(--bad-soft); color: var(--bad-text); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--text-body); font-size: var(--fs-12); font-weight: 600; line-height: 1.2; white-space: nowrap; }
.chip.lg { padding: 7px 14px; font-size: var(--fs-13); font-weight: 700; }
.chip.accent { background: var(--surface-accent-soft); color: var(--text-accent); }
.chip.on-dark { background: rgba(255, 255, 255, .12); color: var(--text-on-dark); }

/* Kaart. Geen overflow: hidden: dat knipt focusranden en uitklapmenu's af. */
.card { --pad: 24px; padding: var(--pad); background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); }
.card > :last-child { margin-bottom: 0; }
.card.sm { --pad: 16px 18px; }
.card.flat { box-shadow: none; }
.card.outline { box-shadow: none; border-color: var(--border-strong); }
.card.raised { box-shadow: var(--shadow-md); }
.card.accent { border-top: 4px solid var(--accent); }
.card.dark { background: var(--surface-inverse); border-color: var(--border-dark); color: var(--text-on-dark); --focus-ring: var(--focus-ring-on-dark); --focus-shadow: var(--focus-shadow-on-dark); }
.card.dark h1, .card.dark h2, .card.dark h3, .card.dark h4 { color: #ffffff; }
.card.dark .muted, .card.dark .lead { color: var(--text-on-dark-muted); }
.card.interactive { transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.card.interactive:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--border-strong); }

/* Donkere kopband met blob (startpagina, opleidingspagina); de blob is een pseudo-element. */
.hero { position: relative; overflow: hidden; margin-bottom: 30px; padding: 56px 40px 64px; background: var(--surface-inverse); color: var(--text-on-dark); border: 1px solid var(--inverse-border); border-radius: var(--radius-xl); --focus-ring: var(--focus-ring-on-dark); --focus-shadow: var(--focus-shadow-on-dark); }
.hero::before { content: ""; position: absolute; right: -90px; top: -70px; width: 380px; height: 380px; border-radius: 42% 58% 61% 39% / 45% 38% 62% 55%; background: var(--accent); opacity: .18; pointer-events: none; }
.hero > * { position: relative; }
.hero h1 { margin: 0 0 10px; max-width: 18ch; color: #ffffff; font-size: 40px; font-weight: 800; }
.hero p { margin: 0; max-width: 56ch; font-size: 17px; line-height: var(--lh-relaxed); color: var(--text-on-dark-muted); }

/* Melding (.notice = .alert) en het feedbackkader in een module (.fb). */
.notice, .alert { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--info-line); border-radius: var(--radius-lg); background: var(--info-soft); color: var(--text-heading); font-size: var(--fs-14); line-height: 1.5; }
.notice.ok, .alert.ok { background: var(--ok-soft); border-color: var(--ok-line); }
.notice.bad, .alert.bad { background: var(--bad-soft); border-color: var(--bad-line); }
.notice.warn, .alert.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.notice:focus, .alert:focus { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.toast { position: sticky; top: 12px; z-index: 10; background: var(--ok-soft); border-color: var(--success-500); border-radius: 12px; padding: 12px 16px; }
.fb { margin-top: 12px; padding: 16px 18px; border: 1px solid var(--info-line); border-radius: 12px; background: var(--info-soft); color: var(--text-heading); font-size: var(--fs-16); line-height: 1.6; }
.fb.ok { background: var(--ok-soft); border-color: var(--success-500); }
.fb.bad { background: var(--bad-soft); border-color: var(--danger-500); }
.fb.neutral { background: var(--surface-sunken); border-color: var(--border-strong); }
.fb.warn { background: var(--warn-soft); border-color: var(--orange-500); }
.fb strong { font-weight: 700; }
.fb:focus { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* Velden. */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label, .form label, .toolbar label { font-size: var(--fs-14); font-weight: 500; color: var(--text-heading); }
.field-hint { font-size: var(--fs-12); color: var(--text-muted); }
.field-error { font-size: var(--fs-12); font-weight: 500; color: var(--bad-text); }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { max-width: 100%; padding: 11px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-card); color: var(--text-heading); font-size: var(--fs-16); line-height: 1.4; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.field input, .field select, .field textarea, .form label input, .form label select, .form label textarea, textarea { width: 100%; }
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--border-input-hover); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--focus-ring); box-shadow: var(--focus-shadow); }
input:disabled, select:disabled, textarea:disabled, textarea[readonly] { background: var(--surface-sunken); color: var(--text-muted); cursor: not-allowed; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"], .invalid { border-color: var(--danger-500); }
input[type="file"] { font-size: var(--fs-14); color: var(--text-body); }
/* Keuzelijst met eigen pijl: wikkel de select in .select. De pijl is CSS, geen data:-URL (img-src 'self'). */
.select { position: relative; display: block; }
.select select { appearance: none; padding-right: 40px; width: 100%; }
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg); pointer-events: none; }
input[type="checkbox"], input[type="radio"] { appearance: none; display: inline-grid; place-content: center; width: 20px; height: 20px; margin: 0; flex: none; border: 2px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-card); cursor: pointer; vertical-align: middle; transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--border-input-hover); }
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--action); border-color: var(--action); }
input[type="checkbox"]:checked::before { content: ""; width: 11px; height: 6px; border-left: 2.5px solid #ffffff; border-bottom: 2.5px solid #ffffff; transform: translateY(-1px) rotate(-45deg); }
input[type="radio"]:checked::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ffffff; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: none; box-shadow: var(--focus-shadow); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .5; cursor: not-allowed; }

/* Schakelaar: <label class="switch"><input type="checkbox" role="switch"><span class="switch-track"></span><span>Tekst</span></label> */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-14); color: var(--text-body); cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.switch-track { position: relative; flex: none; width: 44px; height: 26px; border-radius: var(--radius-pill); background: var(--switch-track); transition: background-color var(--dur) var(--ease); }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #ffffff; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease); }
.switch:hover .switch-track { background: var(--switch-track-hover); }
.switch input:checked + .switch-track { background: var(--action); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--focus-shadow); }
.switch input:disabled + .switch-track { opacity: .5; }

/* Tabbladen (onderstreept; .tabs.pills als pilvariant). Beheertabs zijn links met aria-current="page".
   De wikkel (.tabs) scrolt op een smal scherm; de lijst zelf knipt niets af, zodat de onderlijn van het
   gekozen tabblad over de lijn van de lijst valt en de focusring ruimte heeft. */
.tabs { overflow-x: auto; margin: 0 -4px; padding: 4px; }
.tabs-list { display: flex; gap: 4px; min-width: 100%; width: max-content; margin: 0 0 20px; padding: 0; border-bottom: 2px solid var(--border); list-style: none; }
.tabs-list > li { display: flex; }
.tabs-tab { display: inline-flex; align-items: center; flex: none; margin-bottom: -2px; padding: 12px 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--text-muted); font-size: var(--fs-16); font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.tabs-tab:hover { color: var(--text-heading); }
.tabs-tab[aria-selected="true"], .tabs-tab[aria-current="page"] { color: var(--text-heading); font-weight: 600; border-bottom-color: var(--accent); }
.tabs-tab:focus-visible { outline: none; box-shadow: var(--focus-shadow); border-radius: var(--radius-md); }
.tabs-panel { padding-top: 20px; }
.tabs.pills .tabs-list { width: fit-content; min-width: 0; padding: 5px; border: 0; border-radius: var(--radius-pill); background: var(--surface-sunken); }
.tabs.pills .tabs-tab { margin: 0; padding: 8px 18px; border: 0; border-radius: var(--radius-pill); }
.tabs.pills .tabs-tab[aria-selected="true"], .tabs.pills .tabs-tab[aria-current="page"] { background: var(--surface-card); box-shadow: var(--shadow-sm); }

/* Voortgang: JS zet style.width op > span en aria-valuenow op de wrapper. */
.progress { height: 6px; border-radius: var(--radius-pill); background: var(--surface-sunken); overflow: hidden; }
.progress > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width var(--dur-slow) var(--ease); }
.progress[aria-valuenow="100"] > span { background: var(--success-500); }
.progress.lg { height: 8px; }
.progress.light { background: var(--surface-sunken); }
.progress.on-dark { background: var(--overlay-strong); }
.progress.strip { height: 4px; border-radius: 0; background: var(--grey-800); }

/* Statistiektegel: <div class="card stat"><span class="stat-value">34</span><span class="stat-label">…</span></div> */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { --pad: 20px 22px; }
.stat-value { display: block; font-size: var(--fs-34); font-weight: 800; line-height: var(--lh-tight); letter-spacing: var(--track-tight); color: var(--text-heading); font-variant-numeric: tabular-nums; }
.stat-value .unit { margin-left: 2px; font-size: .6em; font-weight: 700; color: var(--text-accent); }
.stat.lg .stat-value { font-size: var(--fs-48); }
.stat-label { display: block; margin-top: 6px; max-width: 32ch; font-size: var(--fs-14); color: var(--text-muted); }

/* Tabel, formulier, werkbalk, pager, rapport, terug-link. */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0; }
.toolbar input, .toolbar select { flex: 1 1 220px; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; }
.form label { display: flex; flex-direction: column; gap: 6px; }
.form label.inline { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; color: var(--text-body); }
/* Een schakelaar in een formulier blijft een rij: spoor naast de tekst, niet eronder. */
.form label.switch { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; color: var(--text-body); }
.form label.switch input { width: 1px; }
.form .btn { justify-self: start; }
.table-wrap { position: relative; overflow-x: auto; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.table th, .table td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { background: var(--surface-sunken); color: var(--text-muted); font-size: var(--fs-12); font-weight: 700; letter-spacing: var(--track-pill); text-transform: uppercase; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.muted td { color: var(--text-muted); }
.table tr.selected td { background: var(--surface-muted); }
/* Een lang woord (e-mailadres) breekt alleen af als het echt niet past; niet "anywhere" (0.4.10). */
.table td { overflow-wrap: break-word; }
.table td[data-label="Tijd"], .table td[data-label="Adres"] { white-space: nowrap; }
.table .btn { padding: 8px 16px; font-size: var(--fs-14); }
.table select, .table input { padding: 8px 12px; font-size: var(--fs-14); }
.pager { display: flex; align-items: center; gap: 12px; margin: 14px 0; font-size: var(--fs-14); color: var(--text-muted); }
.report { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 12px 0 0; padding: 0; font-size: var(--fs-14); }
.report li { padding: 8px 12px; border-left: 4px solid var(--danger-500); border-radius: var(--radius-md); background: var(--bad-soft); color: var(--text-heading); }
.report li.warn { border-left-color: var(--orange-500); background: var(--warn-soft); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-link); font-weight: 500; text-decoration: none; }
.back:hover { text-decoration: underline; }

@media (max-width: 700px) {
  /* Tabellen worden kaarten: elke rij een blok, elke cel met de kop van zijn kolom ervoor (data-label uit app.js). */
  .table-wrap { overflow: visible; background: none; border: 0; box-shadow: none; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { margin-bottom: 10px; padding: 8px 14px; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); }
  .table td { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  /* Een cel met meer dan één element (balk en percentage, twee badges, datum en knop): alles in de tweede kolom, onder elkaar. */
  .table td > * { grid-column: 2; min-width: 0; }
  .table tr td:last-child { border-bottom: 0; }
  .table td::before { content: attr(data-label); font-size: var(--fs-12); font-weight: 700; letter-spacing: var(--track-pill); text-transform: uppercase; color: var(--text-muted); }
  .table td:not([data-label])::before, .table td[data-label=""]::before { content: none; }
  .table td:not([data-label]), .table td[data-label=""] { display: block; }
}
