/* Planningsoverzicht v1.1 */
@font-face {
  font-family: "Oswald";
  src: url("fonts/oswald-latin-wght-normal.woff2") format("woff2-variations"),
       url("fonts/oswald-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("fonts/raleway-latin-wght-normal.woff2") format("woff2-variations"),
       url("fonts/raleway-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #ECEFF2;
  --surface: #FFFFFF;
  --surface-2: #F5F7F9;
  --ink: #172334;
  --ink-2: #46546A;
  --muted: #778395;
  --line: #D5DBE2;
  --line-2: #E6EAEE;
  --accent: #0F4C5C;
  --accent-ink: #FFFFFF;
  --accent-soft: #DCEBEE;
  --danger: #B3261E;
  --hoog: #CF4A2C;
  --ok: #17905F;
  --f-nieuw: #9AA5B1;
  --f-bouw: #6A4FD0;
  --f-test: #C07F00;
  --f-veld: #17905F;
  --f-analyse: #2672C0;
  --f-klaar: #56626F;
  --f-eigen: #B8407A;
  --shadow: 0 1px 2px rgba(23, 35, 52, .06), 0 4px 14px rgba(23, 35, 52, .05);
  --display: "Oswald", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --body: "Raleway", "Segoe UI", Helvetica, Arial, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F151C; --surface: #17202A; --surface-2: #1C2632; --ink: #E5EAF0; --ink-2: #B2BECB;
    --muted: #8592A2; --line: #2B3745; --line-2: #222D3A; --accent: #5BB4C6; --accent-ink: #062128;
    --accent-soft: #173640; --danger: #F2847B; --hoog: #F0805F; --ok: #4CC793;
    --f-nieuw: #6D7987; --f-bouw: #9C88F0; --f-test: #E3A93A; --f-veld: #4CC793; --f-analyse: #64A6EA; --f-klaar: #8C98A6; --f-eigen: #EC80B2;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F151C; --surface: #17202A; --surface-2: #1C2632; --ink: #E5EAF0; --ink-2: #B2BECB;
  --muted: #8592A2; --line: #2B3745; --line-2: #222D3A; --accent: #5BB4C6; --accent-ink: #062128;
  --accent-soft: #173640; --danger: #F2847B; --hoog: #F0805F; --ok: #4CC793;
  --f-nieuw: #6D7987; --f-bouw: #9C88F0; --f-test: #E3A93A; --f-veld: #4CC793; --f-analyse: #64A6EA; --f-klaar: #8C98A6; --f-eigen: #EC80B2;
  --shadow: 0 1px 2px rgba(0,0,0,.3);
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--body);
  font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; letter-spacing: .01em; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.grow { flex: 1; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0; }

/* ---------- knoppen en invoer ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); border-radius: 8px; padding: 7px 14px;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; line-height: 1.3;
}
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.ibtn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 7px;
  border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer;
}
.ibtn:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.ibtn.danger:hover { color: var(--danger); }
.ibtn svg { width: 17px; height: 17px; }

input[type=text], input[type=search], input[type=date], input[type=password], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 8px;
  padding: 7px 10px; min-height: 36px;
}
textarea { resize: vertical; line-height: 1.55; min-height: 150px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; color: var(--ink); cursor: pointer; }
label.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.err { color: var(--danger); font-size: 13px; font-weight: 600; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { flex-direction: row; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--surface);
}
.seg input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- kop ---------- */
.demo-bar {
  display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
  background: var(--accent-soft); color: var(--ink); font-size: 13px; padding: 6px 16px;
}
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 24px;
  padding: 10px clamp(14px, 3vw, 32px); flex-wrap: wrap;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--surface); }
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand h1 { font-size: 28px; font-weight: 600; letter-spacing: .02em; color: var(--accent); }
.vandaag { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs a {
  font-family: var(--display); font-size: 17px; letter-spacing: .02em; text-decoration: none;
  color: var(--ink-2); padding: 6px 12px; border-radius: 8px; display: inline-flex; gap: 6px; align-items: center;
}
.tabs a:hover { background: var(--surface-2); color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.cnt { font-family: var(--body); font-size: 12px; font-weight: 700; opacity: .75; }
.top-r { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.versie { font-size: 12px; color: var(--muted); }

main { max-width: 1320px; margin: 0 auto; padding: 18px clamp(12px, 3vw, 32px) 40px; }
.view-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; flex-wrap: wrap; }
.view-head h2 { font-size: 30px; }
.view-head input[type=search] { max-width: 320px; margin-left: auto; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 0 0 24px; }

/* ---------- fasebalk ---------- */
.fasebar { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.fase-chip {
  --c: var(--ink-2);
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px 9px;
  cursor: pointer; position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.fase-chip::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c); }
.fase-chip b { font-family: var(--display); font-size: 26px; font-weight: 500; line-height: 1.05; color: var(--ink); }
.fase-chip span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.fase-chip[aria-pressed="true"] { border-color: var(--c); box-shadow: 0 0 0 2px var(--c) inset; }
.fase-chip.empty b { color: var(--muted); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.toolbar input[type=search] { max-width: 340px; flex: 1 1 220px; }
.toolbar select { width: auto; }
.toolbar label.sel { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }

/* ---------- projectrijen ---------- */
.plist { display: flex; flex-direction: column; gap: 8px; }
.prow {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 30px minmax(0, 1fr) 300px auto; align-items: start;
  border-left: 5px solid var(--line-2); position: relative;
}
.prow.prio-hoog { border-left-color: var(--hoog); }
.prow.prio-laag { border-left-color: transparent; border-left-style: dashed; }
.prow.is-hidden { opacity: .6; }
.prow.dragging { opacity: .4; outline: 2px dashed var(--accent); }
.handle {
  align-self: stretch; border: 0; background: transparent; cursor: grab; color: var(--muted);
  display: grid; place-items: center; border-radius: 6px 0 0 6px; padding: 0;
}
.handle:hover { color: var(--ink); background: var(--surface-2); }
.handle[disabled] { cursor: default; opacity: .3; }
.handle svg { width: 14px; height: 20px; }
.pmain { padding: 11px 14px 11px 8px; min-width: 0; }
.pline1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.soort {
  font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 5px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--ink-2);
}
.soort.s-forsta { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.pnr { font-family: var(--display); font-size: 15px; color: var(--ink); letter-spacing: .03em; }
.klant { font-weight: 700; color: var(--ink); }
.tag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 5px; }
.tag.hoog { background: var(--hoog); color: #fff; }
.tag.verborgen { border: 1px dashed var(--muted); color: var(--muted); }
.pnaam { font-family: var(--body); font-size: 17px; font-weight: 700; margin: 3px 0 6px; line-height: 1.3; }
.pnaam button { all: unset; cursor: pointer; }
.pnaam button:hover { text-decoration: underline; text-underline-offset: 3px; }
.pnaam button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kvs { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13px; }
.kv { display: inline-flex; gap: 6px; align-items: baseline; }
.kv > span:first-child { color: var(--muted); }
.kv b { font-weight: 700; }
.rel { font-size: 12px; font-weight: 700; color: var(--accent); }
.rel.soon { color: var(--hoog); }
.notepeek { margin-top: 7px; font-size: 13px; line-height: 1.5; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; border-left: 3px solid var(--line); padding-left: 9px; }

.pstatus { padding: 11px 12px; border-left: 1px solid var(--line-2); min-height: 100%; }
.stchip {
  --c: var(--f-nieuw);
  display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px;
}
.stchip::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.next { font-size: 12px; color: var(--muted); margin-top: 2px; }
.next button {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; padding: 1px 8px;
  font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; margin-left: 4px;
}
.next button:hover { border-color: var(--accent); color: var(--accent); }
.rail { display: flex; gap: 2px; margin-top: 8px; }
.rail i { flex: 1; height: 7px; border-radius: 2px; background: var(--line-2); }
.rail i.done { background: var(--c); opacity: .55; }
.rail i.cur { background: var(--c); }
.rail i.gap { margin-left: 4px; }

.pact { display: flex; gap: 2px; padding: 8px 8px 0 4px; }

.pdetail { grid-column: 2 / -1; border-top: 1px solid var(--line-2); padding: 14px 14px 16px 8px; display: grid; gap: 14px; }
.track { display: grid; grid-template-columns: 2fr 4fr 6fr 3fr 1.3fr; gap: 10px; }
.track.has-eigen { grid-template-columns: 1.6fr 3.4fr 5fr 2.6fr 1.2fr 2.4fr; }
.tfase { --c: var(--f-nieuw); }
.tfase h4 {
  margin: 0 0 6px; font-family: var(--display); font-weight: 500; font-size: 14px; letter-spacing: .03em;
  color: var(--c); border-bottom: 3px solid var(--c); padding-bottom: 3px;
}
.tsteps { display: flex; flex-wrap: wrap; gap: 4px; }
.step {
  border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 3px 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: left;
}
.step:hover { border-color: var(--c); color: var(--ink); }
.step.done { background: var(--surface-2); color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.step.cur { background: var(--c); border-color: var(--c); color: #fff; }
.tester-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.tester-pick .lbl { font-weight: 700; margin-right: 4px; }
.tester-pick button {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 12px;
  font-weight: 600; font-size: 13px; cursor: pointer;
}
.tester-pick button[aria-pressed="true"] { background: var(--f-test); border-color: var(--f-test); color: #fff; }
.tester-pick.warn .lbl { color: var(--f-test); }
.dgrid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.notes {
  white-space: pre-wrap; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 10px 12px; min-height: 60px; overflow-wrap: anywhere;
}
.notes.empty { color: var(--muted); font-style: italic; }
.dmeta { font-size: 13px; display: grid; gap: 4px; align-content: start; }
.dmeta .kv { display: grid; grid-template-columns: 110px 1fr; }
.dlinks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.empty-state {
  border: 2px dashed var(--line); border-radius: 12px; padding: 36px 20px; text-align: center; color: var(--ink-2);
}
.empty-state h3 { font-size: 22px; margin-bottom: 6px; color: var(--ink); }

/* ---------- archief ---------- */
.atable { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tscroll { overflow-x: auto; }
.atable th, .atable td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-2); font-size: 14px; vertical-align: middle; }
.atable th { font-family: var(--display); font-weight: 500; font-size: 14px; letter-spacing: .03em; background: var(--surface-2); color: var(--ink-2); }
.atable tr:last-child td { border-bottom: 0; }
.atable td.act { white-space: nowrap; text-align: right; }
.atable tr.is-open td { background: var(--surface-2); border-bottom-color: transparent; }
.atable tr.adetail td { background: var(--surface-2); padding: 4px 14px 18px; }
.alink { all: unset; cursor: pointer; font-weight: 600; }
.alink:hover { text-decoration: underline; text-underline-offset: 3px; }
.alink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ah { font-family: var(--display); font-weight: 500; font-size: 15px; margin: 0 0 6px; }
.dgrid.arch { grid-template-columns: minmax(0, 1fr) 340px; }
.dgrid.arch .dmeta .kv { grid-template-columns: 130px 1fr; }
.dgrid.arch .notes { background: var(--surface); }

/* ---------- kantoordagen ---------- */
.office { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cal-card, .off-side > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.off-side { display: grid; gap: 14px; }
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.cal-head h3 { font-size: 22px; flex: 1; text-align: center; text-transform: capitalize; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow span { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding-bottom: 4px; }
.cd {
  aspect-ratio: 1 / .82; border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 8px;
  font-family: var(--display); font-size: 18px; cursor: pointer; color: var(--ink); position: relative;
}
.cd:hover { border-color: var(--accent); }
.cd.we { color: var(--muted); background: transparent; }
.cd.td { box-shadow: 0 0 0 2px var(--ink) inset; }
.cd.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cd.on::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: currentColor; }
.cd.empty { visibility: hidden; }
.off-add { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.off-add label { flex: 1 1 160px; }
.off-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.stat b { display: block; font-family: var(--display); font-size: 34px; font-weight: 500; line-height: 1; color: var(--accent); }
.stat span { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.off-list h4 { font-family: var(--display); font-weight: 500; font-size: 16px; margin: 12px 0 6px; text-transform: capitalize; display: flex; gap: 8px; align-items: baseline; }
.off-list h4:first-child { margin-top: 0; }
.off-list h4 small { font-family: var(--body); font-size: 12px; color: var(--muted); font-weight: 700; }
.dchips { display: flex; flex-wrap: wrap; gap: 6px; }
.dchip { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 3px 1px 10px; font-size: 13px; font-weight: 600; background: var(--surface-2); }
.dchip button { border: 0; background: transparent; cursor: pointer; color: var(--muted); width: 22px; height: 22px; border-radius: 50%; font-size: 15px; line-height: 1; }
.dchip button:hover { color: var(--danger); background: var(--surface); }

/* ---------- lijsten ---------- */
.lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.lcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 12px 10px; }
.lhead { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.lhead input {
  font-family: var(--display); font-size: 20px; font-weight: 500; border-color: transparent; background: transparent; padding: 2px 6px; min-height: 0;
}
.lhead input:hover { border-color: var(--line); }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; column-gap: 6px; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--line-2); }
.item .due { grid-column: 2; grid-row: 2; justify-self: start; margin: -2px 0 2px; display: none; }
.item .due.has, .item:hover .due, .item:focus-within .due { display: block; }
.item .ibtn { grid-column: 3; grid-row: 1; }
.item:last-child { border-bottom: 0; }
.item input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
.item .it, .ladd textarea { min-height: 0; resize: none; overflow: hidden; line-height: 1.45; }
.item .it { border-color: transparent; background: transparent; padding: 4px 6px; }
.ladd textarea { padding: 7px 10px; }
.ladd { align-items: flex-start; }
.item input[type=checkbox] { align-self: start; margin-top: 7px; }
.item .it:hover { border-color: var(--line); }
.item.done .it { text-decoration: line-through; color: var(--muted); }
.item .due { width: 132px; font-size: 12.5px; padding: 3px 6px; min-height: 28px; border-color: transparent; background: transparent; color: var(--muted); }
.item .due:hover, .item .due:focus { border-color: var(--line); }
.item .due.has { color: var(--ink-2); font-weight: 600; }
.item .due.over { color: var(--danger); }
.item .ibtn { width: 26px; height: 26px; opacity: .55; }
.item:hover .ibtn, .item .ibtn:focus-visible { opacity: 1; }
.ladd { display: flex; gap: 6px; margin-top: 8px; }
.lfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); }

/* ---------- dialogen ---------- */
.dlg {
  border: 1px solid var(--line); border-radius: 14px; padding: 0; background: var(--surface); color: var(--ink);
  width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.dlg.wide { width: min(880px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(15, 25, 35, .5); }
.dlg form { display: contents; }
.dlg-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 6px; }
.dlg-h h2 { font-size: 24px; }
.x { border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.dlg-b { padding: 8px 20px 12px; display: grid; gap: 14px; overflow-y: auto; max-height: calc(100vh - 170px); }
.dlg-b.stack { gap: 10px; }
.dlg-f { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 20px 16px; border-top: 1px solid var(--line-2); }
.dlg-f .err { margin-right: auto; }
.fs { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px 12px; margin: 0; display: grid; gap: 10px; }
.fs legend { font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 0 4px; }
.fs.bare { border: 0; padding: 0; }
.fs.bare legend { padding: 0; margin-bottom: 4px; }
.fs.forsta { background: var(--surface-2); }
.grid { display: grid; gap: 12px; }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; }
.field .lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
#contact-bureau { font-weight: 500; color: var(--muted); }

/* ---------- inloggen, melding ---------- */
.auth { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 34px; color: var(--accent); }
.auth-card p { margin: 0; color: var(--ink-2); font-size: 14px; }
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--surface); padding: 10px 14px 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
  display: flex; gap: 14px; align-items: center; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 60; max-width: calc(100vw - 24px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.err { background: var(--danger); color: #fff; }
.toast .btn { background: transparent; color: inherit; border-color: currentColor; }
.print-area { display: none; }

/* ---------- smal scherm ---------- */
@media (max-width: 1000px) {
  .fasebar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .prow { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .pstatus { grid-column: 2 / -1; grid-row: 2; border-left: 0; border-top: 1px solid var(--line-2); padding-left: 8px; }
  .pdetail { grid-row: 3; }
  .track, .track.has-eigen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .office { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top { gap: 8px 16px; }
  .tabs a { font-size: 15px; padding: 5px 8px; }
  .fasebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: 1fr; }
  .dgrid { grid-template-columns: 1fr; }
  .track, .track.has-eigen { grid-template-columns: 1fr; }
  .dgrid.arch { grid-template-columns: 1fr; }
  .pact { flex-direction: column; padding: 6px 4px; }
  .toolbar input[type=search] { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- afdrukken ---------- */
@media print {
  @page { size: A4 landscape; margin: 11mm 10mm 12mm; }
  :root { padding: 0; --ink: #111; --muted: #666; }
  body { background: #fff; color: #111; font-size: 9.5pt; }
  body::before, body > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; }
  .print-area * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ph { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #0F4C5C; padding-bottom: 4pt; margin-bottom: 6pt; }
  .ph h1 { font-family: var(--display); font-size: 18pt; font-weight: 500; color: #0F4C5C; }
  .ph p { margin: 0; font-size: 9pt; color: #555; }
  .ptable { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .ptable thead { display: table-header-group; }
  .ptable tr { break-inside: avoid; page-break-inside: avoid; }
  .ptable th { font-family: var(--display); font-weight: 500; font-size: 9pt; text-align: left; color: #fff; background: #0F4C5C; padding: 3pt 4pt; }
  .ptable td { padding: 3.5pt 4pt; border-bottom: .6pt solid #ccd3da; vertical-align: top; overflow-wrap: anywhere; }
  .ptable tr.nrow td { border-top: 0; padding-top: 0; color: #333; font-size: 8.5pt; white-space: pre-wrap; }
  .ptable tr.has-notes td { border-bottom: 0; }
  .ptable .pr-hoog { color: #CF4A2C; font-weight: 700; }
  .ptable .pnum { font-family: var(--display); font-size: 10pt; }
  .ptable .pst { font-weight: 700; }
  .prail { display: flex; gap: 1pt; margin-top: 2pt; }
  .prail i { flex: 1; height: 3.5pt; background: #e2e6ea; }
  .prail i.on { background: var(--c); }
  .pfoot { margin-top: 6pt; font-size: 8pt; color: #777; }
}
