/* KT-Control webapp – huisstijl Ketelaartechniek. Mobile-first; vanaf 1150px drie kolommen.
   Geen externe fonts of CDN's (CSP: alles van eigen origin). */

:root {
  --brand: #0b4371;
  --brand-ink: #083357;
  --accent: #1467ab;
  --chev-1: #0d5c9c;
  --chev-2: #1673bd;
  --chev-3: #2590dc;
  --bg: #eef1f4;
  --surface: #fff;
  --ink: #16212b;
  --ink-soft: #5a6b78;
  --line: #d9e0e6;
  --danger: #b3261e;
  --ok-bg: #e3f5ec; --ok-ink: #0f7a44; --ok-dot: #16a35a;
  --warn-bg: #fdf0db; --warn-ink: #9a6206; --warn-dot: #d8901a;
  --off-bg: #eceff1; --off-ink: #5a6b78; --off-dot: #90a0ab;
  --radius: 14px;
  --home-top: #083357;
  --home-mid: #1467ab;
  --home-end: #6fa9db;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg); font-variant-numeric: tabular-nums; }
a { color: var(--accent); }
h1, h2 { line-height: 1.25; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--chev-3); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--surface); padding: 8px 12px; }
.skip:focus { left: 8px; top: 8px; }
.icon { width: 22px; height: 22px; flex: none; }

/* ---------- Logo (woordmerk + drie chevrons) ---------- */
.logo-mark { display: inline-flex; gap: 2px; align-items: center; }
.logo-mark i { display: block; width: 9px; height: 18px; clip-path: polygon(0 0, 45% 0, 100% 50%, 45% 100%, 0 100%, 55% 50%); }
.logo-mark i:nth-child(1) { background: var(--chev-1); }
.logo-mark i:nth-child(2) { background: var(--chev-2); }
.logo-mark i:nth-child(3) { background: var(--chev-3); }
.logo-text { font-weight: 800; letter-spacing: .01em; font-size: 20px; }

/* ---------- Knoppen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 22px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; text-decoration: none; cursor: pointer; background: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); }
.btn-secondary { background: var(--surface); color: var(--brand); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-text { color: var(--accent); padding-left: 12px; padding-right: 12px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--accent); cursor: pointer; }
.icon-btn:hover { background: #e8f0f8; }

/* ---------- Meldingen ---------- */
.flash { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; font-size: 14px; border-left: 4px solid; }
.flash ul { margin: 0; padding-left: 18px; }
.flash-ok { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-dot); }
.flash-info { background: #e6eff8; color: var(--brand-ink); border-color: var(--accent); }
.flash-fout { background: #fbe9e7; color: var(--danger); border-color: var(--danger); }
.flash a { color: inherit; }
.flashes { padding: 12px 16px 0; }

/* ---------- Formulieren ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 4px; margin: 0 0 14px; }
.field > span { font-size: 12.5px; color: var(--ink-soft); }
.field input, .field textarea { width: 100%; border: 0; border-bottom: 1.5px solid var(--line); background: transparent; padding: 8px 2px; font-size: 16px; border-radius: 0; }
.field textarea { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field input:disabled, .field textarea:disabled { color: var(--ink-soft); background: #f6f8fa; }
.field.is-readonly { margin: 4px 4px 14px; }
.field.is-readonly output { font-size: 17px; padding: 4px 2px; border-bottom: 1.5px solid var(--line); }
.field-error { color: var(--danger); font-size: 13px; }
.field.indent { margin-left: 32px; }
.grow { flex: 1; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: 12.5px; color: var(--ink-soft); padding: 0; margin-bottom: 8px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; cursor: pointer; }
.radio input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
fieldset:disabled { opacity: .5; }

/* Pil-schakelaar (checkbox) */
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 14px; background: #cdd6de; position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.switch::before { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::before { transform: translateX(18px); }
.switch:disabled { opacity: .45; cursor: not-allowed; }

/* Wachtwoordsterkte */
.strength { margin: -6px 0 6px; }
.strength-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.strength-bar i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }
.strength-text { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.strength[data-score="1"] .strength-bar i { width: 25%; background: var(--danger); }
.strength[data-score="2"] .strength-bar i { width: 50%; background: var(--warn-dot); }
.strength[data-score="3"] .strength-bar i { width: 75%; background: var(--chev-2); }
.strength[data-score="4"] .strength-bar i { width: 100%; background: var(--ok-dot); }

/* ---------- Inlogschermen ---------- */
body.auth { min-height: 100vh; background: linear-gradient(180deg, var(--brand-ink) 0, var(--brand) 220px, var(--bg) 220px); }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 40px 16px 24px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; margin: 8px 0 28px; }
.auth-brand .logo-mark i:nth-child(1) { background: #5ea6e6; }
.auth-brand .logo-mark i:nth-child(2) { background: #8cc2f0; }
.auth-brand .logo-mark i:nth-child(3) { background: #c4e0f8; }
.auth-brand .logo-text { font-size: 26px; }
.auth-card { background: var(--surface); border-radius: 18px; padding: 28px 24px; box-shadow: 0 10px 30px rgba(8, 51, 87, .15); }
.auth-card h1 { margin: 0 0 16px; font-size: 22px; color: var(--brand-ink); }
.auth-card .field input { border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.auth-card .field input:focus { border-color: var(--accent); }
.auth-link { text-align: center; margin: 18px 0 0; }
.auth-foot { text-align: center; color: var(--ink-soft); font-size: 13px; margin-top: 20px; }

/* ---------- App-shell ---------- */
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(86vw, 340px); background: var(--surface); border-radius: 0 22px 22px 0; display: flex; flex-direction: column; overflow-y: auto; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 4px 0 30px rgba(8, 51, 87, .25); }
.sidebar:target { transform: none; }
.scrim { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(8, 51, 87, .55); }
.sidebar:target ~ .scrim { display: block; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 14px 8px 20px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); text-decoration: none; }
.drawer-close { display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink-soft); border-radius: 10px; }
.me { padding: 10px 20px 16px; border-bottom: 1px dashed var(--line); margin: 0 0 8px; }
.me-name { font-size: 18px; font-weight: 600; }
.badge-role { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: #e3edf7; color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.side-item { display: flex; align-items: center; gap: 12px; margin: 4px 10px; padding: 10px 12px; border-radius: 999px; background: #f2f4f6; color: var(--ink-soft); }
.side-item > span:nth-child(2) { flex: 1; white-space: nowrap; }
.side-plus { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid #c3ccd4; }
.side-title { padding: 14px 20px 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.side-error, .side-empty { padding: 8px 20px; color: var(--ink-soft); font-size: 14px; list-style: none; }
.inst-list { list-style: none; margin: 0; padding: 0 8px; flex: 1; }
.inst { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.inst:hover { background: #f2f5f8; }
.inst.is-active { background: #e6eff8; }
.avatar { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4e9be0 0, var(--chev-2) 45%, var(--brand) 100%); display: grid; place-items: center; }
.avatar-letter { color: #fff; font-weight: 700; font-size: 16px; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; border: 2px solid #fff; }
/* Installation list: calm line icon of the main output instead of a coloured initial. */
.avatar.avatar-icon { width: 40px; height: 40px; border-radius: 12px; background: #e8f0f8; color: var(--brand); }
.inst.is-active .avatar-icon { background: #fff; }
.avatar-icon .icon { width: 24px; height: 24px; }
.inst-text { display: grid; min-width: 0; }
.inst-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inst-status { font-size: 12px; color: var(--ink-soft); }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; }
.dot-on { background: var(--ok-dot); }
.dot-off { background: var(--off-dot); }
.sidebar-foot { border-top: 1px dashed var(--line); padding: 8px 10px 16px; position: sticky; bottom: 0; background: var(--surface); }
.side-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; background: none; color: var(--ink); text-decoration: none; border-radius: 10px; cursor: pointer; text-align: left; font-size: 15px; }
.side-link:hover { background: #f2f5f8; }
.logout { margin: 0; }

/* Mobiel: één kolom tegelijk */
.col-menu, .col-detail { min-height: 100vh; }
.mode-start .col-menu, .mode-detail .col-menu { display: none; }
.mode-menu .col-detail { display: none; }

/* ---------- Schermkop en lijsten ---------- */
.screen-head { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; min-height: 56px; padding: 4px 6px; background: var(--bg); }
.screen-head h1 { margin: 0; font-size: 16px; font-weight: 600; text-align: center; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--ink-soft); text-decoration: none; }
a.head-btn:hover { background: rgba(11, 67, 113, .08); }
.screen-body { padding: 8px 12px 28px; }
.screen-body.narrow { max-width: 620px; margin: 0 auto; }
.card { background: var(--surface); border-radius: var(--radius); margin: 0 0 16px; box-shadow: 0 1px 2px rgba(22, 33, 43, .04); }
.card.pad { padding: 16px; }
.card-title { margin: 0 0 8px; font-size: 18px; color: var(--brand-ink); }
.list { list-style: none; padding: 0; overflow: hidden; }
.list > li + li { border-top: 1px solid #edf0f3; }
.row { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 10px 16px; color: var(--ink); text-decoration: none; }
a.row:hover { background: #f5f8fb; }
.row.is-active { background: #e6eff8; box-shadow: inset 3px 0 0 var(--accent); }
.row-label { flex: 1; min-width: 0; }
.row-label.is-empty { color: var(--ink-soft); font-style: italic; }
.row-text { flex: 1; display: grid; min-width: 0; }
.row-text .row-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-note { font-size: 12px; color: var(--ink-soft); }
.row-time { font-size: 12.5px; color: var(--ink-soft); }
.row-icon { position: relative; display: inline-flex; align-items: center; gap: 2px; color: var(--accent); }
.row-icon .icon { width: 28px; height: 28px; }
.num { font-size: 12px; font-weight: 700; color: var(--accent); align-self: flex-end; }
.slot { flex: none; min-width: 34px; font-weight: 700; color: var(--accent); font-size: 14px; }
.chev { color: #8a99a6; width: 18px; height: 18px; }
.is-soon { color: #9aa7b2; cursor: default; }
.is-soon .row-label { color: #9aa7b2; }
.soon { flex: none; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--off-bg); color: var(--off-ink); }
.group-title { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin: 18px 6px 8px; }
.group-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 4px; flex: 1; max-width: 340px; margin: 10px 0 8px; background: var(--surface); border-radius: 999px; padding: 0 4px 0 14px; border: 1.5px solid var(--line); }
.search input { flex: 1; border: 0; background: none; padding: 8px 0; min-width: 0; font-size: 15px; }
.search input:focus { outline: none; }
.hint { color: var(--ink-soft); font-size: 13.5px; margin: 4px 6px 16px; }
.empty { color: var(--ink-soft); text-align: center; padding: 28px 12px; }
.sub { color: var(--ink-soft); font-size: 13px; margin: 0 6px 8px; }
.counter-pill { display: block; width: max-content; margin: 8px 0 0 auto; padding: 4px 14px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; }
.kv { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid #edf0f3; }
.kv:last-child { border-bottom: 0; }
.kv-label { font-size: 12.5px; color: var(--ink-soft); }
.kv-value { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 16px; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.status-ok { background: var(--ok-bg); color: var(--ok-ink); }
.status-warn { background: var(--warn-bg); color: var(--warn-ink); }
.status-off { background: var(--off-bg); color: var(--off-ink); }
.ev-row .ev-icon { color: var(--ink-soft); }
.ev-icon.is-warn { color: var(--warn-dot); }
.toggle-row { display: flex; align-items: center; gap: 12px; width: 100%; cursor: pointer; }
.toggles .row { padding-top: 6px; padding-bottom: 6px; }

/* Uitgang bewerken: naam + icoon */
.name-icon { display: flex; align-items: flex-end; gap: 16px; }
.icon-preview { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #eef3f8; color: var(--accent); margin-bottom: 14px; flex: none; }
.icon-preview .icon { width: 34px; height: 34px; }
.icon-choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.icon-choice legend { grid-column: 1 / -1; }
.icon-opt { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; font-size: 12.5px; color: var(--ink-soft); }
.icon-opt input { position: absolute; opacity: 0; }
.icon-opt-face { color: var(--accent); }
.icon-opt-face .icon { width: 30px; height: 30px; }
.icon-opt:has(input:checked) { border-color: var(--accent); background: #e9f1f9; color: var(--brand-ink); font-weight: 600; }
.icon-opt:has(input:focus-visible) { outline: 3px solid var(--chev-3); outline-offset: 2px; }

/* Vaste actiebalk onderaan bewerkschermen */
.has-actionbar { padding-bottom: 96px; }
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.actionbar .btn-primary { min-width: 140px; }

/* ---------- Startscherm (verticale gradient in merkblauw) ---------- */
.mode-start .col-detail, .mode-menu .col-detail { background: linear-gradient(180deg, var(--home-top) 0, var(--home-mid) 42%, var(--home-end) 100%); color: #fff; }
.mode-start .flashes .flash, .mode-menu .flashes .flash { box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.home { padding: 8px 18px 36px; min-height: 100%; }
.home-bar { display: flex; justify-content: space-between; }
.head-btn.on-dark { color: #fff; }
a.head-btn.on-dark:hover { background: rgba(255,255,255,.12); }
.home-bar .icon { width: 28px; height: 28px; }
.home-name { margin: 18px 0 4px; text-align: center; font-size: 30px; font-weight: 600; letter-spacing: .01em; overflow-wrap: anywhere; }
.home-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 6px; font-size: 15px; }
.home-status .dot { border: 2px solid rgba(255,255,255,.7); }
.signal { width: 20px; height: 20px; stroke-width: 2.4; }
.home-pill { width: max-content; max-width: 100%; margin: 6px auto 0; padding: 3px 12px; border-radius: 999px; background: rgba(253, 240, 219, .95); color: var(--warn-ink); font-size: 12.5px; font-weight: 600; text-align: center; }
.home-events { margin: 22px 0 8px; }
.home-events ul { list-style: none; margin: 0; padding: 0; }
.ev { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.22); }
.ev .ev-icon { width: 26px; height: 26px; }
.ev-text { flex: 1; font-size: 14.5px; }
.ev-time { text-align: right; font-size: 13px; line-height: 1.3; opacity: .92; white-space: nowrap; }
.home-empty { text-align: center; opacity: .9; margin: 14px 0; }
.more-link { display: block; width: max-content; margin: 12px auto 18px; color: #fff; letter-spacing: .14em; font-size: 14px; text-underline-offset: 4px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 14px; max-width: 520px; }
.tile { display: grid; gap: 8px; justify-items: center; color: #fff; text-decoration: none; }
.tile-face { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; border-radius: 24px; background: rgba(246, 249, 252, .95); color: var(--accent); box-shadow: 0 6px 18px rgba(8, 51, 87, .25); transition: transform .1s; }
.tile:hover .tile-face { transform: translateY(-2px); }
.tile:active .tile-face { transform: scale(.97); }
.tile-icon { width: 44px; height: 44px; stroke-width: 1.5; }
.tile-label { font-weight: 700; font-size: 14px; text-align: center; overflow-wrap: anywhere; }

/* Bevestigingsvenster (bottom sheet op mobiel) */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 51, 87, .6); }
.sheet { position: relative; width: 100%; max-width: 480px; background: var(--surface); color: var(--ink); border-radius: 22px 22px 0 0; padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); text-align: center; box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
.sheet h2 { margin: 6px 0 6px; font-size: 20px; color: var(--brand-ink); }
.sheet-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #eef3f8; color: var(--accent); }
.sheet-icon .icon { width: 36px; height: 36px; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.sheet-actions .btn { flex: 1 1 140px; }

/* ---------- Desktop: drie kolommen vanaf 1150px ---------- */
@media (min-width: 1150px) {
  .shell { display: grid; grid-template-columns: 300px 380px minmax(0, 1fr); height: 100vh; }
  .no-menu .shell { grid-template-columns: 300px minmax(0, 1fr); }
  .sidebar { position: static; transform: none; width: auto; border-radius: 0; box-shadow: none; border-right: 1px solid var(--line); z-index: auto; }
  .scrim, .drawer-close, .hamburger, .home-bar .more { display: none !important; }
  .col-menu .back { visibility: hidden; }
  .home-bar { min-height: 44px; }
  .col-menu, .col-detail { min-height: 0; height: 100vh; overflow-y: auto; position: relative; }
  .col-menu { display: block !important; border-right: 1px solid var(--line); }
  .mode-menu .col-detail { display: block; }
  .col-detail { display: block; }
  .screen-body { padding: 8px 20px 32px; }
  .mode-detail .col-detail > .screen-head, .mode-detail .col-detail form > .screen-head, .mode-plain .col-detail > .screen-head { background: var(--bg); }
  .mode-detail .screen-body, .mode-plain .screen-body { max-width: 720px; }
  .actionbar { position: sticky; left: auto; right: auto; }
  .has-actionbar { padding-bottom: 24px; }
  .home { max-width: 760px; margin: 0 auto; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 640px; margin: 0 auto; }
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 22px; }
}

/* Wijzigingen (concepten naar de unit) */
.change-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.change-list { list-style: none; margin: 8px 0 0; padding: 0; }
.change-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.change-label { color: var(--ink-soft); }
.change-values { text-align: right; overflow-wrap: anywhere; }
.change-before { color: var(--ink-soft); text-decoration: line-through; }
.change-actions { margin-top: 12px; display: flex; gap: 8px; }
.btn.is-disabled { opacity: .5; pointer-events: none; }
.sheet .change-list { text-align: left; margin: 8px 0 12px; }

/* ---------- Achtergronden startscherm (keuze per installatie; 0 = huisstijl) ---------- */
.bg-0 { --home-top: #083357; --home-mid: #1467ab; --home-end: #6fa9db; }
.bg-1 { --home-top: #0b6e8a; --home-mid: #1ba6c4; --home-end: #8fdbc9; }
.bg-2 { --home-top: #000851; --home-mid: #134a8e; --home-end: #1cb5e0; }
.bg-3 { --home-top: #3f5efb; --home-mid: #8e54c9; --home-end: #fc466b; }
.bg-4 { --home-top: #4b134f; --home-mid: #7c2a52; --home-end: #c94b4b; }
.bg-5 { --home-top: #8c0a24; --home-mid: #b2412d; --home-end: #d9a77a; }
.bg-6 { --home-top: #0f0c29; --home-mid: #302b63; --home-end: #24243e; }
.bg-7 { --home-top: #00785f; --home-mid: #2f9d5a; --home-end: #96c93d; }
.bg-8 { --home-top: #c2410c; --home-mid: #e8621c; --home-end: #f7b733; }
.bg-9 { --home-top: #4f6aa8; --home-mid: #7b93cf; --home-end: #74ebd5; }
.avatar[class*="bg-"] { background: radial-gradient(circle at 35% 30%, var(--home-end) 0, var(--home-mid) 45%, var(--home-top) 100%); }
.bg-choice { border: 0; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.bg-choice legend { font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; padding: 0; }
.bg-opt { position: relative; cursor: pointer; }
.bg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bg-swatch { display: block; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(180deg, var(--home-top), var(--home-mid) 50%, var(--home-end)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.bg-opt input:checked + .bg-swatch { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.bg-opt input:focus-visible + .bg-swatch { outline: 3px solid var(--chev-3); outline-offset: 4px; }
fieldset[disabled] .bg-opt { cursor: default; opacity: .8; }
.home-actions { display: flex; gap: 4px; }
.stack { display: grid; gap: 10px; margin: 0 0 12px; }
.btn-small { min-height: 36px; padding: 6px 18px; font-size: 14px; }

/* ---------- Bovenbalk (browserversie, vanaf 1150px) ---------- */
.topbar { display: none; }
@media (min-width: 1150px) {
  body.app { display: flex; flex-direction: column; height: 100vh; }
  .topbar { display: flex; align-items: center; gap: 28px; height: 68px; flex: none; padding: 0 24px; background: var(--surface); box-shadow: 0 1px 0 var(--line), 0 2px 12px rgba(8, 51, 87, .06); position: relative; z-index: 10; }
  .topbar .brand { margin-right: 8px; }
  .topnav { display: flex; align-items: stretch; gap: 6px; height: 100%; }
  .topnav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 92px; padding: 0 10px; color: var(--brand); text-decoration: none; font-size: 12.5px; font-weight: 600; border-bottom: 3px solid transparent; }
  .topnav-item .icon { width: 26px; height: 26px; padding: 3px; border: 1.6px solid currentColor; border-radius: 50%; }
  .topnav-item:hover { background: #f2f6fa; }
  .topnav-item.is-active { border-bottom-color: var(--accent); }
  .topnav-item.is-soon { color: #9fb0bf; cursor: default; }
  .topnav-item.is-soon:hover { background: none; }
  .topuser { margin-left: auto; display: flex; align-items: center; gap: 14px; }
  .topuser-text { display: grid; justify-items: end; font-size: 15px; line-height: 1.2; }
  .topuser-text .hello { color: var(--accent); }
  .topuser-text .badge-role { margin-top: 3px; }
  .topuser-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1.6px solid var(--brand); color: var(--brand); }
  .topuser-icon:hover { background: #f2f6fa; }
  .shell { flex: 1; height: auto; min-height: 0; }
  .col-menu, .col-detail { height: 100%; }
  .sidebar .sidebar-head, .sidebar .me, .sidebar .side-item, .sidebar .sidebar-foot { display: none; }
  .sidebar .side-title { padding-top: 18px; }
}

/* Zwevende knop (gebruiker toevoegen) en gevaarlijke tekstknop */
.fab { position: fixed; right: 20px; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 15; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(8, 51, 87, .3); }
.fab:hover { background: var(--brand-ink); }
.fab .icon { width: 28px; height: 28px; }
.btn-danger { color: var(--danger); }
@media (min-width: 1150px) { .fab { position: sticky; float: right; bottom: 24px; margin: 8px 0 0 12px; } }
.danger-form { padding: 0 12px 110px; }
@media (min-width: 1150px) { .danger-form { padding: 0 20px 24px; max-width: 720px; } }
.field select { width: 100%; border: 0; border-bottom: 1.5px solid var(--line); background: transparent url("/select-chevron.svg") no-repeat right 4px center / 18px; padding: 8px 28px 8px 2px; font-size: 16px; border-radius: 0; appearance: none; -webkit-appearance: none; }
.field select:focus { outline: none; border-color: var(--accent); }
.field select:disabled { color: var(--ink-soft); }

/* Tijdschema's */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.days { border: 0; padding: 0; margin: 4px 0 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.days legend { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 6px; padding: 0; }
.day { position: relative; cursor: pointer; }
.day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.day span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; color: var(--ink-soft); }
.day input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.day input:focus-visible + span { outline: 3px solid var(--chev-3); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 14px; }
details.more summary { cursor: pointer; color: var(--accent); font-size: 14px; margin: 6px 0; }
.right { text-align: right; margin: 8px 0 0; }
.field input[type=time], .field input[type=date] { font-variant-numeric: tabular-nums; }

/* Meldingen */
.push-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.plain-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
