/* RemedyPass — huisstijl The Remedy: navy, geborsteld zilver, wit.
   Indrukken van knoppen met tekst: geen verkleining (scale), want dan tekent de browser de tekst even wazig. */
:root {
  --navy: #124058;
  --navy-ink: #0c2c3e;
  --navy-2: #1d5878;
  --navy-soft: #e7eef3;
  --silver-1: #f5f7f9;
  --silver-2: #c4ccd3;
  --silver-3: #8f9aa4;
  --brushed: linear-gradient(115deg, #eef1f4 0%, #c9d0d7 22%, #f6f8fa 38%, #aeb7c0 62%, #e3e7eb 80%, #b7c0c8 100%);
  --hero: linear-gradient(140deg, #0f3a52 0%, #124058 45%, #1e5c7d 100%);

  --bg: #f1f4f7;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --line: #e1e7ec;
  --text: #0e2230;
  --muted: #61717d;
  --accent: var(--navy);
  --accent-soft: var(--navy-soft);
  --on-accent: #ffffff;
  --danger: #b4232f;
  --danger-soft: #fbe9ea;
  --ok: #1d7a4c;
  --ok-soft: #e3f3ea;
  --warn: #9a5d07;
  --warn-soft: #fbf0dc;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(14, 34, 48, .06);
  --shadow: 0 1px 2px rgba(14, 34, 48, .05), 0 8px 24px -8px rgba(14, 34, 48, .14);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1620;
    --surface: #12212d;
    --surface-2: #172a38;
    --line: #223a4c;
    --text: #e8eef2;
    --muted: #93a6b4;
    --accent: #8cc3e2;
    --accent-soft: #1a3446;
    --on-accent: #0b1620;
    --danger: #ff8a8f;
    --danger-soft: #3a1c21;
    --ok: #72d3a0;
    --ok-soft: #173327;
    --warn: #f1c066;
    --warn-soft: #362a12;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px -12px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  background: var(--bg);
}
body {
  margin: 0;
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { letter-spacing: -.01em; }
button, a, [role="button"], .chip, .tab {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; font-size: 16px; color: inherit; }
img { display: block; max-width: 100%; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.ic-lg { width: 36px; height: 36px; stroke-width: 1.4; color: var(--silver-3); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.app { min-height: 100dvh; display: flex; flex-direction: column; }
.boot { margin: auto; animation: pulse 1.2s ease-in-out infinite; }
.boot img { border-radius: 16px; box-shadow: var(--shadow); }
@keyframes pulse { 50% { opacity: .5; } }

/* ---------- Kop ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.brand-mark {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
}
/* Het R-logo zonder vlak erachter (doorzichtige PNG). */
.brand-mark img { width: 38px; height: 38px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text strong { font-size: 17px; color: var(--text); }
.brand-text small { font-size: 12px; letter-spacing: .01em; color: var(--muted); font-weight: 600; margin-top: 2px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 0; flex: 0 0 auto;
  background: var(--brushed); color: var(--navy-ink); font-weight: 800; font-size: 14px;
  display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(14, 34, 48, .1) inset;
}
.avatar.big { width: 64px; height: 64px; font-size: 22px; }

main { flex: 1; width: 100%; max-width: 620px; margin: 0 auto; padding: 16px 16px 8px; }
/* Voettekst: boven de tabbalk onderaan (gsm), onder de inhoud naast de zijbalk (pc). */
.site-foot { width: 100%; max-width: 620px; margin: 0 auto; padding: 12px 16px calc(100px + env(safe-area-inset-bottom, 0px)); }
.made-by, .auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 0; }
.made-by a, .auth-foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.page-title { font-size: 28px; margin: 6px 2px 12px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 22px 4px 10px; font-weight: 700; }

/* ---------- Onderste tabs ---------- */
.tabs {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 5;
  max-width: 520px; margin: 0 auto;
  display: flex; gap: 4px; padding: 6px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 10px 30px -10px rgba(14, 34, 48, .35);
}
.tab {
  flex: 1; border: 0; background: none; color: var(--muted);
  padding: 7px 4px 6px; border-radius: 16px; font-size: 11.5px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: background 140ms var(--ease-out), color 140ms;
}
.tab .ic { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--on-accent); background: var(--accent); }
.tab:active { opacity: .7; }

/* ---------- Hero met site ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-lg); padding: 18px 18px 16px; color: #fff;
  background: var(--hero);
  box-shadow: 0 14px 30px -14px var(--hero-shadow, rgba(18, 64, 88, .7));
}
.hero-ribbon {
  position: absolute; z-index: -1; right: -60px; top: -40px; width: 240px; height: 180px;
  background: var(--brushed); opacity: .9; transform: rotate(-28deg); border-radius: 30px;
  box-shadow: -10px 10px 30px rgba(0, 0, 0, .25);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; right: -40px; top: 70px; width: 220px; height: 44px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08)); transform: rotate(-28deg); border-radius: 22px;
}
.hero-site { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: 0; }
.hero-site:disabled { cursor: default; opacity: 1; }
.hero-label { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .7); font-weight: 600; }
.hero-name { display: flex; align-items: center; gap: 6px; font-size: 24px; font-weight: 800; margin-top: 4px; max-width: 75%; line-height: 1.15; }
.hero-name .ic { width: 22px; height: 22px; opacity: .8; }
.hero-site:not(:disabled):active .hero-name { opacity: .8; }
.hero-ssid {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .18);
  padding: 6px 10px; border-radius: 999px; font-size: 14px; font-weight: 600;
}
.hero-ssid .ic { width: 16px; height: 16px; }

/* ---------- Formules ---------- */
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preset {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: var(--r);
  padding: 16px 14px 14px; text-align: left; min-height: 104px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  box-shadow: var(--shadow);
  transition: transform 120ms var(--ease-out), background 140ms, border-color 140ms, color 140ms;
}
.preset::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--brushed); opacity: .9; }
.preset-top { display: flex; align-items: baseline; gap: 6px; }
.preset .num { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--accent); }
.preset .unit { font-size: 17px; font-weight: 700; }
.preset .num.word { font-size: 24px; line-height: 34px; overflow-wrap: anywhere; }
.preset .meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.preset .meta .ic { width: 16px; height: 16px; }
.meta-sep::before { content: "·"; margin: 0 4px 0 2px; }
.preset:active { background: var(--navy); border-color: var(--navy); color: #fff; }
.preset:active .num, .preset:active .meta { color: #fff; }
.preset[disabled] { opacity: .45; }
.preset.custom { background: transparent; border-style: dashed; box-shadow: none; }
.preset.custom::before { display: none; }
.preset.custom .preset-top { align-items: center; color: var(--accent); }
.preset.custom .preset-top .ic { width: 26px; height: 26px; }
.preset.custom .unit { color: var(--text); }

/* ---------- Kaarten & formulieren ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; margin-top: 14px; border: 1px solid var(--line); }
.card h2 { font-size: 17px; margin: 0 0 12px; }
.card h3 { font-size: 15px; margin: 16px 0 8px; }
.options { margin-top: 14px; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.opt-title { font-weight: 700; }
.quick { display: flex; gap: 8px; margin-top: 12px; }
.quick-btn {
  flex: 1; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 9px 0;
  font-weight: 700; font-size: 14px; color: var(--muted); transition: transform 120ms var(--ease-out);
}
.quick-btn:active { opacity: .7; color: var(--accent); }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
.field {
  width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px;
  padding: 12px 14px; outline: none; transition: border-color 140ms, box-shadow 140ms;
}
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.err { color: var(--danger); font-size: 14px; min-height: 0; margin-top: 8px; }
.err:empty { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 14px; padding: 14px 18px; font-weight: 700; font-size: 16px;
  background: var(--navy); color: #fff; width: 100%; text-decoration: none; margin-top: 14px;
  box-shadow: 0 6px 16px -8px rgba(18, 64, 88, .8);
  transition: transform 120ms var(--ease-out), opacity 120ms, background 120ms;
}
.btn:active { opacity: .78; }
.btn[disabled] { opacity: .55; }
.btn.secondary { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: var(--danger-soft); color: var(--danger); box-shadow: none; }
.btn.sm { padding: 9px 12px; font-size: 14px; border-radius: 11px; width: auto; margin-top: 0; }
.btn + .btn { margin-top: 10px; }
@media (prefers-color-scheme: dark) { .btn:not(.secondary):not(.ghost):not(.danger) { background: var(--navy-2); } }

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--muted); flex: 0 0 auto;
  transition: transform 120ms var(--ease-out), color 120ms, background 120ms;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.danger { border-color: transparent; background: transparent; }
.icon-btn.danger:active { color: var(--danger); background: var(--danger-soft); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { opacity: .92; }
  .preset:hover { border-color: var(--accent); }
  .chip:hover, .quick-btn:hover { border-color: var(--accent); }
  .icon-btn:hover { color: var(--text); }
  .icon-btn.danger:hover { color: var(--danger); }
  .tab:hover:not([aria-current]) { color: var(--text); }
  .code-main:hover .code { color: var(--accent); }
}

.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-2); flex: 0 0 auto; }
.stepper button { border: 0; background: none; width: 44px; height: 44px; font-size: 22px; color: var(--accent); }
.stepper button:active { background: var(--accent-soft); }
.stepper input { border: 0; background: none; width: 48px; text-align: center; font-weight: 800; padding: 0; outline: none; font-variant-numeric: tabular-nums; }

/* ---------- Login ---------- */
.auth { margin: auto; width: 100%; max-width: 420px; padding: calc(env(safe-area-inset-top, 0px) + 28px) 20px 28px; }
.auth-brand {
  background: #fff; border-radius: var(--r-lg); padding: 22px 22px 16px; margin-bottom: 22px;
  box-shadow: var(--shadow); border: 1px solid var(--line); position: relative; overflow: hidden;
}
.auth-brand::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--brushed); }
.auth-logo { width: 100%; max-width: 300px; margin: 0 auto; }
.auth-product {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px;
  color: #124058; font-weight: 800; letter-spacing: .02em;
}
.auth-product .ic { width: 18px; height: 18px; }
.auth h1 { text-align: center; margin: 0 0 4px; font-size: 24px; }
.auth p.lead { text-align: center; color: var(--muted); margin: 0 0 18px; }
.auth-foot { margin-top: 22px; }
.auth .card { margin-top: 0; }
.code-input { text-align: center; font-family: var(--mono); font-size: 28px; letter-spacing: 8px; }

/* ---------- Tabs in beheer ---------- */
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 4px; margin: 0 -16px 4px;
  scrollbar-width: none; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; scroll-snap-align: start;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 9px 15px; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 120ms var(--ease-out), border-color 120ms, background 120ms, color 120ms;
}
.chip .dot, .pick .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--site, var(--navy)); flex: 0 0 auto; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.chip:active { opacity: .7; }

/* ---------- Site kiezen ---------- */
.picklist { list-style: none; margin: 8px 0 0; padding: 0; }
.pick {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  border: 0; background: none; padding: 13px 8px; border-radius: 12px;
}
.pick .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick small { color: var(--muted); font-size: 13px; }
.pick[aria-pressed="true"] { background: var(--accent-soft); }
.pick[aria-pressed="true"] .ic { color: var(--accent); }
.pick:active { background: var(--accent-soft); }

/* ---------- Sheet ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 20; background: rgba(5, 15, 22, .45); overscroll-behavior: contain;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade 160ms var(--ease-out);
}
.sheet {
  width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  animation: rise 240ms var(--ease-out);
}
.sheet h2 { font-size: 20px; margin: 4px 0 6px; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; position: relative; cursor: grab; }
/* Groter raakvlak rond het streepje om te vegen of te tikken. */
.sheet .grab::before { content: ""; position: absolute; inset: -14px -60px; }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 26px; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .scrim, .sheet, .boot { animation: none; } }

/* ---------- Ticket met de code ---------- */
.ticket {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  background: var(--hero); border-radius: 22px; padding: 16px 18px 14px; margin-top: 4px;
  box-shadow: 0 18px 36px -18px var(--hero-shadow, rgba(18, 64, 88, .8));
}
.ticket-ribbon {
  position: absolute; z-index: -1; right: -70px; top: -50px; width: 230px; height: 150px;
  background: var(--brushed); transform: rotate(-30deg); border-radius: 28px; opacity: .85;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 50%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 50%);
}
.ticket-head { display: flex; align-items: center; gap: 10px; }
.ticket-mark { width: 34px; height: 34px; border-radius: 10px; background: #fff; }
.ticket-site { font-weight: 800; font-size: 15px; }
.ticket-ssid { display: flex; align-items: center; gap: 5px; font-size: 13px; color: rgba(255, 255, 255, .75); }
.ticket-ssid .ic { width: 14px; height: 14px; }
.ticket-code {
  font-family: var(--mono); font-weight: 800; font-size: clamp(34px, 11vw, 50px); letter-spacing: .04em;
  text-align: center; padding: 22px 0 18px; font-variant-numeric: tabular-nums;
  user-select: all; -webkit-user-select: all; text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.ticket-codes {
  font-family: var(--mono); font-size: 18px; font-weight: 700; display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px;
  padding: 16px 0 12px; max-height: 46dvh; overflow-y: auto; overscroll-behavior: contain;
}
.ticket-codes div { padding: 4px 0; user-select: all; -webkit-user-select: all; }
.ticket-perf {
  position: relative; height: 1px; margin: 0 -18px;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .45) 50%, transparent 50%);
  background-size: 12px 1px;
}
.ticket-perf::before, .ticket-perf::after {
  content: ""; position: absolute; top: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface);
}
.ticket-perf::before { left: -10px; }
.ticket-perf::after { right: -10px; }
.ticket-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 12px; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.ticket-foot span { display: inline-flex; align-items: center; gap: 6px; }
.ticket-foot .ic { width: 16px; height: 16px; }

.qr-box { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 4px 12px; }
.qr-box summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 0; font-weight: 600; cursor: pointer; }
.qr-box summary::-webkit-details-marker { display: none; }
.qr-box summary .ic-end { margin-left: auto; transition: transform 160ms var(--ease-out); color: var(--muted); }
.qr-box[open] summary .ic-end { transform: rotate(180deg); }
.qr { width: 200px; height: 200px; margin: 6px auto 4px; background: #fff; border-radius: 14px; padding: 10px; }
.qr svg, .qr img { width: 100%; height: 100%; display: block; }

.share .btn { margin-top: 14px; }
.acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.act {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: transform 120ms var(--ease-out), background 120ms;
}
.act .ic { color: var(--accent); width: 22px; height: 22px; }
.act:active { background: var(--accent-soft); }

/* ---------- Codes-lijst ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.toolbar .segmented { flex: 1; margin: 0; }
.segmented { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; border: 1px solid var(--line); }
.segmented button {
  flex: 1; border: 0; background: none; padding: 8px 6px; border-radius: 10px; font-weight: 700; color: var(--muted); font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg-count { font-size: 11px; font-weight: 800; background: var(--line); color: var(--muted); border-radius: 999px; padding: 1px 7px; }
.segmented button[aria-pressed="true"] .seg-count { background: var(--accent); color: var(--on-accent); }

.search-wrap { position: relative; margin-top: 10px; }
.search-wrap > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.search-wrap .field { padding-left: 42px; background: var(--surface); }
.field.search::-webkit-search-cancel-button { -webkit-appearance: none; }

.codes { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.code-row {
  display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 4px 6px 4px 4px; box-shadow: var(--shadow-sm);
}
.code-row.bad { opacity: .7; }
.code-main { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 10px 10px; border-radius: 12px; }
.code-row:has(.code-main:active) { background: var(--surface-2); }
.code-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.code { white-space: nowrap; font-family: var(--mono); font-weight: 800; font-size: 19px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.code-note { font-size: 14px; font-weight: 600; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.code-meta span { display: inline-flex; align-items: center; gap: 4px; }
.code-meta .ic { width: 14px; height: 14px; }

.badge {
  display: inline-flex; align-items: center; white-space: nowrap; font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

/* ---------- Lijsten in beheer ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
/* Knoppen naast elkaar in een lijstregel: zelfde hoogte en op één lijn. */
.list li > .btn, .list li > .btn + .btn { margin-top: 0; flex: none; }
.list .sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

/* ---------- Account ---------- */
.profile { display: flex; align-items: center; gap: 14px; padding: 8px 4px 4px; }
.profile h2 { margin: 0; font-size: 22px; }
.profile p { margin: 2px 0 0; }
details.inline { margin-top: 12px; }
details.inline summary { color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 0; }
details.inline .field { margin-top: 10px; }
.brand-foot { display: flex; justify-content: center; margin: 26px 0 6px; }
.brand-foot img { width: 170px; } /* logo zonder vlak erachter (de PNG is al doorzichtig) */

.empty { text-align: center; color: var(--muted); padding: 28px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty p { margin: 4px 0; }
.secret { font-family: var(--mono); background: var(--surface-2); padding: 10px 12px; border-radius: 10px; word-break: break-all; user-select: all; -webkit-user-select: all; }
.notice { background: var(--warn-soft); border-radius: 12px; padding: 12px; font-size: 14px; margin-bottom: 12px; }
details summary { cursor: pointer; font-weight: 600; padding: 6px 0; }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: #0e2230; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px;
  max-width: calc(100% - 32px); text-align: center; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); color: #fff; }
@media (prefers-color-scheme: dark) { .toast { background: #e8eef2; color: #0e2230; } .toast.bad { background: #b4232f; color: #fff; } }

.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Huisstijl per site ---------- */
.hero-logo { height: 34px; width: auto; max-width: 96px; object-fit: contain; background: #fff; border-radius: 9px; padding: 3px; flex: none; }
.ticket-logo { height: 38px; width: auto; max-width: 110px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; flex: none; }
.ticket-welcome { margin-top: 10px; font-size: 14px; color: rgba(255, 255, 255, .85); }
.ticket-contact { margin-top: 10px; font-size: 12.5px; line-height: 1.45; color: rgba(255, 255, 255, .75); text-align: center; }
.logo-preview {
  width: 96px; height: 56px; flex: none; display: grid; place-items: center; overflow: hidden;
  border: 1px dashed var(--line); border-radius: var(--r-sm); background: var(--surface);
}
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- Meer lucht ---------- */
.presets { gap: 12px; }
.presets + .btn { margin-top: 12px; }
.codes { gap: 10px; }
.card { margin-top: 16px; }
.section-title { margin-top: 26px; }
.sheet .section-title { margin-top: 22px; }
.sheet .label { margin-top: 14px; }

/* ---------- Meerdere codes selecteren ---------- */
.toolbar .btn.sm { flex: none; }
.toolbar .btn.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.pick-box {
  width: 24px; height: 24px; flex: none; margin-left: 8px; border-radius: 7px; border: 2px solid var(--line);
  display: grid; place-items: center; color: var(--on-accent);
}
.pick-box .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.code-row.picked { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; opacity: 1; }
.code-row.picked .pick-box { background: var(--accent); border-color: var(--accent); }
.select-bar {
  position: sticky; z-index: 4; bottom: calc(108px + env(safe-area-inset-bottom, 0px)); margin-top: 14px;
  display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; font-size: 14px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
}
.select-bar .btn.sm { flex: none; }
.select-bar > span { margin-right: auto; }
/* Zoekveld met selecteer- en vernieuwknop op één rij */
.search-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.search-row .search-wrap { flex: 1; min-width: 0; margin-top: 0; }
.search-row .btn.sm { flex: none; min-height: 48px; margin-top: 0; }
.search-row .btn.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.segmented button { min-width: 0; }
@media (max-width: 599px) {
  .search-row .sel-label { display: none; }
  .search-row .btn.sm { width: 48px; padding: 0; justify-content: center; }
  .search-row .btn.sm .ic { margin: 0; }
  .search-row .btn.sm.sort-btn { width: auto; padding: 0 10px; gap: 4px; }
  .search-row .sort-btn .ic { width: 16px; height: 16px; }
}
.sort-short { display: none; font-size: 13px; }
@media (max-width: 599px) { .sort-short { display: inline; } }

/* Beheer-tabbladen: raster in plaats van een schuifbalk */
.admin-tabs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  overflow: visible; padding: 0; margin: 4px 0 8px;
}
.admin-tabs .chip { justify-content: center; padding: 11px 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 700px) {
  .admin-tabs { display: flex; flex-wrap: wrap; }
  .admin-tabs .chip { padding: 9px 18px; }
}

/* ---------- Pc: neutrale, bredere indeling met zijbalk ---------- */
@media (min-width: 1000px) {
  .top { padding: 14px 32px; }
  .brand-mark { width: 40px; height: 40px; }
  main { max-width: 1280px; padding: 32px 40px 16px 296px; }
  .site-foot { max-width: 1280px; padding: 8px 40px 32px 296px; }
  .tabs {
    left: max(24px, calc(50vw - 616px)); right: auto; top: 96px; bottom: auto; width: 232px; max-width: none; margin: 0;
    flex-direction: column; gap: 2px; padding: 8px; border-radius: 18px;
    background: var(--surface); box-shadow: var(--shadow-sm); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .tab { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 14px; font-size: 15px; border-radius: 12px; }
  .tab .ic { width: 20px; height: 20px; }
  .tab:not([aria-current="page"]):hover { background: var(--surface-2); color: var(--text); }
  .page-title { margin-top: 0; }
  .hero { padding: 24px 28px 22px; }
  .hero-name { font-size: 28px; max-width: 70%; }
  .presets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .codes > .card.empty { grid-column: 1 / -1; }
  .select-bar { bottom: 24px; }
  .view-account { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; align-content: start; align-items: start; }
  .view-account > .profile, .view-account > .brand-foot { grid-column: 1 / -1; }
  .preset:hover { background: var(--surface-2); }
  /* Codes en personen: de hele kaart licht op, niet enkel het vak met de tekst. */
  .code-row { transition: background 120ms, border-color 120ms; }
  .code-row:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
}
@media (min-width: 1500px) {
  .codes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Deurtoegang (UniFi Access) ---------- */
.view-access > .btn { margin-top: 12px; }
.person-name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row-go { color: var(--muted); padding-right: 8px; display: inline-flex; }
.row-go .ic { width: 18px; height: 18px; }
.pin-big {
  font-family: var(--mono); font-weight: 800; font-size: clamp(36px, 12vw, 52px); letter-spacing: .18em; text-align: center;
  padding: 18px 8px; margin: 10px 0 4px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line);
  color: var(--accent); user-select: all; -webkit-user-select: all; font-variant-numeric: tabular-nums;
}
.enroll { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.enroll-wait { display: flex; align-items: center; gap: 10px; font-weight: 600; flex: 1; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0 0 6px; padding: 0; }
.row.end { justify-content: flex-end; margin-top: 8px; }
.row.end > * { flex: none; }
.mono { font-family: var(--mono); }
.secret.small { font-size: 12px; }
.sheet .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sheet input[type="datetime-local"] { min-width: 0; width: 100%; }
@media (max-width: 480px) { .sheet .grid2.dates { grid-template-columns: minmax(0, 1fr); gap: 0; } }
@media (min-width: 1000px) {
  .view-access > .btn { width: auto; padding-left: 22px; padding-right: 22px; }
}

/* ---------- Afdrukbare tickets ---------- */
.print-area { display: none; }
@media print {
  @page { size: A4; margin: 10mm; }
  body.printing > *:not(.print-area) { display: none !important; }
  html:has(body.printing), body.printing { background: #fff !important; }
  body.printing { margin: 0; padding: 0; min-height: 0; position: static !important; top: auto !important; }
  body.printing .print-area {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6mm; width: 100%; box-sizing: border-box; padding: 0 1mm; color: #0e2230;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  }
  .print-ticket {
    box-sizing: border-box; min-width: 0; break-inside: avoid; border: 1.5px dashed #9aa7b1; border-radius: 4mm; padding: 5mm;
    display: flex; flex-direction: column; gap: 3mm; min-height: 60mm;
  }
  .pt-head { display: flex; align-items: center; gap: 3mm; }
  .pt-logo { height: 13mm; width: auto; max-width: 35mm; object-fit: contain; }
  .pt-name { font-weight: 800; font-size: 13pt; }
  .pt-welcome { font-size: 9.5pt; color: #4a5a66; }
  .pt-body { display: flex; align-items: center; gap: 4mm; }
  .pt-body .grow { flex: 1; }
  .pt-body img { width: 26mm; height: 26mm; }
  .pt-label { font-size: 8pt; text-transform: uppercase; letter-spacing: .08em; color: #61717d; margin-top: 1.5mm; }
  .pt-ssid { font-weight: 700; font-size: 12pt; }
  .pt-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; font-size: 19pt; letter-spacing: .03em; white-space: nowrap; }
  .pt-body img { flex: none; }
  .pt-meta { font-size: 9pt; color: #4a5a66; margin-top: 1mm; }
  .pt-contact { font-size: 8.5pt; color: #4a5a66; border-top: 1px solid #dde3e8; padding-top: 2mm; margin-top: auto; }
}

/* ---------- Kleurkiezer (Beheer › Sites) ---------- */
.color-picker { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  position: relative; width: 40px; height: 40px; border-radius: 50%; padding: 0; cursor: pointer;
  background: var(--site, transparent); border: 1px solid rgba(0, 0, 0, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
  display: inline-grid; place-items: center; color: var(--muted);
}
.swatch[aria-pressed="true"], .swatch.own.on { outline: 3px solid var(--text); outline-offset: 3px; }
.swatch.own { border: 2px dashed var(--line); overflow: hidden; }
.swatch.own.on { border-style: solid; color: transparent; }
.swatch.own .ic { width: 18px; height: 18px; }
.swatch.own input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.color-hex { font: 600 13px var(--mono); color: var(--muted); }
.color-part { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.color-part-title { font-weight: 700; margin-bottom: 8px; }
.color-part .chips.wrap { margin-bottom: 4px; }
/* Knoppen naast elkaar in een rij: zelfde hoogte, geen extra marge bovenaan. */
.row > .btn, .row > .btn + .btn { margin-top: 0; }
.logo-row { align-items: stretch; }
.logo-row .btn { min-height: 56px; }
.color-part > .muted.small { margin: 12px 0 6px; }
/* Banner met het volledige logo rechts (zonder vlak erachter) */
.hero.with-logo { display: flex; align-items: center; gap: 16px; }
.hero-main { flex: 1; min-width: 0; }
.hero.with-logo .hero-name { max-width: none; }
.hero-logo-big {
  flex: none; display: grid; place-items: center; max-width: 42%;
}
.hero-logo-big img { display: block; max-height: 84px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
@media (max-width: 599px) {
  .hero.with-logo { gap: 12px; }
  .hero-logo-big { max-width: 40%; }
  .hero-logo-big img { max-height: 58px; }
}
/* Het logo linksboven is een knop (naar het eerste tabblad). */
button.brand { background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
button.brand:active { opacity: .7; }
.tab span { white-space: nowrap; }
/* Hulp bij de labels van de codes */
.help-link {
  display: inline-flex; align-items: center; gap: 6px; margin: 8px 2px 0; padding: 4px 2px;
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.help-link .ic { width: 16px; height: 16px; }
.help-link:active { opacity: .7; }
.help-list li { align-items: flex-start; }
.help-list li.on { background: var(--accent-soft); border-radius: 12px; padding-left: 10px; padding-right: 10px; }
.help-text { margin: 6px 0 0; font-size: 14px; color: var(--text); line-height: 1.45; }
.badge[title] { cursor: help; }
/* Persoonskaart bij Toegang: de hele kaart is de knop (geen vakje erin, geen pijltje). */
.code-row.person { padding: 0; overflow: hidden; }
.person-main {
  display: flex; align-items: center; gap: 14px; width: 100%; color: inherit; cursor: pointer;
  padding: 14px 16px; border-radius: 0;
}
.person-main .grow { flex: 1; min-width: 0; }
.person-main .code-meta { margin-top: 6px; }
.person-avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 14px; letter-spacing: .02em;
}
.code-row.person.expired .person-avatar { background: var(--danger-soft); color: var(--danger); }
/* Bevestigingsvenster */
.confirm-box h2 { margin-bottom: 4px; }
.confirm-text { font-size: 16px; line-height: 1.45; margin: 6px 0 4px; color: var(--text); }
.btn.danger.solid { background: #c62828; color: #fff; box-shadow: none; }

/* ---------- Designupdate okt 2026: rustiger banner, strakkere kaarten, uitgelijnde kop ---------- */
/* Toetsenbord: duidelijke focusring (niet bij tikken of klikken). */
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.field:focus-visible { outline: none; }

/* Banner: het zilveren lint subtieler, zodat naam en SSID de aandacht krijgen. */
.hero-ribbon, .ticket-ribbon { opacity: .5; }
@media (prefers-color-scheme: dark) { .hero-ribbon, .ticket-ribbon { opacity: .28; } }
.hero { box-shadow: 0 12px 28px -16px var(--hero-shadow, rgba(18, 64, 88, .7)); }
.hero::before {
  /* zachte glans bovenaan, als op geborsteld metaal */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; z-index: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
}
.hero-label { color: rgba(255, 255, 255, .62); font-size: 11.5px; }
.hero-ssid { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); font-size: 13.5px; }

/* Formules: geen half afgesneden zilverstreep meer, lichtere schaduw, "Op maat" over de volle breedte als hij alleen staat. */
.preset { box-shadow: var(--shadow-sm); min-height: 96px; }
.preset::before { display: none; }
.preset .num { font-variant-numeric: tabular-nums; }
.presets > .preset.custom:nth-child(odd) {
  grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 16px;
}
.presets > .preset.custom:nth-child(odd) .meta { margin-left: auto; }
.preset.custom { border-width: 1.5px; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

/* "Formules beheren": rustige tekstknop in plaats van een tweede kaderknop. */
.btn.presets-edit {
  background: none; border: 0; box-shadow: none; color: var(--muted); padding: 8px 4px; margin-top: 8px; font-size: 14px;
}
.btn.presets-edit .ic { width: 16px; height: 16px; }

/* Bewerken-knop in lijsten: vierkant icoon in plaats van een ✎-teken. */
.btn.edit-btn { width: 40px; height: 40px; padding: 0; color: var(--muted); }
.btn.edit-btn .ic { width: 18px; height: 18px; }
.list li .btn.sm { min-height: 40px; }

/* Kaarten: één consistente schaduw, iets meer rust in de titels. */
.card { box-shadow: var(--shadow-sm); }
.card h2 { font-size: 16px; letter-spacing: -.005em; }
.section-title { font-size: 12px; letter-spacing: .12em; }

/* Codes: code-rij iets ruimer, badge en vuilbak netjes uitgelijnd. */
.code-row { padding: 4px 6px 4px 4px; }
.code-line .badge { flex: none; }

/* Onderste tabbalk: actieve tab iets zachter, labels beter leesbaar. */
@media (max-width: 999px) { .tab { font-size: 12px; } }
.tab[aria-current="page"] { box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--accent) 80%, transparent); }

/* Inlogscherm: zachte gloed in de huisstijl achter het logo. */
.app:has(> .auth) {
  background:
    radial-gradient(120% 60% at 50% -10%, color-mix(in srgb, var(--navy) 14%, transparent), transparent 70%),
    var(--bg);
}

/* Pc: kop uitgelijnd met zijbalk en inhoud, zijbalk netjes onder de kop. */
@media (min-width: 1000px) {
  .top { padding: 14px max(24px, calc(50vw - 616px)); }
  .tabs { top: 92px; }
  .presets > .preset.custom:nth-child(odd) { grid-column: auto / span 4; }
  .preset { transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), border-color 140ms; }
  .preset:hover { transform: translateY(-2px); box-shadow: var(--shadow); background: var(--surface); }
  .code-row:hover { box-shadow: var(--shadow); }
  /* Hoofdknoppen in kaarten niet over 900px uitrekken. */
  .view-admin .card > .btn:not(.sm), .view-account .card > .btn:not(.sm) { width: auto; min-width: 240px; padding-left: 24px; padding-right: 24px; }
}
@media (prefers-reduced-motion: reduce) { .preset:hover { transform: none; } }

/* ---------- Beheer-tabbladen: één rustige balk (zoals de filter bij Wifi codes) i.p.v. losse pillen ---------- */
.admin-tabs {
  display: flex; gap: 2px; padding: 4px; margin: 4px 0 10px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  flex: none; border: 0; background: none; color: var(--muted);
  padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background 140ms var(--ease-out), color 140ms, box-shadow 140ms;
}
.admin-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.admin-tab[aria-selected="true"]::after {
  content: ""; display: block; height: 2px; margin: 5px auto -4px; width: 18px; border-radius: 2px; background: var(--accent);
}
.admin-tab:active { opacity: .7; }
@media (hover: hover) and (pointer: fine) { .admin-tab:not([aria-selected="true"]):hover { color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); } }
@media (min-width: 700px) {
  .admin-tabs { display: inline-flex; max-width: 100%; -webkit-mask-image: none; mask-image: none; }
  .admin-tab { padding: 9px 18px; }
}
.admin-tabs.at-end { -webkit-mask-image: none; mask-image: none; }

/* ---------- Schakelbalken (Actief/Verlopen/Alles, Personen/Bezoekers, Beheer-tabbladen) ----------
   De balk zelf iets dieper dan de pagina, het gekozen vak in de kleur van een kaart: zo licht het
   gekozen vak op in licht én donker thema (eerder werd het in donker een donker gat). */
.segmented, .admin-tabs {
  background: color-mix(in srgb, var(--bg) 65%, var(--surface-2));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
}
.segmented button { position: relative; padding: 9px 8px; transition: background 140ms var(--ease-out), color 140ms, box-shadow 140ms; }
.segmented button[aria-pressed="true"], .admin-tab[aria-selected="true"] {
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent);
}
/* Klein streepje in de sitekleur onder het gekozen vak, net als bij de Beheer-tabbladen. */
.segmented button[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 18px; height: 2px; margin-left: -9px; border-radius: 2px; background: var(--accent);
}
.seg-count { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); font-variant-numeric: tabular-nums; }
.segmented button[aria-pressed="true"] .seg-count { background: var(--accent); color: var(--on-accent); }
@media (hover: hover) and (pointer: fine) {
  .segmented button:not([aria-pressed="true"]):hover { color: var(--text); background: color-mix(in srgb, var(--surface) 45%, transparent); }
}
/* Op de pc niet over de volle breedte uitrekken. */
@media (min-width: 1000px) {
  .toolbar .segmented { flex: 0 1 480px; }
}
/* Gsm: alle Beheer-tabbladen in één oogopslag (twee rijen), niet meer opzij schuiven. */
@media (max-width: 699px) {
  .admin-tabs { flex-wrap: wrap; overflow: visible; gap: 4px; -webkit-mask-image: none; mask-image: none; }
  .admin-tab { flex: 1 1 auto; padding: 10px 10px; font-size: 14px; text-align: center; }
}
/* Donker thema: gekozen vak duidelijk in de sitekleur getint, met witte tekst. */
@media (prefers-color-scheme: dark) {
  .segmented button[aria-pressed="true"], .admin-tab[aria-selected="true"] {
    background: color-mix(in srgb, var(--accent) 22%, var(--surface));
    color: #fff;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 2px 8px -4px rgba(0, 0, 0, .5);
  }
}

/* ---------- Menu (zijbalk op pc, tabbalk op gsm): geen fel gevuld blok meer ----------
   Gekozen item: zachte tint in de sitekleur, icoon en tekst in de sitekleur, en op pc een streepje links. */
.tab[aria-current="page"] {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); box-shadow: none;
}
.tab[aria-current="page"] span { color: var(--text); }
@media (prefers-color-scheme: dark) {
  .tab[aria-current="page"] { background: color-mix(in srgb, var(--accent) 18%, transparent); }
  .tab[aria-current="page"] span { color: #fff; }
}
.tab .ic { transition: transform 160ms var(--ease-out); }
.tab[aria-current="page"] .ic { stroke-width: 2.1; }

@media (min-width: 1000px) {
  /* Zijbalk: geen zwevende kaart, maar een rustige kolom met een lijn rechts, over de volle hoogte. */
  .tabs {
    top: 69px; bottom: 0; width: 248px; padding: 28px 16px 24px 0; gap: 4px; border-radius: 0;
    background: none; border: 0; border-right: 1px solid var(--line); box-shadow: none;
  }
  .tabs::before {
    content: "Menu"; display: block; padding: 0 14px 10px; font-size: 11.5px; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  }
  .tab {
    position: relative; flex: none; gap: 12px; padding: 10px 14px; border-radius: 10px;
    font-size: 15px; font-weight: 600; color: var(--muted);
  }
  .tab .ic { width: 20px; height: 20px; }
  .tab span { color: inherit; }
  .tab:not([aria-current="page"]):hover { background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); }
  .tab:not([aria-current="page"]):hover .ic { transform: translateX(1px); }
  .tab[aria-current="page"]::before {
    content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent);
  }
  .tab[aria-current="page"] { font-weight: 700; }
}
@media (max-width: 999px) {
  /* Gsm: gekozen tab als zachte tint i.p.v. een volle knop. */
  .tab { position: relative; }
  .tab[aria-current="page"] span { font-weight: 700; }
}
@media (prefers-reduced-motion: reduce) { .tab .ic { transition: none; } }

/* ---------- Deuren op afstand ---------- */
.doors { display: grid; gap: 14px; }
.door-card { display: grid; gap: 12px; }
.door-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.door-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.door-title strong { overflow-wrap: anywhere; }
.door-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.door-cam { position: relative; aspect-ratio: 16 / 9; background: #0b1620; border-radius: 12px; overflow: hidden; }
.door-img, .door-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0b1620; }
.door-cam-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; min-height: 32px; }
.door-note { margin: 0; }
.door-open { width: 100%; min-height: 52px; font-size: 1.05rem; }
.door-pick { display: grid; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line, #e3e8ec); }
.door-pick:last-of-type { border-bottom: 0; }
@media (min-width: 1100px) {
  .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .doors > p, .doors > .btn { grid-column: 1 / -1; }
}
.row.wrap { flex-wrap: wrap; gap: 8px; }
