/* =========================================================
   Schel / Trion – design system
   Apple-geïnspireerd: lichte oppervlakken, subtiele blauwe accenten,
   afgeronde kaarten. Mobiel: onderste navigatie. Desktop: zijbalk.
   ========================================================= */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --text: #0c0e13;
  --text-2: #3b4250;
  --muted: #6b7280;
  --border: #e7e9ee;
  --border-strong: #d6dae1;
  --accent: #2563eb;
  --accent-soft: #e8f0fe;
  --accent-text: #1d4fd7;
  --brand-dark: #0f1f4b;
  --track: #e9edf5;
  --danger: #dc2626;
  --success: #16a34a;
  --warn: #d97706;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 10px rgba(16, 24, 40, .045);
  --shadow-lg: 0 10px 40px rgba(16, 24, 40, .12);
  --radius: 18px;
  --radius-sm: 12px;
  --ph-bg: #eef1f5;
  --ph-van: #ffffff;
  --ph-glass: #c9d3e1;
  --ph-wheel: #2b3240;
  --tabbar-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 28px; }
.right { margin-left: auto; }
.hidden { display: none !important; }

.ic {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Layout ---------- */
.main {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 28px);
}
body.bare .main { padding-bottom: 32px; }

.sidebar { display: none; }

@media (min-width: 960px) {
  body.with-nav { padding-left: 248px; }
  .sidebar {
    display: flex; flex-direction: column;
    position: fixed; inset: 0 auto 0 0; width: 248px;
    background: var(--surface); border-right: 1px solid var(--border);
    padding: 22px 14px; gap: 8px; z-index: 20;
  }
  .sidebar-logo { padding: 4px 10px 18px; }
  .sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
  .sidebar nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 12px;
    color: var(--text-2); font-weight: 520;
  }
  .sidebar nav a:hover { background: var(--surface-2); color: var(--text); }
  .sidebar nav a.active { background: var(--accent-soft); color: var(--accent-text); }
  .sidebar nav a .count { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 7px; }
  .sidebar-sep { height: 1px; background: var(--border); margin: 10px 8px; }
  .sidebar-user { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; }
  .sidebar-user:hover { background: var(--surface-2); }
  .sidebar-user b { display: block; font-size: 14px; }
  .sidebar-user small { color: var(--muted); font-size: 12px; }
  .main { padding: 32px 36px 48px; }
  .tabbar { display: none !important; }
  .mobile-only { display: none !important; }
  h1 { font-size: 30px; }
}
@media (max-width: 959px) { .desktop-only { display: none !important; } }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo-mark { width: 38px; height: 23px; }
.logo-text { font-weight: 800; font-style: italic; font-size: 21px; letter-spacing: -.01em; color: var(--brand-dark); }

/* ---------- Tabbar (mobiel) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 6px 4px env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; color: #7b8190; padding-top: 4px; font-weight: 500;
}
.tabbar a.active { color: var(--text); font-weight: 650; }
.tabbar a.active .ic { stroke-width: 2.1; }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 18px; min-height: 44px; }
.page-head h1 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.page-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  color: var(--text); position: relative; cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid var(--surface); }
.icon-btn.back { box-shadow: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid rgba(0, 0, 0, .025);
  padding: 16px;
}
.card + .card { margin-top: 12px; }
.card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-title h3 { flex: 1; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; }
.section-title h2 { flex: 1; }
.section-title a { color: var(--accent); font-size: 14px; font-weight: 550; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.cols { display: grid; gap: 16px; }
.cols > .card + .card, .grid-4 > .card + .card { margin-top: 0; }
.cols .chart { max-height: 240px; }
@media (min-width: 960px) { .cols { grid-template-columns: 1.4fr 1fr; align-items: start; } .cols-even { grid-template-columns: 1fr 1fr; } }

/* Tegels startpagina */
.tile {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 16px; min-height: 124px; transition: transform .15s ease, box-shadow .15s;
}
.tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.tile .ic { width: 30px; height: 30px; stroke-width: 1.6; margin-bottom: 14px; }
.tile b { font-size: 17px; letter-spacing: -.01em; }
.tile span { font-size: 13px; color: var(--muted); }
.tile .badge-count { position: absolute; top: 12px; right: 12px; color: #fff; }
.badge-count { background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; min-width: 22px; height: 22px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }

/* Stat-kaarten */
.stat { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 14px; }
.stat-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.stat-top .ic { width: 18px; height: 18px; }
.stat-num { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; }
.big-num { font-size: 34px; font-weight: 750; letter-spacing: -.03em; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.trend.good { background: #e8f7ee; color: var(--success); }
.trend.bad { background: #fdecec; color: var(--danger); }
.trend.flat { background: var(--surface-2); color: var(--muted); }

/* ---------- Lijsten ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 12px 14px; min-height: 60px; position: relative;
}
a.item:hover { box-shadow: var(--shadow-lg); }
.item-body { flex: 1; min-width: 0; }
.item-title { font-weight: 620; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .chev { color: #9aa1ad; width: 18px; height: 18px; }
.item .lead-ic { width: 24px; height: 24px; }
.item .val { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.item-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }

.thumb { width: 82px; height: 60px; border-radius: 10px; overflow: hidden; flex: none; background: var(--ph-bg); }
.thumb img, .thumb svg { width: 100%; height: 100%; object-fit: cover; }
.van-ph { display: block; }

@media (min-width: 960px) {
  .vehicle-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* Checkbox-cirkel in takenlijst */
.task-check { flex: none; margin: 0; }
.task-check button {
  width: 22px; height: 22px; border-radius: 6px; border: 1.6px solid #b7bdc8; background: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; color: #fff;
}
.task-check button:hover { border-color: var(--accent); }
.task-check button.done { background: var(--success); border-color: var(--success); }
.task-check .ic { width: 14px; height: 14px; stroke-width: 2.6; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; line-height: 1.4; }
.badge-gray { background: #eef0f3; color: #4b5563; }
.badge-soft { background: #eef0f3; color: #374151; }
.badge-blue { background: #e6efff; color: #1d4fd7; }
.badge-cyan { background: #e2f6fb; color: #0e7490; }
.badge-indigo { background: #ecebff; color: #4f46e5; }
.badge-green { background: #e6f6ea; color: #15803d; }
.badge-amber { background: #fdf3d7; color: #a16207; }
.badge-orange { background: #ffedde; color: #c2410c; }
.badge-purple { background: #f3e8ff; color: #7e22ce; }
.badge-red { background: #fde8e8; color: #c81e1e; }
.badge-dark { background: #1f2430; color: #fff; }
.badge-schel { background: #e6efff; color: #0f1f4b; }
.badge-trion { background: #1f2430; color: #f3d38a; }

/* ---------- Segmented control & chips ---------- */
.segmented {
  display: flex; background: #e9ebef; border-radius: 999px; padding: 3px; gap: 2px;
}
.segmented a, .segmented button, .segmented label {
  flex: 1; text-align: center; padding: 8px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 550; color: var(--text-2); border: 0; background: none; cursor: pointer; white-space: nowrap;
}
.segmented .on, .segmented input:checked + span {
  background: #11141a; color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
.segmented label { padding: 0; display: flex; }
.segmented label input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label span { flex: 1; padding: 8px 12px; border-radius: 999px; }
.segmented-sm a { padding: 6px 10px; font-size: 13px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-size: 14px; font-weight: 550; color: var(--text-2); white-space: nowrap;
}
.chip.on { background: #11141a; color: #fff; border-color: #11141a; }

/* ---------- Formulieren ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel],
input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 11px 13px; outline: none; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
input[type=file] { font-size: 14px; }
.form-row { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } .form-row-3 { grid-template-columns: 1fr 1fr 1fr; } }
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; }
.checkline { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.checkline input { width: 18px; height: 18px; accent-color: var(--accent); }

.search {
  display: flex; align-items: center; gap: 8px;
  background: #eceef2; border-radius: 12px; padding: 0 12px; color: var(--muted);
}
.search input { background: transparent; border: 0; padding: 11px 0; box-shadow: none !important; }

/* ---------- Knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 600;
  padding: 11px 18px; border-radius: 12px; border: 1px solid transparent;
  background: #11141a; color: #fff; cursor: pointer; white-space: nowrap;
  transition: opacity .15s, background .15s;
}
.btn:hover { opacity: .9; }
.btn .ic { width: 18px; height: 18px; }
.btn-accent { background: var(--accent); }
.btn-light { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-light:hover { background: var(--surface-2); opacity: 1; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f3c7c7; }
.btn-success { background: var(--success); }
.btn-sm { padding: 7px 12px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 20px; font-size: 16px; border-radius: 14px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }
.link { color: var(--accent); font-weight: 550; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
form.inline { display: inline; }

/* ---------- Toasts ---------- */
.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 14px); transform: translateX(-50%);
  z-index: 100; background: #11141a; color: #fff; padding: 11px 18px; border-radius: 14px;
  font-size: 14px; font-weight: 550; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px);
  animation: toast 4s ease forwards;
}
.toast-error { background: var(--danger); }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -8px); } 6%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; visibility: hidden; } }

/* ---------- Grafieken ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #eef0f4; stroke-width: 1; }
.chart .axis { font-size: 10px; fill: #8a909c; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.donut { width: 130px; height: 130px; flex: none; }
.donut-num { font-size: 24px; font-weight: 750; fill: var(--text); font-family: var(--font); }
.donut-lbl { font-size: 10px; fill: var(--muted); font-family: var(--font); }
.legend { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.legend div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.legend i { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.legend b { margin-left: auto; }
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 128px 1fr 34px; align-items: center; gap: 10px; font-size: 13px; }
.bar-label { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 10px; background: var(--track); border-radius: 6px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.bar-fill.warn { background: var(--warn); }
.bar-val { text-align: right; font-weight: 650; }

/* ---------- Voertuigdossier ---------- */
.hero { display: flex; gap: 16px; align-items: center; }
.hero .thumb { width: 120px; height: 86px; border-radius: 14px; }
.hero h1 { font-size: 24px; }
@media (min-width: 960px) { .hero .thumb { width: 180px; height: 124px; } .hero h1 { font-size: 28px; } }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border-radius: var(--radius-sm); overflow: hidden; }
@media (min-width: 720px) { .meta { grid-template-columns: repeat(4, 1fr); } }
.meta div { background: var(--surface); padding: 11px 14px; }
.meta small { display: block; font-size: 12px; color: var(--muted); }
.meta b { font-weight: 620; font-size: 15px; word-break: break-all; }

.stepper { display: flex; gap: 4px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.step { flex: 1; min-width: 112px; display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step i { height: 5px; border-radius: 3px; background: var(--track); }
.step.done i { background: var(--accent); }
.step.current i { background: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
.step.current { color: var(--text); font-weight: 650; }

.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 22px 0 14px; border-bottom: 1px solid var(--border); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  font: inherit; font-size: 14px; font-weight: 580; color: var(--muted);
  border: 0; background: none; padding: 10px 6px 11px; margin-right: 10px; cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button.on { color: var(--text); border-bottom-color: var(--text); }
.tabs button .n { font-size: 11px; background: #eceef2; border-radius: 8px; padding: 1px 6px; margin-left: 4px; color: var(--text-2); }
.tab-panel { display: none; }
.tab-panel.on { display: block; }

.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 720px) { .photos { grid-template-columns: repeat(5, 1fr); } }
.photos a { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--ph-bg); position: relative; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos .main-flag { position: absolute; left: 6px; top: 6px; }

.timeline { display: flex; flex-direction: column; }
.tl { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 15px; top: 40px; bottom: -4px; width: 1.5px; background: var(--border); }
.tl:last-child::before { display: none; }
.tl-ic { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex: none; color: var(--text-2); }
.tl-ic .ic { width: 16px; height: 16px; }
.tl-body { flex: 1; min-width: 0; font-size: 14px; }
.tl-body small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.comment { padding: 12px 14px; background: var(--surface-2); border-radius: 14px; }
.comment + .comment { margin-top: 8px; }
.comment .who { font-size: 13px; font-weight: 650; }
.comment .when { font-size: 12px; color: var(--muted); margin-left: 6px; font-weight: 400; }

.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; word-break: break-word; }

/* ---------- Sleutelbord ---------- */
.keyboard { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
@media (min-width: 640px) { .keyboard { grid-template-columns: repeat(10, 1fr); } }
@media (min-width: 1100px) { .keyboard { grid-template-columns: repeat(15, 1fr); } }
.key {
  aspect-ratio: 1; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 650; background: var(--surface); border: 1px dashed var(--border-strong); color: #a3a9b4;
}
.key.used { border: 0; background: var(--accent-soft); color: var(--accent-text); box-shadow: var(--shadow); }
.key.used.trion { background: #1f2430; color: #f3d38a; }
.key.used small { font-size: 9px; font-weight: 500; opacity: .8; max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Planning ---------- */
.day { margin-bottom: 18px; }
.day-head { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; font-weight: 650; font-size: 15px; }
.day-head .muted { font-weight: 450; font-size: 13px; }
.day-head.today { color: var(--accent); }
.time-pill { font-size: 13px; font-weight: 700; background: var(--surface-2); border-radius: 8px; padding: 6px 8px; min-width: 54px; text-align: center; }

/* ---------- Chauffeur-acties ---------- */
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-grid .btn { padding: 16px 12px; flex-direction: column; gap: 6px; font-size: 14px; }
.action-grid .btn .ic { width: 24px; height: 24px; }

.notice { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.notice .ic { width: 18px; height: 18px; color: var(--muted); margin-top: 1px; }
.notice.warn { background: #fff7e6; color: #8a5300; }

.or-sep { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 13px; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; background: var(--surface-2); padding: 1px 5px; border-radius: 6px; }

/* ---------- Kantoorscherm (narrowcasting, ontwerp 1920×1080) ---------- */
body.tv { overflow: hidden; height: 100vh; background: #eef1f6; cursor: none; }
.tv-stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform: translate(-50%, -50%); transform-origin: center; padding: 48px 64px 40px; display: flex; flex-direction: column; }
.tv-head { display: flex; align-items: center; gap: 32px; margin-bottom: 36px; }
.tv-head .logo-text { font-size: 38px; }
.tv-head .logo-mark { width: 64px; height: 38px; }
.tv-title { flex: 1; font-size: 40px; font-weight: 750; letter-spacing: -.02em; color: var(--text); padding-left: 32px; border-left: 2px solid var(--border-strong); }
.tv-clock { text-align: right; }
.tv-clock b { display: block; font-size: 56px; font-weight: 750; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.tv-clock span { font-size: 22px; color: var(--muted); }
.tv-slide { display: none; flex: 1; min-height: 0; animation: tvIn .6s ease; }
.tv-slide.on { display: block; }
@keyframes tvIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.tv-grid { display: grid; gap: 28px; height: 100%; }
.tv-grid-4 { grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; }
.tv-grid-2 { grid-template-columns: 1fr 1fr; }
.tv-kpi { background: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: 34px 36px; display: flex; flex-direction: column; justify-content: space-between; }
.tv-kpi span { display: flex; align-items: center; gap: 14px; font-size: 26px; color: var(--text-2); font-weight: 560; }
.tv-kpi span .ic { width: 34px; height: 34px; }
.tv-kpi b { font-size: 112px; font-weight: 780; letter-spacing: -.04em; line-height: 1; }
.tv-kpi b em { font-size: 34px; font-style: normal; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.tv-kpi small { font-size: 22px; color: var(--muted); }
.tv-kpi.big { background: var(--brand-dark); color: #fff; }
.tv-kpi.big span, .tv-kpi.big small { color: rgba(255, 255, 255, .75); }
.tv-panel { background: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: 32px 36px; overflow: hidden; }
.tv-panel h2 { display: flex; align-items: center; gap: 14px; font-size: 32px; margin-bottom: 18px; }
.tv-panel h2 .ic { width: 34px; height: 34px; }
.tv-panel h2 em { font-style: normal; color: var(--accent); margin-left: 4px; }
.tv-row { display: flex; align-items: center; gap: 22px; padding: 15px 0; border-top: 1px solid var(--border); }
.tv-row:first-of-type { border-top: 0; }
.tv-row > div { flex: 1; min-width: 0; }
.tv-row b { display: block; font-size: 27px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-row small { display: block; font-size: 21px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-row .badge { font-size: 19px; padding: 6px 16px; }
.tv-time { min-width: 150px; font-size: 24px; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.tv-who { width: 54px; height: 54px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: flex; align-items: center; justify-content: center; font-weight: 750; font-size: 20px; flex: none; }
.tv-empty { font-size: 26px; color: var(--muted); padding: 20px 0; }
.tv-pipeline { display: grid; grid-template-columns: repeat(8, 1fr); gap: 16px; height: 100%; }
.tv-stage-col { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 20px 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.tv-stage-head { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.tv-stage-head .badge { font-size: 17px; padding: 5px 12px; white-space: normal; }
.tv-stage-head b { font-size: 72px; font-weight: 780; letter-spacing: -.04em; line-height: 1; }
.tv-chip { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 18px; font-weight: 600; line-height: 1.25; }
.tv-chip small { display: block; font-size: 15px; color: var(--muted); font-weight: 500; }
.tv-more { font-size: 17px; color: var(--muted); padding: 2px 4px; }
.tv-bars .bars { gap: 26px; margin-top: 20px; }
.tv-bars .bar-row { grid-template-columns: 200px 1fr 70px; font-size: 26px; }
.tv-bars .bar-track { height: 26px; border-radius: 13px; }
.tv-bars .bar-fill { border-radius: 13px; }
.tv-foot { display: flex; align-items: center; gap: 24px; margin-top: 28px; font-size: 20px; color: var(--muted); }
.tv-dots { display: flex; gap: 10px; }
.tv-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--border-strong); }
.tv-dots i.on { background: var(--accent); }
.tv-progress { flex: 1; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.tv-progress i { display: block; height: 100%; width: 0; background: var(--accent); }

/* ---------- Credit ---------- */
.credit { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }
.credit a { color: var(--text-2); font-weight: 600; }
.credit a:hover { color: var(--accent); }
.sidebar .credit { margin: 6px 0 0; }

/* ---------- Leeg / login ---------- */
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty h2 { color: var(--text); margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }
.empty .ic { width: 40px; height: 40px; margin-bottom: 10px; color: #b5bbc6; }

.auth { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .logo { margin-bottom: 26px; }
.auth-card .logo-text { font-size: 26px; }
.auth-card .logo-mark { width: 46px; height: 28px; }

.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.avatar.lg { width: 60px; height: 60px; font-size: 20px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

details.disclosure > summary { list-style: none; cursor: pointer; }
details.disclosure > summary::-webkit-details-marker { display: none; }

dialog {
  border: 0; border-radius: 20px; padding: 20px; width: min(440px, calc(100% - 32px));
  box-shadow: var(--shadow-lg); color: var(--text);
}
dialog::backdrop { background: rgba(10, 14, 22, .35); backdrop-filter: blur(2px); }
dialog h3 { margin-bottom: 12px; }
