/* ═══════════════════════════════════════════════════════════════════
   SinterLootjes — stijlen
   Auteur: Erwin Biharie
   ═══════════════════════════════════════════════════════════════════ */

@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/nunito-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url('/assets/fonts/nunito-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 900; font-display: swap; src: url('/assets/fonts/nunito-latin-900-normal.woff2') format('woff2'); }

:root {
  --nacht: #17102F;
  --violet: #281747;
  --paars: #3a2066;
  --goud: #F4C66A;
  --goud-donker: #c9952f;
  --ivoor: #FFF4DF;
  --rood: #C82348;
  --roze: #EB3571;
  --wit: #FFFFFF;
  --inkt: #1d1530;
  --grijs: #6b6280;
  --groen: #1f9d55;
  --oranje: #e0a21b;
  --rand: rgba(255, 244, 223, .16);
  --radius: 16px;
  --veilig-onder: env(safe-area-inset-bottom, 0px);
  --veilig-boven: env(safe-area-inset-top, 0px);
  --font: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--veilig-boven); }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--wit);
  background: var(--nacht);
  background-image:
    radial-gradient(ellipse 120% 60% at 50% 0%, #3b1f6e 0%, rgba(59, 31, 110, 0) 70%),
    linear-gradient(180deg, #1a1238 0%, #241544 55%, #2e1850 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
/* Sterrenhemel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 8%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 22%, #fff7 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 46% 6%, #fffa 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 18%, #fff6 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 82% 9%, #ffe9b8cc 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 30%, #fff6 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 7% 36%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 37% 40%, #fff5 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 72% 44%, #fff7 50%, transparent 51%);
}
/* Stadssilhouet onderaan */
.skyline {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 44vh;
  max-height: 460px;
  z-index: 0;
  pointer-events: none;
  background: url('/assets/stad.webp') center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 45%);
  opacity: .95;
}
.skyline::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23, 16, 47, 0) 30%, rgba(23, 16, 47, .35) 100%);
}
body.beheer-modus .skyline { display: none; }

#app { position: relative; z-index: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--goud); }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--goud); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ═══ Scherm (deelnemer) ═══════════════════════════════════════════ */
.scherm {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(var(--veilig-boven) + 22px) 20px calc(var(--veilig-onder) + 32px);
  display: flex;
  flex-direction: column;
  position: relative;
}
.scherm.met-tabbar { padding-bottom: calc(var(--veilig-onder) + 112px); }
.scherm.midden { justify-content: center; }
.stapel { display: flex; flex-direction: column; gap: 14px; }
.stapel-lg { display: flex; flex-direction: column; gap: 22px; }
.gecentreerd { text-align: center; align-items: center; }

.titel { font-size: 30px; line-height: 1.12; font-weight: 900; margin: 0; letter-spacing: -.01em; text-align: center; text-wrap: balance; }
.titel-md { font-size: 24px; line-height: 1.15; font-weight: 900; margin: 0; }
.titel-rij { display: flex; align-items: center; justify-content: center; gap: 10px; }
.sub { margin: 0; color: rgba(255, 244, 223, .88); font-size: 16px; line-height: 1.45; text-align: center; font-weight: 600; text-wrap: pretty; }
.klein { font-size: 14px; color: rgba(255, 244, 223, .75); font-weight: 600; line-height: 1.4; }
.goud-tekst { color: var(--goud); }

.lijn-icoon { width: 56px; height: 56px; color: var(--wit); margin: 0 auto; display: block; }
.lijn-icoon svg.i { width: 100%; height: 100%; stroke-width: 1.6; }
.goud-icoon { display: inline-block; object-fit: contain; flex: none; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ═══ Knoppen ══════════════════════════════════════════════════════ */
.knop {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 0 22px;
  border-radius: 16px; border: 0; cursor: pointer;
  font: 800 19px/1 var(--font); color: var(--wit); text-decoration: none;
  transition: transform .12s ease, filter .12s ease, opacity .12s;
}
.knop:active { transform: scale(.98); }
.knop[disabled] { opacity: .6; cursor: default; }
.knop-rood {
  background: linear-gradient(180deg, #e33c60 0%, #c82348 52%, #a71a3b 100%);
  box-shadow: 0 10px 26px rgba(200, 35, 72, .45), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(0, 0, 0, .15);
}
.knop-rood:hover { filter: brightness(1.06); }
.knop-rand {
  background: rgba(23, 16, 47, .35);
  border: 1.6px solid rgba(255, 244, 223, .78);
  min-height: 48px; font-size: 16px; font-weight: 700;
}
.knop-goud { background: rgba(23, 16, 47, .35); border: 1.6px solid var(--goud); color: var(--wit); min-height: 50px; font-size: 16px; font-weight: 800; }
.knop-paars {
  background: linear-gradient(180deg, #8d3fbf, #6a2aa3);
  border: 1.5px solid rgba(235, 160, 255, .7);
  min-height: 46px; font-size: 15px; font-weight: 800;
  box-shadow: 0 6px 18px rgba(106, 42, 163, .4);
}
.knop-licht { background: #f3eefc; color: var(--paars); min-height: 42px; font-size: 15px; border-radius: 12px; }
.knop-gevaar { background: #fff0f3; color: #b0173b; border: 1.5px solid #f2b8c6; min-height: 44px; font-size: 15px; border-radius: 12px; }
.knop-klein { min-height: 38px; font-size: 14px; padding: 0 14px; border-radius: 11px; width: auto; }
.knop-auto { width: auto; }
.tekstknop { background: none; border: 0; color: rgba(255, 244, 223, .85); font: 700 15px var(--font); padding: 10px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.icoonknop {
  width: 40px; height: 40px; border-radius: 12px; border: 0; cursor: pointer;
  display: inline-grid; place-items: center; background: transparent; color: inherit;
}
.icoonknop:hover { background: rgba(0, 0, 0, .05); }
.terug {
  position: absolute; left: 12px; top: calc(var(--veilig-boven) + 16px);
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  color: var(--wit); background: transparent; border: 0; cursor: pointer;
}
.terug svg { width: 26px; height: 26px; }
.spinner { width: 20px; height: 20px; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: draai .8s linear infinite; }
@keyframes draai { to { transform: rotate(360deg); } }

/* ═══ Formulieren ══════════════════════════════════════════════════ */
.veld { display: flex; flex-direction: column; gap: 7px; }
.veld > label, .veld > .label { font-size: 15px; font-weight: 800; color: var(--ivoor); }
.veld .hint { font-size: 13px; color: rgba(255, 244, 223, .7); font-weight: 600; line-height: 1.35; }
.invoer, .keuze, textarea.invoer {
  width: 100%; min-height: 54px; padding: 0 16px;
  border-radius: 14px; border: 2px solid transparent;
  background: var(--wit); color: var(--inkt);
  font: 700 17px var(--font);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
textarea.invoer { padding: 14px 16px; min-height: 92px; resize: vertical; line-height: 1.4; }
.invoer:focus, .keuze:focus { outline: none; border-color: var(--goud); }
.invoer::placeholder { color: #9a92ad; font-weight: 600; }
.keuze-wrap { position: relative; }
.keuze-wrap .keuze { appearance: none; -webkit-appearance: none; padding-left: 52px; padding-right: 46px; font-size: 19px; }
.keuze-wrap .voor, .keuze-wrap .na { position: absolute; top: 50%; transform: translateY(-50%); color: var(--inkt); pointer-events: none; }
.keuze-wrap .voor { left: 16px; }
.keuze-wrap .na { right: 16px; }
.keuze-wrap svg { width: 24px; height: 24px; }
.code-invoer { text-align: center; font-size: 30px; letter-spacing: .32em; text-transform: uppercase; font-weight: 900; min-height: 66px; padding-left: .32em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-keuze { position: relative; }
.chip-keuze input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-keuze span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.6px solid rgba(255, 244, 223, .5); font-weight: 800; font-size: 14px; color: var(--ivoor);
}
.chip-keuze input:checked + span { background: var(--goud); color: var(--inkt); border-color: var(--goud); }
.chip-keuze input:focus-visible + span { outline: 3px solid var(--goud); outline-offset: 2px; }
.melding {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 14px; font-weight: 700; font-size: 14px; line-height: 1.4;
  background: rgba(244, 198, 106, .14); border: 1.5px solid rgba(244, 198, 106, .55); color: var(--ivoor);
}
.melding svg { flex: none; margin-top: 1px; }
.melding.fout { background: rgba(200, 35, 72, .18); border-color: rgba(235, 53, 113, .7); }
.melding.licht { background: #fff6e3; color: #6b4a07; border-color: #f2d48f; }
.melding.licht.fout { background: #fff0f3; color: #8d1530; border-color: #f2b8c6; }

/* ═══ Welkom ═══════════════════════════════════════════════════════ */
.maan {
  position: absolute; top: calc(var(--veilig-boven) + 34px); left: 26px;
  width: 54px; height: 54px; border-radius: 50%;
  box-shadow: -12px 6px 0 0 #ffe3a3; transform: rotate(-12deg);
  filter: drop-shadow(0 0 14px rgba(255, 220, 150, .8));
}
.welkom-logo { width: 100%; max-width: 360px; margin: 10px auto 0; display: block; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); }
.welkom-cadeau { width: 78%; max-width: 320px; margin: -6px auto -18px; display: block; filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .45)); }
.hoek-cadeaus { position: fixed; right: max(0px, calc(50% - 250px)); bottom: calc(var(--veilig-onder) - 8px); width: min(46vw, 210px); z-index: 0; pointer-events: none; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }

/* ═══ Stappen ══════════════════════════════════════════════════════ */
.stappen { display: flex; align-items: center; justify-content: center; gap: 0; margin: 2px 0 4px; }
.stap { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 244, 223, .8); display: grid; place-items: center; }
.stap.klaar { border-color: var(--goud); color: var(--goud); }
.stap.klaar svg { width: 13px; height: 13px; stroke-width: 3.5; }
.stap.nu { box-shadow: 0 0 0 4px rgba(255, 255, 255, .12); }
.stap-lijn { width: 34px; height: 2px; background: rgba(255, 244, 223, .7); }

/* ═══ Witte kaartlijsten (cadeaus) ═════════════════════════════════ */
.lijst {
  background: var(--wit); color: var(--inkt);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .32);
}
.wens {
  display: grid; grid-template-columns: 66px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 12px 12px 12px; border-bottom: 1px solid #eee8f3; position: relative;
}
.wens:last-child { border-bottom: 0; }
.wens-foto { width: 66px; height: 66px; border-radius: 12px; object-fit: contain; background: #f7f3ec; display: grid; place-items: center; overflow: hidden; }
.wens-foto img { width: 100%; height: 100%; object-fit: contain; }
.wens-foto .goud-icoon { width: 40px; height: 40px; }
.wens-midden { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.wens-titel { font-weight: 800; font-size: 15.5px; line-height: 1.18; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--inkt); text-decoration: none; }
.wens-rij { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prijs { font-weight: 800; font-size: 15.5px; color: var(--inkt); }
.winkel-label {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 7px;
  background: var(--violet); color: var(--wit); font-size: 12px; font-weight: 900; text-decoration: none;
}
.winkel-label svg { width: 13px; height: 13px; }
.winkel-label.licht { background: var(--wit); color: var(--violet); height: 28px; font-size: 13px; padding: 0 10px; }
.wens-noot { font-size: 13px; color: var(--grijs); font-weight: 700; line-height: 1.3; }
.prio { display: inline-flex; height: 22px; align-items: center; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 900; background: #fff1d6; color: #8a5a00; }
.prio.heel_graag { background: #ffe1e9; color: #a3163a; }
.prio.extra { background: #efeaff; color: #4b3596; }
.boven-budget { color: #b0173b; font-size: 12px; font-weight: 800; display: inline-flex; gap: 4px; align-items: center; }
.boven-budget svg { width: 14px; height: 14px; }
.wens-acties { display: flex; flex-direction: column; gap: 2px; align-self: start; }
.wens-acties .icoonknop { color: #c4213f; width: 38px; height: 38px; }
.wens-acties .icoonknop.neutraal { color: #6a5a8c; }
.wens-acties svg { width: 21px; height: 21px; }
.wens-klikbaar { cursor: pointer; }
.leeg-lijst { padding: 22px 18px; text-align: center; color: var(--grijs); font-weight: 700; font-size: 15px; line-height: 1.45; }

/* ═══ Lootjeskaart ═════════════════════════════════════════════════ */
.lot-kaart {
  background: linear-gradient(180deg, #fffaf0 0%, #fdeec8 100%);
  border: 3px solid var(--goud);
  border-radius: 24px;
  padding: 26px 20px 24px;
  color: var(--inkt); text-align: center;
  box-shadow: 0 0 0 5px rgba(244, 198, 106, .22), 0 0 46px rgba(244, 198, 106, .5), 0 18px 40px rgba(0, 0, 0, .35);
}
.lot-avatar {
  width: 66px; height: 66px; margin: -60px auto 10px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #4a2c7a, #2a1748); border: 3px solid var(--goud); color: var(--ivoor);
  box-shadow: 0 0 18px rgba(244, 198, 106, .7);
}
.lot-avatar svg { width: 36px; height: 36px; stroke-width: 2.2; }
.lot-kaart.met-avatar { margin-top: 34px; padding-top: 18px; }
.lot-label { font-size: 17px; font-weight: 800; color: #3a2d4f; }
.lot-naam { font-size: 46px; line-height: 1.05; font-weight: 900; margin-top: 4px; word-break: break-word; }
.onthul-kop { position: relative; height: 160px; display: grid; place-items: center; }
.onthul-kop .stralen {
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 120, .32) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 68%);
  mask-image: radial-gradient(circle, #000 20%, transparent 68%);
  animation: draai 30s linear infinite;
}
.onthul-kop img { width: 170px; position: relative; filter: drop-shadow(0 0 22px rgba(255, 200, 90, .7)); }

/* Trek-animatie */
.trek-podium { display: grid; place-items: center; min-height: 320px; position: relative; }
.trek-cadeau { width: 240px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .5)); }
.trek-cadeau.schud { animation: schud .55s ease-in-out infinite; }
.trek-cadeau.open { animation: openBarst .7s cubic-bezier(.2, .8, .2, 1) forwards; }
.trek-gloed { position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 110, .55), transparent 65%); opacity: .7; animation: puls 1.4s ease-in-out infinite; }
@keyframes schud { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-5deg) translateY(-2px); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-3deg) translateY(-3px); } 80% { transform: rotate(3deg); } }
@keyframes openBarst { 0% { transform: scale(1); opacity: 1; } 40% { transform: scale(1.18); } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes puls { 0%, 100% { transform: scale(.9); opacity: .5; } 50% { transform: scale(1.08); opacity: .9; } }
.verschijn { animation: verschijn .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes verschijn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ═══ Dashboard (deelnemer) ════════════════════════════════════════ */
.kop-welkom { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.kop-welkom img { width: 52px; }
.kop-welkom h1 { margin: 0; font-size: 26px; font-weight: 900; line-height: 1.1; }
.kop-welkom p { margin: 2px 0 0; font-size: 15px; font-weight: 700; color: var(--goud); }
.info-rij { display: flex; gap: 8px; flex-wrap: wrap; }
.info-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 244, 223, .1); border: 1px solid var(--rand); font-size: 14px; font-weight: 800; color: var(--ivoor);
}
.info-chip svg { width: 16px; height: 16px; color: var(--goud); }
.sectie-kop { display: flex; align-items: center; gap: 10px; margin: 6px 2px 0; }
.sectie-kop h2 { margin: 0; font-size: 20px; font-weight: 900; flex: 1; }
.sectie-kop img { width: 34px; height: 34px; }
.sectie-kop a, .sectie-kop button.tekstknop { font-size: 14px; padding: 4px; }
.kaart-donker {
  background: linear-gradient(180deg, rgba(64, 38, 112, .72), rgba(40, 23, 71, .82));
  border: 1px solid rgba(244, 198, 106, .3); border-radius: 20px; padding: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}
.kaart-donker.compact { padding: 14px 16px; }
.bericht-kaart { display: flex; gap: 12px; align-items: flex-start; }
.bericht-kaart img { width: 38px; height: 38px; }
.bericht-kaart p { margin: 3px 0 0; font-weight: 700; line-height: 1.45; color: var(--ivoor); white-space: pre-line; }
.mini-lot { display: flex; align-items: center; gap: 14px; }
.mini-lot .naam { font-size: 28px; font-weight: 900; line-height: 1.05; color: var(--inkt); }
.knoppen-rij { display: flex; gap: 10px; }
.knoppen-rij > * { flex: 1; }

/* Profiel ontvanger */
.ontvanger-kop { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(160deg, #ffe3a0, #e9a93e); color: var(--inkt);
  font-size: 28px; font-weight: 900; border: 3px solid #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}
.ontvanger-kop .klein-label { font-size: 17px; font-weight: 700; color: var(--ivoor); }
.ontvanger-kop .grote-naam { font-size: 34px; font-weight: 900; line-height: 1.05; }
.budget-rij { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 800; color: var(--ivoor); }
.budget-rij span { display: inline-flex; align-items: center; gap: 8px; }

/* Tabbar */
.tabbar {
  position: fixed; z-index: 20; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 460px);
  padding: 8px 8px calc(var(--veilig-onder) + 8px);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(20, 13, 42, .9);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid rgba(244, 198, 106, .28);
}
.tabbar.vijf { grid-template-columns: repeat(5, 1fr); }
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px;
  color: rgba(255, 244, 223, .62); text-decoration: none; font-size: 12px; font-weight: 800; border-radius: 12px;
}
.tab img { width: 32px; height: 32px; opacity: .55; filter: saturate(.6); transition: opacity .15s; }
.tab.actief { color: var(--goud); }
.tab.actief img { opacity: 1; filter: none; }

/* ═══ Toast en dialoog ═════════════════════════════════════════════ */
#toasts { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); top: calc(var(--veilig-boven) + 14px); width: min(92vw, 420px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  background: #fff; color: var(--inkt); border-radius: 14px; padding: 13px 16px; font-weight: 800; font-size: 15px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35); border-left: 5px solid var(--groen); animation: verschijn .3s both;
}
.toast.fout { border-left-color: var(--rood); }
.dialoog-achter { position: fixed; inset: 0; z-index: 80; background: rgba(10, 6, 24, .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: grid; place-items: end center; padding: 12px; }
@media (min-width: 600px) { .dialoog-achter { place-items: center; } }
.dialoog {
  width: min(100%, 440px); max-height: calc(100dvh - 40px); overflow: auto;
  background: #fff; color: var(--inkt); border-radius: 22px; padding: 22px 20px calc(18px + var(--veilig-onder));
  box-shadow: 0 30px 60px rgba(0, 0, 0, .45); animation: verschijn .25s both;
}
.dialoog h2 { margin: 0 0 8px; font-size: 21px; font-weight: 900; }
.dialoog p { margin: 0 0 12px; color: #4a4060; font-weight: 600; line-height: 1.45; }
.dialoog .invoer { box-shadow: none; border-color: #e2dbee; }
.dialoog-knoppen { display: flex; flex-direction: column-reverse; gap: 8px; margin-top: 16px; }
@media (min-width: 600px) { .dialoog-knoppen { flex-direction: row; justify-content: flex-end; } .dialoog-knoppen .knop { width: auto; } }
.dialoog .knop-rand { color: var(--inkt); border-color: #d7cfe6; background: #fff; }
.code-rij { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #eee8f3; }
.code-rij:last-child { border-bottom: 0; }
.code-rij strong { flex: 1; font-size: 16px; }
.code-waarde { font: 900 20px var(--font); letter-spacing: .14em; background: #fff4df; border: 1.5px dashed var(--goud-donker); padding: 4px 10px; border-radius: 10px; }

/* ═══ Beheer ═══════════════════════════════════════════════════════ */
.beheer { display: grid; grid-template-columns: 252px 1fr; min-height: 100dvh; }
.zijbalk {
  background: linear-gradient(180deg, rgba(23, 16, 47, .96), rgba(30, 18, 58, .96));
  border-right: 1px solid rgba(255, 255, 255, .08);
  padding: 22px 14px; position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 4px;
}
.zijbalk-merk { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.zijbalk-merk img { width: 46px; }
.zijbalk-merk strong { display: block; font-size: 19px; font-weight: 900; line-height: 1.05; }
.zijbalk-merk span { font-size: 14px; font-weight: 700; color: rgba(255, 244, 223, .8); }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
  color: rgba(255, 244, 223, .88); text-decoration: none; font-weight: 800; font-size: 15.5px; border: 1.5px solid transparent;
}
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { background: rgba(255, 255, 255, .06); }
.nav-item.actief { background: linear-gradient(90deg, rgba(126, 74, 214, .7), rgba(150, 70, 200, .55)); border-color: rgba(205, 170, 255, .55); color: #fff; }
.zijbalk .onder { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.beheer-hoofd { min-width: 0; padding-bottom: 40px; }
.banner {
  position: relative; min-height: 178px; padding: 32px 32px 26px; display: flex; flex-direction: column; justify-content: flex-end;
  background: url('/assets/sint-dak.webp') 70% 28% / cover no-repeat;
}
.banner::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(23, 16, 47, .92) 0%, rgba(23, 16, 47, .55) 45%, rgba(23, 16, 47, 0) 75%), linear-gradient(0deg, rgba(36, 21, 68, 1) 0%, rgba(36, 21, 68, 0) 40%); }
.banner > * { position: relative; }
.banner h1 { margin: 0; font-size: 34px; font-weight: 900; }
.banner p { margin: 6px 0 0; font-weight: 700; color: var(--goud); font-size: 16px; }
.beheer-inhoud { padding: 8px 32px; display: flex; flex-direction: column; gap: 20px; max-width: 1080px; }
.tegels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tegel {
  background: linear-gradient(180deg, rgba(92, 60, 158, .72), rgba(54, 32, 102, .82));
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px;
  padding: 16px 10px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 26px rgba(0, 0, 0, .22);
}
.tegel svg.i { width: 30px; height: 30px; stroke-width: 1.8; }
.tegel strong { font-size: 32px; font-weight: 900; line-height: 1; margin-top: 4px; }
.tegel span { font-size: 14px; font-weight: 700; color: rgba(255, 244, 223, .88); }
.ring { width: 104px; height: 104px; }
.ring text { font: 900 24px var(--font); fill: #fff; }
.paneel { background: #fff; color: var(--inkt); border-radius: 16px; padding: 18px; box-shadow: 0 14px 34px rgba(0, 0, 0, .25); }
.paneel h2 { margin: 0 0 12px; font-size: 19px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.paneel h2 svg { width: 22px; height: 22px; color: var(--paars); }
.paneel .klein { color: var(--grijs); }
.paneel .veld > label, .paneel .veld > .label { color: var(--inkt); }
.paneel .veld .hint { color: var(--grijs); }
.paneel .invoer, .paneel .keuze { box-shadow: none; border-color: #e2dbee; background: #fbf9ff; }
.paneel .invoer:focus, .paneel .keuze:focus { border-color: #8f5fe0; }
.paneel-kop { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.paneel-kop h2 { margin: 0; }
.activiteit { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid #eee8f3; font-weight: 700; font-size: 14.5px; }
.activiteit:last-child { border-bottom: 0; }
.activiteit .bol-groen { width: 24px; height: 24px; border-radius: 50%; background: var(--groen); color: #fff; display: grid; place-items: center; flex: none; }
.activiteit .bol-groen svg { width: 14px; height: 14px; stroke-width: 3.2; }
.activiteit .bol-paars { width: 24px; height: 24px; color: var(--paars); flex: none; }
.activiteit span { flex: 1; }
.activiteit time { color: var(--grijs); font-size: 13px; white-space: nowrap; }
.raster-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.deeln-rij { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid #eee8f3; }
.deeln-rij:last-child { border-bottom: 0; }
.deeln-rij > svg { width: 24px; height: 24px; color: var(--paars); flex: none; }
.deeln-rij .naam { flex: 1; font-weight: 800; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.status svg { width: 15px; height: 15px; stroke-width: 3; }
.status.ok { color: var(--groen); }
.status.open { color: #9a6c05; }
.status.open::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--oranje); }
.status.grijs { color: var(--grijs); }
.statussen { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.rij-acties { display: flex; gap: 2px; }
.rij-acties .icoonknop { color: #5d4b85; width: 36px; height: 36px; }
.rij-acties .icoonknop.rood { color: #c4213f; }
.rij-acties svg { width: 19px; height: 19px; }
.optie {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 14px;
  border: 2px solid #e6dff2; cursor: pointer; background: #fff;
}
.optie + .optie { margin-top: 10px; }
.optie input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: #7b3fe4; flex: none; }
.optie strong { display: block; font-size: 15.5px; font-weight: 900; color: var(--paars); }
.optie span { font-size: 13px; color: var(--grijs); font-weight: 700; }
.optie:has(input:checked) { border-color: #9b6ff0; background: #f6f1ff; }
.koppel-rij { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1.3fr); gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid #eee8f3; }
.koppel-rij:last-of-type { border-bottom: 0; }
.koppel-naam { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.koppel-rij .keuze.vast { border-color: #9b6ff0; background: #f6f1ff; color: #5a2fb0; }
.koppel-rij .keuze { min-height: 44px; font-size: 15px; padding: 0 10px; }
.koppel-rij > svg { width: 20px; height: 20px; color: var(--paars); justify-self: center; }
.tabel-wrap { overflow-x: auto; }
table.tabel { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tabel th { text-align: left; font-size: 13px; color: var(--grijs); font-weight: 800; padding: 8px 10px; border-bottom: 2px solid #eee8f3; white-space: nowrap; }
.tabel td { padding: 10px; border-bottom: 1px solid #eee8f3; font-weight: 700; }
.tabel tr:last-child td { border-bottom: 0; }
.verborgen { filter: blur(6px); user-select: none; }
.label-pil { display: inline-flex; height: 24px; align-items: center; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.label-pil.paars { background: #efe7ff; color: #5a2fb0; }
.label-pil.groen { background: #e2f6ea; color: #157a40; }
.label-pil.grijs { background: #f1eef5; color: #6b6280; }
.label-pil.goud { background: #fff1d1; color: #8a5a00; }
.deel-link { display: flex; gap: 8px; align-items: center; }
.deel-link input { flex: 1; min-width: 0; font-size: 14px !important; min-height: 46px !important; }
.schakel { display: flex; align-items: center; gap: 12px; font-weight: 800; cursor: pointer; }
.schakel input { width: 46px; height: 26px; accent-color: #7b3fe4; }
.formraster { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.formraster .breed { grid-column: 1 / -1; }
.mobiel-kop { display: none; }
.beheer-tabbar { display: none; }

@media (max-width: 960px) {
  .tegels { grid-template-columns: repeat(2, 1fr); }
  .raster-2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .beheer { grid-template-columns: 1fr; }
  .zijbalk { display: none; }
  .mobiel-kop { display: flex; align-items: center; gap: 10px; padding: calc(var(--veilig-boven) + 12px) 18px 10px; }
  .mobiel-kop img { width: 38px; }
  .mobiel-kop strong { font-size: 17px; font-weight: 900; flex: 1; }
  .banner { min-height: 130px; padding: 20px 18px 16px; }
  .banner h1 { font-size: 26px; }
  .beheer-inhoud { padding: 6px 16px; }
  .beheer-hoofd { padding-bottom: calc(110px + var(--veilig-onder)); }
  .beheer-tabbar { display: grid; }
  .formraster { grid-template-columns: 1fr; }
  .tegel strong { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Formulierelementen op witte vlakken in lichte modus tekenen */
.invoer, .keuze, .paneel, .dialoog, .lijst { color-scheme: light; }
