/* Privé HQ — alleen dark mode. Breekpunten: telefoon < 700, tablet 700–1279, desktop ≥ 1280. */
:root {
  color-scheme: dark;
  --bg: #0e1014;
  --surface: #171a21;
  --surface-2: #1f232c;
  --line: #2a2f3a;
  --text: #e9ebef;
  --muted: #9aa1ad;
  --accent: #2dd4bf;          /* eigen accent: zeegroen */
  --accent-ink: #062a25;
  --warn: #f59e0b;
  --danger: #f87171;
  --ok: #4ade80;
  --pec: #3b82f6;
  --oranje: #ff8a1f;
  --f1: #a78bfa;
  --reds: #ef4444;
  --radius: 14px;
  --tap: 48px;
  --nav-h: 64px;
  --side-w: 220px;
  --side-w-mini: 76px;
  font-size: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 6px; font-size: .9em; }
.muted { color: var(--muted); }
.icon { width: 24px; height: 24px; flex: none; }

/* ---------- Navigatie: telefoon = balk onderin ---------- */
.nav {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  display: flex; justify-content: space-around; align-items: stretch;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(23, 26, 33, .96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.nav-brand, .nav-secondary { display: none; }
.nav-item {
  flex: 1; min-height: var(--tap);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: .75rem;
  background: none; border: 0; font: inherit; cursor: pointer;
}
.nav-item.active { color: var(--accent); }
.nav-logout { display: contents; }
.main { padding: 1rem 1rem calc(var(--nav-h) + 1.5rem + env(safe-area-inset-bottom)); max-width: 1500px; }
.main-bare { padding-bottom: 1rem; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }

/* ---------- Tablet en desktop: zijbalk ---------- */
@media (min-width: 700px) {
  .nav {
    inset: 0 auto 0 0; width: var(--side-w-mini); height: 100vh;
    flex-direction: column; justify-content: flex-start; gap: .25rem;
    padding: 1rem .5rem; border-top: 0; border-right: 1px solid var(--line);
  }
  .nav-brand { display: flex; justify-content: center; align-items: center; gap: .6rem; height: var(--tap); margin-bottom: .75rem; font-weight: 700; }
  .nav-brand .label { display: none; }
  .nav-secondary { display: flex; }
  .nav-logout { display: block; margin-top: auto; }
  .nav-logout .nav-item { width: 100%; }
  .nav-item { flex: none; min-height: 56px; border-radius: 12px; font-size: .7rem; }
  .nav-item:hover { background: var(--surface-2); color: var(--text); }
  .nav-item.active { background: var(--surface-2); }
  .nav-item.nav-secondary { margin-top: auto; }
  .nav-item.nav-secondary + .nav-logout { margin-top: 0; }
  .main { margin-left: var(--side-w-mini); padding: 1.5rem 1.5rem 2rem; }
  .main-bare { margin-left: 0; }
}
/* Liggend (tablet) en desktop: volledige zijbalk met labels. */
@media (min-width: 700px) and (orientation: landscape), (min-width: 1280px) {
  .nav { width: var(--side-w); padding: 1.25rem .75rem; }
  .nav-brand { justify-content: flex-start; padding: 0 .75rem; }
  .nav-brand .label { display: inline; font-size: 1.15rem; }
  .nav-item { flex-direction: row; justify-content: flex-start; gap: .85rem; padding: 0 .9rem; font-size: 1rem; min-height: 52px; }
  .main { margin-left: var(--side-w); padding: 2rem 2.25rem; }
}

/* ---------- Bouwstenen ---------- */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head p { margin: 0; }
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) and (orientation: landscape), (min-width: 1280px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.span-all { grid-column: 1 / -1; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; min-width: 0;
}
.card-link { display: block; color: inherit; text-decoration: none; }
.card-link:hover { border-color: var(--accent); }
.card-kicker { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.card-title { font-size: 1.15rem; font-weight: 650; }
.card-meta { color: var(--muted); margin-top: .25rem; }
.big { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); margin-top: .4rem; }
.empty { text-align: left; color: var(--muted); }
.empty h1 { color: var(--text); }
.stack { display: flex; flex-direction: column; gap: .85rem; }
.alert { background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .4); color: #fecaca; padding: .7rem .9rem; border-radius: 10px; margin: 0 0 1rem; }

.team-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.team-pec { background: var(--pec); }
.team-oranje { background: var(--oranje); }
.team-f1 { background: var(--f1); }
.team-reds { background: var(--reds); }

/* ---------- Formulieren en knoppen ---------- */
label { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; color: var(--muted); }
input, select {
  min-height: var(--tap); padding: .6rem .8rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
input:focus, select:focus, .btn:focus-visible, .nav-item:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--tap); padding: 0 1.1rem; font: inherit; font-weight: 600;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-small { min-height: 40px; padding: 0 .8rem; font-size: .9rem; }

/* ---------- Lijsten ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.row-item { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--line); min-height: var(--tap); flex-wrap: wrap; }
.row-item:first-child { border-top: 0; }
.row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row-actions { width: 100%; }
.row-actions summary { list-style: none; }
.row-actions[open] > summary { margin-bottom: .75rem; }
.row-actions form { margin-bottom: .75rem; }
.tag { font-size: .75rem; padding: .15rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tag-ok { color: var(--ok); }
.tag-warn { color: var(--warn); }
.tag-accent { color: var(--accent); }

/* ---------- Inloggen ---------- */
.login { max-width: 420px; margin: 8vh auto 0; }
.login-brand { display: flex; align-items: center; gap: .6rem; font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; }

/* ---------- Speelschema ---------- */
.subnav { display: flex; gap: .5rem; overflow-x: auto; margin-bottom: 1rem; padding-bottom: .25rem; }
.subnav a { flex: none; }
.subnav a.active { border-color: var(--accent); color: var(--accent); }
.day-group + .day-group { margin-top: 1rem; }
.day-head { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .25rem; }
.fixture { display: grid; grid-template-columns: 3.6rem 1fr; gap: .25rem .85rem; align-items: center; padding: .65rem 0; border-top: 1px solid var(--line); min-height: var(--tap); }
.fixture:first-child { border-top: 0; }
.fixture-time { font-variant-numeric: tabular-nums; font-weight: 650; }
.fixture-time small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; }
.fixture-body { min-width: 0; }
.fixture-title { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.fixture-title span:last-child { overflow: hidden; text-overflow: ellipsis; }
.fixture-meta { color: var(--muted); font-size: .88rem; }
.fixture.is-past { opacity: .45; }
.gp { border-top: 1px solid var(--line); }
.gp:first-of-type { border-top: 0; }
.gp > summary { display: flex; align-items: center; gap: .75rem; padding: .8rem 0; min-height: var(--tap); cursor: pointer; list-style: none; }
.gp > summary::-webkit-details-marker { display: none; }
.gp-round { color: var(--muted); font-variant-numeric: tabular-nums; width: 2rem; }
.gp.is-past > summary { opacity: .5; }
.gp-sessions { padding: 0 0 .75rem 2.75rem; }
.gp-sessions .fixture { grid-template-columns: 7.5rem 1fr; }
.month-head { margin: 1.25rem 0 .25rem; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.month-head:first-child { margin-top: 0; }
