:root {
  --clubblauw: #1d4f91;
  --licht: #e6eef8;
  --achtergrond: #f3f6fa;
  --tekst: #1b1f24;
  --grijs: #5b6472;
  --rand: #e3e8ee;
  --winst: #1f7a45;
  --gelijk: #6b7280;
  --verlies: #c62828;
  --schaduw: 0 1px 3px rgba(0, 0, 0, .08);
  --tabs-hoogte: 64px;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--tekst);
  background: var(--achtergrond);
  line-height: 1.4;
}
button { font: inherit; cursor: pointer; }

/* --- Kop ------------------------------------------------------------------ */
.kop {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  background: var(--clubblauw); color: #fff;
}
.kop-logo { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; }
.kop h1 { margin: 0; font-size: 1.15rem; line-height: 1.2; }
.kop p { margin: 0; opacity: .85; font-size: .82rem; }

main {
  max-width: 640px; margin: 0 auto;
  padding: 16px 14px calc(var(--tabs-hoogte) + 24px + env(safe-area-inset-bottom));
}
h2 { font-size: 1.25rem; margin: 0 0 12px; }
h2 small { font-size: .85rem; font-weight: 400; color: var(--grijs); }
.melding { text-align: center; color: var(--grijs); margin: 24px 0; }
.fout { color: var(--verlies); }
.waarschuwing { background: #fff4d6; color: #6b4e00; border-radius: 10px; padding: 8px 12px; font-size: .85rem; margin: 0 0 12px; }
.voet { text-align: center; color: var(--grijs); font-size: .82rem; margin: 16px 0 0; }
.vak { background: #fff; border-radius: 14px; box-shadow: var(--schaduw); }

/* --- Tabbladen onderaan ----------------------------------------------------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--rand);
}
.tabs button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 52px; padding: 6px 0; border: 0; border-radius: 12px;
  background: transparent; color: var(--grijs); font-size: .75rem; font-weight: 600;
}
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-current="page"] { background: var(--licht); color: var(--clubblauw); }

/* --- Volgende wedstrijd ------------------------------------------------------ */
.titelregel { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.titelregel h2 { margin: 0; }
.chip { background: var(--clubblauw); color: #fff; font-size: .82rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.chip.rood { background: var(--verlies); }

.kaart { background: #fff; border-radius: 16px; box-shadow: var(--schaduw); overflow: hidden; }
.kaart-kop { background: var(--licht); color: var(--clubblauw); padding: 12px 16px; font-weight: 600; }
.kaart-kop small { font-size: inherit; font-weight: 400; color: #4a5361; }
.teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 8px; padding: 18px 12px 6px; text-align: center; }
.team { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.team .logo { width: 52px; height: 52px; }
.team .naam { font-weight: 600; font-size: .95rem; }
.team.eigen .naam { color: var(--clubblauw); font-weight: 700; }
.aftrap { display: flex; flex-direction: column; align-items: center; padding-top: 8px; }
.aftrap b { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.aftrap small { color: var(--grijs); font-size: .75rem; }
.bijtijden { margin: 0 0 14px; padding: 0 12px; text-align: center; font-size: .82rem; color: var(--grijs); }

.vakjes { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rand); }
.vakjes > div { padding: 12px 16px; }
.vakjes > div + div { border-left: 1px solid var(--rand); }
.vakjes small { display: block; font-size: .75rem; color: var(--grijs); }
.vakjes b { font-size: 1.05rem; }
.vakjes .onbekend { font-weight: 400; font-size: .92rem; color: var(--grijs); }
.regel-info { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--rand); }
.kleuren { display: flex; gap: 3px; }
.kleuren span { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.adres { padding: 12px 16px 16px; border-top: 1px solid var(--rand); display: flex; flex-direction: column; gap: 10px; }
.knop {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  border-radius: 12px; background: var(--clubblauw); color: #fff; text-decoration: none; font-weight: 700;
}
.knop svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.afgelast-balk { background: var(--verlies); color: #fff; text-align: center; font-weight: 700; padding: 6px; letter-spacing: .05em; }
.is-afgelast .teams, .is-afgelast .bijtijden { text-decoration: line-through; opacity: .6; }

.daarna {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  min-height: 56px; margin-top: 14px; padding: 10px 16px; border: 0; border-radius: 14px;
  background: #fff; box-shadow: var(--schaduw); text-align: left; color: var(--tekst);
}
.daarna small { display: block; color: var(--grijs); font-size: .75rem; }
.daarna b { font-weight: 600; }
.daarna svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--grijs); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.leeg { padding: 24px 16px; margin: 0; text-align: center; color: var(--grijs); }

/* --- Logo's en vorm ----------------------------------------------------------- */
.logo { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.ini {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--licht); color: var(--clubblauw); font-weight: 800; font-size: .7rem;
}
.team .ini { font-size: 1rem; }
.vorm { display: flex; gap: 3px; }
.blok {
  width: 18px; height: 18px; border-radius: 4px; color: #fff; font-size: .68rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.W { background: var(--winst); } .G { background: var(--gelijk); } .V { background: var(--verlies); }

/* --- Lijsten (programma, uitslagen) ----------------------------------------- */
.lijst { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: 14px; box-shadow: var(--schaduw); overflow: hidden; }
.maand { margin: 18px 4px 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #4a5361; }
.maand:first-child { margin-top: 0; }
.pauze { margin: 18px 0 0; padding: 6px; border: 1px dashed #c3ccd8; border-radius: 10px; text-align: center; font-size: .82rem; color: var(--grijs); }
.regel { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; }
.regel + .regel { border-top: 1px solid var(--rand); }
.datum { text-align: center; line-height: 1.15; }
.datum b { display: block; font-size: 1.15rem; }
.datum small { font-size: .75rem; color: var(--grijs); }
.wie { font-size: .92rem; min-width: 0; }
.wie div { display: flex; align-items: center; gap: 6px; }
.wie .eigen { font-weight: 700; }
.wie .tegen { font-weight: 600; }
.wie .sub { font-size: .78rem; color: var(--grijs); }
.label { font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--licht); color: var(--clubblauw); }
.pil { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--licht); color: var(--clubblauw); }
.pil.thuis { background: var(--clubblauw); color: #fff; }
.pil.afgelast { background: #fde8e8; color: #b71c1c; }
.regel.afgelast .wie, .regel.afgelast .datum { text-decoration: line-through; opacity: .55; }
.rechts { display: flex; align-items: center; gap: 8px; }
.score { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bol { width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.vorm-balk { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-bottom: 12px; font-weight: 600; font-size: .9rem; }
.vorm-balk small { font-weight: 400; color: var(--grijs); }
.vorm-balk .blok { width: 26px; height: 26px; border-radius: 50%; font-size: .75rem; }
.vorm-balk .vorm { gap: 6px; }

/* --- Stand -------------------------------------------------------------------- */
.tabel-wrap { overflow-x: auto; }
.stand { width: 100%; border-collapse: collapse; font-size: .92rem; }
.stand th, .stand td { padding: 10px 6px; text-align: center; }
.stand th:first-child, .stand td:first-child { padding-left: 14px; }
.stand th:last-child, .stand td:last-child { padding-right: 14px; font-weight: 800; }
.stand thead th { color: var(--grijs); font-weight: 600; font-size: .75rem; }
.stand tbody td { border-top: 1px solid var(--rand); }
.stand .links { text-align: left; }
.stand td.links div { display: flex; align-items: center; gap: 8px; }
.stand tr.eigen td { background: var(--licht); color: var(--clubblauw); font-weight: 700; }

/* Smal scherm: W/GL/V verbergen; breder (telefoon gedraaid): tonen */
@media (max-width: 479px) { .breed { display: none; } }
@media (min-width: 480px) { .smal-alleen { display: none; } }
