/* Huisstijl: het paars (#934b97) uit het Deltawerkers-logo is het accentkleur
   door de hele app heen (knoppen, links, actieve tabs, highlights); de donkere
   balk/sidebar-achtergrond is een bijpassende diepe tint van diezelfde kleur
   i.p.v. de vorige neutrale marineblauw. */
:root {
  --accent: #934b97;
  --accent-dark: #3d2140;
}
* { box-sizing: border-box; }
/* Vangnet tegen horizontale pagina-overflow op mobiel: brede elementen (tabellen)
   horen intern te scrollen via .table-scroll, niet de hele pagina breder te maken
   dan het scherm. */
html, body { max-width: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  background: #f4f6f8;
  color: #1c2733;
}
/* De balk heeft twee rijen: bovenaan de titel (+ hamburger op mobiel),
   daaronder altijd de navigatie op een eigen regel - ook op desktop, zodat de
   links nooit tegen de titel aan hoeven te wrappen. */
.topbar {
  background: var(--accent-dark);
  color: white;
  padding: 14px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.topbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-title { display: flex; align-items: center; gap: 10px; font-weight: 600; color: inherit; text-decoration: none; }
.topbar-title:hover { text-decoration: none; opacity: .9; }
.topbar-logo { height: 26px; width: auto; display: block; }
.topbar-subtitle {
  font-size: .82em;
  font-weight: 500;
  opacity: .85;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,.3);
  white-space: nowrap;
}
.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.topbar-nav a {
  color: white;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.topbar-nav a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.user-info { margin: 0 2px; padding: 6px 8px; opacity: .85; font-size: .9em; white-space: nowrap; }
.user-role { opacity: .8; }

/* Uitklapmenu's in de navigatie (bijv. "Overzicht", "Settings"), opgebouwd met
   native <details>/<summary> zodat er geen extra JS-framework nodig is. */
.nav-dropdown { position: relative; }
.nav-dropdown summary {
  color: white;
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 6px 10px;
  border-radius: 6px;
}
.nav-dropdown summary:hover { background: rgba(255,255,255,.12); }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: " \25BE"; font-size: .8em; }
.nav-dropdown[open] summary::after { content: " \25B4"; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--accent-dark);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 180px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  z-index: 30;
  display: flex;
  flex-direction: column;
}
.nav-dropdown-menu a {
  margin-left: 0;
  padding: 8px 14px;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: rgba(255,255,255,.08); text-decoration: none; }

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,.4);
  color: white;
  font-size: 1.3em;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* Sidebar met de primaire navigatie (Dashboard, Mijn clienten, ...), links naast
   de inhoud - op desktop altijd zichtbaar, op mobiel via de hamburger. Inbox/MIA/
   gebruikersnaam/Uitloggen blijven in de bovenste balk (.topbar-nav) staan. */
.app-shell { display: flex; align-items: stretch; }
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 208px;
  flex: 0 0 208px;
  background: var(--accent-dark);
  padding: 18px 10px;
}
.sidebar a, .sidebar .nav-dropdown summary {
  display: block;
  color: white;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 6px;
  white-space: normal;
}
.sidebar a:hover, .sidebar .nav-dropdown summary:hover { background: rgba(255,255,255,.12); }
/* Dashboard/home-link duidelijk laten opvallen tussen de rest van de sidebar-links. */
.sidebar-home {
  font-weight: 700;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  margin-bottom: 6px;
}
.sidebar-home:hover { background: rgba(255,255,255,.16) !important; }
.sidebar .nav-dropdown { position: static; }
.sidebar .nav-dropdown-menu {
  position: static;
  box-shadow: none;
  border: none;
  background: rgba(255,255,255,.06);
  border-radius: 6px;
  min-width: 0;
  padding: 2px 0;
  margin: 2px 0 4px;
}
.sidebar .nav-dropdown-menu a { padding: 8px 12px 8px 26px; font-size: .93em; }
.sidebar-logout {
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 12px !important;
}

.content { flex: 1 1 auto; min-width: 0; padding: 24px; max-width: 1100px; margin: 0 auto; }
.footer {
  text-align: center;
  padding: 16px;
  font-size: .8em;
  color: #6b7885;
}
.footer a { color: #6b7885; margin-left: 8px; }
.card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.login-card { max-width: 380px; margin: 60px auto; }
h1 { margin-top: 0; }
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.page-header h1, .page-header h3 { margin: 0; flex-grow: 1; }
.badge {
  background: #e2e8f0;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: .85em;
}
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: .9em;
}
.btn-primary { background: var(--accent); color: white; }
.btn-secondary { background: #e2e8f0; color: #1c2733; }
.btn-success { background: #2f9e52; color: white; }
/* Terughoudende variant voor minder vaak gebruikte / negatieve acties (bijv. "niet
   succesvol afronden"), zodat deze niet met dezelfde nadruk staan als de primaire
   acties op een kaart. */
.btn-outline {
  background: transparent;
  color: #55606b;
  border: 1px solid #ccd4dc;
}
.btn-outline:hover { background: #f4f6f8; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 4px; font-weight: 500; font-size: .9em; }
.field input, .field select { padding: 8px; width: 100%; max-width: 360px; min-height: 40px; border: 1px solid #ccd4dc; border-radius: 4px; font-size: 1em; }
/* Checkboxen/radio's moeten niet de generieke tekstveld-stijl krijgen (anders worden
   ze een groot leeg vlak i.p.v. een herkenbaar vinkje). */
.field input[type="checkbox"], .field input[type="radio"] {
  width: 18px;
  min-height: auto;
  height: 18px;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
}
.btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; }

/* Compacte knoppenrij voor tabelcellen met meerdere acties (bijv. coaches-beheer).
   Een table-cel groeit standaard mee met de inhoud i.p.v. flex-wrap te laten werken,
   dus zetten we een maximumbreedte zodat de knoppen daadwerkelijk gaan wrappen i.p.v.
   de kolom eindeloos breed te duwen. */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  max-width: 320px;
}
.actions .btn, .actions form { margin: 0; }
.actions .btn {
  padding: 5px 10px;
  font-size: .8em;
  min-height: 30px;
  white-space: nowrap;
}

.datatable { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.datatable th, .datatable td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e6eaee; font-size: .92em; }
.datatable th { background: #f0f3f6; }
.datatable tfoot td { border-bottom: none; border-top: 2px solid #dde3ea; background: #f7f9fb; }

/* Kaartweergave op mobiel voor tabellen die anders alleen met opzij scrollen te lezen
   zijn (Mijn clienten, trajectoverzicht): elke rij wordt een los blok met per veld het
   label (uit data-label op de <td>) boven de waarde, i.p.v. horizontaal scrollen. */
@media (max-width: 700px) {
  .datatable-kaarten { min-width: 0 !important; }
  .datatable-kaarten thead { display: none; }
  .datatable-kaarten, .datatable-kaarten tbody, .datatable-kaarten tr, .datatable-kaarten td { display: block; width: 100%; }
  .datatable-kaarten tr {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #fff;
  }
  .datatable-kaarten td {
    border-bottom: none;
    padding: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    text-align: right;
  }
  .datatable-kaarten td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: .76em;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #6b7885;
    text-align: left;
    flex: 0 0 auto;
  }
  .datatable-kaarten td[data-label=""] { justify-content: flex-end; }
  .datatable-kaarten td[data-label="Naam"], .datatable-kaarten td[data-label="Client"] { font-weight: 700; }
  .datatable-kaarten td[colspan] { justify-content: space-between; }
}
/* Gegevens-tabellen (bijv. "Kandidaatgegevens", "Klantgegevens"): label + waarde
   per regel, met wat lucht en een subtiele scheidingslijn i.p.v. een dichte tabel. */
.kv { width: 100%; border-collapse: separate; border-spacing: 0; }
.kv tr:not(:last-child) th,
.kv tr:not(:last-child) td { border-bottom: 1px solid #eef1f5; }
.kv th {
  text-align: left;
  vertical-align: top;
  padding: 11px 20px 11px 0;
  width: 240px;
  color: #6b7885;
  font-weight: 600;
  font-size: .76em;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.kv td { padding: 11px 0; font-size: .95em; color: #1c2733; line-height: 1.5; }
.kv tr:hover th, .kv tr:hover td { background: #f9fafb; }
/* Rijtje contactacties (telefoon/e-mail/vcard) als rustige chips i.p.v. losse
   onderstreepte blauwe links achter elkaar met streepjes ertussen. */
.contact-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  line-height: 1;
}
.contact-chip {
  display: inline-flex;
  align-items: center;
  background: #f0f3f6;
  color: #33404b;
  border-radius: 14px;
  padding: 5px 12px;
  font-size: .86em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.contact-chip:hover { background: #e2e8f0; text-decoration: none; }
.contact-chip-met-balk {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 130px;
  white-space: normal;
}
.contact-chip-met-balk span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-chip-met-balk .tijdbalk-wrap { min-width: 0; }
.kv td > div:first-child:not(.contact-chips) { line-height: 1.3; }
.kv-badge {
  display: inline-flex;
  align-items: center;
  background: #f4eaf5;
  color: var(--accent);
  border-radius: 14px;
  padding: 5px 12px;
  font-weight: 600;
  font-size: .86em;
  line-height: 1.2;
}
@media (max-width: 640px) {
  .kv, .kv tbody, .kv tr, .kv th, .kv td { display: block; width: auto; }
  .kv tr { padding: 10px 0; }
  .kv tr:not(:last-child) { border-bottom: 1px solid #eef1f5; }
  .kv tr:not(:last-child) th,
  .kv tr:not(:last-child) td { border-bottom: none; }
  .kv th { padding: 0 0 3px; }
  .kv td { padding: 0; }
}
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.flash-success { background: #e3f6e8; color: #1e6b34; }
.flash-danger { background: #fbe4e4; color: #9b2c2c; }
.status { padding: 2px 8px; border-radius: 10px; font-size: .8em; }
.status-actief, .status-op-schema { background: #e3f6e8; color: #1e6b34; }
.status-aandachtspunt { background: #fff4d6; color: #92650a; }
.status-overschrijding { background: #fbe4e4; color: #9b2c2c; }
.status-afgerond { background: #e2e8f0; color: #444; }
.status-gestopt { background: #f0d9d9; color: #7a3030; }
.traject-card { border-left: 4px solid var(--accent); }
/* Actierij bovenaan de trajectkaart: iets compacter dan de standaard page-header
   knoppen, zodat een traject met veel mogelijke acties (fase wijzigen, uren
   registreren, afronden in 3 varianten, facturen aanmaken) niet meteen twee
   volle rijes grote knoppen wordt. */
.traject-actions { gap: 8px; }
.traject-actions .btn {
  padding: 6px 12px;
  font-size: .85em;
  min-height: 32px;
}
.traject-actions form { margin: 0; }
.traject-actions-spacer { flex: 1 0 auto; min-width: 0; }
@media (max-width: 640px) { .traject-actions-spacer { display: none; } }
.hint { font-size: .85em; color: #6b7885; margin: -6px 0 12px; }

.chrono-list { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.chrono-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #f7f9fb;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 220px;
}
.chrono-row { font-size: .85em; color: #223; }
.chrono-label { font-weight: 600; color: #445; margin-right: 4px; }
.chrono-arrow { color: #9aa5b1; font-size: 1.1em; align-self: center; }
.chrono-chip {
  display: inline-block;
  background: #eef1f5;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: .8em;
  color: #445;
  white-space: nowrap;
}

.tijd-lamp {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.tijd-lamp-oranje { background: #f5a623; box-shadow: 0 0 4px #f5a623; }
.tijd-lamp-rood { background: #d0342c; box-shadow: 0 0 4px #d0342c; }

/* Tabbladen op de kandidaat-detailpagina (puur CSS, geen JS nodig) */
.tabs input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.tab-headers { display: flex; gap: 4px; border-bottom: 2px solid #e2e8f0; margin-bottom: 16px; flex-wrap: wrap; }
.tab-headers label {
  padding: 8px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: #6b7885;
  font-weight: 500;
  margin-bottom: -2px;
}
.tab-panel { display: none; }
#tab-overzicht:checked ~ .panel-overzicht { display: block; }
#tab-traject-detail:checked ~ .panel-traject-detail { display: block; }
#tab-documenten:checked ~ .panel-documenten { display: block; }
#tab-verslagen:checked ~ .panel-verslagen { display: block; }
#tab-overzicht:checked ~ .tab-headers label[for="tab-overzicht"],
#tab-traject-detail:checked ~ .tab-headers label[for="tab-traject-detail"],
#tab-documenten:checked ~ .tab-headers label[for="tab-documenten"],
#tab-verslagen:checked ~ .tab-headers label[for="tab-verslagen"] {
  border-color: var(--accent);
  color: var(--accent);
}
.verslag-item { border-left: 4px solid #6b7885; }
.verslag-tekst { white-space: pre-wrap; background: #f7f9fb; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; }

/* Dashboard: tegel-navigatie + gauge */
.dashboard-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.dashboard-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 10px;
  color: #223;
  text-decoration: none;
  font-weight: 600;
  font-size: .9em;
  transition: box-shadow .15s ease, transform .15s ease;
}
.dashboard-tile:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-2px); }
.dashboard-tile-icon { font-size: 1.8em; }

/* Twee kolommen naast elkaar (tegels + clientenkaart | gauge + trajectoverzicht),
   even hoog gerekt zodat de clientenkaart meegroeit tot de onderkant van de
   rechterkolom i.p.v. als los blok met een andere hoogte eronder te staan. */
.dashboard-columns { display: flex; flex-wrap: wrap; align-items: stretch; gap: 16px; margin-bottom: 20px; }
.dashboard-col { display: flex; flex-direction: column; gap: 16px; flex: 1 1 380px; min-width: 0; }
.dashboard-col .dashboard-tiles { margin-bottom: 0; }
.dashboard-clienten-card { flex: 1; display: flex; flex-direction: column; margin-bottom: 0; }
.dashboard-clienten-card .clienten-uitklap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.dashboard-clienten-card .clienten-uitklap-lijst { flex: 1; max-height: none; }
.dashboard-top { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.gauge-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.gauge-svg { width: 140px; height: 140px; }
.gauge-label { font-size: .85em; color: #6b7885; margin: 0; font-weight: 600; }
.traject-overzicht-card { min-width: 220px; justify-content: center; }

/* Compacte horizontale looptijdbalk per client-rij (clientenoverzichten): groeit
   van links naar rechts mee met de verstreken tijd t.o.v. de geplande einddatum. */
.tijdbalk-wrap { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.tijdbalk {
  flex: 1 1 auto;
  height: 8px;
  min-width: 60px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
}
.tijdbalk-vulling { height: 100%; border-radius: 5px 0 0 5px; transition: width .2s ease; }
.tijdbalk-groen { background: #1e8449; }
.tijdbalk-oranje { background: #e08e0b; }
.tijdbalk-rood { background: #c0392b; }
.tijdbalk-datum { font-size: .82em; color: #6b7885; white-space: nowrap; }

/* Coachkaarten (gemeenteoverzicht): grid van kaarten met naam, capaciteitsring en
   gemeente-badges - de .gauge-card zit hier genest in de buitenste .card, dus zonder
   eigen rand/achtergrond zodat het niet dubbel oogt. */
/* Tabbladen (bijv. documentenoverzicht per traject-type). */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 18px;
}
.tab-btn {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: .92em;
  font-weight: 600;
  color: #6b7885;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn:hover { color: #223; }
.tab-btn-actief { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel-actief { display: block; }

.coach-kaarten-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.coach-kaart {
  align-items: center;
  text-align: center;
  transition: box-shadow .15s ease, transform .15s ease;
}
.coach-kaart:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-2px); }
.coach-kaart-link { display: flex; flex-direction: column; align-items: center; color: inherit; text-decoration: none; width: 100%; }
.coach-kaart-naam { font-weight: 700; font-size: 1.05em; margin: 0 0 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.coach-kaart .gauge-card { border: none; padding: 0; background: transparent; }
.coach-kaart .contact-chips { justify-content: center; }

/* Werkgebieden (gemeentes) per coach als uitklapbare dropdown i.p.v. altijd-
   zichtbare chips, zodat coachkaarten met veel gemeentes niet meer uitlijnen
   met kaarten met weinig gemeentes. */
.werkgebieden-uitklap { margin-top: 10px; width: 100%; }
.werkgebieden-uitklap summary {
  cursor: pointer;
  list-style: none;
  color: var(--accent);
  font-weight: 600;
  font-size: .85em;
  padding: 4px 0;
  user-select: none;
}
.werkgebieden-uitklap summary::-webkit-details-marker { display: none; }
.werkgebieden-uitklap summary::after { content: " \25BE"; font-size: .85em; }
.werkgebieden-uitklap[open] summary::after { content: " \25B4"; }
.werkgebieden-uitklap .contact-chips {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eef1f5;
}

/* Sleepvak voor documentupload: klikken opent de normale bestandskiezer, een
   bestand erop slepen vult 'm meteen in en verstuurt het formulier automatisch. */
.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed #c7d0d9;
  border-radius: 10px;
  padding: 28px 16px;
  margin-top: 4px;
  color: #6b7885;
  font-size: .92em;
  cursor: pointer;
  background: #f7f9fb;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.dropzone:hover { border-color: var(--accent); color: #33404b; }
.dropzone-actief { border-color: var(--accent); background: #f0e9f1; color: var(--accent); }

.factuurregel-zoekveld { width: 100%; max-width: 420px; margin-bottom: 14px; }

.search-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.search-bar input[type="text"] { flex: 1; min-width: 180px; }

.quick-search { position: relative; margin-top: 12px; }
.quick-search input[type="text"] { width: 100%; }
.quick-search-results {
  display: none;
  position: absolute;
  z-index: 10;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.1);
  max-height: 260px;
  overflow-y: auto;
}
.quick-search-item {
  display: block;
  padding: 8px 12px;
  color: #223;
  text-decoration: none;
  border-bottom: 1px solid #f0f2f5;
}
.quick-search-item:last-child { border-bottom: none; }
.quick-search-item:hover { background: #f7f9fb; }
.quick-search-empty { padding: 8px 12px; color: #6b7885; font-size: .9em; }

/* Uitklapbare volledige clientenlijst onder de snelzoekbalk op het Dashboard,
   zodat een coach met weinig clienten ze ook zonder te zoeken in 1 keer kan
   zien, zonder eerst naar de aparte clientenlijst-pagina te hoeven gaan. */
.clienten-uitklap { margin-top: 10px; }
.clienten-uitklap summary {
  cursor: pointer;
  list-style: none;
  color: var(--accent);
  font-weight: 600;
  font-size: .9em;
  padding: 4px 0;
  user-select: none;
}
.clienten-uitklap summary::-webkit-details-marker { display: none; }
.clienten-uitklap summary::after { content: " \25BE"; font-size: .85em; }
.clienten-uitklap[open] summary::after { content: " \25B4"; }

/* Generieke uitklapbare tabel (zie tabel_uitklap-macro): zelfde look als
   .clienten-uitklap, voor lange tabellen (bijv. facturatie-overzicht). */
.tabel-uitklap summary {
  cursor: pointer;
  list-style: none;
  color: var(--accent);
  font-weight: 600;
  font-size: .9em;
  padding: 4px 0;
  user-select: none;
}
.tabel-uitklap summary::-webkit-details-marker { display: none; }
.tabel-uitklap summary::after { content: " \25BE"; font-size: .85em; }
.tabel-uitklap[open] summary::after { content: " \25B4"; }
.tabel-uitklap[open] summary { margin-bottom: 8px; }
.clienten-uitklap-lijst {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #eef1f5;
  max-height: 280px;
  overflow-y: auto;
}
@media (max-width: 480px) {
  .chrono-list { flex-direction: column; align-items: stretch; }
  .chrono-arrow { display: none; }
}

/* Tabellen op smalle schermen horizontaal laten scrollen i.p.v. de pagina breken */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 8px;
}
.table-scroll .datatable { min-width: 640px; margin-bottom: 0; }

/* Tablet en telefoon: navigatie wordt een uitklapbaar hamburgermenu i.p.v. een
   balk die op smalle schermen krom loopt/afbreekt. */
@media (max-width: 800px) {
  /* Kernfix voor de horizontale-overflow-bug op mobiel: .content is een flex-item
     met "margin: 0 auto" (voor centreren op desktop binnen max-width:1100px).
     Zonder expliciete breedte laat flexbox zo'n item schrompelen/uitrekken op
     basis van zijn breedste kind (bijv. een datatable met min-width:640px in
     .table-scroll) i.p.v. gewoon de schermbreedte aan te houden - met als gevolg
     dat de hele pagina, inclusief knoppen/badges die daar niks mee te maken
     hebben, rechts leek afgesneden. Op mobiel is centreren toch niet relevant
     (content vult sowieso de volle breedte), dus zetten we hier expliciet
     width:100% en margin:0. */
  .content { width: 100%; max-width: 100%; margin: 0; padding: 14px; }
  .topbar { padding: 12px 16px; position: relative; }
  .card { padding: 14px; }
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header h1, .page-header h3 { flex-grow: 0; }
  .field input, .field select { max-width: 100%; }
  .login-card { margin: 24px auto; }
  form > .btn-primary, form > button[type="submit"] { width: 100%; text-align: center; }

  .menu-toggle { display: inline-block; }

  /* Op mobiel staat de sidebar niet meer los links, maar wordt hij (samen met
     de bovenste rij Inbox/MIA/Uitloggen) een uitklapbaar hamburgermenu, in
     gewone document-flow i.p.v. absoluut overlappend, zodat beide stukken
     netjes onder elkaar staan zonder overlap. */
  .app-shell { flex-direction: column; }
  .topbar-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--accent-dark);
    padding: 8px 16px 14px;
  }
  .topbar-nav.open { display: flex; }
  .topbar-nav a {
    margin-left: 0;
    padding: 10px 4px;
    border-radius: 0;
    border-top: 1px solid rgba(255,255,255,.15);
  }
  .topbar-nav a:hover { background: transparent; }
  .user-info { padding: 8px 4px 4px; margin: 0; border-top: 1px solid rgba(255,255,255,.15); display: block; }

  .sidebar {
    display: none;
    width: auto;
    flex: none;
    gap: 0;
    padding: 8px 16px 14px;
  }
  .sidebar.open { display: flex; }
  .sidebar a, .sidebar .nav-dropdown summary {
    padding: 10px 4px;
    border-radius: 0;
    border-top: 1px solid rgba(255,255,255,.15);
  }
  .sidebar a:hover, .sidebar .nav-dropdown summary:hover { background: transparent; }

  /* Op mobiel valt de uitklapmenu-positionering weg: het menu staat dan al
     verticaal gestapeld in het hamburgermenu, dus laten we het submenu gewoon
     inline meelopen i.p.v. absoluut positioneren. */
  .nav-dropdown-menu,
  .sidebar .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,.06);
    border-radius: 0;
    min-width: 0;
    padding: 0;
    margin: 0;
  }
  .nav-dropdown-menu a,
  .sidebar .nav-dropdown-menu a { padding: 10px 4px 10px 16px; border-top: 1px solid rgba(255,255,255,.1); }
}

@media (max-width: 480px) {
  h1 { font-size: 1.3em; }
  /* Op zeer smalle telefoons desnoods 1 kolom i.p.v. tegels die net niet passen. */
  .dashboard-tiles { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}

/* Envelop-icoon met ongelezen-teller in de navigatie: centrale inbox, vervangt de
   voormalige "Mijn facturen"-badge en de tijd-waarschuwing-pop-up. */
.nav-inbox-link { display: inline-flex; align-items: center; gap: 5px; }
.nav-inbox-badge {
  background: #d0342c;
  color: #fff;
  margin: 0;
  padding: 1px 7px;
  font-size: .75em;
  font-weight: 600;
  border-radius: 12px;
}

/* Workflow-stappenbalk op de trajectkaart: horizontale rij bolletjes verbonden
   door een lijntje, puur signalerend (voltooid/niet voltooid/niet van
   toepassing) - geen blokkade van acties. */
/* Bewust geen flex-wrap: bij te weinig breedte moet de rij horizontaal scrollen
   i.p.v. wrappen - anders springt de verbindingslijn los op de nieuwe regel (zie
   eerdere versie). Zo blijft de volgorde van stappen altijd als 1 doorlopende
   rij te lezen.
   align-items: flex-start (i.p.v. center) is de kern van de uitlijning: elke
   stap-kolom en elke verbindingslijn start op dezelfde y-positie (de bovenkant
   van de rij), waarna de lijn met een vaste margin-top exact op het midden van
   het bolletje uitkomt (zie .workflow-lijn). Zo blijven de bolletjes altijd
   netjes op 1 lijn, ongeacht of een label 1 of 2 regels beslaat of een stap wel/
   geen rode "X document(en) nog niet geupload"-badge heeft. */
.workflow-balk {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 0;
  margin: 4px 0 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 10px;
}
.workflow-stap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 96px;
  max-width: 168px;
  text-align: center;
}
.workflow-stap form { margin: 0; }
.workflow-bolletje {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #c7d0d9;
  background: #fff;
  padding: 0;
  cursor: default;
  display: inline-block;
  flex: 0 0 auto;
}
.workflow-stap form .workflow-bolletje { cursor: pointer; }
.workflow-stap.wf-voltooid .workflow-bolletje { background: #2f9e52; border-color: #2f9e52; }
.workflow-stap.wf-open .workflow-bolletje { background: #fff; border-color: #c7d0d9; }
.workflow-stap.wf-nvt .workflow-bolletje { background: #eef1f5; border-color: #eef1f5; }
.workflow-stap-label {
  font-size: .74em;
  color: #55606b;
  line-height: 1.3;
  max-width: 100%;
}
.workflow-stap.wf-nvt .workflow-stap-label { color: #a3adb8; text-decoration: line-through; }
.workflow-stap-verwijder {
  background: none;
  border: none;
  color: #9b2c2c;
  cursor: pointer;
  font-size: 1em;
  padding: 0 0 0 3px;
  line-height: 1;
}
/* margin-top = halve bolletje-hoogte (9px) minus halve lijn-hoogte (1px), zodat
   de lijn precies op het midden van het bolletje aansluit. flex: 1 1 zorgt dat
   de lijnen de resterende ruimte gelijk verdelen, zodat de balk op brede
   schermen mooi uitvult i.p.v. links samengeklonterd te staan. */
.workflow-lijn {
  height: 2px;
  background: #dde3ea;
  flex: 1 1 32px;
  min-width: 20px;
  margin: 8px 4px 0;
}
@media (max-width: 640px) {
  .workflow-stap { min-width: 78px; }
  .workflow-lijn { flex-basis: 20px; min-width: 14px; }
}
.workflow-stap-docs-ontbreken {
  display: inline-block;
  font-size: .68em;
  color: #9b2c2c;
  font-weight: 600;
  margin-top: 1px;
  background: #fbe4e4;
  border-radius: 8px;
  padding: 2px 7px;
  line-height: 1.35;
}

/* Verplichte-documenten-checklist boven de documententabel op de trajectkaart. */
.verplichte-docs-checklist { margin-bottom: 10px; }
.verplicht-doc-chip { font-weight: 600; }
.verplicht-doc-ok { background: #e3f6e8; color: #1e6b34; }
.verplicht-doc-ontbreekt { background: #fbe4e4; color: #9b2c2c; }

/* Aanvink-chips op het "Verplichte documenten"-overzicht per traject-type: elke
   standaard documentcategorie is een los toggle-vakje dat direct opslaat bij klikken
   (geen apart "Opslaan"-knopje nodig). */
.verplicht-doc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0f3f6;
  color: #33404b;
  border: 1px solid #dde3ea;
  border-radius: 14px;
  padding: 6px 14px 6px 10px;
  font-size: .88em;
  cursor: pointer;
  user-select: none;
}
.verplicht-doc-toggle input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }
.verplicht-doc-toggle-aan {
  background: #f4eaf5;
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Documentenchecklist per traject: op volgorde onder elkaar, elke regel als 1
   nette, over de volle breedte uitgelijnde balk met de acties (uploaden/bekijken/
   verwijderen) rechts, allemaal op dezelfde hoogte i.p.v. losse knopjes ernaast. */
.doc-checklist-lijst {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.doc-checklist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  background: #f0f3f6;
  border: 1px solid #dde3ea;
  border-radius: 14px;
  padding: 5px 8px 5px 14px;
}
.doc-checklist-row-aan {
  background: #f4eaf5;
  border-color: var(--accent);
}
.doc-checklist-toggle-form { margin: 0; flex: 1 1 auto; min-width: 0; }
.doc-checklist-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  color: #33404b;
  font-size: .88em;
}
.doc-checklist-row-aan .doc-checklist-label { color: var(--accent); font-weight: 600; }
.doc-checklist-label input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }
.doc-checklist-label-disabled { color: #98a2ad; cursor: not-allowed; }
.doc-checklist-label-disabled input[type="checkbox"] { cursor: not-allowed; }
.doc-checklist-acties { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.doc-checklist-btn {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #33404b;
  border: 1px solid #c9d2db;
  border-radius: 12px;
  padding: 5px 12px;
  font-size: .8em;
  font-family: inherit;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.doc-checklist-btn:hover { background: #eef1f4; text-decoration: none; }
