/* Streepjeslijst — mobile-first, licht en speels, geen framework. */

:root {
  --kleur-bg: #f4f6fb;
  --kleur-kaart: #ffffff;
  --kleur-tekst: #1f2733;
  --kleur-muted: #6b7688;
  --kleur-primair: #4f7cff;
  --kleur-primair-donker: #3b63d6;
  --kleur-accent: #ffb020;
  --kleur-ok: #2fae66;
  --kleur-warn: #e08a00;
  --kleur-danger: #e05353;
  --kleur-rand: #e4e8f0;
  --schaduw: 0 2px 8px rgba(31, 39, 51, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--kleur-bg);
  color: var(--kleur-tekst);
  line-height: 1.5;
}

/* ---------- Layout ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--kleur-primair);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.brand-icon { font-size: 1.3rem; }
.topnav a {
  color: #fff;
  text-decoration: none;
  margin-left: 1rem;
  font-weight: 600;
  opacity: 0.92;
}
.topnav a:hover { opacity: 1; text-decoration: underline; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

.footer {
  text-align: center;
  color: var(--kleur-muted);
  font-size: 0.85rem;
  padding: 1.5rem 1rem 2.5rem;
}

/* ---------- Titels ---------- */
.page-title { font-size: 1.6rem; margin: 0.5rem 0; }
.subtitle { color: var(--kleur-muted); margin-top: 0; }

/* ---------- Flash-berichten ---------- */
.flashes { margin-bottom: 1rem; }
.flash {
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.flash-success { background: #e6f7ee; color: #176c40; border-color: #b7e6cd; }
.flash-danger  { background: #fdeaea; color: #b02a2a; border-color: #f5c6c6; }
.flash-warning { background: #fff5e0; color: #9a6400; border-color: #ffe3a8; }
.flash-info    { background: #e9f0ff; color: #2b4db8; border-color: #cdddff; }

/* ---------- Kaarten ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.person-card {
  display: block;
  background: var(--kleur-kaart);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--schaduw);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.person-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(31,39,51,0.12); }
.person-card.static:hover { transform: none; }
.person-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.person-name { font-weight: 700; font-size: 1.1rem; }

.score { display: flex; align-items: baseline; gap: 0.4rem; margin: 0.3rem 0; }
.score-num { font-size: 2rem; font-weight: 800; color: var(--kleur-primair); }
.score-label { color: var(--kleur-muted); font-size: 0.9rem; }

.laatste { font-size: 0.85rem; color: var(--kleur-tekst); margin-top: 0.5rem; }

/* ---------- Streepjes (dots) ---------- */
.progress-line { display: flex; align-items: center; gap: 0.5rem; margin: 0.4rem 0; }
.dots { font-size: 1.3rem; letter-spacing: 0.12rem; line-height: 1; }
.dots.big { font-size: 1.8rem; }
.dot-vol { color: var(--kleur-accent); }
.dot-leeg { color: #cdd4e0; }
.progress-text { color: var(--kleur-muted); font-size: 0.9rem; font-weight: 600; }
.progress-line.big .progress-text { font-size: 1.05rem; }

/* ---------- Avatars ---------- */
.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--kleur-primair);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  flex: 0 0 auto;
}
.avatar-groot { width: 72px; height: 72px; font-size: 1.8rem; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.4rem;
}
.badge-reprimande { background: #ffe0e0; color: #c02b2b; }
.badge-ok { background: #e6f7ee; color: #176c40; }
.badge-off { background: #eceff4; color: #6b7688; }

/* ---------- Panelen & tabellen ---------- */
.panel {
  background: var(--kleur-kaart);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
  box-shadow: var(--schaduw);
}
.panel.highlight { border-color: var(--kleur-primair); border-width: 2px; }
.panel h2 { margin-top: 0; font-size: 1.2rem; }

.tabel { width: 100%; border-collapse: collapse; }
.tabel th, .tabel td {
  text-align: left;
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--kleur-rand);
  vertical-align: middle;
}
.tabel th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--kleur-muted); }
.tabel .num { text-align: right; }
.muted { color: var(--kleur-muted); }
.hint { color: var(--kleur-muted); font-size: 0.85rem; display: block; margin-top: 0.3rem; }

/* ---------- Knoppen ---------- */
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--kleur-rand);
  background: #fff;
  color: var(--kleur-tekst);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { background: #f0f3fa; }
.btn-primary { background: var(--kleur-primair); border-color: var(--kleur-primair); color: #fff; }
.btn-primary:hover { background: var(--kleur-primair-donker); }
.btn-small { padding: 0.35rem 0.6rem; font-size: 0.82rem; }
.btn-big { padding: 0.9rem 1.2rem; font-size: 1.1rem; width: 100%; margin-top: 0.5rem; }
.btn-block { width: 100%; }
.btn-warn { color: var(--kleur-warn); border-color: #ffe3a8; }
.btn-danger { color: var(--kleur-danger); border-color: #f5c6c6; }
.btn-warn:hover { background: #fff5e0; }
.btn-danger:hover { background: #fdeaea; }

/* ---------- Formulieren ---------- */
.form { max-width: 480px; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field-check { display: flex; align-items: center; gap: 0.5rem; }
.field-check label { margin: 0; font-weight: 500; }
.input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--kleur-rand);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
.input:focus { outline: 2px solid var(--kleur-primair); border-color: var(--kleur-primair); }
.input-narrow { max-width: 140px; }
textarea.input { resize: vertical; }
.err { color: var(--kleur-danger); font-size: 0.85rem; display: block; margin-top: 0.25rem; }

.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.acties { white-space: nowrap; }
.acties .btn { margin: 0.1rem 0.1rem; }
.inline { display: inline; }
.back-link { display: inline-block; margin-bottom: 0.5rem; color: var(--kleur-primair); text-decoration: none; font-weight: 600; }
.back-link:hover { text-decoration: underline; }

.empty { text-align: center; padding: 2rem 1rem; color: var(--kleur-muted); }

.detail-head { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; }

.login-wrap { max-width: 380px; margin: 2rem auto; }

/* ---------- Snelle registratie ---------- */
.quick-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }

/* ---------- Admin-layout ---------- */
.admin-layout { display: block; }
.admin-nav {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--kleur-rand);
}
.admin-nav a {
  white-space: nowrap;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--kleur-tekst);
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--kleur-rand);
}
.admin-nav a.active { background: var(--kleur-primair); color: #fff; border-color: var(--kleur-primair); }

/* ---------- Responsief: tablet & desktop ---------- */
@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .page-title { font-size: 2rem; }
}

@media (min-width: 900px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-grid { grid-template-columns: 2fr 2fr 3fr; }
  .admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; }
  .admin-nav {
    flex-direction: column;
    overflow: visible;
    border-bottom: none;
    border-right: 1px solid var(--kleur-rand);
    padding-right: 0.5rem;
    margin-bottom: 0;
  }
}
