/* ─────────────────────────────────────────────────────────
   Iselmar Receptie — Activiteiten-app
   Branding: website-look (League Spartan + Lekton, beige/navy).
   Werkt op mobiel (≤719), tablet (720-1099), desktop (≥1100).
───────────────────────────────────────────────────────── */
:root {
  --beige: #F5EEEA;
  --sky: #C7D9E5;
  --white: #FFFFFF;
  --teal: #577C8D;
  --navy: #2F4157;
  --ink: #1a242f;
  --muted: rgba(27,42,59,0.65); /* WCAG AA — overgenomen van iselmar-v2.css */
  --line: #d9c9bf;
  --line-soft: #ece1d9;
  --accent: #C26B4F; /* v2-terracotta — uitgelijnd met iselmar-v2.css */
  /* CLAUDE.md alias + a11y-tokens (Fase 1 — 2026-05-14) */
  --terracotta: var(--accent);
  --success: #059669;
  --warning: #D97706;
  --danger:  #DC2626;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* Globale focus-indicatie — WCAG 2.4.7 AA. Werkt op alle interactieve
   elementen (knoppen, links, inputs) zonder hover-states te raken.
   Fallback chain voor het geval --terracotta of --accent niet zijn gedefinieerd. */
*:focus-visible {
  outline: 2px solid var(--terracotta, var(--accent, #C26B4F));
  outline-offset: 2px;
}

/* Toast/live-region — gepaard met window.IvToast helper in app.js.
   Mount-element zit onderaan index.html (<div id="iv-toast">). */
.iv-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--navy);
  color: var(--white);
  font-family: 'League Spartan', sans-serif;
  font-size: calc(14px * var(--type-scale, 1.2));
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(20,34,51,0.2);
  max-width: 90vw;
  pointer-events: none;
}
.iv-toast[data-type="error"]   { background: var(--danger); }
.iv-toast[data-type="success"] { background: var(--success); }
.iv-toast[data-type="warning"] { background: var(--warning); }
html, body {
  margin: 0;
  padding: 0;
  background: var(--beige);
  color: var(--ink);
  font-family: 'Lekton', 'Menlo', monospace;
  -webkit-font-smoothing: antialiased;
}
input, select, textarea, button { font-family: inherit; }
@media (max-width: 1099px) {
  input, select, textarea { font-size: calc(16px * var(--type-scale, 1.2)) !important; } /* iOS no-zoom */
}

/* ─── LOGIN ─── */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  padding: 32px 28px;
  width: 100%;
  max-width: 400px;
  min-height: 520px;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.login-logo { height: 44px; margin: 0 auto 18px; display: block; }
.login-title {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(28px * var(--type-scale, 1.2));
  color: var(--navy);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.login-sub {
  font-size: calc(13px * var(--type-scale, 1.2));
  color: var(--muted);
  margin: 0 0 24px;
}
.login-form { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: flex; gap: 12px; }
.field-row > .field { flex: 1 1 0; min-width: 0; }
.field > span {
  font-family: 'Lekton', monospace;
  font-size: calc(10px * var(--type-scale, 1.2));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.field > input,
.field > select {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: calc(14px * var(--type-scale, 1.2));
  color: var(--navy);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.field > input:focus,
.field > select:focus {
  outline: 2px solid var(--teal);
  outline-offset: -1px;
  border-color: var(--teal);
}
.login-err, .form-err {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 10px 14px;
  font-size: calc(12px * var(--type-scale, 1.2));
  margin-top: 8px;
}
.btn-primary {
  margin-top: 8px;
  padding: 14px 22px;
  background: var(--navy);
  color: var(--white);
  border: 0;
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(14px * var(--type-scale, 1.2));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
}
.btn-primary:hover:not(:disabled) { background: #243549; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── APP SHELL ─── */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 72px; /* ruimte voor bottom-nav */
}
@media (min-width: 1100px) {
  .app-shell { padding-bottom: 0; }
}

/* Wanneer de module-nav verborgen is (rol met maar één module zichtbaar):
   centreer de hoofdcontent zodat de pagina niet aan één kant blijft hangen. */
body.module-nav-leeg .module-nav { display: none !important; }
body.module-nav-leeg .app-main {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 1100px) {
  body.module-nav-leeg .app-body { grid-template-columns: 1fr; }
}

/* Header — kale balk met logo + user */
.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-logo { height: 32px; }
.app-header-meta { display: flex; align-items: center; gap: 12px; }
.app-user {
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
}
.app-logout {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.app-logout svg { width: 18px; height: 18px; }
.app-logout:hover { background: var(--beige); }

/* ─── DATUM nav ─── */
.datum-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px 10px;
  background: var(--beige);
}
.datum-cal-wrap {
  flex: 1;
  max-width: 340px;
  position: relative;
}
.datum-cal-wrap .iselcal-root { width: 100%; }
.datum-cal-wrap .iselcal-trigger {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 10px 16px;
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(15px * var(--type-scale, 1.2));
  color: var(--navy);
  gap: 8px;
}
.datum-cal-wrap .iselcal-panel {
  z-index: 200;
  left: 50%;
  transform: translateX(-50%);
}
.datum-arrow {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.datum-arrow svg { width: 16px; height: 16px; }
.datum-arrow:hover { background: var(--beige); }

/* ─── ACT-TABS ─── */
.act-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 18px 14px;
  background: var(--beige);
  border-bottom: 1px solid var(--line-soft);
  -webkit-overflow-scrolling: touch;
}
.act-tab {
  padding: 8px 16px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: 'League Spartan', sans-serif;
  font-weight: 500;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--navy);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.act-tab.is-active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ─── MAIN ─── */
.app-main { padding: 20px 18px 24px; flex: 1; }
@media (min-width: 720px) {
  /* Tablet+: centreer content, max breedte zodat alles netjes leesbaar blijft */
  .app-main { max-width: 960px; margin: 0 auto; width: 100%; padding: 30px 24px 60px; }
}
@media (min-width: 1100px) {
  .app-main { max-width: 1400px; padding: 36px 40px 60px; }
}

/* Sectie-header per activiteit met datum-vakje */
.act-section { margin-bottom: 28px; }
.act-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.act-section-title {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(18px * var(--type-scale, 1.2));
  color: var(--navy);
  margin: 0;
  letter-spacing: -0.01em;
}
@media (min-width: 720px) {
  .act-section-title { font-size: calc(22px * var(--type-scale, 1.2)); }
}
/* ── Mailings module ─────────────────────────────────────────
   Sidebar (templates + cron) links, editor rechts. v2 styling. */
.ml-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-bottom: 24px;
}
@media (min-width: 920px) { .ml-shell { grid-template-columns: 280px 1fr; align-items: start; } }
.ml-sidebar { background: var(--white); border: 1px solid var(--line-soft); padding: 14px; }
.ml-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.ml-list-item {
  display: flex; flex-direction: column; align-items: stretch;
  background: var(--beige);
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.ml-list-item:hover { background: var(--beige-2, #EFE5DE); }
.ml-list-item.is-active {
  background: var(--white);
  border-color: var(--line);
  border-left-color: var(--terracotta, var(--accent, #C26B4F));
}
.ml-list-label {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(13px * var(--type-scale, 1.2));
  color: var(--navy);
  margin-bottom: 4px;
}
.ml-list-meta { display: flex; gap: 4px; }
.ml-badge {
  display: inline-flex; align-items: center;
  font-family: 'Lekton', monospace;
  font-size: calc(10px * var(--type-scale, 1.2));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
}
.ml-badge-custom  { background: rgba(194,107,79,0.14); color: #8a3f25; }
.ml-badge-default { background: rgba(47,65,87,0.10); color: var(--navy); }
.ml-badge-off     { background: rgba(217,119,6,0.10); color: #92400e; }

/* ── Cron-jobs module (eigen tab) ─────────────────────────
   Read-only kaarten per job met doel + schema + run-knop. */
.cr-shell { padding-bottom: 24px; }
.cr-shell-head { margin-bottom: 14px; }
.cr-shell-title {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(22px * var(--type-scale, 1.2));
  color: var(--navy);
  margin: 0 0 6px;
}
.cr-shell-hint {
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}
.cr-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 760px) { .cr-grid { grid-template-columns: 1fr 1fr; } }
.cr-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cr-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.cr-title {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(16px * var(--type-scale, 1.2));
  color: var(--navy);
  margin: 0;
}
.cr-naam {
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.cr-doel {
  font-family: 'Lora', Georgia, serif;
  font-size: calc(14px * var(--type-scale, 1.2));
  color: var(--ink);
  line-height: 1.55;
  margin: 0;
}
.cr-raakt {
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.cr-raakt-lbl { letter-spacing: 0.08em; }
.cr-chip {
  background: var(--beige);
  color: var(--navy);
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  padding: 2px 8px;
}
.cr-kv {
  margin: 0;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 4px 12px;
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
}
.cr-kv dt { color: var(--muted); }
.cr-kv dd { margin: 0; color: var(--ink); }
.cr-kv code {
  background: var(--beige);
  padding: 2px 6px;
  font-weight: 600;
  color: var(--navy);
}
.cr-tz { color: var(--muted); }
.cr-actions { margin-top: 4px; }
.cr-run-btn { padding: 6px 14px !important; }

.ml-editor-wrap { background: var(--white); border: 1px solid var(--line-soft); padding: 18px 16px; min-height: 400px; }
.ml-editor { display: flex; flex-direction: column; gap: 12px; }
.ml-editor-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 4px;
}
.ml-editor-title { font-family: 'League Spartan', sans-serif; font-weight: 700; font-size: calc(18px * var(--type-scale, 1.2)); color: var(--navy); margin: 0; }
.ml-editor-desc { font-family: 'Lekton', monospace; font-size: calc(12px * var(--type-scale, 1.2)); color: var(--muted); margin: 4px 0 0; }
.ml-editor-actions-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.ml-input, .ml-textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 10px;
  font-family: 'Lekton', monospace;
  font-size: calc(13px * var(--type-scale, 1.2));
  color: var(--ink);
}
.ml-input:focus, .ml-textarea:focus { border-color: var(--navy); outline: none; }
.ml-textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.ml-textarea-html { font-family: 'Menlo', monospace; font-size: calc(12px * var(--type-scale, 1.2)); min-height: 240px; }

.ml-placeholders {
  background: var(--beige);
  border: 1px solid var(--line);
  padding: 10px 12px;
}
.ml-placeholders-title {
  font-family: 'Lekton', monospace;
  font-size: calc(10px * var(--type-scale, 1.2));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 700;
}
.ml-placeholders-list { display: flex; flex-wrap: wrap; gap: 4px; }
.ml-ph-chip {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--navy);
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  padding: 4px 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ml-ph-chip:hover { background: var(--terracotta, var(--accent, #C26B4F)); color: var(--white); border-color: var(--terracotta, var(--accent, #C26B4F)); }

.ml-editor-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.ml-empty { text-align: center; color: var(--muted); font-family: 'Lekton', monospace; font-size: calc(13px * var(--type-scale, 1.2)); padding: 24px; }

/* ── Betaallink module (walk-in Mollie) ────────────────────
   Form-kaart + result-kaart met QR + recent-tabel. v2 styling. */
.bl-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-bottom: 24px;
}
@media (min-width: 920px) {
  .bl-shell { grid-template-columns: 1fr 1fr; align-items: start; }
  .bl-recent-card { grid-column: 1 / -1; }
}
.bl-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  padding: 18px 16px;
}
.bl-card-title {
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 700;
}
.bl-result-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.bl-result-bedrag {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(36px * var(--type-scale, 1.2));
  color: var(--navy);
  line-height: 1;
  margin: 4px 0 4px;
}
.bl-result-omschr {
  font-family: 'Lora', Georgia, serif;
  font-size: calc(14px * var(--type-scale, 1.2));
  color: var(--ink);
  margin-bottom: 14px;
}
.bl-qr {
  display: flex; justify-content: center;
  margin: 8px 0 14px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
}
.bl-qr img, .bl-qr canvas { display: block; max-width: 100%; height: auto; }
.bl-url-wrap {
  display: flex; gap: 6px; margin-bottom: 10px;
}
.bl-url-input {
  flex: 1; min-width: 0;
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
  padding: 8px 10px;
  background: var(--beige);
  border: 1px solid var(--line);
  color: var(--ink);
}
.bl-btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--line);
  padding: 8px 14px;
  font-family: 'League Spartan', sans-serif;
  font-weight: 500;
  font-size: calc(12px * var(--type-scale, 1.2));
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.bl-btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.bl-result-actions {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
}
.bl-result-hint {
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.bl-mail-bevestig {
  background: rgba(5,150,105,0.10);
  border: 1px solid var(--success, #059669);
  color: #065f46;
  font-family: 'Lekton', monospace;
  font-size: calc(13px * var(--type-scale, 1.2));
  padding: 8px 12px;
  margin-bottom: 14px;
}
.bl-mail-bevestig.bl-mail-warn {
  background: rgba(217,119,6,0.10);
  border-color: var(--warning, #D97706);
  color: #92400e;
}
.bl-qr-details {
  border: 1px solid var(--line);
  background: var(--beige);
  padding: 8px 12px;
  margin-bottom: 12px;
}
.bl-qr-details summary {
  cursor: pointer;
  font-family: 'League Spartan', sans-serif;
  font-weight: 500;
  font-size: calc(13px * var(--type-scale, 1.2));
  color: var(--navy);
  letter-spacing: 0.02em;
}
.bl-qr-details[open] summary { margin-bottom: 8px; }

/* Gebrande datepicker in booking-modal */
.bkf-datum-mount { min-height: 44px; }
.bkf-datum-mount .iselcal-root { width: 100%; }
.bkf-datum-mount .iselcal-panel { z-index: 1200; }
.bl-badge {
  display: inline-flex; align-items: center;
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(11px * var(--type-scale, 1.2));
  letter-spacing: 0.05em;
  padding: 4px 10px;
}
.bl-badge-ok { background: rgba(5,150,105,0.12); color: #065f46; }
.bl-badge-err { background: rgba(220,38,38,0.10); color: #991b1b; }
.bl-badge-pending { background: rgba(217,119,6,0.10); color: #92400e; }
.bl-empty {
  text-align: center; color: var(--muted);
  font-family: 'Lekton', monospace;
  font-size: calc(13px * var(--type-scale, 1.2));
  padding: 20px;
}
.bl-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Lekton', monospace;
  font-size: calc(13px * var(--type-scale, 1.2));
}
/* Mobiel: brede betaallink-tabel horizontaal scrollbaar i.p.v. afgekapt. */
@media (max-width: 700px) {
  .bl-recent-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .bl-table { min-width: 480px; }
}
.bl-table th {
  text-align: left;
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(11px * var(--type-scale, 1.2));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
}
.bl-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
}
.bl-table td.bl-num {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  color: var(--navy);
}
.bl-table th.bl-num { text-align: right; }
.bl-table tr:last-child td { border-bottom: 0; }

/* ── Dagafsluiting module ─────────────────────────────────
   Z-rapport per dag: kaart-grid met totaal/BTW/betaalmethoden +
   fiscaal sluit-actiebalk onderaan. v2 styling (navy/beige/terracotta). */
.da-shell { display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px; }
.da-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line-soft);
}
.da-toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.da-cal { min-width: 200px; }
.da-toolbar-right { display: flex; align-items: center; gap: 8px; }
.da-badge {
  display: inline-flex; align-items: center;
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(12px * var(--type-scale, 1.2));
  letter-spacing: 0.04em;
  padding: 6px 12px;
}
.da-badge-ok { background: rgba(5,150,105,0.12); color: #065f46; border: 1px solid var(--success, #059669); }
.da-badge-pending { background: rgba(217,119,6,0.10); color: #92400e; border: 1px solid var(--warning, #D97706); }

.da-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 760px) {
  .da-grid { grid-template-columns: 1fr 1fr; }
  /* Eerste kaart (totaal) over volle breedte */
  .da-card:first-child { grid-column: 1 / -1; }
}
.da-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  padding: 18px 16px;
}
.da-card-title {
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 700;
}
.da-totaal {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(38px * var(--type-scale, 1.2));
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: 14px;
}
.da-kv {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
}
.da-kv dt {
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--muted);
}
.da-kv dd {
  margin: 0;
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(14px * var(--type-scale, 1.2));
  color: var(--navy);
  text-align: right;
}
.da-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Lekton', monospace;
  font-size: calc(13px * var(--type-scale, 1.2));
}
.da-table th {
  text-align: left;
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(11px * var(--type-scale, 1.2));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 6px 4px;
}
.da-table td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
}
.da-table td.da-num {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  color: var(--navy);
}
.da-table tr:last-child td { border-bottom: 0; }
.da-empty { text-align: center; color: var(--muted); padding: 12px !important; }

.da-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 16px;
  background: var(--beige);
  border: 1px solid var(--line);
}
.da-actions-hint {
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.da-sluit-btn {
  background: var(--terracotta, var(--accent, #C26B4F));
  color: var(--white);
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(14px * var(--type-scale, 1.2));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 22px;
  border: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.da-sluit-btn:hover { background: #A1573F; }

/* ⚙ Instellingen-knop per categorie (zelfde patroon als .rp-icon-btn op restaurant) */
.act-settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.act-settings-btn:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.bd-meta-hint {
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--muted);
  margin: -8px 0 12px;
}

/* Periode-tarieven editor in act-settings modal */
.as-tiers {
  border: 1px solid var(--line);
  background: var(--beige);
  padding: 14px;
  margin-top: 4px;
}
.as-tiers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.as-tiers-title {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(13px * var(--type-scale, 1.2));
  color: var(--navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.as-tiers-hint {
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--muted);
  margin: 0 0 10px;
}
.as-tier-add {
  background: var(--white);
  border: 1px solid var(--terracotta, var(--accent, #C26B4F));
  color: var(--terracotta, var(--accent, #C26B4F));
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(12px * var(--type-scale, 1.2));
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.as-tier-add:hover { background: var(--terracotta, var(--accent, #C26B4F)); color: var(--white); }
.as-tiers-list { display: flex; flex-direction: column; gap: 8px; }
.as-tier-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "times money scope del"
    "datum datum datum datum";
  column-gap: 8px;
  row-gap: 6px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 10px;
}
.as-tier-times { grid-area: times; display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.as-tier-money { grid-area: money; display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.as-tier-scope { grid-area: scope; min-width: 0; }
.as-tier-del   { grid-area: del; }
.as-tier-datum { grid-area: datum; }
.as-tier-row input,
.as-tier-row select {
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 4px;
  font-family: 'Lekton', monospace;
  font-size: calc(13px * var(--type-scale, 1.2));
  min-width: 0;
}
.as-tier-row input:focus,
.as-tier-row select:focus { border-color: var(--navy); background: var(--white); outline: none; }
.as-tier-row .as-tier-van, .as-tier-row .as-tier-tot { width: 70px; }
.as-tier-row .as-tier-prijs { width: 70px; }
.as-tier-row .as-tier-datum { width: 100%; max-width: 220px; }
.as-tier-row .as-tier-datum[hidden] { display: none !important; }
.as-tier-row .as-tier-scope { width: 100%; }
.as-tier-sep { color: var(--muted); font-family: 'Lekton', monospace; font-size: calc(13px * var(--type-scale, 1.2)); flex-shrink: 0; }
.as-tier-eur { color: var(--muted); font-family: 'Lekton', monospace; font-size: calc(13px * var(--type-scale, 1.2)); flex-shrink: 0; }
.as-tier-scope {
  font-family: 'League Spartan', sans-serif !important;
  font-weight: 500;
  color: var(--navy);
}
.as-tier-del {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  justify-self: end;
}
.as-tier-del:hover { color: var(--danger, #DC2626); background: rgba(220,38,38,0.08); }

/* Op mobiel: tijd/prijs op eigen rij, scope+del op tweede rij, datum als 3e */
@media (max-width: 540px) {
  .as-tier-row {
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "times times times"
      "money scope del"
      "datum datum datum";
  }
}
/* Mollie betaallink + pin/contant ticket info — blauwe info-balk */
.bk-mollie-info,
.bk-ticket-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #e8f4f8;
  border: 1px solid #b6d8e6;
  border-radius: 6px;
  font-size: calc(13px * var(--type-scale, 1.2));
  line-height: 1.5;
  color: var(--navy);
}
.bk-mollie-info svg,
.bk-ticket-info svg { flex-shrink: 0; margin-top: 1px; color: var(--teal); }

/* Booking flow (inline) */
.bkflow {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 18px 40px;
}
.bkflow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.bkflow-back {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
}
.bkflow-back:hover { background: var(--beige); }
.bkflow-dots {
  display: flex;
  gap: 8px;
}
.bkflow-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.bkflow-dot.is-active {
  background: var(--navy);
}
.bkflow-acts {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 16px;
  margin-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.bkflow-act {
  padding: 6px 14px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: 'League Spartan', sans-serif;
  font-weight: 500;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--navy);
  white-space: nowrap;
  cursor: pointer;
  border-radius: 20px;
}
.bkflow-act.is-active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.bkflow-act:hover:not(.is-active) { background: var(--beige); }
.bkflow-title {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(22px * var(--type-scale, 1.2));
  color: var(--navy);
  margin: 0 0 20px;
}

/* Banen-grid: tijdvakken in rijen + 1 kolom per baan */
.banen-grid {
  display: grid;
  background: var(--white);
  border: 1px solid var(--line-soft);
  width: 100%;
}
.banen-cell {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 48px;
}
.banen-cell.is-last { border-right: 0; }
.banen-cell.banen-hed {
  background: var(--beige);
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--navy);
  text-transform: none;
}
.banen-cell.banen-tijd {
  background: var(--beige);
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(13px * var(--type-scale, 1.2));
}

/* Quick-select in blokkades-modus: header-cellen (tijd-cel + baan-header) krijgen
   een terracotta hover/focus zodat duidelijk is dat ze klikbaar zijn. */
.banen-cell.banen-tijd-clickable,
.banen-cell.banen-hed-clickable,
.ag-tijd-clickable {
  cursor: pointer;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.banen-cell.banen-tijd-clickable:hover,
.banen-cell.banen-hed-clickable:hover,
.ag-tijd-clickable:hover {
  background: rgba(194,107,79,0.12);
  color: var(--terracotta, var(--accent, #C26B4F));
}
.banen-cell.banen-tijd-clickable::after,
.banen-cell.banen-hed-clickable::after {
  content: '⊞';
  position: absolute;
  right: 4px;
  top: 2px;
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--terracotta, var(--accent, #C26B4F));
  opacity: 0.5;
}
.ag-tijd-clickable::after {
  content: ' ⊞';
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--terracotta, var(--accent, #C26B4F));
  opacity: 0.5;
  margin-left: 4px;
}
.banen-cell.banen-vrij {
  background: var(--white);
  color: var(--navy);
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(16px * var(--type-scale, 1.2));
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background 0.15s;
}
.banen-cell.banen-vrij.is-last { border-right: 0; }
.banen-cell.banen-vrij:hover { background: var(--beige); }
.banen-cell.banen-geboekt {
  background: var(--sky);
  color: var(--navy);
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(11px * var(--type-scale, 1.2));
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.banen-cell.banen-geboekt:hover {
  background: #b0cad9;
  box-shadow: inset 0 0 0 2px var(--navy);
}
.banen-cell.banen-vol,
.banen-cell.banen-empty-cell {
  color: var(--line);
  cursor: not-allowed;
  background: var(--white);
}

/* Geblokkeerde slots — slot is bewust afgesloten door receptie/beheer */
.banen-cell.banen-blok {
  background: repeating-linear-gradient(
    45deg,
    rgba(217, 119, 6, 0.08),
    rgba(217, 119, 6, 0.08) 6px,
    rgba(217, 119, 6, 0.16) 6px,
    rgba(217, 119, 6, 0.16) 12px
  );
  color: var(--warning, #D97706);
  cursor: help;
  font-size: calc(14px * var(--type-scale, 1.2));
}
.banen-cell.banen-blok:hover { background: rgba(217,119,6,0.22); }

/* Selectie-state in blokkades-modus — voor zowel vrije als geblokkeerde slots */
.banen-cell.is-selected {
  outline: 2px solid var(--terracotta, var(--accent, #C26B4F));
  outline-offset: -2px;
  background: rgba(194,107,79,0.15);
  color: var(--terracotta, var(--accent, #C26B4F));
}

/* Blokkades-modus toolbar — boven de activiteit-grid */
.blokkeer-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}
.blokkeer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--navy);
  font-family: 'League Spartan', sans-serif;
  font-weight: 500;
  font-size: calc(12px * var(--type-scale, 1.2));
  letter-spacing: 0.04em;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.blokkeer-toggle:hover { border-color: var(--terracotta, var(--accent)); color: var(--terracotta, var(--accent)); }
.blokkeer-toggle.is-active {
  background: var(--terracotta, var(--accent, #C26B4F));
  color: var(--white);
  border-color: var(--terracotta, var(--accent, #C26B4F));
}

/* Bulk-bar onderaan — verschijnt bij ≥1 selectie in blokkades-modus.
   Visueel uitgelijnd met sticky booking-bar (navy + terracotta accent). */
.blokkeer-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0));
  background: var(--navy);
  color: var(--white);
  border-top: 3px solid var(--terracotta, var(--accent, #C26B4F));
  box-shadow: 0 -6px 18px rgba(20,34,51,0.22);
  animation: ivStickybarSlide 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.blokkeer-bar-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.blokkeer-bar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  background: var(--terracotta, var(--accent, #C26B4F));
  color: var(--white);
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(14px * var(--type-scale, 1.2));
  border-radius: 4px;
}
.blokkeer-bar-lbl {
  font-family: 'Lekton', monospace;
  font-size: calc(13px * var(--type-scale, 1.2));
  color: rgba(255,255,255,0.85);
}
.blokkeer-bar-cancel,
.blokkeer-bar-confirm {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(13px * var(--type-scale, 1.2));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 18px;
  cursor: pointer;
  border: 0;
  transition: background 0.15s, transform 0.15s;
}
.blokkeer-bar-cancel {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.25);
}
.blokkeer-bar-cancel:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.blokkeer-bar-confirm {
  background: var(--terracotta, var(--accent, #C26B4F));
  color: var(--white);
}
.blokkeer-bar-confirm:hover { background: #A1573F; transform: translateY(-1px); }
@keyframes ivStickybarSlide {
  from { transform: translateY(100%); opacity: 0.6; }
  to   { transform: translateY(0);    opacity: 1;   }
}
.banen-empty {
  padding: 30px 16px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  text-align: center;
  font-family: 'Lekton', monospace;
  font-size: calc(13px * var(--type-scale, 1.2));
  color: var(--muted);
}

@media (max-width: 540px) {
  .banen-grid { grid-template-columns: 80px repeat(auto-fit, minmax(0, 1fr)) !important; }
  .banen-cell { padding: 8px 4px; font-size: calc(11px * var(--type-scale, 1.2)); min-height: 42px; }
  .banen-cell.banen-tijd { font-size: calc(11px * var(--type-scale, 1.2)); padding: 8px 6px; }
  .banen-cell.banen-vrij { font-size: calc(14px * var(--type-scale, 1.2)); }
}

/* Adventuregolf grid: vanaf-uur links + 10-min knoppen rechts */
.ag-grid {
  background: var(--white);
  border: 1px solid var(--line-soft);
}
.ag-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
}
.ag-row:last-child { border-bottom: 0; }
.ag-tijd {
  padding: 14px 16px;
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(14px * var(--type-scale, 1.2));
  color: var(--navy);
  background: var(--beige);
}
.ag-slots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 10px 12px;
}
.ag-slot {
  padding: 8px 4px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--navy);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: center;
}
.ag-slot:hover:not(.geboekt):not(.vol):not([disabled]) {
  background: var(--beige);
  border-color: var(--navy);
}
.ag-slot.geboekt {
  background: var(--sky);
  color: var(--navy);
  border-color: #9cb2c4;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.ag-slot.geboekt:hover {
  background: #b0cad9;
  box-shadow: inset 0 0 0 2px var(--navy);
}
.ag-slot.vol, .ag-slot[disabled] {
  color: var(--line);
  background: var(--white);
  cursor: not-allowed;
  text-decoration: line-through;
  opacity: 0.6;
}
.ag-slot.geblokkeerd {
  background: repeating-linear-gradient(
    45deg,
    rgba(217, 119, 6, 0.10),
    rgba(217, 119, 6, 0.10) 4px,
    rgba(217, 119, 6, 0.20) 4px,
    rgba(217, 119, 6, 0.20) 8px
  );
  color: var(--warning, #D97706);
  cursor: help;
}
.ag-slot.is-selected {
  outline: 2px solid var(--terracotta, var(--accent, #C26B4F));
  outline-offset: -2px;
  background: rgba(194,107,79,0.18);
  color: var(--terracotta, var(--accent, #C26B4F));
}
@media (max-width: 720px) {
  .ag-row { grid-template-columns: 70px 1fr; }
  .ag-slots { grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 8px; }
  .ag-slot { font-size: calc(10px * var(--type-scale, 1.2)); padding: 6px 2px; }
}

.loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: calc(13px * var(--type-scale, 1.2));
}
.spin {
  display: inline-block;
  width: 32px; height: 32px;
  border: 3px solid var(--line-soft);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Slot-grid: tijdvakken in rijen */
.slot-grid {
  background: var(--white);
  border: 1px solid var(--line-soft);
}
.slot-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  min-height: 56px;
}
.slot-row:last-child { border-bottom: 0; }
.slot-tijd {
  padding: 14px 16px;
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(14px * var(--type-scale, 1.2));
  color: var(--navy);
  background: var(--beige);
}
.slot-info {
  padding: 14px 16px;
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--navy);
}
.slot-info-naam {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(14px * var(--type-scale, 1.2));
  color: var(--navy);
}
.slot-info-meta { font-size: calc(11px * var(--type-scale, 1.2)); color: var(--muted); margin-top: 2px; }
.slot-action { padding: 8px 14px; }
.slot-status {
  display: inline-block;
  padding: 5px 11px;
  font-family: 'Lekton', monospace;
  font-size: calc(10px * var(--type-scale, 1.2));
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.slot-status.vrij {
  background: #e4f0e4;
  color: #2a6a2a;
  cursor: pointer;
  border: 1px solid #a8cca8;
}
.slot-status.vrij:hover { background: #d6e6d6; }
.slot-status.geboekt {
  background: var(--sky);
  color: var(--navy);
  border: 1px solid #9cb2c4;
}
.slot-status.vol {
  background: var(--line-soft);
  color: var(--muted);
  border: 1px solid var(--line);
}

@media (max-width: 540px) {
  .slot-row { grid-template-columns: 60px 1fr; }
  .slot-action {
    grid-column: 1 / -1;
    padding: 0 16px 12px 76px;
    margin-top: -6px;
  }
  .slot-tijd { padding: 12px; font-size: calc(13px * var(--type-scale, 1.2)); }
  .slot-info { padding: 12px 14px 6px; }
}

/* ─── BOTTOM NAV (mobile/tablet) ─── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--line);
  /* Verborgen op verzoek: navigatie op mobiel verloopt via de hamburger (zijbalk-
     drawer) en de app-switcher (rastericoon). Was voorheen display:grid op mobiel. */
  display: none;
  /* Aantal kolommen = aantal zichtbare knoppen. JS verbergt knoppen
     o.b.v. rol / tenant-module, dus we gebruiken auto-flow over de
     direct children om altijd evenredig te verdelen ongeacht 2 of 3
     knoppen. */
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  height: 64px;
  /* Safe-area voor iPhone home-indicator */
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-sizing: content-box;
  z-index: 40;
}
.bnav-btn {
  background: none;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-family: 'League Spartan', sans-serif;
  font-weight: 500;
  font-size: calc(11px * var(--type-scale, 1.2));
  position: relative;
}
.bnav-btn svg { width: 22px; height: 22px; stroke: currentColor; }
.bnav-btn.is-active { color: var(--navy); }
.bnav-btn.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: var(--navy);
}
@media (min-width: 1100px) {
  .bottom-nav { display: none; }
}

/* ─── MODAL ─── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 56, 0.55);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-inner {
  background: var(--white);
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px 22px 32px;
  position: relative;
  border-top: 4px solid var(--navy);
}
@media (min-width: 720px) {
  .modal { align-items: center; padding: 24px; }
  .modal-inner { max-width: 480px; border-top: 0; }
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--beige);
  color: var(--navy);
  font-size: calc(22px * var(--type-scale, 1.2));
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-title {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(22px * var(--type-scale, 1.2));
  color: var(--navy);
  margin: 0 32px 18px 0;
  letter-spacing: -0.01em;
}
.booking-form { display: flex; flex-direction: column; gap: 14px; }

/* Datum-popup */
.datum-pop {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 56, 0.55);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.datum-pop-inner {
  background: var(--white);
  padding: 24px;
  max-width: 360px;
  width: 100%;
  border-top: 4px solid var(--navy);
}
.datum-pop input[type=date] {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  font-size: calc(16px * var(--type-scale, 1.2));
  color: var(--navy);
}
.datum-pop-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.btn-ghost {
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--navy);
  font-family: 'League Spartan', sans-serif;
  font-weight: 500;
  font-size: calc(13px * var(--type-scale, 1.2));
  cursor: pointer;
}
.btn-ghost:hover { background: var(--beige); }

/* ─── QR SCAN MODAL ─── */
.scan-inner { max-width: 540px; }
.scan-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #000;
  margin-bottom: 12px;
  display: none;
  overflow: hidden;
}
.scan-video-wrap.is-active { display: block; }
.scan-video-wrap video {
  width: 100%; height: 100%; object-fit: cover;
}
.scan-frame {
  position: absolute;
  top: 15%; left: 15%; right: 15%; bottom: 15%;
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 8px;
  pointer-events: none;
}
.scan-hint {
  position: absolute;
  bottom: 10px;
  left: 0; right: 0;
  text-align: center;
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--white);
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.scan-manual { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.scan-result { margin-top: 16px; }
.scan-no-match {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 12px 14px;
  font-family: 'Lekton', monospace;
  font-size: calc(13px * var(--type-scale, 1.2));
}
.scan-no-match code { background: rgba(0,0,0,0.06); padding: 2px 6px; font-size: calc(12px * var(--type-scale, 1.2)); }
.scan-match {
  background: var(--white);
  border: 1px solid #a8cca8;
  padding: 16px;
}
.scan-match-badge {
  display: inline-block;
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: #e4f0e4;
  color: #2a6a2a;
  padding: 4px 10px;
  margin-bottom: 8px;
}

/* Scan-action: visueel onderscheid tussen succesvolle scan en al-gescand-warning.
   Twee-scan flow: groen = uitgegeven of voltooid, oranje = al ingecheckt. */
.scan-action.is-ok    { border-color: var(--success, #059669); }
.scan-action.is-ok    .scan-match-badge { background: rgba(5,150,105,0.12); color: #065f46; }
.scan-action.is-warn  { border-color: var(--warning, #D97706); background: rgba(217,119,6,0.04); }
.scan-action.is-warn  .scan-match-badge { background: rgba(217,119,6,0.15); color: #92400e; }
.scan-action-sub {
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--muted);
  margin: 0 0 12px;
}
.scan-match h3 {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(22px * var(--type-scale, 1.2));
  color: var(--navy);
  margin: 0 0 12px;
}
.scan-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-family: 'Lekton', monospace;
  font-size: calc(13px * var(--type-scale, 1.2));
  border-bottom: 1px dashed var(--line-soft);
}
.scan-row:last-child { border-bottom: 0; }
.scan-row > span { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: calc(11px * var(--type-scale, 1.2)); }
.scan-row > strong { font-family: 'League Spartan', sans-serif; font-weight: 600; color: var(--navy); }

.scan-inname-form {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-soft);
  text-align: left;
}
.scan-inname-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'League Spartan', sans-serif;
  font-size: calc(14px * var(--type-scale, 1.2));
  color: var(--navy);
  margin: 0 0 8px;
  cursor: pointer;
}
.scan-inname-btn {
  margin-top: 10px;
  width: 100%;
}
.scan-inname-err {
  margin: 8px 0 0;
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--danger, #DC2626);
}

/* ─── APP BODY (sidebar-layout) ─── */
.app-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.app-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

/* ─── MODULE NAV — mobiel/tablet: horizontale tab-bar (scrollbaar) ─── */
.module-nav {
  display: flex;
  background: var(--beige);
  padding: 10px 14px 0;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--line-soft);
}
.module-btn {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-bottom: 3px solid transparent;
  background: var(--white);
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(13px * var(--type-scale, 1.2));
  letter-spacing: 0.02em;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.module-btn + .module-btn { border-left: 0; }
.module-btn.is-active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}
.module-btn:not(.is-active):hover { background: var(--beige); }
.module-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
@media (max-width: 1099px) {
  /* Op smaller scherm geen iconen — alleen labels, ruimte zat. */
  .module-ico { display: none; }
}

/* ─── DESKTOP: module-nav wordt linker sidebar ─── */
@media (min-width: 1100px) {
  .app-body {
    flex-direction: row;
    align-items: stretch;
  }
  .module-nav {
    flex-direction: column;
    flex: 0 0 220px;
    width: 220px;
    background: var(--white);
    border-right: 1px solid var(--line-soft);
    border-bottom: 0;
    padding: 18px 14px;
    gap: 4px;
    overflow-x: visible;
    overflow-y: auto;
    position: sticky;
    top: 56px; /* header-hoogte */
    align-self: flex-start;
    max-height: calc(100vh - 56px);
  }
  .module-btn {
    flex: 0 0 auto;
    justify-content: flex-start;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-bottom: 0;
    background: transparent;
    text-align: left;
    font-size: calc(14px * var(--type-scale, 1.2));
    color: var(--ink);
    border-radius: 4px;
  }
  .module-btn + .module-btn { border-left: 1px solid transparent; }
  .module-btn:not(.is-active):hover {
    background: var(--beige);
    color: var(--navy);
  }
  .module-btn.is-active {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
    border-bottom-color: var(--navy);
  }
  .module-btn.is-active .module-ico { color: var(--white); }
  .app-content {
    flex: 1;
    min-width: 0;
  }
}

/* ─── BETAALMETHODE fieldset ─── */
.bk-betaal {
  border: 1px solid var(--line-soft);
  padding: 12px 14px;
  margin: 0;
}
.bk-betaal legend {
  font-family: 'Lekton', monospace;
  font-size: calc(10px * var(--type-scale, 1.2));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 6px;
}
.bk-betaal-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px;
  font-family: 'Lekton', monospace;
  font-size: calc(13px * var(--type-scale, 1.2));
  color: var(--navy);
  cursor: pointer;
}
.bk-betaal-opt input[type="radio"] {
  accent-color: var(--navy);
  margin: 0;
}

/* ─── BOOKING DETAIL MODAL ─── */
.bd-meta { margin-bottom: 16px; }
.bd-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 6px;
}
.btn-danger {
  padding: 12px 18px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(13px * var(--type-scale, 1.2));
  cursor: pointer;
}
.btn-danger:hover { background: #fecaca; }

/* ─── RESTAURANT PLANNING ─── */
.rp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 16px;
  flex-wrap: wrap;
}
.rp-toolbar-left,
.rp-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rp-toolbar-label {
  font-family: 'Lekton', monospace;
  font-size: calc(10px * var(--type-scale, 1.2));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.rp-segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--white);
}
.rp-seg-btn {
  padding: 8px 16px;
  border: 0;
  background: transparent;
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.rp-seg-btn + .rp-seg-btn { border-left: 1px solid var(--line); }
.rp-seg-btn.is-active {
  background: var(--navy);
  color: var(--white);
}
.rp-seg-btn:not(.is-active):hover { background: var(--beige); }

/* Layout: main + aside */
.rp-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.rp-main { flex: 1; min-width: 0; }
.rp-aside {
  width: 280px;
  flex-shrink: 0;
  background: var(--white);
  border: 1px solid var(--line-soft);
  padding: 16px;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  align-self: flex-start;
}
@media (max-width: 899px) {
  .rp-layout { flex-direction: column; }
  .rp-aside { width: 100%; position: static; max-height: none; overflow: visible; }
}
.rp-aside-title {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(15px * var(--type-scale, 1.2));
  color: var(--navy);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rp-badge-geel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(11px * var(--type-scale, 1.2));
  border-radius: 2px;
}
.rp-kinderstoelen-banner {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 12px;
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(13px * var(--type-scale, 1.2));
  margin-bottom: 12px;
}
.rp-stats-mini {
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--muted);
  margin-bottom: 10px;
}
.rp-empty {
  padding: 16px;
  text-align: center;
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--muted);
}

/* Grid */
.rpg-grid-wrap { overflow: hidden; }
.rpg-grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rpg-grid {
  display: grid;
  min-width: max-content;
  background: var(--white);
  border: 1px solid var(--line-soft);
}
.rpg-corner {
  background: var(--beige);
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  position: sticky;
  left: 0;
  z-index: 2;
}
.rpg-slot-head {
  background: var(--beige);
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  white-space: nowrap;
}
.rpg-slot-head.is-peak { background: #fef3c7; }
.rpg-slot-time { font-size: calc(11px * var(--type-scale, 1.2)); }
.rpg-slot-count {
  background: var(--white);
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px 4px;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  white-space: nowrap;
}
.rpg-corner-count { border-bottom: 1px solid var(--line-soft); }
.rpg-row {
  display: contents;
}
.rpg-row-head {
  background: var(--beige);
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  position: sticky;
  left: 0;
  z-index: 1;
}
.rpg-row.is-leeg .rpg-row-head { opacity: 0.4; }
.rpg-cell {
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  min-height: 32px;
}
.rpg-cell.is-peak { background: #fffbeb; }
.rpg-row.is-leeg .rpg-cell { background: var(--beige); opacity: 0.3; }

/* Booking blocks */
.rpg-booking {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  font-family: 'League Spartan', sans-serif;
  font-size: calc(11px * var(--type-scale, 1.2));
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  overflow: hidden;
  white-space: nowrap;
  cursor: default;
  min-height: 32px;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,.08);
  border-right: 1px solid var(--line-soft);
}
.rpg-booking.is-alacarte { background: #dbeafe; }
.rpg-booking.is-hp { background: #ede9fe; }
.rpg-booking.is-group { background: #fef3c7; }
.rpg-booking.is-request { background: #fef9c3; border-style: dashed; }
.rpg-booking.is-cancelled { background: #fee2e2; opacity: 0.5; }
.rpg-booking.is-gezeten { background: #dcfce7; border-left: 3px solid #16a34a; }
.rpg-booking.is-afgerond { background: #f3f4f6; opacity: 0.55; }
.rpg-booking.is-multi-top { border-bottom: none; }
.rpg-booking.is-multi-mid { border-top: none; border-bottom: none; }
.rpg-booking.is-multi-bot { border-top: none; }
.rpg-b-time {
  font-family: 'Lekton', monospace;
  font-size: calc(10px * var(--type-scale, 1.2));
  color: var(--muted);
}
.rpg-b-pers {
  font-weight: 700;
  font-size: calc(11px * var(--type-scale, 1.2));
}
.rpg-b-naam {
  font-weight: 500;
  font-size: calc(11px * var(--type-scale, 1.2));
  overflow: hidden;
  text-overflow: ellipsis;
}
.rpg-badge {
  font-size: calc(10px * var(--type-scale, 1.2));
}

/* Aanvragen */
.rpg-request {
  position: relative;
  background: var(--beige);
  border: 1px solid var(--line);
  padding: 10px 12px;
  margin-bottom: 6px;
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s;
}
.rpg-request:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 65, 87, 0.15);
  border-color: var(--navy);
}
.rpg-request:active { cursor: grabbing; }
.rpg-request.is-dragging { opacity: 0.4; }
.rpg-request-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.rpg-request:hover .rpg-request-actions { opacity: 1; pointer-events: auto; }

/* Edit/delete iconen op tijdlijn-cellen */
.rpg-booking { position: relative; }
.rpg-booking-actions {
  position: absolute;
  top: 2px;
  right: 2px;
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  z-index: 2;
}
.rpg-booking:hover .rpg-booking-actions { opacity: 1; pointer-events: auto; }

/* Edit/delete iconen op lijst-rijen */
.rp-lijst-acties {
  white-space: nowrap;
  text-align: right;
  width: 1%;
}
.rp-lijst-acties .rp-icon-btn { opacity: 0; transition: opacity 0.15s ease; }
.rp-lijst-row:hover .rp-lijst-acties .rp-icon-btn { opacity: 1; }

/* Gedeelde icon-button stijl */
.rp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.rp-icon-btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.rp-icon-btn--danger:hover { background: #b91c1c; border-color: #b91c1c; }
.rp-icon-btn svg { width: 14px; height: 14px; }

/* Kinderstoelen-pill in toolbar (rechts naast Ontbijt/Diner) */
.rp-toolbar-ks {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(13px * var(--type-scale, 1.2));
  margin-left: 8px;
}
.rpg-cell.is-dragover {
  background: rgba(47, 65, 87, 0.12) !important;
  outline: 2px dashed var(--navy);
  outline-offset: -2px;
}
.rpg-request-pers-big {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  background: var(--navy);
  color: var(--white);
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(13px * var(--type-scale, 1.2));
  border-radius: 4px;
  margin-right: 4px;
  flex-shrink: 0;
}
.rpg-request-ks {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(11px * var(--type-scale, 1.2));
  padding: 2px 6px;
  border-radius: 3px;
}
.rpg-request-kid {
  font-family: 'League Spartan', sans-serif;
  font-size: calc(11px * var(--type-scale, 1.2));
  font-weight: 600;
  color: var(--muted);
}
.rpg-request-bijz {
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rpg-request-main {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rpg-request-naam {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(13px * var(--type-scale, 1.2));
  color: var(--navy);
}
.rpg-request-pers {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--teal);
}
.rpg-request-baby { font-size: calc(12px * var(--type-scale, 1.2)); }
.rpg-request-time {
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--muted);
  margin-left: auto;
}
.rpg-request-group { margin-bottom: 10px; }
.rpg-request-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--navy);
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 6px;
}
.rpg-rg-count {
  background: var(--line-soft);
  padding: 2px 8px;
  font-size: calc(11px * var(--type-scale, 1.2));
  border-radius: 2px;
}

/* Chrono lijst */
.rpg-chrono-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: calc(12px * var(--type-scale, 1.2));
}
.rpg-chrono-item:last-child { border-bottom: 0; }
.rpg-chrono-swatch {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 2px;
}
.rpg-chrono-swatch.is-alacarte { background: #93c5fd; }
.rpg-chrono-swatch.is-hp { background: #c4b5fd; }
.rpg-chrono-swatch.is-group { background: #fcd34d; }
.rpg-chrono-swatch.is-request { background: #fde68a; }
.rpg-chrono-swatch.is-cancelled { background: #fca5a5; }
.rpg-chrono-swatch.is-gezeten { background: #4ade80; }
.rpg-chrono-swatch.is-afgerond { background: #9ca3af; }
.rpg-chrono-time {
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--muted);
  width: 40px;
  flex-shrink: 0;
}
.rpg-chrono-naam {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(12px * var(--type-scale, 1.2));
  color: var(--navy);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rpg-chrono-meta {
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--muted);
  flex-shrink: 0;
}

/* Lijst view */
.rp-lijst-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rp-lijst {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line-soft);
  font-family: 'Lekton', monospace;
  font-size: calc(12px * var(--type-scale, 1.2));
}
.rp-lijst th {
  background: var(--beige);
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(11px * var(--type-scale, 1.2));
  color: var(--navy);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.rp-lijst td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--navy);
  vertical-align: middle;
}
.rp-lijst-row:hover td { background: var(--beige); }
.rp-lijst-bijz {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── INSTELLINGEN / GEBRUIKERSBEHEER ─── */
.gb-shell { max-width: 1100px; margin: 0 auto; }
.gb-shell-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.gb-shell-title {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(22px * var(--type-scale, 1.2));
  color: var(--navy);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.gb-shell-hint { font-size: calc(13px * var(--type-scale, 1.2)); color: var(--muted); margin: 0; max-width: 580px; }
.gb-new-btn { white-space: nowrap; }

.gb-rollen-uitleg {
  background: var(--beige);
  border: 1px solid var(--line-soft);
  padding: 16px 20px;
  margin-bottom: 22px;
}
.gb-rollen-titel {
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 10px;
}
.gb-rollen-list { margin: 0; padding-left: 18px; font-size: calc(13px * var(--type-scale, 1.2)); color: var(--ink); line-height: 1.7; }
.gb-rollen-list strong { color: var(--navy); font-family: 'League Spartan', sans-serif; font-weight: 600; }

.gb-tbl-wrap { background: var(--white); border: 1px solid var(--line-soft); overflow-x: auto; }
.gb-tbl { width: 100%; border-collapse: collapse; font-family: 'Lekton', monospace; font-size: calc(13px * var(--type-scale, 1.2)); }
.gb-tbl thead th {
  background: var(--beige);
  font-family: 'Lekton', monospace;
  font-size: calc(10px * var(--type-scale, 1.2));
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.gb-tbl tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.gb-tbl tbody tr:last-child td { border-bottom: 0; }
.gb-tbl tbody tr:hover td { background: rgba(245,238,234,0.45); }

.gb-naam {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: calc(14px * var(--type-scale, 1.2));
  color: var(--navy);
}
.gb-username { font-size: calc(11px * var(--type-scale, 1.2)); color: var(--muted); margin-top: 2px; }

.gb-rol-sel {
  font-family: 'League Spartan', sans-serif;
  font-weight: 500;
  font-size: calc(13px * var(--type-scale, 1.2));
  padding: 7px 28px 7px 10px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  min-width: 150px;
}
.gb-rol-sel:disabled { opacity: 0.5; cursor: wait; }

.gb-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.gb-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.gb-toggle-slider {
  width: 38px;
  height: 22px;
  background: var(--line);
  border-radius: 11px;
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
}
.gb-toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.15s;
}
.gb-toggle input:checked + .gb-toggle-slider { background: var(--accent); }
.gb-toggle input:checked + .gb-toggle-slider::after { transform: translateX(16px); }
.gb-toggle input:focus-visible + .gb-toggle-slider {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}
.gb-toggle-lbl {
  font-family: 'Lekton', monospace;
  font-size: calc(11px * var(--type-scale, 1.2));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.gb-c-acties { text-align: right; white-space: nowrap; }

/* Mobiele view: stack als card-grid */
@media (max-width: 719px) {
  .gb-tbl thead { display: none; }
  .gb-tbl, .gb-tbl tbody, .gb-tbl tr, .gb-tbl td { display: block; width: 100%; }
  .gb-tbl tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .gb-tbl td { padding: 6px 14px; border-bottom: 0; }
  .gb-c-acties { text-align: left; }
}

/* ─── Inline overlay (reset wachtwoord / nieuwe gebruiker) ─── */
.gb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,34,51,0.55);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.gb-overlay-card {
  background: var(--white);
  border: 1px solid var(--line);
  width: 100%;
  max-width: 420px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 32px rgba(20,34,51,0.18);
}
.gb-overlay-card header { margin-bottom: 4px; }
.gb-overlay-card h3 {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(18px * var(--type-scale, 1.2));
  color: var(--navy);
  margin: 0 0 4px;
}
.gb-muted { font-size: calc(12px * var(--type-scale, 1.2)); color: var(--muted); margin: 0; }
.gb-overlay-acties {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* ─── BOOKING FLOW als modal popup ─── */
.bkflow-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,34,51,0.55);
  z-index: 1100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.bkflow.bkflow-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  width: 100%;
  max-width: 560px;
  margin: auto;
  padding: 28px 26px 28px;
  box-shadow: 0 12px 40px rgba(20,34,51,0.22);
}
.bkflow.bkflow-card .bkflow-title {
  margin: 0 30px 18px 0; /* ruimte voor close-knop */
  font-size: calc(22px * var(--type-scale, 1.2));
}
.bkflow-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: calc(28px * var(--type-scale, 1.2));
  line-height: 1;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.bkflow-close:hover { background: var(--beige); }
@media (max-width: 519px) {
  .bkflow-overlay { padding: 0; }
  .bkflow.bkflow-card {
    min-height: 100vh;
    max-width: none;
    border: 0;
    box-shadow: none;
  }
}

/* ─── QR-scanner-knop in sidebar — visueel apart vakje ─── */
.module-btn-scan {
  margin-top: 12px;
  border-top: 1px solid var(--line-soft) !important;
  padding-top: 16px !important;
}
@media (min-width: 1100px) {
  /* Sidebar: extra ruimte erboven + accent-styling */
  .module-btn-scan {
    margin-top: 18px;
    padding-top: 14px !important;
    background: var(--beige) !important;
    border: 1px solid var(--line) !important;
    border-radius: 4px;
  }
  .module-btn-scan:not(.is-active):hover {
    background: var(--white) !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
  }
  .module-btn-scan.is-active {
    background: var(--accent) !important;
    color: var(--white) !important;
    border-color: var(--accent) !important;
  }
}

/* ─── QR-scanner page (module) ─── */
.scan-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 4px 8px;
}
.scan-page-title {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: calc(22px * var(--type-scale, 1.2));
  color: var(--navy);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.scan-page-hint {
  font-size: calc(13px * var(--type-scale, 1.2));
  color: var(--muted);
  margin: 0 0 18px;
}
.scan-page-host {
  background: var(--white);
  border: 1px solid var(--line-soft);
  padding: 22px 22px 26px;
}
.scan-page-host .scan-video-wrap,
.scan-page-host .scan-frame,
.scan-page-host .scan-hint,
.scan-page-host video {
  /* Erfgenamen uit de bestaande modal-styling. */
}

/* ── API-sleutels view (admin-only) ───────────────────────────── */
.ak-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 28px 60px;
}
.ak-h {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy, #2F4157);
  margin: 0 0 8px;
}
.ak-intro {
  color: var(--muted, rgba(20,34,51,0.6));
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 20px;
  max-width: 640px;
}
.ak-intro code {
  background: rgba(20,34,51,0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
}
.ak-err {
  background: #FBEAE5;
  border: 1px solid #E5A89A;
  color: #8B3A20;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}
.ak-create {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 16px 0 22px;
  flex-wrap: wrap;
}
.ak-input {
  flex: 1;
  min-width: 220px;
  padding: 9px 12px;
  border: 1px solid var(--line-soft, rgba(20,34,51,0.12));
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--white, #fff);
  color: var(--navy, #2F4157);
}
.ak-input:focus {
  outline: 2px solid var(--accent, #C26B4F);
  outline-offset: 1px;
}
.ak-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white, #fff);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(20,34,51,0.04), 0 4px 12px -8px rgba(20,34,51,0.10);
}
.ak-table th,
.ak-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft, rgba(20,34,51,0.08));
  font-size: 13.5px;
  color: var(--ink, #1B2A3B);
}
.ak-table th {
  background: rgba(20,34,51,0.03);
  font-weight: 600;
  color: var(--navy, #2F4157);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ak-table tr:last-child td { border-bottom: none; }
.ak-prefix {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  background: rgba(20,34,51,0.06);
  padding: 2px 8px;
  border-radius: 4px;
}
.ak-rev {
  color: var(--accent, #C26B4F);
  font-style: italic;
  font-size: 13px;
}
.ak-empty {
  color: var(--muted, rgba(20,34,51,0.6));
  font-style: italic;
  padding: 18px 0;
}
.ak-toast {
  background: #FFF4E5;
  border: 1px solid #E0A95E;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 22px;
}
.ak-toast-h {
  font-weight: 700;
  color: var(--navy, #2F4157);
  margin: 0 0 6px;
  font-size: 14px;
}
.ak-toast-sub {
  font-size: 12.5px;
  color: var(--muted, rgba(20,34,51,0.6));
  margin: 0 0 10px;
}
.ak-toast-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ak-toast-code {
  flex: 1;
  background: var(--white, #fff);
  padding: 8px 10px;
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  word-break: break-all;
  border: 1px solid var(--line-soft, rgba(20,34,51,0.10));
  color: var(--ink, #1B2A3B);
}
.btn-link {
  background: none;
  border: 0;
  color: var(--accent, #C26B4F);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  font-family: inherit;
}
.btn-link:hover { text-decoration: underline; }

/* ── Rapportages / Exact modules (admin-only views) ──────────── */
.rap-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 28px 60px;
}
.rap-h {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy, #2F4157);
  margin: 0 0 8px;
}
.rap-intro {
  color: var(--muted, rgba(20,34,51,0.6));
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 20px;
  max-width: 720px;
}
.rap-form {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 14px 0 22px;
  flex-wrap: wrap;
}
.rap-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy, #2F4157);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.rap-form input[type="date"],
.rap-form input[type="month"],
.rap-form select {
  padding: 8px 12px;
  border: 1px solid var(--line-soft, rgba(20,34,51,0.12));
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--white, #fff);
  color: var(--navy, #2F4157);
  min-width: 160px;
}
.rap-sum {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0 22px;
}
.rap-sum > div {
  background: var(--white, #fff);
  border: 1px solid var(--line-soft, rgba(20,34,51,0.10));
  border-radius: 10px;
  padding: 12px 14px;
}
.rap-sum span {
  display: block;
  font-size: 11px;
  color: var(--muted, rgba(20,34,51,0.6));
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}
.rap-sum strong {
  display: block;
  font-size: 18px;
  color: var(--navy, #2F4157);
  font-weight: 700;
}
.rap-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white, #fff);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(20,34,51,0.04), 0 4px 12px -8px rgba(20,34,51,0.10);
  margin-top: 8px;
}
.rap-table th,
.rap-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft, rgba(20,34,51,0.08));
  font-size: 13px;
  color: var(--ink, #1B2A3B);
}
.rap-table th {
  background: rgba(20,34,51,0.03);
  font-weight: 600;
  color: var(--navy, #2F4157);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rap-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rap-table tfoot th {
  background: rgba(20,34,51,0.05);
  border-top: 2px solid var(--line-soft, rgba(20,34,51,0.15));
  color: var(--navy, #2F4157);
  font-weight: 700;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}
.rap-toel {
  margin-top: 18px;
  background: var(--white, #fff);
  border: 1px solid var(--line-soft, rgba(20,34,51,0.10));
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink, #1B2A3B);
}
.rap-toel strong {
  color: var(--navy, #2F4157);
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rap-toel ul { margin: 0; padding-left: 18px; }
.rap-toel li { margin: 3px 0; }
.rap-card {
  background: var(--white, #fff);
  border: 1px solid var(--line-soft, rgba(20,34,51,0.10));
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.rap-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy, #2F4157);
  margin: 0 0 8px;
}
.rap-card p { margin: 0 0 10px; font-size: 13.5px; color: var(--ink, #1B2A3B); }
.rap-log {
  background: rgba(20,34,51,0.04);
  border-radius: 8px;
  padding: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  overflow-x: auto;
  margin: 10px 0 0;
  max-height: 280px;
}
.ak-ok {
  color: #047857;
  font-weight: 700;
}

/* ─── Koppelingen / Connectors ──────────────────────────────── */
.kop-card {
  background: var(--white, #fff);
  border: 1px solid var(--beige-dark, #E6D9CF);
  border-radius: 12px;
  padding: 18px 20px;
  margin-top: 16px;
  box-shadow: 0 1px 0 rgba(20,34,51,0.04), 0 4px 12px -8px rgba(20,34,51,0.10);
}
.kop-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.kop-card-title {
  display: flex;
  flex-direction: column;
  margin-right: auto;
}
.kop-card-title strong {
  font-size: 17px;
  color: var(--navy, #2F4157);
}
.kop-card-sub {
  font-size: 12.5px;
  color: var(--muted, rgba(27,42,59,0.65));
}
.kop-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.kop-badge-on   { background: rgba(5,150,105,0.12);  color: #047857; }
.kop-badge-off  { background: rgba(20,34,51,0.08);   color: var(--muted, rgba(27,42,59,0.65)); }
.kop-badge-env  { background: rgba(87,124,141,0.14); color: #2F4157; }
.kop-badge-test { background: rgba(217,119,6,0.14);  color: #B45309; }
.kop-badge-live { background: rgba(5,150,105,0.12);  color: #047857; }
.kop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.kop-fallback {
  margin-top: 16px;
  border-top: 1px solid var(--beige-dark, #E6D9CF);
  padding-top: 12px;
}
.kop-key-form {
  margin-top: 10px;
}
.kop-key-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
