/* NM Vrijwilligers — basisstijl (schil, knoppen, formulieren, lijsten, modal, tabbalk, meldingen).
   Kleuren en maten alleen via tokens.css. Modules (kaart, bureau, veld) hebben hun eigen css-bestand. */

@font-face { font-family: "Inter"; font-weight: 300; font-style: normal; font-display: swap; src: url("fonts/Inter-Light.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/Inter-Medium.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--kleur-pagina); color: var(--kleur-tekst);
  font-family: var(--font); font-weight: var(--gewicht-tekst); font-size: var(--maat-tekst); line-height: var(--regel);
  min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: var(--gewicht-kop); line-height: 1.25; margin: 0 0 var(--r-3); }
h1 { font-size: var(--maat-h1); } h2 { font-size: var(--maat-h2); } h3 { font-size: var(--maat-h3); }
.veld h1 { font-size: var(--maat-kop); } .veld h2 { font-size: var(--maat-kop); }
p { margin: 0 0 var(--r-3); }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
strong, b, .nadruk { font-weight: var(--gewicht-nadruk); }
.klein { font-size: var(--maat-klein); color: var(--kleur-tekst-2); }
.mini  { font-size: var(--maat-mini); color: var(--kleur-tekst-2); }
[hidden] { display: none !important; }

/* Kopbalk: wit, 3 px bovenlijn blauw, onderrand 1 px */
.kopbalk {
  position: sticky; top: 0; z-index: 20; background: var(--kleur-achtergrond);
  border-top: 3px solid var(--nm-blauw); border-bottom: 1px solid var(--kleur-rand);
  padding: calc(var(--r-2) + env(safe-area-inset-top)) var(--gutter) var(--r-2);
  display: flex; align-items: center; gap: var(--r-3); min-height: 52px;
}
.kopbalk .titel { font-weight: 300; font-size: var(--maat-h3); letter-spacing: .01em; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopbalk .logo { height: 30px; width: auto; display: block; flex: none; }   /* NM-logo (besluit 17-9-2026, feedback 22) */
.kopbalk #kopbalk-groep { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
@media (max-width: 599px) { .kopbalk .titel { display: none; } .kopbalk #kopbalk-groep { flex: 1; max-width: none; text-align: right; } }

/* Menu linksboven (feedback boswachters 25-9): ververs, lagen aan/uit, klus of jachtgebied kiezen, help. */
.kop-menu-knop {
  flex: none; display: inline-flex; align-items: center; gap: var(--r-1); min-height: 44px; padding: 0 var(--r-2);
  border: 1px solid var(--kleur-rand); border-radius: var(--radius); background: var(--kleur-achtergrond);
  color: var(--nm-blauw); font: inherit; font-size: var(--maat-klein); cursor: pointer;
}
.kop-menu-knop svg { width: 22px; height: 22px; }
.kop-menu-knop:hover { background: var(--kleur-vlak); }
.kop-menu-knop[aria-expanded="true"] { background: var(--nm-blauw); border-color: var(--nm-blauw); color: #fff; }
/* donkere modus (tokens.css): NM-blauw op bijna-zwart is onleesbaar (Gjalt 26-9) → knop in de teksttint */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kop-menu-knop:not([aria-expanded="true"]) { color: var(--kleur-tekst); } }
/* het woord "Menu" blijft ook op een smalle telefoon staan — de boswachters moeten het kunnen vínden;
   op heel smalle schermen wijkt de groepsnaam ernaast (die heeft al een afkapping) */
@media (max-width: 359px) { .kop-menu-knop span { display: none; } }
.kop-menu {
  position: fixed; z-index: 35; left: var(--gutter); top: calc(52px + env(safe-area-inset-top));
  width: min(320px, calc(100vw - 2 * var(--gutter)));
  background: var(--kleur-achtergrond); border: 1px solid var(--kleur-rand); border-radius: var(--radius-kaart); box-shadow: var(--schaduw-zwevend); overflow-y: auto; overscroll-behavior: contain;
}
.kop-menu ul { list-style: none; margin: 0; padding: 0; }
.kop-menu li + li { border-top: 1px solid var(--kleur-rand); }
.kop-menu button {
  display: block; width: 100%; min-height: 56px; padding: var(--r-2) var(--r-4); border: 0; background: transparent;
  font: inherit; text-align: left; color: var(--kleur-tekst); cursor: pointer;
}
.kop-menu button:hover, .kop-menu button:focus-visible { background: var(--kleur-vlak); }
.kop-menu .titel { display: block; }
.kop-menu .sub { display: block; font-size: var(--maat-klein); color: var(--kleur-tekst-2); }
@media (min-width: 900px) { .bureau .kop-menu { left: calc(96px + var(--gutter)); } }

/* Schermen */
#schermen { max-width: var(--breedte-max); margin: 0 auto; }
/* Kaartschermen en de Week-tabel gebruiken de volle breedte (Gjalt 20-9: kaart begrensd op laptop). */
body[data-scherm="kaart"] #schermen, body[data-scherm="week"] #schermen, body[data-scherm="jacht"] #schermen, body[data-scherm="snelplan"] #schermen, body[data-scherm="opdracht"] #schermen { max-width: none; }
.scherm { padding: var(--r-4) var(--gutter) calc(var(--r-8) + var(--tikdoel) + env(safe-area-inset-bottom)); }
.scherm-smal { max-width: 480px; margin: 0 auto; }
.scherm-kop { display: flex; align-items: center; gap: var(--r-2); margin-bottom: var(--r-4); }
.scherm-kop h1 { margin: 0; flex: 1; }
.blok { margin-bottom: var(--r-6); }
.blok h2 { font-size: var(--maat-klein); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; margin-bottom: var(--r-2); }
.regel { display: flex; justify-content: space-between; gap: var(--r-3); padding: var(--r-2) 0; border-bottom: 1px solid var(--kleur-rand); }
.regel:last-child { border-bottom: 0; }
.kolom { display: flex; flex-direction: column; gap: var(--r-3); }
.rij { display: flex; gap: var(--r-3); align-items: center; flex-wrap: wrap; }
.rij > .groei { flex: 1; }

/* Knoppen: secundair (wit, 1 px rand) is de standaard; primair magenta max. één per scherm */
.knop {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--r-2);
  min-height: var(--tikdoel); padding: 0 var(--r-4); border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--kleur-rand); background: var(--kleur-achtergrond); color: var(--kleur-tekst);
  font-weight: var(--gewicht-nadruk); text-decoration: none; -webkit-tap-highlight-color: transparent; user-select: none;
}
.knop:hover { background: var(--kleur-vlak-hover); }                              /* alleen de witte standaardknop */
.knop-prim:hover, .knop-groen:hover, .knop-oranje:hover { filter: brightness(.92); }  /* gekleurde knoppen: verdonkeren binnen eigen kleur */
.knop:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.knop:disabled { opacity: .5; cursor: default; }
.knop-prim { background: var(--primair); border-color: var(--primair); color: #fff; }
.knop-prim:hover { background: var(--primair); }
.knop-groen { background: var(--succes); border-color: var(--succes); color: #fff; }
.knop-groen:hover { background: var(--succes); }
.knop-txt { border-color: transparent; background: transparent; color: var(--accent); padding: 0 var(--r-2); }
.knop-txt:hover { background: var(--kleur-vlak); }
.knop-oranje { color: var(--waarschuwing); border-color: var(--waarschuwing); background: var(--kleur-achtergrond); }
.knop-oranje:hover { background: var(--nm-oranje-licht); filter: none; }
.knop-breed { width: 100%; }
.knop-veld { width: 100%; min-height: 64px; font-size: var(--maat-tekst); }
.knop-klein { min-height: 36px; padding: 0 var(--r-3); font-size: var(--maat-klein); }
.terug { min-width: var(--tikdoel); padding: 0 var(--r-2); }
.terug svg { width: 24px; height: 24px; }
.knop svg { width: 22px; height: 22px; flex: none; }

/* Formulieren: alleen onderlijn (NM-stijl), foutmelding oranje */
.veldgroep { display: flex; flex-direction: column; gap: var(--r-1); margin-bottom: var(--r-4); }
.veldgroep label, .label { font-size: var(--maat-klein); color: var(--kleur-tekst-2); font-weight: 500; }
.invoer, input.invoer, select.invoer, textarea.invoer {
  width: 100%; min-height: var(--tikdoel); padding: var(--r-2) 0; margin: 0;
  border: 0; border-bottom: 1px solid var(--kleur-rand); border-radius: 0; background: transparent;
  color: var(--kleur-tekst); font: inherit; font-weight: 400; -webkit-appearance: none; appearance: none;
}
.veld .invoer { min-height: 56px; }
.invoer:focus { border-bottom: 2px solid var(--focus); outline: none; }
textarea.invoer { resize: vertical; line-height: 1.4; }
select.invoer { background-image: linear-gradient(45deg, transparent 50%, var(--kleur-tekst-2) 50%), linear-gradient(135deg, var(--kleur-tekst-2) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.invoer-met-knop { display: flex; align-items: flex-end; gap: var(--r-2); }
.invoer-met-knop .invoer { flex: 1; }
.invoer-met-knop .invoer { min-width: 0; }
.invoer-met-knop .tijd-wis { flex: none; min-width: 44px; padding: 0; }
.invoer-met-knop .invoer:invalid + .tijd-wis { display: none; }
.fout-tekst { color: var(--waarschuwing); font-size: var(--maat-klein); min-height: 1.4em; }
.vink { display: flex; align-items: center; gap: var(--r-3); min-height: var(--tikdoel); cursor: pointer; }
.vink input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.keuze { display: flex; gap: var(--r-2); flex-wrap: wrap; }
.keuze .knop[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
/* stand bij een klus voor boswachters/beheerders: Uitvoeren | Bewerken (Gjalt 1-10) */
.klus-modus { flex-wrap: nowrap; margin: 0 0 var(--r-3); }
.klus-modus .knop { flex: 1; }

/* Lijsten en kaartjes: wit, 1 px rand, geen schaduw */
.lijst { list-style: none; margin: 0 0 var(--r-4); padding: 0; border: 1px solid var(--kleur-rand); border-radius: var(--radius); background: var(--kleur-achtergrond); }
.lijst > li { border-bottom: 1px solid var(--kleur-rand); }
.lijst > li:last-child { border-bottom: 0; }
.lijst-item {
  display: flex; align-items: center; gap: var(--r-3); width: 100%; text-align: left;
  min-height: var(--tikdoel); padding: var(--r-3) var(--r-4); background: transparent; border: 0; cursor: pointer; color: inherit;
}
.lijst-item:hover { background: var(--kleur-vlak-hover); }
.lijst-item .tekst { flex: 1; min-width: 0; }
.lijst-item .sub { font-size: var(--maat-klein); color: var(--kleur-tekst-2); }
.lijst-item .rechts { color: var(--kleur-tekst-2); font-size: var(--maat-klein); white-space: nowrap; }
.kaartje { border: 1px solid var(--kleur-rand); border-radius: var(--radius); padding: var(--r-4); background: var(--kleur-achtergrond); margin-bottom: var(--r-3); }
.kaartje h3 { margin-bottom: var(--r-2); }
.chip { display: inline-block; padding: 2px var(--r-2); border-radius: var(--radius); font-size: var(--maat-mini); font-weight: 500; background: var(--kleur-vlak); color: var(--kleur-tekst-2); border: 1px solid var(--kleur-rand); }
.chip-blauw { color: var(--accent); border-color: var(--accent); background: transparent; }
.chip-oranje { color: var(--waarschuwing); background: var(--nm-oranje-licht); border-color: transparent; }
.chip-groen { color: #3f6a0f; background: var(--nm-groen-licht); border-color: transparent; }
.chip-teal { color: #fff; background: var(--nm-teal); border-color: transparent; }
.leeg { text-align: center; color: var(--kleur-tekst-2); padding: var(--r-12) var(--gutter); }
.leeg h2 { color: var(--kleur-tekst); }
.tabel { width: 100%; border-collapse: collapse; font-size: var(--maat-klein); }
.tabel th, .tabel td { text-align: left; padding: var(--r-2) var(--r-2); border-bottom: 1px solid var(--kleur-rand); vertical-align: top; }
.tabel th { font-weight: 500; color: var(--kleur-tekst-2); }

/* Tabbalk onderin (telefoon) met safe-area; op desktop links in de bureau-weergave */
.tabbalk {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  background: var(--kleur-tabbalk); color: var(--kleur-tabbalk-tekst);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbalk button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative;
  min-height: var(--tikdoel); padding: var(--r-1) 0; border: 0; background: transparent; cursor: pointer;
  color: var(--kleur-tabbalk-tekst); font-size: var(--maat-mini); font-weight: 500; -webkit-tap-highlight-color: transparent;
}
.veld .tabbalk button { font-size: var(--maat-klein); }
.tabbalk button svg { width: 24px; height: 24px; }
.tabbalk button:hover { color: var(--kleur-tabbalk-actief); }
.tabbalk button.actief { color: var(--kleur-tabbalk-actief); }
.tabbalk button.actief::before { content: ""; position: absolute; left: 12%; right: 12%; top: 0; height: 3px; background: var(--kleur-tabbalk-lijn); border-radius: 0 0 2px 2px; }
.tabbalk button:focus-visible { outline: 2px solid var(--kleur-tabbalk-actief); outline-offset: -4px; }
.tabbalk button .teller { position: absolute; }
@media (min-width: 900px) {
  .bureau .tabbalk { top: 0; bottom: 0; right: auto; width: 96px; flex-direction: column; justify-content: flex-start; padding-top: 60px; }
  .bureau .tabbalk button { flex: none; min-height: 72px; }
  .bureau .tabbalk button.actief::before { left: 0; right: auto; top: 12%; bottom: 12%; width: 3px; height: auto; border-radius: 0 2px 2px 0; }
  .bureau #schermen, .bureau .kopbalk { margin-left: 96px; }
  .bureau .scherm { padding-bottom: var(--r-8); }
}

/* Meldingen (toast) en modal */
.melding {
  position: fixed; left: 50%; top: calc(var(--r-4) + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 50;
  max-width: min(92vw, 480px); padding: var(--r-3) var(--r-4); border-radius: var(--radius);
  background: var(--kleur-tekst); color: #fff; font-size: var(--maat-klein); box-shadow: var(--schaduw-zwevend);
}
.melding-fout { background: var(--waarschuwing); }
.melding-ok { background: var(--succes); }
/* Nieuwe-versie-balk (26-9-2026): blijft staan tot "Nu updaten" of "Later"; onder de kopbalk, boven de modal (40), onder de toasts (50) */
.update-balk {
  position: fixed; left: 50%; top: calc(72px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 45;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--r-3);
  width: min(92vw, 480px); padding: var(--r-3) var(--r-4); border-radius: var(--radius);
  background: var(--nm-blauw); color: #fff; font-size: var(--maat-klein); box-shadow: var(--schaduw-zwevend);
}
.update-balk span { flex: 1 1 100%; text-align: center; }
.update-balk .knop-txt { color: #fff; }
.modal-achtergrond { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; justify-content: center; padding: var(--r-4); }
@media (min-width: 600px) { .modal-achtergrond { align-items: center; } }
.modal { width: 100%; max-width: 480px; background: var(--kleur-achtergrond); border-radius: var(--radius-kaart); padding: var(--r-6) var(--r-4) calc(var(--r-4) + env(safe-area-inset-bottom)); box-shadow: var(--schaduw-zwevend); }
.modal h2 { margin-bottom: var(--r-3); }
.modal .knoppen { display: flex; gap: var(--r-3); margin-top: var(--r-4); }
.modal .knoppen .knop { flex: 1; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 22px; letter-spacing: .04em; padding: var(--r-3); border: 1px dashed var(--kleur-rand); text-align: center; user-select: all; word-break: break-all; }

/* Ruimte-hulpklassen (geen inline styles, CSP) */
.mt-3 { margin-top: var(--r-3); } .mt-4 { margin-top: var(--r-4); } .mt-6 { margin-top: var(--r-6); } .mt-8 { margin-top: var(--r-8); }

/* Ondertitel inlogscherm en privacy */
.disclaimer { font-size: var(--maat-mini); color: var(--kleur-tekst-2); margin-top: var(--r-6); }
.login-logo { display: block; width: min(260px, 70%); height: auto; margin: var(--r-12) 0 var(--r-6); }
.login-sub { color: var(--kleur-tekst-2); font-size: var(--maat-klein); margin-bottom: var(--r-6); }
