/* PraktiDec — same colour tokens as Praktident. No inline styles anywhere (strict CSP). */
:root {
  --pk-brand: #1ebbad;
  --pk-brand-strong: #0e7c72;
  --pk-brand-tint: #e4f6f4;
  --pk-orange: #f7941d;
  --pk-orange-strong: #9a5300;
  --pk-orange-tint: #fef1e2;
  --pk-bg: #f3f8f8;
  --pk-surface: #ffffff;
  --pk-text: #1f2d33;
  --pk-muted: #56676c;
  --pk-line: #d9e6e4;
  --pk-line-soft: #e9f1f0;
  --pk-shadow: 0 1px 2px rgba(31, 45, 51, .06), 0 2px 8px rgba(31, 45, 51, .05);
  --pk-ok: #1e7d34;
  --pk-ok-tint: #e5f4e8;
  --pk-warn: #9a5300;
  --pk-err: #b42318;
  --pk-err-tint: #fdecea;
  --pk-radius: 10px;
  --pk-brand-text: var(--pk-brand-strong);
  --pk-brand-light: #5fd6ca;
  color-scheme: light;
}
/* Personal themes (Instellingen → Weergave), set on <html> by thema.js / app.js:
   data-theme="systeem|licht|donker|contrast"  data-accent="turquoise|blauw|groen|paars|roze|oranje"  data-menu="breed|smal" */
:root[data-accent="blauw"]  { --pk-brand: #3b82f6; --pk-brand-strong: #1f5fc4; --pk-brand-light: #8fbaff; }
:root[data-accent="groen"]  { --pk-brand: #2fb36b; --pk-brand-strong: #17783f; --pk-brand-light: #74d9a0; }
:root[data-accent="paars"]  { --pk-brand: #8b5cf6; --pk-brand-strong: #6a3fd4; --pk-brand-light: #bba4ff; }
:root[data-accent="roze"]   { --pk-brand: #e0559a; --pk-brand-strong: #ad2b6b; --pk-brand-light: #f59ac4; }
:root[data-accent="oranje"] { --pk-brand: #f7941d; --pk-brand-strong: #9a5300; --pk-brand-light: #ffb35c; }
:root[data-accent] { --pk-brand-tint: color-mix(in srgb, var(--pk-brand) 14%, #fff); }
:root[data-theme="donker"] {
    --pk-bg: #12191c; --pk-surface: #1b2428; --pk-text: #e6edef; --pk-muted: #a3b3b8; --pk-line: #33434a;
    --pk-line-soft: #26333a; --pk-shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
    --pk-brand-text: var(--pk-brand-light); --pk-brand-tint: color-mix(in srgb, var(--pk-brand) 22%, #1b2428);
    --pk-orange-tint: #3a2a14; --pk-orange-strong: #ffb35c; --pk-err: #ff8a80; --pk-err-tint: #3b1d1b;
    --pk-ok: #6fd69a; --pk-ok-tint: #17301f; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="licht"]):not([data-theme="contrast"]) {
    --pk-bg: #12191c; --pk-surface: #1b2428; --pk-text: #e6edef; --pk-muted: #a3b3b8; --pk-line: #33434a;
    --pk-line-soft: #26333a; --pk-shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
    --pk-brand-text: var(--pk-brand-light); --pk-brand-tint: color-mix(in srgb, var(--pk-brand) 22%, #1b2428);
    --pk-orange-tint: #3a2a14; --pk-orange-strong: #ffb35c; --pk-err: #ff8a80; --pk-err-tint: #3b1d1b;
    --pk-ok: #6fd69a; --pk-ok-tint: #17301f; color-scheme: dark;
  }
}
:root[data-theme="contrast"] {
  --pk-bg: #ffffff; --pk-surface: #ffffff; --pk-text: #000000; --pk-muted: #333333; --pk-line: #000000;
  --pk-line-soft: #6b6b6b; --pk-shadow: none; --pk-brand-text: #000000;
}
:root[data-theme="contrast"] .card, :root[data-theme="contrast"] input, :root[data-theme="contrast"] select,
:root[data-theme="contrast"] textarea, :root[data-theme="contrast"] button { border: 2px solid #000; }
:root[data-theme="contrast"] :focus-visible { outline: 4px solid #000; outline-offset: 2px; }
:root[data-theme="contrast"] .nav-item.active { background: #000; color: #fff; box-shadow: none; }
:root[data-theme="contrast"] a { text-decoration: underline; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--pk-bg); color: var(--pk-text); }
a { color: var(--pk-brand-text); }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 8px; }
.hidden { display: none !important; }
.muted { color: var(--pk-muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }
.gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

/* Layout: side menu on the left, as in Praktident */
.logo { font-weight: 700; font-size: 18px; color: var(--pk-brand-text); text-decoration: none; }
.logo span { color: var(--pk-orange); }
main { max-width: 1400px; margin: 0 auto; padding: 24px; }
body.met-menu { display: grid; grid-template-columns: auto minmax(0, 1fr); min-height: 100vh; }
body.met-menu main { width: 100%; }
.sidebar { position: sticky; top: 0; height: 100vh; width: 124px; display: flex; flex-direction: column; z-index: 10;
           background: var(--pk-surface); border-right: 1px solid var(--pk-line); overflow-y: auto; overflow-x: hidden; }
.sidebar-logo { flex: none; display: flex; align-items: center; justify-content: center; height: 64px; font-weight: 700;
                font-size: 17px; color: var(--pk-brand-text); text-decoration: none; border-bottom: 1px solid var(--pk-line-soft); }
.sidebar-logo span span { color: var(--pk-orange); }
.logo-kort { display: none; }
.sidebar .nav { display: flex; flex-direction: column; }
.nav-item { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
            width: 100%; min-height: 84px; padding: 10px 8px; font-size: 12px; line-height: 1.2; text-align: center;
            overflow-wrap: anywhere; hyphens: auto;
            color: var(--pk-text); text-decoration: none; background: none; cursor: pointer; white-space: normal;
            border: 0; border-bottom: 1px solid var(--pk-line-soft); border-radius: 0; }
.nav-item .icon { width: 28px; height: 28px; color: var(--pk-muted); flex: none; }
.nav-item:hover { background: var(--pk-brand-tint); color: var(--pk-brand-text); border-color: var(--pk-line-soft); }
.nav-item:hover .icon { color: var(--pk-brand-text); }
.nav-item.active, .nav-item.active:hover { background: var(--pk-brand-strong); color: #fff; font-weight: 700;
                                           box-shadow: inset 4px 0 0 var(--pk-orange); }
.nav-item.active .icon { color: #fff; }
.nav-item:focus-visible { outline: 3px solid var(--pk-orange); outline-offset: -3px; }
.nav-spacer { flex: 1 1 auto; min-height: 16px; }
.sidebar-user { flex: none; display: flex; flex-direction: column; gap: 2px; padding: 10px 6px; text-align: center;
                font-size: 11px; color: var(--pk-muted); border-bottom: 1px solid var(--pk-line-soft); overflow-wrap: anywhere; }
.sidebar-user strong { color: var(--pk-text); font-size: 12px; }
.nav-logout { min-height: 72px; border-bottom: 0; border-top: 1px solid var(--pk-line-soft); }

/* Narrow menu: icons only (label as tooltip) */
:root[data-menu="smal"] .sidebar { width: 64px; }
:root[data-menu="smal"] .nav-item { min-height: 60px; }
:root[data-menu="smal"] .nav-item span, :root[data-menu="smal"] .sidebar-user, :root[data-menu="smal"] .logo-full { display: none; }
:root[data-menu="smal"] .logo-kort { display: inline; }

/* Phone: the menu becomes a bar at the bottom */
@media (max-width: 760px) {
  body.met-menu { display: block; }
  body.met-menu main { padding-bottom: 96px; }
  .sidebar, :root[data-menu="smal"] .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; height: auto;
             flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-top: 1px solid var(--pk-line); }
  .sidebar .nav { flex-direction: row; }
  .sidebar-logo, .sidebar-user, .nav-spacer { display: none; }
  .nav-item, :root[data-menu="smal"] .nav-item { width: auto; min-width: 96px; min-height: 64px; border-bottom: 0; border-top: 0;
              border-right: 1px solid var(--pk-line-soft); }
  .nav-item.active, .nav-item.active:hover { box-shadow: inset 0 4px 0 var(--pk-orange); }
}

/* Theme picker (Instellingen) */
.keuzes { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 16px; }
.keuze { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 2px solid var(--pk-line); border-radius: var(--pk-radius);
         background: var(--pk-surface); color: var(--pk-text); text-align: left; white-space: normal; }
.keuze.gekozen { border-color: var(--pk-brand); box-shadow: 0 0 0 3px var(--pk-brand-tint); }
.keuze .titel { font-weight: 600; }
.voorbeeld { display: flex; height: 54px; border-radius: 6px; overflow: hidden; border: 1px solid #c9d6d4; }
.voorbeeld i { display: block; }
.voorbeeld .vb-menu { width: 22%; }
.voorbeeld .vb-main { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.voorbeeld .vb-main b { display: block; height: 7px; border-radius: 3px; }
.vb-licht .vb-menu, .vb-licht .vb-main { background: #fff; } .vb-licht .vb-main { background: #f3f8f8; } .vb-licht b { background: #d9e6e4; }
.vb-donker .vb-menu { background: #1b2428; } .vb-donker .vb-main { background: #12191c; } .vb-donker b { background: #33434a; }
.vb-contrast .vb-menu { background: #000; } .vb-contrast .vb-main { background: #fff; } .vb-contrast b { background: #000; }
.vb-systeem .vb-menu { background: linear-gradient(135deg, #fff 50%, #1b2428 50%); }
.vb-systeem .vb-main { background: linear-gradient(135deg, #f3f8f8 50%, #12191c 50%); } .vb-systeem b { background: #7f9196; }
.kleuren { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.kleur { width: 40px; height: 40px; border-radius: 50%; padding: 0; border: 3px solid var(--pk-surface); box-shadow: 0 0 0 1px var(--pk-line); }
.kleur.gekozen { box-shadow: 0 0 0 3px var(--pk-text); }
.kleur-turquoise { background: #1ebbad; } .kleur-blauw { background: #3b82f6; } .kleur-groen { background: #2fb36b; }
.kleur-paars { background: #8b5cf6; } .kleur-roze { background: #e0559a; } .kleur-oranje { background: #f7941d; }

.card { background: var(--pk-surface); border: 1px solid var(--pk-line); border-radius: var(--pk-radius);
        box-shadow: var(--pk-shadow); padding: 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.tile .label { color: var(--pk-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tile .value { font-size: 24px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .sub { color: var(--pk-muted); font-size: 12px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--pk-line-soft); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--pk-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--pk-line-soft); }
.empty { padding: 24px; text-align: center; color: var(--pk-muted); }

/* Forms */
label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 4px; color: var(--pk-muted); }
input, select, textarea { font: inherit; color: inherit; background: var(--pk-surface); border: 1px solid var(--pk-line);
                          border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--pk-brand); outline-offset: 0; border-color: var(--pk-brand); }
input[type=checkbox] { width: auto; }
.field { margin-bottom: 12px; }
.field .hint { font-size: 12px; color: var(--pk-muted); margin-top: 4px; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; font-weight: normal; color: var(--pk-text); font-size: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.filters .field { margin: 0; min-width: 160px; }

button, .btn { font: inherit; border: 1px solid var(--pk-line); background: var(--pk-surface); color: var(--pk-text);
               border-radius: 8px; padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; }
button:hover, .btn:hover { border-color: var(--pk-brand); }
button.primary, .btn.primary { background: var(--pk-orange); border-color: var(--pk-orange); color: #1f2d33; font-weight: 600; }
button.secondary { background: var(--pk-brand-strong); border-color: var(--pk-brand-strong); color: #fff; }
button.danger { color: var(--pk-err); }
button.small, .btn.small { padding: 4px 10px; font-size: 12px; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.link { border: 0; background: none; color: var(--pk-brand-text); padding: 0; text-decoration: underline; }

/* Status badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
         background: var(--pk-line-soft); color: var(--pk-muted); white-space: nowrap; }
.badge.ok { background: var(--pk-ok-tint); color: var(--pk-ok); }
.badge.err { background: var(--pk-err-tint); color: var(--pk-err); }
.badge.warn { background: var(--pk-orange-tint); color: var(--pk-orange-strong); }
.badge.info { background: var(--pk-brand-tint); color: var(--pk-brand-text); }

/* Messages */
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 12px; border: 1px solid transparent; }
.alert.err { background: var(--pk-err-tint); color: var(--pk-err); border-color: var(--pk-err); }
.alert.ok { background: var(--pk-ok-tint); color: var(--pk-ok); border-color: var(--pk-ok); }
.alert.warn { background: var(--pk-orange-tint); color: var(--pk-orange-strong); border-color: var(--pk-orange); }
.toast { position: fixed; bottom: 24px; right: 24px; max-width: 420px; z-index: 100; box-shadow: var(--pk-shadow); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--pk-line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 10px 14px; }
.tabs button.active { border-bottom-color: var(--pk-brand); color: var(--pk-brand-text); font-weight: 600; }

dialog { border: 1px solid var(--pk-line); border-radius: var(--pk-radius); background: var(--pk-surface); color: var(--pk-text);
         padding: 24px; width: min(640px, 92vw); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(18, 25, 28, .5); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--pk-muted); }
dl.kv dd { margin: 0; }

.codes { display: flex; flex-direction: column; gap: 2px; }
.secret { font-family: ui-monospace, monospace; font-size: 16px; letter-spacing: .08em; padding: 8px 12px;
          background: var(--pk-line-soft); border-radius: 8px; display: inline-block; user-select: all; }
.qr svg { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 8px; }
.recovery { columns: 2; font-family: ui-monospace, monospace; font-size: 15px; padding: 12px; background: var(--pk-line-soft); border-radius: 8px; }
.dropzone { border: 2px dashed var(--pk-line); border-radius: var(--pk-radius); padding: 28px; text-align: center; color: var(--pk-muted); }
.dropzone.over { border-color: var(--pk-brand); background: var(--pk-brand-tint); }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: min(420px, 100%); }
.login-card .logo { font-size: 26px; display: block; margin-bottom: 4px; }

/* Invoice print view */
.invoice { max-width: 800px; }
.invoice .head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
@media print {
  .sidebar, .no-print, .toast { display: none !important; }
  body.met-menu { display: block; }
  body { background: #fff; color: #000; }
  main { padding: 0; }
  .card { box-shadow: none; border: 0; padding: 0; }
}

/* Verzoeken (Fouten en ideeën melden) */
.rq-types { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.rq-type .titel { display: flex; align-items: center; gap: 6px; }
.rq-type .icon, .rq-pill .icon { width: 18px; height: 18px; flex: none; }
.rq-lijst { display: flex; flex-direction: column; gap: 10px; }
.rq { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--pk-line); border-radius: var(--pk-radius); }
.rq-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rq-titel { font-weight: 600; }
.rq-bericht { white-space: pre-wrap; overflow-wrap: anywhere; }
.rq-antwoord { background: var(--pk-brand-tint); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
.rq-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; vertical-align: middle; }
.rq-fout { background: var(--pk-err-tint); color: var(--pk-err); }
.rq-verbetering { background: var(--pk-brand-tint); color: var(--pk-brand-text); }
.rq-functie { background: var(--pk-orange-tint); color: var(--pk-orange-strong); }
.rq-vraag { background: var(--pk-line-soft); color: var(--pk-muted); }
.stem { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 52px; padding: 6px; }
.stem .icon { width: 20px; height: 20px; }
.stem.aan { background: var(--pk-brand-strong); border-color: var(--pk-brand-strong); color: #fff; }
.rq-admin { display: flex; flex-direction: column; gap: 6px; width: 200px; flex: none; }
@media (max-width: 760px) { .rq { flex-wrap: wrap; } .rq-admin { width: 100%; } }

/* Overzicht: pages of blocks (drag & drop in "Aanpassen") */
.dash-kop { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.dash-kop h1 { margin: 0; }
.dash-tabs { align-items: center; }
.dash-tabs button.drop { background: var(--pk-brand-tint); }
.dash-raster { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.dash-raster .card { margin-bottom: 0; }
.dash-blok { min-width: 0; }
.g-klein { grid-column: span 1; } .g-breed { grid-column: span 2; } .g-vol { grid-column: 1 / -1; }
@media (max-width: 1100px) { .dash-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-breed { grid-column: 1 / -1; } }
@media (max-width: 600px) { .dash-raster { grid-template-columns: 1fr; } .g-klein { grid-column: 1 / -1; } }
.dash-blok-kop { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.dash-blok-kop h2 { margin: 0; }
.dash-blok.soort-kpi .value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-blok.soort-kpi .sub, .dash-blok.soort-kpi .label { color: var(--pk-muted); font-size: 12px; }
.dash-blok.soort-kpi .label { text-transform: uppercase; letter-spacing: .04em; }
.dash-uitleg { margin: -4px 0 8px; }
.dash-leeg { grid-column: 1 / -1; }
.dash-raster.bewerken .dash-blok { cursor: grab; outline: 2px dashed var(--pk-line); outline-offset: -2px; }
.dash-raster.bewerken .dash-blok.sleept { opacity: .4; }
.dash-blok.drop-voor { box-shadow: inset 4px 0 0 var(--pk-orange), var(--pk-shadow); }
.dash-blok.drop-na { box-shadow: inset -4px 0 0 var(--pk-orange), var(--pk-shadow); }
.dash-bewerk { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.dash-bewerk select { width: auto; padding: 3px 6px; font-size: 12px; }
.dash-greep { color: var(--pk-muted); font-size: 18px; cursor: grab; padding: 0 4px; }
/* Side panel with blocks + bin (slides in from the right while editing) */
.dash-paneel { position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 90vw); z-index: 50; display: flex; flex-direction: column;
               background: var(--pk-surface); border-left: 1px solid var(--pk-line); box-shadow: -8px 0 24px rgba(0,0,0,.12);
               transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
.dash-paneel.open { transform: none; visibility: visible; transition: transform .25s ease; }
@media (prefers-reduced-motion: reduce) { .dash-paneel, .dash-paneel.open { transition: none; } }
body.paneel-open main { padding-right: calc(min(320px, 90vw) + 24px); }
@media (max-width: 900px) { body.paneel-open main { padding-right: 24px; } }
.dash-paneel-kop { padding: 16px 16px 8px; border-bottom: 1px solid var(--pk-line-soft); }
.dash-paneel-kop h2 { margin: 0 0 4px; }
.dash-paneel-lijst { flex: 1; overflow-y: auto; padding: 0 16px 16px; }
.dash-paneel-lijst h3 { margin: 16px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--pk-muted); }
.dash-palet { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; margin-bottom: 6px; cursor: grab;
              white-space: normal; padding: 8px 10px; }
.dash-palet .icon { width: 20px; height: 20px; color: var(--pk-brand-text); flex: none; }
.dash-palet span:not(.dash-al) { flex: 1; }
.dash-al { color: var(--pk-ok); font-weight: 700; }
.dash-paneel-voet { padding: 12px 16px; border-top: 1px solid var(--pk-line-soft); display: flex; flex-direction: column; gap: 8px; }
.dash-prullenbak { display: flex; align-items: center; gap: 10px; padding: 14px; border: 2px dashed var(--pk-line); border-radius: var(--pk-radius);
                   color: var(--pk-muted); font-size: 12px; transition: background .15s, border-color .15s; }
.dash-prullenbak .icon { width: 28px; height: 28px; flex: none; }
body.sleept-blok .dash-prullenbak { border-color: var(--pk-err); color: var(--pk-err); }
.dash-prullenbak.drop { background: var(--pk-err-tint); border-style: solid; }

/* Charts. Series colours: validated categorical palette (light/dark steps), assigned in fixed order */
.viz { display: block; max-width: 100%; height: auto; overflow: visible; --s1: #257de0; --s2: #f47230; --s3: #00b894; }
:root[data-theme="donker"] .viz, :root[data-theme="donker"] .viz-swatch { --s1: #338ced; --s2: #e76624; --s3: #00a888; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="licht"]):not([data-theme="contrast"]) .viz,
  :root:not([data-theme="licht"]):not([data-theme="contrast"]) .viz-swatch { --s1: #338ced; --s2: #e76624; --s3: #00a888; }
}
.viz-swatch { --s1: #257de0; --s2: #f47230; --s3: #00b894; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; flex: none; }
.viz .s1, .viz-swatch.s1 { fill: var(--s1); background: var(--s1); }
.viz .s2, .viz-swatch.s2 { fill: var(--s2); background: var(--s2); }
.viz .s3, .viz-swatch.s3 { fill: var(--s3); background: var(--s3); }
.viz .l1 { stroke: var(--s1); }
.viz-lijn { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-punt { stroke: var(--pk-surface); stroke-width: 2; }
.viz-raster { stroke: var(--pk-line-soft); stroke-width: 1; }
.viz-as { stroke: var(--pk-line); stroke-width: 1; }
.viz-kruis { stroke: var(--pk-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.viz-label { fill: var(--pk-muted); font-size: 11px; }
.viz-cat { fill: var(--pk-text); font-size: 12px; }
.viz-waarde { fill: var(--pk-text); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-hit { fill: transparent; }
.viz-legenda { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--pk-text); margin-bottom: 6px; }
.viz-legenda span { display: inline-flex; align-items: center; }
.viz-tip { position: fixed; z-index: 200; pointer-events: none; background: var(--pk-surface); color: var(--pk-text);
           border: 1px solid var(--pk-line); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.18); padding: 8px 10px;
           font-size: 12px; min-width: 140px; }
.viz-tip[hidden] { display: none; }
.viz-tip-kop { font-weight: 600; margin-bottom: 4px; }
.viz-tip-regel { display: flex; align-items: center; gap: 8px; }
.viz-tip-regel strong { margin-left: auto; font-variant-numeric: tabular-nums; }
:root[data-theme="contrast"] .viz-raster { stroke: #6b6b6b; }

.kop { margin-bottom: 16px; align-items: flex-end; }
.kop h1 { margin: 0; }
.kop-keuze { margin: 0; min-width: 260px; }

/* Receipt photo (Uitgaven) */
.bon-kiezer.dropzone { cursor: pointer; transition: background .15s, border-color .15s; }
.bon-kiezer.dropzone:focus-visible { outline: 3px solid var(--pk-orange); outline-offset: 2px; }
.bon-kiezer strong { color: var(--pk-text); }
.bon-acties { display: flex; justify-content: center; margin-top: 12px; }
.bon-kiezer .bon-voorbeeld { justify-content: center; margin-top: 12px; cursor: default; }
.bon-kiezer .bon-voorbeeld:empty { display: none; }
.bon-kiezer button .icon { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }
.bon-voorbeeld { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.bon-voorbeeld img { max-width: 120px; max-height: 120px; border-radius: 6px; border: 1px solid var(--pk-line); object-fit: cover; }
.camera video, .camera img { display: block; width: 100%; max-height: 60vh; object-fit: contain; background: #000; border-radius: 8px; }
.camera video.hidden, .camera img.hidden { display: none; }
dialog .dialog-actions button .icon { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }

.field.wide { grid-column: 1 / -1; }
.multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; }

/* ======================================================================
   PraktiLab
   ====================================================================== */
.alert.info { background: var(--pk-brand-tint); color: var(--pk-brand-text); border-color: var(--pk-brand); }
.badge.paars { background: #efe8fd; color: #5b3cb0; }
.badge.verzonden { background: #e6f0fb; color: #1d5fa8; }
:root[data-theme="donker"] .badge.paars { background: #3a2d5c; color: #d6c8ff; }
:root[data-theme="donker"] .badge.verzonden { background: #1f3550; color: #b9d7f7; }

/* Due date: overdue / today / soon / plenty of time */
.termijn { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.termijn.laat { background: var(--pk-err-tint); color: var(--pk-err); }
.termijn.vandaag { background: var(--pk-orange-tint); color: var(--pk-orange-strong); }
.termijn.binnenkort { background: #fff6d6; color: #7a5a00; }
.termijn.ruim { color: var(--pk-muted); }
.tile-laat .value { color: var(--pk-err); }
.bron { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; border-radius: 50%;
        background: var(--pk-brand-tint); color: var(--pk-brand-text); font-size: 10px; font-weight: 700; vertical-align: 1px; }

/* Job page */
.opdracht-kop h1 { margin: 0; }
.opdracht-kop .kop { margin: 8px 0 4px; align-items: center; }
.statusknoppen { margin-top: 8px; }
table.regels .num-input { width: 90px; text-align: right; padding: 4px 6px; }
table.regels .num-input.kort { width: 60px; }
table.regels tfoot td { border-top: 1px solid var(--pk-line); text-align: right; }
table.regels tfoot td:first-child { text-align: right; color: var(--pk-muted); }
table.regels tfoot tr.totaal td { font-weight: 700; color: var(--pk-text); }
.regel-toevoegen { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--pk-line); }
.regel-toevoegen select { min-width: 280px; max-width: 100%; }
.icon-btn { padding: 4px 6px; border-color: transparent; background: none; color: var(--pk-muted); }
.icon-btn:hover { color: var(--pk-err); border-color: var(--pk-err); }
ol.tijdlijn { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--pk-line); }
ol.tijdlijn li { position: relative; padding: 4px 0 8px 10px; }
ol.tijdlijn li::before { content: ""; position: absolute; left: -20px; top: 10px; width: 10px; height: 10px; border-radius: 50%;
                         background: var(--pk-surface); border: 2px solid var(--pk-brand); }

/* Customers: connection key */
dialog.breed { width: min(860px, 96vw); }
.koppeling { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--pk-line); }
.koppeling h3 .icon { width: 18px; height: 18px; vertical-align: -3px; }
.sleutel-veld { flex: 1 1 360px; min-width: 0; }

/* Invoicing */
.periode-keuze { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.periode-keuze .keuze { text-align: left; }
.periode-keuze .titel { font-weight: 600; }

/* Lab logo preview */
.logo-voorbeeld { display: flex; align-items: center; min-height: 90px; padding: 12px; margin-bottom: 12px; border: 1px dashed var(--pk-line);
                  border-radius: 8px; background: #fff; }
.logo-voorbeeld img { max-height: 80px; max-width: 100%; }

/* Login: "?" next to the two-factor title */
.login-titel { display: flex; align-items: center; gap: 10px; }
.login-titel h2 { margin: 0; }
.help-btn { flex: none; width: 30px; height: 30px; padding: 0; border: 2px solid var(--pk-brand-strong); border-radius: 50%;
            background: var(--pk-surface); color: var(--pk-brand-strong); font-weight: 800; line-height: 1; }
.help-btn:hover, .help-btn[aria-expanded="true"] { background: var(--pk-brand-strong); color: #fff; }
.mfa-help { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--pk-line); border-left: 4px solid var(--pk-brand);
            border-radius: 8px; background: var(--pk-brand-tint); font-size: 14px; }
.mfa-help h3 { margin: 0 0 6px; font-size: 15px; }
.mfa-help h4 { margin: 10px 0 4px; font-size: 14px; }
.mfa-help p { margin: 0; }
.mfa-help ul, .mfa-help ol { margin: 0; padding-left: 20px; }
.mfa-help button { margin-top: 10px; }
button .icon, .btn .icon { width: 16px; height: 16px; vertical-align: -3px; margin-right: 2px; }
button.small .icon, .btn.small .icon { width: 14px; height: 14px; }

/* --- Files of a job (js/opdracht.js) and the 3D viewer (js/viewer3d.js, from Praktident) ------------------------- */
.kaart-kop { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.kaart-kop h2 { margin: 0; }
.bestanden-kaart.is-drop { outline: 3px dashed var(--pk-brand); outline-offset: -6px; background: var(--pk-brand-tint); }
.bestanden { list-style: none; margin: 0; padding: 0; }
.bestanden li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--pk-line); }
.bestanden li:first-child { border-top: 0; }
.bestand-icoon { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--pk-brand-tint); color: var(--pk-brand-strong); }
.bestand-icoon .icon { width: 22px; height: 22px; margin: 0; }
.bestand-info { flex: 1; min-width: 0; }
.bestand-info button.link { font-weight: 600; text-align: left; overflow-wrap: anywhere; }
.bestand-acties { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
dialog.viewer { width: min(1400px, 96vw); max-width: 96vw; height: 92vh; max-height: 92vh; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
dialog.viewer:not([open]) { display: none; }
.viewer-kop { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--pk-line); }
.viewer-titel { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.viewer-titel strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-stage { position: relative; flex: 1; min-height: 0; background: #11181b; }
.viewer-stage.is-foto { display: grid; place-items: center; padding: 12px; }
.viewer-stage.is-foto img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-stage .alert { position: absolute; left: 16px; right: 16px; top: 16px; }
.v3d { position: absolute; inset: 0; background: #11181b; color: #e8eef0; }
.v3d canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
.v3d.is-light { background: #e9eef0; color: #1f2d33; }
.v3d-bar { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; pointer-events: none; z-index: 3; }
.v3d-bar > * { pointer-events: auto; }
.v3d-bar button { min-height: 40px; min-width: 40px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px;
  background: rgba(17, 24, 27, .82); color: #fff; font-weight: 600; }
.v3d-bar button:hover { background: rgba(14, 124, 114, .9); border-color: rgba(255, 255, 255, .3); }
.v3d-bar button.is-on { background: #0e7c72; border-color: #0e7c72; }
.v3d-info { position: absolute; left: 10px; bottom: 10px; z-index: 3; padding: 4px 10px; border-radius: 6px; background: rgba(17, 24, 27, .75); color: #fff; font-size: .82rem; }
.v3d-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; z-index: 2; }
.v3d-label { position: absolute; z-index: 4; transform: translate(-50%, -130%); padding: 2px 8px; border-radius: 6px; background: #f7941d;
  color: #1f2d33; font-weight: 800; font-size: .85rem; pointer-events: none; white-space: nowrap; }
@media (max-width: 700px) {
  .bestanden li { flex-wrap: wrap; }
  .bestand-acties { width: 100%; justify-content: flex-start; }
}
