/* Klunen Draaiboek — mobile-first, want de app wordt vooral op straat gebruikt.
   Huisstijl van de Bredase Klûntocht: Klûn-blauw als basis, Klûn-rood voor wat
   er nú gebeurt, voor urgent en voor de primaire knoppen. Sjaal-oranje hoort
   alleen in illustraties en komt hier bewust niet voor. */

/* ---------- lettertypen ----------
   Zelf gehost: de CSP staat alleen font-src 'self' toe. Londrina Solid kent
   alleen een latin-subset; de û van "Klûn" (U+00FB) valt daarbinnen. */

@font-face {
  font-family: "Londrina Solid";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/fonts/londrina-solid-latin-900-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Londrina Solid";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/londrina-solid-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/montserrat-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/montserrat-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/montserrat-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/montserrat-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/montserrat-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/montserrat-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/montserrat-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/montserrat-latin-ext-800-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens ----------
   Kleur als vlak (--brand, --red) en kleur als tekst (--brand-text,
   --red-text) zijn aparte tokens: in het donkere thema blijven de vlakken
   Klûn-blauw en Klûn-rood, maar moet blauwe tekst lichter worden om leesbaar
   te blijven. Alle tekstparen halen minstens 4.5:1. */

:root {
  color-scheme: light;

  --font-display: "Londrina Solid", Impact, sans-serif;
  --font-text: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --klun-blauw: #273481;
  --klun-blauw-donker: #1c2563;
  --klun-rood: #e1201b;
  --klun-rood-tekst: #c8161d;
  --ijsblauw: #77b1e1;
  --ijswit: #edf6fe;
  --inkt: #18204f;

  --brand: var(--klun-blauw);
  --brand-strong: var(--klun-blauw-donker);
  --brand-text: var(--klun-blauw);
  --on-brand: #ffffff;
  --on-brand-muted: #bfddf5;

  --red: var(--klun-rood);
  --red-strong: var(--klun-rood-tekst);
  --red-text: var(--klun-rood-tekst);
  --on-red: #ffffff;

  --ice: var(--ijsblauw);
  --on-ice: var(--inkt);

  --bg: var(--ijswit);
  --surface: #ffffff;
  --surface-done: #f7fbff;
  --tile: var(--ijswit);
  --text: var(--inkt);
  --muted: #4b5687;
  --done-text: #5b6694;
  --line: #cfe2f4;
  --line-soft: #e3eef8;
  --track: #d3e6f7;
  --progress: var(--klun-blauw);

  --warn: #8a5a00;
  --ok: #1a7a4a;

  --topbar: var(--klun-blauw);
  --topbar-text: #ffffff;

  /* Oude namen, zodat schermen die nog niet zijn omgezet meekleuren. */
  --live: var(--red);
  --live-soft: rgba(225, 32, 27, 0.08);
  --danger: var(--red-text);
  --brand-soft: var(--tile);
  --brand-line: var(--line);
  --surface-2: var(--surface-done);
  --border: var(--line);
  --faint: var(--muted);

  --radius-xs: 4px;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-sheet: 24px;
  --radius: var(--radius-l);
  --radius-sm: var(--radius-m);

  --shadow-sm: 0 1px 2px rgba(24, 32, 79, 0.05);
  --shadow: 0 1px 2px rgba(24, 32, 79, 0.04), 0 8px 22px -12px rgba(24, 32, 79, 0.18);
  --tap: 44px;
  --topbar-h: 76px;
  --strip-h: 24px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --header-h: calc(var(--topbar-h) + var(--strip-h) + var(--safe-top));

  /* Statistieken: views blauw, bezoekers rood */
  --series-views: var(--klun-blauw);
  --series-visitors: var(--klun-rood);
  --series-ticket: #b7791f;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --brand: #3b4bb0;
    --brand-strong: #2f3d96;
    --brand-text: #bfddf5;

    --red-text: #ff8a85;

    --bg: #0f1430;
    --surface: #18204f;
    --surface-done: #141b45;
    --tile: #1f2866;
    --text: #edf6fe;
    --muted: #a9b6d6;
    --done-text: #9aa6cc;
    --line: #2b3675;
    --line-soft: #232c63;
    --track: #232c63;
    --progress: var(--ijsblauw);

    --warn: #f5c165;
    --ok: #5bd197;

    --live-soft: rgba(225, 32, 27, 0.16);

    --series-views: var(--ijsblauw);
    --series-visitors: #ff6b66;
    --series-ticket: #f6c453;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 26px -12px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
svg { flex: none; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Display-letter: Londrina Solid in hoofdletters. */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0;
}

.label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- opstarten ---------- */

.app { min-height: 100%; display: flex; flex-direction: column; }

.boot {
  min-height: 70vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  color: var(--muted);
}

.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--brand-text);
  border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .spinner { animation: spin 0.8s linear infinite; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- klûnkruis ----------
   Het patroon staat in een eigen SVG-bestand: een data:-URL in de CSS zou met
   een strengere CSP botsen, een bestand van 'self' niet. */

.crossstrip {
  height: var(--strip-h);
  background-color: var(--klun-blauw);
  background-image: url("/img/klunkruis-strook.svg");
  background-size: 30px 24px;
  background-repeat: repeat-x;
  background-position: 4px center;
}
.crossstrip--lg {
  height: 96px;
  background-image: url("/img/klunkruis-strook-groot.svg");
  background-size: 48px 48px;
  background-repeat: repeat;
  background-position: 4px 0;
}

.klunkruis { display: block; width: 24px; height: 24px; }

/* ---------- woordmerk ----------
   Tijdelijk in Londrina gezet. Komt het echte woordmerk, dan vervangt
   brandmark() in ui.js de tekst door een <img>; deze maten blijven gelden. */

.brandmark {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0.005em;
}
.brandmark--sm { font-size: 32px; }
.brandmark--lg { font-size: 84px; line-height: 0.88; }
.brandmark--lg span { display: block; }
.brandmark img { display: block; height: 1em; width: auto; }

/* ---------- topbalk ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) 12px 0 18px;
  background: var(--topbar);
  color: var(--topbar-text);
}

.topbar__brand {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin-right: auto;
  padding: 2px 0;
  text-decoration: none;
  border-radius: var(--radius-s);
}
.topbar__sub {
  color: var(--on-brand-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  /* Naast de dagenteller is het smal: dan mag de datum over twee regels. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.topbar :focus-visible { outline-color: #ffffff; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  max-width: 116px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.15;
}
.status-pill svg { width: 15px; height: 15px; }
.status-pill--count { background: var(--red); }
.status-pill--warn { background: rgba(245, 193, 101, 0.22); color: #ffe2a6; }

.live-dot {
  position: relative;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px #ffffff;
  flex: none;
}
.live-dot--off { background: #8f97c2; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6); }
@media (prefers-reduced-motion: no-preference) {
  .live-dot:not(.live-dot--off)::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--red);
    animation: pulse 1.6s ease-out infinite;
  }
}
@keyframes pulse { to { transform: scale(2.4); opacity: 0; } }

.topbar__action {
  display: grid;
  place-content: center;
  width: var(--tap); height: var(--tap);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}
.topbar__action:hover { background: rgba(255, 255, 255, 0.12); }
.topbar__action svg { width: 24px; height: 24px; }

.avatar {
  display: grid;
  place-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--ice);
  color: var(--klun-blauw);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  flex: none;
}
.avatar--lg { width: 52px; height: 52px; font-size: 26px; }

.topbar__avatar {
  position: relative;
  display: grid;
  place-content: center;
  width: var(--tap); height: var(--tap);
  border-radius: 50%;
  text-decoration: none;
}
.topbar__avatar:hover .avatar { background: #8fc0e8; }
.topbar__offline {
  position: absolute;
  right: 1px; bottom: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #f5c165;
  box-shadow: 0 0 0 2px var(--topbar);
}

@media (min-width: 480px) {
  .status-pill { max-width: none; white-space: nowrap; }
}

/* ---------- navigatie ---------- */

.layout { flex: 1; }

.main { padding: 20px 16px calc(110px + var(--safe-bottom)); }

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  padding: 8px 4px calc(8px + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -16px rgba(24, 32, 79, 0.3);
}

.tabbar__item {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 2px;
  border-radius: var(--radius-m);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}
.tabbar__pill {
  display: grid;
  place-content: center;
  width: 48px; height: 30px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.tabbar__pill svg { width: 22px; height: 22px; }
.tabbar__item:hover { color: var(--text); }
.tabbar__item[aria-current="page"],
.tabbar__item.is-parent { color: var(--brand-text); }
.tabbar__item[aria-current="page"] .tabbar__pill,
.tabbar__item.is-parent .tabbar__pill { background: var(--brand); color: #ffffff; }
.tabbar__full,
.tabbar__heading { display: none; }

@media (max-width: 879px) {
  .tabbar__item--secondary { display: none; }
}

@media (min-width: 880px) {
  .layout {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    align-items: start;
  }
  .tabbar {
    position: sticky;
    top: var(--header-h);
    grid-auto-flow: row;
    grid-auto-columns: auto;
    align-content: start;
    gap: 2px;
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 20px 12px;
    background: transparent;
    border-top: 0;
    border-right: 1px solid var(--line);
    box-shadow: none;
  }
  .tabbar__item {
    grid-auto-flow: column;
    justify-content: start;
    gap: 10px;
    min-height: 44px;
    padding: 0 8px;
    font-size: 14.5px;
  }
  .tabbar__item.is-parent { color: var(--muted); }
  .tabbar__item.is-parent .tabbar__pill { background: transparent; color: inherit; }
  .tabbar__item:hover { background: var(--surface); }
  .tabbar__pill { width: 40px; height: 28px; }
  .tabbar__pill svg { width: 20px; height: 20px; }
  .tabbar__short { display: none; }
  .tabbar__full { display: inline; }
  .tabbar__heading {
    display: block;
    margin: 16px 8px 4px;
    color: var(--muted);
  }
  .main { padding: 32px 36px 56px; }
}

/* ---------- schermopbouw ---------- */

/* minmax(0, 1fr): een breed kind (bijv. een rij knoppen) mag de kolom niet
   breder maken dan het scherm. */
.view { max-width: 860px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.view--alerts { margin-bottom: 16px; }
.view--back { margin-bottom: 8px; }
@media (min-width: 880px) { .view--back { display: none; } }

/* Titel bovenaan over de hele breedte; daaronder de uitleg met rechts de
   knoppen, zoals "Vervangen" bij de plattegrond. */
.view__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title title" "sub actions";
  align-items: center;
  gap: 8px 16px;
}
.view__titles { display: contents; }
.view__head h1 {
  grid-area: title;
  color: var(--brand-text);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 40px;
  line-height: 1;
  text-transform: uppercase;
}
.view__sub { grid-area: sub; color: var(--muted); font-size: 15px; }
.view__actions { grid-area: actions; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.view__head:not(:has(.view__sub)) .view__actions { grid-column: 1 / -1; justify-content: flex-start; }
/* Alleen een kop voor voorleessoftware: neemt geen ruimte in het raster. */
.view__head--hidden { margin-bottom: -16px; }

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding-right: 12px;
  color: var(--brand-text);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  justify-self: start;
  border-radius: var(--radius-s);
}
.backlink svg { width: 20px; height: 20px; }
.backlink:hover { text-decoration: underline; }

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- knoppen en velden ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 16px;
  border-radius: var(--radius-m);
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--brand-text);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover { border-color: var(--brand-text); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; }

.btn--primary { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn--primary:hover { background: var(--red-strong); border-color: var(--red-strong); }
.btn--brand { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn--brand:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn--outline { border-color: var(--brand-text); }
.btn--outline:hover { background: var(--tile); }
.btn--outline-danger { border-color: var(--red); color: var(--red-text); }
.btn--outline-danger:hover { background: var(--live-soft); border-color: var(--red); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--tile); border-color: transparent; color: var(--text); }
.btn--danger:hover { color: var(--red-text); background: var(--live-soft); }
.btn--dashed { border-style: dashed; background: transparent; color: var(--muted); }
.btn--dashed:hover { color: var(--brand-text); border-color: var(--brand-text); }
.btn--sm { min-height: var(--tap); padding: 0 14px; font-size: 14px; }
.btn--sm svg { width: 18px; height: 18px; }
.btn--lg { min-height: 52px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--icon { padding: 0; width: var(--tap); }
.btn--icon.btn--sm { width: var(--tap); }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); }

.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--radius-m);
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  transition: border-color 0.12s ease;
}
.input:focus { outline: none; border-color: var(--brand-text); }
.input:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
::placeholder { color: var(--muted); opacity: 0.85; }

/* zoeken */
.search {
  position: relative;
  flex: 1 1 100%;
  display: flex;
  align-items: center;
}
.search > svg {
  position: absolute;
  left: 16px;
  width: 22px; height: 22px;
  color: var(--brand-text);
  pointer-events: none;
}
.search__input {
  width: 100%;
  min-height: 48px;
  padding: 0 48px 0 50px;
  border-radius: var(--radius-m);
  border: 2px solid var(--line);
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  -webkit-appearance: none;
  appearance: none;
}
.search__input::-webkit-search-cancel-button { display: none; }
.search__input:focus { outline: none; border-color: var(--brand-text); }
.search__input:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.search__clear {
  position: absolute;
  right: 2px;
  display: grid;
  place-content: center;
  width: var(--tap); height: var(--tap);
  border: 0;
  border-radius: var(--radius-m);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.search__clear svg { width: 18px; height: 18px; }

/* gesegmenteerde keuze */
.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: var(--radius-m);
  background: var(--surface);
  border: 2px solid var(--line);
}
.segmented__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--brand-text);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.segmented__item:hover { background: var(--tile); }
.segmented__item[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.segmented__count { font-variant-numeric: tabular-nums; }

/* chips */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 2px 16px 4px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 880px) {
  .chips { flex-wrap: wrap; margin: 0; padding: 2px 0; }
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--brand-text);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.chip-btn svg { width: 16px; height: 16px; }
.chip-btn:hover { border-color: var(--brand-text); }
.chip-btn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chip-btn__count {
  display: inline-grid;
  place-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--tile);
  color: var(--brand-text);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.chip-btn[aria-pressed="true"] .chip-btn__count { background: rgba(255, 255, 255, 0.2); color: inherit; }

/* voortgang */
.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  border-radius: inherit;
  background: var(--progress);
  transition: width 0.4s ease;
}

/* ---------- Meer ---------- */

.account {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-l);
  background: var(--klun-blauw);
  color: #ffffff;
}
.account__name { font-size: 18px; font-weight: 700; }
.account__meta { color: var(--on-brand-muted); font-size: 14px; font-weight: 600; }
.account__status { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--on-brand-muted); font-size: 13px; font-weight: 600; }

.menu { display: grid; gap: 10px; }
.menu__title { color: var(--muted); margin-top: 8px; }
.menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: var(--radius-l);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  overflow: hidden;
}
.menu__list li + li { border-top: 1px solid var(--line-soft); }
.menu__link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 16px;
  text-decoration: none;
}
.menu__link:hover { background: var(--surface-done); }
.menu__link:focus-visible { outline-offset: -3px; }
.menu__tile {
  display: grid;
  place-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-m);
  background: var(--tile);
  color: var(--brand-text);
}
.menu__tile svg { width: 24px; height: 24px; }
.menu__tile--live { background: var(--red); color: #ffffff; }
.menu__text { display: grid; gap: 2px; min-width: 0; }
.menu__label { font-size: 16px; font-weight: 700; }
.menu__sub { color: var(--muted); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.menu__chevron { width: 20px; height: 20px; color: var(--muted); }
.more > .btn:last-child { margin-top: 8px; }
/* ---------- kaarten en lijsten ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.list { display: grid; gap: 12px; }
.groups { display: grid; gap: 28px; }

.group { display: grid; gap: 14px; }
.group__label {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--brand-text);
  font-size: 15px;
  font-weight: 700;
}
.group__name { font-size: 24px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* "14.00 uur" staat in het ontwerp met een kleine "uur". */
.group--time .group__name { text-transform: none; }
.group__label::after { content: ""; order: 2; flex: 1; height: 2px; border-radius: 2px; background: var(--line); }
.group__count { order: 3; color: var(--muted); font-size: 15px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.group__label--danger { color: var(--red-text); }
.group__label--muted { color: var(--muted); }
.group__avatar {
  display: grid;
  place-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ice);
  color: var(--klun-blauw);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 18px 16px;
  background: var(--surface);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-sm);
  scroll-margin: calc(var(--header-h) + 16px) 0 120px;
}
.row--plain { grid-template-columns: minmax(0, 1fr); }
.row--now { box-shadow: inset 0 0 0 2px var(--red), var(--shadow-sm); }
.row--done { background: var(--surface-done); box-shadow: none; }
.row--done .row__what,
.row--done .note__text {
  color: var(--done-text);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--done-text);
}
.row--done .row__time,
.row--done .row__who { color: var(--done-text); }

.row__main { min-width: 0; display: grid; gap: 4px; }
.row__when {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.row__time {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.row--missed .row__time { color: var(--red-text); }
.row__what { color: var(--text); font-weight: 700; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.row__who {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.row__who svg { width: 16px; height: 16px; margin-top: 2px; }

/* Afvinken: zichtbaar 26px, tikvlak 44px. */
.check {
  position: relative;
  display: grid;
  place-content: center;
  width: 26px; height: 26px;
  margin: 1px 2px 0;
  padding: 0;
  border-radius: var(--radius-s);
  border: 2px solid var(--brand-text);
  background: var(--surface);
  color: transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.check::after { content: ""; position: absolute; inset: -11px; }
.check:hover:not(:disabled) { background: var(--tile); }
.check[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #ffffff; }
.check svg { width: 16px; height: 16px; stroke-width: 3; }
.check:disabled { cursor: default; opacity: 0.6; }

/* labels zoals NU en NIET AFGEVINKT */
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--now { background: var(--red); color: #ffffff; }
.tag--next { background: var(--brand); color: #ffffff; }
.tag--missed { border: 1.5px solid var(--red-text); color: var(--red-text); height: 22px; }
.tag--muted { background: var(--tile); color: var(--muted); }

/* Oude naam, nog gebruikt door schermen zonder eigen ontwerp. */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-xs);
  background: var(--tile);
  color: var(--brand-text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge--live { background: var(--red); color: #ffffff; }
.badge--muted { color: var(--muted); }

/* ---------- draaiboek: nu en de dag ---------- */

.nowcard {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 26px 20px 22px;
  border-radius: var(--radius-l);
  background: var(--klun-blauw);
  color: #ffffff;
  overflow: hidden;
}
.nowcard__crosses { position: absolute; inset: 0; pointer-events: none; }
.nowcard__cross { position: absolute; }
.nowcard__cross--1 { width: 44px; height: 44px; top: -12px; right: 118px; }
.nowcard__cross--2 { width: 30px; height: 30px; top: 30px; right: 78px; }
.nowcard__cross--3 { width: 58px; height: 58px; top: -16px; right: 8px; }
.nowcard__title {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 400;
}
.nowcard__title .display { font-size: 34px; }
.nowcard__clock {
  color: var(--on-brand-muted);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.nowcard__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; }
.nowcard__item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.nowcard__time { color: var(--on-brand-muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowcard__task { display: grid; gap: 2px; min-width: 0; }
.nowcard__what { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.nowcard__who { color: var(--on-brand-muted); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.nowcard__item--done .nowcard__what { text-decoration: line-through; text-decoration-thickness: 2px; }
.nowcard__empty { color: var(--on-brand-muted); }
.nowcard__next { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.nowcard__label { color: var(--on-brand-muted); }

.dayprogress { display: grid; gap: 14px; }
.dayprogress__head { display: flex; align-items: center; gap: 12px; }
.dayprogress__title { color: var(--brand-text); font-size: 34px; margin-right: auto; }
.dayprogress__count { color: var(--muted); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

.toolbar__end { margin-left: auto; }

/* ---------- bands ---------- */

.slots {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 4px 16px 6px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.slots::-webkit-scrollbar { display: none; }
@media (min-width: 880px) { .slots { margin: 0; padding: 4px 2px 6px; } }
.slots__item {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-width: 76px;
  height: 56px;
  padding: 0 12px;
  border-radius: var(--radius-m);
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--brand-text);
  cursor: pointer;
  scroll-snap-align: center;
  flex: none;
}
.slots__item:hover { border-color: var(--brand-text); }
.slots__item[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #ffffff; }
.slots__time { font-family: var(--font-display); font-weight: 900; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.slots__state { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; }
.slots__item--now .slots__state { color: var(--red-text); }
.slots__item--now[aria-pressed="true"] .slots__state { color: #ffffff; }
.slots__item--past:not([aria-pressed="true"]) { color: var(--muted); }

.slot { display: grid; gap: 14px; }
.slot__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.slot__title { color: var(--brand-text); font-family: var(--font-display); font-weight: 900; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.slot__live { gap: 6px; height: 28px; padding: 0 10px; }
.slot__dot { width: 8px; height: 8px; border-radius: 50%; background: #ffffff; }
.slot__count { color: var(--muted); font-size: 15px; font-weight: 700; }

.stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 22px 20px;
  border-radius: var(--radius-l);
}
.stage__letter {
  display: grid;
  place-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-m);
  background: var(--tile);
  color: var(--brand-text);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
}
.stage__main { display: grid; gap: 4px; min-width: 0; }
.stage__loc { color: var(--muted); }
.stage__band { color: var(--brand-text); font-family: var(--font-display); font-weight: 900; font-size: 22px; line-height: 1.05; overflow-wrap: anywhere; }
.stage__venue { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; font-weight: 600; }
.stage__venue svg { width: 18px; height: 18px; color: var(--red-text); }
.stage--empty .stage__band { color: var(--muted); }

.nextslot { display: grid; gap: 10px; padding: 18px 20px; }
.nextslot__title { color: var(--muted); }
.nextslot__list { list-style: none; margin: 0; padding: 0; display: grid; }
.nextslot__row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
}
.nextslot__row:first-child { border-top: 0; }
.nextslot__loc { color: var(--muted); font-weight: 600; }
.nextslot__band { color: var(--text); font-weight: 700; overflow-wrap: anywhere; }
.nextslot__row--empty .nextslot__band { color: var(--muted); font-weight: 500; }

.lineup-section { display: grid; gap: 14px; margin-top: 12px; }
.lineup-section__title { color: var(--brand-text); font-size: 28px; }

.lineup { display: grid; }
.lineup__row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
}
.lineup__row:first-child { border-top: 0; }
.lineup__time { color: var(--muted); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lineup__band { display: grid; gap: 2px; font-weight: 700; overflow-wrap: anywhere; }
.lineup__meta { color: var(--muted); font-size: 13px; font-weight: 600; }
.lineup__row--now { box-shadow: inset 0 0 0 2px var(--red); border-radius: var(--radius-m); }
.lineup__row--past .lineup__band > span:first-child { color: var(--done-text); }
.lineup__row--empty .lineup__band { color: var(--muted); font-weight: 500; }

/* ---------- mainstage ---------- */

.stagecard {
  display: grid;
  gap: 10px;
  padding: 24px 20px 20px;
  border-radius: var(--radius-l);
  background: var(--red);
  color: #ffffff;
}
.stagecard__label { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.stagecard__dot { width: 10px; height: 10px; border-radius: 50%; background: #ffffff; opacity: 0.85; flex: none; }
.stagecard__act { font-family: var(--font-display); font-weight: 900; font-size: 46px; line-height: 0.95; text-transform: uppercase; overflow-wrap: anywhere; }
.stagecard__next {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 8px;
  padding: 16px 20px;
  border-radius: var(--radius-m);
  background: #ffffff;
  color: var(--inkt);
}
.stagecard__time { color: var(--klun-rood-tekst); font-family: var(--font-display); font-weight: 900; font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; }
.stagecard__in { color: #4b5687; font-size: 14px; font-weight: 700; }
.stagecard__nextact { color: var(--klun-blauw); font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.step { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
/* De lijn tussen de bolletjes. */
.step::before {
  content: "";
  position: absolute;
  left: 18.5px;
  top: 46px;
  bottom: -14px;
  width: 3px;
  border-radius: 2px;
  background: var(--line);
}
.step:last-child::before { display: none; }
.step__dot {
  position: relative;
  display: grid;
  place-content: center;
  width: 40px; height: 40px;
  margin-top: 14px;
  border-radius: 50%;
  border: 3px solid var(--ice);
  background: var(--surface);
  color: #ffffff;
}
.step__dot svg { width: 20px; height: 20px; stroke-width: 3; }
.step--done .step__dot { background: var(--brand); border-color: var(--brand); }
.step--now .step__dot { background: var(--red); border-color: var(--red); }
.step--next .step__dot { border-color: var(--brand-text); }
.step--past .step__dot { border-color: var(--line); }

.step__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 18px 18px 18px 24px;
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.step--now .step__card { box-shadow: inset 0 0 0 2px var(--red), var(--shadow-sm); }
.step__main { display: grid; gap: 6px; min-width: 0; }
.step__head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.step__time { color: var(--brand-text); font-family: var(--font-display); font-weight: 900; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.step__text { color: var(--text); font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.step--done .step__text { color: var(--done-text); }
.step__card .check { margin-top: 0; }

/* ---------- plattegrond ---------- */

.map__frame { position: relative; border-radius: var(--radius-l); }
.map__scroll {
  height: 470px;
  max-height: calc(100dvh - 330px);
  min-height: 280px;
  overflow: auto;
  overscroll-behavior: contain;
  /* Eén vinger scrolt; knijpen met twee vingers vangt map.js zelf af. */
  touch-action: pan-x pan-y;
  background: #ffffff;
}
.map__scroll:focus-visible { outline-offset: -3px; }
.map__img { display: block; max-width: none; height: auto; cursor: zoom-in; }
.map__scroll .empty { margin: 16px; }

.map__percent {
  position: absolute;
  left: 20px;
  bottom: 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--klun-blauw);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.map__controls {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: grid;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.map__zoombtn {
  display: grid;
  place-content: center;
  width: 48px; height: 48px;
  border: 0;
  background: transparent;
  color: var(--brand-text);
  cursor: pointer;
}
.map__zoombtn + .map__zoombtn { border-top: 1px solid var(--line); }
.map__zoombtn:hover:not(:disabled) { background: var(--tile); }
.map__zoombtn:disabled { color: var(--muted); opacity: 0.55; cursor: default; }
.map__zoombtn:focus-visible { outline-offset: -3px; }
.map__zoombtn svg { width: 24px; height: 24px; }

/* ---------- notities ---------- */

.composer { display: grid; padding: 6px; }
.composer__input {
  width: 100%;
  min-height: 84px;
  padding: 12px 14px 6px;
  border: 0;
  border-radius: var(--radius-m);
  background: transparent;
  resize: vertical;
  font-size: 16px;
  line-height: 1.45;
}
.composer__input:focus { outline: none; }
.composer:focus-within { box-shadow: inset 0 0 0 2px var(--brand-text); }
.composer__bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 6px 8px 8px 14px; }
.composer__hint { margin-right: auto; font-size: 13px; color: var(--muted); }
@media (hover: none) { .composer__hint { display: none; } }

.note__text { color: var(--text); font-size: 16px; font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.note__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.note__meta span { display: inline-flex; align-items: center; gap: 6px; }
.note__meta svg { width: 15px; height: 15px; }
.note .btn--icon { margin: -8px -8px 0 0; }

/* ---------- login ---------- */

.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--klun-blauw);
  color: #ffffff;
  padding-bottom: calc(32px + var(--safe-bottom));
}
.login .crossstrip--lg { margin-top: calc(32px + var(--safe-top)); }
.login__hero {
  display: grid;
  gap: 14px;
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 40px 24px 40px;
}
.login__kicker { color: var(--on-brand-muted); font-size: 14px; letter-spacing: 0.12em; }
.login__title { font-weight: 400; color: #ffffff; }
.login__tagline { max-width: 30ch; font-size: 16px; font-weight: 500; line-height: 1.45; }
.login :focus-visible { outline-color: #ffffff; }

.login__card {
  display: grid;
  gap: 18px;
  width: min(392px, calc(100% - 32px));
  margin: auto auto 0;
  padding: 20px 20px 24px;
  border-radius: 20px;
  background: #ffffff;
  color: var(--inkt);
  box-shadow: 0 24px 60px -20px rgba(5, 8, 30, 0.6);
}
@media (min-width: 640px) {
  .login { justify-content: center; }
  .login__card { margin: 0 auto; width: 392px; }
}
/* De kaart blijft wit in beide thema's; de velden volgen dan ook licht. */
.login__card .input { background: #ffffff; color: var(--inkt); border-color: #cfe2f4; }
.login__card ::placeholder { color: #4b5687; }
.login__card .input:focus { border-color: var(--klun-blauw); }
.login__card :focus-visible { outline-color: var(--klun-rood); }
.login__card .btn--brand { background: var(--klun-blauw); border-color: var(--klun-blauw); padding: 0 10px; gap: 8px; font-size: 14px; }
.login__card .alert { color: var(--inkt); background: #f7fbff; border-color: #cfe2f4; }
.login__card,
.login__form { grid-template-columns: minmax(0, 1fr); }
.login__card .btn { white-space: normal; text-align: center; line-height: 1.2; }
.login__form { display: grid; gap: 14px; }
.login__label { font-size: 15px; font-weight: 700; }
.login__messages:empty { display: none; }
.login__messages { display: grid; gap: 8px; }
.login__divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: #4b5687;
  font-size: 14px;
  font-weight: 700;
}
.login__divider::before,
.login__divider::after { content: ""; height: 1px; background: #cfe2f4; }
.login__help { color: #4b5687; font-size: 14px; text-align: center; }

.password { position: relative; display: flex; align-items: center; }
.password .input { min-height: 52px; padding-right: 56px; font-size: 16px; }
.password__toggle {
  position: absolute;
  right: 4px;
  display: grid;
  place-content: center;
  width: var(--tap); height: var(--tap);
  border: 0;
  border-radius: var(--radius-m);
  background: transparent;
  color: var(--klun-blauw);
  cursor: pointer;
}
.password__toggle svg { width: 24px; height: 24px; }

/* ---------- meldingen ---------- */

.alert {
  padding: 14px 16px;
  border-radius: var(--radius-m);
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.alert--error { border-color: var(--red); background: var(--live-soft); }
.alert--warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
.alert--action { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: start; }
.alert--action > svg { width: 22px; height: 22px; color: var(--warn); margin-top: 1px; }
.alert--action > .btn { grid-column: 2; justify-self: start; }

.empty {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 2px dashed var(--line);
  border-radius: var(--radius-l);
}
.empty__title { font-weight: 700; font-size: 16px; color: var(--text); }

.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  padding: 14px 18px;
  border-radius: var(--radius-m);
  background: var(--inkt);
  color: #ffffff;
  box-shadow: 0 12px 30px -10px rgba(5, 8, 30, 0.5);
  font-size: 14px;
  font-weight: 600;
}
.toast--error { background: var(--klun-rood-tekst); }
@media (prefers-color-scheme: dark) {
  .toast { background: var(--ijswit); color: var(--inkt); }
  .toast--error { background: var(--klun-rood-tekst); color: #ffffff; }
}
@media (min-width: 880px) { .toasts { bottom: 24px; } }

/* ---------- bewerken ---------- */

.editor { display: grid; gap: 12px; }
.editor__row {
  display: grid;
  gap: 10px;
  padding: 12px 16px 16px;
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.editor__row:focus-within { box-shadow: inset 0 0 0 2px var(--brand-text); }
.editor__rowhead { display: flex; align-items: center; gap: 8px; }
.editor__index { font-size: 13px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.editor__tools { display: flex; gap: 2px; margin-left: auto; }
.editor__grid { display: grid; gap: 10px; }
@media (min-width: 720px) {
  .editor__grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .field--grow { grid-column: span 2; }
}

.sticky-actions {
  position: sticky;
  bottom: calc(88px + var(--safe-bottom));
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 18px;
  border-radius: var(--radius-l);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.sticky-actions__info { margin-right: auto; font-size: 14px; font-weight: 600; color: var(--muted); }
@media (min-width: 880px) { .sticky-actions { bottom: 16px; } }

/* ---------- omroepbericht ---------- */

.broadcast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 20px 16px 20px 20px;
  border-radius: var(--radius-l);
  background: var(--ice);
  color: var(--on-ice);
}
.broadcast--urgent { background: var(--red); color: #ffffff; }
.broadcast__tile {
  display: grid;
  place-content: center;
  width: 48px; height: 48px;
  border-radius: var(--radius-m);
  background: var(--klun-blauw);
  color: #ffffff;
}
.broadcast__tile svg { width: 26px; height: 26px; }
.broadcast--urgent .broadcast__tile { background: #ffffff; color: var(--red); }
.broadcast__body { display: grid; gap: 4px; min-width: 0; padding-top: 2px; }
.broadcast__meta { font-size: 14px; font-weight: 700; }
.broadcast--urgent .broadcast__meta { text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; font-weight: 800; }
.broadcast__text { font-size: 17px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.broadcast--urgent .broadcast__text { font-weight: 700; }
.broadcast__close {
  display: grid;
  place-content: center;
  width: var(--tap); height: var(--tap);
  margin: -6px -4px 0 0;
  border: 0;
  border-radius: var(--radius-m);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.broadcast__close:hover { background: rgba(24, 32, 79, 0.1); }
.broadcast--urgent .broadcast__close:hover { background: rgba(255, 255, 255, 0.16); }
.broadcast__close svg { width: 24px; height: 24px; }
.broadcast--urgent :focus-visible { outline-color: #ffffff; }

/* Omroepen: een bottom sheet. Het blijft een <dialog> met showModal, dus de
   focus blijft erin en Escape sluit hem. */
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - 32px);
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 -20px 60px -20px rgba(14, 19, 52, 0.5);
  overflow-y: auto;
}
.sheet::backdrop { background: rgba(14, 19, 52, 0.55); }
@media (min-width: 640px) {
  .sheet { margin: auto; border-radius: var(--radius-sheet); }
}

.sheet__body { display: grid; gap: 16px; padding: 12px 20px calc(24px + var(--safe-bottom)); }
.sheet__grip { justify-self: center; width: 44px; height: 5px; border-radius: 999px; background: var(--line); }
.sheet__head { display: flex; align-items: flex-start; gap: 12px; margin-top: 8px; }
.sheet__head > div { display: grid; gap: 8px; flex: 1; }
.sheet__title { color: var(--brand-text); font-family: var(--font-display); font-weight: 900; font-size: 34px; line-height: 1; text-transform: uppercase; }
.sheet__intro { color: var(--muted); font-size: 15px; }
.sheet__close {
  display: grid;
  place-content: center;
  width: var(--tap); height: var(--tap);
  border: 0;
  border-radius: var(--radius-m);
  background: var(--tile);
  color: var(--brand-text);
  cursor: pointer;
  flex: none;
}
.sheet__close svg { width: 22px; height: 22px; }
.sheet__labelrow { display: flex; align-items: baseline; justify-content: space-between; margin-top: 4px; margin-bottom: -8px; }
.sheet__label { font-size: 14px; font-weight: 700; }
.sheet__counter { color: var(--muted); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sheet__textarea { min-height: 100px; padding: 14px 16px; resize: vertical; font-size: 16px; font-weight: 600; line-height: 1.4; }
.sheet__previewlabel { color: var(--muted); margin-bottom: -6px; }

.levels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.level {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: var(--radius-m);
  border: 2px solid var(--line);
  cursor: pointer;
}
.level__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.level__dot {
  width: 22px; height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  background: var(--surface);
}
.level__text { display: grid; gap: 2px; }
.level__text strong { font-size: 16px; font-weight: 700; color: var(--brand-text); }
.level__text span { color: var(--muted); font-size: 13px; }
.level:has(.level__input:checked) { border-color: var(--brand-text); }
.level:has(.level__input:checked) .level__dot { border-color: var(--brand-text); box-shadow: inset 0 0 0 5px var(--surface); background: var(--brand-text); }
.level--urgent:has(.level__input:checked) { border-color: var(--red); }
.level--urgent:has(.level__input:checked) .level__dot { border-color: var(--red); background: var(--red); }
.level--urgent:has(.level__input:checked) strong { color: var(--red-text); }
.level:has(.level__input:focus-visible) { outline: 3px solid var(--red); outline-offset: 2px; }

.linkbtn {
  justify-self: center;
  min-height: var(--tap);
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--brand-text);
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linkbtn:disabled { opacity: 0.5; }

/* ---------- contacten ---------- */

.contacts { display: grid; gap: 12px; }
@media (min-width: 960px) { .contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.contact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  /* Krap genoeg dat "06 12345678" op een telefoon van 390 px naast de knoppen past. */
  gap: 12px;
  align-items: center;
  padding: 18px 14px 18px 18px;
}
.contact__avatar { width: 44px; height: 44px; font-size: 22px; }
.contact__main { display: grid; gap: 1px; min-width: 0; }
.contact__name { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.contact__role { color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact__phone { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.contact__note { grid-column: 2 / -1; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.contact__actions { display: flex; gap: 10px; align-items: center; }
.contact__actions:empty { display: none; }
.contact__whatsapp { border-color: var(--line); color: var(--brand-text); }
.btn--call { padding: 0 18px; }
@media (max-width: 360px) {
  .contact { grid-template-columns: auto minmax(0, 1fr); }
  .contact__actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ---------- actielijst ---------- */

.quickadd { display: grid; gap: 14px; padding: 20px 20px 22px; overflow: visible; }
.quickadd__what { min-height: 52px; font-size: 16px; }
.quickadd__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.quickadd__field > span { font-size: 14px; }
.quickadd__submit.btn--icon { width: 52px; min-height: 52px; height: 52px; }
.quickadd__submit svg { width: 26px; height: 26px; stroke-width: 2.4; }
.quickadd input[type="date"] { min-width: 0; }

.toolbar--compact .search { flex-basis: 100%; }
.toolbar--compact { gap: 10px; }
.toolbar--compact .segmented { padding: 3px; }
.toolbar--compact .segmented__item { min-height: var(--tap); font-size: 13.5px; padding: 0 10px; }

.row__tools { display: flex; gap: 0; margin: -8px -8px 0 0; }
.action--overdue { box-shadow: inset 0 0 0 2px var(--red), var(--shadow-sm); }
.action .row__what { font-size: 17px; }

.action__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.action__meta .due { margin-left: 4px; }
.person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 3px 14px 3px 4px;
  border: 0;
  border-radius: 999px;
  background: var(--tile);
  color: var(--brand-text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.person:hover { background: var(--line-soft); }
/* Zichtbaar 32px hoog; het tikvlak is 44px. */
button.person { position: relative; }
button.person::after { content: ""; position: absolute; inset: -6px 0; }
.person__avatar {
  display: grid;
  place-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--ice);
  color: var(--klun-blauw);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 14px;
}
.person--none { color: var(--muted); font-weight: 600; font-style: italic; cursor: default; padding: 3px 12px; }
.due {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.due svg { width: 20px; height: 20px; color: var(--red-text); }
.due--overdue { color: var(--red-text); }
.due__late { color: var(--red-text); }
.due--done { opacity: 0.8; }
.due--done svg { color: inherit; }

.action-edit { display: grid; grid-template-columns: 1fr; gap: 12px; box-shadow: inset 0 0 0 2px var(--brand-text); }
.action-edit__grid { display: grid; gap: 10px; }
@media (min-width: 720px) {
  .action-edit__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 180px; }
  .action-edit__grid .field--grow { grid-column: auto; }
}
.action-edit__bar { display: flex; justify-content: flex-end; gap: 6px; }

/* ------------------------------------------------------------ auditlogboek */
.audit__intro { color: var(--muted); font-size: 14px; }
.audit__filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 16px; }
.audit__field { display: grid; gap: 5px; flex: 1 1 150px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.audit__search { flex: 2 1 240px; }
.audit__filters .btn { min-height: 44px; }
.audit__results { display: grid; gap: 12px; }
.audit__results > .btn { justify-self: center; }
.audit__list { list-style: none; display: grid; gap: 12px; margin: 0; padding: 0; }
.audit-entry { padding: 16px; display: grid; gap: 8px; }
.audit-entry__head { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; font-size: 12px; }
.audit-entry__action { color: var(--brand-text); background: var(--tile); padding: 4px 9px; border-radius: var(--radius-xs); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.audit-entry__section { color: var(--muted); font-weight: 600; }
.audit-entry time { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.audit-entry__target { font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.audit-entry__user { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.audit-entry__user svg { width: 14px; height: 14px; }
.audit-entry__details { margin-top: 4px; font-size: 13px; }
.audit-entry__details summary { color: var(--brand-text); min-height: var(--tap); display: flex; align-items: center; cursor: pointer; font-weight: 600; padding: 5px 0; }
.audit-changes { display: grid; gap: 12px; margin-top: 10px; }
.audit-change__label { font-weight: 650; margin-bottom: 4px; overflow-wrap: anywhere; }
.audit-change dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.audit-change dl > div { padding: 10px; background: var(--surface-2); border-radius: var(--radius-sm); }
.audit-change dt { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.audit-change dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .audit-entry time { margin-left: 0; width: 100%; }
  .audit-change dl { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ statistieken */
.stats__loading { color: var(--muted); }
.tickets__status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--muted); font-size: 13px; }
.tickets__badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; color: var(--brand-text); background: var(--tile); font-weight: 700; }
.tickets__badge svg { width: 15px; height: 15px; }
.tickets__badge--warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.tickets__summary { display: grid; gap: 16px; }
.tickets__total { padding: 24px; gap: 8px; }
.tickets__icon { display: grid; place-content: center; width: 44px; height: 44px; margin-bottom: 8px; border-radius: var(--radius-m); color: var(--brand-text); background: var(--tile); }
.tickets__icon svg { width: 26px; height: 26px; }
.tickets__count { color: var(--brand-text); font-family: var(--font-display); font-size: clamp(56px, 12vw, 88px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tickets__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tickets__table th, .tickets__table td { padding: 12px 0; text-align: left; border-bottom: 1px solid var(--border); }
.tickets__table thead th { color: var(--muted); font-size: 12px; font-weight: 600; }
.tickets__table tbody th { font-weight: 600; overflow-wrap: anywhere; }
.tickets__table .tickets__number { text-align: right; padding-left: 16px; font-variant-numeric: tabular-nums; }
.tickets__table td.tickets__number { font-weight: 750; font-size: 18px; }
.tickets__venues > .stats__note { margin-top: 12px; }
@media (min-width: 720px) { .tickets__summary { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }
.stats__body { display: grid; gap: 16px; transition: opacity 0.2s; }
.stats__body.is-loading { opacity: 0.55; }
.stats__tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) {
  .stats__tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.stats-tile {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stats-tile__label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stats-tile__value { color: var(--brand-text); font-family: var(--font-display); font-size: 32px; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stats-tile--hero .stats-tile__value { font-size: 44px; }
.stats-tile__note { color: var(--faint); font-size: 12px; }
.stats-card { padding: 16px 18px; display: grid; gap: 4px; align-content: start; overflow: visible; }
.stats-card h2 { color: var(--brand-text); font-family: var(--font-display); font-size: 24px; font-weight: 900; line-height: 1.05; text-transform: uppercase; }
.stats-card__sub { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.stats-card__total { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.stats-card__total strong { color: var(--brand-text); font-family: var(--font-display); font-size: 32px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.stats__grid { display: grid; gap: 16px; }
@media (min-width: 720px) {
  .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.stats__note { color: var(--faint); font-size: 13px; }

.stats-legend { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.stats-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stats-key { display: inline-block; width: 16px; height: 4px; border-radius: 2px; }
.stats-key--views { background: var(--series-views); }
.stats-key--visitors { background: var(--series-visitors); }
.stats-key--ticket { background: var(--series-ticket); }

.stats-chart { position: relative; }
.stats-chart svg { display: block; width: 100%; overflow: visible; }
.stats-chart:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; border-radius: 8px; }
.stats-grid { stroke: var(--border); stroke-width: 1; }
.stats-tick { fill: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.stats-area { fill: var(--series-views); fill-opacity: 0.1; }
.stats-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.stats-line--views { stroke: var(--series-views); }
.stats-line--visitors { stroke: var(--series-visitors); }
.stats-line--ticket { stroke: var(--series-ticket); }
.stats-dot--ticket { fill: var(--series-ticket); }
.stats-card__change { display: block; margin-top: 2px; font-size: 13px; }
.stats-range { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.stats-range__field { min-width: 0; flex: 0 1 190px; }
.stats-range .stats__note { flex-basis: 100%; }
.stats-dot { stroke: var(--surface); stroke-width: 2; }
.stats-dot--views { fill: var(--series-views); }
.stats-dot--visitors { fill: var(--series-visitors); }
.stats-crosshair { stroke: var(--faint); stroke-width: 1; visibility: hidden; }
.stats-chart circle:not([cx]) { visibility: hidden; }
.stats-chart:not(.is-active) .stats-crosshair ~ .stats-dot { visibility: hidden; }
.stats-chart.is-active .stats-crosshair { visibility: visible; }
.stats-column { fill: var(--series-views); }
.stats-hit { fill: transparent; }

.stats-tip {
  position: absolute;
  z-index: 5;
  display: none;
  min-width: 150px;
  padding: 8px 10px;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 13px;
}
.stats-tip.is-visible { display: block; }
.stats-tip__title { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.stats-tip__row { display: flex; align-items: center; gap: 8px; }
.stats-tip__row strong { font-variant-numeric: tabular-nums; }
.stats-tip__row span { color: var(--muted); }

.stats-table { margin-top: 8px; font-size: 14px; }
.stats-table summary { cursor: pointer; color: var(--brand-text); font-weight: 700; min-height: var(--tap); display: flex; align-items: center; }
.stats-table table { width: 100%; margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.stats-table th,
.stats-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--border); }
.stats-table .num { text-align: right; }

.stats-bars { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.stats-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 14px; }
.stats-bar__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-bar__count { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.stats-bar__track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--brand-soft); }
.stats-bar__fill { display: block; height: 8px; min-width: 2px; border-radius: 4px; background: var(--series-views); }

.stats .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.stats .segmented__item { white-space: nowrap; }
@media (max-width: 520px) {
  .stats .segmented__item { padding: 0 8px; font-size: 13px; }
}

/* Kaarten en tegels van de beheerschermen volgen de algemene kaartstijl. */
.stats-tile { border: 1px solid var(--line-soft); border-radius: var(--radius-l); box-shadow: var(--shadow-sm); padding: 16px 18px; }
.stats-tile__label { font-weight: 700; }
.stats-card { padding: 20px; }
.audit__filters { padding: 20px; }
.audit-entry { padding: 18px 20px; }
.audit__field { font-size: 13px; font-weight: 700; }
.tickets__table td.tickets__number { font-weight: 800; color: var(--brand-text); }

/* Tickets: verloop van de kaartverkoop */
.tickets__sales-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.tickets__change { color: var(--muted); font-size: 14px; }
.tickets__change strong { color: var(--brand-text); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tickets__chart { margin-top: 4px; }
.tickets__empty { padding: 24px 0; }
.tickets__empty:empty { display: none; }
.tickets__goal { display: grid; gap: 6px; margin: 4px 0; }
.tickets__goal-text { color: var(--muted); font-size: 14px; }
.tickets__goal-text strong { color: var(--brand-text); font-weight: 800; }
.tickets__tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tickets__sales .stats-range { margin: 4px 0 8px; }
.stats-column--down { fill: var(--series-visitors); }
.tickets__sales > .stats__note:last-child { margin-top: 8px; }
.tickets__sales { min-width: 0; }
/* De kaart is een raster: zonder dit rekt brede inhoud (de periodeknoppen) de
   kaart en de grafiek op tot buiten het scherm. */
.tickets__sales > *, .tickets__sales-head > * { min-width: 0; }
.tickets__sales .segmented { max-width: 100%; }
@media (max-width: 559px) {
  /* Periodekeuzes op een telefoon: de knoppen delen de breedte in plaats van uit te steken. */
  /* Past het niet op één regel (heel smal scherm), dan op twee; nooit buiten beeld. */
  .tickets__sales .segmented { display: flex; flex-wrap: wrap; width: 100%; }
  .tickets__sales .segmented__item { flex: 1 0 auto; padding: 0 4px; font-size: 12.5px; white-space: nowrap; }
  /* Vijf periodes passen niet op een smal scherm: dan horizontaal schuiven,
     met hele woorden, in plaats van afgekapte knoppen. */
  .stats .toolbar .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .stats .toolbar .segmented::-webkit-scrollbar { display: none; }
  .stats .toolbar .segmented__item { flex: none; padding: 0 12px; }
}

/* Melding met een knop (bijv. "nieuwe versie") */
.toast--action { display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: auto; }
.toast__action {
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-s);
  background: #ffffff;
  color: var(--inkt);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) { .toast__action { background: var(--inkt); color: #ffffff; } }

/* Meldingen aan/uit op het scherm Meer */
.push-card { display: grid; gap: 10px; padding: 16px; border-radius: var(--radius-l); border: 1px solid var(--line-soft); background: var(--surface); }
.push-card__head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; }
.push-card__title { font-size: 16px; font-weight: 700; }
.push-card__sub { color: var(--muted); font-size: 14px; }
.push-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.push-card__note { color: var(--muted); font-size: 13px; }

/* ---------- op de dag zelf: wachtende vinkjes, mijn dag, namen, nood ---------- */

/* Afgevinkt op dit apparaat, nog niet verstuurd. */
.check--pending { border-style: dashed; }
.check--pending[aria-pressed="true"] { background: var(--warn, #b7791f); border-color: var(--warn, #b7791f); }
.tag--pending { border: 1.5px dashed currentColor; color: var(--muted); height: 22px; }

/* Afvinken direct in de kaart "Nu bezig". */
.nowcard__item:has(.check--card) { grid-template-columns: auto 84px minmax(0, 1fr); align-items: start; }
.check--card { border-color: #ffffff; background: transparent; margin-top: -2px; }
.check--card[aria-pressed="true"] { background: #ffffff; border-color: #ffffff; color: var(--brand); }
.check--card:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }

/* "Taken van …" */
.person-picker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.person-picker__label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 700; }
.person-picker__label svg { width: 18px; height: 18px; }
.person-picker__select { flex: 1 1 180px; min-height: var(--tap); max-width: 360px; font-weight: 700; }
.person-picker--active .person-picker__select { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }

/* Ingeklapte uren van eerder vandaag. */
.past-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: var(--tap);
  padding: 12px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-l);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.past-summary svg { width: 20px; height: 20px; flex: none; color: var(--brand-text); }
.past-summary__text { display: grid; gap: 2px; }
.past-summary__text span { color: var(--muted); font-size: 14px; }
.past-summary--missed .past-summary__text span { color: var(--red-text); }

/* Namen als knop: bellen, appen of taken bekijken. */
.row__people { min-width: 0; }
.person-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.person-link:hover { color: var(--brand-text); }
.person-sheet .sheet__title { flex: 1; }
.person-sheet__list { display: grid; gap: 12px; }
.person-sheet__contact {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line-soft);
  background: var(--surface);
}
.person-sheet__who { display: grid; gap: 2px; }
.person-sheet__who span { color: var(--muted); font-size: 14px; }
.person-sheet__phone { font-variant-numeric: tabular-nums; }
.person-sheet__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.person-sheet__actions .btn { flex: 1 1 140px; justify-content: center; }
.person-sheet__none { color: var(--muted); }

/* Noodkaart bovenaan Contacten. */
.emergency {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-l);
  border: 2px solid var(--red);
  background: var(--surface);
}
.emergency__title { display: flex; align-items: center; gap: 8px; color: var(--red-text); font-size: 18px; font-weight: 800; }
.emergency__title svg { width: 20px; height: 20px; }
.emergency__actions { display: grid; gap: 10px; }
@media (min-width: 560px) { .emergency__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.emergency__call {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border-radius: var(--radius-m);
  border: 2px solid var(--red);
  background: var(--surface);
  color: var(--red-text);
  text-decoration: none;
  text-align: left;
}
.emergency__call svg { width: 22px; height: 22px; flex: none; }
.emergency__call span { display: grid; gap: 1px; min-width: 0; }
.emergency__call small { color: var(--muted); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.emergency__call--112 { background: var(--red); color: #ffffff; }
.emergency__call--112 small { color: rgba(255, 255, 255, 0.85); }
.emergency__hint { color: var(--muted); font-size: 13px; }

/* Plattegrond: volledig scherm en de knop daarvoor. */
.map__fullbtn { position: absolute; top: 14px; right: 14px; z-index: 2; box-shadow: var(--shadow); }
.map__img { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.map__frame--full {
  position: fixed;
  inset: 0;
  z-index: 200;
  border-radius: 0;
  background: var(--surface);
  padding: var(--safe-top, 0) 0 var(--safe-bottom, 0);
}
.map__frame--full .map__scroll { height: 100%; max-height: none; min-height: 0; border-radius: 0; }
.map__frame--full .map__fullbtn { top: calc(var(--safe-top) + 14px); }
.map__frame--full .map__percent,
.map__frame--full .map__controls { bottom: calc(var(--safe-bottom) + 20px); }
body:has(.map__frame--full) { overflow: hidden; }

/* Omroepen: weggeklikt bericht als smalle regel, sjablonen, overzicht op Meer. */
.broadcast-mini {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: var(--tap);
  padding: 6px 14px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--ice);
  color: var(--on-ice);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.broadcast-mini--urgent { background: var(--red); color: #ffffff; }
.broadcast-mini--urgent:focus-visible { outline-color: var(--brand-text); }
.broadcast-mini__icon { display: grid; }
.broadcast-mini__icon svg { width: 18px; height: 18px; }
.broadcast-mini__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.broadcast-mini__more { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.sheet__templates { margin: -8px -20px 0; padding: 2px 20px 4px; }
@media (min-width: 880px) { .sheet__templates { margin: -8px 0 0; padding: 2px 0; } }
.chip-btn--urgent { color: var(--red-text); }
.chip-btn--urgent:hover { border-color: var(--red-text); }
.sheet__current {
  padding: 10px 12px;
  border-radius: var(--radius-m);
  background: var(--tile);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.sheet__current-time { color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; }
.sheet__counter--low { color: var(--red-text); }
.sheet__restored { margin-top: -8px; color: var(--muted); font-size: 13px; }

.omroep-log__list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.omroep-log__item {
  display: grid;
  grid-template-columns: 3.4em minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}
.omroep-log__time { color: var(--brand-text); font-weight: 800; font-variant-numeric: tabular-nums; }
.omroep-log__body { display: grid; gap: 2px; min-width: 0; }
.omroep-log__text { font-weight: 600; overflow-wrap: anywhere; }
.omroep-log__item--urgent .omroep-log__text strong { color: var(--red-text); }
.omroep-log__item--replaced .omroep-log__text,
.omroep-log__item--retracted .omroep-log__text { color: var(--muted); }
.omroep-log__meta { color: var(--muted); font-size: 13px; }
.omroep-log__item--active .omroep-log__meta { color: var(--brand-text); font-weight: 700; }

/* Contacten uit Office 365. */
.office { display: grid; gap: 12px; margin-top: 12px; }
.office__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.office__head > div { display: grid; gap: 2px; min-width: 0; }
.office__title { color: var(--brand-text); font-size: 18px; font-weight: 800; }
.office__sub { color: var(--muted); font-size: 13.5px; }
.office__head .btn { flex: none; }
.office__error {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--radius-m);
  border: 1.5px solid var(--red-text);
  color: var(--red-text);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.office__error svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.office__missing { padding: 10px 12px; border-radius: var(--radius-m); background: var(--tile); font-size: 14px; }
.office__missing summary { cursor: pointer; font-weight: 700; color: var(--brand-text); }
.office__missing p { margin-top: 6px; color: var(--text); overflow-wrap: anywhere; }
.office__empty { color: var(--muted); font-size: 14px; }
