/* Portaal van Sterren van Straks. Kleuren overgenomen van sterrenvanstraks.nl (css/style.css,
   gecontroleerd op 14 november 2026): nacht-blauw, ster-geel, lucht-blauw, papier en inkt. Vorm en
   beweging uit de goedgekeurde demo; systeemlettertype, geen externe bestanden of lettertypes.
   Geen inline stijlen in de HTML, zodat de Content-Security-Policy style-src 'self' kan zijn. */

/* ============================================================
   THEMA: alle kleuren, letters en rondingen staan in dit tokenblok.
   Inspiratie van Ilias verwerken = vooral deze waarden wijzigen.
   ============================================================ */
:root {
  color-scheme: light;
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.2rem; --text-xl: 1.44rem; --text-2xl: 1.728rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;
  --z-sticky-nav: 300; --z-modal: 400; --z-toast: 500;

  /* Palet van Sterren van Straks. Rollen: nacht-blauw is het merkvlak (zijbalk, bovenbalk, logo),
     #16407f is de kleur voor acties en selectie, ster-geel is "nieuw" en tellers (altijd als vlak met
     donkere tekst, nooit als tekst op wit), lucht-blauw voor groeven en lijnen, rood alleen voor fouten. */
  --color-night: #08193a; --color-night-2: #0e2a5e; --color-night-3: #16407f; --color-night-4: #23549b;
  --color-night-type: #ffffff; --color-night-muted: #c4d6f0;
  --color-star: #f7ce4b; --color-star-light: #fbe28f; --color-star-deep: #e0b02a; --color-star-ink: #7a5608; --color-star-soft: #fdf3d6; --color-on-star: #0c1a31; /* tekst op ster-geel, in beide thema's */

  --color-paper: #fbf8f2; --color-paper-2: #eff5fd; --color-paper-3: #dee9f8;
  --color-ink: #0c1a31; --color-ink-2: #0e2a5e; --color-muted: #48597a;
  --color-rule: #dee9f8; --color-rule-2: #c4d6f0;
  --color-accent: #16407f; --color-accent-ink: #ffffff; --color-accent-press: #0e2a5e; --color-accent-soft: #eff5fd;
  --color-focus: #23549b; --color-focus-dark: #fbe28f;
  --color-cotton: #ffffff; --color-print: #0c1a31;
  --color-board: #08193a; --color-board-type: #ffffff; --color-paid: #16407f;
  --color-error: #a4161a; --color-error-soft: #fbeaea; /* zachte tint van het foutrood */
  --color-scrim: rgb(8 25 58 / 0.42);
  --color-press: rgb(12 26 49 / 0.06);

  --shade: 26% 0.06 262; --lit: 100% 0 0; --deep: 14% 0.05 262;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-outlier: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius-card: 8px; --radius-input: 6px; --radius-pill: 999px; --radius-groove: 12px; --radius-sheet: 16px;
  --edge-stock: inset 0 1px 0 oklch(var(--lit) / 0.9), inset 0 -1px 0 oklch(var(--shade) / 0.07), 0 0 0 0.5px oklch(var(--shade) / 0.22), 0 1px 0 oklch(var(--shade) / 0.12);
  --cast-stock: 6px 5px 10px -6px oklch(var(--shade) / 0.3); --cast-stock-lift: 12px 10px 18px -8px oklch(var(--shade) / 0.3);
  --cast-sheet: 0 -8px 40px -12px oklch(var(--deep) / 0.35); --cast-pop: 12px 14px 32px -12px oklch(var(--deep) / 0.35);
  --press-groove: inset 1px 1.5px 2px oklch(var(--shade) / 0.16), inset -1px -1px 0 oklch(var(--lit) / 0.9), 0 0 0 0.5px oklch(var(--shade) / 0.2);
  --tracking-display: -0.022em; --display-weight: 650;
  --tabbar-h: 64px; --sidebar-w: 272px;
}

/* Donker thema (4b.7): dezelfde tokens, afgeleid van het nacht-blauw en ster-geel van Sterren van
   Straks. Standaard volgt de site de systeeminstelling; een eigen keuze (schakelaar bovenin) zet
   data-thema op <html> en wint. De twee blokken hieronder zijn bewust gelijk (CSS kan een
   mediaquery en een attribuut niet in één regel combineren); tests/ui.test.mjs controleert dat. */
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="licht"]) {
  color-scheme: dark;
  --color-night: #040d20; --color-night-2: #0e2a5e; --color-night-3: #16407f; --color-night-4: #23549b;
  --color-night-type: #ffffff; --color-night-muted: #c4d6f0;
  --color-star-soft: #3b300d; --color-star-ink: #fbe28f; --color-star-deep: #e0b02a;
  --color-paper: #091530; --color-paper-2: #0d1f42; --color-paper-3: #17335f;
  --color-ink: #eef3fb; --color-ink-2: #c4d6f0; --color-muted: #a9bcdc;
  --color-rule: #1c3765; --color-rule-2: #2e5288;
  --color-accent: #f7ce4b; --color-accent-ink: #0c1a31; --color-accent-press: #e0b02a; --color-accent-soft: #17335f;
  --color-focus: #fbe28f; --color-focus-dark: #fbe28f;
  --color-cotton: #0f2549; --color-print: #eef3fb;
  --color-board: #eef3fb; --color-board-type: #0c1a31; --color-paid: #9cc2f5;
  --color-error: #ff9a9c; --color-error-soft: #3d1416;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-press: rgb(255 255 255 / 0.06);
  --shade: 4% 0.02 262; --lit: 45% 0.05 262; --deep: 2% 0.01 262;
  }
}
:root[data-thema="donker"] {
  color-scheme: dark;
  --color-night: #040d20; --color-night-2: #0e2a5e; --color-night-3: #16407f; --color-night-4: #23549b;
  --color-night-type: #ffffff; --color-night-muted: #c4d6f0;
  --color-star-soft: #3b300d; --color-star-ink: #fbe28f; --color-star-deep: #e0b02a;
  --color-paper: #091530; --color-paper-2: #0d1f42; --color-paper-3: #17335f;
  --color-ink: #eef3fb; --color-ink-2: #c4d6f0; --color-muted: #a9bcdc;
  --color-rule: #1c3765; --color-rule-2: #2e5288;
  --color-accent: #f7ce4b; --color-accent-ink: #0c1a31; --color-accent-press: #e0b02a; --color-accent-soft: #17335f;
  --color-focus: #fbe28f; --color-focus-dark: #fbe28f;
  --color-cotton: #0f2549; --color-print: #eef3fb;
  --color-board: #eef3fb; --color-board-type: #0c1a31; --color-paid: #9cc2f5;
  --color-error: #ff9a9c; --color-error-soft: #3d1416;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-press: rgb(255 255 255 / 0.06);
  --shade: 4% 0.02 262; --lit: 45% 0.05 262; --deep: 2% 0.01 262;
}

/* ---------- Basis (Hallmark base) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--color-muted) var(--color-paper); }
body {
  margin: 0; background: var(--color-paper); color: var(--color-ink);
  font-family: var(--font-body); font-size: var(--text-md); line-height: 1.55;
  -webkit-font-smoothing: antialiased; caret-color: var(--color-accent);
}
::selection { background: color-mix(in oklab, var(--color-accent) 22%, transparent); color: var(--color-ink); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
[hidden] { display: none !important; }
p { margin: 0; text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
/* In de nacht-blauwe vlakken is de gewone focusring te zwak: daar licht geel (13:1). */
.sidebar :focus-visible, .topbar :focus-visible { outline-color: var(--color-focus-dark); }

/* ---------- Typografie ---------- */
h1, h2, h3 {
  margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-synthesis: none;
  letter-spacing: var(--tracking-display); line-height: 1.12; overflow-wrap: break-word; min-width: 0; text-wrap: balance;
}
.title-xl { font-size: var(--text-2xl); line-height: 1.08; }
.title-l { font-size: var(--text-lg); line-height: 1.2; letter-spacing: -0.016em; }
.title-m { font-size: var(--text-md); line-height: 1.3; letter-spacing: -0.008em; font-weight: 600; }
.section-label { font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); letter-spacing: 0; margin: var(--space-xl) var(--space-2xs) var(--space-sm); }
.muted { color: var(--color-muted); }
.small { font-size: var(--text-sm); }
.fig { font-family: var(--font-outlier); font-variant-numeric: tabular-nums; }

/* ---------- Knoppen: drukwerkkaarten ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: 44px; padding: 0 var(--space-lg); border-radius: var(--radius-card); border: 0;
  font-weight: 600; font-size: var(--text-md); letter-spacing: -0.005em; text-decoration: none;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; transition: none; }
.btn-primary { background: var(--color-accent); color: var(--color-accent-ink); box-shadow: var(--cast-stock); }
.btn-primary:active { background: var(--color-accent-press); box-shadow: none; }
.btn-secondary { background: var(--color-cotton); color: var(--color-print); box-shadow: var(--edge-stock), var(--cast-stock); }
.btn-secondary:active { box-shadow: var(--edge-stock); }
.btn-plain {
  background: transparent; color: var(--color-ink); padding: 0 var(--space-xs); min-height: 44px; font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--color-rule-2); text-decoration-thickness: 1px; text-underline-offset: 0.2em;
}
.btn-plain:hover { text-decoration-color: var(--color-accent); }
.btn-plain:active { background: var(--color-press); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sm { min-height: 44px; padding: 0 var(--space-md); }
.icon-btn {
  width: 44px; height: 44px; border-radius: var(--radius-pill); border: 0; background: transparent;
  display: inline-grid; place-items: center; color: var(--color-ink); flex: none;
  -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.icon-btn:hover { background: var(--color-paper-2); }
.icon-btn:active { transform: scale(0.94); }

/* ---------- Kaarten en lijsten: katoenen vellen ---------- */
.card { background: var(--color-cotton); color: var(--color-print); border-radius: var(--radius-card); box-shadow: var(--edge-stock), var(--cast-stock); }
.card-pad { padding: var(--space-lg) var(--space-md); }
.list { list-style: none; margin: 0; padding: 0; background: var(--color-cotton); border-radius: var(--radius-card); box-shadow: var(--edge-stock), var(--cast-stock); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: var(--space-sm); width: 100%; text-align: left;
  padding: var(--space-md); background: transparent; border: 0; min-height: 64px; color: inherit;
  -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-micro) var(--ease-out);
}
button.row:hover { background: var(--color-paper); }
button.row:active { background: var(--color-paper-2); }
button.row:focus-visible { outline-offset: -2px; }
.list > li + li .row, .list > li + li > .row-static { border-top: 1px solid var(--color-rule); }
.row-static { padding: var(--space-md); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; line-height: 1.3; }
.row-sub { color: var(--color-muted); font-size: var(--text-sm); line-height: 1.4; margin-top: var(--space-3xs); }
.chev { color: var(--color-rule-2); flex: none; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.avatar {
  flex: none; width: 2.86em; height: 2.86em; border-radius: var(--radius-pill);
  display: grid; place-items: center; font-weight: 600; font-size: var(--text-sm); line-height: 1;
  background: var(--color-paper-3); color: var(--color-ink);
}
.avatar.lg { width: 3.5em; height: 3.5em; font-size: var(--text-md); }

/* Status: inktomlijning; koraal alleen voor het afgeronde Behandeld */
.pill {
  display: inline-flex; align-items: center; flex: none;
  padding: var(--space-3xs) var(--space-sm); border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 600; line-height: 1.5;
  border: 1px solid currentColor; background: transparent;
}
.st-nieuw { color: var(--color-star-ink); background: var(--color-star-soft); border-color: var(--color-star-deep); }
.st-gezien { color: var(--color-muted); border-color: var(--color-rule-2); }
.st-behandeld { color: var(--color-paid); border-color: transparent; padding-inline: var(--space-2xs); transform: rotate(-2deg); letter-spacing: -0.01em; }
.pill-plain { color: var(--color-muted); border-color: var(--color-rule-2); font-weight: 500; }

.badge {
  min-width: 1.67em; height: 1.67em; padding: 0 0.34em; border-radius: var(--radius-pill);
  background: var(--color-star); color: var(--color-on-star); font-size: var(--text-xs); font-weight: 700;
  display: inline-grid; place-items: center; line-height: 1;
}

.empty { text-align: center; padding: var(--space-xl) var(--space-lg); color: var(--color-muted); }
.empty .title-m { color: var(--color-print); margin-bottom: var(--space-2xs); }
.noscript { max-width: 32rem; margin: var(--space-2xl) auto; padding: 0 var(--space-lg); }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: var(--space-xl) var(--space-lg) calc(var(--space-xl) + env(safe-area-inset-bottom));
}
.login { width: 100%; max-width: 400px; }
.brand { display: flex; align-items: center; gap: var(--space-sm); }
/* Logo van Sterren van Straks: witte figuur met gouden ster op transparant. Hoort op nacht-blauw,
   dus op lichte plekken (inloggen, privacy) staat het in een nacht-blauwe tegel. Nooit vervormd. */
.brand-mark {
  flex: none; display: grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: var(--radius-card);
  background: var(--color-night); box-shadow: var(--cast-stock);
}
.brand-mark img { display: block; width: 76%; height: auto; }
.brand-name { font-weight: 650; letter-spacing: -0.01em; font-size: var(--text-md); white-space: nowrap; }
.login-head { margin: var(--space-xl) 0 var(--space-lg); }
.login > .brand .brand-mark, .doc .brand .brand-mark { font-size: 1.35rem; }
.login-head .title-xl { margin-bottom: var(--space-xs); }

/* Keuze uit twee: een groef met een katoenen kaartje erin */
.segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3xs); padding: var(--space-2xs);
  background: var(--color-paper-2); border-radius: var(--radius-groove); box-shadow: var(--press-groove);
  position: relative; margin-bottom: var(--space-lg);
}
.segmented-thumb {
  position: absolute; top: var(--space-2xs); bottom: var(--space-2xs); left: var(--space-2xs); width: calc(50% - 5px);
  background: var(--color-cotton); border-radius: var(--radius-card); box-shadow: var(--edge-stock), var(--cast-stock);
  transition: transform 320ms cubic-bezier(.3,.9,.3,1);
}
.segmented[data-pos="1"] .segmented-thumb { transform: translateX(calc(100% + 2px)); }
.segmented button {
  position: relative; z-index: 1; border: 0; background: transparent; min-height: 44px;
  border-radius: var(--radius-card); font-weight: 600; font-size: var(--text-sm); color: var(--color-muted);
  transition: color var(--dur-short) var(--ease-out);
}
.segmented button:hover { color: var(--color-ink-2); }
.segmented button[aria-checked="true"] { color: var(--color-ink); }

.field { margin-bottom: var(--space-md); }
.field label, .field .label { display: block; font-size: var(--text-sm); font-weight: 600; margin: 0 0 var(--space-xs) var(--space-3xs); }
.hint { font-size: var(--text-sm); color: var(--color-muted); margin: var(--space-xs) 0 0; }
.field .hint { margin: var(--space-xs) var(--space-3xs) 0; }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-input);
  border: 1px solid var(--color-muted); background: var(--color-cotton); color: var(--color-print);
  font-size: var(--text-md); /* 16px voorkomt inzoomen op iPhone */
  transition: border-color var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out);
  -webkit-appearance: none; appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--color-muted); opacity: 1; }
.input:hover, .textarea:hover, .select:hover { border-color: var(--color-ink-2); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='currentColor' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right var(--space-md) center; padding-right: var(--space-xl); }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; border-color: var(--color-focus); }
.field.invalid .input, .field.invalid .textarea, .field.invalid .select { border-color: var(--color-error); }
.field-error { color: var(--color-error); font-size: var(--text-sm); font-weight: 500; margin: var(--space-xs) var(--space-3xs) 0; display: none; }
.field.invalid .field-error { display: block; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 84px; }
.pw-toggle { position: absolute; right: var(--space-2xs); top: var(--space-3xs); min-height: 44px; font-size: var(--text-sm); }
.form-error {
  background: var(--color-error-soft); color: var(--color-error); border-radius: var(--radius-input); padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm); font-weight: 500; margin-bottom: var(--space-md); border: 1px solid currentColor;
}
.login-links { display: flex; justify-content: center; margin-top: var(--space-xs); }
.login-foot { margin-top: var(--space-xl); text-align: center; font-size: var(--text-sm); color: var(--color-muted); }
.login-foot p + p { margin-top: var(--space-xs); }

/* ---------- App-shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky-nav);
  display: flex; align-items: center; gap: var(--space-sm);
  padding: calc(var(--space-xs) + env(safe-area-inset-top)) var(--space-sm) var(--space-xs) var(--space-md);
  background: var(--color-night); color: var(--color-night-type);
  transition: box-shadow var(--dur-short) var(--ease-out);
}
.topbar.scrolled { box-shadow: 0 6px 16px -10px oklch(var(--deep) / 0.6); }
.topbar .brand { flex: 1; min-width: 0; }
.account-btn { border-radius: var(--radius-pill); padding: 0; border: 0; background: transparent; min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.account-btn .avatar { width: 2.6em; height: 2.6em; background: var(--color-night-2); color: var(--color-night-type); box-shadow: 0 0 0 1px var(--color-night-4); }
.account-btn:hover .avatar { background: var(--color-night-3); }

.main { padding: var(--space-2xs) var(--space-md) calc(var(--tabbar-h) + var(--space-xl) + env(safe-area-inset-bottom)); max-width: 760px; margin: 0 auto; }
.main:focus { outline: none; }
.page-head { padding: var(--space-sm) var(--space-2xs) var(--space-2xs); }
.page-head .title-xl { margin-bottom: var(--space-2xs); }
.back-btn { display: inline-flex; align-items: center; gap: var(--space-2xs); margin-left: calc(var(--space-xs) * -1); margin-bottom: var(--space-2xs); text-decoration: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky-nav);
  display: flex; justify-content: space-around;
  padding: var(--space-2xs) var(--space-xs) calc(var(--space-2xs) + env(safe-area-inset-bottom));
  background: var(--color-cotton); box-shadow: 0 -1px 0 var(--color-rule);
}
.tab {
  flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: var(--space-3xs);
  padding: var(--space-xs) var(--space-2xs); border: 0; background: transparent; color: var(--color-muted); font-size: var(--text-xs); font-weight: 600;
  text-decoration: none; border-radius: var(--radius-card); position: relative; -webkit-tap-highlight-color: transparent;
  transition: color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.tab:hover { color: var(--color-ink-2); }
.tab:active { transform: scale(0.95); }
.tab[aria-current="page"] { color: var(--color-accent); }
.tab[aria-current="page"]::after { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--color-accent); }
.tab .badge { position: absolute; top: var(--space-3xs); left: calc(50% + 0.6em); }

.sidebar { display: none; }

@media (min-width: 900px) {
  .shell { padding-left: var(--sidebar-w); }
  .topbar, .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; position: fixed; inset-block: 0; left: 0; width: var(--sidebar-w);
    padding: var(--space-lg) var(--space-md); background: var(--color-night); color: var(--color-night-type);
  }
  .sidebar .brand { padding: 0 var(--space-xs) var(--space-xl); }
  .side-nav { display: flex; flex-direction: column; gap: var(--space-2xs); }
  .side-link {
    display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm); border-radius: var(--radius-card);
    color: var(--color-night-muted); text-decoration: none; font-weight: 500;
    transition: background-color var(--dur-micro) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
  }
  .side-link:hover { background: var(--color-night-2); color: var(--color-night-type); }
  .side-link:active { background: var(--color-night-3); }
  .side-link[aria-current="page"] { background: var(--color-night-2); color: var(--color-star-light); font-weight: 600; box-shadow: inset 0 0 0 1px var(--color-night-3); }
  .side-link .badge { margin-left: auto; }
  .side-account { margin-top: auto; display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-xs); border: 0; background: transparent; border-radius: var(--radius-card); text-align: left; width: 100%; }
  .side-account { color: var(--color-night-type); }
  .side-account .row-sub { color: var(--color-night-muted); }
  .side-account .avatar { background: var(--color-night-2); color: var(--color-night-type); box-shadow: 0 0 0 1px var(--color-night-4); }
  .side-account:hover { background: var(--color-night-2); }
  .side-account:active { background: var(--color-night-3); }
  .main { padding: var(--space-xl) var(--space-2xl) var(--space-2xl); max-width: 820px; margin: 0; }
  .page-head { padding-top: 0; }
}

/* Paginawissel: zacht omhoog vervagen */
.view-enter { animation: viewIn 280ms var(--ease-out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Kind-kaart (ouder) ---------- */
.child-hero { display: flex; align-items: center; gap: var(--space-md); }
.child-sub + .child-sub { margin-top: var(--space-3xs); }
.next-lesson { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.next-lesson .small { color: var(--color-muted); font-weight: 500; }
.next-lesson .title-m { margin-top: var(--space-3xs); }

/* ---------- Feedback: het lesverslag ---------- */
.fb { padding: var(--space-lg) var(--space-md); }
.fb + .fb { border-top: 1px solid var(--color-rule); }
.fb-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.fb-head .row-main { flex: 1 1 12rem; }
.fb dl { margin: 0; display: grid; gap: var(--space-sm); }
.fb dt { font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.fb dd { margin: var(--space-3xs) 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.mood { display: inline-flex; align-items: center; gap: var(--space-xs); }
.score { font-variant-numeric: tabular-nums; font-size: var(--text-sm); color: var(--color-muted); }
.meter { display: inline-grid; grid-template-columns: repeat(5, 10px); gap: var(--space-3xs); }
.meter i { height: 6px; border-radius: 1px; background: var(--color-rule-2); }
.meter i.on { background: var(--color-accent); }
.fb-pending { padding: var(--space-md); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.fb-pending .row-main { flex: 1 1 12rem; }
.fb-pending + .fb, .fb + .fb-pending, .fb-pending + .fb-pending { border-top: 1px solid var(--color-rule); }

/* Beoordeling kiezen (docent) */
.rating { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-xs); }
.rating button {
  min-height: 48px; border-radius: var(--radius-card); border: 0; background: var(--color-cotton); color: var(--color-print);
  font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--text-lg); box-shadow: var(--edge-stock), var(--cast-stock);
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.rating button:active { transform: translateY(1px) scale(0.97); }
.rating button[aria-checked="true"] { background: var(--color-accent); color: var(--color-accent-ink); box-shadow: var(--cast-stock); }
.rating-label { min-height: 1.4em; margin: var(--space-xs) var(--space-3xs) 0; font-size: var(--text-sm); color: var(--color-muted); }

/* ---------- Verzoeken ---------- */
.req { padding: var(--space-md); }
.req + .req { border-top: 1px solid var(--color-rule); }
button.req { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: inherit; -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-micro) var(--ease-out); }
button.req:hover { background: var(--color-paper); }
button.req:active { background: var(--color-paper-2); }
button.req:focus-visible { outline-offset: -2px; }
.req-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-xs); }
.req-msg { line-height: 1.5; overflow-wrap: anywhere; }
.req-meta { margin-top: var(--space-xs); }
.reply { margin-top: var(--space-md); padding: var(--space-3xs) 0 var(--space-3xs) var(--space-md); border-left: 1px solid var(--color-ink-2); }
.reply .small { font-weight: 500; color: var(--color-muted); margin-bottom: var(--space-3xs); }
.reply p { overflow-wrap: anywhere; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2xs); margin-top: var(--space-sm); }
.steps span { height: 3px; border-radius: 2px; background: var(--color-rule); }
.steps span.on { background: var(--color-accent); }
.steps-label { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: var(--text-xs); color: var(--color-muted); margin-top: var(--space-2xs); }
.steps-label span:nth-child(2) { text-align: center; } .steps-label span:nth-child(3) { text-align: right; }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-sm); }
.chip {
  border: 0; background: var(--color-cotton); border-radius: var(--radius-card); padding: var(--space-xs) var(--space-md); min-height: 44px;
  font-size: var(--text-sm); color: var(--color-print); text-align: left; box-shadow: var(--edge-stock), var(--cast-stock);
  transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.chip:active { transform: translateY(1px) scale(0.98); box-shadow: var(--edge-stock); }

.filter { max-width: 320px; margin: var(--space-md) 0 var(--space-lg); }
.head-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

/* ---------- Sheet / dialoog ---------- */
.scrim { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--color-scrim); opacity: 0; }
.sheet {
  position: fixed; z-index: calc(var(--z-modal) + 1); left: 0; right: 0; bottom: 0;
  max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px - env(safe-area-inset-top));
  display: flex; flex-direction: column;
  background: var(--color-cotton); color: var(--color-print); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; box-shadow: var(--cast-sheet);
  transform: translateY(100%); will-change: transform;
}
.sheet-grab { padding: var(--space-xs) 0 var(--space-3xs); display: grid; place-items: center; touch-action: none; cursor: grab; }
.sheet-grab span { width: 40px; height: 5px; border-radius: 3px; background: var(--color-rule-2); }
.sheet-head { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-2xs) var(--space-sm) var(--space-xs) var(--space-lg); touch-action: none; }
.sheet-head h2 { flex: 1; min-width: 0; }
.sheet-body { overflow-y: auto; padding: var(--space-xs) var(--space-lg) calc(var(--space-lg) + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.sheet-context { padding: 0 0 var(--space-md); border-bottom: 1px solid var(--color-rule); margin-bottom: var(--space-lg); }
.sheet-note { margin: calc(var(--space-xs) * -1) var(--space-3xs) var(--space-md); }
.sheet-actions { display: grid; gap: var(--space-sm); margin-top: var(--space-xs); }

@media (min-width: 900px) {
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, calc(100% - 48px));
    max-height: min(760px, calc(100vh - 64px)); border-radius: var(--radius-sheet);
    transform: translate(-50%, -50%) scale(.96); opacity: 0; box-shadow: var(--cast-pop);
  }
  .sheet-grab { display: none; }
  .sheet-head { padding: var(--space-lg) var(--space-md) var(--space-xs) var(--space-lg); }
  .sheet-body { padding: var(--space-xs) var(--space-lg) var(--space-lg); }
}

/* ---------- Accountmenu (popover vanaf de knop) ---------- */
.popover {
  position: fixed; z-index: calc(var(--z-modal) + 5); width: 280px; background: var(--color-cotton); color: var(--color-print);
  border-radius: var(--radius-card); box-shadow: var(--edge-stock), var(--cast-pop); padding: var(--space-xs); opacity: 0; transform: scale(.94);
  transition: opacity 180ms var(--ease-out), transform 260ms var(--ease-out);
}
.popover.open { opacity: 1; transform: none; }
.popover-head { display: flex; gap: var(--space-sm); align-items: center; padding: var(--space-xs) var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--color-rule); margin-bottom: var(--space-xs); }
.menu-item { display: flex; width: 100%; align-items: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-sm); border: 0; background: transparent; border-radius: var(--radius-input); text-align: left; font-size: var(--text-md); }
.menu-item:hover { background: var(--color-paper-2); }
.menu-item:active { background: var(--color-paper-3); }
.menu-item:focus-visible { outline-offset: -2px; }
.menu-item.danger { color: var(--color-error); }
.popover-catch { position: fixed; inset: 0; z-index: calc(var(--z-modal) + 4); }

/* ---------- Toast ---------- */
.toast {
  /* Op telefoons onder de nacht-blauwe bovenbalk (60 px), zodat donker niet op donker valt. */
  position: fixed; z-index: var(--z-toast); left: 50%; top: calc(60px + var(--space-sm) + env(safe-area-inset-top));
  transform: translate(-50%, -16px); opacity: 0; pointer-events: none;
  background: var(--color-board); color: var(--color-board-type); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-card);
  font-size: var(--text-sm); font-weight: 500; max-width: calc(100% - 32px); width: max-content;
  box-shadow: var(--cast-pop); transition: opacity var(--dur-short) var(--ease-out), transform 320ms var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { top: auto; bottom: var(--space-xl); left: calc(50% + 136px); transform: translate(-50%, 16px); } }

/* Optillen bij hover alleen met een muis; op een telefoon blijft een getikte knop anders 'hangen' */
@media (hover: hover) {
  .btn-primary:hover { box-shadow: var(--cast-stock-lift); transform: translateY(-1px); }
  .btn-secondary:hover { box-shadow: var(--edge-stock), var(--cast-stock-lift); transform: translateY(-1px); }
  .rating button:hover { box-shadow: var(--edge-stock), var(--cast-stock-lift); }
  .chip:hover { box-shadow: var(--edge-stock), var(--cast-stock-lift); }
}

/* ---------- Toegankelijkheid ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .view-enter { animation: fadeOnly 160ms ease both !important; }
  @keyframes fadeOnly { from { opacity: 0; } to { opacity: 1; } }
  .btn, .btn:hover, .btn:active, .icon-btn:active, .tab:active, .chip:hover, .chip:active, .rating button:active { transform: none !important; }
  .segmented-thumb { transition: none; }
  .popover { transform: none !important; transition: opacity 160ms ease; }
  .toast { transform: translate(-50%, 0) !important; transition: opacity 160ms ease; }
}
@media (prefers-contrast: more) {
  :root { --color-muted: #2f3e5c; --color-rule: #8a9bb8; --color-rule-2: #48597a; --color-night-muted: #ffffff; }
  .input, .textarea, .select { border-color: var(--color-ink-2); }
  .pill { border-width: 2px; }
  .card, .list { box-shadow: 0 0 0 1px var(--color-ink-2); }
}

/* ============================================================
   PORTAAL: onderdelen die de demo nog niet had
   ============================================================ */
.brand-name { overflow: hidden; text-overflow: ellipsis; }
.link { color: var(--color-accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.link:hover { text-decoration-thickness: 2px; }
.stack > * + * { margin-top: var(--space-md); }
.mt-sm { margin-top: var(--space-sm); }
.mt-xl { margin-top: var(--space-xl); }
.ta-center { text-align: center; }
.nowrap { white-space: nowrap; }
.w-100 { width: 100%; }

/* Melding in een kaart: info, let op of fout */
.notice { border-radius: var(--radius-card); padding: var(--space-md); background: var(--color-accent-soft); color: var(--color-ink); border: 1px solid color-mix(in oklab, var(--color-accent) 35%, transparent); }
.notice .title-m { margin-bottom: var(--space-3xs); }
.notice.warn { background: var(--color-paper-2); border-color: var(--color-rule-2); }
.notice.error { background: var(--color-error-soft); border-color: var(--color-error); color: var(--color-error); }
.form-ok { background: var(--color-accent-soft); color: var(--color-ink); border-radius: var(--radius-input); padding: var(--space-sm) var(--space-md); font-size: var(--text-sm); margin-bottom: var(--space-md); border: 1px solid color-mix(in oklab, var(--color-accent) 35%, transparent); }

/* Status-pillen voor accounts en lessen */
.st-fout { color: var(--color-error); border-color: currentColor; background: var(--color-error-soft); }
.st-ok { color: var(--color-paid); border-color: currentColor; }
.pill + .pill { margin-left: var(--space-2xs); }
.pills { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-top: var(--space-xs); }
.pills .pill + .pill { margin-left: 0; }

/* Keuze uit meer opties (kind, filter, aanwezigheid): kaartjes in een groef, zonder schuivend blokje */
.keuze {
  display: flex; flex-wrap: wrap; gap: var(--space-3xs); padding: var(--space-2xs);
  background: var(--color-paper-2); border-radius: var(--radius-groove); box-shadow: var(--press-groove);
}
.keuze button {
  flex: 1 1 auto; min-height: 44px; padding: 0 var(--space-md); border: 0; background: transparent; border-radius: var(--radius-card);
  font-weight: 600; font-size: var(--text-sm); color: var(--color-muted); transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}
.keuze button:hover { color: var(--color-ink-2); }
.keuze button[aria-checked="true"], .keuze button[aria-pressed="true"] { background: var(--color-cotton); color: var(--color-ink); box-shadow: var(--edge-stock), var(--cast-stock); }
.kind-keuze { margin: var(--space-md) 0 0; }

/* Schakelaar (meldingen aan/uit) */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }
.switch-row .row-main { flex: 1 1 12rem; }
.switch {
  flex: none; position: relative; width: 52px; height: 44px; border: 0; background: transparent; padding: 0;
}
.switch::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 30px; transform: translateY(-50%); border-radius: var(--radius-pill); background: var(--color-rule-2); transition: background-color var(--dur-short) var(--ease-out); }
.switch::after { content: ""; position: absolute; top: 50%; left: 3px; width: 24px; height: 24px; transform: translateY(-50%); border-radius: 50%; background: var(--color-cotton); box-shadow: 0 1px 2px oklch(var(--shade) / 0.3); transition: transform 260ms var(--ease-out); }
.switch[aria-checked="true"]::before { background: var(--color-accent); }
.switch[aria-checked="true"]::after { transform: translate(22px, -50%); }

/* Formulieren */
.grid-2 { display: grid; gap: 0 var(--space-md); }
@media (min-width: 600px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.kind-blok { border: 1px solid var(--color-rule); border-radius: var(--radius-card); padding: var(--space-md) var(--space-md) var(--space-2xs); margin-bottom: var(--space-md); background: var(--color-cotton); }
.kind-blok-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-sm); }
/* Vinkje met label: het hele label is het tikgebied (minstens 48 px hoog), met ruimte tussen vakje en tekst. */
.check {
  display: flex; align-items: flex-start; gap: var(--space-md); min-height: 48px; padding: var(--space-sm) var(--space-sm);
  margin: 0 calc(var(--space-sm) * -1); border-radius: var(--radius-input); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.check:active { background: var(--color-press); }
/* Zwaarder dan ".field label" (display: block), anders staat het vakje tegen de tekst geplakt. */
.field label.check { display: flex; margin: 0 calc(var(--space-sm) * -1); font-size: var(--text-md); font-weight: 400; }
.check input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--color-accent); }
.check > span { padding-top: 1px; line-height: 1.45; }
.label-opt { color: var(--color-muted); font-weight: 400; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 600; font-size: var(--text-sm); margin-bottom: var(--space-xs); }

/* Lesrij met acties (rooster) */
.les-rij { padding: var(--space-md); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); }
.les-rij + .les-rij { border-top: 1px solid var(--color-rule); }
.les-rij .row-main { flex: 1 1 14rem; }
.les-rij .acties { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.les-rij.afgemeld .row-title { text-decoration: line-through; text-decoration-color: var(--color-muted); }
.dag-kop { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); margin: var(--space-lg) var(--space-2xs) var(--space-xs); }
.aanw { display: inline-flex; padding: var(--space-3xs); gap: var(--space-3xs); background: var(--color-paper-2); border-radius: var(--radius-groove); box-shadow: var(--press-groove); }
.aanw button { min-height: 44px; padding: 0 var(--space-md); border: 0; background: transparent; border-radius: var(--radius-card); font-weight: 600; font-size: var(--text-sm); color: var(--color-muted); }
.aanw button[aria-pressed="true"] { background: var(--color-cotton); color: var(--color-ink); box-shadow: var(--edge-stock), var(--cast-stock); }
.aanw button[data-waarde="afwezig"][aria-pressed="true"] { color: var(--color-error); }

/* Gesprekken */
.gesprek-rij .row-title { display: flex; align-items: center; gap: var(--space-xs); }
.thread { display: flex; flex-direction: column; gap: var(--space-sm); padding: var(--space-md); }
.msg { max-width: min(85%, 34rem); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-card); background: var(--color-paper-2); align-self: flex-start; }
.msg.mij { align-self: flex-end; background: var(--color-accent-soft); }
.msg-tekst { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.msg-meta { margin-top: var(--space-2xs); font-size: var(--text-xs); color: var(--color-muted); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-xs); }
.msg-les { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); margin-bottom: var(--space-2xs); }
.msg .btn-plain { min-height: 44px; font-size: var(--text-sm); padding: 0 var(--space-2xs); }
.composer { margin-top: var(--space-md); }
.composer .sheet-actions { margin-top: 0; }
.dag-sep { align-self: center; font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); padding: var(--space-2xs) 0; }

/* Laden */
.laden { padding: var(--space-2xl) var(--space-lg); text-align: center; color: var(--color-muted); }
.laden::before { content: ""; display: block; width: 28px; height: 28px; margin: 0 auto var(--space-md); border-radius: 50%; border: 3px solid var(--color-rule); border-top-color: var(--color-accent); animation: draai 900ms linear infinite; }
@keyframes draai { to { transform: rotate(360deg); } }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }

/* Overzichtstabel-achtige lijst voor de beheerder */
.meta-lijst { margin: 0; display: grid; gap: var(--space-sm); }
.meta-lijst dt { font-size: var(--text-sm); color: var(--color-muted); font-weight: 500; }
.meta-lijst dd { margin: var(--space-3xs) 0 0; overflow-wrap: anywhere; }
.koppel-rij { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); padding: var(--space-sm) var(--space-md); }
.koppel-rij + .koppel-rij { border-top: 1px solid var(--color-rule); }
.zoek { margin: var(--space-md) 0 0; }

/* Privacypagina */
.doc { max-width: 680px; margin: 0 auto; padding: var(--space-xl) var(--space-lg) var(--space-2xl); }
.doc h1 { margin: var(--space-xl) 0 var(--space-sm); }
.doc h2 { font-size: var(--text-lg); margin: var(--space-xl) 0 var(--space-xs); }
.doc p, .doc ul { margin: 0 0 var(--space-sm); line-height: 1.6; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: var(--space-2xs); }
.ph { background: var(--color-accent-soft); border-radius: 4px; padding: 0 4px; font-weight: 600; }

/* 200% tekst en smalle schermen: knoppen naast titels vallen eronder */
@media (max-width: 420px) {
  .head-actions > .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .laden::before { animation: none; }
  .switch::after, .switch::before { transition: none; }
}
@media (prefers-contrast: more) {
  .keuze button[aria-checked="true"], .aanw button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--color-ink); }
  .msg { border: 1px solid var(--color-ink-2); }
}
.btn-danger { background: var(--color-error); color: var(--color-accent-ink); box-shadow: var(--cast-stock); }
.btn-danger:active { box-shadow: none; }
/* In de demo stonden deze als inline style; nu in CSS (CSP zonder 'unsafe-inline') */
.row-main > .row-title, .row-main > .row-sub, .row-main > .pills { display: block; }
.row-main > .pills { display: flex; }
.gesprek-rij .row-main > .row-title { display: flex; }
.gesprek-rij .row-title .truncate { min-width: 0; }

/* Rijen en menu-items die links zijn: geen onderstreping, zelfde gedrag als knoppen */
a.row, a.menu-item, a.pill { text-decoration: none; color: inherit; }
a.pill.st-nieuw { color: var(--color-accent); }
a.row:active { background: var(--color-paper-2); }
a.row:focus-visible { outline-offset: -2px; }
@media (hover: hover) { a.row:hover { background: var(--color-paper); } }
.row-main { overflow-wrap: anywhere; }
/* 200% tekst: tablabels inkorten in plaats van buiten beeld lopen; logo schaalt mee */
.tab { min-width: 0; }
.tab > span:not(.badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keuze button .badge { margin-left: var(--space-2xs); vertical-align: 0.1em; }
.tab .badge { left: auto; right: calc(50% - 1.6em); }

/* ============================================================
   UITBREIDINGEN RONDE 1 (4b)
   ============================================================ */
/* Schakelaar licht/donker in de nacht-blauwe balken en op de inlogschermen */
.side-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); padding: 0 0 var(--space-xl) var(--space-xs); }
.side-top .brand { padding: 0; min-width: 0; }
.sidebar .thema-knop, .topbar .thema-knop { color: var(--color-night-type); }
.sidebar .thema-knop:hover, .topbar .thema-knop:hover { background: var(--color-night-2); }
.auth-top { position: absolute; top: calc(var(--space-sm) + env(safe-area-inset-top)); right: var(--space-sm); }
.login-wrap { position: relative; }
.doc { position: relative; }

/* Vandaag */
.kind-kaart + .kind-kaart { margin-top: var(--space-sm); }
.kind-kaart .row-title { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
.vandaag-les { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-md); padding: var(--space-md); }
.vandaag-les + .vandaag-les { border-top: 1px solid var(--color-rule); }
.vandaag-les .row-main { flex: 1 1 14rem; }
.vandaag-les .acties { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; }
.aandacht-rij { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); padding: var(--space-sm) var(--space-md); }
.aandacht-rij + .aandacht-rij { border-top: 1px solid var(--color-rule); }
.aandacht-rij .row-main { flex: 1 1 14rem; }

/* Onderwerpen aantikken (feedback) */
.tik-lijst { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.tik {
  min-height: 44px; padding: 0 var(--space-md); border-radius: var(--radius-pill); border: 1px solid var(--color-rule-2);
  background: var(--color-cotton); color: var(--color-print); font-size: var(--text-sm); font-weight: 500;
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out);
}
.tik[aria-pressed="true"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); font-weight: 600; }
.tik-nieuw { display: flex; gap: var(--space-xs); margin-top: var(--space-sm); }
.tik-nieuw .input { flex: 1; min-width: 0; }
.onderwerp-pills { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.onderwerp-pills .pill { font-weight: 500; color: var(--color-ink-2); border-color: var(--color-rule-2); }

/* Vervallen lessen (vakantie of pauze) */
.st-vervallen { color: var(--color-muted); border-color: var(--color-rule-2); border-style: dashed; font-weight: 500; }
.les-rij.vervallen .row-title { color: var(--color-muted); }

/* Kleine label-waarde-regels in kaarten */
.regel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); padding: var(--space-sm) var(--space-md); }
.regel + .regel { border-top: 1px solid var(--color-rule); }
.regel .row-main { flex: 1 1 12rem; }
.voorbeeld-lijst { margin: var(--space-sm) 0 0; padding: 0; list-style: none; max-height: 40vh; overflow: auto; border: 1px solid var(--color-rule); border-radius: var(--radius-input); }
.voorbeeld-lijst li { padding: var(--space-xs) var(--space-sm); font-size: var(--text-sm); }
.voorbeeld-lijst li + li { border-top: 1px solid var(--color-rule); }
.waarschuwing { border-radius: var(--radius-input); padding: var(--space-sm) var(--space-md); background: var(--color-star-soft); color: var(--color-ink); border: 1px solid var(--color-star-deep); font-size: var(--text-sm); }
.waarschuwing .title-m { margin-bottom: var(--space-3xs); }
.uitloggen-blok { margin-top: var(--space-xl); }
@media (prefers-contrast: more) {
  .tik { border-color: var(--color-ink-2); }
  .st-vervallen { border-width: 2px; }
}
.acties-rij { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.acties-rij .select { width: auto; min-width: 11rem; }
a.notice.row { display: flex; color: var(--color-ink); }
a.notice.row .row-sub { color: var(--color-ink-2); }
a.row.card { display: flex; }
/* Bij het wisselen van licht/donker: geen overgangen, anders lopen kleuren even door elkaar. */
.geen-overgang *, .geen-overgang *::before, .geen-overgang *::after { transition: none !important; }
/* Zijbalk: de naam mag over twee regels, zodat de themaknop hem niet afkapt. */
.side-top .brand-name { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }
/* Ruimte tussen kindkaart en gegevens (.meta-lijst zette margin op 0 en won van .mt-lg). */
.meta-lijst.mt-lg { margin-top: var(--space-lg); }
