/* Roosterplanner – moderne, donkere vormgeving met tabbladen bovenaan. Licht thema via data-theme="light". */
:root {
  --brand: #2563EB;
  --brand-2: #7C3AED;
  --brand-ink: #fff;
  --grad: linear-gradient(135deg, var(--brand), var(--brand-2));
  --blue: #3B82F6;
  --violet: #8B5CF6;
  --radius: 6px;
  --extra: #F59E0B;
  --moved: #A78BFA;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Donker thema (standaard) */
  color-scheme: dark;
  --bg: #0A1020;
  --glow: radial-gradient(1100px 560px at 90% -14%, rgba(59, 130, 246, .22), transparent 62%), radial-gradient(900px 560px at -10% 110%, rgba(124, 58, 237, .24), transparent 60%), radial-gradient(700px 420px at 48% -18%, rgba(139, 92, 246, .12), transparent 65%);
  --topbar: #0C1426;
  --surface: #111A2E;
  --surface-2: #18233B;
  --surface-3: #1F2C49;
  --field: #0C1425;
  --ink: #E8EEF9;
  --muted: #93A1B8;
  --line: #24324D;
  --accent: #8AB0F5;
  --ok: #4ADE80;
  --ok-bg: #11301F;
  --danger: #FF8E86;
  --danger-bg: #3A1719;
  --warn: #FBBF24;
  --warn-bg: #3A2B0D;
  --weekend: #0D1526;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px rgba(0, 0, 0, .34);
  --overlay: rgba(3, 7, 18, .68);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F1F4FA;
  --glow: radial-gradient(1100px 560px at 88% -12%, rgba(37, 99, 235, .09), transparent 62%), radial-gradient(900px 520px at -8% 108%, rgba(124, 58, 237, .06), transparent 60%);
  --topbar: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #EEF2F8;
  --surface-3: #E2E8F2;
  --field: #FFFFFF;
  --ink: #0F172A;
  --muted: #55627A;
  --line: #DCE3EE;
  --accent: #1D4ED8;
  --ok: #166534;
  --ok-bg: #DCFCE7;
  --danger: #B42318;
  --danger-bg: #FEE4E2;
  --warn: #92400E;
  --warn-bg: #FEF3C7;
  --weekend: #F5F7FB;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 10px 28px rgba(16, 24, 40, .07);
  --overlay: rgba(15, 23, 42, .5);
}
/* Accentkleur voor tekst en links, afgeleid van de hoofdkleur van de organisatie. */
@supports (color: color-mix(in srgb, red, blue)) {
  :root { --accent: color-mix(in srgb, var(--brand) 52%, #fff); }
  :root[data-theme="light"] { --accent: color-mix(in srgb, var(--brand) 88%, #000); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background-color: var(--bg); background-image: var(--glow); background-attachment: fixed; background-repeat: no-repeat; color: var(--ink); font: 16px/1.5 var(--font); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.45rem; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; line-height: 1.3; }
h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 18px 0 8px; }
a { color: var(--accent); }
code { font: .9em ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 3px; }
small { font-size: .82rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.block { display: block; }
.pad { padding: 16px; }
.icon { display: inline-flex; vertical-align: middle; flex: none; }
.print-only { display: none; }
.boot, .loading { padding: 48px 16px; text-align: center; color: var(--muted); }
* { scrollbar-color: var(--surface-3) transparent; scrollbar-width: thin; }

/* ---------- Knoppen en invoer ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface-2); color: var(--ink); font: 600 .95rem var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, filter .15s; }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--brand); background-image: var(--grad); border-color: transparent; color: var(--brand-ink); box-shadow: 0 8px 22px -8px var(--brand-2); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { background: #C0362C; border-color: transparent; color: #fff; }
.btn.danger-outline { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.danger-outline:hover { background: var(--danger-bg); }
.btn.ghost { border-color: transparent; background: none; color: var(--accent); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .86rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 6px; background: none; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.link { display: inline-block; margin-top: 12px; font-weight: 600; text-decoration: none; }

input, select, textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); color: var(--ink); font: 1rem var(--font); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type="color"] { padding: 4px; }
input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--brand); }
input[type="file"] { padding: 8px; }
textarea { resize: vertical; }
input.invalid, textarea.invalid { border-color: var(--danger); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.form > * { grid-column: 1 / -1; min-width: 0; }
.form > .half { grid-column: auto; }
.field { display: grid; gap: 6px; }
.field label, .reject label { font-weight: 600; font-size: .9rem; }
.field small, .check small { color: var(--muted); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check small { display: block; }
.form-error { color: var(--danger); background: var(--danger-bg); border-radius: 6px; padding: 10px 12px; font: inherit; white-space: pre-wrap; margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Vlakken en opmaak ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card > h2 { margin-bottom: 12px; }
.settings-card > h2 + h3 { margin-top: 4px; }
.card > h2, .panel-head h2, .toolbar > h2 { padding-left: 10px; border-left: 3px solid var(--brand); border-image: linear-gradient(180deg, var(--blue), var(--violet)) 1; }
.card.flush { padding: 0; overflow: hidden; }
.columns { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.page { padding: 14px 12px 28px; }
.page-title { margin: 0 0 12px; }
.page-sub { color: var(--muted); margin: -8px 0 12px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-end; margin-bottom: 14px; }
.page-head .page-title { margin-bottom: 2px; }
.page-head .page-sub { margin: 0; }
.panel-head { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; text-decoration: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolbar select, .toolbar input { width: auto; flex: 0 1 240px; }
.toolbar .actions { margin-left: auto; }
.plain { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.ticks { margin: 12px 0; padding-left: 20px; color: var(--muted); }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }

.pill { display: inline-block; min-width: 28px; padding: 2px 8px; border-radius: 4px; font-weight: 700; font-size: .85rem; text-align: center; margin-right: 6px; }
.status { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.warn { background: var(--warn-bg); color: var(--warn); }
.status.danger { background: var(--danger-bg); color: var(--danger); }
.status.offer { background: var(--brand); color: var(--brand-ink); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; background: #DC2626; color: #fff; font-size: .72rem; font-weight: 700; }
.badge.inline { margin-left: 8px; vertical-align: middle; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); color: var(--ink); font: 600 .9rem var(--font); cursor: pointer; }
.chip:hover { background: var(--surface-3); }
.note, .ok-line, .warn-line { display: flex; gap: 8px; align-items: flex-start; }
.ok-line { color: var(--ok); }
.warn-line { color: var(--warn); background: var(--warn-bg); padding: 8px 10px; border-radius: 6px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.empty h3 { font-size: 1.05rem; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 6px 0 0; }
.row-link { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.row-link:first-of-type { border-top: 0; }
.row-link > span:nth-child(2) { flex: 1; display: grid; }
.row-link small { color: var(--muted); }
.row-link:hover strong { color: var(--accent); }
.facts-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 14px; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
details summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; color: var(--accent); }
details p { margin-bottom: 8px; }
.copy-row { display: flex; gap: 8px; margin: 12px 0 4px; }
.copy-row input { font-size: .85rem; }

/* ---------- Kader van de app: kop, tabbladen en het grote vlak ---------- */
.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.shell-head { position: sticky; top: 0; z-index: 20; background: var(--topbar); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.shell-head::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-2) 55%, var(--violet)); }
.topbar { display: flex; align-items: center; gap: 12px; padding: 8px 12px 4px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); font-weight: 700; font-size: 1.08rem; letter-spacing: -.01em; text-decoration: none; }
.brand > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-logo { border-radius: 6px; background: #fff; object-fit: contain; flex: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top-actions .icon-btn { color: var(--muted); }
.top-actions .icon-btn:hover { color: var(--ink); }
.fullscreen-btn { display: none; }
.me { display: flex; align-items: center; gap: 10px; margin-left: 6px; color: var(--ink); text-decoration: none; }
.me-name { display: none; line-height: 1.2; font-weight: 600; }
.me-name small { display: block; font-weight: 400; color: var(--muted); }
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; background: var(--brand); background-image: var(--grad); color: var(--brand-ink); font-weight: 700; font-size: .9rem; flex: none; }
.maintabs { display: flex; gap: 4px; padding: 4px 8px 8px; overflow-x: auto; scrollbar-width: none; }
.maintabs::-webkit-scrollbar { display: none; }
.maintabs a { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 62px; min-height: 52px; padding: 6px 8px; border-radius: 6px;
  color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.maintabs a:hover { background: var(--surface-2); color: var(--ink); }
.maintabs a.active, .member-tab.active { background: var(--brand); background-image: var(--grad); color: var(--brand-ink); box-shadow: 0 8px 22px -8px var(--brand-2); }
/* Het tabblad van een lid: naam met een kruisje om het te sluiten. */
.member-tab { flex: none; max-width: 190px; display: flex; align-items: stretch; min-width: 0; border-radius: 6px; color: var(--muted); border: 1px dashed var(--line); }
.member-tab.active { border-color: transparent; }
.member-tab a { flex: 1; min-width: 78px; padding: 6px 8px; color: inherit; }
.member-tab a:hover { background: none; color: var(--ink); }
.member-tab.active a:hover { color: inherit; }
.member-tab-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tab-close { display: grid; place-items: center; width: 30px; border: 0; background: none; color: inherit; opacity: .75; cursor: pointer; border-radius: 0 6px 6px 0; }
.tab-close:hover { opacity: 1; background: rgba(127, 127, 127, .22); }
.nav-icon { position: relative; display: inline-flex; }
.nav-icon .badge { position: absolute; top: -8px; right: -12px; border: 2px solid var(--topbar); min-width: 22px; height: 22px; }
/* De bel rechtsboven: de meldingen, met het aantal dat nog niet is gelezen. */
.bell-btn { text-decoration: none; }
.top-actions .bell-btn.active { background: var(--surface-2); color: var(--ink); }
#view { flex: 1; min-width: 0; outline: 0; }
.offline { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 8px 16px; background: var(--warn-bg); color: var(--warn); font-weight: 600; font-size: .9rem; }

/* Op de pc vult de app het hele scherm: de kop staat vast en het vlak eronder schuift. */
@media (min-width: 761px) {
  .shell { height: 100vh; height: 100dvh; overflow: hidden; }
  .shell-head { position: static; }
  .topbar { padding: 10px 24px 6px; }
  .fullscreen-btn { display: inline-grid; }
  .me-name { display: block; }
  .maintabs { gap: 6px; padding: 4px 20px 12px; }
  .maintabs a { flex: none; flex-direction: row; gap: 9px; min-width: 0; min-height: 42px; padding: 0 18px; font-size: .95rem; }
  .member-tab { flex: none; max-width: 300px; margin-left: 8px; }
  .member-tab a { padding-right: 8px; }
  .maintabs .nav-icon:has(.badge) { margin-right: 12px; }
  #view { min-height: 0; overflow: auto; display: flex; flex-direction: column; }
  .page { flex: 1 0 auto; padding: 18px 24px 22px; }
  /* Start, de roosters en Bevoegdheid: het rooster krijgt alle ruimte die over is en schuift binnen zijn eigen vlak.
     Is het scherm te laag voor de rest, dan houdt het rooster een minimale hoogte en schuift de pagina. */
  .page-start, .page-rooster, .page-verlofrooster, .page-bevoegdheid { display: flex; flex-direction: column; }
  .roster-panel { flex: 1 0 auto; display: flex; flex-direction: column; margin-bottom: 0; }
  .roster-body { flex: 1 0 auto; display: flex; flex-direction: column; }
  .roster-body > .grid-wrap { flex: 1 1 0; min-height: 230px; max-height: none; }
}

/* ---------- Aanmelden ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 430px; padding: 28px 24px; display: grid; gap: 14px; margin: 0; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.demo-box { border: 1px dashed var(--line); border-radius: 6px; padding: 14px; display: grid; gap: 8px; background: var(--surface-2); }

/* ---------- Start: kerngegevens en het hele rooster ---------- */
/* De kerngegevens staan boven het rooster of, naar keuze van de gebruiker, op een breed scherm in een kolom aan de zijkant. */
.start-layout, .start-main { display: flex; flex-direction: column; min-width: 0; }
@media (min-width: 761px) {
  .start-layout, .start-main { flex: 1 0 auto; }
}
@media (min-width: 1000px) {
  .start-layout.side { flex-direction: row; gap: 16px; }
  /* De zijkolom is zo hoog als het rooster. Passen de kerngegevens er niet in, dan schuift alleen de kolom en
     blijft het rooster in beeld. De marge rondom geeft de schaduw en de focusrand van de vlakken ruimte. */
  .start-layout.side .start-aside { position: relative; flex: none; width: 200px; }
  .start-layout.side .start-aside-inner { position: absolute; top: 0; right: -12px; bottom: -12px; left: -12px; padding: 0 12px 12px; overflow-y: auto; }
  .start-layout.side .start-main { flex: 1 1 0; }
  .start-layout.side .page-head { margin-bottom: 8px; }
  .start-layout.side .page-title { font-size: 1.3rem; margin-bottom: 6px; }
  .start-layout.side .page-sub { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .start-layout.side .kpis { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 0; }
  .start-layout.side .kpi { padding: 10px 12px; gap: 10px; }
  .start-layout.side .kpi.wide { grid-column: auto; }
  .start-layout.side .kpi-icon { width: 36px; height: 36px; }
  .start-layout.side .kpi-value { font-size: 1.3rem; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; }
  .start-layout.side .kpi-sub { font-size: .78rem; }
  .start-layout.side .mini-strip { gap: 3px; margin-top: 4px; }
  .start-layout.side .mini-wd { display: grid; justify-items: center; line-height: 1.15; }
  .start-layout.side .mini-code { height: 26px; }
  /* Naast de zijkolom zijn de dagen smaller, zodat een hele maand in beeld blijft. */
  .start-layout.side .grid td, .start-layout.side .grid thead th:not(.name) { min-width: 26px; padding: 0 2px; }
  .start-layout.side .grid .name { max-width: 160px; }
}
@media (min-width: 1350px) {
  .start-layout.side .start-aside { width: 236px; }
  .start-layout.side .kpi { padding: 11px 14px; gap: 12px; }
  .start-layout.side .kpi-icon { width: 40px; height: 40px; }
  .start-layout.side .grid td, .start-layout.side .grid thead th:not(.name) { min-width: 27px; padding: 0 3px; }
  .start-layout.side .grid .name { max-width: 170px; }
}
@media (min-width: 1600px) {
  .start-layout.side .start-aside { width: 280px; }
  .start-layout.side .grid td, .start-layout.side .grid thead th:not(.name) { min-width: 30px; }
  .start-layout.side .grid .name { max-width: 210px; }
}
.kpis { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: dense; gap: 10px; margin-bottom: 14px; }
.kpi { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  color: inherit; font: inherit; text-align: left; text-decoration: none; }
.kpi::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--blue), var(--violet)); opacity: .85; }
.kpi:nth-child(even)::after { background: linear-gradient(90deg, var(--violet), var(--blue)); }
a.kpi, button.kpi { cursor: pointer; transition: border-color .15s, transform .15s; }
a.kpi:hover, button.kpi:hover { border-color: var(--accent); transform: translateY(-1px); }
.kpi.wide { grid-column: 1 / -1; }
.kpi-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 6px; flex: none; color: #fff; background: linear-gradient(135deg, #3B82F6, #1D4ED8); box-shadow: 0 8px 18px -6px rgba(37, 99, 235, .7); }
.kpi-icon.purple, .kpi-icon.violet { background: linear-gradient(135deg, #8B5CF6, #6D28D9); box-shadow: 0 8px 18px -6px rgba(124, 58, 237, .7); }
.kpi-icon.blue { background: linear-gradient(135deg, #3B82F6, #7C3AED); box-shadow: 0 8px 18px -6px rgba(91, 80, 240, .7); }
.kpi-icon.teal { background: linear-gradient(135deg, #14B8A6, #0F766E); box-shadow: 0 8px 18px -6px rgba(13, 148, 136, .7); }
.kpi-icon.amber { background: linear-gradient(135deg, #F59E0B, #B45309); box-shadow: 0 8px 18px -6px rgba(217, 119, 6, .7); }
.kpi-icon.rose { background: linear-gradient(135deg, #F43F5E, #BE123C); box-shadow: 0 8px 18px -6px rgba(225, 29, 72, .7); }
.kpi-body { display: grid; gap: 1px; min-width: 0; flex: 1; }
.kpi-label { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font-size: 1.25rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { font-size: .8rem; color: var(--muted); }
.kpi-sub.good { color: var(--ok); }
.kpi-sub.bad { color: var(--danger); }
.mini-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-top: 6px; }
.mini-day { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.mini-wd { font-size: .66rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.mini-code { display: grid; place-items: center; width: 100%; max-width: 38px; height: 30px; border-radius: 4px; font-weight: 800; font-size: .82rem; background: var(--surface-2); color: var(--muted); }
.mini-day.extra .mini-code { outline: 2px solid var(--extra); outline-offset: -2px; }
.mini-day.pending .mini-code, td.pending, .pending-sample { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0) 0 5px, rgba(120, 130, 145, .55) 5px 9px); }
.pending-sample { background-color: #BFDFFF; color: #17202E; }
.extra-sample { background-color: #BFDFFF; color: #17202E; outline: 2px solid var(--extra); outline-offset: -2px; }
/* "In dienst": het bord met de ploegen in een venster. */
.board { min-width: 0; }
.modal.wide:has(.board) { max-width: 1120px; }
.modal .teams-board { grid-auto-columns: minmax(190px, 1fr); }
.modal .team-col { box-shadow: none; }
.board-loose { margin-top: 14px; }
.board-loose h3 { margin: 0 0 6px; }
.board-loose .team-members { padding: 0; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (min-width: 761px) {
  .kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 16px; }
  .kpi { padding: 13px 16px; gap: 13px; }
  .kpi.wide { grid-column: span 2; }
  .kpi-icon { width: 44px; height: 44px; }
  .kpi-value { font-size: 1.4rem; }
}

/* ---------- Ploegen: alle ploegen naast elkaar, de leden onder elkaar ---------- */
/* Elke ploeg een kolom; op een smal scherm blijven ze naast elkaar staan en schuift de rij opzij. */
.teams-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(172px, 1fr); grid-template-rows: auto auto; gap: 0 12px; align-items: start; overflow-x: auto; padding-bottom: 2px; }
.team-col { grid-row: span 2; min-width: 0; border: 1px solid var(--line); border-top: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
/* De koppen van de ploegen zijn even hoog, zodat de leden in elke kolom op dezelfde hoogte beginnen. */
@supports (grid-template-rows: subgrid) {
  .team-col { display: grid; grid-template-rows: subgrid; }
  .team-members { align-content: start; }
}
.team-head { padding: 8px 12px 9px; background: var(--team); color: var(--team-ink); }
.team-head-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.team-head h2 { margin: 0; font-size: 1.05rem; color: inherit; }
.team-count { font-size: .8rem; font-weight: 600; opacity: .9; white-space: nowrap; }
.team-head p { margin: 2px 0 0; font-size: .8rem; opacity: .92; }
.team-members { display: grid; gap: 5px; padding: 7px; }
/* Een lid: een balk met een rand in de kleur van de ploeg. */
.member-bar { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px 0 10px; border: 2px solid var(--team, var(--line)); border-radius: 4px;
  background: var(--surface-2); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; transition: background .15s; }
.member-bar:hover, .member-bar:focus-visible { background: var(--surface-3); }
@supports (color: color-mix(in srgb, red, blue)) {
  .member-bar { background: color-mix(in srgb, var(--team, var(--surface-2)) 13%, var(--surface)); }
  .member-bar:hover, .member-bar:focus-visible { background: color-mix(in srgb, var(--team, var(--surface-3)) 32%, var(--surface)); }
}
/* Past een naam niet op één regel (smalle kolom), dan loopt hij door op een tweede regel in plaats van te worden afgekapt. */
.member-bar-name { flex: 1; min-width: 0; padding: 4px 0; line-height: 1.2; overflow-wrap: anywhere; }
.member-bar.self .member-bar-name { font-weight: 800; color: var(--accent); }
/* Onder de naam de functie (Shico, Allround meetkamer …) of, bij een invaller, uit welke ploeg hij komt. */
.member-bar-name small { display: block; font-size: .7rem; font-weight: 500; line-height: 1.15; color: var(--muted); }
.member-bar-role { flex: none; padding: 1px 6px; border: 1px solid var(--team, var(--line)); border-radius: 3px; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.member-bar-code { flex: none; min-width: 30px; padding: 2px 6px; border-radius: 4px; font-size: .8rem; font-weight: 700; text-align: center; }
.member-bar-code.free { color: var(--muted); font-weight: 400; }
.team-loose { margin-top: 16px; }
.team-loose > p { margin: 0 0 10px; }
.chef-cover { display: grid; gap: 10px; margin-bottom: 16px; }
.chef-cover > p { margin: 0; }
.chef-cover .card-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.chef-cover .card-head h2 { margin: 0; }
.team-loose .team-members { padding: 0; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
/* Op de pc compacter, zodat een ploeg van elf leden in één keer in beeld staat. */
@media (min-width: 761px) {
  .page-ploegen .page-head { margin-bottom: 10px; }
  .team-members { gap: 4px; padding: 6px; }
  .member-bar { min-height: 34px; }
  .member-bar-name { padding: 1px 0; line-height: 1.15; }
}

/* ---------- Scherm van een lid: gegevens aan de zijkant, posten ernaast ---------- */
.member { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.member-side { margin: 0; border-top: 3px solid var(--team, var(--brand)); }
.member-side h3:first-of-type { margin-top: 4px; }
.member-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.member-name { font-size: 1.3rem; }
.member-title { margin: 2px 0 0; font-weight: 700; color: var(--accent); }
.avatar.big { width: 60px; height: 60px; font-size: 1.25rem; }
.member-today { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 600; }
.member-side .mini-strip { margin-top: 0; }
.member-leave li { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.member-limited { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.member-limited .icon { vertical-align: -3px; }
.member-actions { display: grid; gap: 8px; margin-top: 18px; }
.member-main { display: grid; gap: 16px; min-width: 0; }
.member-main .card { margin: 0; }
.member-save { justify-content: flex-end; margin-top: 12px; }
.member-posts .qual-row { grid-template-columns: minmax(0, 1fr) minmax(130px, 200px) 44px; }
@media (min-width: 900px) {
  .member { grid-template-columns: 340px minmax(0, 1fr); }
  .member-side { position: sticky; top: 0; }
}

/* ---------- Rooster ---------- */
.segmented { display: inline-flex; padding: 3px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.segmented button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: 600 .9rem var(--font); cursor: pointer; }
.segmented button.active { background: var(--brand); background-image: var(--grad); color: var(--brand-ink); }
.stepper { display: flex; align-items: center; gap: 2px; }
.period { min-width: 150px; text-align: center; }
.banner { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; margin-bottom: 12px; border: 0; border-radius: 6px; font: inherit; text-align: left; cursor: pointer; }
.banner.danger { background: var(--danger-bg); color: var(--danger); }
.banner span:nth-child(2) { flex: 1; font-weight: 600; }
.roster-panel { padding: 14px; }
.grid-wrap { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.grid { border-collapse: separate; border-spacing: 0; font-size: .82rem; width: 100%; min-width: max-content; }
.grid th, .grid td { height: 33px; min-width: 36px; padding: 0 3px; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); height: 46px; font-weight: 400; }
.grid thead th span { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; }
.grid thead th strong { display: block; font-size: .9rem; }
.grid .name { position: sticky; left: 0; z-index: 1; min-width: 150px; max-width: 210px; padding: 0 10px 0 12px; text-align: left; font-weight: 500; background: var(--surface); overflow: hidden; text-overflow: ellipsis; box-shadow: inset 4px 0 0 var(--team, transparent); }
.grid thead .name { z-index: 3; font-weight: 700; background: var(--surface-2); }
.grid .name.self { font-weight: 800; color: var(--accent); }
.grid .name small { color: var(--muted); font-weight: 400; }
.grid .weekend { background-color: var(--weekend); }
/* De regels van een ploeg krijgen een tint van de ploegkleur; de vakjes met een dienst houden hun eigen kleur. */
.grid tbody tr { --tint: var(--surface); --tint-weekend: var(--weekend); --tint-name: var(--surface); --tint-head: var(--surface-2); }
@supports (color: color-mix(in srgb, red, blue)) {
  .grid tbody tr.member-row, .grid tbody tr.team-row {
    --tint: color-mix(in srgb, var(--team, var(--surface)) 11%, var(--surface));
    --tint-weekend: color-mix(in srgb, var(--team, var(--weekend)) 11%, var(--weekend));
    --tint-name: color-mix(in srgb, var(--team, var(--surface)) 24%, var(--surface));
    --tint-head: color-mix(in srgb, var(--team, var(--surface-2)) 46%, var(--surface));
  }
}
.grid tbody td { background-color: var(--tint); }
.grid tbody td.weekend { background-color: var(--tint-weekend); }
.grid tbody .name { background: var(--tint-name); box-shadow: inset 4px 0 0 var(--team, transparent); }
.grid .team-row td { background-color: var(--tint-name); }
.grid .team-row .name { background: var(--tint-head); }
/* Verlofrooster: alleen afwezigheid in kleur; de dienst volgens het rooster staat er licht onder. */
.grid td.dim { color: var(--muted); font-weight: 400; font-size: .74rem; }
.dim-sample { background: var(--surface-2); color: var(--muted); font-weight: 400; }
/* Bevoegdheid: B = bevoegd, O = in opleiding, een ster voor prioriteit. */
.grid.quals th, .grid.quals td { min-width: 64px; }
.grid.quals thead th span { text-transform: none; }
.grid td.q-b, .pill.q-b { background-color: var(--ok-bg); color: var(--ok); }
.grid td.q-o, .pill.q-o { background-color: var(--warn-bg); color: var(--warn); }
.q-star { margin-left: 2px; color: #F59E0B; font-size: .82em; }
/* De functie die uit de bevoegdheden volgt. */
.grid.quals .q-title { min-width: 150px; padding: 0 10px; text-align: left; color: var(--muted); }
.grid.quals thead .q-title { color: var(--ink); }
.member-link { color: inherit; text-decoration: none; }
.member-link:hover, .member-link:focus-visible { color: var(--accent); text-decoration: underline; }
.grid thead th.weekend { background-color: var(--surface-3); }
.grid thead th.today { background: var(--brand); background-image: var(--grad); color: var(--brand-ink); }
.grid thead th.today span { color: var(--brand-ink); opacity: .85; }
.grid td.today { box-shadow: inset 2px 0 0 var(--brand), inset -2px 0 0 var(--brand); }
.grid .team-row th, .grid .team-row td { font-weight: 800; border-top: 2px solid var(--line); }
.grid .guest-head .name { background: var(--surface-2); }
.grid .guest-head th, .grid .guest-head td { height: 26px; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); }
.grid td.c { font-weight: 600; }
.grid td.free { color: var(--muted); font-weight: 400; }
.grid td.manual { font-weight: 900; text-decoration: underline; }
.grid td.override { outline: 2px dashed var(--muted); outline-offset: -3px; }
.grid td.extra { outline: 2px solid var(--extra); outline-offset: -2px; }
/* Geschoven van dienst: wie eigenlijk een andere dienst had en is opgeschoven om een plaats te bezetten. */
.grid td.moved, .moved-sample, .week-code.moved, .mini-day.moved .mini-code { outline: 2px solid var(--moved); outline-offset: -2px; }
.moved-sample { background-color: #FFE680; color: #17202E; }
/* Verlof per uur: de dienst of de post blijft in het vakje staan, met onderin een strook in de kleur van het verlof. */
.grid td.part { position: relative; padding-bottom: 14px; font-size: .78rem; line-height: 1; vertical-align: middle; }
.grid td .hrs { position: absolute; left: 0; right: 0; bottom: 0; height: 15px; overflow: hidden; font-size: .7rem; font-weight: 800; line-height: 15px; letter-spacing: -.02em; text-align: center; white-space: nowrap; }
.grid td.dim .hrs { font-size: .7rem; }
.hrs.pending { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0) 0 4px, rgba(120, 130, 145, .6) 4px 7px); }
.pill.hrs-sample { font-size: .72rem; }
.status.part.pending { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0) 0 5px, rgba(120, 130, 145, .45) 5px 9px); }
.mini-day .mini-hrs { display: block; width: 100%; max-width: 38px; border-radius: 3px; font-size: .62rem; font-weight: 800; line-height: 13px; text-align: center; white-space: nowrap; overflow: hidden; }
.member-bar-hrs { flex: none; padding: 2px 5px; border-radius: 4px; font-size: .72rem; font-weight: 800; }
.grid td.editable { cursor: pointer; }
.grid td.editable:hover { filter: brightness(1.12); }
:root[data-theme="light"] .grid td.editable:hover { filter: brightness(.94); }
.grid.compact th, .grid.compact td { height: 26px; min-width: 30px; font-size: .78rem; }
.grid.compact .name { min-width: 120px; }
.grid tr.highlight .name { background: var(--warn-bg); color: var(--warn); font-weight: 800; }
@media (max-width: 760px) {
  .roster-panel { padding: 12px 10px; }
  .grid .name { min-width: 116px; max-width: 132px; padding: 0 6px 0 10px; font-size: .8rem; }
}
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0 0; font-size: .85rem; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; }
.hint { margin-top: 8px; }
.week { padding: 4px 16px; }
.week-day { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.week-day:first-child { border-top: 0; }
.week-day.is-today .week-date { color: var(--accent); }
.week-date { width: 36px; display: grid; justify-items: center; line-height: 1.15; }
.week-date strong { font-size: .75rem; text-transform: uppercase; }
.week-date span { font-size: 1.25rem; font-weight: 700; }
.week-code { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 6px; font-weight: 800; flex: none; }
.week-code.extra { outline: 2px solid var(--extra); outline-offset: -2px; }
.week-text { display: grid; gap: 2px; min-width: 0; }
.week-text .status { justify-self: start; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { min-height: 44px; padding: 0 14px; border: 2px solid transparent; border-radius: 6px; background: var(--tone, var(--surface-2)); color: var(--tone-ink, var(--ink)); font: 700 .92rem var(--font); cursor: pointer; }
.choice.active { border-color: var(--ink); }
.gap-list { display: grid; gap: 10px; margin-top: 4px; }
.gap-day { display: grid; gap: 8px; padding: 12px; border-radius: 6px; background: var(--surface-2); }
.gap { display: inline-flex; align-items: center; padding: 4px 10px 4px 4px; border-radius: 6px; background: var(--danger-bg); color: var(--danger); font-weight: 700; }
.gap-post { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.gap-post:first-of-type { border-top: 0; padding-top: 0; }
.cands { display: grid; gap: 6px; }
.cand { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.cand-main { display: grid; gap: 2px; min-width: 0; }
.cand-main small { color: var(--muted); }
.cand .why { color: var(--warn); }
.atw-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.atw-note { font-size: .82rem; color: var(--muted); }
.atw-ok { color: var(--ok); }
.atw-bad { color: var(--warn); background: var(--warn-bg); padding: 10px 12px; border-radius: 6px; display: grid; gap: 4px; }

/* ---------- Verlof en goedkeuren ---------- */
.preview { display: grid; gap: 8px; padding: 12px 14px; border-radius: 6px; background: var(--surface-2); min-height: 52px; }
.preview:empty { display: none; }
.preview-main { font-size: 1.05rem; }
.requests { list-style: none; margin: 0; padding: 0; }
.request { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.request:first-child { border-top: 0; padding-top: 0; }
.request-main { display: grid; gap: 4px; min-width: 0; }
.request-side { display: grid; gap: 8px; justify-items: end; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--muted); font-weight: 600; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--ink); }
/* De kop onder het tabblad Verlofrooster: de titel met de schermen ernaast (op een smal scherm eronder). */
.leave-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 28px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.leave-head .page-title { margin: 0 0 9px; }
.leave-head .tabs { flex: 1 1 auto; min-width: 0; margin: 0; border-bottom: 0; }
.leave-head .page-sub { margin: 0 0 11px; }

/* ---------- Meldingen ---------- */
.notices { list-style: none; margin: 0; padding: 0; }
.notice { padding: 14px 0 14px 14px; border-top: 1px solid var(--line); border-left: 3px solid transparent; }
.notice:first-child { border-top: 0; }
.notice.unread { border-left-color: var(--brand); }
.notice-head { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: baseline; }
.notice p { margin: 6px 0 0; }
.notice-gaps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.notice-gaps li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; font-size: .93rem; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.push-state { display: grid; gap: 10px; justify-items: start; }
.push-state p { margin: 0; }
.tabs a.active { color: var(--accent); border-color: var(--accent); }
.approve-list { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .approve-list { grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); } }
.approve { display: grid; gap: 12px; margin: 0; min-width: 0; }
.approve header { display: flex; align-items: center; gap: 12px; }
.approve header > div { flex: 1; min-width: 0; }
.approve .avatar { width: 44px; height: 44px; }
.approve-period { font-size: 1.05rem; }
.quote { color: var(--muted); font-style: italic; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facts.single { grid-template-columns: 1fr; }
.fact { display: grid; gap: 2px; padding: 12px; border-radius: 6px; background: var(--surface-2); }
.fact span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.fact strong { font-size: 1.1rem; }
.fact small { color: var(--muted); }
.fact.bad { background: var(--danger-bg); }
.fact.bad strong { color: var(--danger); }
.fact.good strong { color: var(--ok); }
.staffing { display: flex; flex-wrap: wrap; gap: 6px; }
.staff-day { display: grid; justify-items: center; padding: 6px 8px; min-width: 52px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); line-height: 1.2; }
.staff-day.bad { background: var(--danger-bg); color: var(--danger); }
.mini .grid-wrap { max-height: 320px; margin-top: 8px; }
.decide { justify-content: flex-end; }
.decide .btn { flex: 1; }
@media (min-width: 761px) { .decide .btn { flex: 0 1 180px; } }
.reject { display: grid; gap: 8px; }

/* ---------- Beheer ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; padding: 12px 14px; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
@media (max-width: 700px) {
  .table thead { display: none; }
  .table tr { display: block; padding: 10px 14px; border-top: 1px solid var(--line); }
  .table td { display: flex; gap: 12px; justify-content: space-between; padding: 3px 0; border: 0; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; text-align: left; flex: none; }
  .table td:first-child { text-align: left; font-size: 1rem; }
  .table td:first-child::before, .table td[data-label=""]::before { content: none; }
}
.cred-list { display: grid; gap: 8px; margin-top: 12px; max-height: 320px; overflow: auto; }
.cred { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 6px; background: var(--surface-2); }
.cred strong { flex: 1 1 140px; }
.qual-list { display: grid; margin-top: 12px; }
.qual-row { display: grid; grid-template-columns: 1fr 150px 44px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.qual-row > div { display: grid; line-height: 1.25; min-width: 0; }
.star { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 6px; background: none; color: var(--line); cursor: pointer; }
.star.on { color: #F59E0B; }
.star.on svg { fill: currentColor; }
.star:disabled { opacity: .35; cursor: default; }
.check-chip { cursor: pointer; }
.logo-preview { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.logo-preview img { border-radius: 4px; background: #fff; }
.wide { grid-column: 1 / -1; }

/* ---------- Dialogen en meldingen ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; justify-items: center; background: var(--overlay); backdrop-filter: blur(2px); }
.modal { width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 8px 8px 0 0; box-shadow: var(--shadow); }
.modal.wide { max-width: 860px; }
.modal > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 8px 8px 20px; }
.modal-body { padding: 4px 20px 16px; overflow: auto; display: grid; gap: 12px; }
.modal-body > h3 { margin: 6px 0 0; }
.modal > footer { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
@media (min-width: 640px) {
  .overlay { align-items: center; padding: 24px; }
  .modal { border-radius: 8px; }
}
.toasts { position: fixed; left: 0; right: 0; bottom: 24px; z-index: 60; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { max-width: 520px; padding: 12px 18px; border-radius: 6px; background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: var(--shadow); transition: opacity .4s; }
.toast.error { background: #B42318; color: #fff; }
.toast.hide { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .toast, .btn, .kpi, .maintabs a { transition: none; } }

/* ---------- De leden in de roosters: elk een eigen balk met een rand in de ploegkleur, zoals op het tabblad Ploegen ---------- */
.grid { border-spacing: 0 4px; }
.grid tbody tr.member-row > th, .grid tbody tr.member-row > td { border-top: 2px solid var(--team, var(--line)); border-bottom: 2px solid var(--team, var(--line)); }
.grid tbody tr.member-row > .name { border-left: 2px solid var(--team, var(--line)); border-radius: 4px 0 0 4px; box-shadow: none; }
.grid tbody tr.member-row > :last-child { border-right: 2px solid var(--team, var(--line)); border-radius: 0 4px 4px 0; }
.grid tbody tr.member-row > td { border-right-color: color-mix(in srgb, var(--team, var(--line)) 30%, var(--line)); }

/* ---------- Dagen kiezen voor verlof en de balk onderin ---------- */
:root { --pick: #22D3EE; --pick-bg: rgba(34, 211, 238, .34); }
:root[data-theme="light"] { --pick: #0E7490; --pick-bg: rgba(14, 116, 144, .22); }
.grid td.pickable, .week-day.pickable { cursor: pointer; }
.grid td.pickable:hover { filter: brightness(1.12); }
:root[data-theme="light"] .grid td.pickable:hover { filter: brightness(.94); }
.grid td.sel { outline: 3px solid var(--pick); outline-offset: -3px; background-image: linear-gradient(var(--pick-bg), var(--pick-bg)); font-weight: 800; }
.week-day.pickable { padding-left: 8px; padding-right: 8px; border-radius: 4px; }
.week-day.sel { outline: 3px solid var(--pick); outline-offset: -3px; background: var(--pick-bg); }
.select-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--topbar); border-top: 2px solid var(--brand-2); box-shadow: 0 -12px 28px rgba(0, 0, 0, .32); }
.select-bar[hidden] { display: none; }
.select-bar-inner { display: flex; align-items: center; gap: 10px; max-width: 1400px; margin: 0 auto; }
.select-text { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: .9rem; }
.select-text span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-bar .btn.primary:disabled { opacity: .55; }
.page.has-select-bar { padding-bottom: 86px; }
body:has(.has-select-bar) .toasts { bottom: 96px; }
@media (max-width: 760px) {
  .select-bar-inner { flex-wrap: wrap; }
  .select-text { flex-basis: 100%; }
  .select-bar-inner .btn.primary { flex: 1; justify-content: center; }
  .page.has-select-bar { padding-bottom: 128px; }
  body:has(.has-select-bar) .toasts { bottom: 136px; }
}
.picked-days { margin: 2px 0 0; font-weight: 700; }

/* ---------- Postenrooster zoals het maandrooster van de Android-app: filters, een gekozen post licht op ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex-basis: 100%; }
.filters select, .filters input { flex: 0 1 220px; width: auto; min-height: 40px; }
.filters [hidden] { display: none; }
.grid td.faded { opacity: .28; }
.filter-empty { margin: 10px 2px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  /* Op de telefoon compact, zoals in de Android-app: meer dagen en meer leden in beeld. */
  .toolbar { gap: 8px; }
  .toolbar .actions { margin-left: auto; }
  .toolbar .btn-label { display: none; }
  .toolbar .actions .btn { padding: 0 10px; }
  .toolbar > select { flex: 1 1 140px; min-height: 38px; font-size: .9rem; }
  /* De drie filters naast elkaar op één regel, zoals de knoppen Ploeg, Medewerker en Post in de Android-app. */
  .filters { flex-wrap: nowrap; gap: 6px; min-width: 0; max-width: 100%; }
  .filters select, .filters input { flex: 1 1 0; min-width: 0; min-height: 36px; padding-left: 8px; padding-right: 4px; font-size: .8rem; }
  .filters .btn { flex: none; padding: 0 8px; font-size: .78rem; }
  .segmented button { min-height: 34px; padding: 0 10px; font-size: .85rem; }
  .grid { border-spacing: 0 3px; font-size: .76rem; }
  .grid th, .grid td { height: 30px; min-width: 32px; padding: 0 2px; }
  .grid thead th { height: 40px; }
  .grid .name { min-width: 104px; max-width: 120px; padding: 0 5px 0 8px; font-size: .76rem; }
  .grid td.part { padding-bottom: 12px; font-size: .7rem; }
  .grid td .hrs { height: 12px; line-height: 12px; font-size: .62rem; }
  .roster-body > .grid-wrap { max-height: 64vh; }
}

/* ---------- Verlof aanvragen: een maandkalender, zoals in de Android-app ---------- */
.page-head.with-back { flex-direction: column; align-items: flex-start; gap: 0; }
.leave-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .leave-layout { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); } }
.leave-layout > .card { margin: 0; }
.leave-cal { display: grid; gap: 10px; }
.cal-stepper { justify-content: space-between; }
.cal-stepper .period { flex: 1; text-align: center; font-size: 1.1rem; }
.cal-modes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cal-modes [hidden] { display: none; }
/* "Selectie wissen" staat altijd naast "Periode" en is onzichtbaar zolang er niets is gekozen: de kalender verspringt niet. */
.cal-modes { flex-wrap: nowrap; }
.cal-modes .btn { flex: none; white-space: nowrap; }
.invisible { visibility: hidden; }
/* Verlof chefs: het rooster is zo hoog als nodig, zodat alle chefs in beeld zijn zonder te schuiven. */
.page-verlofchefs .roster-body > .grid-wrap { flex: none; max-height: none; min-height: 0; }
.cal-hint { margin: 0; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { padding: 2px 0; text-align: center; font-size: .78rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.cal-head.weekend { color: var(--accent); }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; aspect-ratio: 1; min-height: 44px; padding: 2px;
  border: 2px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; }
.cal-day:hover:not(:disabled) { border-color: var(--accent); }
.cal-day:disabled { cursor: not-allowed; }
.cal-num { font-size: 1.02rem; font-weight: 800; line-height: 1; }
.cal-code { min-width: 22px; padding: 1px 5px; border-radius: 3px; font-size: .72rem; font-weight: 700; line-height: 1.3; color: var(--muted); }
.cal-day.leave .cal-code { color: inherit; }
.cal-part { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 0 0 4px 4px; font-size: .6rem; font-weight: 800; line-height: 12px; text-align: center; }
.cal-day.today { border-color: var(--accent); }
.cal-day.pending { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0) 0 5px, rgba(120, 130, 145, .55) 5px 9px); }
.cal-day.sel { border-color: var(--pick); background: var(--brand); background-image: var(--grad); color: var(--brand-ink); }
.cal-day.sel .cal-code { color: var(--brand-ink); }
.cal-day.start { box-shadow: 0 0 0 3px var(--pick); }
.cal-empty { aspect-ratio: 1; }
.pill.cal-sample-sel { background: var(--brand); background-image: var(--grad); }
.pill.cal-sample-today { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--accent); }
.cal-legend { margin-top: 0; }
.cal-legend .pill { display: inline-block; width: 18px; height: 18px; min-width: 0; padding: 0; margin-right: 6px; border-radius: 4px; vertical-align: middle; }
.cal-count { margin: 0; font-weight: 700; }
.btn.big { min-height: 52px; font-size: 1rem; letter-spacing: .03em; }
.leave-cal .leave-entry { margin-top: 2px; }
@media (max-width: 760px) {
  .cal { gap: 3px; }
  .cal-num { font-size: .95rem; }
  .cal-code { font-size: .66rem; padding: 0 3px; }
}

/* ---------- Afdrukken: alleen het rooster, liggend en op wit ---------- */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  :root, :root[data-theme] { color-scheme: light; --bg: #fff; --glow: none; --surface: #fff; --surface-2: #F1F3F6; --surface-3: #E6E9EE; --ink: #000; --muted: #444; --line: #B8BEC8; --weekend: #F4F5F7; --shadow: none; }
  body { background: #fff; color: #000; }
  .shell { height: auto; overflow: visible; display: block; }
  .shell-head, .toasts, .offline, .no-print, .kpis { display: none !important; }
  .print-only { display: block; font-size: 14pt; margin-bottom: 6mm; }
  #view, .page, .page-start, .page-rooster, .page-verlofrooster, .page-bevoegdheid, .start-layout, .start-main, .roster-panel, .roster-body { display: block; padding: 0; overflow: visible; min-height: 0; border: 0; box-shadow: none; background: none; }
  .grid-wrap, .roster-body > .grid-wrap { overflow: visible; max-height: none; min-height: 0; border: 0; }
  .grid { font-size: 7pt; width: 100%; min-width: 0; }
  .grid th, .grid td { height: 5mm; min-width: 0; padding: 0 1px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .grid thead th { position: static; height: 8mm; }
  .grid .name { position: static; min-width: 34mm; }
  .legend { font-size: 7pt; }
}
