:root {
  --bg: #f4f6f9; --surface: #fff; --ink: #18202b; --muted: #5d6877; --line: #d9dee5; --line-soft: #e8ecf1;
  --btn: #2f3a48; --btn-ink: #fff; --accent: #1f4e8c; --accent-soft: #e6eef8;
  --s-blauw: #1f4e8c; --s-blauw-bg: #e6eef8; --s-groen: #1e7a45; --s-groen-bg: #e5f3ea; --s-rood: #b3261e; --s-rood-bg: #fbe9e7; --s-geel: #8a6100; --s-geel-bg: #fdf3d8;
  --radius: 10px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #11161d; --surface: #1a212b; --ink: #e8edf3; --muted: #9aa6b4; --line: #2e3845; --line-soft: #252e3a; --btn: #c9d2dd; --btn-ink: #11161d;
    --accent: #8db4ea; --accent-soft: #1d2b3e; --s-blauw: #8db4ea; --s-blauw-bg: #1d2b3e; --s-groen: #6fcf97; --s-groen-bg: #183526; --s-rood: #f2a097; --s-rood-bg: #3a1d1b; --s-geel: #e8c26a; --s-geel-bg: #3a3018; color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #11161d; --surface: #1a212b; --ink: #e8edf3; --muted: #9aa6b4; --line: #2e3845; --line-soft: #252e3a; --btn: #c9d2dd; --btn-ink: #11161d;
    --accent: #8db4ea; --accent-soft: #1d2b3e; --s-blauw: #8db4ea; --s-blauw-bg: #1d2b3e; --s-groen: #6fcf97; --s-groen-bg: #183526; --s-rood: #f2a097; --s-rood-bg: #3a1d1b; --s-geel: #e8c26a; --s-geel-bg: #3a3018; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 600; margin-top: 4px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Bovenbalk */
.top { background: var(--btn); color: var(--btn-ink); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.top-in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 16px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.1rem; margin-right: 8px; display: flex; align-items: center; gap: 8px; }
.brand img { height: 28px; width: auto; }
.login-logo { display: block; justify-self: center; }
.login-logo img { display: block; width: min(220px, 60vw); height: auto; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { color: inherit; text-decoration: none; padding: 6px 10px; border-radius: 8px; opacity: 0.8; font-size: 0.95rem; }
.top nav a[aria-current="page"] { opacity: 1; background: rgba(255,255,255,0.14); font-weight: 600; }
.top .who { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: 0.9rem; }
.top .who button { background: transparent; border: 1px solid currentColor; color: inherit; border-radius: 99px; padding: 4px 12px; opacity: 0.85; }

/* Gsm */
.phone { max-width: 460px; margin: 0 auto; padding: 16px 16px 120px; display: grid; gap: 12px; }
.ph-head { display: flex; justify-content: space-between; align-items: center; }
.ph-head b { font-size: 1.05rem; }
.ph-title { font-size: 1.4rem; font-weight: 700; }
.ph-back { justify-self: start; background: none; border: 0; padding: 4px 0; font-weight: 600; color: var(--muted); }
.ph-back::before { content: "‹ "; }
.big { width: 100%; min-height: 60px; border-radius: var(--radius); border: 0; background: var(--btn); color: var(--btn-ink); font-weight: 700; font-size: 1.1rem; padding: 10px 16px; }
.big.quiet { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.big:disabled { opacity: 0.45; cursor: default; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: center; z-index: 4; }
.tabbar-in { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; max-width: 460px; }
.tabbar button { background: none; border: 0; padding: 12px 6px calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 2px; border-top: 3px solid transparent; }
.tabbar button[aria-current="page"] { border-top-color: var(--ink); }
.tabbar b { font-size: 1rem; } .tabbar span { font-size: 0.8rem; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 8px; }
.now { border: 2px solid var(--ink); }
.now .big-t { font-size: 1.3rem; font-weight: 700; }
.pick { display: grid; gap: 10px; }
.pick button, .pick a.doc { text-align: left; color: inherit; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-height: 60px; display: grid; gap: 2px; }
.pick button b, .pick a.doc b { font-size: 1.08rem; } .pick button span, .pick a.doc span { font-size: 0.85rem; color: var(--muted); }
.doc-pages { display: grid; gap: 12px; margin-top: 12px; } .doc-pages img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.doc-pdf { display: inline-block; margin-top: 12px; color: inherit; }
.ph-sub { font-size: 0.85rem; color: var(--muted); margin: 4px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 10px 14px; font-weight: 600; min-height: 44px; }
.chips button[aria-pressed="true"] { border: 2px solid var(--ink); }
.text-in { width: 100%; min-height: 52px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; background: var(--surface); font-size: 1.05rem; }
.day { list-style: none; margin: 0; padding: 0; display: grid; }
.day li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.day .tm { font-variant-numeric: tabular-nums; color: var(--muted); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; width: min(428px, calc(100% - 32px)); background: var(--btn); color: var(--btn-ink); border-radius: var(--radius); padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; z-index: 6; }
.toast button { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; }
.toast.err { background: var(--s-rood); color: #fff; }

/* Aanmelden */
.login { max-width: 460px; margin: 0 auto; padding: 32px 16px; display: grid; gap: 18px; }
.circles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.circles button { background: none; border: 0; display: grid; justify-items: center; gap: 6px; font-weight: 600; }
.circles .c { width: 76px; height: 76px; border-radius: 50%; background: var(--btn); color: var(--btn-ink); display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; }
.dots { display: flex; gap: 14px; justify-content: center; }
.dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); }
.dots span.on { background: var(--ink); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pad button { min-height: 64px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-size: 1.5rem; font-weight: 600; }
.pin-err { color: var(--s-rood); text-align: center; font-weight: 600; min-height: 1.4em; }

/* Materiaal */
.mode-btns { display: grid; gap: 12px; }
.mode-btns button { background: var(--btn); color: var(--btn-ink); border: 0; border-radius: var(--radius); min-height: 88px; font-weight: 700; font-size: 1.25rem; display: grid; place-content: center; gap: 2px; }
.mode-btns small { font-weight: 500; font-size: 0.8rem; opacity: 0.85; }
.vlist { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-height: 60px; width: 100%; }
.row .box { width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 6px; display: grid; place-items: center; font-weight: 700; }
.row[aria-pressed="true"] { border: 2px solid var(--s-blauw); background: var(--s-blauw-bg); }
.row[aria-pressed="true"] .box { background: var(--s-blauw); border-color: var(--s-blauw); color: #fff; }
.row.done { border-color: var(--s-groen); }
.row.done .box { background: var(--s-groen); border-color: var(--s-groen); color: #fff; }
.row.other .box { border-style: dashed; color: var(--muted); }
.row b { display: block; } .row .q { display: block; color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.row:disabled { cursor: default; color: inherit; }
.lmain { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.lmore { border: 0; background: none; color: var(--muted); text-decoration: underline; font-weight: 600; font-size: 0.88rem; padding: 0 6px; }
.lpanel { display: grid; gap: 8px; padding: 2px 0 6px; }
.lq { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.lq input { min-height: 46px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--surface); width: 100%; font-size: 1rem; }
.lq span { color: var(--muted); font-size: 0.85rem; }
.lq button, .two-btns button { min-height: 46px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 0 14px; font-weight: 700; }
.two-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.who-tag { display: inline-block; margin-top: 4px; font-size: 0.78rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; }
.who-tag.me { color: var(--ink); font-weight: 800; border-color: var(--ink); }
.flag-tag { display: inline-block; margin: 4px 0 0 4px; font-size: 0.78rem; font-weight: 600; color: var(--s-rood); border: 1px solid var(--s-rood); border-radius: 99px; padding: 0 8px; }
.ls { display: grid; gap: 1px; margin-top: 3px; font-size: 0.84rem; font-weight: 600; }
.ls-z { color: var(--ink); } .ls-b { color: var(--s-blauw); } .ls-g { color: var(--s-groen); }
.place-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; }
.place-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.place-open { background: none; border: 0; text-align: left; display: grid; padding: 0; }
.place-open b { color: var(--s-blauw); } .place-open span { font-size: 0.82rem; color: var(--muted); }
.btn-load { background: var(--btn); color: var(--btn-ink); border: 0; border-radius: 8px; padding: 10px 12px; font-weight: 700; }
.place-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.place-pick button { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 6px; font-weight: 700; }
.place-pick button[aria-pressed="true"] { border: 2px solid var(--s-blauw); color: var(--s-blauw); }
.plek-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; border-top: 1px solid var(--line-soft); padding: 10px 0; }
.plek-row > span { display: grid; gap: 2px; }
.small-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 12px; font-weight: 600; font-size: 0.85rem; }
.sticky { position: sticky; bottom: 76px; background: var(--bg); padding: 8px 0; }
details.more summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.ok { color: var(--s-groen); font-weight: 700; }
.msg { display: grid; grid-template-columns: 28px 1fr; gap: 10px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; width: 100%; }
.msg .box { width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 6px; display: grid; place-items: center; font-weight: 700; }
.msg.done { opacity: 0.6; } .msg.done .box { background: var(--s-groen); border-color: var(--s-groen); color: #fff; }
.msg .m { display: block; font-size: 0.8rem; color: var(--muted); }
.pin-tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); display: block; }
.tb { border: 2px solid var(--s-rood); background: var(--s-rood-bg); }
.tb.ok { border-color: var(--s-groen); background: var(--s-groen-bg); }

/* Beheer (computer) */
.page { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; display: grid; gap: 16px; }
.page h1 { margin: 0; font-size: 1.5rem; }
.page h2 { margin: 0; font-size: 1.1rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.panel-head .tname { flex: 1 1 100%; width: 100%; min-width: 0; font: inherit; font-weight: 600; resize: none; field-sizing: content; min-height: 2.6em; }
.panel-body { padding: 14px 16px; display: grid; gap: 12px; }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
td { padding: 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
td.r, th.r { text-align: right; } .num { font-variant-numeric: tabular-nums; }
tr.cat th { background: var(--bg); color: var(--ink); }
tr.link { cursor: pointer; } tr.link:hover td { background: var(--bg); }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 14px; font-weight: 600; }
.btn.primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.btn.danger { color: var(--s-rood); }
.in, .page select, .page input[type="text"], .page input[type="password"], .page input[type="number"], .page textarea.tname { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: var(--surface); min-height: 38px; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; }
.subnav button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 7px 14px; font-weight: 600; }
.subnav button[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.chip { display: inline-block; border-radius: 99px; padding: 2px 10px; font-size: 0.8rem; font-weight: 600; }
.chip.actief { background: var(--s-groen-bg); color: var(--s-groen); } .chip.gepland { background: var(--s-blauw-bg); color: var(--s-blauw); } .chip.afgerond { background: var(--line-soft); color: var(--muted); }
.toestel { display: grid; gap: 8px; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.view-switch { display: flex; gap: 6px; }
@media (max-width: 700px) { .top .who span { display: none; } }
.page input.offerte { width: 9.5em; min-width: 0; }
.chip.doc-ok, .chip.doc-nok { white-space: nowrap; }
.chip.doc-ok { background: var(--s-groen-bg); color: var(--s-groen); } .chip.doc-nok { background: var(--s-rood-bg); color: var(--s-rood); }
tr.doc-row-nok td:first-child { box-shadow: inset 4px 0 0 var(--s-rood); } tr.doc-row-ok td:first-child { box-shadow: inset 4px 0 0 var(--s-groen); }
.pick a.doc-pick { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; border-left: 6px solid var(--s-groen); }
.pick a.doc-pick.nok { border-left-color: var(--s-rood); }
.top .who .refresh { background: transparent; border: 1px solid currentColor; color: inherit; border-radius: 99px; min-width: 40px; min-height: 40px; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.top .who .refresh.spin { animation: pf-spin 0.8s linear infinite; }
@keyframes pf-spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) { .top nav { flex-wrap: nowrap; overflow-x: auto; order: 3; width: 100%; scrollbar-width: none; } .top nav::-webkit-scrollbar { display: none; } .top nav a { white-space: nowrap; } }
.top .who a.me { color: inherit; text-decoration: none; opacity: 0.9; }
.tlist { display: grid; gap: 10px; }
.tpanel .thead { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0; padding: 14px 16px; font: inherit; color: inherit; cursor: pointer; flex-wrap: wrap; }
.tpanel .thead b { font-size: 1.05rem; } .tpanel .thead .chev { width: 1em; color: var(--muted); }
.tpanel .thead[aria-expanded="true"] { border-bottom: 1px solid var(--line); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--s-blauw); text-decoration: underline; cursor: pointer; }
.tabbar-in { grid-template-columns: repeat(4, 1fr); }
.m-text { width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: inherit; resize: vertical; }
.m-sel { width: 100%; font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; min-height: 44px; }
.mrow { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mrow .box { flex: none; width: 22px; height: 22px; border: 2px solid var(--line); border-radius: 6px; display: grid; place-items: center; font-size: .8rem; }
.mrow.done { opacity: .6; } .mrow.done .box { background: var(--s-groen-bg); border-color: var(--s-groen); color: var(--s-groen); }
.mrow .m { display: block; font-size: .8rem; color: var(--muted); } .mrow .ans { display: block; margin-top: 4px; font-size: .9rem; color: var(--s-blauw); }
.grid3 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.mitem { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft, var(--line)); } .mitem .grow { flex: 1; min-width: 0; }
.mitem.done { opacity: .55; } .mitem .mcheck input { width: 22px; height: 22px; margin-top: 2px; }
.nbadge { display: inline-block; min-width: 1.4em; padding: 0 5px; border-radius: 99px; background: var(--s-rood); color: #fff; font-size: .75rem; font-weight: 700; text-align: center; }
.pick a.doc-pick.note { border-left-color: var(--s-blauw); }
.mrow input.box { margin: 0; appearance: auto; accent-color: var(--s-groen); cursor: pointer; }
label.mrow { cursor: pointer; }
.tabbar b .nbadge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px; border-radius: 99px; background: #c62828; color: #fff; font-size: .72rem; line-height: 1; vertical-align: 2px; }
details.lev { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.lev summary { padding: 12px 14px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
details.lev .mrow { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
input.lev-auto { color: var(--muted); font-style: italic; }
.mrow .mwis { margin-left: auto; flex: none; align-self: center; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: .85rem; color: var(--s-rood); }
.mrow > span:nth-child(2) { flex: 1; min-width: 0; }
tr.doc-row-note td:first-child { box-shadow: inset 4px 0 0 var(--s-blauw); }
.chip.doc-note { background: #e6eef8; color: #1f4e8c; }
