/* FlexiPlan — ontwerpsysteem v2
   Tokens → basis → layout (topbalk + tab-balk) → componenten → tijdlijn → dashboard → aanmelden */

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

:root {
  --achtergrond: #eef2f6;
  --vlak: #ffffff;
  --vlak-2: #f6f8fb;
  --inkt: #14213d;
  --inkt-2: #4b5670;
  --inkt-3: #8791a6;
  --lijn: #dde3ec;
  --teal: #0e8a7a;
  --teal-donker: #0a6b5f;
  --teal-licht: #d8f1ec;
  --amber: #f2b705;
  --amber-licht: #fff1c2;
  --koraal: #e4573d;
  --koraal-licht: #fde3dc;
  --groen: #2b8a3e;
  --groen-licht: #dff3e3;
  --straal: 14px;
  --straal-klein: 8px;
  --schaduw: 0 1px 2px rgba(20,33,61,.06), 0 8px 24px -12px rgba(20,33,61,.18);
  --tap: 44px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--achtergrond); color: var(--inkt); font-size: 16px; line-height: 1.5;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
@media (min-width: 720px) { body { padding-bottom: 2rem; } }
a { color: var(--teal-donker); }
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: .2rem 0 1rem; }
h2 { font-size: 1.05rem; font-weight: 700; margin: 1.1rem 0 .5rem; }
p { margin: .4rem 0; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Topbalk ---------- */
.kop {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1rem; background: var(--vlak); border-bottom: 1px solid var(--lijn);
}
.merk { display: flex; align-items: center; gap: .55rem; font-weight: 800; letter-spacing: -.01em; color: var(--inkt); text-decoration: none; font-size: 1.05rem; }
.merk svg { width: 26px; height: 26px; }
.kop nav { display: none; align-items: center; gap: .2rem; }
.kop nav a, .kop nav button.link { color: var(--inkt-2); text-decoration: none; font-weight: 600; padding: .45rem .7rem; border-radius: 999px; font-size: .95rem; }
.kop nav a:hover, .kop nav a.actief { background: var(--vlak-2); color: var(--inkt); }
.kop nav a.actief { color: var(--teal-donker); }
@media (min-width: 720px) { .kop nav { display: flex; } }
@media (min-width: 720px) and (max-width: 980px) { .kop nav a, .kop nav button.link { padding: .4rem .45rem; font-size: .86rem; } }

/* ---------- Tab-balk (mobiel) ---------- */
.tabbalk {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--vlak); border-top: 1px solid var(--lijn); padding-bottom: env(safe-area-inset-bottom);
}
.tabbalk a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .55rem .2rem .45rem; text-decoration: none; color: var(--inkt-3); font-size: .7rem; font-weight: 700; min-height: 56px; }
.tabbalk a svg { width: 22px; height: 22px; }
.tabbalk a.actief { color: var(--teal-donker); }
@media (min-width: 720px) { .tabbalk { display: none; } }

main { max-width: 1040px; margin: 0 auto; padding: 1rem 1rem 1.5rem; }
@media (min-width: 720px) { main { padding: 1.5rem 1.5rem 2rem; } }

/* ---------- Kaarten & meldingen ---------- */
.kaart { background: var(--vlak); border-radius: var(--straal); padding: 1rem 1.1rem; margin-bottom: .9rem; box-shadow: var(--schaduw); }
.kaart.smal { max-width: 420px; margin: 2.5rem auto; padding: 1.6rem; }
.kaart.oproep { border-left: 5px solid var(--koraal); }
.gedempt { opacity: .6; }
.melding { padding: .8rem 1rem; border-radius: var(--straal-klein); margin-bottom: 1rem; font-weight: 600; }
.melding.ok { background: var(--groen-licht); color: #1c5c2a; }
.melding.fout { background: var(--koraal-licht); color: #8c2c1a; }
.melding a { color: inherit; }

/* ---------- Formulieren ---------- */
label { display: block; margin: .7rem 0; font-weight: 600; font-size: .95rem; color: var(--inkt-2); }
input, select, textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .6rem .75rem; font: inherit; color: var(--inkt);
  border: 1.5px solid var(--lijn); border-radius: var(--straal-klein); background: var(--vlak); min-height: var(--tap);
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--teal-licht); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; margin: 0 .4rem 0 0; accent-color: var(--teal); display: inline-block; }
.rij { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.rij input, .rij select { width: auto; margin: 0; flex: 1 1 auto; min-width: 0; }
.rij.tussen { justify-content: space-between; }
.rij label { margin: 0; }
.formulier { max-width: 540px; }
form.inline { display: inline; }

button, .knop {
  font: inherit; font-weight: 700; cursor: pointer; min-height: var(--tap); padding: .55rem 1.05rem; border-radius: 999px;
  border: 1.5px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; text-decoration: none;
  transition: background-color .12s ease, transform .06s ease;
}
button:active { transform: translateY(1px); }
button.primair { background: var(--teal); color: #fff; }
button.primair:hover { background: var(--teal-donker); }
button.secundair, .knop { background: var(--vlak); border-color: var(--lijn); color: var(--inkt); }
button.secundair:hover, .knop:hover { background: var(--vlak-2); }
button.secundair.gevaar { color: var(--koraal); border-color: var(--koraal-licht); }
button.breed { width: 100%; margin-top: .6rem; }
button.link { background: none; border: none; color: var(--teal-donker); text-decoration: underline; text-underline-offset: 3px; padding: .2rem .35rem; min-height: 0; font-weight: 600; }
button.link.gevaar, .gevaar { color: var(--koraal); }
.klein, button.klein { font-size: .86rem; }
.klein { color: var(--inkt-2); }
.knop { min-width: var(--tap); padding: .5rem .8rem; }

/* ---------- Weeknavigatie ---------- */
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: 1rem; }
.weektitel { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; text-align: center; flex: 1; }
.weektitel .badge { vertical-align: middle; }

.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: var(--amber-licht); color: #6b5100; margin-left: .3rem; white-space: nowrap; }
.badge.ok { background: var(--groen-licht); color: var(--groen); }
.badge.fout { background: var(--koraal-licht); color: #8c2c1a; }
.badge.grijs { background: var(--vlak-2); color: var(--inkt-3); }

/* ---------- Dagkaarten ---------- */
.dag { background: var(--vlak); border-radius: var(--straal); padding: .9rem 1.1rem 1rem; margin-bottom: .7rem; box-shadow: var(--schaduw); border-left: 4px solid transparent; }
.dag.zondag { border-left-color: var(--amber); }
.dag.tekort { border-left-color: var(--koraal); }
.dag.verleden { opacity: .55; }
.dagkop { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .4rem; margin-bottom: .35rem; }
.dagkop strong { font-size: 1.02rem; font-weight: 800; }
.lijst { list-style: none; padding: 0; margin: .3rem 0; }
.lijst li { padding: .4rem 0; border-bottom: 1px solid var(--lijn); }
.lijst li:last-child { border-bottom: none; }
.leeg { color: var(--inkt-3); margin: .3rem 0; }
.kolommen { display: grid; grid-template-columns: 1fr; gap: .8rem; margin-top: .5rem; }
@media (min-width: 720px) { .kolommen { grid-template-columns: 1fr 1fr 1.25fr; } }
.kolommen > div > .klein:first-child strong { color: var(--inkt-3); font-weight: 700; }
.acties { display: flex; flex-wrap: wrap; gap: .5rem; }
pre { white-space: pre-wrap; font: .85rem/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--vlak-2); padding: .7rem .9rem; border-radius: var(--straal-klein); }
details summary { cursor: pointer; color: var(--teal-donker); font-weight: 600; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+"; display: inline-block; width: 1.1em; font-weight: 800; }
details[open] summary::before { content: "–"; }

/* ---------- Tijdlijn ---------- */
.tl { position: relative; height: 34px; margin: .45rem 0 .2rem; background: var(--vlak-2); border-radius: 6px; overflow: hidden; }
.tl .nodig { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, #e3e8f0 0 6px, #eef2f6 6px 12px); }
.tl .nodig.n2 { background: repeating-linear-gradient(135deg, #d5dce8 0 6px, #e6ebf3 6px 12px); }
.tl .blok { position: absolute; top: 5px; bottom: 5px; border-radius: 5px; display: flex; align-items: center; padding: 0 .45rem; font-size: .74rem; font-weight: 700; white-space: nowrap; overflow: hidden; }
.tl .blok.besch { background: var(--amber-licht); border: 1.5px dashed var(--amber); color: #6b5100; }
.tl .blok.shift { background: var(--teal); color: #fff; }
.tl .blok.shift.vast { box-shadow: inset 0 0 0 2px var(--teal-donker); }
.tl .blok.pauze { background: var(--vlak); top: 9px; bottom: 9px; border-radius: 3px; padding: 0; }
.tl .blok.ziek { background: var(--koraal-licht); color: #8c2c1a; border: 1.5px solid var(--koraal); text-decoration: line-through; }
.tl-as { display: flex; justify-content: space-between; font-size: .68rem; color: var(--inkt-3); margin-bottom: .3rem; padding: 0 2px; }
.tl .blok.besch + .blok.besch { }
.legende { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .78rem; color: var(--inkt-2); margin: .2rem 0 .8rem; }
.legende span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.legende .l-besch::before { background: var(--amber-licht); border: 1.5px dashed var(--amber); }
.legende .l-shift::before { background: var(--teal); }
.legende .l-nodig::before { background: repeating-linear-gradient(135deg, #d5dce8 0 3px, #eef2f6 3px 6px); }
.legende .l-ziek::before { background: var(--koraal-licht); border: 1.5px solid var(--koraal); }

/* ---------- Dashboardtegels ---------- */
.tegels { display: grid; grid-template-columns: 1fr; gap: .8rem; margin-bottom: 1rem; }
@media (min-width: 620px) { .tegels { grid-template-columns: repeat(3, 1fr); } }
.tegel { background: var(--vlak); border-radius: var(--straal); padding: 1rem 1.1rem; box-shadow: var(--schaduw); text-decoration: none; color: inherit; display: block; }
.tegel .cijfer { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.tegel .label { color: var(--inkt-2); font-weight: 600; font-size: .9rem; }
.tegel.let { border-left: 4px solid var(--koraal); }
.tegel.goed { border-left: 4px solid var(--groen); }
.weekrij { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .7rem 0; border-bottom: 1px solid var(--lijn); }
.weekrij:last-child { border-bottom: none; }
.weekrij a { font-weight: 800; text-decoration: none; color: var(--inkt); }

/* ---------- Aanmelden ---------- */
.aanmeld { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 1rem; }
.aanmeld .kaart { width: 100%; max-width: 400px; margin: 0; }
.aanmeld h1 { font-size: 1.5rem; margin-bottom: .2rem; }
.aanmeld .intro { color: var(--inkt-2); margin-bottom: 1.2rem; }

footer { text-align: center; padding: 1rem; color: var(--inkt-3); font-size: .82rem; }
footer a { color: inherit; }
textarea { resize: vertical; }
