/* =====================================================================
   Mijn11Tal — huisstijl
   Mobiel eerst. Alles boven 900px is een uitbreiding, geen uitgangspunt.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@100..125,400..800&display=swap');

:root {
  /* Kleur */
  --veld:        #0F2018;  /* diep grasgroen, de inkt van de app */
  --veld-op:     #1B3025;  /* iets lichter, voor vlakken op donker */
  --veld-rand:   #2C4536;
  --papier:      #F1F3EE;  /* ondergrond */
  --wit:         #FFFFFF;
  --lijn:        #DFE4DA;  /* krijtlijn: randen */
  --gras:        #157F4A;  /* acties */
  --gras-diep:   #10633A;
  --gras-licht:  #E8F2EB;
  --licht:       #F2B01E;  /* lichtmast: het enige dat schreeuwt */
  --licht-zacht: #FFF6E0;
  --kaart:       #C93A2B;  /* rood: kaarten en openstaand */
  --kaart-zacht: #FBEDEA;
  --tekst:       #14211A;
  --zacht:       #5C6B60;
  --flauw:       #8E9C91;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --nav-h: 62px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Archivo', system-ui, -apple-system, sans-serif;
  font-variation-settings: 'wdth' 100;
  background: var(--papier);
  color: var(--tekst);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}

/* Uitgerekt en zwaar: koppen, cijfers, scores. */
.uit {
  font-variation-settings: 'wdth' 122;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.cijfer {
  font-variation-settings: 'wdth' 118;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 { margin: 0; font-variation-settings: 'wdth' 122; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
p  { margin: 0; }

button, input, select { font-family: inherit; font-size: 15px; }
button { cursor: pointer; }

:focus-visible { outline: 2px solid var(--gras); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- merk */
.merk {
  font-variation-settings: 'wdth' 122;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 18px;
  color: var(--wit);
}
.merk b { color: var(--licht); font-weight: 800; }

/* -------------------------------------------------------------- balken */
.bovenbalk {
  background: var(--veld);
  color: var(--wit);
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.bovenbalk .titel { font-size: 16px; font-variation-settings: 'wdth' 122; font-weight: 700; }
.bovenbalk .sub { font-size: 12px; color: #93A899; margin-top: 1px; }

.terug {
  background: none; border: none; color: #B9C9BE; padding: 4px;
  display: flex; align-items: center; gap: 6px; font-size: 14px;
}

.icoonknop {
  background: rgba(255,255,255,.08); border: none; color: var(--wit);
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icoonknop:hover { background: rgba(255,255,255,.16); }

/* ------------------------------------------------------------ inhoud */
main { padding: 18px 16px 28px; max-width: 720px; margin: 0 auto; }
.sectiekop { margin-bottom: 14px; }
.sectiekop p { color: var(--zacht); font-size: 14px; margin-top: 3px; }

/* ------------------------------------------------------- wedstrijdkaart */
.matchday {
  background: var(--veld);
  color: var(--wit);
  border-radius: var(--r-l);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}
/* Krijtlijn in de hoek: verwijzing naar het veld, geen versiering zonder reden. */
.matchday::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 170px; height: 170px;
  border: 2px solid rgba(242,176,30,.16);
  border-radius: 50%;
}
.matchday .wanneer {
  font-size: 13px; color: var(--licht); font-weight: 600;
  text-transform: none; margin-bottom: 8px;
}
.matchday .tegen { font-size: 27px; line-height: 1.12; }
.matchday .plek { font-size: 14px; color: #93A899; margin-top: 6px; }
.matchday .beurten {
  display: flex; gap: 10px; margin-top: 20px;
  border-top: 1px solid var(--veld-rand); padding-top: 16px;
}
.matchday .beurt { flex: 1; min-width: 0; }
.matchday .beurt .wat { font-size: 12px; color: #93A899; margin-bottom: 3px; }
.matchday .beurt .wie {
  font-size: 15px; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.matchday.leeg { background: var(--veld-op); }

/* --------------------------------------------------------------- kaart */
.kaart {
  background: var(--wit);
  border: 1px solid var(--lijn);
  border-radius: var(--r-m);
  overflow: hidden;
}
.kaart + .kaart { margin-top: 12px; }
.kaartkop {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--lijn);
}
.kaartkop h3 { font-size: 15px; }

.regel {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 13px 16px; border-bottom: 1px solid #EDF0EA;
}
.regel:last-child { border-bottom: none; }
.regel.klik { cursor: pointer; }
.regel.klik:active { background: #F7F9F5; }
.regel.mijn { background: var(--gras-licht); }

.links { display: flex; align-items: center; gap: 11px; min-width: 0; }
.hoofd { font-size: 15px; font-weight: 600; }
.bij { font-size: 13px; color: var(--zacht); margin-top: 1px; }
.leegtekst { padding: 22px 16px; color: var(--flauw); font-size: 14px; text-align: center; }

/* ---------------------------------------------------------------- bol */
.bol {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--gras-licht); color: var(--gras-diep);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
  font-variation-settings: 'wdth' 118; font-weight: 700;
}
.bol.donker { background: var(--veld); color: var(--wit); }
.bol.groot { width: 52px; height: 52px; border-radius: 15px; font-size: 17px; }

/* -------------------------------------------------------------- labels */
.merkje {
  font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: 20px; white-space: nowrap;
}
.merkje.gras   { background: var(--gras-licht); color: var(--gras-diep); }
.merkje.stil   { background: #EFF1EC; color: var(--zacht); }
.merkje.licht  { background: var(--licht-zacht); color: #8A6410; }
.merkje.rood   { background: var(--kaart-zacht); color: var(--kaart); }
.merkje.donker { background: var(--veld); color: #9FB3A5; }

/* ------------------------------------------------------------- knoppen */
.knop {
  background: var(--gras); color: var(--wit); border: none;
  border-radius: 10px; padding: 12px 18px; font-size: 15px; font-weight: 600;
}
.knop:hover:not(:disabled) { background: var(--gras-diep); }
.knop:disabled { opacity: .45; cursor: default; }
.knop.vol { width: 100%; }
.knop.stil { background: var(--wit); border: 1px solid var(--lijn); color: var(--tekst); }
.knop.stil:hover { background: #F7F9F5; }
.knop.lijn { background: var(--wit); border: 1px solid var(--gras); color: var(--gras); }
.knop.gevaar { background: var(--kaart); }
.knop.klein { padding: 7px 13px; font-size: 13px; border-radius: 8px; }

/* ------------------------------------------------------------ formulier */
label { display: block; font-size: 13px; font-weight: 600; color: var(--zacht); margin-bottom: 6px; }
.veld { margin-bottom: 15px; }
input, select, textarea {
  width: 100%; padding: 12px 13px; border-radius: 10px;
  border: 1px solid var(--lijn); background: var(--wit); color: var(--tekst);
}
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--gras); }
.paar { display: flex; gap: 10px; }
.paar > * { flex: 1; min-width: 0; }

.keuze { display: flex; gap: 8px; }
.keuze button {
  flex: 1; padding: 11px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid var(--lijn); background: var(--wit); color: var(--zacht);
}
.keuze button.aan { background: var(--gras); border-color: var(--gras); color: var(--wit); }

/* -------------------------------------------------------------- bericht */
.bericht { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; line-height: 1.45; }
.bericht.fout  { background: var(--kaart-zacht); border: 1px solid #EBC6C0; color: #8A2E22; }
.bericht.goed  { background: var(--gras-licht); border: 1px solid #C4DECB; color: var(--gras-diep); }
.bericht.wacht { background: var(--licht-zacht); border: 1px solid #EFD79A; color: #8A6410; }

/* --------------------------------------------------------------- venster */
.overlay {
  position: fixed; inset: 0; background: rgba(15,32,24,.5);
  display: flex; align-items: flex-end; justify-content: center; z-index: 60;
}
.venster {
  background: var(--papier); width: 100%; max-width: 460px;
  border-radius: var(--r-l) var(--r-l) 0 0;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  max-height: 92vh; overflow: auto;
}
.venster-kop { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.venster-kop p { font-size: 13px; color: var(--zacht); margin-top: 3px; }
.sluit { background: none; border: none; color: var(--flauw); font-size: 26px; line-height: 1; padding: 0 4px; }

/* ------------------------------------------------------------- navigatie */
.navbalk {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--veld);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid var(--veld-rand);
}
.navbalk button {
  flex: 1; background: none; border: none; color: #7F9686;
  height: var(--nav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; position: relative;
}
.navbalk button.aan { color: var(--wit); }
.navbalk button.aan::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; background: var(--licht); border-radius: 0 0 3px 3px;
}
.navbalk .stip {
  position: absolute; top: 9px; right: calc(50% - 18px);
  width: 8px; height: 8px; border-radius: 50%; background: var(--licht);
}

/* --------------------------------------------------------------- breed */
@media (min-width: 900px) {
  body { padding-bottom: 0; display: flex; min-height: 100vh; }
  .navbalk {
    position: sticky; top: 0; left: auto; right: auto; bottom: auto;
    flex-direction: column; width: 216px; height: 100vh;
    padding: 16px 12px; border-top: none; border-right: 1px solid var(--veld-rand);
    align-self: flex-start;
  }
  .navbalk .navmerk { color: var(--wit); padding: 6px 10px 20px; }
  .navbalk button {
    flex: none; flex-direction: row; justify-content: flex-start;
    gap: 11px; height: auto; padding: 11px 12px; border-radius: 10px; font-size: 14.5px;
  }
  .navbalk button.aan { background: var(--gras); color: var(--wit); }
  .navbalk button.aan::before { display: none; }
  .navbalk .stip { position: static; margin-left: auto; }
  .rechterkant { flex: 1; min-width: 0; }
  .bovenbalk { padding: 16px 28px; }
  main { padding: 26px 28px 60px; max-width: 780px; margin: 0; }
  .overlay { align-items: center; }
  .venster { border-radius: var(--r-l); padding: 24px; }
}
@media (max-width: 899px) { .navmerk { display: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Invoervak voor meerdere wedstrijden tegelijk */
textarea { font-family: inherit; line-height: 1.6; }
code {
  background: #E7EBE4; padding: 1px 6px; border-radius: 5px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px;
}
