/* Baatje Studio Manager — stijl
   Donker en filmisch, met warm "tungsten"-amber als accent en een rode REC-stip. */

:root {
  --bg: #0b0b0c;
  --bg-2: #111114;
  --card: #151519;
  --card-2: #1b1b20;
  --line: #24242b;
  --line-2: #2f2f37;
  --text: #f4f0e9;
  --text-2: #c7c1b6;
  --muted: #8d877d;
  --accent: #e8a33d;
  --accent-2: #f3c173;
  --accent-ink: #1a1306;
  --rec: #ff4d3d;
  --ok: #6fd48a;
  --warn: #ffb547;
  --bad: #ff7462;
  --radius: 20px;
  --radius-s: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tab-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(232, 163, 61, .07), transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--text); font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
body.noscroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -.01em; }
[hidden] { display: none !important; }
small { font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.center { text-align: center; }
.pre { white-space: pre-wrap; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ---------- opstart ---------- */
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot-mark, .brand-mark {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(145deg, #1e1e24, #0f0f12); border: 1px solid var(--line-2);
  font: 800 30px/1 var(--font-display); color: var(--accent);
  animation: breathe 1.6s var(--ease) infinite;
}
@keyframes breathe { 50% { opacity: .55; transform: scale(.96); } }

/* ---------- lay-out ---------- */
.app { max-width: 760px; margin: 0 auto; }
.view {
  padding: calc(var(--safe-t) + 18px) 18px calc(var(--tab-h) + var(--safe-b) + 36px);
  min-height: 100dvh;
  overflow-x: clip;
}
body.has-timer .view { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 96px); }
.view.enter > * { animation: rise .36s var(--ease) both; }
.view.loading { opacity: .6; transition: opacity .2s .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.view-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 18px; min-height: 44px; }
.view-title { flex: 1; min-width: 0; }
.view-head h1 { font-size: 30px; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.view-head .sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.head-actions { display: flex; gap: 8px; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none;
  color: var(--text-2); transition: background .2s, transform .15s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.solid { background: var(--card-2); border: 1px solid var(--line-2); color: var(--text); }
.icon-btn.back { margin-left: -8px; }

/* ---------- tabbalk ---------- */
.tabbar {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: 760px;
  height: calc(var(--tab-h) + var(--safe-b)); padding: 0 8px var(--safe-b);
  display: grid; grid-template-columns: repeat(2, 1fr) 84px repeat(2, 1fr); align-items: center;
  background: rgba(14, 14, 17, .82); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0;
  color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .02em; transition: color .2s;
}
.tabbar a.active { color: var(--text); }
.tabbar a.active svg { color: var(--accent); }
.fab {
  justify-self: center; width: 60px; height: 60px; border-radius: 22px; margin-top: -26px;
  background: linear-gradient(160deg, var(--accent-2), var(--accent)); color: var(--accent-ink);
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(232, 163, 61, .35), 0 0 0 6px var(--bg);
  transition: transform .2s var(--ease);
}
.fab:active { transform: scale(.9) rotate(90deg); }

/* ---------- timerbalk ---------- */
.timerbar {
  position: fixed; z-index: 39; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tab-h) + var(--safe-b) + 10px); width: calc(100% - 24px); max-width: 736px;
  animation: rise .4s var(--ease);
}
.timer-pill {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px;
  border-radius: 18px; background: rgba(36, 14, 12, .92); border: 1px solid rgba(255, 77, 61, .35);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); text-align: left;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}
.timer-clock { font-variant-numeric: tabular-nums; font-size: 17px; }
.timer-label { flex: 1; min-width: 0; color: var(--text-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-stop { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--rec); color: #fff; font-weight: 700; font-size: 14px; }
.rec { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); flex: none; box-shadow: 0 0 0 0 rgba(255, 77, 61, .6); animation: rec 1.6s infinite; }
.rec.idle { animation: none; opacity: .9; }
@keyframes rec { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 61, .55); } 70% { box-shadow: 0 0 0 9px rgba(255, 77, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 61, 0); } }

/* ---------- knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: var(--radius-s);
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--text);
  font-weight: 650; font-size: 15px; transition: transform .15s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #1d0703; }
.btn.ghost { background: transparent; }
.btn.danger-text { color: var(--bad); border-color: transparent; }
.btn.block { width: 100%; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn.rec-btn { border-color: rgba(255, 77, 61, .4); }
.btn-row { display: flex; gap: 10px; margin: 14px 0; }
.btn-row > .btn { flex: 1; }
.btn-row.wrap { flex-wrap: wrap; }
.btn-row.wrap > .btn { flex: 1 1 auto; }

/* ---------- dashboard ---------- */
.hello { margin: 10px 0 18px; }
.hello-date { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--accent); font-weight: 700; }
.hello h1 { font-size: 32px; font-weight: 800; line-height: 1.1; }
.timer-start {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 18px; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 700; text-align: left;
}
.timer-start small { margin-left: auto; color: var(--muted); font-weight: 500; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.stat {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px; min-height: 128px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .2s var(--ease), border-color .2s;
}
.stat:active { transform: scale(.97); }
.stat-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--card-2); color: var(--accent); margin-bottom: 10px; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-value { font: 800 28px/1.1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat small { color: var(--muted); }
.stat.accent { background: linear-gradient(150deg, rgba(232, 163, 61, .2), rgba(232, 163, 61, .04) 60%), var(--card); border-color: rgba(232, 163, 61, .3); }

/* ---------- blokken & lijsten ---------- */
.block { margin-top: 26px; }
.block-title { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin: 0 0 10px 2px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left;
  border-bottom: 1px solid var(--line); min-height: 60px; transition: background .15s;
}
.item:last-child { border-bottom: 0; }
a.item:active, button.item:active, .item-main:active { background: var(--card-2); }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left; }
.item-title { font-weight: 600; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; color: var(--muted); font-size: 13px; align-items: center; }
.item-meta svg { vertical-align: -2px; }
.item > svg { color: var(--muted); flex: none; }
.amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; }
.amount small { color: var(--muted); font-weight: 500; }
.late { color: var(--bad) !important; }
.kind { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.k-opname { color: var(--rec) !important; } .k-deadline { color: var(--accent) !important; } .k-afspraak { color: #8ab4ff !important; }
.ptag { padding: 2px 8px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--line-2); color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.prio { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); flex: none; }
.empty { padding: 22px 18px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty p { margin: 0 0 6px; }
.empty .btn { margin-top: 10px; }
.more-link, .add-mini { display: inline-flex; align-items: center; gap: 6px; margin: 12px 2px 0; color: var(--accent); font-weight: 650; font-size: 14.5px; min-height: 36px; }

.date-badge { width: 46px; height: 50px; border-radius: 13px; background: var(--card-2); border: 1px solid var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.date-badge small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; }
.date-badge strong { font: 800 19px/1 var(--font-display); }

/* taken */
.task { gap: 4px; padding-left: 6px; }
.tick {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%;
}
.tick svg { width: 26px; height: 26px; padding: 4px; border-radius: 50%; border: 2px solid var(--line-2); color: transparent; transition: all .2s var(--ease); }
.tick.on svg { background: var(--ok); border-color: var(--ok); color: #08210f; }
.tick.pop svg { animation: pop .35s var(--ease); }
@keyframes pop { 40% { transform: scale(1.25); } }
.task .item-main { padding: 2px 0; }
.task.done .item-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.task.overdue .tick svg { border-color: rgba(255, 116, 98, .6); }

/* ---------- zoeken & filters ---------- */
.searchbar { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 50px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; color: var(--muted); }
.search-input { flex: 1; height: 100%; background: none; border: 0; color: var(--text); font-size: 16px; outline: none; min-width: 0; }
.filters { display: flex; gap: 8px; margin: 12px 0 16px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.fchip, .fselect {
  flex: none; height: 38px; padding: 0 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line-2);
  color: var(--text-2); font-size: 14px; font-weight: 600;
}
.fselect { appearance: none; -webkit-appearance: none; padding-right: 14px; max-width: 190px; }
.fchip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- projectkaarten ---------- */
.pgrid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.pgrid > *, .stats > *, .tiles > *, .facts > *, .quick-grid > * { min-width: 0; }
@media (min-width: 620px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pcard {
  display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 15px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s var(--ease);
}
.pcard:active { transform: scale(.98); }
.pcard-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.pnum { color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pcard h3 { font-size: 18px; font-weight: 700; line-height: 1.25; }
.pcard-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.pcard-meta span { display: inline-flex; align-items: center; gap: 4px; }
.pcard-hours { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.pcard-hours small { color: var(--muted); white-space: nowrap; }
.progress { flex: 1; height: 6px; border-radius: 6px; background: var(--card-2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .6s var(--ease); }
.progress.warn span { background: var(--bad); }

/* fase-chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 9px; font-size: 12px; font-weight: 700; white-space: nowrap; background: rgba(255,255,255,.05); color: var(--c, #aaa); }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.p-aanvraag { --c: #a7a197; } .p-offerte { --c: #9fb1c9; } .p-bevestigd { --c: #7fb2ff; } .p-voorbereiding { --c: #b69cff; }
.p-opname { --c: #ff6b5b; } .p-montage { --c: #f0b04f; } .p-feedback { --c: #ff9a4d; } .p-oplevering { --c: #4fd1c5; } .p-afgerond { --c: #6fd48a; }
.chip { background: color-mix(in srgb, var(--c) 14%, transparent); }

.tag { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 12px; font-weight: 650; }
.inv-none { color: #c7c1b6; background: rgba(255,255,255,.06); }
.inv-part { color: #f3c173; background: rgba(232,163,61,.14); }
.inv-sent { color: #8ab4ff; background: rgba(127,178,255,.13); }
.inv-paid { color: #6fd48a; background: rgba(111,212,138,.13); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: currentColor; }
.dot.inv-none { color: #8d877d; background: #8d877d; } .dot.inv-sent { background: #8ab4ff; } .dot.inv-paid { background: #6fd48a; }

/* ---------- projectdetail ---------- */
.stepper { display: flex; gap: 6px; overflow-x: auto; margin: 0 -18px 16px; padding: 2px 18px 6px; scroll-behavior: smooth; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.step {
  flex: none; display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 13.5px; font-weight: 650;
  transition: all .25s var(--ease);
}
.step i { width: 8px; height: 8px; border-radius: 50%; border: 2px solid currentColor; }
.step.past { color: var(--text-2); } .step.past i { background: currentColor; }
.step.now { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step.now i { background: currentColor; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact { padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.fact small { color: var(--muted); font-weight: 600; }
.fact strong { font-size: 15px; }
.fact.late strong { color: var(--bad); }
.desc { color: var(--text-2); margin: 14px 2px 0; }
.notice { padding: 12px 14px; border-radius: 14px; background: rgba(232, 163, 61, .12); border: 1px solid rgba(232, 163, 61, .28); color: var(--accent-2); font-size: 14px; margin-bottom: 14px; }
.notice.soft { background: var(--card); border-color: var(--line); color: var(--text-2); }

.money { margin-top: 6px; }
.money-main, .week-total { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.money-main small, .week-total small, .km-sum small, .fin-grid small { display: block; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.big { font: 800 30px/1.1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.right { text-align: right; }
.money-rows { margin: 16px 0 4px; border-top: 1px solid var(--line); }
.money-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--text-2); }
.money-rows span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-rows .total { color: var(--text); font-weight: 700; border-bottom: 0; }
.hours-box { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--card-2); display: flex; flex-direction: column; gap: 10px; }
.hours-head, .hours-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.hours-foot { color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.eff strong { color: var(--accent-2); }
.client { display: flex; flex-direction: column; gap: 4px; }
.client a { color: var(--accent); }
.danger-zone { margin-top: 30px; display: flex; justify-content: center; }

/* ---------- segment & datumnavigatie ---------- */
.segmented { display: flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.segmented button { flex: 1 0 auto; min-height: 38px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 650; color: var(--muted); transition: all .2s var(--ease); white-space: nowrap; }
.segmented button[aria-checked="true"] { background: var(--card-2); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 2px 8px rgba(0,0,0,.3); }
.segmented.top { margin-bottom: 12px; }
.datenav { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 4px 0 14px; }
.datenav-label { flex: 1; text-align: center; font-weight: 700; font-size: 15px; min-height: 44px; display: grid; place-items: center; }

.week { display: grid; gap: 10px; }
.weekday-head { display: flex; gap: 8px; align-items: baseline; margin: 6px 2px 8px; }
.weekday-head strong { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--muted); }
.weekday-head span { color: var(--text-2); font-size: 14px; }
.weekday.today .weekday-head strong { color: var(--accent); }
.weekday > .muted { margin: 0 2px 6px; }

/* ---------- uren ---------- */
.week-total { margin-bottom: 14px; align-items: center; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 150px; padding: 14px 12px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.bar { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 0; }
.bar-track { flex: 1; width: 100%; max-width: 30px; display: flex; align-items: flex-end; border-radius: 8px; background: var(--card-2); overflow: hidden; }
.bar-track span { width: 100%; background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-radius: 8px; animation: grow .6s var(--ease) both; transform-origin: bottom; }
@keyframes grow { from { transform: scaleY(0); } }
.bar small { color: var(--muted); text-transform: uppercase; font-size: 11px; font-weight: 700; }
.bar.today small { color: var(--accent); }
.bar em { font-style: normal; font-size: 11px; color: var(--text-2); height: 14px; }
.day-group { margin-bottom: 14px; }
.day-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 600; margin: 0 4px 8px; }

/* ---------- kilometers & financiën ---------- */
.km-sum { display: flex; flex-direction: column; gap: 16px; }
.km-split, .fin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.km-split > div, .fin-grid > div { padding: 12px; border-radius: 14px; background: var(--card-2); }
.km-split strong, .fin-grid strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.km-split small:last-child { margin: 2px 0 0; font-weight: 500; }
.fin-total { display: flex; flex-direction: column; gap: 16px; }
.inv-bar { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-2); }
.inv-bar strong { float: right; color: var(--text); font-variant-numeric: tabular-nums; }
.fin-mini { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.tbl .num { text-align: right; }
.tbl tr.dim td { color: var(--muted); }
.tbl tfoot td { font-weight: 700; border-bottom: 0; }

/* ---------- meer ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 18px 16px; min-height: 132px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s var(--ease); }
.tile:active { transform: scale(.97); }
.tile-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--card-2); color: var(--accent); margin-bottom: 10px; }
.tile strong { font-size: 16px; }
.tile small { color: var(--muted); }
.logout { margin-top: 26px; color: var(--text-2); }

.client-row { gap: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 14px; background: var(--card-2); display: grid; place-items: center; font-weight: 800; color: var(--accent); flex: none; }
.client-sheet a { color: var(--accent); }
.feed p { margin: 0 0 10px; color: var(--text-2); }
.feed input { margin: 8px 0; }

/* ---------- formulieren ---------- */
.form { display: flex; flex-wrap: wrap; gap: 0 12px; }
.form > * { flex: 1 1 100%; min-width: 0; }
.form > .field.half { flex: 1 1 calc(50% - 6px); min-width: 140px; }
.form > .btn { margin-top: 18px; }
.form > .btn + .btn { margin-top: 8px; }
.form-section { margin: 18px 0 2px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 700; }
.field { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.req { color: var(--accent); }
.hint { color: var(--muted); }
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); font: 16px/1.3 var(--font); outline: none;
  transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.searchbar input { min-height: 0; padding: 0; border: 0; background: none; }
textarea { resize: vertical; min-height: 84px; }
select { max-width: 100%; text-overflow: ellipsis; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input[type=date], input[type=time] { display: block; }
input::-webkit-date-and-time-value { text-align: left; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 163, 61, .18); }
.field .segmented { background: var(--bg-2); }
.check-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 13px; background: var(--bg-2); border: 1px solid var(--line-2); cursor: pointer; }
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-ui { width: 46px; height: 28px; border-radius: 14px; background: var(--line-2); position: relative; flex: none; transition: background .2s; }
.check-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.check-row input:checked + .check-ui { background: var(--accent); }
.check-row input:checked + .check-ui::after { transform: translateX(18px); }
.check-row input:focus-visible + .check-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.check-row span:last-child { display: flex; flex-direction: column; font-weight: 600; font-size: 15px; }
.check-row small { color: var(--muted); font-weight: 500; }

/* ---------- sheets ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .25s; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.sheet-backdrop.in { opacity: 1; }
.sheet {
  position: fixed; z-index: 61; left: 50%; bottom: 0; width: 100%; max-width: 560px; max-height: 92dvh;
  transform: translate(-50%, 104%); transition: transform .32s var(--ease);
  background: #131317; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 26px 26px 0 0;
  display: flex; flex-direction: column; box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
}
.sheet.wide { max-width: 640px; }
.sheet.in { transform: translate(-50%, 0); }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 9px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 4px 20px; flex: none; }
.sheet-head h2 { font-size: 20px; font-weight: 750; }
.sheet-body { overflow-y: auto; overflow-x: hidden; padding: 4px 20px calc(var(--safe-b) + 24px); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
@media (min-width: 700px) {
  .sheet { bottom: auto; top: 50%; border-radius: 26px; border-bottom: 1px solid var(--line-2); transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .28s var(--ease), opacity .2s; }
  .sheet.in { transform: translate(-50%, -50%); opacity: 1; }
  .sheet-grip { display: none; }
}
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 6px; }
.quick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px; min-height: 112px; text-align: left; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: transform .15s; }
.quick:active { transform: scale(.96); }
.quick-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--card-2); color: var(--accent); margin-bottom: 8px; }
.quick small { color: var(--muted); }

/* ---------- meldingen ---------- */
.toasts { position: fixed; z-index: 80; left: 0; right: 0; top: calc(var(--safe-t) + 10px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; max-width: 520px; padding: 12px 16px; border-radius: 14px; background: #202026; border: 1px solid var(--line-2); color: var(--text); font-weight: 600; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0,0,0,.4); transform: translateY(-12px); opacity: 0; transition: all .3s var(--ease); }
.toast.in { transform: none; opacity: 1; }
.toast.ok { border-color: rgba(111, 212, 138, .35); }
.toast.err { background: #2e1512; border-color: rgba(255, 116, 98, .45); color: #ffd3cb; }
.error-box { padding: 30px 10px; text-align: center; color: var(--text-2); }
.error-box .btn { margin-top: 12px; }

/* ---------- inloggen ---------- */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--safe-t) + 24px) 22px calc(var(--safe-b) + 24px); max-width: 440px; margin: 0 auto; }
.login-card { display: flex; flex-direction: column; }
.login-card h1 { font-size: 34px; font-weight: 800; margin: 34px 0 6px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { animation: none; width: 52px; height: 52px; font-size: 24px; border-radius: 15px; }
.brand strong { display: block; font: 800 20px/1 var(--font-display); letter-spacing: .22em; }
.brand span { color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.login-msg { color: var(--bad); min-height: 22px; margin: 12px 0 0; font-size: 14.5px; }
.login .btn { margin-top: 10px; min-height: 54px; font-size: 16px; }
.login-foot { color: var(--muted); font-size: 12.5px; text-align: center; margin-top: 40px; letter-spacing: .06em; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

@media (min-width: 760px) {
  .view { padding-left: 28px; padding-right: 28px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .stepper { margin: 0 -28px 16px; padding-left: 28px; padding-right: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
