/* Opzet: kop met week en status, menu links + bonnetje rechts (onder elkaar op telefoon) */
:root {
  --bg: #f2f8fd; --surface: #ffffff; --line: #dbe4ee; --fg: #1d252c; --muted: #5b6670;
  --brand: #0071dc; --brand-bar: #0071dc; --ad-navy: #0a1325; --ad-ivory: #fbf9f5; --ad-sand: #bbab94; --on-brand: #ffffff; --brand-soft: #e6f1fc;
  --accent: #ffc220; --accent-ink: #1d252c; --tomato: #d0331f;
  --ok: #2a8703; --ok-bg: #e5f4dd; --warn: #8a5a00; --warn-bg: #fff4d1; --open-bg: #fde8e4;
  --display: "Figtree", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1622; --surface: #13212f; --line: #24384c; --fg: #eaf1f8; --muted: #9fb0c2;
    --brand: #2273c9; --brand-bar: #0a3a6b; --on-brand: #ffffff; --brand-soft: #16324d;
    --accent: #ffc220; --accent-ink: #1d252c; --tomato: #ff7a66;
    --ok: #7fd36b; --ok-bg: #18301a; --warn: #f1c46a; --warn-bg: #3a2e14; --open-bg: #3d221c; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.45; }
.wrap { max-width: 1100px; margin: 0 auto; padding-inline: 16px; padding-block: 20px 80px; }
.smal { max-width: 640px; }
h1, h2 { font-family: var(--display); margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 2rem; font-weight: 800; line-height: 1.1; }
h2 { font-size: 1.3rem; font-weight: 800; }
.num { font-variant-numeric: tabular-nums; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

header.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; }
.sub { color: var(--muted); font-size: .92rem; }
.status-pill { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-weight: 600; font-size: .85rem; }
.pill-open { background: var(--ok-bg); color: var(--ok); }
.pill-dicht { background: var(--open-bg); color: var(--tomato); }
.notice { background: var(--warn-bg); color: var(--warn); padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 820px) { .grid { grid-template-columns: minmax(0, 1fr); } }

.catnav { position: sticky; top: 0; z-index: 2; background: var(--bg); display: flex; gap: 6px; overflow-x: auto; padding-block: 8px; }
.catnav a { flex: none; text-decoration: none; color: var(--fg); border: 1px solid var(--fg); background: var(--surface); padding: 4px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.cat { margin-block: 18px 6px; scroll-margin-top: 52px; }
.cat h2 { padding-bottom: 4px; border-bottom: 3px solid var(--accent); }
.hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block: 7px; border-bottom: 1px dotted var(--line); }
.item .nm { flex: 1; min-width: 0; }
.addbtns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.add { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 10px; font-weight: 600; white-space: nowrap; }
.add:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); }
.add small { font-weight: 500; opacity: .75; margin-right: 4px; }
.add:disabled { opacity: .45; cursor: not-allowed; }

.bon { position: sticky; top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 820px) { .bon { position: static; } }
label { font-size: .85rem; color: var(--muted); display: block; margin-bottom: 3px; }
input[type="text"], input[type="password"] { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: var(--bg); }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 8px; align-items: center; padding-bottom: 8px; border-bottom: 1px dotted var(--line); }
.line .ln { font-weight: 600; }
.line select { grid-column: 1 / 2; border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; background: var(--bg); max-width: 100%; }
.line .pr { text-align: right; }
.rm { border: none; background: none; color: var(--tomato); font-size: 1.25rem; line-height: 1; padding: 2px 6px; }
.empty { color: var(--muted); font-size: .92rem; }
.total { display: flex; justify-content: space-between; font-family: var(--display); font-size: 1.5rem; font-weight: 800; border-top: 3px solid var(--brand); padding-top: 8px; }
.btn { border: none; border-radius: 999px; padding: 11px 20px; font-weight: 700; text-align: center; text-decoration: none; display: inline-block; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover:not(:disabled) { filter: brightness(.92); }
.btn-dark { background: var(--brand-bar); color: var(--on-brand); }
.btn-ghost { background: var(--surface); border: 1px solid var(--fg); color: var(--fg); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.msg { font-size: .88rem; color: var(--muted); min-height: 1.2em; }
.msg.fout { color: var(--tomato); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.c-open { background: var(--open-bg); color: var(--tomato); }
.c-wacht { background: var(--warn-bg); color: var(--warn); }
.c-ok { background: var(--ok-bg); color: var(--ok); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 18px; }
.panel h2 { margin-bottom: 10px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin-bottom: 18px; }
.stat b { display: block; font-family: var(--display); font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
td.r, th.r { text-align: right; }
tr.grijs td { color: var(--muted); }
.small { font-size: .85rem; color: var(--muted); }
pre.copy { white-space: pre-wrap; background: var(--bg); padding: 10px; border-radius: 6px; font-size: .9rem; margin: 0; font-family: var(--body); }

.mandbalk { display: none; }
@media (max-width: 820px) {
  .mandbalk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--brand-bar); color: var(--on-brand); text-decoration: none; font-weight: 700; }
  .bon { scroll-margin-top: 8px; }
}

.add[aria-pressed="true"], .add[aria-pressed="true"]:hover:not(:disabled) { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.add.toegevoegd { background: var(--ok); color: var(--surface); border-color: var(--ok); }
.kies { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; margin-top: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.kies select { flex: 1 1 160px; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 7px 8px; background: var(--bg); }
.kies .kprijs { margin-left: auto; font-weight: 600; }
.vink { width: 44px; height: 40px; border: none; border-radius: 6px; background: var(--ok); color: var(--surface); font-size: 1.3rem; font-weight: 700; line-height: 1; }
.vink:hover { filter: brightness(1.1); }

.toplink { color: var(--fg); font-weight: 600; font-size: .9rem; }
.keuze { display: flex; flex-direction: column; gap: 10px; background: var(--bg); border-radius: 6px; padding: 12px; }
.keuze .row > .btn { flex: 1 1 140px; }
.linkknop { background: none; border: none; color: var(--muted); text-decoration: underline; padding: 0; align-self: flex-start; font-size: .88rem; }
details.persoon { border-bottom: 1px solid var(--line); }
details.persoon summary { cursor: pointer; padding: 10px 4px; display: flex; justify-content: space-between; gap: 10px; font-weight: 600; list-style: none; }
details.persoon summary::-webkit-details-marker { display: none; }
details.persoon summary::after { content: "▾"; color: var(--muted); transition: transform .15s; }
details.persoon[open] summary::after { transform: rotate(180deg); }
details.persoon summary .tijd { margin-left: auto; color: var(--muted); font-weight: 400; font-size: .85rem; }
details.persoon ul { margin: 0 0 10px; padding-left: 22px; }
@media (prefers-reduced-motion: reduce) { details.persoon summary::after { transition: none; } }
.c-info { background: var(--line); color: var(--fg); }
.mini { border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 4px 9px; font-size: .82rem; }
.mini.gevaar { background: var(--tomato); color: var(--surface); border-color: var(--tomato); }
textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: var(--bg); font: inherit; color: inherit; resize: vertical; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ok); }

/* Merkbalk */
.merk { background: var(--brand-bar); color: var(--on-brand); }
.merk-in { max-width: 1100px; margin: 0 auto; padding-inline: 16px; padding-block: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--on-brand); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.7rem; letter-spacing: -.02em; }
.logo svg { width: 34px; height: 34px; flex: none; }
.slogan { font-weight: 600; font-size: .98rem; opacity: .95; }
.merk nav { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; }
.merk nav a { color: var(--on-brand); font-weight: 700; font-size: .92rem; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 1px; }
.balk { height: 4px; background: var(--accent); }
.kop-rechts { text-align: right; }
@media (max-width: 600px) { .kop-rechts { text-align: left; } }

.ophaal { background: var(--brand-soft); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.gesloten-lijst { list-style: none; margin: 0 0 12px; padding: 0; }
.gesloten-lijst li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-block: 6px; border-bottom: 1px solid var(--line); }
.gesloten-lijst li .mini { margin-left: auto; }
input[type="number"] { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: var(--bg); }

/* Adapteo Coevorden: navy voettekst met ivoor woordmerk en zandlijn (Adapteo-huisstijl, vierkante hoeken) */
.adapteo { background: var(--ad-navy); color: var(--ad-ivory); border-top: 4px solid var(--ad-sand); }
.adapteo-in { max-width: 1100px; margin: 0 auto; padding-inline: 16px; padding-block: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.adapteo img { height: 28px; width: auto; display: block; }
.adapteo-kop { font-weight: 600; }
.adapteo-sub { color: var(--ad-sand); font-size: .88rem; }
.wrap { padding-block-end: 40px; }
@media (max-width: 820px) { body:has(.mandbalk:not([hidden])) .adapteo { padding-bottom: 56px; } }
body { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; }
.adapteo { margin-top: auto; }
.adapteo img { height: 24px; }
