:root {
  --red: #d6001c;
  --red-dark: #a80016;
  --green: #1f5c3a;
  --green-soft: #e7f0ea;
  --gold: #c9a227;
  --ink: #1d1d1b;
  --muted: #6b6b6b;
  --line: #e3ddd3;
  --bg: #f4f1ec;
  --card: #ffffff;
  --radius: 14px;
}

* { box-sizing: border-box; }
:root, html, body { color-scheme: light; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* Topbar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px; position: relative; z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { background: var(--red); color: #fff; font-weight: 800; letter-spacing: .04em; padding: 4px 10px; border-radius: 6px; font-size: 18px; }
.brand-sub { font-weight: 600; color: var(--muted); }

/* Hero */
.hero { position: relative; background: radial-gradient(120% 140% at 80% 0%, #e3112b 0%, var(--red) 45%, var(--red-dark) 100%); color: #fff; padding: 48px 20px 250px; overflow: hidden; }
.hero-inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 1; }
.eyebrow { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .14em; font-size: 13px; font-weight: 700; opacity: .85; }
.hero h1 { margin: 0 0 12px; font-size: clamp(30px, 6vw, 48px); line-height: 1.1; font-weight: 800; }
.lead { margin: 0; font-size: 18px; max-width: 60ch; opacity: .95; }
.deadline { display: inline-block; margin: 18px 0 0; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); padding: 6px 14px; border-radius: 999px; font-weight: 600; }
.tram { position: absolute; left: 50%; bottom: 112px; width: min(620px, 94vw); transform: translateX(-50%); filter: drop-shadow(0 6px 10px rgba(60, 0, 8, .28)); }
.tram-lampjes circle { fill: #ffd85a; animation: lampjes 2.4s steps(2) infinite; }
.tram-lampjes circle:nth-child(3n+1) { fill: #6fe08f; animation-delay: -.8s; }
.tram-lampjes circle:nth-child(3n+2) { fill: #fff; animation-delay: -1.6s; }
@keyframes lampjes { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .tram-lampjes circle { animation: none; } }

/* Kerstlampjes */
.lights { position: absolute; top: 0; left: 0; right: 0; height: 26px;
  background: radial-gradient(circle at 12px 14px, #ffd85a 0 5px, transparent 6px) 0 0/72px 26px,
              radial-gradient(circle at 36px 18px, #6fe08f 0 5px, transparent 6px) 0 0/72px 26px,
              radial-gradient(circle at 60px 14px, #fff 0 5px, transparent 6px) 0 0/72px 26px;
  animation: twinkle 2.4s steps(2) infinite; opacity: .9; }
.lights::before { content: ""; position: absolute; inset: 0; border-top: 2px solid rgba(0,0,0,.25); border-radius: 0 0 50% 50%/0 0 14px 14px; }
@keyframes twinkle { 50% { opacity: .55; } }

/* Layout */
main { position: relative; z-index: 1; margin: -110px auto 0; padding: 0 16px 40px; }
main.narrow { max-width: 760px; }
main.wide { max-width: 1200px; margin-top: 32px; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: 0 18px 50px rgba(60, 20, 10, .14); padding: clamp(20px, 4vw, 40px); border-top: 6px solid var(--green); }

/* Form */
fieldset { border: 0; margin: 0 0 32px; padding: 0; min-width: 0; }
legend { font-size: 20px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; padding: 0; }
.step { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; font-size: 15px; }
.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row.two { grid-template-columns: 1fr; gap: 0; } }
.field { display: block; margin-bottom: 14px; }
.field > span, .label { display: block; font-weight: 600; margin: 0 0 6px; }
.label { margin-top: 20px; }
input[type=text], input[type=email], input:not([type]) {
  width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); -webkit-text-fill-color: var(--ink); caret-color: var(--red); transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--muted); -webkit-text-fill-color: var(--muted); }
input:focus-visible { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(214, 0, 28, .14); }
.hint { display: block; color: var(--muted); font-size: 14px; margin-top: 6px; }
.err { display: block; color: var(--red-dark); font-size: 14px; font-weight: 600; }
.err:empty { display: none; }
.err:not(:empty) { margin-top: 6px; }
.note { background: var(--green-soft); color: var(--green); border-radius: 10px; padding: 10px 14px; margin: 12px 0 0; font-size: 15px; }

/* Radio-varianten */
.segmented, .chips { display: flex; flex-wrap: wrap; gap: 10px; }
.segmented label, .chips label { position: relative; cursor: pointer; }
.segmented input, .chips input, .menu-head input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span, .chips span {
  display: inline-block; padding: 12px 20px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; transition: all .15s;
}
.segmented span { padding: 14px 24px; font-size: 17px; }
@media (max-width: 560px) { .segmented { display: grid; grid-template-columns: 1fr 1fr; } .segmented span { display: block; text-align: center; padding: 14px 10px; } }
.chips.small span { padding: 8px 14px; font-size: 15px; font-weight: 500; }
.segmented label:hover span, .chips label:hover span { border-color: #c9bfb0; }
.segmented input:checked + span, .chips input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.segmented input:focus-visible + span, .chips input:focus-visible + span, .menu-head input:focus-visible ~ .check { box-shadow: 0 0 0 4px rgba(214, 0, 28, .2); }

/* Menukaarten */
.menus { display: grid; gap: 12px; }
.menu { border: 1.5px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; background: #fff; }
.menu:hover { border-color: #c9bfb0; }
.menu.selected { border-color: var(--red); box-shadow: 0 6px 20px rgba(214, 0, 28, .1); }
.menu-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; position: relative; }
.menu-icon { font-size: 30px; width: 52px; height: 52px; display: grid; place-items: center; background: #faf3e6; border-radius: 12px; flex: none; }
.menu-text { flex: 1; }
.menu-text b { display: block; font-size: 17px; }
.menu-text small { color: var(--muted); font-size: 14px; }
.check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; position: relative; }
.menu.selected .check { border-color: var(--red); background: var(--red); }
.menu.selected .check::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.menu-opts { padding: 4px 18px 18px 84px; }
@media (max-width: 560px) { .menu-opts { padding-left: 18px; } }
.opt { margin-bottom: 12px; }
.opt-title { margin: 0 0 8px; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--green); }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; padding: 8px 14px; border-radius: 999px; background: #faf3e6; }
.toggle input { width: 18px; height: 18px; accent-color: var(--red); }

/* Knoppen */
.btn { display: inline-block; background: var(--red); color: #fff; border: 0; border-radius: 999px; padding: 12px 22px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, transform .05s; }
.btn:hover { background: var(--red-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .7; cursor: progress; }
.btn-big { width: 100%; padding: 16px; font-size: 18px; }
.btn.link, button.link { background: none; border: 0; color: var(--red-dark); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.form-error { background: #fdecee; color: var(--red-dark); border: 1px solid #f5b8c0; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }

/* Bevestigd / klaar */
.done { text-align: center; padding: 12px 0; }
.big-emoji { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.done h2, .panel > h1 { margin: 0 0 10px; }
.summary { display: inline-flex; flex-direction: column; gap: 2px; text-align: left; background: #faf7f2; border-left: 4px solid var(--green); border-radius: 8px; padding: 14px 18px; margin-top: 8px; }
.summary span { color: var(--muted); }

/* Beheer */
.stats { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.stats span { background: #faf7f2; padding: 8px 14px; border-radius: 999px; }
.section { margin: 28px 0 12px; font-size: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.card h2 { font-size: 16px; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; }
.pill { background: var(--red); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.count { margin: 0; padding-left: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #faf7f2; }

.foot { text-align: center; color: var(--muted); padding: 0 16px 40px; }

/* Demomodus */
.demo-bar { position: sticky; top: 0; z-index: 60; background: var(--green); color: #fff; text-align: center; font-weight: 700; font-size: 14px; padding: 8px 16px; }
#demo-mail { margin: 18px 0; }

/* Dagen */
.hint.top { margin: -6px 0 14px; }
.day-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .day-picker { grid-template-columns: 1fr; } }
.day-toggle { position: relative; cursor: pointer; }
.day-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.day-toggle span { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; height: 100%; padding: 14px 16px 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; transition: all .15s; position: relative; }
.day-toggle span::after { content: ""; position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); background: #fff; }
.day-toggle i { font-style: normal; font-size: 24px; }
.day-toggle b { font-size: 16px; }
.day-toggle small { color: var(--muted); }
.day-toggle:hover span { border-color: #c9bfb0; }
.day-toggle input:checked + span { border-color: var(--green); background: var(--green-soft); }
.day-toggle input:checked + span::after { background: var(--green); border-color: var(--green); }
.day-toggle input:checked + span::before { content: ""; position: absolute; top: 18px; right: 22px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); z-index: 1; }
.day-toggle input:focus-visible + span { box-shadow: 0 0 0 4px rgba(31, 92, 58, .25); }

.day-block { border-top: 1px dashed var(--line); padding-top: 26px; position: relative; }
.legend-sub { font-weight: 500; color: var(--muted); font-size: 15px; }
.label.first { margin-top: 0; }
.copy-btn { position: absolute; top: 24px; right: 0; background: #faf3e6; border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 600; color: var(--green); cursor: pointer; }
.copy-btn:hover { background: #f3e6cc; }
@media (max-width: 560px) { .copy-btn { position: static; margin: -6px 0 14px; } }

/* Bevestigingspagina / beheer */
main.plain { margin-top: 32px; }
.summary-list { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 8px; }
.summary-list .summary { min-width: min(420px, 100%); margin: 0; }
.section small { font-weight: 500; color: var(--muted); font-size: 14px; margin-left: 6px; }
.admin-day + .admin-day { border-top: 1px dashed var(--line); margin-top: 24px; }
.card h3 { font-size: 15px; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card.total { background: var(--green-soft); border-color: #cfe0d5; }
td small { color: var(--muted); }
.btn.ghost { background: transparent; color: var(--red-dark); border: 1.5px solid var(--red); padding: 10.5px 20px; }
.btn.ghost:hover { background: #fdecee; }

/* Menu aanpassen */
.menu-form { display: grid; gap: 18px; margin-top: 16px; }
.menu-edit { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px 20px 8px; margin: 0; }
.menu-edit.uit { background: #faf7f2; }
.menu-edit.uit legend { color: var(--muted); }
.menu-edit legend { font-size: 18px; padding: 0 8px; margin-left: -8px; margin-bottom: 4px; }
.pill-n { font-size: 13px; font-weight: 600; color: var(--muted); background: #faf3e6; border-radius: 999px; padding: 2px 10px; }
.me-grid { display: grid; grid-template-columns: 90px 1fr 110px; gap: 14px; }
.me-grid.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .me-grid, .me-grid.two { grid-template-columns: 1fr; gap: 0; } }
textarea { width: 100%; font: inherit; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); -webkit-text-fill-color: var(--ink); resize: vertical; line-height: 1.5; }
textarea:focus-visible, input[type=number]:focus-visible { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(214, 0, 28, .14); }
input[type=number] { width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.field small { font-weight: 400; color: var(--muted); }
.me-flags { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 4px 0 12px; }
.toggle.danger { background: #fdecee; color: var(--red-dark); }

/* Aanmelding bewerken */
.bewerk-form fieldset { margin-bottom: 26px; }
.bewerk-dagen { display: grid; gap: 12px; }
.bewerk-dag { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px 4px; }
.bewerk-dag.leeg { background: #faf7f2; }
.bewerk-dag > .toggle { margin-bottom: 12px; }
.bewerk-velden { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; }
@media (max-width: 760px) { .bewerk-velden { grid-template-columns: 1fr; gap: 0; } }
select { width: 100%; font: inherit; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
select:focus-visible { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(214, 0, 28, .14); }
option.uit { color: var(--muted); }
.acties-cel { white-space: nowrap; }
.acties-cel form { display: inline; margin-left: 10px; }
a.link { color: var(--red-dark); }
