/* Bouwportaal – stijl. Kleuren aanpassen? Wijzig de variabelen hieronder. */
:root {
  --donker: #1f2a37;
  --donker-2: #2d3b4b;
  --accent: #e8711a;
  --accent-donker: #c85d0f;
  --tekst: #1f2933;
  --tekst-zacht: #5f6b7a;
  --rand: #dfe3e8;
  --vlak: #ffffff;
  --achtergrond: #f2f4f7;
  --goed: #1e8e4f;
  --goed-vlak: #e5f5ec;
  --fout: #c0392b;
  --fout-vlak: #fdecea;
  --let-op: #a86300;
  --let-op-vlak: #fff4e0;
  --info-vlak: #e8f1fb;
  --info: #1f5f9e;
  --radius: 10px;
  --schaduw: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--achtergrond); color: var(--tekst);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--info); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 1rem 0 .5rem; }
.card h3:first-child { margin-top: 0; }
p { margin: 0 0 .75rem; }
code, .codeblok { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.codeblok { background: var(--donker); color: #f8f8f2; padding: 12px; border-radius: 8px; overflow-x: auto; font-size: .85rem; }
.sub { color: var(--tekst-zacht); margin: 0; }
.klein { font-size: .875rem; color: var(--tekst-zacht); }
.leeg { color: var(--tekst-zacht); font-style: italic; }
.goed { color: var(--goed); }
.let-op { color: var(--let-op); }
.rechts { text-align: right; }

/* ---------- kop en navigatie ---------- */
.topbalk { background: var(--donker); color: #fff; position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.topbalk-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.merk { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.merk-blok { width: 22px; height: 22px; border-radius: 5px; background: var(--accent); display: inline-block; box-shadow: inset -6px -6px 0 rgba(0,0,0,.18); flex: none; }
.gebruiker { display: flex; gap: 14px; align-items: center; font-size: .9rem; }
.gebruiker a { color: #cfd8e3; text-decoration: none; }
.gebruiker a:hover, .gebruiker a.actief { color: #fff; }
.uitlog { border: 1px solid rgba(255,255,255,.25); padding: 4px 10px; border-radius: 6px; }
.hoofdnav { background: var(--donker-2); }
.nav-in { max-width: 1200px; margin: 0 auto; padding: 0 8px; display: flex; overflow-x: auto; scrollbar-width: none; }
.nav-in::-webkit-scrollbar { display: none; }
.hoofdnav a { color: #cfd8e3; text-decoration: none; padding: 11px 12px; white-space: nowrap; font-size: .95rem; border-bottom: 3px solid transparent; }
.hoofdnav a:hover { color: #fff; }
.hoofdnav a.actief { color: #fff; border-bottom-color: var(--accent); font-weight: 600; }

/* ---------- opbouw ---------- */
.inhoud { max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; }
.gast-inhoud { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 40px; flex-direction: column; align-items: center; }
.gast-inhoud > .melding { width: 100%; max-width: 420px; }
.voet { text-align: center; color: var(--tekst-zacht); font-size: .8rem; padding: 0 16px 24px; }
.paginakop { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.paginakop .sub a { text-decoration: none; }
.kop-acties { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sectiekop { margin: 28px 0 12px; font-size: 1.2rem; }
.card { background: var(--vlak); border-radius: var(--radius); box-shadow: var(--schaduw); padding: 18px; margin-bottom: 16px; }
.card.smal { max-width: 620px; margin-left: auto; margin-right: auto; }
.smal-links { max-width: 620px; }
.raster-2, .raster-3, .raster-zij { display: grid; gap: 16px; grid-template-columns: 1fr; }
.raster-2 > .card, .raster-3 > .card, .raster-zij > .card { margin-bottom: 0; }
.raster-2, .raster-3, .raster-zij { margin-bottom: 16px; }
@media (min-width: 800px) {
  .raster-2 { grid-template-columns: 1fr 1fr; }
  .raster-3 { grid-template-columns: repeat(3, 1fr); }
  .raster-zij { grid-template-columns: minmax(300px, 400px) 1fr; align-items: start; }
}

/* ---------- inlogkaart ---------- */
.login-kaart { background: var(--vlak); border-radius: 14px; box-shadow: 0 10px 30px rgba(16,24,40,.12); padding: 28px 24px; width: 100%; max-width: 420px; }
.login-kaart.breed { max-width: 560px; }
.login-kop { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.login-kop .merk-blok { width: 34px; height: 34px; border-radius: 8px; }
.login-kop strong { display: block; }
.login-kop small { color: var(--tekst-zacht); }
.stappen { padding-left: 1.2rem; }
.stappen li { margin-bottom: .75rem; }
.qr { background: #fff; padding: 8px; display: inline-block; border: 1px solid var(--rand); border-radius: 8px; margin: 10px 0; }
.qr svg { display: block; width: 220px; height: 220px; }
.sleutel { font-size: 1rem; letter-spacing: 1px; background: var(--achtergrond); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.codes code { display: block; text-align: center; background: var(--achtergrond); padding: 8px; border-radius: 6px; font-size: 1.1rem; letter-spacing: 1px; }

/* ---------- formulieren ---------- */
.formulier { display: flex; flex-direction: column; gap: 12px; }
.rij { display: flex; gap: 12px; flex-wrap: wrap; }
.rij > .veld { flex: 1 1 160px; }
.veld { display: flex; flex-direction: column; gap: 4px; }
.veld > span { font-size: .875rem; font-weight: 600; color: var(--tekst); }
.veld em { font-weight: 400; color: var(--tekst-zacht); font-style: normal; }
.veld-datum { flex: 1 1 170px !important; }
.veld-uren, .veld-aantal { flex: 0 1 130px !important; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=search], select, textarea {
  font: inherit; color: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--rand); border-radius: 8px; background: #fff; min-height: 44px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.code-invoer { font-size: 1.5rem !important; letter-spacing: 6px; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; }
.vinkje { display: flex; align-items: center; gap: 8px; font-size: .95rem; cursor: pointer; }
.vinkje input { width: 20px; height: 20px; accent-color: var(--accent); }
.knoppen { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--rand);
  background: #fff; color: var(--tekst); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: #f7f8fa; }
.btn-primair { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primair:hover { background: var(--accent-donker); border-color: var(--accent-donker); }
.btn-breed { width: 100%; }
.link-knop { background: none; border: 0; padding: 0; color: var(--info); font: inherit; font-size: .875rem; cursor: pointer; text-decoration: underline; }
.link-knop.gevaar { color: var(--fout); }
.inline-form { display: inline; }
.filterbalk { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filterbalk > * { flex: 1 1 180px; }
.filterbalk .btn { flex: 0 0 auto; }
.weeknav { display: flex; gap: 6px; }
.weeknav .btn { min-width: 44px; }
.link-veld { margin: 6px 0; font-size: .85rem; }
details summary { cursor: pointer; padding: 6px 0; }
details[open] summary { margin-bottom: 8px; }

/* ---------- meldingen en badges ---------- */
.melding { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid transparent; }
.melding ul { margin: 0; padding-left: 1.1rem; }
.melding-ok { background: var(--goed-vlak); color: #145c35; border-color: #b8e2c8; }
.melding-fout { background: var(--fout-vlak); color: #8e2a1f; border-color: #f3c3bd; }
.melding-info { background: var(--info-vlak); color: #18497a; border-color: #c4dbf3; }
.melding-let-op { background: var(--let-op-vlak); color: #7a4800; border-color: #f2d49b; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eef1f4; color: var(--tekst-zacht); vertical-align: middle; }
.badge-ok { background: var(--goed-vlak); color: var(--goed); }
.badge-mist { background: var(--fout-vlak); color: var(--fout); }
.badge-let-op { background: var(--let-op-vlak); color: var(--let-op); }
.badge-afwezig { background: var(--info-vlak); color: var(--info); }
.badge-meerwerk { background: #f3e8ff; color: #6b21a8; }
.badge-geleverd { background: #e0f2fe; color: #075985; }
.status { font-size: .8rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eef1f4; color: var(--tekst-zacht); }
.status-actief { background: var(--goed-vlak); color: var(--goed); }
.status-offerte { background: var(--let-op-vlak); color: var(--let-op); }
.status-opgeleverd { background: var(--info-vlak); color: var(--info); }

/* ---------- lijsten ---------- */
.lijst { list-style: none; margin: 0; padding: 0; }
.lijst li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rand); }
.lijst li:last-child { border-bottom: 0; }
.lijst-detail li { align-items: flex-start; }
.totaal { margin: 12px 0 0; padding-top: 10px; border-top: 2px solid var(--rand); text-align: right; }

/* weekstrook op dashboard */
.weekstrook { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.weekstrook a { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; padding: 8px 2px; border-radius: 8px; background: var(--achtergrond); border: 2px solid transparent; }
.dagnaam { font-size: .75rem; color: var(--tekst-zacht); text-transform: uppercase; }
.dagwaarde { font-weight: 700; font-size: .85rem; text-align: center; }
.dag-ok a { background: var(--goed-vlak); }
.dag-ok .dagwaarde { color: var(--goed); }
.dag-mist a { background: var(--fout-vlak); }
.dag-mist .dagwaarde { color: var(--fout); font-size: .7rem; }
.dag-afwezig a { background: var(--info-vlak); }
.dag-afwezig .dagwaarde { color: var(--info); font-size: .65rem; font-weight: 600; }
.dag-vrij a { opacity: .55; }
.dag-vandaag a { border-color: var(--accent); }

/* dagen op urenpagina */
.dagblok { border: 1px solid var(--rand); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.dagblok-mist { border-color: #f3c3bd; background: #fffafa; }
.dagblok-vandaag { border-color: var(--accent); }
.dagblok-kop { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.dagblok-kop span { display: flex; gap: 6px; align-items: center; }
.regel { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0 4px; border-top: 1px dashed var(--rand); margin-top: 8px; }
.regel-hoofd { display: flex; flex-direction: column; }
.regel-omschrijving { font-size: .875rem; color: var(--tekst-zacht); }
.regel-acties { grid-column: 1 / -1; display: flex; gap: 14px; font-size: .875rem; }
.regel-afwezig { grid-template-columns: 1fr auto; align-items: center; }

/* ---------- tabellen ---------- */
.tabel-wrap { overflow-x: auto; }
.tabel { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabel th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--tekst-zacht); padding: 8px 10px; border-bottom: 2px solid var(--rand); white-space: nowrap; }
.tabel td { padding: 10px; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabel .num { text-align: right; white-space: nowrap; }
.tabel .acties { white-space: nowrap; }
.tabel .acties > * { margin-left: 10px; font-size: .875rem; }
.tabel tr.inactief td { opacity: .55; }
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.matrix .weekend { background: #f7f8fa; color: #9aa4b1; }
.cel-ok { background: var(--goed-vlak); color: #145c35; font-weight: 600; }
.cel-afwezig { background: var(--info-vlak); color: var(--info); font-size: .78rem; }
.cel-mist { background: var(--fout-vlak); color: var(--fout); font-weight: 700; }
.matrix sup { font-size: .65rem; margin-left: 2px; }
.legenda { margin-top: 10px; font-size: .8rem; color: var(--tekst-zacht); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.legenda span[class] { padding: 2px 8px; border-radius: 4px; }

@media (max-width: 700px) {
  .tabel:not(.matrix) thead { display: none; }
  .tabel:not(.matrix), .tabel:not(.matrix) tbody, .tabel:not(.matrix) tr, .tabel:not(.matrix) td { display: block; width: 100%; }
  .tabel:not(.matrix) tr { border-bottom: 2px solid var(--rand); padding: 8px 0; }
  .tabel:not(.matrix) td { border: 0; padding: 3px 0; text-align: left !important; }
  .tabel:not(.matrix) td[data-label]::before { content: attr(data-label) ": "; color: var(--tekst-zacht); font-size: .8rem; }
  .tabel .acties > * { margin: 0 14px 0 0; }
  h1 { font-size: 1.35rem; }
  .card { padding: 14px; }
}

/* ---------- projecten ---------- */
.projectkaarten { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.projectkaart { background: var(--vlak); border-radius: var(--radius); box-shadow: var(--schaduw); padding: 16px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; border-top: 4px solid var(--accent); }
.projectkaart:hover { box-shadow: 0 6px 16px rgba(16,24,40,.12); }
.pk-kop { display: flex; justify-content: space-between; align-items: center; }
.pk-nummer { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; color: var(--tekst-zacht); }
.pk-naam { font-size: 1.05rem; }
.pk-sub { font-size: .875rem; color: var(--tekst-zacht); min-height: 1.3em; }
.pk-cijfers { display: flex; justify-content: space-between; font-size: .875rem; margin-top: 6px; font-weight: 600; }
.voortgang { display: block; height: 6px; background: #e9edf1; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.voortgang > span { display: block; height: 100%; background: var(--goed); }
.voortgang.over > span { background: var(--fout); }
.voortgang.groot { height: 10px; margin-top: 14px; }
.gegevens { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 12px; }
.gegevens dt { color: var(--tekst-zacht); font-size: .9rem; }
.gegevens dd { margin: 0; }
.omschrijving { background: var(--achtergrond); padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: .95rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kpi { background: var(--achtergrond); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; }
.kpi-groot { grid-column: 1 / -1; background: var(--donker); color: #fff; }
.kpi-groot .kpi-label, .kpi-groot .kpi-sub { color: #cfd8e3; }
.kpi-groot .kpi-sub.let-op { color: #ffc27a; }
.kpi-groot .kpi-sub.goed { color: #8fe0b0; }
.kpi-label { font-size: .78rem; color: var(--tekst-zacht); text-transform: uppercase; letter-spacing: .03em; }
.kpi-waarde { font-size: 1.35rem; font-weight: 700; }
.kpi-sub { font-size: .78rem; color: var(--tekst-zacht); }

@media print {
  .topbalk, .hoofdnav, .kop-acties, .weeknav, .voet, .knoppen, form { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

@media (max-width: 520px) {
  .gebruiker > a:first-child { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .merk { font-size: .98rem; }
}

/* lijsten: getallen nooit afbreken, toelichting rechts uitlijnen */
.lijst li > strong { white-space: nowrap; }
.lijst li > .klein { text-align: right; flex: 0 1 45%; }
.dagnaam, .dagwaarde { white-space: nowrap; }
@media (max-width: 520px) {
  .weekstrook { gap: 4px; }
  .weekstrook a { padding: 7px 0; }
  .dagnaam { font-size: .62rem; letter-spacing: -.01em; }
  .dagwaarde { font-size: .74rem; }
  .dag-mist .dagwaarde { font-size: .58rem; }
  .dag-afwezig .dagwaarde { font-size: .6rem; }
}

/* ---------- agenda / planning ---------- */
.kleur-0 { --pk: #2563eb; --pk-vlak: #e8effd; }
.kleur-1 { --pk: #15803d; --pk-vlak: #e4f4ea; }
.kleur-2 { --pk: #9333ea; --pk-vlak: #f3e8fd; }
.kleur-3 { --pk: #0f766e; --pk-vlak: #e0f2f0; }
.kleur-4 { --pk: #c2410c; --pk-vlak: #fdeee4; }
.kleur-5 { --pk: #be185d; --pk-vlak: #fce7f1; }
.kleur-6 { --pk: #4338ca; --pk-vlak: #e9e8fb; }
.kleur-7 { --pk: #854d0e; --pk-vlak: #f6eedf; }

.agenda-kaart { padding: 0; overflow: hidden; }
.agenda-kaart > .klein { padding: 0 18px 14px; margin: 0; }
.agenda { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; table-layout: fixed; }
.agenda th, .agenda td { border-bottom: 1px solid var(--rand); border-right: 1px solid var(--rand); vertical-align: top; padding: 8px; text-align: left; }
.agenda thead th { background: #f7f8fa; font-size: .85rem; font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
.agenda .agenda-dag { text-transform: capitalize; }
.agenda .agenda-vrij { display: block; font-weight: 400; font-size: .72rem; color: var(--tekst-zacht); white-space: normal; }
.agenda .agenda-naam { width: 160px; background: #fff; position: sticky; left: 0; z-index: 1; font-size: .92rem; }
.agenda thead .agenda-naam { z-index: 2; background: #f7f8fa; }
.agenda tbody th.agenda-naam { font-weight: 600; }
.agenda-telling { display: block; font-size: .75rem; font-weight: 600; color: var(--goed); margin-top: 2px; }
.agenda-telling.open { color: var(--let-op); }
.agenda .is-vandaag { background: #fff8f1; }
.agenda thead th.is-vandaag { background: #fdebd9; color: var(--accent-donker); }
.agenda .is-vrij { background: repeating-linear-gradient(135deg, #f7f8fa, #f7f8fa 6px, #f1f3f6 6px, #f1f3f6 12px); }
.agenda tr.is-ik th.agenda-naam { box-shadow: inset 4px 0 0 var(--accent); }
.agenda td { height: 64px; position: relative; }
.blok { display: block; text-decoration: none; color: var(--tekst); background: var(--pk-vlak); border-left: 4px solid var(--pk); border-radius: 6px; padding: 5px 7px; margin-bottom: 4px; font-size: .8rem; line-height: 1.25; overflow: hidden; }
a.blok:hover { filter: brightness(.96); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.blok-project { display: block; font-weight: 700; color: var(--pk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blok-tijd { display: block; color: var(--tekst-zacht); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blok-plus { display: block; text-align: center; color: #b4bcc8; text-decoration: none; font-size: 1.1rem; line-height: 1; padding: 4px 0; border: 1px dashed transparent; border-radius: 6px; }
.agenda td:hover .blok-plus, .blok-plus:focus { color: var(--accent); border-color: #f2c39b; background: #fffaf5; }
.agenda-afwezig { display: block; font-size: .75rem; font-weight: 600; color: var(--info); background: var(--info-vlak); border-radius: 6px; padding: 4px 7px; margin-bottom: 4px; }
.agenda-afwezig.botsing { color: var(--fout); background: var(--fout-vlak); }
.kleurstip { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--pk); margin-right: 8px; vertical-align: middle; }

.vandaag-gepland { display: flex; flex-direction: column; gap: 2px; background: var(--pk-vlak); border-left: 6px solid var(--pk); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--schaduw); }
.vandaag-gepland strong { font-size: 1.15rem; color: var(--pk); }
.card-kop { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: .75rem; }
.card-kop h2 { margin: 0; }
.planlijst { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.planlijst li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 12px; border-radius: 8px; background: var(--pk-vlak); border-left: 4px solid var(--pk); }
.planlijst li.is-vandaag { outline: 2px solid var(--accent); }
.plan-dag { font-weight: 600; font-size: .9rem; }
.plan-info { display: flex; flex-direction: column; }
.plan-info strong { color: var(--pk); }
@media (min-width: 900px) { .planlijst { grid-template-columns: 1fr 1fr; } }

.keuzelijst { border: 1px solid var(--rand); border-radius: 8px; padding: 10px 12px; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.keuzelijst legend { font-size: .875rem; font-weight: 600; padding: 0 4px; }
.btn-gevaar { color: var(--fout); border-color: #f3c3bd; }
.btn-gevaar:hover { background: var(--fout-vlak); }
hr.scheiding { border: 0; border-top: 1px solid var(--rand); margin: 20px 0 14px; }
.raster-2.binnen { margin: 12px 0; }
.optie { border: 1px solid var(--rand); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.optie h3 { margin: 0; }
.optie .formulier { gap: 8px; }
.optie details ul { padding-left: 1.1rem; }
.optie details li { margin-bottom: 6px; }

@media (max-width: 700px) {
  .agenda .agenda-naam { width: 110px; font-size: .82rem; }
  .agenda { min-width: 640px; }
  .planlijst li { grid-template-columns: 92px 1fr; }
}

/* ---------- offertes ---------- */
.status-o-concept { background: var(--let-op-vlak); color: var(--let-op); }
.status-o-verstuurd { background: var(--info-vlak); color: var(--info); }
.status-o-akkoord { background: var(--goed-vlak); color: var(--goed); }
.status-o-afgewezen { background: var(--fout-vlak); color: var(--fout); }
.calc-kop { display: grid; gap: 16px; grid-template-columns: 1fr; margin-bottom: 16px; }
.calc-kop > .card { margin-bottom: 0; }
@media (min-width: 900px) { .calc-kop { grid-template-columns: 1fr 1fr minmax(240px, .8fr); } }
.formulier.compact { gap: 8px; }
.formulier.compact input { min-height: 38px; padding: 7px 10px; }
.calc-lay { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) { .calc-lay { grid-template-columns: 1fr 290px; } .calc-zij { position: sticky; top: 112px; } }
.calc-post { background: #fff; border-radius: var(--radius); box-shadow: var(--schaduw); margin-bottom: 14px; overflow: hidden; }
.calc-postkop { display: flex; align-items: center; gap: 10px; background: var(--donker); padding: 8px 12px; }
.calc-nr { color: #fff; font-weight: 700; min-width: 1.6em; }
.calc-postkop input { flex: 1; min-height: 38px; background: var(--donker-2); border-color: #3b4b5e; color: #fff; font-weight: 600; }
.calc-postkop input::placeholder { color: #9aa8b8; }
.calc-posttotaal { color: #fff; font-weight: 700; white-space: nowrap; }
table.calc { width: 100%; border-collapse: collapse; font-size: .88rem; table-layout: fixed; min-width: 860px; }
table.calc th { font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--tekst-zacht); text-align: left; padding: 6px 4px; background: #f7f8fa; border-bottom: 1px solid var(--rand); white-space: nowrap; }
table.calc td { padding: 4px; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
table.calc input, table.calc select { min-height: 36px; padding: 5px 7px; font-size: .88rem; border-radius: 6px; }
table.calc .r, table.calc input.r { text-align: right; }
table.calc th.intern, table.calc td.intern { background: #fafbfc; }
table.calc input:disabled { background: #f3f4f6; border-color: #eef0f3; }
.k-soort { width: 116px; } .k-aantal { width: 72px; } .k-eenheid { width: 74px; } .k-inkoop { width: 92px; } .k-prijs { width: 92px; }
.k-btw { width: 92px; } .k-bedrag { width: 104px; } .k-weg { width: 30px; } .k-pct { width: 90px; }
.calc-bedrag, .termijn-bedrag { white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-weg { border: 0; background: none; color: var(--fout); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.calc-weg:hover { background: var(--fout-vlak); }
.calc-weg.licht { color: #f3c3bd; }
.calc-weg.licht:hover { background: rgba(255,255,255,.12); color: #fff; }
.calc-toevoegen { display: flex; gap: 16px; flex-wrap: wrap; padding: 8px 12px; background: #fafbfc; }
.calc-termijnen { min-width: 480px; }
.termijn-controle { margin: 6px 0; }
.calc-zij h2 { margin-bottom: 8px; }
.zrij { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eef0f3; font-size: .92rem; }
.zrij span:last-child, .zrij strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.zrij.sub { font-size: .82rem; color: var(--tekst-zacht); padding-left: 10px; }
.zrij.dik { border-top: 2px solid var(--rand); margin-top: 4px; }
.zrij.groot { font-size: 1.1rem; border-bottom: 0; padding-top: 10px; }
.vb-kop { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; margin-bottom: 16px; }
@media (min-width: 900px) { .vb-kop { grid-template-columns: 1fr 340px; } }
.vb-kop h1 { margin-bottom: 4px; }
.vb-keuzes { margin-bottom: 0; }
.vb-keuzes .vinkje { margin: 6px 0; }
.vb-acties { margin-top: 14px; }
.vb-status { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.vb-papier { background: #d9dde3; border-radius: var(--radius); padding: 16px; }
.vb-papier iframe { width: 100%; height: 1150px; border: 0; background: #fff; border-radius: 4px; box-shadow: 0 6px 24px rgba(0,0,0,.18); display: block; }
.vb-papier .klein { margin: 10px 0 0; }
@media (max-width: 700px) { .vb-papier iframe { height: 600px; } }
.logo-voorbeeld { border: 1px dashed var(--rand); border-radius: 8px; padding: 10px; background: #fff; max-width: 280px; }
.logo-voorbeeld img { max-width: 100%; max-height: 90px; display: block; }

/* Vaste werkdagen */
.dagknoppen { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0; }
.dagknop { position: relative; cursor: pointer; }
.dagknop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dagknop span { display: inline-block; min-width: 2.8rem; padding: .5rem .6rem; text-align: center; border: 1px solid var(--rand); border-radius: 8px; background: #fff; font-weight: 600; text-transform: capitalize; }
.dagknop input:checked + span { background: var(--donker); border-color: var(--donker); color: #fff; }
.dagknop input:focus-visible + span { outline: 2px solid var(--donker); outline-offset: 2px; }
.dagdelen { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 .4rem; }
.dagdelen .klein { opacity: .7; margin-left: .2rem; }
.toch-inplannen p { margin: 0 0 .4rem; }
.agenda .rooster-vrij { display: block; font-size: .72rem; color: var(--tekst-zacht); font-style: italic; }
.agenda td.is-rooster-vrij { background: repeating-linear-gradient(135deg, #f7f8fa, #f7f8fa 6px, #f1f3f6 6px, #f1f3f6 12px); }
.btn-klein { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.dagknop input:checked + span { background: var(--accent); border-color: var(--accent); }

/* ---------- Mobiele onderbalk ---------- */
.mobnav { display: none; }
@media (max-width: 799px) {
  .hoofdnav { display: none; }
  .topbalk .gebruiker { display: none; }
  .topbalk { position: static; }
  body.ingelogd { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .mobnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--donker); border-top: 1px solid rgba(255,255,255,.08);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 14px rgba(0,0,0,.18); }
  .mobnav > a, .mobnav summary { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 4px; min-height: 56px;
    color: #b9c4d0; text-decoration: none; font-size: .72rem; font-weight: 600; border-radius: 10px; cursor: pointer; list-style: none; }
  .mobnav summary::-webkit-details-marker { display: none; }
  .mobnav .actief { color: #fff; }
  .mobnav .actief svg { color: var(--accent); }
  .mobnav > a:active, .mobnav summary:active { background: rgba(255,255,255,.08); }
  .mobnav-meer { flex: 1; display: flex; }
  .mobnav-meer summary { width: 100%; }
  .mobnav-blad { position: fixed; left: 8px; right: 8px; bottom: calc(72px + env(safe-area-inset-bottom)); background: var(--vlak); border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,.3); padding: 6px; display: grid; }
  .mobnav-blad a { padding: 14px 16px; color: var(--tekst); text-decoration: none; font-weight: 600; border-radius: 10px; font-size: 1rem; }
  .mobnav-blad a.actief { background: var(--achtergrond); color: var(--accent-donker); }
  .mobnav-blad a.uitlog { color: var(--fout); border-top: 1px solid var(--rand); border-radius: 0 0 10px 10px; }
}
@media print { .mobnav { display: none !important; } }

/* ---------- 1.4: algemeen ---------- */
.tekst-fout { color: var(--fout); }
.tekst-let-op { color: var(--let-op); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--rand); background: #fff; font-size: .9rem; font-weight: 600; color: var(--tekst); text-decoration: none; }
.chip:hover { border-color: #b8c0ca; }
.chip.aan { background: var(--donker); color: #fff; border-color: var(--donker); }
.chip-scheiding { width: 1px; background: var(--rand); margin: 4px 2px; }
.btn-goed { background: var(--goed); border-color: var(--goed); color: #fff; }
.btn-goed:hover { filter: brightness(.95); }
.kpis-klein { margin: 12px 0; }
.kpis-klein .kpi-waarde { font-size: 1.15rem; }
.keuzeknoppen { border: 0; padding: 0; margin: 0 0 12px; }
.keuzeknoppen legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.keuzeknop { position: relative; display: inline-block; margin: 0 6px 6px 0; cursor: pointer; }
.keuzeknop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.keuzeknop span { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 14px; border: 1px solid var(--rand); border-radius: 10px; background: #fff; font-weight: 600; }
.keuzeknop input:checked + span { border-color: var(--accent); background: #fff4ea; color: var(--accent-donker); box-shadow: inset 0 0 0 1px var(--accent); }
.keuzeknop input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.keuzeknoppen .klein { margin: 4px 0 0; }
.koppel-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; }
.klein-tabel td, .klein-tabel th { font-size: .82rem; padding: 6px 8px; }
.plak-onder { position: sticky; bottom: 0; background: var(--achtergrond); padding: 10px 0; z-index: 5; }

/* ---------- bekijken als ---------- */
.bekijk-balk { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  background: #fff4e0; color: #7a4800; border-bottom: 2px solid #f2b45b; padding: 8px 16px; font-size: .92rem; }
.bekijk-balk .btn { background: #fff; }

/* ---------- tabbladen projectdossier ---------- */
.tabs { display: flex; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; border-bottom: 2px solid var(--rand); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 10px 14px; color: var(--tekst-zacht); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a:hover { color: var(--tekst); }
.tabs a.actief { color: var(--tekst); border-bottom-color: var(--accent); }
.tab-teller { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; background: #e9edf1; color: var(--tekst-zacht); font-size: .75rem; text-align: center; }
.voortgang.bijna > span { background: #e8a21a; }

/* ---------- taken ---------- */
.soort { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: 1px; white-space: nowrap; }
.soort-kantoor { background: #e8f1fb; color: #1f5f9e; }
.soort-bouwplaats { background: #fdeedd; color: #a24f0b; }
.keuze-kantoor input:checked + span { border-color: #1f5f9e; background: #e8f1fb; color: #1f5f9e; box-shadow: inset 0 0 0 1px #1f5f9e; }
.tk-groep { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tekst-zacht); font-weight: 700; margin: 16px 0 6px; }
.tk-groep span { font-weight: 500; }
.tk-lijst { list-style: none; margin: 0; padding: 0; }
.tk { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: start; padding: 11px 12px 11px 10px; border: 1px solid var(--rand); border-left: 5px solid #c9ced6;
  border-radius: 10px; margin-bottom: 8px; background: #fff; color: var(--tekst); text-decoration: none; }
.tk:hover { border-color: #b8c0ca; }
.tk.rood { border-left-color: var(--fout); background: #fff8f7; }
.tk.oranje { border-left-color: #e8a21a; }
.tk.groen { border-left-color: var(--goed); opacity: .75; }
.tk .vak { width: 22px; height: 22px; border: 2px solid #aab2bd; border-radius: 6px; margin-top: 1px; display: grid; place-items: center; font-size: 14px; color: #fff; }
.tk.groen .vak { background: var(--goed); border-color: var(--goed); }
.tk-tekst { min-width: 0; }
.tk-titel { font-weight: 650; overflow-wrap: anywhere; }
.tk.groen .tk-titel { text-decoration: line-through; }
.tk-meta { display: block; font-size: .82rem; color: var(--tekst-zacht); margin-top: 3px; }
.tk-datum { font-size: .82rem; font-weight: 650; white-space: nowrap; text-align: right; }
.tk-datum span { display: block; font-weight: 500; }
.tk.rood .tk-datum { color: var(--fout); }
.tk.oranje .tk-datum { color: #a86300; }
.wie { display: inline-flex; align-items: center; gap: 4px; }
.av { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #dfe6ee; font-size: .62rem; font-weight: 700; color: #334; }
.uitleg { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--tekst-zacht); margin-top: 10px; }
.st { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.st-rood { background: var(--fout); } .st-oranje { background: #e8a21a; } .st-grijs { background: #c9ced6; } .st-groen { background: var(--goed); }
.taak-detail { max-width: 760px; margin: 0 auto; }
.taak-project { margin: 0; }
.taak-titel { margin: 4px 0 8px; }
.dt-status { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.logboek-kop { margin: 20px 0 12px; font-size: 1.05rem; }
.log { list-style: none; margin: 0 0 16px; padding: 0 0 0 20px; border-left: 2px solid var(--rand); }
.log li { position: relative; margin: 0 0 16px; }
.log li::before { content: ""; position: absolute; left: -27px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #aab2bd; }
.log li.log-overdracht::before { border-color: var(--accent); background: var(--accent); }
.log li.log-gereed::before { border-color: var(--goed); background: var(--goed); }
.log .wanneer { font-size: .78rem; color: var(--tekst-zacht); }
.log .log-actie { font-weight: 600; }
.log .log-tekst { overflow-wrap: anywhere; }
.log .ovd { margin-top: 4px; font-size: .86rem; font-weight: 650; color: var(--accent-donker); }
.log .foto { display: inline-block; margin-top: 6px; }
.log .foto img { display: block; max-width: 220px; max-height: 180px; border-radius: 8px; border: 1px solid var(--rand); object-fit: cover; }
.dt-acties { display: grid; gap: 10px; border-top: 1px solid var(--rand); padding-top: 14px; }
.dt-rij { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dt-rij select { flex: 1 1 200px; width: auto; }
.foto-knop { position: relative; overflow: hidden; cursor: pointer; }
.foto-knop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.foto-naam:empty { display: none; }
.foto-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.foto-raster img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }

/* ---------- materiaal: zoeken en goedkeuren ---------- */
.artikelzoek { position: relative; }
.artikelzoek > label { display: block; font-weight: 600; margin-bottom: 4px; }
.artikelzoek > label em { font-weight: 400; color: var(--tekst-zacht); font-style: normal; }
.artikel-lijst { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; list-style: none; margin: 4px 0 0; padding: 4px; background: #fff; border: 1px solid var(--rand);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); max-height: 320px; overflow-y: auto; }
.artikel-lijst li { padding: 10px 10px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.artikel-lijst li:hover, .artikel-lijst li.actief { background: #fff4ea; }
.artikel-lijst .al-oms { font-weight: 600; font-size: .92rem; }
.artikel-lijst .al-meta { font-size: .78rem; color: var(--tekst-zacht); }
.artikel-lijst .al-vrij { color: var(--info); font-size: .86rem; border-top: 1px solid var(--rand); border-radius: 0; }
.artikel-gekozen { display: block; margin-top: 4px; color: var(--goed); }
.goedkeur-lijst { list-style: none; margin: 0; padding: 0; }
.goedkeur-lijst li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rand); }
.goedkeur-lijst .vinkje { align-items: flex-start; }
.goedkeur-lijst .blok-regel { display: block; }
.goedkeur-bedrag { font-weight: 600; white-space: nowrap; }
.goedkeur-acties { display: flex; gap: 4px; align-items: center; position: relative; }
.afwijzen summary { list-style: none; }
.afwijzen summary::-webkit-details-marker { display: none; }
.afwijzen-blad { position: absolute; right: 0; top: 110%; z-index: 10; background: #fff; border: 1px solid var(--rand); border-radius: 10px; padding: 8px; display: flex; gap: 6px; width: 300px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
@media (max-width: 600px) {
  .goedkeur-lijst li { grid-template-columns: 1fr auto; }
  .goedkeur-acties { grid-column: 1 / -1; justify-content: flex-end; }
  .afwijzen-blad { width: min(300px, 86vw); }
}

/* ---------- notities ---------- */
.dagnotities .card-kop { margin-bottom: .4rem; }
.notitie-nieuw summary { list-style: none; }
.notitie-nieuw summary::-webkit-details-marker { display: none; }
.notitie-nieuw[open] { flex-basis: 100%; }
.notitie-form { margin-top: 10px; }
.notitie-week { list-style: none; margin: 0; padding: 0; }
.notitie-week > li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--rand); }
.notitie-week ul { list-style: none; margin: 0; padding: 0; }
.notitie-week ul li { padding: 2px 0; }
.notitie-dag { font-weight: 650; }
.notitie-dag.is-vandaag { color: var(--accent-donker); }
.notitie-lijst { list-style: none; margin: 0; padding: 0; }
.notitie-lijst li { padding: 8px 0; border-bottom: 1px solid var(--rand); overflow-wrap: anywhere; }
.notitie-datum { font-weight: 650; margin-right: 6px; }
@media (max-width: 520px) { .notitie-week > li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- budget ---------- */
.budget-vergelijk { display: grid; gap: 14px; }
.bv-kop { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.budget-lijst { border: 1px solid var(--rand); border-radius: 10px; overflow: hidden; margin: 10px 0; }
.bl-kop, .bl-post > summary, .bl-regels li, .bl-som { display: grid; grid-template-columns: 1fr 90px 110px 110px 120px; gap: 8px; padding: 8px 12px; align-items: baseline; }
.bl-kop { background: #f3f4f6; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tekst-zacht); font-weight: 700; }
.bl-post { border-top: 1px solid var(--rand); }
.bl-post > summary { cursor: pointer; list-style: none; font-weight: 650; }
.bl-post > summary::-webkit-details-marker { display: none; }
.bl-post[open] .bl-pijl { transform: rotate(90deg); }
.bl-pijl { display: inline-block; width: 14px; color: var(--tekst-zacht); transition: transform .15s; }
.bl-code { color: var(--tekst-zacht); font-weight: 600; margin-right: 4px; font-variant-numeric: tabular-nums; }
.bl-regels { list-style: none; margin: 0; padding: 0 0 6px; background: #fafbfc; }
.bl-regels li { font-size: .88rem; padding-top: 5px; padding-bottom: 5px; }
.bl-regels li .bl-oms { padding-left: 18px; }
.bl-regels li.niveau-1 { font-weight: 600; }
.bl-som { border-top: 2px solid var(--donker); font-weight: 700; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .bl-kop { display: none; }
  .bl-post > summary, .bl-regels li, .bl-som { grid-template-columns: 1fr 1fr; }
  .bl-post > summary .bl-oms, .bl-regels li .bl-oms { grid-column: 1 / -1; }
  .bl-post > summary .num:empty, .bl-regels li .num:empty { display: none; }
  .bl-post > summary .num::before, .bl-regels li .num::before { content: attr(data-label) " "; color: var(--tekst-zacht); font-weight: 400; font-size: .78rem; }
  .bl-som span:first-child { grid-column: 1 / -1; }
}
.budget-bewerk input { min-height: 36px; padding: 6px 8px; font-size: .88rem; }
.budget-bewerk select { min-height: 36px; padding: 4px 6px; font-size: .88rem; width: auto; }
.budget-bewerk .in-code { width: 70px; } .budget-bewerk .in-oms { min-width: 220px; } .budget-bewerk .in-eh { width: 60px; } .budget-bewerk .in-getal { width: 90px; text-align: right; }
