@import url("fonts/fonts.css");

:root {
  --paper: #f4f5f2; --paper-2: #eaece8; --card: #ffffff;
  --ink: #1c2523; --ink-2: #46524f; --muted: #7b8683;
  --line: rgba(28, 37, 35, 0.12); --line-soft: rgba(28, 37, 35, 0.07);
  --accent: #1f6b5f; --accent-dark: #164f47; --accent-tint: #e2efeb; --accent-tint-2: #c9e0d9;
  --warn: #a8691f; --warn-tint: #f5ead6; --danger: #a4463b; --danger-tint: #f3e1de;
  --dark: #1e2a27; --on-dark: #e6ebe9; --on-dark-muted: #94a39e;
  --r: 12px; --r-lg: 18px;
  --shadow: 0 1px 2px rgba(28, 37, 35, 0.05), 0 10px 28px rgba(28, 37, 35, 0.07);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --display: "Instrument Serif", Georgia, serif;
  --body: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; height: 100%; }
body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.55; font-synthesis: none; -webkit-font-smoothing: antialiased; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-touch-callout: none; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.08; text-wrap: balance; }
h1 { font-family: var(--display); font-size: clamp(32px, 3.2vw, 44px); letter-spacing: -0.01em; }
h2 { font-family: var(--display); font-size: 26px; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
button, a, .tabbar, .nav, .tabs, .chip, .pill, .tile, .kicker, .check { -webkit-user-select: none; user-select: none; }
[hidden] { display: none !important; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-weight: 500; white-space: nowrap; }
.kicker.muted { color: var(--muted); }
.sub { color: var(--ink-2); font-size: 16px; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.display { font-family: var(--display); }
.num { font-family: var(--display); font-size: 38px; line-height: 1; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }
.nowrap { white-space: nowrap; }
.m-only { display: none; }

.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -4px; }
.ic.lg { width: 22px; height: 22px; }
.tile { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-tint); color: var(--accent); flex: none; }
.tile.sm { width: 30px; height: 30px; border-radius: 8px; }
.tile.warn { background: var(--warn-tint); color: var(--warn); }
.tile.danger { background: var(--danger-tint); color: var(--danger); }
.tile.neutral { background: var(--paper-2); color: var(--ink-2); }
.chev { color: var(--muted); flex: none; display: inline-flex; }

/* Gate */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px; background: var(--dark); }
.gate-card { width: min(420px, 100%); background: var(--card); border-radius: var(--r-lg); padding: 32px 28px; box-shadow: var(--shadow); }
.gate-card h1 { font-size: 34px; margin: 6px 0 4px; }
.gate-err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* Shell: de app is een vast kader, alleen de inhoud scrolt (geen rubber-band op iOS) */
.app { display: grid; grid-template-columns: 236px 1fr; height: 100vh; height: 100dvh; }
.side { background: var(--dark); color: var(--on-dark); padding: 26px 18px; display: flex; flex-direction: column; gap: 26px; overflow-y: auto; }
.wordmark { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.wordmark .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; font-family: var(--display); font-size: 19px; color: #fff; }
.wordmark .name { font-family: var(--display); font-size: 20px; }
.wordmark .subt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--on-dark-muted); text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--on-dark-muted); font-size: 14px; font-weight: 500; position: relative; transition: background .2s, color .2s; }
.nav a:hover { background: rgba(255,255,255,.05); color: var(--on-dark); }
.nav a.active { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -18px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-tint-2); }
.nav a .count { margin-left: auto; font-family: var(--mono); font-size: 11px; background: rgba(255,255,255,.1); padding: 2px 7px; border-radius: 999px; }
.nav a .count:empty { display: none; }
.side .user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.side .user .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-tint-2); color: var(--dark); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.side .user .who { font-size: 13px; line-height: 1.3; }
.side .user .role { color: var(--on-dark-muted); font-size: 11px; }
.main { padding: 32px 40px 64px; min-width: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sa-top { display: none; }
.view { animation: view-in .32s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.topbar .title { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions .search { width: 260px; }
.sec { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 2px 10px; }
.sec .kicker { color: var(--muted); }
.sec .cnt { font-size: 13px; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; white-space: nowrap; box-shadow: 0 1px 2px rgba(22,79,71,.2), 0 6px 16px rgba(22,79,71,.18); transition: transform .15s var(--ease), box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); background: var(--accent-dark); }
.btn:active { transform: translateY(0) scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--card); border-color: rgba(28,37,35,.25); }
.btn.soft { background: var(--accent-tint); color: var(--accent-dark); box-shadow: none; }
.btn.soft:hover { background: var(--accent-tint-2); }
.btn.light { background: var(--accent-tint-2); color: var(--dark); box-shadow: none; }
.btn.light:hover { background: #b9d3ca; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; justify-content: center; height: 50px; font-size: 15px; }
.btn.danger { background: var(--danger-tint); color: var(--danger); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.iconbtn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); transition: transform .15s var(--ease), border-color .15s, color .15s; }
.iconbtn:hover { border-color: var(--accent); color: var(--accent); }
.iconbtn:active { transform: scale(.94); }
.round { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent-tint); color: var(--accent-dark); display: inline-grid; place-items: center; cursor: pointer; flex: none; transition: transform .15s var(--ease), background .15s; }
.round:active { transform: scale(.92); background: var(--accent-tint-2); }
.round .ic { width: 22px; height: 22px; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.card > .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; flex-wrap: wrap; }
.card > .body { padding: 16px 22px 20px; }
.card.flat { box-shadow: none; }
.card.tint { background: var(--accent-tint); border-color: transparent; }
.card.dark { background: var(--dark); color: var(--on-dark); border-color: transparent; }
a.card { transition: transform .18s var(--ease), box-shadow .18s; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(28,37,35,.05), 0 16px 36px rgba(28,37,35,.1); }
a.card:active { transform: scale(.99); }
.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.list > .row > div { min-width: 0; }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-main { grid-template-columns: 1.55fr 1fr; }
.g-reg { grid-template-columns: 1.7fr 1fr; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; row-gap: 6px; }
.between { justify-content: space-between; }
.hair { border-top: 1px solid var(--line-soft); }
.list { display: flex; flex-direction: column; }
.list > * { padding: 13px 0; border-top: 1px solid var(--line-soft); }
.list > *:first-child { border-top: 0; }
.list > .clickable { cursor: pointer; }
.list > .clickable:hover { background: linear-gradient(90deg, transparent, rgba(31,107,95,.04)); }
.list > .clickable:active { opacity: .7; }
.empty { color: var(--muted); font-style: italic; padding: 10px 0; }

/* Nu-kaart (mobiel): de eerstvolgende afspraak, met de opnameknop */
.nu { position: relative; overflow: hidden; background: var(--dark); color: var(--on-dark); border-radius: 22px; padding: 20px 18px 18px; box-shadow: 0 20px 44px -20px rgba(30,42,39,.65); }
.nu::before { content: ""; position: absolute; right: -54px; top: -54px; width: 190px; height: 190px; border-radius: 50%; border: 16px solid rgba(255,255,255,.035); pointer-events: none; }
.nu > * { position: relative; }
.nu .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-muted); }
.nu .top .org { color: var(--on-dark-muted); }
.nu .top .org .sw { background: var(--accent-tint-2); }
.nu h2 { font-size: 32px; color: #fff; margin-top: 14px; }
.nu p { color: var(--on-dark-muted); margin-top: 8px; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nu p .vk { color: var(--on-dark); }
.nu .btn { margin-top: 18px; width: 100%; justify-content: center; height: 54px; font-size: 16px; border-radius: 14px; }

/* Statistiek-kaarten */
.stats .num { margin-top: 10px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--accent-tint); color: var(--accent-dark); }
.pill.warn { background: var(--warn-tint); color: var(--warn); }
.pill.danger { background: var(--danger-tint); color: var(--danger); }
.pill.dark { background: var(--dark); color: #fff; }
.pill.mono { font-family: var(--mono); font-weight: 500; letter-spacing: .04em; }
.org { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.org .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); flex: none; }

/* Timeline */
.tl { position: relative; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.tl .item { position: relative; padding: 0 0 20px; }
.tl .item::before { content: ""; position: absolute; left: -23px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); }
.tl .item.past::before { background: var(--accent); }
.tl .item.dim::before { border-color: var(--muted); }
.tl .when { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.tl strong { white-space: nowrap; }

/* Ring */
.ring { position: relative; width: 160px; height: 160px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .c-bg { fill: none; stroke: var(--paper-2); stroke-width: 10; }
.ring .c-fg { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.ring .c-fg.warn { stroke: var(--warn); }
.ring .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .big { font-family: var(--display); font-size: 38px; line-height: 1; }
.ring .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.bar { height: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bar > i.warn { background: var(--warn); }

/* Copy fields */
.field { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--paper); }
.field .k { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field .v { font-size: 14px; min-width: 0; -webkit-user-select: text; user-select: text; }
.field .v.long { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.copy { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: transform .15s var(--ease); }
.copy:hover { border-color: var(--accent); color: var(--accent); }
.copy:active { transform: scale(.96); }
.copy.done { background: var(--accent-tint); border-color: transparent; color: var(--accent-dark); }

/* Forms */
.input, select.input, textarea.input { height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 0 14px; font-family: var(--body); font-size: 16px; color: var(--ink); width: 100%; -webkit-user-select: text; user-select: text; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input:focus { outline: 2px solid var(--accent-tint-2); border-color: var(--accent); }
textarea.input { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
label.lbl { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.f { display: flex; flex-direction: column; }
.f.span { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); transition: transform .12s var(--ease); }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent); }
.check { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line); background: var(--card); display: inline-grid; place-items: center; cursor: pointer; color: transparent; flex: none; }
.check.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.check .ic { width: 14px; height: 14px; }

/* Tables */
.tscroll { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.t td.r, table.t th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr.total td { border-bottom: 0; font-weight: 700; padding-top: 12px; }

/* Modal / sheet */
.overlay { position: fixed; inset: 0; background: rgba(30,42,39,.45); display: grid; place-items: center; padding: 20px; z-index: 50; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fade-in .2s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: min(640px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: auto; overscroll-behavior: contain; background: var(--card); border-radius: var(--r-lg); box-shadow: 0 30px 80px rgba(0,0,0,.25); animation: sheet-pop .24s var(--ease) both; }
@keyframes sheet-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet .s-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 0; }
.sheet .s-body { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.sheet .s-foot { padding: 0 22px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--dark); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); text-align: center; animation: sheet-pop .24s var(--ease) both; }

/* Tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; font-weight: 600; color: var(--muted); cursor: pointer; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }

/* Opname en verslag */
.rec { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0 4px; }
.rec-btn { width: 96px; height: 96px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 10px var(--accent-tint), 0 14px 32px rgba(22,79,71,.28); transition: transform .15s var(--ease), background .2s; }
.rec-btn .ic { width: 38px; height: 38px; stroke-width: 1.5; }
.rec-btn:hover { transform: translateY(-1px); }
.rec-btn:active { transform: scale(.95); }
.rec-btn:disabled { background: var(--paper-2); color: var(--muted); box-shadow: none; cursor: default; }
.rec-btn.on { background: var(--danger); box-shadow: 0 0 0 10px var(--danger-tint), 0 14px 32px rgba(164,70,59,.3); animation: rec-pulse 1.6s ease-in-out infinite; }
.rec-btn.big { width: 150px; height: 150px; box-shadow: 0 0 0 12px var(--accent-tint), 0 18px 40px rgba(22,79,71,.3); }
.rec-btn.big .ic { width: 52px; height: 52px; }
@keyframes rec-pulse { 0%, 100% { box-shadow: 0 0 0 10px var(--danger-tint), 0 14px 32px rgba(164,70,59,.3); } 50% { box-shadow: 0 0 0 16px var(--danger-tint), 0 14px 32px rgba(164,70,59,.3); } }
.rec-timer { font-size: 22px; letter-spacing: .08em; color: var(--ink); }
.stepper { display: flex; flex-direction: column; gap: 14px; }
.stepper .step { display: flex; gap: 12px; align-items: flex-start; opacity: .55; }
.stepper .step.done, .stepper .step.now { opacity: 1; }
.stepper .step .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent); background: var(--card); margin-top: 6px; flex: none; }
.stepper .step.done .dot { background: var(--accent); }
.stepper .step.now .dot { background: var(--warn); border-color: var(--warn); animation: rec-pulse 1.6s ease-in-out infinite; box-shadow: 0 0 0 4px var(--warn-tint); }
.g-verslag { grid-template-columns: 1.15fr 1fr; align-items: start; }
.rub { padding: 16px 0; border-top: 1px solid var(--line-soft); }
.rub:first-child { border-top: 0; padding-top: 0; }
.rub .rk { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.rub p { font-size: 15px; -webkit-user-select: text; user-select: text; }
.rub textarea.rub-ta { min-height: 44px; }
.src { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 11px; color: var(--accent); background: var(--accent-tint); padding: 4px 8px; border-radius: 6px; border: 0; cursor: pointer; }
.src:hover { background: var(--accent-tint-2); }
.tr { font-size: 14px; line-height: 1.6; max-height: 70vh; overflow: auto; overscroll-behavior: contain; -webkit-user-select: text; user-select: text; }
.tr .seg { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.tr .seg:hover { background: var(--paper); }
.tr .seg .t { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 3px; }
.tr .seg.hl { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
#audioWrap audio { width: 100%; margin-bottom: 12px; }

/* Publieke pagina's (tekenen, voor-intake, planning) */
.pubwrap { min-height: 100%; padding: 20px 16px 48px; display: flex; justify-content: center; align-items: flex-start; background: var(--paper); }
.pubcard { width: min(560px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 24px 20px 26px; }
.pubcard h1 { font-size: 34px; }
.choice { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 600; min-height: 52px; width: 100%; text-align: left; font-family: var(--body); font-size: 15px; color: var(--ink); cursor: pointer; transition: transform .12s var(--ease); }
.choice:active { transform: scale(.985); }
.choice.on { border-color: var(--accent); background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--accent); }
.dots { display: flex; gap: 6px; }
.dots i { width: 22px; height: 4px; border-radius: 2px; background: var(--line); }
.dots i.on { background: var(--accent); }
.docbox { margin-top: 10px; max-height: 220px; overflow: auto; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--paper); white-space: pre-wrap; font-size: 14px; line-height: 1.55; -webkit-user-select: text; user-select: text; }
.sigpad { width: 100%; height: 130px; display: block; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--paper); touch-action: none; }
.sigimg { max-width: 100%; height: 90px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--paper); padding: 6px; }

/* Agenda */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 10px; min-height: 200px; box-shadow: var(--shadow); }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint), var(--shadow); }
.dayhead { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; cursor: pointer; }
.dayhead strong { font-family: var(--display); font-size: 24px; }
.evt { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line-soft); font-size: 13px; line-height: 1.3; }
.evt.plan { border-left: 3px solid var(--accent); }
.evt.done { opacity: .7; }
.evt.book { border-left: 3px solid #4b6fa5; background: #eef2f8; cursor: pointer; }
.evt.new { border-left: 3px solid var(--warn); background: var(--warn-tint); cursor: pointer; }
.evt.empty-slot { align-items: center; justify-content: center; color: var(--muted); border-style: dashed; background: transparent; cursor: pointer; min-height: 40px; }
.evt.empty-slot:hover { color: var(--accent); border-color: var(--accent); }
.slot { height: 44px; min-width: 64px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); font-family: var(--mono); font-size: 13px; cursor: pointer; color: var(--ink); }
.slot:hover { border-color: var(--accent); color: var(--accent); }
.slot.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Mobiel: app-gevoel */
.tabbar { display: none; }
.fab { display: none; }
@media (max-width: 900px) {
  .m-only { display: block; }
  .d-only { display: none !important; }
  .app { display: block; position: fixed; inset: 0; height: auto; }
  .side { display: none; }
  .main { position: absolute; inset: 0; padding: calc(14px + env(safe-area-inset-top)) 18px calc(104px + env(safe-area-inset-bottom)); }
  .sa-top { display: block; position: sticky; top: 0; height: env(safe-area-inset-top); margin: calc(-14px - env(safe-area-inset-top)) -18px 14px; background: rgba(244,245,242,.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); z-index: 30; }
  .topbar { margin-bottom: 18px; gap: 12px; align-items: flex-start; }
  .topbar .title { gap: 6px; }
  .topbar h1 { font-size: 32px; }
  .topbar .sub { font-size: 15px; }
  .topbar.hero-m { flex-wrap: nowrap; align-items: center; }
  .topbar.hero-m .round { margin-top: 4px; }
  .actions { width: 100%; gap: 8px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; height: 46px; font-size: 14px; }
  .actions .btn.sm { height: 42px; border-radius: 12px; }
  .actions .btn:not(.ghost):not(.soft) { flex-basis: 100%; }
  .actions .input, .actions .search { width: 100%; flex-basis: 100%; }
  .sec:first-child { margin-top: 0; }
  .g-2, .g-3, .g-main, .g-reg, .g-verslag, .fgrid { grid-template-columns: 1fr; }
  .g-main.vandaag > .card { order: -1; }
  .grid { gap: 14px; }
  .stack { gap: 14px; }
  .stats { gap: 8px !important; }
  .stats > .card > .body { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; }
  .stats > .card > .body p { display: none; }
  .stats .num { margin-top: 0; font-size: 26px; white-space: nowrap; }
  .card > .head { padding: 16px 16px 0; }
  .card > .body { padding: 14px 16px 16px; }
  .card { border-radius: 18px; }
  .row.between { flex-wrap: wrap; row-gap: 8px; }
  .list > .row.between > :first-child { flex: 1 1 150px; min-width: 0; }
  .list > * { padding: 14px 0; }
  .tl strong { white-space: normal; }
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .tr { max-height: none; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -18px 16px; padding: 0 18px; border-bottom: 0; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; margin: 0; background: var(--card); font-size: 13px; }
  .tabs button.on { background: var(--dark); color: #fff; border-color: var(--dark); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--line); background: rgba(255,255,255,.9); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); z-index: 40; }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-height: 48px; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; }
  .tabbar a .ic, .tabbar button .ic { width: 22px; height: 22px; transition: transform .15s var(--ease); }
  .tabbar a:active .ic, .tabbar button:active .ic { transform: scale(.88); }
  .tabbar a.active { color: var(--accent); }
  .tabbar .plus { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; margin-top: -24px; box-shadow: 0 10px 24px -8px rgba(22,79,71,.6), 0 0 0 5px var(--paper); transition: transform .15s var(--ease); }
  .tabbar button:active .plus { transform: scale(.94); }
  .tabbar .plus .ic { width: 24px; height: 24px; transform: none !important; }
  .field { grid-template-columns: 1fr; gap: 6px; }
  .copy { height: 38px; font-size: 13px; padding: 0 12px; }
  .iconbtn { width: 40px; height: 40px; }
  .btn.sm { height: 38px; }
  .input, select.input { height: 48px; }
  .ring { width: 130px; height: 130px; }
  .ring .big { font-size: 30px; }
  .overlay { padding: 0; align-items: end; }
  .sheet { width: 100%; border-radius: 22px 22px 0 0; align-self: end; max-height: 92vh; max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom); animation: sheet-up .32s var(--ease) both; }
  .sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 10px auto 0; }
  .sheet .s-head { padding-top: 12px; }
  .sheet .s-foot .btn { flex: 1 1 auto; justify-content: center; height: 50px; }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .pubwrap { padding-top: calc(16px + env(safe-area-inset-top)); }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
