/* ECR Cockpit Web — het iPad-thema (Theme.swift), één op één.
   SwiftUI-punten zijn hier pixels; de kleuren zijn letterlijk overgenomen. */

:root {
  --brand:        #0A84FF;   /* primaire acties, actieve tabs, links */
  --brand-700:    #0060DF;
  --brand-050:    #EAF3FF;
  --groen:        #1F8A4C;
  --groen-050:    #E7F4EC;
  --bg:           #F5F5F7;
  --paneel:       #FFFFFF;
  --inkt:         #1D1D1F;
  --muted:        #6E6E73;
  --lijn:         #E5E5EA;
  --lijn-sterk:   #D2D2D7;
  --prio-hoog:    #C0392B;
  --prio-hoog-bg: #FDE7E3;
  --prio-mid-fg:  #8A6200;
  --prio-mid-bg:  #FBEFCE;
  --prio-laag:    #1F8A4C;
  --prio-laag-bg: #E4F4EA;
  --chip-bg:      #F0F0F3;
  --radius:       14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--inkt);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
input, textarea { font-family: inherit; }
svg { display: block; }

/* ── Topbalk (ContentView.TopBar) ─────────────────────────────────────── */
.topbalk {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; row-gap: 6px;
  padding: 10px 20px;
  background: var(--paneel);
  border-bottom: 1px solid var(--lijn);
}
.topbalk .logo { height: 30px; }
.topbalk .scheiding { width: 1px; height: 26px; background: var(--lijn); }
.topbalk .titelblok { display: flex; flex-direction: column; gap: 1px; }
.topbalk .cockpitnaam { font-size: 14px; font-weight: 600; color: var(--inkt); }
.topbalk .ondertitel { font-size: 11px; font-weight: 500; color: var(--brand); }
.topbalk .rek { flex: 1; }

.rolpil {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px;
  background: var(--brand-050); color: var(--brand);
  font-size: 12.5px; font-weight: 600;
}
.rolpil svg { width: 12px; height: 12px; }
.rolmenu {
  position: absolute; top: 44px; right: 0; z-index: 40;
  background: var(--paneel); border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.18);
  padding: 6px; min-width: 190px;
}
.rolmenu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: 8px; font-size: 13.5px; color: var(--inkt);
  text-align: left;
}
.rolmenu button:hover { background: var(--bg); }
.rolmenu svg { width: 15px; height: 15px; color: var(--inkt); }

.gebruiker { display: flex; align-items: center; gap: 8px; }
.gebruiker svg { width: 18px; height: 18px; color: var(--muted); }
.gebruiker .naam { font-size: 13px; font-weight: 500; }
.gebruiker .afmelden { color: var(--brand); font-size: 13px; font-weight: 500; }

.envpil {
  font-size: 11px; font-weight: 500; color: var(--muted);
  padding: 4px 10px; border-radius: 999px; background: var(--chip-bg);
}

/* ── Financieel-strip ─────────────────────────────────────────────────── */
.finstrip {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 20px;
  background: var(--paneel);
  border-bottom: 1px solid var(--lijn);
  white-space: nowrap; overflow-x: auto;
}
.finstrip .metric { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; }
.finstrip .metric svg { width: 12px; height: 12px; color: var(--muted); }
.finstrip .punt { color: var(--lijn-sterk); }
.finstrip .streep { width: 1px; height: 16px; background: var(--lijn); }
.finstrip .ttypes { display: flex; gap: 12px; }
.finstrip .ttype { display: flex; align-items: center; gap: 5px; }
.finstrip .ttype b { font-size: 11px; }
.finstrip .ttype .ok { display: flex; align-items: center; gap: 2px; color: var(--prio-laag); font-size: 10.5px; font-weight: 600; }
.finstrip .ttype .open { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.finstrip .ttype svg { width: 9px; height: 9px; }
.finstrip .laden { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.finstrip .ttype[data-tip] { cursor: help; }
.zweeftip {
  position: fixed; z-index: 300; max-width: 320px;
  background: var(--brand-050); color: var(--inkt);
  border: 1px solid #CFE3FF;
  font-size: 12px; line-height: 1.45; font-weight: 500;
  padding: 8px 11px; border-radius: 8px;
  box-shadow: 0 4px 14px rgba(10, 132, 255, .12);
  pointer-events: none; white-space: normal;
}

/* ── Schermkop (PlannerScreen.kop / BeheerScherm) ─────────────────────── */
.schermkop {
  padding: 14px 22px;
  background: var(--paneel);
  border-bottom: 1px solid var(--lijn);
  display: flex; flex-direction: column; gap: 12px;
}
.schermkop .rij1 { display: flex; align-items: flex-start; gap: 10px; }
.schermkop h1 { font-size: 20px; font-weight: 700; }
.schermkop .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.schermkop .rek { flex: 1; }

.knop-primair {
  display: flex; align-items: center; gap: 7px;
  background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 9px 14px; border-radius: 9px;
}
.knop-primair:hover { background: var(--brand-700); }
.knop-primair svg { width: 13px; height: 13px; }
.knop-ikoon { display: flex; align-items: center; padding: 8px; color: var(--brand); }
.knop-ikoon svg { width: 15px; height: 15px; }

/* IPEB verwijderen (planner): klein en grijs — pas rood bij aanwijzen, zodat
   hij niet om aandacht vraagt naast Toewijzen maar wel te vinden is. */
.verwijderknop {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin-left: 6px; cursor: pointer;
  background: none; border: 1px solid var(--lijn); border-radius: 8px;
  color: var(--muted);
}
.verwijderknop:hover { color: var(--prio-hoog); border-color: var(--prio-hoog); }
.verwijderknop svg { width: 12px; height: 12px; }
.venster.smal { max-width: 440px; }
.venster.smal .lijf p { font-size: 13px; line-height: 1.5; color: var(--inkt); }
.knop-verwijder {
  align-self: flex-start; margin-top: 12px; padding: 10px 16px; cursor: pointer;
  background: var(--prio-hoog); color: #fff; border: none; border-radius: 9px;
  font-size: 13.5px; font-weight: 600;
}
.knop-verwijder:disabled { opacity: .6; cursor: default; }

/* ── Planner master-detail (zoals de iPad) ────────────────────────────── */
/* De kolom begint direct onder de topbalk; strip en Planning-kop staan in
   het rechterdeel, zodat links een volle kolom tegels past. */
#scherm.vol { height: calc(100vh - 52px); overflow: hidden; }
@supports (height: 100dvh) {
  /* iPad-Safari/Chrome: de adresbalk schuift mee — dvh meet wat er écht is. */
  #scherm.vol { height: calc(100dvh - 52px); }
}
.plannerindeling {
  /* minmax(0,1fr): zonder die 0 mag het rechterdeel niet smaller worden dan
     zijn inhoud en duwt het zichzelf het (geknipte) scherm uit — op de iPad
     viel daardoor informatie buiten beeld zonder scrollmogelijkheid. */
  display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 0;
  height: 100%; min-height: 420px;
}
.plannerrechts { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.plannerrechts .plannerdetail { flex: 1; min-height: 0; }
.plannerrechts .schermkop { padding: 12px 22px; }
.schermkop .rij1 { flex-wrap: wrap; row-gap: 8px; }
.plannerkolom {
  display: flex; flex-direction: column; min-height: 0;
  border-right: 1px solid var(--lijn); background: var(--paneel);
}
.kolomkop { padding: 14px 14px 10px; border-bottom: 1px solid var(--lijn);
  display: flex; flex-direction: column; gap: 10px; }
.kolomkop .zoekveld { width: 100%; }
.kolomkop .vakkenrij { display: flex; flex-wrap: wrap; gap: 6px; }
.kolomkop .vak { font-size: 12px; padding: 6px 10px; }
.filterrij { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filterrij select {
  font: inherit; font-size: 12px; padding: 6px 8px; color: var(--inkt);
  background: var(--bg); border: 1px solid var(--lijn); border-radius: 8px; max-width: 130px;
}
.fmeer { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; }
.fwis { background: none; border: none; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--brand); }
.selectierij { display: flex; align-items: center; gap: 8px; }
.aantalinfo { font-size: 11.5px; color: var(--muted); }
.selectieknop {
  font-size: 12px; font-weight: 600; color: var(--brand); cursor: pointer;
  background: var(--brand-050); border: none; border-radius: 999px; padding: 6px 12px;
}
.selectieknop.actief { background: var(--brand); color: #fff; }

.tegels { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.tegel {
  background: var(--paneel); border: 1px solid var(--lijn); border-radius: 12px;
  padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 7px;
}
.tegel:hover { border-color: var(--lijn-sterk); }
.tegel.actief { border-color: var(--brand); background: var(--brand-050); }
.tegel.geselecteerd { border-color: var(--brand); }
.tegelkop { display: flex; align-items: flex-start; gap: 8px; }
.tegelkop .naam { font-size: 13.5px; font-weight: 700; color: var(--inkt); flex: 1; }
.tegel .plaats { font-size: 12px; color: var(--muted); }
.tegel .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tegel .chip { font-size: 10.5px; padding: 3px 8px; }
.wieregel { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.wieregel svg { width: 12px; height: 12px; }
.wieregel .vorige { color: var(--brand); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.wieregel .niemand { display: inline-flex; align-items: center; gap: 4px; }
.terugregel { font-size: 11px; color: var(--prio-hoog); display: flex; gap: 5px; align-items: center; }
.statusbalk { display: flex; height: 5px; border-radius: 999px; overflow: hidden; }
.vinkvak {
  flex: none; width: 18px; height: 18px; border-radius: 6px; margin-top: 1px;
  border: 1.5px solid var(--lijn-sterk); display: flex; align-items: center; justify-content: center;
}
.vinkvak.aan { background: var(--brand); border-color: var(--brand); color: #fff; }
.vinkvak svg { width: 11px; height: 11px; }

.bulkbalk { border-top: 1px solid var(--lijn); background: var(--paneel); }
.bulkin { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 12.5px; }
.bulkin select { font: inherit; font-size: 12.5px; padding: 7px 9px; border: 1px solid var(--lijn-sterk); border-radius: 8px; background: #fff; }
.knop-primair.klein { font-size: 12px; padding: 7px 12px; }

/* overflow-x als vangnet: is iets tóch breder dan het paneel (brede tabel),
   dan kan de gebruiker er in elk geval naartoe scrollen in plaats van dat
   het wordt afgeknipt. */
.plannerdetail { overflow-y: auto; overflow-x: auto; min-width: 0; padding: 20px 24px; background: var(--bg); }

/* ── Briefpapier-tab (beheer) ─────────────────────────────────────────── */
.briefpapier { max-width: 860px; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.briefpapier .uitlegtekst { font-size: 13px; color: var(--muted); line-height: 1.55; }
.bpupload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bprij { display: flex; gap: 20px; flex-wrap: wrap; }
.bpvoorbeeld { margin: 0; }
.bpvoorbeeld img, .bpvoorbeeld .bpleeg {
  width: 240px; aspect-ratio: 210 / 297; object-fit: cover;
  border: 1px solid var(--lijn-sterk); border-radius: 8px; background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
}
.bpvoorbeeld .bpleeg {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px; font-style: italic; background: var(--bg);
}
.bpvoorbeeld figcaption { font-size: 11.5px; color: var(--muted); margin-top: 6px; text-align: center; }

/* ── Werkverdeling-tab (planner rechts) ───────────────────────────────── */
.werkpaneel { display: flex; flex-direction: column; gap: 16px; max-width: 1040px; }
.werkpaneel .instelblok {
  display: flex; align-items: flex-start; gap: 22px; flex-wrap: wrap;
  background: var(--paneel); border: 1px solid var(--lijn);
  border-radius: var(--radius); padding: 16px 18px;
}
.werkpaneel .wlabel {
  font-size: 10.5px; font-weight: 600; letter-spacing: .4px;
  color: var(--muted); margin-bottom: 6px;
}
.werkpaneel .invoerrij { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.werkpaneel .invoerrij input {
  width: 86px; padding: 7px 9px; font-size: 13.5px;
  border: 1px solid var(--lijn-sterk); border-radius: 8px; background: #FBFCFE;
}
.werkpaneel .uitlegtekst { flex: 1; min-width: 260px; font-size: 12px; color: var(--muted); line-height: 1.5; padding-top: 2px; }
.werktabel {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--paneel); border: 1px solid var(--lijn);
  border-radius: var(--radius); overflow: hidden;
  font-size: 13px;
}
.werktabel th {
  text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .4px;
  text-transform: uppercase; color: var(--muted);
  padding: 11px 14px; border-bottom: 1px solid var(--lijn); background: #FAFAFC;
}
.werktabel td { padding: 12px 14px; border-bottom: 1px solid var(--lijn); vertical-align: top; }
.werktabel tr:last-child td { border-bottom: none; }
.werktabel .wplaats { color: var(--muted); }
.werktabel .wleeg { color: var(--muted); font-size: 12px; font-style: italic; }
.werktabel .wover { font-weight: 700; }
.werktabel .wover.groen { color: var(--prio-laag); }
.werktabel .wover.oranje { color: var(--prio-mid-fg); }
.werktabel .wover.rood { color: var(--prio-hoog); }
.werktabel .wbalk { margin-top: 6px; height: 5px; border-radius: 3px; background: var(--chip-bg); overflow: hidden; max-width: 150px; }
.werktabel .wbalkin { height: 100%; border-radius: 3px; }
.werktabel .wbalkin.groen { background: var(--groen); }
.werktabel .wbalkin.oranje { background: var(--prio-mid-fg); }
.werktabel .wbalkin.rood { background: var(--prio-hoog); }
.wzaken { margin-top: 5px; }
.wzaken summary { cursor: pointer; color: var(--brand); font-size: 12px; }
.wzaken ul { margin: 6px 0 2px 16px; max-height: 180px; overflow-y: auto; color: var(--inkt); }
.wzaken li { margin: 2px 0; font-size: 12.5px; }
.leegvak.hoog { min-height: 300px; }
.dossierkop { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; margin-bottom: 12px; }
.dossierkop > div:first-child { flex: 1; min-width: 260px; }
.dossierkop h2 { font-size: 20px; font-weight: 800; color: var(--inkt); margin: 0 0 2px; }
.dossierkop .sub { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.dossierkop .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.letop { font-size: 12px; font-weight: 600; color: var(--prio-mid-fg); display: flex; gap: 5px; align-items: center; margin: 4px 0 6px; }
.letop svg { width: 13px; height: 13px; }
.scoreblok {
  margin-left: auto; background: var(--paneel); border: 1px solid var(--lijn);
  border-radius: 12px; padding: 12px 18px; text-align: center; flex: none;
}
.scorelabel { font-size: 10px; font-weight: 700; letter-spacing: .05em; color: var(--muted); }
.scorewaarde { font-size: 30px; font-weight: 800; }
.scorewaarde.hoog { color: var(--prio-hoog); }
.scorewaarde.midden { color: var(--prio-mid-fg); }
.scorewaarde.laag { color: var(--groen); }
.dossieracties { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
/* In het dossier staat de knop links; het menu moet dus naar rechts
   openklappen. Met right:0 stak het links het scrollpaneel uit en werden
   de voornamen afgekapt (terugkoppeling Edward). */
.dossieracties .toewijsmenu { display: block; left: 0; right: auto; }
/* auto-fit: op een smal venster (iPad) vallen de kaarten vanzelf onder
   elkaar in plaats van buiten beeld. */
.dossiergrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.dossierkaart { background: var(--paneel); border: 1px solid var(--lijn); border-radius: 14px; padding: 16px 18px; }
.dossierkaart.breed { grid-column: 1 / -1; }
.dossierkaart h3 { font-size: 14px; font-weight: 700; color: var(--inkt); margin: 0 0 10px; }
.plichtregel { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; color: var(--inkt); }
.plichtregel.klein { font-size: 12.5px; }
.plichtregel span:first-child { color: var(--muted); }
.plichtchip { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.plichtchip.aan { background: var(--groen-050); color: var(--groen); }
.plichtchip.uit { background: var(--bg); color: var(--muted); }
.legenda { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.legendastip { display: inline-flex; align-items: center; gap: 5px; }
.legendastip .stip { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.scoreregel { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--inkt); margin-top: 8px; }
.scoreregel span { color: var(--muted); }
.scorebalkje { height: 6px; border-radius: 999px; background: var(--lijn); margin-top: 4px; overflow: hidden; }
.scorebalkje span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.catgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 18px; }
.catkop { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--brand); margin-bottom: 6px; }
.catregel { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); padding: 3px 0; }
.catregel.aan { color: var(--inkt); }
.catregel svg { width: 14px; height: 14px; color: var(--groen); flex: none; }
.catregel .rondje { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--lijn-sterk); flex: none; }

/* Smal venster (iPad staand, half scherm): kolom en detail onder elkaar en
   de hele pagina scrolt gewoon mee — het geknipte vaste venster geldt hier
   niet meer, anders is alles onder de vouw onbereikbaar. */
@media (max-width: 1000px) {
  #scherm.vol { height: auto; overflow: visible; }
  .plannerindeling { grid-template-columns: 1fr; height: auto; }
  .plannerkolom { border-right: 0; border-bottom: 1px solid var(--lijn); }
  .tegels { max-height: 44vh; }
  .plannerrechts .plannerdetail { flex: none; min-height: 0; }
  .plannerdetail { border-top: 1px solid var(--lijn); overflow: visible; }
}

.vakkenrij { display: flex; align-items: center; gap: 8px; }
.vak {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 8px;
  background: var(--paneel); color: var(--inkt);
  border: 1px solid var(--lijn); font-size: 13px;
}
.vak .telling {
  font-size: 11px; font-weight: 700; color: var(--muted);
  background: var(--chip-bg); border-radius: 999px; padding: 1px 6px;
}
.vak.actief { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.vak.actief .telling { background: rgba(255,255,255,.25); color: #fff; }
.vak .uitroep { width: 11px; height: 11px; color: #fff; }
.vak:not(.actief) .uitroep { color: var(--prio-hoog); }

.zoekveld {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg); border: 1px solid var(--lijn); border-radius: 9px;
  padding: 7px 10px; max-width: 300px; flex: 1;
}
.zoekveld svg { width: 13px; height: 13px; color: var(--muted); }
.zoekveld input { border: 0; outline: 0; background: none; font-size: 13px; width: 100%; color: var(--inkt); }
.zoekveld input::placeholder { color: var(--muted); opacity: .8; }

/* ── Plannerlijst (PlannerRij) ────────────────────────────────────────── */
.inhoud { padding: 20px; display: flex; flex-direction: column; gap: 10px; max-width: 1920px; }
.plannerrij {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--paneel);
  border: 1px solid var(--lijn); border-radius: var(--radius);
  padding: 14px 16px;
}
.plannerrij .links { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.plannerrij .naamregel { display: flex; align-items: center; gap: 8px; }
.plannerrij .naam { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plannerrij .plaats { font-size: 12px; color: var(--muted); }
.plannerrij .chips { display: flex; align-items: center; gap: 6px; }

.priobadge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.priobadge.hoog   { color: var(--prio-hoog);   background: var(--prio-hoog-bg); }
.priobadge.midden { color: var(--prio-mid-fg); background: var(--prio-mid-bg); }
.priobadge.laag   { color: var(--prio-laag);   background: var(--prio-laag-bg); }

.chip { font-size: 11px; font-weight: 500; color: var(--inkt); background: var(--chip-bg); padding: 3px 8px; border-radius: 999px; }
.chip.afspraak { display: flex; align-items: center; gap: 4px; color: var(--brand); background: var(--brand-050); font-weight: 600; }
.chip.afspraak svg { width: 10px; height: 10px; }
.chip.afgerond { color: var(--prio-laag); background: var(--prio-laag-bg); font-weight: 600; }

.terugblok {
  display: flex; gap: 6px; align-items: flex-start;
  background: rgba(253, 231, 227, .5); border-radius: 8px; padding: 9px; margin-top: 2px;
}
.terugblok svg { width: 11px; height: 11px; color: var(--prio-hoog); margin-top: 1px; }
.terugblok .kop { font-size: 11.5px; font-weight: 600; color: var(--prio-hoog); }
.terugblok .reden { font-size: 12px; color: var(--inkt); }

.toewijsknop {
  display: flex; align-items: center; gap: 7px;
  background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 8px 13px; border-radius: 9px; white-space: nowrap;
}
.toewijsknop.toegewezen { background: var(--paneel); color: var(--inkt); border: 1px solid var(--lijn); }
.toewijsknop svg { width: 13px; height: 13px; }
.toewijshouder { position: relative; display: flex; align-items: center; }
.toewijsmenu {
  position: absolute; top: 40px; right: 0; z-index: 30;
  background: var(--paneel); border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.18);
  padding: 6px; min-width: 230px; max-height: 320px; overflow-y: auto;
}
.toewijsmenu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: 8px; font-size: 13.5px; text-align: left; color: var(--inkt);
}
.toewijsmenu button:hover { background: var(--bg); }
.toewijsmenu button.destructief { color: var(--prio-hoog); }
.toewijsmenu .scheiding { height: 1px; background: var(--lijn); margin: 5px 8px; }
.toewijsmenu svg { width: 14px; height: 14px; }

.leegvak {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 90px 0; color: var(--muted); font-size: 13px;
}
.leegvak svg { width: 30px; height: 30px; color: var(--lijn-sterk); }

/* ── Beheer ───────────────────────────────────────────────────────────── */
.tabrij { display: flex; gap: 8px; }
.tab {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 9px;
  background: var(--paneel); border: 1px solid var(--lijn);
  font-size: 13px; color: var(--inkt);
}
.tab.actief { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.tab svg { width: 13px; height: 13px; }

.inrichting { max-width: 930px; margin: 20px auto; display: flex; flex-direction: column; gap: 14px; padding: 0 20px; }
.onderdeel {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--paneel); border-radius: var(--radius); padding: 16px 18px;
  border: 1px solid transparent;
}
.onderdeel .status-ok { color: var(--groen); }
.onderdeel .status-mis { color: var(--prio-mid-fg); }
.onderdeel svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.onderdeel .titelregel { display: flex; align-items: center; gap: 8px; }
.onderdeel h3 { font-size: 14.5px; font-weight: 700; }
.onderdeel .aantal { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--chip-bg); border-radius: 999px; padding: 2px 8px; }
.onderdeel p { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.zegel { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 13.5px; font-weight: 600; }
.zegel svg { width: 20px; height: 20px; color: var(--groen); }

.beheerkaart {
  background: var(--paneel); border-radius: var(--radius); border: 1px solid var(--lijn);
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
}
.beheerkaart h3 { font-size: 14px; font-weight: 700; }
.beheerkaart label { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.beheerkaart input[type=text], .beheerkaart input[type=password], .beheerkaart textarea {
  width: 100%; border: 1px solid var(--lijn-sterk); border-radius: 8px;
  padding: 9px 10px; font-size: 13px; color: var(--inkt); background: var(--paneel);
}
.beheerkaart textarea { min-height: 180px; resize: vertical; line-height: 1.5; }
.beheerkaart .voet { display: flex; align-items: center; gap: 10px; }
.knop-uit { background: var(--lijn-sterk) !important; cursor: default; }

/* ── Inladen-venster (RapportInladenSheet) ────────────────────────────── */
.sluier {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 90;
  display: flex; align-items: center; justify-content: center;
}
.venster {
  width: 680px; max-width: calc(100vw - 48px); max-height: calc(100vh - 80px);
  background: var(--bg); border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
}
.venster .kop {
  display: flex; align-items: center; gap: 10px;
  background: var(--paneel); border-bottom: 1px solid var(--lijn); padding: 14px 18px;
}
.venster .kop svg { width: 17px; height: 17px; color: var(--brand); }
.bestand svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.venster .kop h2 { font-size: 16px; font-weight: 700; flex: 1; }
.venster .kop .sluit { color: var(--brand); font-size: 13.5px; font-weight: 500; }
.venster .lijf { padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }

.dropvak {
  border: 1.5px dashed var(--lijn-sterk); border-radius: var(--radius);
  background: var(--paneel);
  padding: 34px; text-align: center; color: var(--muted); font-size: 13px;
}
.dropvak.actief { border-color: var(--brand); background: var(--brand-050); }
.dropvak b { color: var(--brand); }
.bestandslijst { display: flex; flex-direction: column; gap: 6px; }
.bestand {
  display: flex; align-items: center; gap: 10px;
  background: var(--paneel); border: 1px solid var(--lijn); border-radius: 10px;
  padding: 9px 12px; font-size: 12.5px;
}
.bestand .naam { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bestand .status { font-size: 11.5px; color: var(--muted); }
.bestand .status.klaar { color: var(--groen); font-weight: 600; }
.bestand .status.fout { color: var(--prio-hoog); font-weight: 600; }
.bestand .weg { color: var(--muted); }

/* ── Aanmelden ────────────────────────────────────────────────────────── */
.aanmeld {
  height: 100vh; display: flex; align-items: center; justify-content: center;
}
.aanmeldkaart {
  background: var(--paneel); border-radius: 18px; padding: 44px 52px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.08);
}
.aanmeldkaart img { height: 46px; }
.aanmeldkaart h1 { font-size: 19px; font-weight: 700; }
.aanmeldkaart .sub { font-size: 13px; color: var(--muted); }
.aanmeldkaart .fout { font-size: 12.5px; color: var(--prio-hoog); max-width: 380px; text-align: center; }
/* Omgeving-kiezer op de aanmeldkaart: voor wie in een andere tenant werkt en
   de echte omgevings-URL niet uit zijn hoofd kent. */
.knop-schakel {
  background: none; border: none; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--brand);
}
#omgevinglijst { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.omgevingknop {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; min-width: 320px; padding: 10px 14px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--lijn); border-radius: 10px;
  text-align: left;
}
.omgevingknop:hover { border-color: var(--brand); }
.omgevingknop b { font-size: 13.5px; color: var(--inkt); }
.omgevingknop span { font-size: 11.5px; color: var(--muted); }

/* ── Plaatshouders-hulp (Standaardteksten) ────────────────────────────── */
.phhulp { display: flex; flex-direction: column; gap: 6px; }
.phlijst { display: flex; flex-wrap: wrap; gap: 6px; }
.phchip {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px; font-weight: 600; color: var(--brand);
  background: var(--brand-050); border: 1px solid #CFE3FF; border-radius: 999px;
  padding: 4px 10px; cursor: pointer;
}
.phchip:hover { background: var(--brand); color: #fff; }

/* ── Ticketoverzicht ──────────────────────────────────────────────────── */
.ticketkop { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-wrap: wrap; }
.ticketkop b { font-size: 13.5px; }
.ticketkop .rek { flex: 1; }
.tickettekst { font-size: 13px; color: var(--inkt); line-height: 1.55; white-space: pre-wrap; margin: 2px 0 6px; }
.ticketreactie { background: var(--brand-050); border: 1px solid #CFE3FF; border-radius: 8px; padding: 10px 12px; }
.ticketopgelost { background: var(--groen-050); border: 1px solid #BFE3CC; border-radius: 8px; padding: 10px 12px; }
.ticketattentie { background: var(--prio-hoog-bg); border: 1px solid #F3C4BC; border-radius: 8px; padding: 10px 12px; font-weight: 600; }
.ticketinvoer { width: 100%; min-height: 70px; resize: vertical; border: 1px solid var(--lijn-sterk);
  border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 13px; color: var(--inkt); }
.sluitknop { font-size: 12.5px; font-weight: 600; color: var(--muted); background: none;
  border: 1px solid var(--lijn-sterk); border-radius: 8px; padding: 8px 13px; cursor: pointer; }
.sluitknop:hover { color: var(--prio-hoog); border-color: var(--prio-hoog); }
.chip.midden { color: var(--prio-mid-fg); background: var(--prio-mid-bg); font-weight: 600; }
.chip.hoog   { color: var(--prio-hoog);   background: var(--prio-hoog-bg); font-weight: 600; }

/* ── Ticketvenster ────────────────────────────────────────────────────── */
#ticketsluier .lijf { gap: 16px; }
#ticketsluier .wlabel {
  display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .4px;
  color: var(--muted); margin-bottom: 6px;
}
#ticketsluier textarea {
  width: 100%; min-height: 140px; resize: vertical; line-height: 1.5;
  border: 1px solid var(--lijn-sterk); border-radius: 8px;
  padding: 9px 10px; font: inherit; font-size: 13px; color: var(--inkt);
}
#ticketsluier .voet { display: flex; align-items: center; gap: 12px; }
#ticketsluier .voet .sub { font-size: 12px; color: var(--muted); line-height: 1.45; }

/* ── Meldingsbalk ─────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 99;
  background: var(--inkt); color: #fff; font-size: 13px; font-weight: 500;
  padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

/* ── Financieel dashboard (beheer) ────────────────────────────────────── */
.finkaarten {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.finkaart {
  background: var(--paneel); border: 1px solid var(--lijn); border-radius: var(--radius);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.finkaart span {
  font-size: 10.5px; font-weight: 600; letter-spacing: .4px;
  text-transform: uppercase; color: var(--muted);
}
.finkaart b { font-size: 18px; font-weight: 800; color: var(--inkt); }
.finkaart b.groen { color: var(--prio-laag); }
.finkaart b.rood { color: var(--prio-hoog); }
.finkeuze {
  font: inherit; font-size: 12.5px; color: var(--inkt);
  background: var(--paneel); border: 1px solid var(--lijn-sterk);
  border-radius: 8px; padding: 6px 10px;
}
.fininuren {
  font: inherit; font-size: 13px; width: 76px; text-align: right;
  border: 1px solid var(--lijn-sterk); border-radius: 8px; padding: 5px 8px;
  background: var(--paneel); color: var(--inkt);
}
.fininuren:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.tabelrol { overflow-x: auto; }
.tabelrol .werktabel { min-width: 560px; }
