/* Flexela Digitale Fysio — gedeelde stijl voor alle drie de omgevingen */
:root {
  --brand: #0a6cff;
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, white);
  --ink: #14171f;
  --ink-2: #4a5160;
  --ink-3: #7b8394;
  --line: #e4e7ee;
  --line-2: #eef0f5;
  --bg: #f5f6fa;
  --card: #ffffff;
  --ok: #12a150;
  --ok-soft: #e6f6ed;
  --warn: #c77700;
  --warn-soft: #fff4e0;
  --bad: #d92d20;
  --bad-soft: #fdecea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 23, 31, .04), 0 4px 16px rgba(20, 23, 31, .06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
a { color: var(--brand); }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }

/* ---------- knoppen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; text-decoration: none; }
.btn:hover { background: var(--line-2); }
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 1px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, black); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: #f5c2bd; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.block { width: 100%; height: 44px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { width: 32px; height: 32px; padding: 0; border-radius: 8px; }

/* ---------- formulieren ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.input[readonly] { background: var(--line-2); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
.span-2 { grid-column: span 2; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13.5px; color: var(--ink-2); }
.check input { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.form-section { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 22px 0 10px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.form-section:first-child, .error-box + .form-section { margin-top: 0; padding-top: 0; border-top: 0; }
.error-box:not(.hidden) { margin-bottom: 14px; }
.error-box { background: var(--bad-soft); color: var(--bad); border-radius: 9px; padding: 10px 12px; font-size: 13px; }

/* ---------- kaarten, tabellen, badges ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { padding: 16px 18px; }
.kpi .label { font-weight: 550; color: var(--ink-3); }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfd; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #fafbfd; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.plain::before { display: none; }
.badge.brand { background: var(--brand-soft); color: var(--brand); }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; flex-shrink: 0; }
.logo-box { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; font-weight: 700; color: #fff; }
.logo-box img { max-width: 90%; max-height: 90%; object-fit: contain; }
.meter { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-top: 6px; }
.meter > span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.meter.warn > span { background: var(--warn); }
.meter.bad > span { background: var(--bad); }

/* ---------- app-layout ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; }
.sidebar .brand { padding: 20px 20px 16px; border-bottom: 1px solid var(--line-2); }
.sidebar .brand img { max-width: 170px; max-height: 56px; display: block; }
.nav { padding: 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav .nav-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 550; cursor: pointer; }
.nav a:hover { background: var(--line-2); color: var(--ink); }
.nav a.active { background: var(--brand-soft); color: var(--brand); }
.nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar .me { padding: 14px 16px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; align-items: center; }
.sidebar .me .who { flex: 1; min-width: 0; }
.sidebar .me .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .me .who span { font-size: 12px; color: var(--ink-3); }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 22px 32px 0; }
.page { padding: 22px 32px 48px; max-width: 1240px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-3); margin-top: 4px; }
.menu-toggle, .topbar-brand, .nav-scrim { display: none; }
.topbar-brand img { max-height: 32px; max-width: 150px; display: block; }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 18, 26, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; animation: fade .15s ease; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); animation: pop .18s ease; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal-body { padding: 22px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line-2); background: #fafbfd; border-radius: 0 0 16px 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 500; animation: pop .2s ease; max-width: 360px; }
.toast.bad { background: var(--bad); }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-knop { margin-left: auto; background: rgba(255, 255, 255, .16); color: #fff; border: 0; border-radius: 7px; padding: 5px 10px; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.toast-knop:hover { background: rgba(255, 255, 255, .28); }

.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; letter-spacing: .06em; background: var(--line-2); border-radius: 10px; padding: 14px; text-align: center; user-select: all; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; font: inherit; font-weight: 600; color: var(--ink-3); padding: 10px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 264px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .menu-toggle { display: inline-flex; }
  .topbar { position: sticky; top: 0; z-index: 30; padding: 10px 16px; background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .topbar-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
  .nav-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(15, 18, 26, .35); }
  .sidebar.open ~ .nav-scrim { display: block; }
  .page { padding: 18px 16px 40px; }
  /* iOS zoomt in op invoervelden kleiner dan 16px */
  .input, select.input, textarea.input { font-size: 16px; }
}
@media (max-width: 640px) {
  h1 { font-size: 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .page-head { margin-bottom: 16px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .value { font-size: 22px; }
  .card-pad { padding: 16px; }
  .card-head { padding: 14px 16px; }
  .table th, .table td { padding: 10px 12px; }
  .table .m-verberg { display: none; }
  .modal-bg { padding: 12px 10px; }
  .modal-head { padding: 14px 16px; }
  .modal-body { padding: 16px; }
  .modal-foot { padding: 12px 16px; }
  .modal-foot .btn { flex: 1 1 auto; }
  .toasts { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
  .ex { flex-wrap: wrap; padding: 14px 16px; }
  .ex .ex-acties { width: 100%; padding-left: 44px; }
}

/* ---------- inlogscherm praktijk & patiënt ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px;
  background: linear-gradient(rgba(245, 246, 250, .35), rgba(245, 246, 250, .55)), url("assets/achtergrond.jpg") center / cover fixed, var(--bg); }
.login-card { background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.login-card { width: 100%; max-width: 420px; padding: 32px 30px 26px; }
.login-logo { height: 110px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.login-logo img { max-width: 280px; max-height: 100px; object-fit: contain; animation: pop .35s ease; }
.login-logo .placeholder { width: 64px; height: 64px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.login-logo .mono { width: 72px; height: 72px; border-radius: 18px; background: var(--brand); color: var(--brand-ink); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; animation: pop .35s ease; }
.login h1 { text-align: center; font-size: 20px; }
.login .sub { text-align: center; color: var(--ink-3); margin: 4px 0 22px; min-height: 21px; }
.praktijk-field { position: relative; }
.praktijk-field .status { position: absolute; right: 11px; top: 35px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.praktijk-field .status.ok { background: var(--ok); color: #fff; }
.login-foot { text-align: center; margin-top: 22px; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; justify-content: center; gap: 6px; }
.login-foot img { height: 14px; }
.remembered { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--line-2); border-radius: 10px; margin-bottom: 14px; }
.remembered .who { flex: 1; min-width: 0; font-size: 13px; }
.remembered .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- oefeningen ---------- */
.ex { display: flex; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.ex:last-child { border-bottom: 0; }
.ex .num { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.ex .body { flex: 1; min-width: 0; }
.ex .dose { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.ex p { color: var(--ink-2); font-size: 13.5px; white-space: pre-wrap; }
.streak { display: flex; gap: 4px; margin-top: 8px; }
.streak span { width: 16px; height: 16px; border-radius: 4px; background: var(--line-2); }
.streak span.on { background: var(--brand); }

/* ---------- 3D-lichaamskaart ---------- */
.lk { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.lk-stage { position: relative; height: min(640px, calc(100vh - 220px)); min-height: 440px; overflow: hidden;
  background: radial-gradient(70% 60% at 50% 42%, #ffffff, #eef1f6 70%, #e6eaf1); }
.lk-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.lk-canvas.sleept { cursor: grabbing; }
.lk-laden { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-3); padding: 20px; text-align: center; }
.lk-bar { position: absolute; left: 12px; right: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; pointer-events: none; }
.lk-bar > * { pointer-events: auto; }
.lk-bar-top { top: 12px; }
.lk-bar-bottom { bottom: 12px; }
.lk-hint { font-size: 12px; color: var(--ink-3); pointer-events: none; }
.lk-seg { display: inline-flex; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; backdrop-filter: blur(6px); }
.lk-seg button, .lk-knop { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.lk-seg button:hover, .lk-knop:hover { background: var(--line-2); }
.lk-seg button.actief, .lk-knop.actief { background: var(--brand); color: var(--brand-ink); }
.lk-knop { background: rgba(255,255,255,.9); border: 1px solid var(--line); }
.lk-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 6px; white-space: nowrap; z-index: 2; }
.lk-pop { position: absolute; z-index: 3; width: 300px; max-width: calc(100% - 20px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 30px rgba(20,23,31,.16); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.lk-pop-head { display: flex; align-items: center; gap: 10px; }
.lk-pop-head .input { height: 34px; font-weight: 600; }
.lk-veld { display: flex; flex-direction: column; gap: 6px; }
.lk-veld label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.lk-veld textarea.input { min-height: 56px; }
.lk-veld input[type=range] { width: 100%; accent-color: var(--brand); }
.lk-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.lk-chips button { border: 1px solid var(--line); background: #fff; font: inherit; font-size: 12px; padding: 3px 9px; border-radius: 999px; cursor: pointer; color: var(--ink-2); }
.lk-chips button.actief { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.lk-fout { font-size: 12.5px; color: var(--bad); background: var(--bad-soft); padding: 6px 9px; border-radius: 7px; }
.lk-nr { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.lk-items { max-height: 520px; overflow-y: auto; }
.lk-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-2); padding: 12px 16px; font: inherit; color: inherit; cursor: pointer; }
.lk-item:hover { background: var(--line-2); }
.lk-item-tekst { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lk-legenda { display: flex; gap: 14px; padding: 10px 16px; }
.lk-legenda i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.lk-lijst .empty { padding: 28px 18px; }
@media (max-width: 1100px) {
  .lk { grid-template-columns: 1fr; }
  .lk-stage { height: 520px; }
  .lk-hint { display: none; }
}
@media (max-width: 560px) {
  .lk-stage { height: 480px; min-height: 0; }
  .lk-bar { left: 8px; right: 8px; gap: 6px; }
  .lk-bar-top { top: 8px; }
  .lk-bar-bottom { bottom: 8px; }
  .lk-bar-top .spacer { display: none; }
  .lk-seg button, .lk-knop { padding: 5px 9px; }
}

/* ---------- achtergrondfoto op alle portalen ---------- */
body.met-achtergrond { background: linear-gradient(rgba(245, 246, 250, .86), rgba(245, 246, 250, .9)), url("assets/achtergrond.jpg") center / cover fixed, var(--bg); }
body.met-achtergrond .sidebar { background: rgba(255, 255, 255, .94); }
@media (max-width: 900px) { body.met-achtergrond { background-attachment: scroll; } body.met-achtergrond .sidebar { background: #fff; } }

/* ---------- kennisbank ---------- */
.kb-zoek { position: relative; }
.kb-zoek svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.kb-zoek .input { height: 46px; padding-left: 40px; font-size: 15px; }
.kb-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.kb-chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 550; color: var(--ink-2); cursor: pointer; }
.kb-chip:hover { background: var(--line-2); }
.kb-chip.actief { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.kb-chip span { opacity: .6; font-weight: 500; margin-left: 2px; }
.kb-lijst { display: flex; flex-direction: column; }
.kb-item { border-bottom: 1px solid var(--line-2); }
.kb-item:last-child { border-bottom: 0; }
.kb-item summary { list-style: none; display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; cursor: pointer; }
.kb-item summary::-webkit-details-marker { display: none; }
.kb-item summary:hover { background: #fafbfd; }
.kb-icoon { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.kb-item.advies .kb-icoon { background: var(--warn-soft); color: var(--warn); font-family: Georgia, serif; font-size: 16px; font-style: italic; }
.kb-kop { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kb-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.kb-sam { color: var(--ink-3); font-size: 13px; }
.kb-acties { display: flex; gap: 6px; align-items: center; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.kb-body { padding: 0 18px 16px 60px; display: flex; flex-direction: column; gap: 10px; }
.kb-body p { color: var(--ink-2); white-space: pre-wrap; }
.kb-letop { background: var(--warn-soft); color: #7a4a00; border-radius: 9px; padding: 9px 12px; font-size: 13px; }
.kb-klachten { display: flex; gap: 6px; flex-wrap: wrap; }
.kb-klachten span { font-size: 12px; color: var(--ink-3); background: var(--line-2); border-radius: 6px; padding: 2px 8px; }
.kb-item.verborgen summary { opacity: .5; }
.kb-disclaimer { font-size: 12.5px; color: var(--ink-3); padding: 12px 18px; border-top: 1px solid var(--line-2); background: #fafbfd; border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 560px) { .kb-body { padding-left: 18px; } .kb-item summary { flex-wrap: wrap; } .kb-acties { width: 100%; justify-content: flex-start; padding-left: 42px; } }

/* ---------- video's ---------- */
.vk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; padding: 16px; }
.vk { display: flex; flex-direction: column; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; padding: 0; font: inherit; color: inherit; cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; }
.vk:hover { box-shadow: 0 8px 24px rgba(20, 30, 60, .1); transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.vk-beeld { position: relative; aspect-ratio: 16 / 9; background: #1a1d26 center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: #fff; }
.vk-beeld .vk-play { width: 42px; height: 42px; border-radius: 50%; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.vk-beeld .vk-play svg { margin-left: 3px; }
.vk-duur { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.vk-tekst { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vk-tekst b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vk-speler { width: 100%; max-height: 62vh; background: #000; border-radius: 10px; display: block; }
.vk-rij { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.vk-rij:last-child { border-bottom: 0; }
.vk-mini { width: 96px; flex-shrink: 0; aspect-ratio: 16 / 9; border-radius: 8px; background: #1a1d26 center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: #fff; border: 0; padding: 0; cursor: pointer; }
.vk-voortgang { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.vk-voortgang > span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.vk-drop { border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-2); }
.vk-drop:hover, .vk-drop.over { border-color: var(--brand); background: var(--brand-soft); }
@media (max-width: 640px) {
  .vk-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
  .vk-tekst { padding: 8px 10px 10px; }
  .vk-mini { width: 76px; }
}

/* ---------- agenda & planning ---------- */
.page.breed { max-width: none; }
.ag { display: flex; flex-direction: column; gap: 14px; }
.ag-balk { display: flex; flex-direction: column; gap: 10px; }
.ag-balk-rij { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ag-balk-sub { gap: 10px; }
.ag-nav { display: flex; align-items: center; gap: 6px; }
.ag-titel { display: flex; flex-direction: column; min-width: 0; }
.ag-titel h1 { font-size: 21px; }
.ag-titel .muted { font-size: 13px; }
.ag-datumkies { position: relative; overflow: hidden; }
.ag-datumkies input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ag-datumkies input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.ag-modus button { padding: 6px 14px; }
.ag-mws { display: flex; gap: 6px; flex-wrap: wrap; }
.ag-mw { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 4px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; transition: all .15s; }
.ag-mw:hover { border-color: var(--k, var(--brand)); color: var(--ink); }
.ag-mw.aan { background: color-mix(in srgb, var(--k) 10%, white); border-color: color-mix(in srgb, var(--k) 45%, white); color: var(--ink); }
.ag-mw .ag-mw-dot { width: 24px; height: 24px; font-size: 10px; opacity: .45; }
.ag-mw.aan .ag-mw-dot { opacity: 1; }
.ag-mw-alle { padding: 0 12px; color: var(--ink-2); }
.ag-mw-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--k, var(--brand)); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ag-sam { font-size: 13px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; }
.ag-body { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 14px; align-items: start; }
.ag-laden { padding: 60px; text-align: center; color: var(--ink-3); }

/* zijbalk */
.ag-zij { position: sticky; top: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: hidden; }
.ag-zij-kop { padding: 14px 14px 10px; border-bottom: 1px solid var(--line-2); }
.ag-zoek { position: relative; margin-top: 10px; }
.ag-zoek svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.ag-zoek .input { height: 36px; padding-left: 34px; }
.ag-lijstkeuze { display: flex; margin-top: 10px; width: 100%; }
.ag-lijstkeuze button { flex: 1; white-space: nowrap; padding: 5px 8px; }
.ag-lijstkeuze span { opacity: .65; font-weight: 500; margin-left: 3px; }
.ag-lijst { overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 120px; }
.ag-pat { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: grab; user-select: none; -webkit-user-select: none; border: 1px solid transparent; transition: background .12s, border-color .12s; }
.ag-pat:hover { background: var(--line-2); }
.ag-pat:hover .ag-greep-icoon { opacity: 1; }
.ag-pat.vast { cursor: default; }
.ag-pat.gekozen { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 40%, white); }
.ag-pat.bron { opacity: .35; }
.ag-pat .ag-mw-dot { width: 32px; height: 32px; }
.ag-pat-tekst { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.ag-pat-tekst b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-pat-tekst span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-pat-blok { margin-bottom: 4px; border-bottom: 1px dashed var(--line); border-radius: 10px 10px 0 0; }
.ag-greep-icoon { color: var(--ink-3); opacity: .35; flex-shrink: 0; }
.ag-warn { color: var(--warn); font-weight: 550; }
.ag-slim { margin: 10px 10px 4px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, var(--brand-soft), #fff); border: 1px solid color-mix(in srgb, var(--brand) 30%, white); }
.ag-slim-icoon { width: 24px; height: 24px; border-radius: 7px; background: var(--brand); color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* hoofdvlak */
.ag-hoofd { overflow: hidden; min-width: 0; }
.ag-melding { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: var(--warn-soft); color: #7a4a00; font-size: 13px; border-bottom: 1px solid #f3d39a; }
.ag-melding span { flex: 1 1 240px; }
.ag-scroll { overflow: auto; max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); min-height: 440px; position: relative; overscroll-behavior: contain; }
.ag-tabel { display: grid; position: relative; user-select: none; -webkit-user-select: none; min-width: min-content; }
.ag-hoek { position: sticky; top: 0; left: 0; z-index: 6; background: #fff; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line-2); }
.ag-dagkop { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line-2); padding: 8px 8px 7px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ag-dagkop[data-naardag] { cursor: pointer; }
.ag-dagkop[data-naardag]:hover { background: #fafbfd; }
.ag-dagkop-t { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.ag-dagnaam { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.ag-dagnr { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.ag-dagstat { margin-left: auto; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-dagkop.vandaag .ag-dagnr { background: var(--brand); color: var(--brand-ink); border-radius: 8px; padding: 0 7px; }
.ag-dagkop.vandaag .ag-dagnaam { color: var(--brand); }
.ag-dagkop.verleden { color: var(--ink-3); }
.ag-cap { height: 5px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.ag-cap span { display: block; height: 100%; border-radius: inherit; background: color-mix(in srgb, var(--brand) 55%, white); transition: width .3s; }
.ag-cap.hoog span { background: var(--brand); }
.ag-cap.vol span { background: var(--ok); }
.ag-cap.leeg { background: repeating-linear-gradient(90deg, var(--line-2) 0 4px, transparent 4px 8px); }
.ag-banenkop { display: flex; }
.ag-banenkop span { flex: 1; text-align: center; font-size: 10.5px; font-weight: 700; color: var(--k); }
.ag-banenkop span.afw { text-decoration: line-through; opacity: .5; }
.ag-uren { position: sticky; left: 0; z-index: 4; background: #fff; border-right: 1px solid var(--line-2); }
.ag-uren span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; background: #fff; padding: 0 2px; }
.ag-uren span:first-child { transform: none; }
.ag-baan { position: relative; border-left: 1px solid var(--line-2); cursor: cell;
  background: repeating-linear-gradient(135deg, #f4f5f8 0 6px, #eceef3 6px 7px); }
.ag-baan.dagrand { border-left: 1px solid var(--line); }
.ag-baan.afwezig { background: repeating-linear-gradient(135deg, #fbf1f0 0 6px, #f5e4e2 6px 7px); }
.ag-werk { position: absolute; left: 0; right: 0; background: #fff; }
.ag-baan.verleden .ag-werk { background: #fcfcfd; }
.ag-baan.vandaag .ag-werk { background: color-mix(in srgb, var(--brand) 3%, white); }
.ag-lijnen { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(var(--line-2) 1px, transparent 1px);
  background-size: 100% var(--uur), 100% calc(var(--uur) / 2); }
.ag-afwezig-label { position: absolute; top: 10px; left: 6px; right: 6px; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--bad); background: rgba(255, 255, 255, .8); border-radius: 6px; padding: 2px 4px; }
.ag-nu { position: absolute; left: -1px; right: 0; height: 2px; background: #e5484d; z-index: 3; pointer-events: none; }
.ag-nu::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; }

/* afspraakblokken */
.ag-afs { position: absolute; z-index: 2; border-radius: 8px; padding: 4px 7px 4px 9px; overflow: hidden; cursor: grab; font-size: 12px; line-height: 1.3;
  background: color-mix(in srgb, var(--k) 13%, white); border: 1px solid color-mix(in srgb, var(--k) 28%, white); color: color-mix(in srgb, var(--k) 55%, #14171f);
  box-shadow: 0 1px 2px rgba(20, 23, 31, .06); transition: box-shadow .15s, transform .12s, opacity .15s; display: flex; flex-direction: column; }
.ag-afs::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3.5px; background: var(--k); }
.ag-afs:hover { box-shadow: 0 6px 18px rgba(20, 23, 31, .14); z-index: 3; }
.ag-afs.kort { flex-direction: row; align-items: center; padding-top: 1px; padding-bottom: 1px; }
.ag-afs-t { font-size: 11px; font-weight: 600; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ag-afs-t b { font-size: 12px; color: color-mix(in srgb, var(--k) 40%, #14171f); }
.ag-afs-n { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: color-mix(in srgb, var(--k) 35%, #14171f); }
.ag-afs-s { font-size: 11px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-afs i { font-style: normal; display: inline-flex; vertical-align: -1px; }
.ag-afs .ag-ok { color: var(--ok); }
.ag-afs .ag-nv { color: #fff; background: var(--bad); border-radius: 50%; width: 13px; height: 13px; font-size: 10px; font-weight: 800; align-items: center; justify-content: center; }
.ag-afs.blok { --k: #64748b; background: repeating-linear-gradient(135deg, #eef0f4 0 6px, #e5e8ee 6px 12px); }
.ag-afs.st-aanwezig { background: color-mix(in srgb, var(--k) 7%, white); }
.ag-afs.st-niet_verschenen { background: var(--bad-soft); border-color: #f5c2bd; }
.ag-afs.st-niet_verschenen::before { background: var(--bad); }
.ag-afs.st-geannuleerd { opacity: .5; background: #fff; border-style: dashed; z-index: 1; }
.ag-afs.st-geannuleerd .ag-afs-n, .ag-afs.st-geannuleerd .ag-afs-t b { text-decoration: line-through; }
.ag-afs.buiten { box-shadow: 0 0 0 2px #f3c76b inset; }
.ag-afs.tmp { opacity: .65; animation: ag-puls 1s ease infinite alternate; }
.ag-afs.bron { opacity: .3; }
.ag-greep { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.ag-greep::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: var(--k); opacity: 0; transition: opacity .15s; }
.ag-afs:hover .ag-greep::after { opacity: .6; }
.ag-snel { position: absolute; right: 4px; top: 4px; display: none; gap: 3px; }
.ag-afs:hover .ag-snel { display: flex; }
.ag-afs.kort .ag-snel { top: 50%; transform: translateY(-50%); }
.ag-snel button { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font: inherit; font-size: 11px; font-weight: 800; padding: 0; }
.ag-snel button:first-child { color: var(--ok); }
.ag-snel button:last-child { color: var(--bad); }
.ag-snel button:hover { background: var(--line-2); }
@keyframes ag-puls { to { opacity: .9; } }

/* vrije plekken (slim plannen) en sleep-voorbeeld */
.ag-plek { position: absolute; left: 3px; right: 3px; z-index: 1; border: 1.5px dashed color-mix(in srgb, var(--brand) 55%, white); background: color-mix(in srgb, var(--brand) 6%, white); color: var(--brand); border-radius: 8px;
  font: inherit; font-size: 11.5px; font-weight: 700; display: flex; align-items: flex-start; gap: 4px; padding: 3px 6px; cursor: pointer; animation: ag-plek .35s ease both; }
.ag-plek:hover { background: var(--brand); color: var(--brand-ink); border-style: solid; }
@keyframes ag-plek { from { opacity: 0; transform: scale(.96); } }
.ag-preview { position: absolute; left: 2px; right: 3px; z-index: 7; border-radius: 8px; pointer-events: none; padding: 4px 8px; font-size: 11.5px; display: flex; flex-direction: column; overflow: hidden;
  background: color-mix(in srgb, var(--brand) 16%, white); border: 2px solid var(--brand); color: color-mix(in srgb, var(--brand) 60%, black); box-shadow: 0 8px 22px rgba(10, 108, 255, .22); }
.ag-preview b { font-variant-numeric: tabular-nums; }
.ag-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-preview.buiten { background: var(--warn-soft); border-color: var(--warn); color: #7a4a00; box-shadow: none; }
.ag-preview.conflict { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); box-shadow: none; }
.ag-zweef { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; background: #fff; font-weight: 600; font-size: 13px;
  box-shadow: 0 10px 30px rgba(20, 23, 31, .22); border: 1px solid var(--line); white-space: nowrap; }
.ag-zweef .ag-mw-dot { width: 26px; height: 26px; font-size: 10px; }
body.ag-sleept, body.ag-sleept * { cursor: grabbing !important; }

/* rooster (personeel) */
.ag-rooster { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); overflow-x: auto; max-height: calc(100vh - 170px); overflow-y: auto; }
.ag-rdag { border-left: 1px solid var(--line-2); display: flex; flex-direction: column; min-height: 420px; transition: background .12s; }
.ag-rdag:first-child { border-left: 0; }
.ag-rdag.weekend { background: #fafbfd; }
.ag-rdag.over { background: var(--brand-soft); }
.ag-rdag-kop { padding: 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: inherit; background-color: #fff; z-index: 1; }
.ag-rdag.vandaag .ag-dagnaam { color: var(--brand); }
.ag-rdag-kop .ag-dagnr { font-size: 15px; }
.ag-rdag-lijst { padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ag-dienst { border: 1px solid color-mix(in srgb, var(--k) 30%, white); background: color-mix(in srgb, var(--k) 7%, white); border-left: 4px solid var(--k); border-radius: 10px; padding: 8px 9px; cursor: grab; display: flex; flex-direction: column; gap: 4px; user-select: none; transition: box-shadow .15s; }
.ag-dienst:hover { box-shadow: 0 5px 16px rgba(20, 23, 31, .1); }
.ag-dienst.vast { cursor: default; }
.ag-dienst.bron { opacity: .35; }
.ag-dienst .ag-mw-dot { width: 24px; height: 24px; font-size: 10px; }
.ag-dienst-n { font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-dienst-t { font-size: 12px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ag-dienst.afw { border-left-color: var(--bad); background: var(--bad-soft); border-color: #f5c2bd; }
.ag-dienst.afw .ag-dienst-t { color: var(--bad); }
.ag-dienst.uitz { border-style: dashed; border-left-style: solid; }
.ag-tag { font-size: 10.5px; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 5px; padding: 1px 5px; white-space: nowrap; }
.ag-tijdlijn { position: relative; height: 5px; background: rgba(20, 23, 31, .07); border-radius: 99px; overflow: hidden; }
.ag-tijdlijn span { position: absolute; top: 0; bottom: 0; background: var(--k); border-radius: 99px; }
.ag-rdag-drop { margin-top: auto; border: 1.5px dashed var(--line); border-radius: 10px; padding: 10px; text-align: center; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; justify-content: center; gap: 4px; opacity: 0; transition: opacity .15s; }
body.ag-sleept .ag-rdag-drop, .ag-rdag:hover .ag-rdag-drop { opacity: 1; }
.ag-rdag.over .ag-rdag-drop { border-color: var(--brand); color: var(--brand); background: #fff; }

/* formulieren & afsprakenkaart */
.ag-kaart-kop { display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 14px; border-radius: 12px; background: color-mix(in srgb, var(--k) 8%, white); border: 1px solid color-mix(in srgb, var(--k) 22%, white); }
.ag-kaart-kop .avatar { background: var(--k); color: #fff; }
.ag-kaart-icoon { width: 42px; height: 42px; border-radius: 12px; background: var(--k); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ag-soort { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: color-mix(in srgb, var(--k) 70%, black); background: color-mix(in srgb, var(--k) 12%, white); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.ag-soort::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--k); }
.ag-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; margin-bottom: 16px; }
.ag-status-knop input { position: absolute; opacity: 0; pointer-events: none; }
.ag-status-knop span { display: flex; align-items: center; justify-content: center; gap: 5px; height: 36px; border-radius: 9px; border: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; transition: all .12s; }
.ag-status-knop span:hover { background: var(--line-2); }
.ag-status-knop input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.ag-status-knop.s-gepland input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.ag-status-knop.s-aanwezig input:checked + span { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.ag-status-knop.s-niet_verschenen input:checked + span { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.ag-status-knop.s-geannuleerd input:checked + span { background: var(--line-2); border-color: var(--ink-3); color: var(--ink); }
.ag-hist-stat { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
.ag-hist-stat .bad b { color: var(--bad); }
.ag-hist { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.ag-hist-rij { display: grid; grid-template-columns: 10px 110px 44px 1fr auto; gap: 10px; align-items: center; padding: 7px 12px; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.ag-hist-rij:last-child { border-bottom: 0; }
.ag-hist-rij.nu { background: var(--brand-soft); font-weight: 600; }
.ag-hist-rij.geannuleerd .ag-hist-dag, .ag-hist-rij.geannuleerd .ag-hist-soort { text-decoration: line-through; color: var(--ink-3); }
.ag-hist-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--k); }
.ag-hist-soort { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.ag-kies { position: relative; }
.ag-kies-lijst { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; margin-top: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(20, 23, 31, .14); padding: 4px; max-height: 280px; overflow-y: auto; }
.ag-kies-lijst button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 7px; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.ag-kies-lijst button:hover { background: var(--line-2); }
.ag-blok-rij { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ag-blok-rij .input { width: 120px; }
.ag-bereik { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--line-2); border-radius: 10px; }

/* afspraaklijsten (dossier & portaal) */
.ag-rijen { display: flex; flex-direction: column; }
.ag-rij { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border: 0; border-bottom: 1px solid var(--line-2); background: none; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ag-rij:last-child { border-bottom: 0; }
.ag-rij:hover { background: #fafbfd; }
.ag-rij-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ag-rij-tekst .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-rij.st-geannuleerd .ag-rij-tekst b { text-decoration: line-through; color: var(--ink-3); }
.ag-datumblok { width: 52px; flex-shrink: 0; border-radius: 11px; overflow: hidden; text-align: center; border: 1px solid color-mix(in srgb, var(--k, var(--brand)) 30%, white); background: #fff; display: flex; flex-direction: column; line-height: 1.1; }
.ag-datumblok span:first-child { background: var(--k, var(--brand)); color: #fff; font-size: 10.5px; font-weight: 700; text-transform: uppercase; padding: 3px 0; letter-spacing: .04em; }
.ag-datumblok b { font-size: 19px; padding-top: 3px; }
.ag-datumblok span:last-child { font-size: 11px; color: var(--ink-3); padding-bottom: 4px; }
.ag-rij.st-geannuleerd .ag-datumblok { opacity: .5; }

@media (max-width: 1100px) {
  .ag-body { grid-template-columns: 1fr; }
  .ag-zij { position: static; max-height: none; }
  .ag-zij .ag-lijst { flex-direction: row; overflow-x: auto; overflow-y: hidden; min-height: 0; padding: 8px; gap: 6px; }
  .ag-zij .ag-pat { flex: 0 0 230px; border: 1px solid var(--line); }
  .ag-zij .ag-pat-blok { border-radius: 10px; border-bottom-style: solid; margin: 0; }
  .ag-zij .empty { flex: 1; }
  .ag-scroll { max-height: calc(100dvh - 150px); }
}
@media (max-width: 640px) {
  .ag-titel h1 { font-size: 18px; }
  .ag-balk-rij { gap: 8px; }
  .ag-modus { order: 5; width: 100%; display: flex; }
  .ag-modus button { flex: 1; }
  .ag-sam { display: none; }
  .ag-scroll { min-height: 360px; }
  .ag-hist-rij { grid-template-columns: 10px 1fr auto; }
  .ag-hist-rij > .muted, .ag-hist-rij .ag-hist-soort { display: none; }
  .ag-rij { padding: 12px 14px; gap: 12px; }
  .ag-rij > .muted { display: none; }
  .ag-rooster { grid-template-columns: repeat(7, 78vw); scroll-snap-type: x mandatory; }
  .ag-rdag { scroll-snap-align: start; }
}

/* ---------- Virtuele coach Anna (patiëntenportaal) ---------- */
.anna { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.anna-knop { position: relative; width: 68px; height: 68px; border-radius: 50%; padding: 0; border: 3px solid #fff; background: var(--brand-soft); cursor: pointer; box-shadow: 0 8px 28px rgba(20, 30, 60, .22); transition: transform .15s, box-shadow .15s; }
.anna-knop:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 32px rgba(20, 30, 60, .28); }
.anna-knop:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.anna-knop img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.anna-online { position: absolute; right: 1px; bottom: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--ok); border: 2.5px solid #fff; }
.anna.open .anna-knop { display: none; }
.anna-teaser { position: relative; max-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 4px 14px; padding: 11px 30px 11px 14px; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; animation: pop .25s ease; }
.anna-teaser span { color: var(--ink-2); }
.anna-teaser-x { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-3); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.anna-teaser-x:hover { background: var(--line-2); color: var(--ink); }
.anna-venster { width: 390px; height: min(640px, calc(100vh - 40px)); background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(20, 30, 60, .22); display: flex; flex-direction: column; overflow: hidden; animation: pop .2s ease; }
.anna-kop { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; background: var(--brand); color: var(--brand-ink); }
.anna-kop img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, .8); }
.anna-kop-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.anna-kop-tekst b { font-size: 16px; }
.anna-kop-tekst span { font-size: 12px; opacity: .85; }
.anna-ik { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: inherit; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.anna-kop .anna-ik:hover { background: rgba(255, 255, 255, .16); }
.anna-kop .anna-ik:not(.aan)#annaGeluid { opacity: .75; }
.anna-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); overscroll-behavior: contain; }
.anna-rij { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.anna-rij img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.anna-rij.jij { justify-content: flex-end; }
.anna-bel { max-width: 82%; background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 9px 13px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.anna-rij.jij .anna-bel { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); border-radius: 16px 16px 4px 16px; }
.anna-bel.fout { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.anna-bel p { margin: 0; }
.anna-bel p + p, .anna-bel ul + p, .anna-bel p + ul { margin-top: 7px; }
.anna-bel ul { margin: 0; padding-left: 18px; }
.anna-bel li + li { margin-top: 3px; }
.anna-knoppen { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.anna-knoppen button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 1px solid color-mix(in srgb, var(--brand) 30%, white); background: var(--brand-soft); color: var(--brand); border-radius: 10px; padding: 8px 11px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.anna-knoppen button:hover { border-color: var(--brand); }
.anna-knoppen button svg { flex-shrink: 0; }
.anna-bevestigd { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.anna-bevestigd span { display: inline-flex; align-items: center; gap: 5px; background: var(--ok-soft); color: var(--ok); border-radius: 999px; padding: 3px 10px 3px 8px; font-size: 12.5px; font-weight: 600; }
.anna-typt { display: inline-flex; gap: 4px; padding: 5px 0; }
.anna-typt i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: anna-stip 1.1s infinite ease-in-out; }
.anna-typt i:nth-child(2) { animation-delay: .15s; }
.anna-typt i:nth-child(3) { animation-delay: .3s; }
@keyframes anna-stip { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.anna-suggesties { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; background: var(--bg); }
.anna-suggesties:empty { display: none; }
.anna-suggesties button { border: 1px solid color-mix(in srgb, var(--brand) 35%, white); background: #fff; color: var(--brand); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.anna-suggesties button:hover { background: var(--brand-soft); }
.anna-invoer { display: flex; align-items: flex-end; gap: 6px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.anna-invoer textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 14.5px; line-height: 1.4; max-height: 120px; min-height: 40px; color: var(--ink); background: #fff; }
.anna-invoer textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.anna-mic { color: var(--ink-2); height: 40px; }
.anna-mic:hover { background: var(--line-2); }
.anna-mic.aan { color: #fff; background: var(--bad); animation: anna-mic 1.2s infinite; }
@keyframes anna-mic { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 25%, transparent); } }
.anna-stuur { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--brand); color: var(--brand-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.anna-stuur:hover { background: color-mix(in srgb, var(--brand) 88%, black); }
.anna-voet { font-size: 11.5px; color: var(--ink-3); text-align: center; padding: 0 12px 10px; background: #fff; line-height: 1.35; }
@media (max-width: 560px) {
  .anna { right: 14px; bottom: 14px; }
  .anna-knop { width: 60px; height: 60px; }
  .anna.open { inset: 0; right: 0; bottom: 0; }
  .anna-venster { width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .anna-invoer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .anna-invoer textarea { font-size: 16px; } /* voorkomt inzoomen op iPhone */
}
@media print { .anna { display: none; } }
/* Meldingen van Anna in de praktijkomgeving */
.anna-mini { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.anna-meldingen .card-head { gap: 10px; }
.anna-meldingen .ag-rij .avatar { flex-shrink: 0; }
.anna-melding-kaart { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border-color: color-mix(in srgb, var(--brand) 40%, white); background: var(--brand-soft); }
.anna-melding-kaart:hover { border-color: var(--brand); }
.anna-melding.gelezen { opacity: .7; }
.anna-melding .meta { flex-wrap: wrap; }
