/* Klantportaal-prototype — gedeelde stijl
 * Grondregels (ADR-0015, toegepast op dit prototype):
 * - geen modals/overlays: alles inline in de pagina
 * - bekijken = bewerken: klik-om-te-bewerken, geen aparte modus
 * - genummerde fase-/blokkaarten: titel+meta op één regel, body eronder
 * - kernresultaten (status, termijn) altijd zichtbaar, nooit achter een klik
 * - zuinig met schermruimte; sticky balk is puur informatief (geen acties erin)
 * - klanttaal: geen jargon, geen interne veldnamen
 */

:root {
  --kleur-primair: #1d4f4a;
  --kleur-primair-licht: #e8f0ee;
  --kleur-accent: #c76b3f;
  --kleur-tekst: #1c2321;
  --kleur-tekst-zacht: #5b6663;
  --kleur-rand: #dde3e1;
  --kleur-ondergrond: #f6f8f7;
  --kleur-wit: #ffffff;
  --kleur-succes: #2f7a4e;
  --kleur-waarschuwing: #b9791f;
  --kleur-gevaar: #b3402f;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--kleur-tekst);
  background: var(--kleur-ondergrond);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button {
  font-family: inherit;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* --- Merkbalk (bovenaan, informatief, sticky) --- */
.merkbalk {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--kleur-primair);
  color: #fff;
}
.merkbalk .logo {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex: none;
}
.merkbalk .naam { font-weight: 600; font-size: 14px; }
.merkbalk .rol {
  margin-left: auto;
  font-size: 12px;
  opacity: .85;
  white-space: nowrap;
}
.merkbalk .demo-badge {
  font-size: 11px;
  background: var(--kleur-accent);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

/* --- Layout --- */
.pagina {
  max-width: 880px;
  margin: 0 auto;
  padding: 16px;
}
.pagina.laptop { max-width: 1180px; }

.kop-regel {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 14px;
  flex-wrap: wrap;
}
.kop-regel h1 { font-size: 19px; margin: 0; }
.kop-regel .sub { font-size: 13px; color: var(--kleur-tekst-zacht); }

/* --- Fase-indicator: kernresultaat, altijd zichtbaar --- */
.fase-balk {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.fase-stap {
  flex: 1 1 0;
  min-width: 84px;
  text-align: center;
  padding: 8px 6px;
  border-radius: var(--radius);
  background: var(--kleur-wit);
  border: 1px solid var(--kleur-rand);
  font-size: 12px;
  color: var(--kleur-tekst-zacht);
  position: relative;
}
.fase-stap.actief {
  background: var(--kleur-primair-licht);
  border-color: var(--kleur-primair);
  color: var(--kleur-primair);
  font-weight: 600;
}
.fase-stap.klaar {
  color: var(--kleur-succes);
}
.fase-stap.klaar::after { content: "✓"; margin-left: 4px; }

/* --- Blokkaarten (genummerd, titel+meta op één regel) --- */
.blok {
  background: var(--kleur-wit);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.blok-kop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--kleur-rand);
}
.blok-kop .nr {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--kleur-primair);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.blok-kop .titel { font-weight: 600; font-size: 14px; }
.blok-kop .meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--kleur-tekst-zacht);
  white-space: nowrap;
}
.blok-body { padding: 14px; }
.blok-body p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; }
.blok-body p:last-child { margin-bottom: 0; }

/* Statuschips — klanttaal, geen interne codes */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip.wacht-klant { background: #fdf1e3; color: var(--kleur-waarschuwing); }
.chip.wacht-team { background: #eef1fd; color: #3b4fb0; }
.chip.klaar { background: #e7f5ec; color: var(--kleur-succes); }
.chip.gevaar { background: #fbeae6; color: var(--kleur-gevaar); }
.chip.neutraal { background: #eef1f0; color: var(--kleur-tekst-zacht); }

/* --- Documentenlijst --- */
.document-rij {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--kleur-rand);
  font-size: 13.5px;
}
.document-rij:last-child { border-bottom: none; }
.document-rij .naam { flex: 1; }
.document-rij .upload-knop {
  border: 1px solid var(--kleur-primair);
  color: var(--kleur-primair);
  background: none;
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
}
.document-rij .upload-knop:hover { background: var(--kleur-primair-licht); }

/* --- Offerte-opties --- */
.optie {
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.optie:hover { border-color: var(--kleur-primair); }
.optie.gekozen {
  border-color: var(--kleur-primair);
  background: var(--kleur-primair-licht);
}
.optie input[type=radio] { margin-top: 3px; }
.optie .optie-tekst { flex: 1; }
.optie .optie-naam { font-weight: 600; font-size: 13.5px; }
.optie .optie-omschrijving { font-size: 12.5px; color: var(--kleur-tekst-zacht); margin-top: 2px; }
.optie .optie-prijs { font-weight: 700; font-size: 14px; white-space: nowrap; }

.voorwaarden-regel {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  margin: 10px 0 12px;
  color: var(--kleur-tekst-zacht);
}
.voorwaarden-regel input { margin-top: 3px; }

.knop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--kleur-primair);
  color: #fff;
}
.knop:disabled { background: #b7c4c1; cursor: not-allowed; }
.knop.secundair {
  background: none;
  border: 1px solid var(--kleur-rand);
  color: var(--kleur-tekst);
}
.knop.accent { background: var(--kleur-accent); }
.knop.klein { padding: 5px 11px; font-size: 12.5px; }

/* --- Berichten (klik-om-te-bewerken: antwoordveld staat altijd al open) --- */
.berichten-lijst { margin-bottom: 10px; }
.bericht {
  padding: 9px 0;
  border-bottom: 1px solid var(--kleur-rand);
  font-size: 13.5px;
}
.bericht:last-child { border-bottom: none; }
.bericht .van {
  font-weight: 600;
  font-size: 12px;
  color: var(--kleur-tekst-zacht);
  margin-bottom: 2px;
}
.bericht.van-team .van { color: var(--kleur-primair); }
.antwoord-veld {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.antwoord-veld textarea {
  flex: 1;
  border: 1px solid var(--kleur-rand);
  border-radius: 7px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 38px;
}

/* --- Checklist --- */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--kleur-rand);
  font-size: 13.5px;
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item input[type=checkbox] { width: 17px; height: 17px; }
.checklist-item .naam.klaar { text-decoration: line-through; color: var(--kleur-tekst-zacht); }

/* --- Termijnteller --- */
.termijn-teller {
  display: flex;
  align-items: center;
  gap: 12px;
}
.termijn-balk {
  flex: 1;
  height: 8px;
  background: var(--kleur-rand);
  border-radius: 999px;
  overflow: hidden;
}
.termijn-balk-vulling {
  height: 100%;
  background: var(--kleur-succes);
  border-radius: 999px;
}
.termijn-balk-vulling.gevaar { background: var(--kleur-gevaar); }
.termijn-balk-vulling.waarschuwing { background: var(--kleur-waarschuwing); }
.termijn-tekst { font-size: 12.5px; color: var(--kleur-tekst-zacht); white-space: nowrap; }

/* --- Team: dagoverzicht (Monitor-surface: dicht, geen hero) --- */
.dagoverzicht-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .dagoverzicht-grid { grid-template-columns: repeat(2, 1fr); }
}
.baan {
  background: var(--kleur-wit);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  padding: 10px;
  min-height: 120px;
}
.baan-kop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.baan-kop h4 { margin: 0; font-size: 13px; }
.baan-kop .aantal {
  font-size: 12px;
  font-weight: 700;
  background: var(--kleur-primair-licht);
  color: var(--kleur-primair);
  border-radius: 999px;
  padding: 1px 8px;
}
.baan.gevaar .aantal { background: #fbeae6; color: var(--kleur-gevaar); }
.baan-item {
  padding: 7px 8px;
  border-radius: 7px;
  background: var(--kleur-ondergrond);
  margin-bottom: 6px;
  font-size: 12.5px;
  cursor: pointer;
}
.baan-item:hover { background: var(--kleur-primair-licht); }
.baan-item .bi-titel { font-weight: 600; }
.baan-item .bi-sub { color: var(--kleur-tekst-zacht); font-size: 11.5px; margin-top: 1px; }
.baan-leeg { font-size: 12px; color: var(--kleur-tekst-zacht); font-style: italic; padding: 6px 2px; }

/* --- Dossierdetail (team) --- */
.dossier-detail {
  display: none;
}
.dossier-detail.open { display: block; }

.terug-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--kleur-primair);
  font-weight: 600;
  margin-bottom: 10px;
  background: none;
  border: none;
  padding: 0;
}

/* --- Reset-knop, altijd bereikbaar, niet opdringerig --- */
.reset-knop {
  position: fixed;
  bottom: 14px;
  right: 14px;
  z-index: 20;
  font-size: 11.5px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--kleur-rand);
  background: var(--kleur-wit);
  color: var(--kleur-tekst-zacht);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.reset-knop:hover { color: var(--kleur-gevaar); border-color: var(--kleur-gevaar); }

/* --- Architectuur-toggle: laat zien welke Euporo-agent/DataView/Actions erachter zitten --- */
.architectuur-toggle {
  position: fixed;
  bottom: 14px;
  left: 14px;
  z-index: 20;
  font-size: 11.5px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--kleur-rand);
  background: var(--kleur-wit);
  color: var(--kleur-tekst-zacht);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.architectuur-toggle:hover { color: var(--kleur-primair); border-color: var(--kleur-primair); }
.architectuur-toggle.actief {
  background: #1c2321;
  color: #fff;
  border-color: #1c2321;
}

.architectuur-laag {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #1c2321;
  color: #d7ded9;
  font-size: 11.5px;
  line-height: 1.6;
  font-family: "SF Mono", "Consolas", monospace;
}
body.architectuur-actief .architectuur-laag { display: block; }
.architectuur-alleen { display: none; padding: 10px 14px 4px !important; }
body.architectuur-actief .architectuur-alleen { display: block; }
.architectuur-rij b {
  color: #8fd6a8;
  font-weight: 600;
  margin-right: 6px;
}
.architectuur-meta { color: #8b9490; margin-left: 6px; }

/* Ook zichtbaar op de niet-actieve (ingeklapte) blokkaarten in de fase-balk-weergave */
.blok .architectuur-laag { margin: 0 14px 12px; }

/* --- Footer: powered-by, klein --- */
.powered-by {
  text-align: center;
  font-size: 11px;
  color: var(--kleur-tekst-zacht);
  padding: 18px 0 60px;
}

/* --- Mobiel-formaat helper (telefoonkader op landingspagina) --- */
.telefoon-kader {
  width: 375px;
  max-width: 100%;
  margin: 0 auto;
  border: 8px solid #1c2321;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.telefoon-kader iframe { display: block; width: 100%; height: 720px; border: none; }

.laptop-kader {
  border: 8px solid #1c2321;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.laptop-kader iframe { display: block; width: 100%; height: 640px; border: none; }
