/* PraktiPatient — 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); }
/* Page title: same height with or without buttons next to it, so every page starts at the same line */
h1 { font-size: 22px; margin: 0 0 16px; min-height: 44px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
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: 13px; 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: 14px; }

/* 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); }
/* Empty list on a page of cards: keeps the same frame as a filled page */
.card.leeg { text-align: center; color: var(--pk-muted); padding: 32px 24px; }
.card.leeg p { margin: 0; }
.leeg-actie { justify-content: center; margin-top: 14px; }

/* 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; }
/* Filters of a page in their own card above the results (same frame as the rest of the page) */
.card.filterbalk { padding-top: 14px; padding-bottom: 14px; }
.card.filterbalk .filters { margin: 0; }
/* File inputs: the browser's own button styled like the app's buttons; next to other controls not full width */
input[type=file] { padding: 6px 8px; cursor: pointer; color: var(--pk-muted); }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; border: 1px solid var(--pk-line); background: var(--pk-brand-tint);
  color: var(--pk-brand-text); border-radius: 6px; padding: 4px 12px; margin-right: 10px; cursor: pointer; }
input[type=file]:hover::file-selector-button { border-color: var(--pk-brand); }
.gap > input[type=file] { width: auto; flex: 0 1 340px; min-width: 0; }

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); }
.alert.info { background: var(--pk-brand-tint); color: var(--pk-text); border-color: var(--pk-brand); }
.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: 15px; }
.viz-cat { fill: var(--pk-text); font-size: 15px; }
.viz-waarde { fill: var(--pk-text); font-size: 15px; font-weight: 600; 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: 14px; min-width: 160px; }
.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: center; min-height: 44px; }
.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; }

/* ======================================================================================================================
   PraktiPatient additions
   ==================================================================================================================== */
.logo span, .sidebar-logo span span { color: var(--pk-orange); }
dialog.breed { width: min(980px, 96vw); }
dialog { max-height: 92vh; overflow-y: auto; }
.tegel-link { text-decoration: none; color: inherit; display: block; }
.tegel-link:hover { border-color: var(--pk-brand); }
.stip { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; flex: none; vertical-align: middle; }
.err-tekst { color: var(--pk-err); }
.segment { display: inline-flex; border: 1px solid var(--pk-line); border-radius: 8px; overflow: hidden; }
.segment button { border: 0; border-radius: 0; border-right: 1px solid var(--pk-line); }
.segment button:last-child { border-right: 0; }
.segment button.active { background: var(--pk-brand-strong); color: #fff; }
.handleiding li { margin-bottom: 6px; }

/* Search with results (patients, code lists, insurers) */
.zoeker { position: relative; }
.zoek-lijst { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 2px); background: var(--pk-surface); border: 1px solid var(--pk-line);
              border-radius: 8px; box-shadow: var(--pk-shadow); max-height: 320px; overflow-y: auto; }
.zoek-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--pk-line-soft);
             border-radius: 0; white-space: normal; }
.zoek-item.actief, .zoek-item:hover { background: var(--pk-brand-tint); }

/* Patient screen */
.patient-kaart .pk-naam { margin: 0 0 4px; }
.pk-acties { align-self: flex-start; }
.patient-raster { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.patient-raster > div:last-child { order: 2; }
@media (max-width: 1000px) { .patient-raster { grid-template-columns: 1fr; } .patient-raster > div:last-child { order: 0; } }
.trajecten { display: flex; flex-direction: column; gap: 6px; }
.traject { display: flex; align-items: flex-start; gap: 6px; text-align: left; white-space: normal; width: 100%; }
.traject.actief { border-color: var(--pk-brand); box-shadow: 0 0 0 2px var(--pk-brand-tint); }
.traject.gesloten { opacity: .7; }
.traject-tekst { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.traject .stip { margin-top: 5px; }
.snelkeuze { display: flex; flex-wrap: wrap; gap: 8px; }
.snel { --c: #2f9e9e; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 120px; max-width: 200px; white-space: normal;
        text-align: left; border-left: 6px solid var(--c); cursor: grab; }
.snel:active { cursor: grabbing; }
.snel-kort { font-weight: 700; font-size: 13px; }
.snel-label { font-size: 12px; color: var(--pk-muted); }
.snel-set { font-size: 11px; color: var(--pk-orange-strong); }
.dagen { display: flex; flex-direction: column; gap: 8px; }
.dag { border: 1px solid var(--pk-line); border-radius: 8px; padding: 10px; cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dag-kop { width: 100%; }
.dag.gekozen { border-color: var(--pk-brand); box-shadow: inset 4px 0 0 var(--pk-brand); }
.dag.drop { background: var(--pk-brand-tint); border-style: dashed; }
.chip { --c: #2f9e9e; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 12px;
        background: color-mix(in srgb, var(--c) 14%, var(--pk-surface)); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.chip-x { border: 0; background: none; padding: 0 2px; font-size: 14px; line-height: 1; color: var(--pk-muted); }
.verslag { border: 1px solid var(--pk-line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.verslag.concept { border-style: dashed; }
.vs-sectie { margin-top: 6px; }
.vs-kop { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--pk-muted); }
.vs-regel { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 8px; }
.vs-label { color: var(--pk-muted); }
.vs-tekst { white-space: pre-wrap; overflow-wrap: anywhere; }
.vs-metingen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.meting { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--pk-brand-tint); color: var(--pk-brand-text); }
.verslag-form { border: 1px solid var(--pk-line); border-radius: 8px; padding: 12px; margin-bottom: 16px; background: var(--pk-bg); }
.vs-form-sectie h3 { margin-top: 8px; }
.notitie { border-top: 1px solid var(--pk-line-soft); padding: 8px 0; }
.notitie.vast { background: var(--pk-orange-tint); padding: 8px; border-radius: 6px; }
.notitie-tekst { white-space: pre-wrap; overflow-wrap: anywhere; }
.doc { padding: 4px 0; }
.snel-rij { display: grid; grid-template-columns: auto 1fr 1fr 48px auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.snel-rij input[type=color] { padding: 2px; height: 36px; }
.greep { color: var(--pk-muted); }

/* Agenda */
.agenda-balk { margin-bottom: 12px; }
.agenda-titel { margin: 0 8px; font-size: 18px; }
.agenda-balk .zoeker { width: 260px; }
.kolom-keuze { position: relative; }
.kolom-keuze summary { cursor: pointer; padding: 8px 12px; border: 1px solid var(--pk-line); border-radius: 8px; background: var(--pk-surface); list-style: none; }
.kolom-lijst { position: absolute; z-index: 40; right: 0; margin-top: 4px; background: var(--pk-surface); border: 1px solid var(--pk-line); border-radius: 8px;
               padding: 10px; min-width: 240px; box-shadow: var(--pk-shadow); }
.plan-bar { display: flex; align-items: center; gap: 8px; }
.cal { background: var(--pk-surface); border: 1px solid var(--pk-line); border-radius: var(--pk-radius); overflow: hidden; }
.tg-scroll { height: calc(100vh - 170px); overflow: auto; }
.tg-binnen { min-width: calc(56px + var(--kolommen) * 150px); }
.tg-kop { display: grid; grid-template-columns: 56px repeat(var(--kolommen), minmax(150px, 1fr)); position: sticky; top: 0; z-index: 5;
          background: var(--pk-surface); border-bottom: 1px solid var(--pk-line); }
.tg-hoek { border-right: 1px solid var(--pk-line-soft); }
.tg-kolomkop { border: 0; border-left: 1px solid var(--pk-line-soft); border-radius: 0; padding: 6px 8px; display: flex; flex-direction: column;
               align-items: flex-start; gap: 2px; background: none; white-space: nowrap; overflow: hidden; }
.tg-kolomkop.dagstart { border-left: 2px solid var(--pk-line); }
.tg-kolomkop.vandaag { color: var(--pk-brand-text); font-weight: 700; }
.kolom-naam { display: flex; align-items: center; font-size: 13px; }
.tg-lijf { position: relative; display: grid; grid-template-columns: 56px repeat(var(--kolommen), minmax(150px, 1fr));
           background-image: repeating-linear-gradient(to bottom, var(--pk-line-soft) 0 1px, transparent 1px var(--uur)); }
.tg-uren { position: relative; border-right: 1px solid var(--pk-line-soft); }
.tg-uur { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--pk-muted); }
.tg-kolom { position: relative; border-left: 1px solid var(--pk-line-soft); cursor: copy; }
.tg-kolom.dagstart { border-left: 2px solid var(--pk-line); }
.tg-kolom.vandaag { background: color-mix(in srgb, var(--pk-brand) 4%, transparent); }
.tg-vrij { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, var(--pk-line-soft) 0 6px, transparent 6px 12px);
           opacity: .9; pointer-events: none; }
.tg-vrij span { position: absolute; top: 4px; left: 6px; font-size: 11px; color: var(--pk-muted); }
.tg-nu { position: absolute; left: 0; right: 0; height: 2px; background: var(--pk-err); z-index: 3; pointer-events: none; }
.afspraak { --c: #2f9e9e; position: absolute; z-index: 2; border-radius: 6px; padding: 3px 6px; overflow: hidden; cursor: pointer; touch-action: none;
            background: color-mix(in srgb, var(--c) 18%, var(--pk-surface)); border-left: 4px solid var(--c); font-size: 12px; line-height: 1.25;
            box-shadow: 0 1px 2px rgba(0,0,0,.08); user-select: none; }
.afspraak:hover { box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.afspraak:focus-visible { outline: 2px solid var(--pk-orange); }
.afspraak.compact .af-type { display: none; }
.afspraak.verleden { opacity: .75; }
.afspraak.doorgestreept .af-naam { text-decoration: line-through; }
.afspraak.sleept { opacity: .85; z-index: 10; box-shadow: 0 6px 20px rgba(0,0,0,.25); cursor: grabbing; }
.af-tijd { font-size: 11px; color: var(--pk-muted); }
.af-naam { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-type { color: var(--pk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-greep { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.af-status.aangekomen { color: var(--pk-orange-strong); } .af-status.klaar { color: var(--pk-ok); } .af-status.niet_gekomen { color: var(--pk-err); }
.maand .m-kop { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--pk-line); }
.maand .m-kop div { padding: 6px 8px; font-size: 12px; color: var(--pk-muted); text-transform: uppercase; }
.m-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(110px, 1fr); }
.m-cel { border-right: 1px solid var(--pk-line-soft); border-bottom: 1px solid var(--pk-line-soft); padding: 4px; cursor: pointer; min-width: 0; }
.m-cel.ander { background: var(--pk-bg); color: var(--pk-muted); }
.m-cel.vandaag .m-nr { background: var(--pk-brand-strong); color: #fff; border-radius: 999px; padding: 0 6px; display: inline-block; }
.m-cel.drop { background: var(--pk-brand-tint); }
.m-nr { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.m-pil { --c: #2f9e9e; font-size: 11px; padding: 1px 4px; margin-bottom: 2px; border-radius: 4px; border-left: 3px solid var(--c);
         background: color-mix(in srgb, var(--c) 15%, var(--pk-surface)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; touch-action: none; }
.m-tijd { color: var(--pk-muted); }
.m-spook { position: fixed; z-index: 100; pointer-events: none; opacity: .9; box-shadow: 0 6px 20px rgba(0,0,0,.25); }

/* Waiting room */
.wk-raster { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 1200px) { .wk-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wk-kolom h2 { font-size: 14px; }
.wk-item { border-top: 1px solid var(--pk-line-soft); padding: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.te-lang { color: var(--pk-err); font-weight: 600; }
.tg-uur:first-child { transform: none; }
.afspraak.compact { padding-top: 1px; padding-bottom: 1px; }
.afspraak.compact .af-tijd { display: none; }
.card.drop { background: var(--pk-brand-tint); outline: 2px dashed var(--pk-brand); outline-offset: -6px; }
.drop-hint { margin: 4px 0 8px; }

/* Behandelen: snelkeuze + lichaams-/voetkaart (zoals tandkaart met vlakken in Praktident) + notabalk */
.behandel-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 340px); gap: 16px; align-items: start; }
.behandel-raster.zonder-kaart { grid-template-columns: 1fr; }
@media (max-width: 900px) { .behandel-raster { grid-template-columns: 1fr; } }
.snel-toets { margin-left: 6px; font-size: 10px; font-weight: 600; padding: 0 4px; border: 1px solid var(--pk-line); border-radius: 4px;
              color: var(--pk-muted); background: var(--pk-surface); vertical-align: 1px; }
kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 1px 5px; border: 1px solid var(--pk-line);
      border-bottom-width: 2px; border-radius: 4px; background: var(--pk-surface); }
.lk-kaart { --c: var(--pk-brand); }
.lk-svg { width: 100%; max-height: 420px; display: block; touch-action: manipulation; }
.lk-svg .lk-regio { fill: var(--pk-line-soft); stroke: var(--pk-muted); stroke-width: 1; cursor: pointer; transition: fill .12s; }
.lk-svg .lk-regio:hover { fill: var(--pk-brand-tint); }
.lk-svg .lk-regio:focus-visible { outline: none; stroke: var(--pk-text); stroke-width: 2.5; }
.lk-svg .lk-regio.behandeld { fill: color-mix(in srgb, var(--c) 28%, var(--pk-surface)); }
.lk-svg .lk-regio.gekozen { fill: var(--pk-orange); stroke: var(--pk-orange-strong); stroke-width: 2; }
.lk-svg .lk-regio.drop { fill: var(--pk-brand); stroke-dasharray: 3 2; }
.lk-svg text { fill: var(--pk-muted); font-size: 11px; text-anchor: middle; pointer-events: none; }
.lk-svg text.lk-zijde { font-weight: 700; font-size: 14px; fill: var(--pk-text); }
.lk-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; min-height: 26px; }
.lk-chip { --c: var(--pk-orange); }
.chip-plek { font-size: 11px; color: var(--pk-muted); }
.nota-balk { border: 1px solid var(--pk-line); border-radius: 8px; padding: 10px 12px; background: var(--pk-brand-tint); }
.nota-regels { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }

/* Open patiënten als tabbladen (zoals Praktident) */
.ptabs { display: flex; align-items: flex-end; gap: 2px; margin: -4px 0 12px; border-bottom: 2px solid var(--pk-brand-strong);
         overflow-x: auto; scrollbar-width: thin; min-height: 40px; }
.ptab { flex: none; display: flex; align-items: center; max-width: 240px; border-radius: 8px 8px 0 0; background: var(--pk-line-soft);
        color: var(--pk-text); user-select: none; touch-action: pan-y; }
.ptab:hover { background: var(--pk-brand-tint); }
.ptab.actief { background: var(--pk-brand-strong); color: #fff; font-weight: 600; box-shadow: inset 0 -3px 0 var(--pk-orange); }
.ptab.sleept { opacity: .9; box-shadow: 0 6px 16px rgba(31, 45, 51, .25); position: relative; z-index: 2; cursor: grabbing; }
.ptab button { border: 0; background: none; color: inherit; min-height: 0; }
.ptab-open { padding: 8px 4px 8px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.ptab-open small { margin-left: 6px; color: var(--pk-muted); font-weight: 400; }
.ptab.actief .ptab-open small { color: #fff; opacity: .85; }
.ptab-x { width: 26px; height: 26px; margin-right: 4px; border-radius: 50%; padding: 0; line-height: 1; font-size: 16px; opacity: .7; }
.ptab-x:hover { opacity: 1; background: rgba(0, 0, 0, .15); }
.ptab-leeg { align-self: center; padding: 6px 4px; }
.ptab-zoek { flex: 0 1 280px; min-width: 180px; padding-bottom: 6px; }

/* Platformbeheer: smal getalveld */
input.smal { width: 80px; }
.licentie-koop { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--pk-line); border-radius: 8px; background: var(--pk-brand-tint); }

/* Meest gebruikte codes onder de snelkeuze */
.veel-rij { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.veel { display: inline-flex; align-items: stretch; border: 1px solid var(--pk-line); border-radius: 999px; background: var(--pk-surface); overflow: hidden; cursor: grab; }
.veel button { border: 0; background: none; min-height: 0; border-radius: 0; font-size: 12px; color: var(--pk-text); }
.veel-code { padding: 4px 6px 4px 10px; text-align: left; }
.veel-code:hover, .veel-pin:hover { background: var(--pk-brand-tint); }
.veel-pin { padding: 2px 8px; border-left: 1px solid var(--pk-line) !important; color: var(--pk-brand-text) !important; font-weight: 700; }

/* Agenda: hover-tijd en nu-lijn met tijd (zoals Praktident) */
.tg-hover { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--pk-brand-strong); z-index: 3; pointer-events: none; }
.tg-hover-label, .tg-nu-label { position: absolute; right: 4px; transform: translateY(-50%); padding: 0 4px; border-radius: 3px; color: #fff;
                                font-size: 11px; font-weight: 700; z-index: 4; pointer-events: none; }
.tg-hover-label { background: var(--pk-brand-strong); }
.tg-nu-label { background: var(--pk-err); }
.tg-hover[hidden], .tg-hover-label[hidden], .tg-nu[hidden], .tg-nu-label[hidden] { display: none; }
.tg-nu.eerste::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--pk-err); }
:fullscreen .app-main, :fullscreen main { max-width: none; }

/* Dashboard */
/* Dashboard blocks (layout editing as in praktiDec) */
.dash-kop { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.dash-kop h1 { margin: 0; }
.dash-filters { flex-wrap: wrap; }
.dash-filters select { width: auto; min-width: 180px; }
.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; margin-top: 12px; }
.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; font-size: 18px; }
.dash-blok.soort-kpi .value { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-blok.soort-kpi .sub { color: var(--pk-muted); font-size: 14px; }
.dash-blok.soort-kpi .label { color: var(--pk-muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.dash-uitleg { margin: -4px 0 8px; font-size: 14px; }
.dash-blok .viz { width: 100%; }
.dash-blok .link.small, .dash-blok td, .dash-blok th { font-size: 14px; }
.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: 13px; }
.dash-greep { color: var(--pk-muted); font-size: 18px; cursor: grab; padding: 0 4px; }
.dash-grafiek .viz { width: 100%; }
.viz-hit:focus-visible { outline: none; fill: var(--pk-brand-tint); fill-opacity: .5; }
.kop select { width: auto; min-width: 180px; }

/* Bellijst */
.bel { margin-bottom: 10px; }
.bel-reden { margin: 6px 0 4px; font-weight: 600; }
a.tel { font-variant-numeric: tabular-nums; }
.nav-item { position: relative; }
.nav-badge { position: absolute; top: 6px; right: 14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pk-orange);
             color: #1f2d33; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* Taken, apparatuur */
.taak { margin-bottom: 8px; padding: 12px 16px; }
.taak.klaar strong { text-decoration: line-through; color: var(--pk-muted); }
.taak-oms { margin: 4px 0 2px 28px; white-space: pre-wrap; }
.taak .small.muted { margin-left: 28px; }
.fout { color: var(--pk-err); font-weight: 600; }
details.apparaat { margin-bottom: 10px; }
details.apparaat > summary { cursor: pointer; list-style: none; }
details.apparaat > summary::-webkit-details-marker { display: none; }
details.apparaat[open] > summary { margin-bottom: 8px; }

/* Instellingen: één pagina met een vast menu links en zoeken (zoals Praktident) */
.inst-pagina { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.inst-menu { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 32px); overflow-y: auto; }
.inst-menu input { margin-bottom: 6px; }
.inst-links { display: flex; flex-direction: column; gap: 2px; }
.inst-links a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--pk-radius); color: var(--pk-text);
                text-decoration: none; font-weight: 600; font-size: 14px; }
.inst-links a:hover { background: var(--pk-brand-tint); color: var(--pk-brand-text); }
.inst-links a.actief { background: var(--pk-brand-strong); color: #fff; }
.inst-inhoud { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.inst-inhoud .card { scroll-margin-top: 16px; }
.zoek-kaart { box-shadow: 0 0 0 2px var(--pk-orange); }
.zoek-treffer { background: var(--pk-orange-tint); border-radius: 4px; }
@media (max-width: 900px) {
  .inst-pagina { grid-template-columns: 1fr; }
  .inst-menu { position: static; max-height: none; }
  .inst-links { flex-direction: row; overflow-x: auto; }
  .inst-links a { white-space: nowrap; }
}
.ptab-knop { margin: 0 0 6px 6px; white-space: nowrap; }
.lijst-tabel { max-height: 60vh; overflow-y: auto; margin-top: 8px; }

/* Logo: Praktident-icoon als tijdelijke placeholder naast de naam PraktiPatient */
.sidebar-logo { gap: 8px; }
.logo-icoon { flex: none; display: inline-block; vertical-align: middle; }
.login-card .logo { display: flex; align-items: center; gap: 10px; }
.logo-tekst { font-weight: 700; color: var(--pk-brand-text); }
.logo-tekst span { color: var(--pk-orange); }
.sidebar-logo .logo-icoon { width: 40px; height: 40px; }
.login-card .logo .logo-icoon { width: 56px; height: 56px; }
.dash-grafiek p.small, .dash-grafiek .table-wrap td, .dash-grafiek .table-wrap th { font-size: 14px; }
.dash-grafiek h2 { font-size: 18px; }
.dash-grafiek .link.small { font-size: 14px; }

/* Toestemming: tekenen op de tablet */
.teken-dialoog { width: min(980px, 96vw); }
.toest-uitleg { max-height: 34vh; overflow-y: auto; border: 1px solid var(--pk-line); border-radius: 8px; padding: 10px 14px; background: var(--pk-bg); }
.toest-tekst { white-space: pre-wrap; font-size: 15px; line-height: 1.5; }
canvas.handtekening { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; background: #fff; border: 2px dashed var(--pk-line);
                      border-radius: 8px; touch-action: none; cursor: crosshair; max-height: 220px; aspect-ratio: 4 / 1; }

/* Praktijk → Onderdelen: one row per part of the software with a switch */
.onderdelen { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.onderdeel { display: flex; gap: 14px; align-items: flex-start; padding: 12px 10px; border-radius: var(--pk-radius); cursor: pointer; font-weight: normal; color: var(--pk-text); }
.onderdeel:hover { background: var(--pk-brand-tint); }
.onderdeel-tekst { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.onderdeel.uit .onderdeel-tekst strong { color: var(--pk-muted); }
.onderdeel-vereist.waarschuwing { color: var(--pk-warn); font-weight: 600; }
input.schakelaar { appearance: none; -webkit-appearance: none; flex: none; width: 42px; height: 24px; margin: 2px 0 0; padding: 0; border-radius: 12px;
  border: 1px solid var(--pk-line); background: var(--pk-line); position: relative; cursor: pointer; transition: background .15s; }
input.schakelaar::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
input.schakelaar:checked { background: var(--pk-brand-strong); border-color: var(--pk-brand-strong); }
input.schakelaar:checked::after { transform: translateX(18px); }
input.schakelaar:focus-visible { outline: 2px solid var(--pk-brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { input.schakelaar, input.schakelaar::after { transition: none; } }

/* Press-and-hold buttons (App.hold, as in Praktident v2): fill up, orange first, red at the end */
.pk-hold { position: relative; overflow: hidden; isolation: isolate; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.pk-hold::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: scaleX(0); transform-origin: left center;
  background-color: var(--pk-orange); pointer-events: none; }
.pk-hold.is-holding { border-color: #c76b00; color: #1f2d33; }
.pk-hold.is-holding::before { animation: pk-hold var(--hold-ms, .8s) linear forwards; }
.pk-hold.is-late { color: #fff; }
@keyframes pk-hold { 0% { transform: scaleX(0); background-color: var(--pk-orange); } 65% { background-color: var(--pk-orange); }
  100% { transform: scaleX(1); background-color: #c92a2a; } }
.rij-acties { justify-content: flex-end; flex-wrap: nowrap; }
td.acties { width: 1%; white-space: nowrap; }
.rij-acties.wrap { flex-wrap: wrap; justify-content: flex-start; }
td.acties .rij-acties.wrap { min-width: 220px; }

/* Begroting card on the Behandelen tab: planned lines (dashed chips), above the days */
.dag.begroting-dag { background: var(--pk-surface-2, var(--pk-bg)); }
.chip.gepland { border-style: dashed; }
.chip.klikbaar { cursor: pointer; }
.chip.klikbaar:hover { box-shadow: 0 0 0 2px var(--pk-brand); }
.begroting-acties { width: 100%; margin-top: 4px; }
dialog .dialog-actions .spacer { flex: 1; }

/* Suggesties en fouten */
.verzoek .gap { flex-wrap: wrap; }
.verzoek-bericht { white-space: pre-wrap; margin: 8px 0; }
.verzoek-antwoord { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--pk-brand-tint); color: var(--pk-text); white-space: pre-wrap; }
.verzoek-beheer { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--pk-line); }
button.stem.gekozen { background: var(--pk-brand-strong); border-color: var(--pk-brand-strong); color: #fff; }
.keuzes.compact .keuze { min-width: 0; flex: 1 1 160px; }

/* Menu group (Financiën): a heading that folds open; its pages a little smaller, on a tinted strip */
.nav-groep .nav-pijl { display: inline-block; margin-left: 4px; font-size: 10px; transition: transform .15s; }
.nav-groep[aria-expanded="true"] .nav-pijl { transform: rotate(180deg); }
.nav-groep.bevat-actief, .nav-groep.bevat-actief .icon { color: var(--pk-brand-text); font-weight: 700; }
.nav-sub { display: none; flex-direction: column; background: var(--pk-bg); box-shadow: inset 3px 0 0 var(--pk-line); }
.nav-sub.open { display: flex; }
.nav-item.nav-subitem { min-height: 66px; padding: 8px 6px; gap: 4px; font-size: 11.5px; }
.nav-item.nav-subitem .icon { width: 22px; height: 22px; }
:root[data-menu="smal"] .nav-item.nav-subitem { min-height: 50px; }
:root[data-menu="smal"] .nav-groep::after { content: "▾"; font-size: 10px; color: var(--pk-muted); line-height: 1; }
:root[data-menu="smal"] .nav-groep[aria-expanded="true"]::after { content: "▴"; }
@media (prefers-reduced-motion: reduce) { .nav-groep .nav-pijl { transition: none; } }
@media (max-width: 760px) {
  .nav-groep { display: none; }
  .nav-sub, .nav-sub.open { display: flex; flex-direction: row; background: none; box-shadow: none; }
  .nav-item.nav-subitem { min-height: 64px; }
}
.tab-teller { display: inline-block; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--pk-orange);
  color: #1f2d33; font-size: 11px; line-height: 18px; text-align: center; }

/* One action row at the bottom of every settings card (App.kaartActies) and one form of "add" row */
.kaart-acties { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--pk-line-soft); }
.toevoeg-rij { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--pk-line-soft); }
.toevoeg-rij .field { margin: 0; flex: 1 1 180px; }
.toevoeg-rij > button { flex: none; }
pre.mail-voorbeeld { white-space: pre-wrap; font: inherit; background: var(--pk-bg); border: 1px solid var(--pk-line); border-radius: 8px; padding: 12px; }
code.link-code { padding: 6px 10px; border-radius: 6px; background: var(--pk-bg); border: 1px solid var(--pk-line); font-size: 13px; overflow-wrap: anywhere; }
/* Public appointment request form (afspraak.html, no login) */
body.openbaar { display: block; }
.openbaar-pagina { max-width: 760px; margin: 24px auto 48px; padding: 0 16px; }
.openbaar-kop { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.openbaar-kop h1 { margin: 0; min-height: 0; }
.voorkeur { margin: 4px 0 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.openbaar-klaar h1 { min-height: 0; }

/* Anamnese */
.anamnese-waarschuwingen { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.anamnese-groep { margin-top: 14px; }
.anamnese-groep h3 { margin: 0 0 6px; }
.anamnese-vraag { padding: 8px 0; border-bottom: 1px solid var(--pk-line-soft); }
.anamnese-vraag > label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--pk-text); }
.anamnese-vraag.waarsch > label .waarsch-teken { color: var(--pk-err); }
.anamnese-opm { flex: 1 1 220px; }
.segment { display: inline-flex; border: 1px solid var(--pk-line); border-radius: 8px; overflow: hidden; flex: none; }
.segment button { border: 0; border-radius: 0; padding: 6px 14px; background: var(--pk-surface); }
.segment button + button { border-left: 1px solid var(--pk-line); }
.segment button.gekozen { background: var(--pk-brand-strong); color: #fff; font-weight: 600; }
.kaart-deel { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--pk-line-soft); }
.kaart-deel h3 { margin: 0; }

/* Dictation button on a textarea (dicteer.js) */
.dict-wrap { position: relative; }
.dict-wrap > textarea { padding-right: 52px; }
.dict-btn { position: absolute; right: 6px; bottom: 6px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-width: 40px; height: 40px;
  padding: 0 10px; border-radius: 20px; font-weight: 700; font-size: 13px; }
.dict-btn .icon { width: 18px; height: 18px; }
.dict-btn.opnemen { background: #b42318; border-color: #b42318; color: #fff; }
.dict-rec { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: dict-puls 1s infinite; }
.dict-btn.bezig { opacity: .8; cursor: progress; }
@keyframes dict-puls { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dict-rec { animation: none; } }
.dash-blok.dash-link { cursor: pointer; }
.dash-blok.dash-link:hover { box-shadow: 0 0 0 2px var(--pk-brand); }
