/* ══════════════════════════════════════════════
   JVW Wijbosch — Portaal (v2)
   main.css — gedeelde stijlen voor ouder + admin
   ══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* ── RESET & TOKENS ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-deep:  #023e8a;
  --blue-mid:   #0077b6;
  --blue-light: #00b4d8;
  --cyan:       #48cae4;
  --orange:     #fb8500;
  --yellow:     #ffb703;
  --bg:         #f0faff;
  --text:       #012a4a;
  --white:      #ffffff;
  --grijs:      #6c757d;
  --grijs-licht:#e9ecef;
  --fout:       #dc3545;
  --ok:         #28a745;
  --radius:     10px;
  --schaduw:    0 2px 12px rgba(0,0,0,.10);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── TYPOGRAFIE ─────────────────────────────── */
h1, h2, h3 { font-weight: 800; line-height: 1.2; }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
h2 { font-size: 1.3rem; margin-bottom: .5rem; }
h3 { font-size: 1.1rem; }
a  { color: var(--blue-mid); text-decoration: none; }
a:hover { text-decoration: underline; }
p  { margin-bottom: .75rem; }
p:last-child { margin-bottom: 0; }

/* ── LAYOUT ─────────────────────────────────── */
.portaal-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── TOPBALK ────────────────────────────────── */
.topbalk {
  background: var(--blue-deep);
  color: var(--white);
  padding: 12px 16px;
}
.topbalk__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbalk__logo {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
  text-decoration: none;
}
.topbalk__nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.topbalk__nav a {
  color: var(--cyan);
  font-weight: 600;
  font-size: .9rem;
}
.topbalk__nav a:hover { color: var(--white); text-decoration: none; }

/* ── KAART / CONTAINER ──────────────────────── */
.kaart {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--schaduw);
  padding: 28px 24px;
  margin: 24px 0;
}

/* ── AUTH-PAGINA'S ──────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-kaart {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--schaduw);
  padding: 36px 32px;
  width: 100%;
  max-width: 440px;
}
.auth-kaart h1 {
  color: var(--blue-deep);
  margin-bottom: 6px;
}
.auth-kaart .subtitel {
  color: var(--grijs);
  font-size: .9rem;
  margin-bottom: 24px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 20px;
}
.auth-logo img { height: 60px; }

/* ── FORMULIEREN ────────────────────────────── */
.veld { margin-bottom: 18px; }
.veld label {
  display: block;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 5px;
  color: var(--text);
}
.veld label .verplicht { color: var(--fout); margin-left: 2px; }

.veld input[type="text"],
.veld input[type="email"],
.veld input[type="password"],
.veld input[type="date"],
.veld input[type="tel"],
.veld input[type="number"],
.veld select,
.veld textarea {
  width: 100%;
  padding: 10px 13px;
  border: 2px solid var(--grijs-licht);
  border-radius: 7px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s;
}
.veld input:focus,
.veld select:focus,
.veld textarea:focus {
  outline: none;
  border-color: var(--blue-mid);
}
.veld input.fout-veld,
.veld select.fout-veld,
.veld textarea.fout-veld {
  border-color: var(--fout);
}
.veld .fout-tekst {
  color: var(--fout);
  font-size: .82rem;
  margin-top: 4px;
}
.veld .hulp-tekst {
  color: var(--grijs);
  font-size: .82rem;
  margin-top: 4px;
}

/* ── KNOPPEN ────────────────────────────────── */
.knop {
  display: inline-block;
  padding: 11px 24px;
  border: none;
  border-radius: 7px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity .15s, transform .1s;
  line-height: 1.3;
  background: var(--orange);
  color: var(--white);
}
.knop:hover  { opacity: .88; text-decoration: none; }
.knop:active { transform: scale(.97); }
.knop:disabled { opacity: .5; cursor: not-allowed; }

.knop--primair  { background: var(--orange); color: var(--white); }
.knop--blauw    { background: var(--blue-mid); color: var(--white); }
.knop--grijs    { background: var(--grijs-licht); color: var(--text); }
.knop--gevaar   { background: var(--fout); color: var(--white); }
.knop--vol      { width: 100%; display: block; }
.knop--klein    { padding: 6px 14px; font-size: .85rem; }

/* ── MELDINGEN ──────────────────────────────── */
.melding {
  padding: 12px 16px;
  border-radius: 7px;
  margin-bottom: 16px;
  font-size: .9rem;
  font-weight: 600;
}
.melding--fout    { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.melding--ok      { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.melding--info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.melding--waarsch { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* ── STATUSBADGES ───────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge--nieuw        { background: #cfe2ff; color: #084298; }
.badge--afgedrukt    { background: #fff3cd; color: #664d03; }
.badge--ingeschreven { background: #d1e7dd; color: #0a3622; }
.badge--dubbel       { background: #f8d7da; color: #58151c; }

/* ── AANMELDSTATUS BANNER ───────────────────── */
.aanmeld-banner {
  padding: 10px 16px;
  border-radius: 7px;
  font-size: .9rem;
  margin-bottom: 20px;
  font-weight: 600;
}
.aanmeld-banner--open    { background: #d1e7dd; color: #0a3622; }
.aanmeld-banner--gesloten { background: #f8d7da; color: #58151c; }

/* ── LINKS ONDERAAN AUTH ────────────────────── */
.auth-links {
  margin-top: 20px;
  text-align: center;
  font-size: .88rem;
  color: var(--grijs);
}
.auth-links a { color: var(--blue-mid); font-weight: 700; }

/* ── FOOTER ─────────────────────────────────── */
.portaal-footer {
  text-align: center;
  padding: 20px 16px;
  font-size: .8rem;
  color: var(--grijs);
  margin-top: auto;
}

/* ── KNOP SECUNDAIR ─────────────────────────── */
.knop--secundair {
  background: var(--white);
  color: var(--blue-deep);
  border: 2px solid var(--blue-deep);
}
.knop--secundair:hover { background: var(--bg); }

/* ── GEDEELDE TOPBALK-ELEMENTEN ─────────────── */
.topbalk__nav--uitlog { color: var(--yellow) !important; font-weight: 700; }
.topbalk__nav--uitlog:hover { color: var(--white) !important; }
.topbalk__nav .actief { color: var(--white) !important; font-weight: 700; }

.topbalk__hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.topbalk__hamburger span {
  display: block;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.topbalk__hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.topbalk__hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.topbalk__hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

@media (max-width: 600px) {
  .topbalk { position: relative; }
  .topbalk__hamburger { display: flex; }
  .topbalk__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blue-deep);
    flex-direction: column;
    padding: 12px 16px 16px;
    gap: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
  }
  .topbalk__nav.is-open { display: flex; }
  .topbalk__nav a { padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 1rem; }
  .topbalk__nav a:last-child { border-bottom: none; }
}

/* ── BREEDTE-BEGRENZER ──────────────────────── */
.portaal-wrap--smal {
  max-width: 720px;
}

/* ── GEBRUIKER PORTAAL ──────────────────────── */
.gebruiker-wrap {
  padding-top: 28px;
  padding-bottom: 48px;
}
.gebruiker-welkom { margin-bottom: 8px; }
.gebruiker-welkom h1 { color: var(--blue-deep); }
.gebruiker-welkom p { color: var(--grijs); font-size: .95rem; margin-top: 4px; }

.sectie-kop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--grijs-licht);
}
.sectie-kop h2 { margin: 0; color: var(--blue-deep); }

.deelnemers-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.deelnemer-kaart {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--schaduw);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 4px solid var(--blue-mid);
}
.deelnemer-kaart--vergrendeld { border-left-color: var(--grijs); }

.deelnemer-kaart__hoofd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.deelnemer-kaart__naam { font-size: 1.1rem; font-weight: 800; color: var(--blue-deep); }
.slot-icoon { font-size: 1rem; flex-shrink: 0; opacity: .6; }

.deelnemer-kaart__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.deelnemer-kaart__acties { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tekst-slot { font-size: .82rem; color: var(--grijs); font-style: italic; }

.groep-badge {
  display: inline-block;
  background: #e8f4fd;
  color: var(--blue-deep);
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.overzicht-rij {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--schaduw);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}
.overzicht-rij__info { display: flex; flex-direction: column; gap: 3px; }
.overzicht-rij__naam { font-weight: 700; }
.overzicht-rij__meta { color: var(--grijs); font-size: .88rem; }
.overzicht-rij__acties { display: flex; gap: 8px; flex-wrap: wrap; }

.leeg-staat {
  text-align: center;
  padding: 28px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--schaduw);
  color: var(--grijs);
}
.leeg-staat p { margin-bottom: 14px; }


/* ── MODAL ──────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}
.modal__venster {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
  padding: 28px 24px;
  max-width: 440px;
  width: 100%;
  z-index: 1;
}
.modal__titel { color: var(--blue-deep); margin-bottom: 12px; }
.modal__venster p { margin-bottom: 16px; }
.modal__venster p:last-of-type { margin-bottom: 20px; }
.modal__acties { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── RESPONSIEF ─────────────────────────────── */
@media (max-width: 480px) {
  .auth-kaart { padding: 24px 18px; }
  .deelnemers-raster { grid-template-columns: 1fr; }
}
