/* Klankbord. Inktblauw met per soort een eigen kleur: de kleur van de rand vertelt wat voor item het is. */

@font-face { font-family: "Nunito Sans"; src: url("fonts/NunitoSans.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --bg: #f4f6f9; --kaart: #ffffff; --kaart2: #eef2f6; --rand: #dde3ea; --tekst: #1b2430; --zacht: #5d6b7e;
  --inkt: #1f3a5f; --inkt-tekst: #ffffff; --link: #2361a8; --geel: #f2b705;
  --wens: #2f8f83; --eis: #b5473a; --optie: #6d5bb3; --vraag: #b07a0c; --tijdlijn: #2f6db5;
  --ok: #2e7d4f; --ok-bg: #e5f3ea; --fout: #b3261e; --fout-bg: #fbe9e7;
  --schaduw: 0 1px 2px rgba(27, 36, 48, .06), 0 4px 14px rgba(27, 36, 48, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161d; --kaart: #19202a; --kaart2: #212a36; --rand: #2c3644; --tekst: #e8edf3; --zacht: #97a4b5;
    --inkt: #16273d; --link: #7fb2ec;
    --wens: #4fb8aa; --eis: #e07a6c; --optie: #a493e6; --vraag: #e2ad3d; --tijdlijn: #6ea4e8;
    --ok: #6fcf97; --ok-bg: #16301f; --fout: #ff8a80; --fout-bg: #3a1a18;
    --schaduw: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--tekst); font: 400 16px/1.55 "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.zacht { color: var(--zacht); }
.klein { font-size: .875rem; }
.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.i.groot { width: 22px; height: 22px; }

/* ---------- kop ---------- */
.kopbalk { background: var(--inkt); color: var(--inkt-tekst); padding: calc(14px + env(safe-area-inset-top)) 0 0; }
.kopbalk .binnen { max-width: 760px; margin: 0 auto; padding: 0 18px; }
.kopbalk .rij { display: flex; align-items: flex-start; gap: 12px; }
.kopbalk h1 { font-size: 1.35rem; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kopbalk h1 a { color: inherit; text-decoration: none; }
.kopbalk .wie { font-size: .85rem; opacity: .8; margin-top: 2px; }
.kopbalk .knoppen { display: flex; gap: 4px; }
.kopbalk .knoppen a, .kopbalk .knoppen > button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: inherit; background: transparent; border: 0; }
.kopbalk .knoppen a:hover, .kopbalk .knoppen button:hover, .kopbalk .knoppen a.aan { background: rgba(255, 255, 255, .12); }

.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-top: 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 9px 12px 11px; color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 700; font-size: .92rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a .n { font-weight: 400; opacity: .7; margin-left: 3px; font-variant-numeric: tabular-nums; }
.tabs a.aan { color: #fff; border-bottom-color: var(--kleur, var(--geel)); }
.tabs a:hover { color: #fff; }

/* ---------- pagina ---------- */
.pagina { max-width: 760px; margin: 0 auto; padding: 18px 18px calc(110px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.pagina.smal { max-width: 460px; padding-top: 10vh; }
.berichten { display: flex; flex-direction: column; gap: 8px; }
.bericht { padding: 10px 14px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.bericht.fout { background: var(--fout-bg); color: var(--fout); }
.vers { position: sticky; top: 8px; z-index: 5; display: flex; justify-content: center; }
.vers button { border: 0; border-radius: 999px; padding: 8px 16px; background: var(--geel); color: #1b2430; font-weight: 800; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }

.uitleg { color: var(--zacht); }
.leeg { text-align: center; padding: 36px 12px; color: var(--zacht); display: flex; flex-direction: column; gap: 12px; align-items: center; }

/* soortkleur: één variabele per element */
[data-soort="wens"] { --kleur: var(--wens); } [data-soort="eis"] { --kleur: var(--eis); } [data-soort="optie"] { --kleur: var(--optie); }
[data-soort="vraag"] { --kleur: var(--vraag); } [data-soort="tijdlijn"] { --kleur: var(--tijdlijn); }

/* ---------- lijst ---------- */
.lijst { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0; padding: 0; }
.rij-item { display: block; background: var(--kaart); border: 1px solid var(--rand); border-left: 5px solid var(--kleur); border-radius: 10px; padding: 12px 14px; color: inherit; text-decoration: none; box-shadow: var(--schaduw); }
.rij-item:hover { border-color: var(--kleur); }
.rij-item .boven { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: .82rem; color: var(--zacht); }
.rij-item .soortnaam { color: var(--kleur); font-weight: 800; }
.rij-item h3 { margin: 3px 0 4px; font-size: 1.02rem; }
.rij-item .onder { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--zacht); }
.rij-item .onder span { display: inline-flex; gap: 4px; align-items: center; }
.rij-item.af { opacity: .62; }
.rij-item.af:hover { opacity: 1; }
.stip { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--geel); box-shadow: 0 0 0 2px rgba(242, 183, 5, .25); }

.chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--kaart2); color: var(--zacht); white-space: nowrap; }
.chip.st-akkoord, .chip.st-beantwoord, .chip.st-besloten, .chip.st-klaar { background: var(--ok-bg); color: var(--ok); }
.chip.st-afgewezen, .chip.st-vervallen { background: var(--fout-bg); color: var(--fout); }
.chip.st-besproken, .chip.st-bezig { background: color-mix(in srgb, var(--geel) 22%, var(--kaart)); color: color-mix(in srgb, var(--geel) 30%, var(--tekst)); }
.chip.prio { background: transparent; border: 1px solid var(--rand); font-weight: 600; }
.chip.prio-moet { border-color: var(--eis); color: var(--eis); }

/* ---------- tijdlijn ---------- */
.tijdlijn { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.tijdlijn::before { content: ""; position: absolute; left: 86px; top: 6px; bottom: 6px; width: 2px; background: var(--rand); }
.tijdlijn li { display: grid; grid-template-columns: 74px 1fr; gap: 26px; position: relative; padding-bottom: 14px; }
.tijdlijn .wanneer { text-align: right; font-weight: 800; font-size: .9rem; padding-top: 12px; line-height: 1.2; }
.tijdlijn .wanneer small { display: block; font-weight: 400; color: var(--zacht); }
.tijdlijn li::after { content: ""; position: absolute; left: 78px; top: 15px; width: 14px; height: 14px; border-radius: 50%; background: var(--kaart); border: 3px solid var(--tijdlijn); }
.tijdlijn li.st-klaar::after { background: var(--tijdlijn); }
.tijdlijn li.vandaag-lijn { grid-template-columns: 74px 1fr; padding-bottom: 14px; }
.tijdlijn li.vandaag-lijn::after { border-color: var(--geel); background: var(--geel); width: 10px; height: 10px; left: 80px; top: 6px; }
.tijdlijn li.vandaag-lijn .wanneer { padding-top: 0; color: var(--vraag); }
.tijdlijn li.vandaag-lijn hr { border: 0; border-top: 2px dashed var(--geel); margin: 9px 0 0; }

/* ---------- item ---------- */
.terug { display: inline-flex; gap: 6px; align-items: center; color: var(--zacht); text-decoration: none; font-weight: 700; font-size: .9rem; }
.item-kop { background: var(--kaart); border: 1px solid var(--rand); border-top: 5px solid var(--kleur); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--schaduw); }
.item-kop .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--zacht); }
.item-kop .soortnaam { color: var(--kleur); font-weight: 800; }
.item-kop h1 { font-size: 1.4rem; }
.tekst { overflow-wrap: anywhere; }
.tekst p + p { margin-top: .7em; }
.acties { display: flex; gap: 8px; flex-wrap: wrap; }

.blok { background: var(--kaart); border: 1px solid var(--rand); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.blok > h2 { font-size: 1rem; }

.stemrij { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stemknop { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--rand); background: var(--kaart); border-radius: 999px; padding: 6px 14px; font-weight: 700; }
.stemknop.aan.voor { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.stemknop.aan.tegen { background: var(--fout-bg); border-color: var(--fout); color: var(--fout); }
.stemknop .n { font-variant-numeric: tabular-nums; }

.keuzes { display: flex; flex-direction: column; gap: 8px; }
.keuze { position: relative; display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 1px solid var(--rand); background: var(--kaart); border-radius: 10px; padding: 10px 12px; overflow: hidden; }
.keuze .balk { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--optie) 14%, transparent); }
.keuze > *:not(.balk) { position: relative; }
.keuze .wat { flex: 1; font-weight: 700; }
.keuze .hoeveel { font-variant-numeric: tabular-nums; color: var(--zacht); font-size: .9rem; }
.keuze.mijn { border-color: var(--optie); box-shadow: inset 0 0 0 1px var(--optie); }
.keuze.besluit { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.keuze .rondje { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--zacht); flex: none; }
.keuze.mijn .rondje { border-color: var(--optie); background: radial-gradient(circle, var(--optie) 45%, transparent 50%); }

.reacties { display: flex; flex-direction: column; gap: 14px; list-style: none; margin: 0; padding: 0; }
.reactie { display: grid; grid-template-columns: 34px 1fr; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; background: hsl(var(--tint, 210) 45% 42%); }
.reactie .kop { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.reactie .kop b { font-weight: 800; }
.reactie .kop .zacht { font-size: .82rem; }
.reactie .ballon { background: var(--kaart2); border-radius: 4px 12px 12px 12px; padding: 9px 12px; margin-top: 3px; }
.reactie.ik .ballon { background: color-mix(in srgb, var(--link) 10%, var(--kaart)); }
.reactie.nieuw .ballon { box-shadow: inset 3px 0 0 var(--geel); }
.reactie details summary { list-style: none; cursor: pointer; color: var(--zacht); font-size: .82rem; display: inline-block; margin-top: 4px; }
.reactie details summary::-webkit-details-marker { display: none; }
.reactie details[open] summary { margin-bottom: 6px; }

/* ---------- formulieren ---------- */
form.stapel { display: flex; flex-direction: column; gap: 14px; }
label.veld { display: flex; flex-direction: column; gap: 5px; font-weight: 700; font-size: .92rem; }
label.veld .hint { font-weight: 400; color: var(--zacht); font-size: .85rem; }
input[type=text], input[type=password], input[type=date], select, textarea {
  width: 100%; border: 1px solid var(--rand); background: var(--kaart); border-radius: 10px; padding: 10px 12px; font-weight: 400;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
textarea.kort { min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--link) 50%, transparent); border-color: var(--link); }
.keuzerij { display: flex; gap: 6px; flex-wrap: wrap; }
.keuzerij label { display: inline-flex; }
.keuzerij input { position: absolute; opacity: 0; pointer-events: none; }
.keuzerij span { border: 1px solid var(--rand); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: .9rem; cursor: pointer; background: var(--kaart); }
.keuzerij input:checked + span { background: var(--inkt); color: #fff; border-color: var(--inkt); }
.keuzerij input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.radiolijst { display: flex; flex-direction: column; gap: 8px; }
.radiolijst label { display: flex; gap: 10px; align-items: center; font-weight: 600; }

.knop { display: inline-flex; gap: 6px; align-items: center; justify-content: center; border: 1px solid var(--rand); background: var(--kaart); color: var(--tekst); border-radius: 10px; padding: 9px 16px; font-weight: 700; text-decoration: none; }
.knop:hover { border-color: var(--zacht); }
.knop.hoofd { background: var(--inkt); border-color: var(--inkt); color: #fff; }
@media (prefers-color-scheme: dark) { .knop.hoofd { background: var(--link); border-color: var(--link); color: #0e1621; } }
.knop.gevaar { color: var(--fout); }
.knop.klein { padding: 5px 11px; font-size: .85rem; border-radius: 8px; }
.knop.tekstknop { border-color: transparent; background: transparent; padding-left: 4px; padding-right: 4px; color: var(--zacht); }

/* ---------- nieuw-knop ---------- */
.nieuwknop { position: fixed; right: max(18px, calc(50vw - 362px)); bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 10; }
.nieuwknop > summary, .nieuwknop > a { list-style: none; display: inline-flex; gap: 8px; align-items: center; background: var(--geel); color: #1b2430; font-weight: 800; padding: 13px 20px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0, 0, 0, .22); cursor: pointer; text-decoration: none; }
.nieuwknop > summary::-webkit-details-marker { display: none; }
.nieuwknop .menu { position: absolute; right: 0; bottom: calc(100% + 10px); background: var(--kaart); border: 1px solid var(--rand); border-radius: 12px; padding: 6px; min-width: 220px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); display: flex; flex-direction: column; }
.nieuwknop .menu a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; color: var(--tekst); text-decoration: none; font-weight: 700; }
.nieuwknop .menu a:hover { background: var(--kaart2); }
.nieuwknop .menu a::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--kleur); }

/* ---------- activiteit ---------- */
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.log li { display: grid; grid-template-columns: 12px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rand); }
.log li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--kleur, var(--zacht)); margin-top: 7px; }
.log .wanneer { color: var(--zacht); font-size: .82rem; }
.log .citaat { color: var(--zacht); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- beheer ---------- */
.tabel { width: 100%; border-collapse: collapse; }
.tabel th, .tabel td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabel th { font-size: .82rem; color: var(--zacht); font-weight: 700; }
.tabel-wrap { overflow-x: auto; }
.deelnemer { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rand); }
.deelnemer:last-child { border-bottom: 0; }
.deelnemer.uit { opacity: .55; }
.deelnemer .linkregel { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.deelnemer .linkregel input { font-size: .8rem; padding: 6px 8px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.deelnemer img.qr { width: 92px; height: 92px; border-radius: 6px; background: #fff; }
.deelnemer details > summary { cursor: pointer; color: var(--zacht); font-size: .85rem; margin-top: 6px; }
.rij2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .rij2 { grid-template-columns: 1fr; } }
pre.log-uit { white-space: pre-wrap; max-height: 22em; overflow: auto; font-size: .8rem; background: var(--kaart2); padding: 10px; border-radius: 8px; }
.voet { text-align: center; color: var(--zacht); font-size: .8rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
