/* Stalling: één stylesheet voor klant (telefoon), terrein (telefoon) en
   beheer (laptop). Kleuren en maten als tokens; componenten hieronder.
   Geen backticks in commentaar (zie Shared/CLAUDE.md, rjsmin). */

:root {
  --acc: #1F4FD1;
  --acc-hover: #163a9c;
  --acc-zacht: #F2F5FD;
  --acc-tekst: #1A3E9E;
  --grond: #F6F7F9;
  --vlak: #FFFFFF;
  --inkt: #16191D;
  --inkt-2: #3D444D;
  --gedempt: #5B6470;
  --lijn: #DDE1E6;
  --lijn-2: #C9CED5;
  --lijn-zacht: #EEF0F3;
  --ok: #1E7F4F;
  --ok-zacht: #DDF3E6;
  --ok-tekst: #16603B;
  --let-op: #8A4B00;
  --let-op-zacht: #FFF4E0;
  --fout: #B42318;
  --fout-zacht: #FDE4E1;
  --geel: #F5C400;
  --donker: #16191D;
  --donker-2: #2A2F36;
  --radius: 12px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grond); color: var(--inkt); font-family: var(--font); font-size: 15px; line-height: 1.45; }
a { color: var(--acc); }
a:hover { color: var(--acc-hover); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.h2 { font-size: 17px; font-weight: 600; }
.h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.p { color: var(--gedempt); }
.klein { font-size: 13px; color: var(--gedempt); }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--inkt-2); margin-bottom: 6px; }
.stapel { display: flex; flex-direction: column; gap: 16px; }
.stapel-s { display: flex; flex-direction: column; gap: 8px; }
.rij { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rij-tussen { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.verborgen { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Formulieren ---------------------------------------------------- */
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; border: 1px solid var(--lijn-2); border-radius: 10px;
  padding: 0 14px; font: 16px var(--font); background: var(--vlak); color: var(--inkt);
}
textarea.input { min-height: 90px; padding: 12px 14px; font-size: 15px; }
.input:focus { outline: 2px solid var(--acc); outline-offset: 1px; border-color: var(--acc); }
.input-code { letter-spacing: 12px; font-size: 26px; text-align: center; font-weight: 600; }
.input-kenteken { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; font-size: 18px; }
.veld { display: flex; flex-direction: column; }
.velden { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.vink { display: flex; gap: 12px; align-items: flex-start; background: var(--vlak); border: 1px solid var(--lijn);
  border-radius: var(--radius); padding: 14px 16px; cursor: pointer; }
.vink input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--acc); }

/* ---- Knoppen -------------------------------------------------------- */
.knop { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  border: 0; border-radius: 12px; background: var(--acc); color: #fff; font: 600 16px var(--font);
  padding: 0 18px; cursor: pointer; text-decoration: none; }
.knop:hover { background: var(--acc-hover); color: #fff; }
.knop:disabled, .knop[aria-disabled="true"] { background: var(--lijn-2); color: #4A525C; cursor: not-allowed; }
.knop-2 { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  border: 1px solid var(--lijn-2); border-radius: 10px; background: var(--vlak); color: var(--inkt);
  font: 600 14px var(--font); padding: 0 14px; cursor: pointer; text-decoration: none; }
.knop-2:hover { border-color: #9AA3AE; color: var(--inkt); }
.knop-gevaar { color: var(--fout); }
.knop-klein { min-height: 34px; font-size: 13px; padding: 0 10px; border-radius: 8px; }
.knop-blok { width: 100%; }
.knop-link { border: 0; background: transparent; color: var(--acc); font: 600 14px var(--font); cursor: pointer; min-height: 44px; padding: 0 4px; }
.icoonknop { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 10px; display: inline-flex;
  align-items: center; justify-content: center; color: inherit; cursor: pointer; text-decoration: none; }
.icoonknop:hover { background: rgba(127,127,127,.12); color: inherit; }

/* ---- Kaarten, lijsten ----------------------------------------------- */
.kaart { background: var(--vlak); border: 1px solid var(--lijn); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.keuze { width: 100%; text-align: left; background: var(--vlak); border: 1px solid var(--lijn); border-radius: 14px;
  padding: 14px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; font: inherit; color: inherit; text-decoration: none; }
.keuze:hover { border-color: #9AA3AE; color: inherit; }
.keuze.gekozen, .keuze:has(input:checked) { border: 2px solid var(--acc); padding: 13px 15px; background: var(--acc-zacht); }
.keuze:disabled, .keuze.uit { cursor: not-allowed; background: #F0F1F3; color: #6B737D; }
.keuze input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.icoonvlak { width: 44px; height: 44px; border-radius: 12px; background: var(--lijn-zacht); display: flex; align-items: center; justify-content: center; flex: none; }
.regel { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--lijn-zacht); }
.regel:last-child { border-bottom: 0; }
.regel .k { color: var(--gedempt); }
.regel .w { font-weight: 600; text-align: right; }

/* ---- Labels --------------------------------------------------------- */
.kenteken { display: inline-block; background: var(--geel); color: #111; font-weight: 700; font-size: 14px;
  letter-spacing: .06em; padding: 2px 8px; border-radius: 5px; border: 1px solid #1d1d1d; white-space: nowrap; }
.nummer { display: inline-block; background: #fff; color: #111; font-weight: 700; font-size: 14px; padding: 2px 8px;
  border-radius: 5px; border: 1px dashed var(--gedempt); white-space: nowrap; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #E3EAFB; color: var(--acc-tekst); white-space: nowrap; }
.badge-grijs { background: var(--lijn-zacht); color: var(--inkt-2); }
.badge-oranje { background: #FFF0D6; color: #7A4300; }
.badge-groen { background: var(--ok-zacht); color: var(--ok-tekst); }
.badge-rood { background: var(--fout-zacht); color: #9B1C12; }
.richting-weg { font-weight: 600; color: var(--acc-tekst); }
.richting-op { font-weight: 600; color: var(--let-op); }

/* ---- Meldingen ------------------------------------------------------ */
.melding { border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.4; }
.melding-info { background: #E9F0FE; color: var(--acc-tekst); }
.melding-let-op { background: var(--let-op-zacht); color: #6B3F00; }
.melding-ok { background: var(--ok-zacht); color: var(--ok-tekst); }
.melding-fout { background: var(--fout-zacht); color: #8A1A10; }

/* ---- Tabellen (beheer) ---------------------------------------------- */
.tabelvak { overflow-x: auto; }
.tabel { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabel th, .tabel td { padding: 9px 10px; border-bottom: 1px solid var(--lijn-zacht); text-align: left; vertical-align: middle; }
.tabel th { font-size: 12px; color: var(--gedempt); font-weight: 600; white-space: nowrap; }
.tabel tr:last-child td { border-bottom: 0; }
.tabel tr.klikbaar { cursor: pointer; }
.tabel tr.klikbaar:hover td { background: #FAFBFC; }
.tabel .getal { text-align: right; font-variant-numeric: tabular-nums; }

/* =====================================================================
   Telefoon-schil (klant en terrein)
   ===================================================================== */
.tel { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: var(--grond); }
.tel-kop { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: var(--vlak); border-bottom: 1px solid var(--lijn); min-height: 64px; }
.tel-kop .titel { font-size: 17px; font-weight: 600; }
.tel-kop .sub { font-size: 13px; color: var(--gedempt); margin-top: 1px; }
.tel-kop .terug { margin-left: -10px; }
.tel-inhoud { flex: 1; padding: 20px 16px; display: flex; flex-direction: column; gap: 16px; }
.tel-voet { position: sticky; bottom: 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--vlak);
  border-top: 1px solid var(--lijn); display: flex; flex-direction: column; gap: 8px; }
.tel-voet .knop, .tel-voet .knop-2 { width: 100%; min-height: 52px; }
.tel.donker .tel-kop { background: var(--donker); color: #fff; border-bottom-color: var(--donker); }
.tel.donker .tel-kop .sub { color: #C3C9D1; }
.merk { width: 52px; height: 52px; border-radius: 14px; background: var(--acc); color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 19px; }
.ok-cirkel { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-zacht); color: var(--ok); display: flex; align-items: center; justify-content: center; }
.midden { align-items: center; text-align: center; justify-content: center; }

/* Dagen en tijdvakken */
.dagen { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.dag { flex: 0 0 52px; min-height: 66px; border: 1px solid var(--lijn); border-radius: 12px; background: var(--vlak);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--inkt);
  text-decoration: none; scroll-snap-align: start; }
.dag .dk { font-size: 12px; font-weight: 500; }
.dag .dn { font-size: 18px; font-weight: 700; }
.dag .dm { font-size: 11px; color: var(--gedempt); }
.dag.gekozen { background: var(--acc); border-color: var(--acc); color: #fff; }
.dag.gekozen .dm { color: #DCE6FF; }
.dag.dicht { background: #F0F1F3; color: #8C95A1; pointer-events: none; }
.vrij { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ok); white-space: nowrap; }
.vrij.uit { color: #6B737D; }
.segment { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: #E6E9ED; border-radius: 12px; padding: 4px; gap: 4px; }
.segment a, .segment button { min-height: 42px; border: 0; border-radius: 9px; background: transparent; font: 600 15px var(--font);
  color: #4A525C; cursor: pointer; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.segment .gekozen { background: var(--vlak); color: var(--inkt); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.tegels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tegel { min-height: 56px; border: 1px solid var(--lijn); border-radius: 12px; background: var(--vlak); font: inherit; color: var(--inkt);
  cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 8px 12px; gap: 2px; position: relative; }
.tegel:has(input:checked) { border: 2px solid var(--acc); background: var(--acc-zacht); padding: 7px 11px; }
.tegel input { position: absolute; opacity: 0; pointer-events: none; }
.tegel .t { font-size: 15px; font-weight: 600; }
.tegel .s { font-size: 12px; color: var(--gedempt); }

/* Terrein */
.opdracht { width: 100%; text-align: left; background: var(--vlak); border: 1px solid var(--lijn); border-radius: 14px; padding: 14px;
  display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; min-height: 76px; }
.opdracht:hover { border-color: #9AA3AE; color: inherit; }
.opdracht.klaar { background: #F0F1F3; }
.richting-icoon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.richting-icoon.weg { background: #E3EAFB; color: var(--acc-tekst); }
.richting-icoon.op { background: #FFE9CC; color: var(--let-op); }
.camera { position: relative; border-radius: 16px; background: #22272E; overflow: hidden; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; color: #E6E9ED; }
.camera video { width: 100%; height: 100%; object-fit: cover; }
.camera .kader { position: absolute; inset: 22% 18%; border: 3px solid #fff; border-radius: 16px; pointer-events: none; }
.camera .tekst { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-size: 14px; }
.fotos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fotovak { position: relative; aspect-ratio: 4 / 3; border: 2px dashed #9AA3AE; border-radius: 14px; background: var(--vlak);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--inkt-2); cursor: pointer; overflow: hidden; }
.fotovak img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fotovak.gemaakt { border-style: solid; border-color: var(--ok); }
.fotovak input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fotovak .lbl { position: relative; z-index: 1; background: rgba(255,255,255,.9); padding: 2px 8px; border-radius: 6px; }
.stappen { display: flex; flex-direction: column; }
.stap { display: flex; gap: 12px; align-items: center; min-height: 38px; }
.stip { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--lijn-2); background: #fff; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; }
.stip.gedaan { background: var(--ok); border-color: var(--ok); }
.stip.nu { border: 6px solid var(--acc); }

/* =====================================================================
   Beheer-schil (laptop)
   ===================================================================== */
.beheer { display: flex; flex-wrap: wrap; min-height: 100vh; }
.zij { flex: 1 1 220px; max-width: 260px; background: var(--donker); color: #E6E9ED; padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; }
.zij .merkregel { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; }
.zij .merkregel .merk { width: 34px; height: 34px; border-radius: 9px; font-size: 14px; }
.zij .naam { font-weight: 600; color: #fff; font-size: 14px; }
.zij .sub { font-size: 12px; color: #8C95A1; }
.zij .kop { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8C95A1; padding: 16px 12px 6px; }
.zij a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #C3C9D1; text-decoration: none; font-size: 14px; font-weight: 500; }
.zij a:hover { background: var(--donker-2); color: #fff; }
.zij a.actief { background: var(--donker-2); color: #fff; font-weight: 600; }
.zij .teller { margin-left: auto; background: var(--acc); color: #fff; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 8px; }
.zij .onder { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--donker-2); }
.hoofd { flex: 999 1 560px; min-width: 0; padding: 26px 32px 48px; display: flex; flex-direction: column; gap: 20px; }
.paginakop { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.paginakop .h1 { font-size: 26px; }
.paginakop .sub { color: var(--gedempt); font-size: 14px; margin-top: 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kpi { background: var(--vlak); border: 1px solid var(--lijn); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.kpi .k { font-size: 13px; color: var(--gedempt); font-weight: 500; }
.kpi .w { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.kpi .s { font-size: 13px; color: var(--gedempt); }
.kolommen { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.kaart .kaartkop { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.balk { height: 8px; border-radius: 4px; background: var(--lijn-zacht); overflow: hidden; min-width: 80px; }
.balk > span { display: block; height: 8px; border-radius: 4px; background: var(--acc); }
.balk > span.hoog { background: #C46A00; }
.beheer .input { min-height: 40px; font-size: 14px; border-radius: 8px; }
.beheer .knop { min-height: 40px; font-size: 14px; border-radius: 9px; }
.beheer .vink { padding: 10px 12px; }
.beheer textarea.input { min-height: 70px; }
dialog.venster { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.venster::backdrop { background: rgba(22,25,29,.45); }
dialog.venster .vensterinhoud { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
dialog.venster .vensteracties { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--lijn-zacht); }

/* Rooster-raster */
.raster { display: grid; gap: 3px; align-items: center; }
.cel { height: 30px; border-radius: 5px; border: 0; cursor: pointer; padding: 0; background: var(--lijn-zacht); }
.cel.open { background: var(--acc); }
.cel:hover { outline: 2px solid #9AA3AE; outline-offset: -2px; }
.weken { display: grid; grid-template-columns: 40px repeat(13, minmax(34px, 1fr)); gap: 4px; min-width: 640px; }
.week { height: 38px; border-radius: 6px; border: 1px solid rgba(0,0,0,.08); cursor: pointer; font: 600 12px var(--font); padding: 0; color: var(--inkt); }
.week.anker { outline: 3px solid var(--inkt); outline-offset: 1px; }
.week.nu { box-shadow: inset 0 -3px 0 var(--inkt); }
.stip-kleur { width: 14px; height: 14px; border-radius: 4px; flex: none; border: 1px solid rgba(0,0,0,.15); display: inline-block; }

@media (max-width: 720px) {
  .hoofd { padding: 18px 16px 40px; }
  .zij { max-width: none; flex-basis: 100%; }
}

@media print {
  .zij, .geen-print { display: none !important; }
  .hoofd { padding: 0; }
  body { background: #fff; }
}

/* Info-bolletjes: de aan/uit-knop in de kop (wa_info.css doet de bolletjes) */
.info-knop { color: var(--gedempt); border: 1px solid var(--lijn-2); width: 40px; height: 40px; border-radius: 50%; }
.info-knop[aria-pressed="true"] { color: #fff; background: var(--acc); border-color: var(--acc); }
.tel.donker .info-knop { color: #C3C9D1; border-color: #4A525C; }
