/* Keeperstraining E.M.M. '21 — clubkleuren: zwart, wit en rood (uit het logo). */
:root {
  --club-black: #0a0a0a;
  --club-red: #e20917;
  --club-white: #ffffff;
  --primary: var(--club-red);
  --primary-dark: #b8060f;
  --primary-soft: #fde8e9;
  --accent: var(--club-red);
  --ink: #16181c;
  --muted: #6b7785;
  --line: #e2e6ea;
  --bg: #f4f6f8;
  --card: #ffffff;
  --danger: #b8060f;
  --danger-soft: #fde8e9;
  --warn: #b7791f;
  --warn-soft: #fff6e0;
  --ok: #2f855a;
  --ok-soft: #e6f4ea;
  --wa: #25d366;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ---------- Header & navigatie ---------- */
.topbar {
  background: var(--club-black);
  color: #fff;
  border-bottom: 3px solid var(--club-red);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.topbar-inner { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.brand-row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 40px; width: auto; display: block; }
.brand small { color: rgba(255,255,255,.75); font-weight: 400; display: block; font-size: .75rem; line-height: 1; }
.userbox { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.userbox form { margin: 0; }
.link-btn { background: none; border: 0; color: #fff; text-decoration: underline; cursor: pointer; font: inherit; padding: 4px; }
.nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: rgba(255,255,255,.85); text-decoration: none; padding: 6px 12px; border-radius: 999px; white-space: nowrap; font-size: .95rem;
}
.nav a:hover { background: rgba(255,255,255,.14); }
.nav a.active { background: var(--club-red); color: #fff; font-weight: 600; }
.nav .badge { margin-left: 4px; }

/* ---------- Layout ---------- */
main { max-width: 1040px; margin: 0 auto; padding: 20px 16px 48px; }
.narrow { max-width: 520px; margin: 0 auto; }
.grid { display: grid; gap: 16px; }
@media (min-width: 760px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-main { grid-template-columns: 1.4fr 1fr; align-items: start; }
}
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0;
}
.card > :last-child { margin-bottom: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }

/* ---------- Knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--primary); color: #fff; border: 1px solid var(--primary); border-radius: 10px;
  padding: 10px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 44px;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-secondary { background: #fff; color: var(--primary); }
.btn-secondary:hover { background: var(--primary-soft); color: var(--primary-dark); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c5bf; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #073b1f; }
.btn-wa:hover { background: #1ebe5b; border-color: #1ebe5b; }
.btn-sm { padding: 6px 10px; min-height: 34px; font-size: .9rem; }
.btn-block { width: 100%; }
.inline { display: inline; margin: 0; }

/* ---------- Formulieren ---------- */
label { display: block; font-weight: 600; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.field small { display: block; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=number], input[type=url], input[type=file], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cfd6dd; border-radius: 10px; background: #fff; color: var(--ink); min-height: 44px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--primary-soft); border-color: var(--primary); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; width: 18px; height: 18px; }
.hp { position: absolute; left: -9999px; }
.choice-grid { display: grid; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block; border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 600;
}
.choice span small { display: block; font-weight: 400; }
.choice input:checked + span { border-color: var(--ok); background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok); }
.choice input:focus-visible + span { outline: 3px solid var(--ok-soft); }

/* ---------- Meldingen ---------- */
.flash { border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid transparent; }
.flash-success { background: var(--ok-soft); border-color: #bfe3cb; }
.flash-error { background: var(--danger-soft); border-color: #f3c1ba; }
.flash-info { background: #eaf2fb; border-color: #c7dcf3; }
.errors { margin: 0; padding-left: 18px; }

/* ---------- Badges & statussen ---------- */
.badge {
  display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--ink); vertical-align: middle;
}
.badge-short { background: var(--danger-soft); color: var(--danger); }
.badge-ok { background: var(--warn-soft); color: var(--warn); }
.badge-full { background: var(--ok-soft); color: var(--ok); }
.badge-cancel { background: #eceff3; color: var(--muted); }
.badge-me { background: var(--primary); color: #fff; }
.badge-accent { background: var(--club-red); color: #fff; }
.badge-all { background: var(--club-black); color: #fff; }

/* ---------- Avond-lijsten ---------- */
.evening-list { list-style: none; margin: 0; padding: 0; }
.evening-list li { border-top: 1px solid var(--line); }
.evening-list li:first-child { border-top: 0; }
.evening-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; text-decoration: none; color: inherit; }
.evening-item:hover .ev-date { color: var(--primary); }
.ev-date { font-weight: 700; }
.ev-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }

.groups { display: grid; gap: 12px; }
@media (min-width: 560px) { .groups { grid-template-columns: 1fr 1fr; } }
.group { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.group.short { border-color: #f3c1ba; background: #fffafa; }
.group h3 { margin-bottom: 2px; }
.group ul { list-style: none; padding: 0; margin: 8px 0 0; }
.group li { padding: 4px 0; display: flex; justify-content: space-between; gap: 8px; }
.meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 8px; }
.meter span { display: block; height: 100%; background: var(--ok); }
.group.short .meter span { background: var(--danger); }
.group.ok .meter span { background: var(--warn); }

.hero {
  background: var(--club-black); color: #fff; border-radius: var(--radius); padding: 20px; border-left: 6px solid var(--club-red);
}
.hero a:not(.btn) { color: #fff; }
.hero .muted, .hero small { color: rgba(255,255,255,.8); }
.hero .btn-secondary { border-color: #fff; color: var(--club-black); }
.hero .btn-secondary:hover { background: #f1f1f1; color: var(--club-black); }

/* ---------- Tabel / schema ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tr.cancelled td { color: var(--muted); text-decoration: line-through; }
tr.cancelled td .badge { text-decoration: none; }
tr.is-today td { background: var(--primary-soft); }
.names { display: flex; flex-wrap: wrap; gap: 4px; }
.name-chip { background: #f0f3f6; border-radius: 6px; padding: 1px 7px; font-size: .88rem; white-space: nowrap; }
.name-chip.me { background: var(--primary); color: #fff; }

/* ---------- Materiaal ---------- */
.pdf-frame { display: none; width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: 10px; background: #fafafa; }
.video-list { list-style: none; margin: 0; padding: 0; }
.video-list li { border-top: 1px solid var(--line); }
.video-list li:first-child { border-top: 0; }
.video-list a.video { display: flex; align-items: center; gap: 12px; padding: 12px 0; text-decoration: none; color: inherit; font-weight: 600; }
.play { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.empty { text-align: center; color: var(--muted); padding: 18px 8px; }

.swap { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.swap + .swap { margin-top: 10px; }

details summary { cursor: pointer; font-weight: 600; color: var(--primary); }
details[open] summary { margin-bottom: 10px; }

.landing-hero { text-align: center; padding: 28px 8px 8px; }
.landing-hero h1 { font-size: 2rem; }
.landing-logo { width: 140px; height: auto; margin: 0 auto 12px; display: block; }
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 16px 40px; }

@media (min-width: 760px) { .pdf-frame { display: block; } }

@media print {
  .topbar, .btn, form, .footer { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

fieldset { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
legend { padding: 0; margin-bottom: 6px; }
