/* ============================================================
   Drechtsteden Taxaties — Kansel demo
   Palet: oranje #ff7700, donkerblauw #18364a, lichtblauw #cae0ef.
   Warme papierbasis, boxed vakjes, Barlow Condensed display.
   ============================================================ */
:root {
  --paper: #f6f1e7;
  --paper-2: #efe8d9;
  --card: #fffcf6;
  --ink: #18364a;
  --ink-soft: #51626e;
  --ink-faint: #8b97a0;
  --accent: #ff7700;
  --accent-dark: #e06400;
  --accent-bg: #fdeee0;
  --blue-soft: #cfe2ef;
  --blue-pale: #eaf2f8;
  --green: #2e9e5b;
  --green-bg: #e4f4ea;
  --amber: #b8860b;
  --amber-bg: #fbf2d9;
  --grey: #9aa5b1;
  --red: #c23b2e;
  --line: rgba(24, 54, 74, 0.25);
  --line-soft: rgba(24, 54, 74, 0.13);
  --radius: 8px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: "Barlow", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(24, 54, 74, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--paper-2);
  border-right: 1.5px solid var(--line);
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { padding: 0 4px; }
.brand-logo { width: 100%; display: block; }
.brand-tag {
  display: block; margin-top: 8px;
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600;
}

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-group {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-faint); font-weight: 700;
  padding: 14px 12px 4px;
}
.nav-group:first-child { padding-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600; font-size: 14px;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.nav-item:hover { background: var(--card); border-color: var(--line-soft); }
.nav-item.active {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.nav-ico { color: var(--accent); font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.notif-pill {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 8px 12px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.notif-pill:hover { background: var(--paper); }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 10px 12px;
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.user-meta strong { font-size: 13px; }
.user-meta em { font-style: normal; font-size: 11.5px; color: var(--ink-faint); }

/* ---------- Main ---------- */
.main { padding: 30px 34px 64px; min-width: 0; }
.view { max-width: 1160px; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.05; letter-spacing: 0.01em; }
.page-sub { color: var(--ink-soft); margin-top: 4px; font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  padding: 9px 16px;
  font-weight: 600; font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, transform 0.05s, border-color 0.12s;
  white-space: nowrap;
}
.btn:hover { background: var(--paper-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: var(--line-soft); background: transparent; }
.btn-ghost:hover { background: var(--blue-pale); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Vakjes ---------- */
.box {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 20px;
}
.box-title {
  font-family: var(--display); font-weight: 600; font-size: 18px;
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
  letter-spacing: 0.01em;
}
.box-title .hint { font-family: var(--sans); font-weight: 400; font-size: 12px; color: var(--ink-faint); margin-left: auto; }
.box-title .hint a { color: var(--accent); text-decoration: none; font-weight: 600; }
.box-title .hint a:hover { text-decoration: underline; }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid > * { min-width: 0; }

/* ---------- KPI ---------- */
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; }
.kpi-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); font-weight: 700; }
.kpi-value { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; letter-spacing: 0.01em; margin: 6px 0 4px; }
.kpi-value .unit { font-size: 20px; color: var(--ink-soft); font-weight: 600; }
.kpi-foot { font-size: 12.5px; color: var(--ink-soft); }
.kpi-accent { color: var(--accent); }
/* KPI als link + sparkline (dashboard-polish) */
a.kpi-link { text-decoration: none; color: inherit; cursor: pointer; transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s; position: relative; }
a.kpi-link:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(24, 54, 74, 0.12); }
a.kpi-link:hover .kpi-arrow { transform: translateX(3px); color: var(--accent); }
.kpi-arrow { display: inline-block; transition: transform 0.12s; font-weight: 700; }
.kpi-value { font-size: 34px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpi-value .unit { font-size: 18px; }
.sparkline { width: 100%; height: 40px; display: block; margin: 2px 0 4px; overflow: visible; }
/* Dashboard agenda-mini */
.agenda-mini-list { display: flex; flex-direction: column; }
.agenda-mini { display: flex; align-items: center; gap: 12px; padding: 9px 6px; margin: 0 -6px; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: inherit; border-radius: 6px; transition: background 0.12s; }
.agenda-mini:hover { background: rgba(255, 119, 0, 0.06); }
.agenda-mini:last-child { border-bottom: none; }
.agenda-mini.vandaag .am-date { background: var(--accent); color: #fff; }
.agenda-mini.vandaag .am-dow { color: rgba(255,255,255,0.85); }
.agenda-mini.voorbij { opacity: 0.55; }
.am-date { text-align: center; flex-shrink: 0; width: 44px; padding: 5px 0; border-radius: 8px; background: var(--light, #cae0ef); color: var(--ink); }
.am-dow { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); font-weight: 700; }
.am-day { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1; }
.am-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-time { font-family: var(--display); font-weight: 700; color: var(--accent); margin-right: 4px; font-variant-numeric: tabular-nums; }
.am-sub { font-size: 12px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-foot { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line-soft); font-size: 11.5px; color: var(--ink-faint); text-transform: capitalize; }
/* Afspraak: Nederlands label naast native date/time inputs */
.afspraak-label { margin-top: 10px; padding: 8px 12px; border-radius: 6px; background: rgba(202, 224, 239, 0.35); border: 1px solid var(--line-soft); font-size: 13px; font-weight: 600; color: var(--ink); }
/* AI-resultaatpaneel (typewriter) */
.ai-stream { min-height: 120px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.45; }
.ai-line.ai-h { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.ai-line.ai-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 8px 12px; border: 1.5px solid var(--line-soft); border-radius: var(--radius); background: #fff; }
.ai-line.ai-row .ai-part { grid-column: 1; }
.ai-line.ai-row .muted { grid-column: 1; font-size: 12px; }
.ai-line.ai-row .ai-meta { grid-column: 2; grid-row: 1 / span 2; font-family: var(--display); font-weight: 600; font-size: 13px; white-space: nowrap; text-align: right; color: var(--ink-soft); }
.ai-conf { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 700; font-family: var(--display); }
.ai-conf.hi { background: var(--green-bg, #e5f5ea); color: #1d7a41; }
.ai-conf.mid { background: var(--amber-bg, #fdf3d8); color: #7d5f08; }
.ai-conf.lo { background: #eef1f3; color: var(--ink-faint); }
.ai-line.ai-sum { border-left: 3px solid #7c5cff; background: #faf8ff; border-radius: 0 var(--radius) var(--radius) 0; padding: 10px 14px; font-weight: 600; }
.ai-line.muted { font-size: 12.5px; }
.ai-cursor { display: inline-block; width: 8px; height: 15px; background: #7c5cff; border-radius: 2px; animation: aiBlink 0.8s steps(1) infinite; vertical-align: text-bottom; }
@keyframes aiBlink { 50% { opacity: 0; } }
.ai-progress { height: 3px; background: #efeaff; border-radius: 99px; overflow: hidden; }
.ai-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7c5cff, var(--accent)); transition: width 0.1s linear; }
@media (max-width: 600px) {
  .ai-line.ai-row { grid-template-columns: 1fr; }
  .ai-line.ai-row .ai-meta { grid-column: 1; grid-row: auto; text-align: left; }
}

/* ---------- Status ---------- */
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1.5px solid rgba(0,0,0,0.06); flex-shrink: 0; }
.dot-grey   { background: var(--grey); }
.dot-orange { background: var(--accent); }
.dot-amber  { background: var(--amber); }
.dot-green  { background: var(--green); }
.dot-ink    { background: var(--ink); }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600; border: 1px solid transparent;
}
.badge-blue   { background: var(--blue-pale); color: var(--ink); border-color: var(--line-soft); }
.badge-orange { background: var(--accent-bg); color: var(--accent-dark); border-color: #f3c9a3; }
.badge-green  { background: var(--green-bg); color: #1d7a41; border-color: #b6dfc6; }
.badge-amber  { background: var(--amber-bg); color: #7d5f08; border-color: #e5d3a0; }
.badge-grey   { background: #eef1f3; color: var(--ink-faint); border-color: var(--line-soft); }
.badge-ink    { background: var(--ink); color: #fff; }

/* ---------- Tabellen ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-faint);
  padding: 8px 10px; border-bottom: 1.5px solid var(--line);
  white-space: nowrap; font-weight: 700;
}
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--blue-pale); }
.tbl .num { font-family: var(--display); font-weight: 600; font-size: 16px; text-align: right; white-space: nowrap; }
.tbl .row-link { color: var(--ink); text-decoration: none; font-weight: 600; }
.tbl .row-link:hover { color: var(--accent); }
.muted { color: var(--ink-faint); font-size: 12.5px; }
.avatar-sm {
  width: 26px; height: 26px; border-radius: 50%; background: var(--blue-soft);
  color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; margin-right: 6px; vertical-align: middle;
}

/* ---------- Agenda ---------- */
.agenda { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.agenda-day {
  border: 1.5px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--card);
  min-height: 150px;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0;
}
.agenda-day.today { border-color: var(--accent); background: var(--accent-bg); }
.agenda-dow { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); font-weight: 700; }
.agenda-dnum { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1; }
.agenda-day.today .agenda-dnum { color: var(--accent); }
.agenda-item {
  border: 1px solid var(--line-soft); border-radius: 6px;
  background: #fff; padding: 7px 8px; font-size: 11.5px; line-height: 1.35;
  cursor: pointer; transition: border-color 0.12s, box-shadow 0.12s;
}
.agenda-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.agenda-item .t { font-weight: 700; font-size: 11px; color: var(--ink); }
.agenda-item .v { color: var(--ink-soft); }

/* ---------- Dossier header ---------- */
.dossier-head-box { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.dossier-nr { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--ink-faint); letter-spacing: 0.02em; }
.dossier-vehicle { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.05; }
.dossier-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.dossier-head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab {
  position: relative;
  padding: 10px 18px 12px;
  border: none;
  background: transparent;
  font-weight: 600; font-size: 14px; color: var(--ink-soft);
  cursor: pointer; white-space: nowrap;
  transition: color 0.12s;
}
.tab::after {
  content: "";
  position: absolute; left: 12px; right: 12px; bottom: -1.5px;
  height: 2.5px; border-radius: 2px;
  background: transparent;
  transition: background 0.12s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent); }
.tab.active::after { background: var(--accent); }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.form-grid .field { min-width: 0; }
.form-grid input, .form-grid select, .form-grid textarea { max-width: 100%; }
.field label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); font-weight: 700; }
.field input, .field select, .field textarea {
  border: 1.5px solid var(--line-soft); border-radius: 6px;
  padding: 8px 10px; font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: #fff; width: 100%; min-width: 0; max-width: 100%;
}
/* iOS-Safari: native date/time widgets dwingen een interne min-breedte af
   die grid-cellen oprekt → appearance uitzetten zodat de celbreedte wint */
.form-grid input[type="date"], .form-grid input[type="time"],
.field input[type="date"], .field input[type="time"] {
  -webkit-appearance: none; appearance: none;
  min-width: 0; max-width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }

/* ---------- Schade-tool ---------- */
.schade-head {
  display: grid; grid-template-columns: 24px 1fr 190px 130px 70px 80px 90px;
  gap: 12px; padding: 0 10px 8px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-faint); font-weight: 700;
  border-bottom: 1.5px solid var(--line);
}
.schade-row {
  display: grid; grid-template-columns: 24px 1fr 190px 130px 70px 80px 104px;
  gap: 12px; align-items: center;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.schade-row > :last-child { text-align: right; white-space: nowrap; }
.schade-row:last-of-type { border-bottom: none; }
.schade-row:hover { background: var(--blue-pale); }
.schade-onderdeel { font-weight: 600; font-size: 13.5px; }
.schade-check { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.schade-row.checked .schade-onderdeel { color: var(--ink-faint); }
.schade-toggle { display: inline-flex; border: 1.5px solid var(--line-soft); border-radius: 6px; overflow: hidden; background: #fff; }
.schade-toggle button {
  border: none; background: transparent; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-soft);
  transition: background 0.12s, color 0.12s;
}
.schade-toggle button.on { background: var(--ink); color: #fff; }
.schade-toggle button.on-rep { background: var(--accent); color: #fff; }
.schade-uren, .schade-spuit {
  width: 70px; border: 1.5px solid var(--line-soft); border-radius: 6px;
  padding: 5px 8px; font-family: var(--sans); font-size: 13px; background: #fff; max-width: 100%;
}
.schade-spuit { width: 74px; }
.schade-uitvoering {
  border: 1.5px solid var(--line-soft); border-radius: 6px;
  padding: 5px 6px; font-family: var(--sans); font-size: 12.5px; background: #fff; color: var(--ink);
}
.schade-bedrag { font-family: var(--display); font-weight: 600; font-size: 16px; text-align: right; white-space: nowrap; }
.schade-totaal {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 16px; padding-top: 14px; border-top: 1.5px solid var(--line);
  flex-wrap: wrap;
}
.schade-totaal .total-lab { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); font-weight: 700; }
.schade-totaal .total { font-family: var(--display); font-weight: 700; font-size: 34px; }
.schade-totaal .total .unit { font-size: 18px; color: var(--ink-soft); font-weight: 600; }
.schade-actions { display: flex; gap: 8px; }

/* ---------- Templates ---------- */
.tpl-card { display: flex; flex-direction: column; }
.chk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 14px; max-height: 320px; overflow-y: auto; margin-top: 6px; }
.chk-line {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 6px 8px;
  border: 1.5px solid var(--line-soft); border-radius: 6px; cursor: pointer; background: #fff;
}
.chk-line:has(input:checked) { border-color: var(--accent); background: var(--accent-pale, #fff7ef); }
.chk-line input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- Domein ---------- */
.dom-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--line-soft);
}
.dom-row:last-child { border-bottom: none; }
.color-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; border: 1px solid rgba(0,0,0,0.15); vertical-align: -2px; }

/* ---------- AI-assistent ---------- */
.btn-ai {
  border: 1.5px solid #7c5cff; color: #5b3df5; background: #f3f0ff;
}
.btn-ai:hover { background: #e9e4ff; }
.ai-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; cursor: pointer;
  border: 1.5px solid var(--line-soft); border-radius: var(--radius); background: #fff;
  transition: border-color 0.12s, background 0.12s; margin-bottom: 8px;
}
.ai-card:hover { border-color: #7c5cff; background: #faf8ff; }
.ai-ico {
  width: 38px; height: 38px; border-radius: 10px; background: #f0ecff; color: #5b3df5;
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.ai-note {
  border-left: 3px solid #7c5cff; background: #faf8ff; border-radius: 0 var(--radius) var(--radius) 0;
  padding: 10px 14px; font-size: 13.5px; color: var(--ink);
}

/* ---------- Notities ---------- */
.note {
  border: 1.5px solid var(--line-soft); border-radius: var(--radius);
  padding: 12px 14px; background: #fff; margin-bottom: 10px;
}
.note-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-faint); margin-bottom: 5px; }
.note-meta strong { color: var(--ink); font-size: 13px; }
.note-body { font-size: 13.5px; }
.tag-mention {
  display: inline-block; background: var(--blue-pale); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 1px 8px; font-size: 12px; font-weight: 600; color: var(--ink);
}
.tag-me { background: var(--accent-bg); border-color: #f3c9a3; color: var(--accent-dark); }
.note-input { width: 100%; border: 1.5px solid var(--line-soft); border-radius: 6px; padding: 10px 12px; font-family: var(--sans); font-size: 14px; resize: vertical; background: #fff; }

/* ---------- Collega's ---------- */
.collega-row {
  display: grid; grid-template-columns: 1fr 170px 100px 44px;
  gap: 12px; align-items: center; padding: 12px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.collega-row:last-of-type { border-bottom: none; }
.collega-row.head {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-faint); font-weight: 700;
}
.collega-row:hover { background: var(--blue-pale); }
.role-chip { font-size: 12px; font-weight: 600; border: 1px solid var(--line-soft); border-radius: 20px; padding: 3px 10px; display: inline-block; background: #fff; }
.switch { position: relative; width: 42px; height: 23px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl {
  position: absolute; inset: 0; background: var(--grey); border-radius: 20px; cursor: pointer; transition: background 0.15s;
}
.switch .sl::before {
  content: ""; position: absolute; width: 17px; height: 17px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: transform 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.switch input:checked + .sl { background: var(--green); }
.switch input:checked + .sl::before { transform: translateX(19px); }
.switch input:disabled + .sl { opacity: 0.4; cursor: not-allowed; }

/* ---------- Rapportage ---------- */
.bar-row { display: grid; grid-template-columns: 130px 1fr 110px; gap: 14px; align-items: center; padding: 8px 0; }
.bar-row .who { font-weight: 600; font-size: 13.5px; }
.bar-row .track { height: 20px; background: var(--blue-pale); border: 1px solid var(--line-soft); border-radius: 6px; overflow: hidden; display: flex; }
.bar-row .track > span { display: block; height: 100%; }
.bar-row .track .bank { background: var(--ink); }
.bar-row .track .cash { background: var(--accent); }
.bar-row .amt { font-family: var(--display); font-weight: 600; font-size: 15px; text-align: right; white-space: nowrap; }
.legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 12px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }

/* ---------- Facturatie ---------- */
.fact-row { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-bottom: 1px solid var(--line-soft); }
.fact-row:last-of-type { border-bottom: none; }
.fact-row:hover { background: var(--blue-pale); }
.fact-row .fnr { font-family: var(--display); font-weight: 600; color: var(--ink-faint); font-size: 14px; width: 96px; flex-shrink: 0; }
.fact-row .fwho { flex: 1; min-width: 0; }
.snelstart-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-soft); border-radius: 20px; padding: 3px 10px;
  font-size: 11.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
}
.snelstart-pill.synced { background: var(--green-bg); border-color: #b6dfc6; color: #1d7a41; }
.snelstart-pill.waiting { background: var(--amber-bg); border-color: #e5d3a0; color: #7d5f08; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(24, 54, 74, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 18px 50px rgba(24, 54, 74, 0.3);
  animation: slideUp 0.18s ease;
}
@keyframes slideUp { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 0;
}
.modal-title { font-family: var(--display); font-weight: 700; font-size: 24px; }
.modal-title .hint { display: block; font-family: var(--sans); font-weight: 400; font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0; margin-top: 2px; }
.modal-close {
  border: none; background: none; font-size: 22px; color: var(--ink-faint);
  cursor: pointer; line-height: 1; padding: 4px;
}
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }

/* ---------- Mobiele bottom tab-bar + FAB ---------- */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 45;
  background: var(--card);
  border-top: 1.5px solid var(--line);
  padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr);
  box-shadow: 0 -2px 12px rgba(24, 54, 74, 0.06);
}
.bn-item {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 1px;
  color: var(--ink-faint);
  text-decoration: none; font-size: 10px; font-weight: 600;
  border-radius: 8px;
  transition: color 0.12s, background 0.12s;
  background: none; border: none; cursor: pointer; font-family: var(--sans);
}
.bn-ico { font-size: 20px; line-height: 1; }
.bn-item.active { color: var(--accent); }
.bn-item.active .bn-ico { color: var(--accent); }

/* Meer-menu (mobiel) */
.meer-menu {
  position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 47;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  display: flex; flex-direction: column;
}
.meer-menu[hidden] { display: none; }
.meer-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: 14px;
}
.meer-item:hover { background: var(--blue-pale); }
.meer-item .nav-ico { color: var(--ink-faint); }

.fab {
  display: none;
  position: fixed; right: 18px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 46;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff;
  border: none;
  font-size: 30px; line-height: 1;
  box-shadow: 0 6px 18px rgba(224, 100, 0, 0.4);
  cursor: pointer;
  align-items: center; justify-content: center;
  transition: transform 0.1s, background 0.12s;
}
.fab:active { transform: scale(0.92); }
.fab:hover { background: var(--accent-dark); }

/* FAB niet tonen op dossier-detail (daar staan al actieknoppen) */
body.fab-hidden .fab { display: none; }

/* Catalogus-knoppen: lange onderdeelnamen wrappen binnen de box */
.catalog-btn { white-space: normal; text-align: left; max-width: 100%; height: auto; line-height: 1.3; }
.catalog-search {
  width: 100%; margin-bottom: 10px;
  border: 1.5px solid var(--line-soft); border-radius: 6px;
  padding: 8px 12px; font-family: var(--sans); font-size: 14px; background: #fff;
}
.catalog-search:focus { outline: none; border-color: var(--accent); }
.catalog-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 380px; overflow-y: auto; padding-right: 2px; }

/* ---------- Save-status (zichtbare opslaan-bevestiging) ---------- */
.save-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: #1d7a41;
  background: var(--green-bg); border: 1px solid #b6dfc6;
  border-radius: 20px; padding: 5px 12px;
  white-space: nowrap;
}
.save-status.flash { animation: saveFlash 0.6s ease; }
@keyframes saveFlash {
  0% { background: var(--green); color: #fff; transform: scale(1.04); }
  100% { background: var(--green-bg); color: #1d7a41; transform: none; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 70;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: var(--card); padding: 13px 18px; font-weight: 600; font-size: 14px;
  box-shadow: 0 6px 24px rgba(24,54,74,0.22);
  max-width: 360px;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast .t { display: block; font-size: 11.5px; color: var(--ink-faint); font-weight: 400; margin-top: 2px; }

/* ---------- Foto's: grid, kaarten, lightbox, AI-overlay ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.photo-tile {
  aspect-ratio: 4/3;
  border: 1.5px solid var(--line-soft); border-radius: var(--radius);
  background: var(--blue-pale);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint); font-size: 12.5px; font-weight: 600;
}
.photo-card {
  margin: 0; cursor: zoom-in;
  border: 1.5px solid var(--line-soft); border-radius: 10px; overflow: hidden;
  background: #fff; box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.photo-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(24, 54, 74, 0.16); border-color: var(--line); }
.photo-card.is-schade { border-color: #f3c9a3; }
.photo-img { position: relative; aspect-ratio: 4/3; background: #1b2630; overflow: hidden; }
.photo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.photo-badge-new { background: var(--green); }
.photo-num {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(11, 20, 27, 0.7); color: #fff; font-family: var(--display); font-weight: 600;
  font-size: 13px; padding: 1px 7px; border-radius: 4px;
}
.photo-card figcaption { padding: 9px 11px 10px; }
.photo-cap { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.photo-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 5px; font-size: 11.5px; color: var(--ink-faint); flex-wrap: wrap; }
.ai-chip {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid #f3c9a3; background: var(--accent-bg); color: var(--accent-dark);
  font-family: var(--sans); font-weight: 700; font-size: 11.5px;
  padding: 3px 9px; border-radius: 20px; cursor: pointer; white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.ai-chip:hover, .ai-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.photo-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.photo-upload-btn { cursor: pointer; }

/* Lightbox */
.modal.modal-lightbox { max-width: 1040px; background: #0f171d; border-color: #2a3a46; color: #fff; overflow: hidden; }
.lightbox { display: flex; flex-direction: column; }
.lb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px 10px; }
.lb-title { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.15; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lb-sub { font-size: 12.5px; color: #9fb1bd; margin-top: 2px; }
.modal-lightbox .modal-close { color: #9fb1bd; }
.modal-lightbox .modal-close:hover { color: #fff; }
.lb-stage { position: relative; display: flex; align-items: center; background: #05090c; }
.lb-img-wrap { position: relative; flex: 1; min-width: 0; }
.lb-img-wrap img { width: 100%; max-height: 70vh; object-fit: contain; display: block; aspect-ratio: 4/3; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(11, 20, 27, 0.65); color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding-bottom: 4px;
  transition: background 0.12s;
}
.lb-nav:hover { background: var(--accent); border-color: var(--accent); }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-foot { display: flex; align-items: center; gap: 12px; padding: 12px 20px 16px; flex-wrap: wrap; }
.lb-foot .muted { color: #9fb1bd; }
.lb-dots { margin-left: auto; display: flex; gap: 6px; }
.lb-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.25); cursor: pointer; }
.lb-dots span.dmg { background: rgba(255, 119, 0, 0.45); }
.lb-dots span.on { background: #fff; transform: scale(1.25); }
.lb-dots span.on.dmg { background: var(--accent); }

/* AI-schadeherkenning overlay */
.ai-box {
  position: absolute; border: 2.5px solid var(--accent); border-radius: 6px;
  box-shadow: 0 0 0 2000px rgba(5, 9, 12, 0.35), 0 0 18px rgba(255, 119, 0, 0.6);
  opacity: 0; transform: scale(1.08); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.ai-box.show { opacity: 1; transform: scale(1); animation: aiPulse 1.8s ease-in-out infinite; }
@keyframes aiPulse { 0%, 100% { box-shadow: 0 0 0 2000px rgba(5,9,12,0.35), 0 0 12px rgba(255,119,0,0.4); } 50% { box-shadow: 0 0 0 2000px rgba(5,9,12,0.35), 0 0 26px rgba(255,119,0,0.9); } }
.ai-box-label {
  position: absolute; left: -2.5px; bottom: 100%; margin-bottom: 6px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 12.5px;
  padding: 3px 9px; border-radius: 5px; white-space: nowrap;
}
.ai-box.lbl-right .ai-box-label { left: auto; right: -2.5px; }
.ai-box-corner { position: absolute; width: 12px; height: 12px; border: 3px solid #fff; }
.ai-box-corner.c1 { top: -3px; left: -3px; border-right: none; border-bottom: none; }
.ai-box-corner.c2 { top: -3px; right: -3px; border-left: none; border-bottom: none; }
.ai-box-corner.c3 { bottom: -3px; left: -3px; border-right: none; border-top: none; }
.ai-box-corner.c4 { bottom: -3px; right: -3px; border-left: none; border-top: none; }
@media (max-width: 640px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .photo-card figcaption { padding: 7px 9px 9px; }
  .photo-cap { font-size: 12.5px; }
  .ai-chip { font-size: 11px; padding: 2px 8px; }
  .lb-head { padding: 12px 14px 8px; } .lb-title { font-size: 18px; }
  .lb-nav { width: 34px; height: 34px; font-size: 24px; }
  .lb-foot { padding: 10px 14px 14px; }
  .ai-box-label { font-size: 11px; }
}
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 10px 14px; background: #fff;
}
.doc-row .doc-ico { font-size: 18px; }
.doc-row .doc-name { font-weight: 600; font-size: 13.5px; }
.doc-row .doc-sub { font-size: 12px; color: var(--ink-faint); }

.empty {
  border: 1.5px dashed var(--line-soft); border-radius: var(--radius);
  padding: 26px; text-align: center; color: var(--ink-faint); font-size: 13.5px;
}

/* ---------- Print (PDF rapport) ---------- */
@media print {
  body { background: #fff; }
  .sidebar, .page-head .btn, .schade-actions, .no-print, .tabs, .modal-backdrop, .toast,
  .bottom-nav, .fab, .dossier-head-actions { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
  .view { max-width: none; }
  .box { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
  .page-title { font-size: 26px; }
  .print-header { display: block !important; border-bottom: 2px solid #000; padding-bottom: 12px; margin-bottom: 18px; }
  .print-header .ph-logo { max-width: 240px; }
  .print-header .ph-meta { font-size: 12px; color: #444; margin-top: 6px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .schade-head, .schade-row { grid-template-columns: 24px 1fr 150px 70px 80px; }
}
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .agenda { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }

  /* ---------- Sidebar → compacte app-header ---------- */
  .sidebar {
    position: sticky; top: 0; z-index: 40;
    height: auto;
    flex-direction: row; align-items: center;
    padding: 10px 14px; gap: 10px;
    background: var(--card);
    border-right: none;
    border-bottom: 1.5px solid var(--line);
    max-width: 100%;
    overflow: hidden;
  }
  .brand { flex: 1; min-width: 0; }
  .brand-logo { max-width: 168px; }
  .brand-tag { display: none; }
  .nav { display: none; } /* vervangen door bottom-nav */
  .nav-group { display: none; }
  .sidebar-foot { margin-left: auto; }
  .notif-pill { display: none; }
  .user-chip { border: none; padding: 0; background: transparent; }
  .user-avatar { width: 36px; height: 36px; font-size: 12px; }
  .user-meta { display: none; }

  .main { padding: 16px 14px calc(120px + env(safe-area-inset-bottom)); }
  .page-title { font-size: 26px; }
  .page-head { margin-bottom: 16px; }
  .page-sub { font-size: 13px; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 14px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; } /* 2x2 KPI's: minder scrollen */

  .box { padding: 16px; }
  .kpi { padding: 14px 16px; }
  .kpi-value { font-size: 30px; }
  .kpi-label { font-size: 10.5px; }

  .agenda { grid-template-columns: 1fr; }
  .agenda-day { min-height: 0; }

  /* ---------- Tabellen → kaarten ---------- */
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr {
    border: 1.5px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 6px 4px; margin-bottom: 10px;
    background: var(--card);
  }
  .tbl td { border: none; padding: 4px 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .tbl td::before {
    content: attr(data-label);
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--ink-faint); font-weight: 700; flex-shrink: 0;
  }
  .tbl td.num { text-align: right; }
  .tbl tr:hover td { background: transparent; }
  .tbl td .muted br { display: none; }

  /* ---------- Schade-tool ---------- */
  .schade-head { display: none; }
  .schade-row { grid-template-columns: 30px 1fr; row-gap: 6px; padding: 13px 10px; }
  .schade-row > *:nth-child(1) { grid-column: 1; grid-row: 1; align-self: start; margin-top: 2px; }
  .schade-row > *:nth-child(2) { grid-column: 2; grid-row: 1; font-size: 14px; }
  .schade-row > *:nth-child(3) { grid-column: 2; grid-row: 2; }
  .schade-row > *:nth-child(4) { grid-column: 2; grid-row: 3; width: 100%; }
  .schade-row > *:nth-child(5) { grid-column: 2; grid-row: 4; width: 70px; }
  .schade-row > *:nth-child(6) { grid-column: 2; grid-row: 5; width: 90px; }
  .schade-row > *:nth-child(7) { grid-column: 2; grid-row: 6; }
  .schade-check { width: 24px; height: 24px; }
  .schade-toggle button { padding: 7px 16px; font-size: 13px; }
  .schade-totaal { flex-direction: column; align-items: stretch; gap: 10px; }
  .schade-actions { width: 100%; }
  .schade-actions .btn { flex: 1; }

  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
  .tab { white-space: nowrap; flex-shrink: 0; }

  .collega-row { grid-template-columns: 1fr 44px; }
  .collega-row .hide-m { display: none; }
  .collega-row.head { display: none; }
  .collega-row > *:nth-child(2) { display: none; }

  .fact-row { flex-wrap: wrap; row-gap: 6px; }
  .fact-row .fnr { width: auto; }

  .dossier-head-box { flex-direction: column; align-items: stretch; gap: 12px; }
  .dossier-head-actions { margin-left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .dossier-head-actions .btn { width: 100%; }
  .dossier-head-actions .save-status { grid-column: 1 / -1; justify-content: center; }
  .dossier-vehicle { font-size: 24px; }
  .bar-row { grid-template-columns: 1fr; row-gap: 4px; }
  .bar-row .amt { text-align: left; }

  .note-input { font-size: 16px; }
  input, select, textarea { font-size: 16px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .field:only-child { grid-column: span 2; }
  .modal { max-width: 100%; margin: 10px; }
  .modal-body { padding: 14px 16px 16px; }

  /* ---------- App-elementen aan ---------- */
  .bottom-nav { display: grid; }
  .fab { display: flex; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); right: 14px; left: 14px; max-width: none; }
}

/* ============================================================
   RAPPORT (#/rapport/<id>) — A4 print-ready taxatierapport
   ============================================================ */
.rapport-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 auto 18px; max-width: 210mm;
}
.rapport-toolbar .btn { text-decoration: none; }
.rapport {
  --rp-ink: #18364a; --rp-accent: #ff7700; --rp-light: #cae0ef; --rp-line: #d5dee5;
  background: #fff; color: var(--rp-ink); font-family: var(--sans);
  width: 210mm; max-width: 100%; min-height: 297mm; margin: 0 auto;
  padding: 16mm 16mm 14mm; box-sizing: border-box;
  box-shadow: 0 2px 18px rgba(24, 54, 74, 0.16); border-top: 6px solid var(--rp-accent);
  font-size: 11.5px; line-height: 1.45; position: relative;
}
.rp-head { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 14px; border-bottom: 2px solid var(--rp-ink); }
.rp-brand { display: flex; flex-direction: column; gap: 10px; }
.rp-logo { width: 190px; height: auto; display: block; }
.rp-company { font-size: 10.5px; color: #51626e; line-height: 1.5; }
.rp-company strong { color: var(--rp-ink); font-size: 12px; }
.rp-meta { text-align: right; min-width: 200px; }
.rp-kicker { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; color: var(--rp-accent); font-weight: 700; }
.rp-nr { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1; margin: 2px 0 8px; }
.rp-meta-tbl { margin-left: auto; border-collapse: collapse; font-size: 10.5px; }
.rp-meta-tbl th { text-align: right; padding: 1px 8px 1px 0; color: #8b97a0; font-weight: 500; }
.rp-meta-tbl td { text-align: left; padding: 1px 0; font-weight: 600; }
.rp-akkoord { display: inline-block; background: #e4f4ea; color: #1d7a41; border: 1px solid #b6dfc6; border-radius: 4px; padding: 1px 7px; font-size: 10px; }
.rp-title { font-family: var(--display); font-weight: 700; font-size: 26px; margin: 14px 0 4px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rp-kenteken {
  font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: 0.08em;
  background: #f5c400; color: #111; border: 1.5px solid #111; border-radius: 4px; padding: 2px 10px;
}
.rp-section { margin-top: 16px; break-inside: avoid; }
.rp-section h2 {
  font-family: var(--display); font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 8px; padding: 4px 0 4px 10px; border-left: 4px solid var(--rp-accent); background: #eef5fa;
}
.rp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.rp-tbl { width: 100%; border-collapse: collapse; font-size: 11px; }
.rp-tbl th, .rp-tbl td { padding: 4px 6px; border-bottom: 1px solid var(--rp-line); vertical-align: top; text-align: left; }
.rp-tbl .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rp-kv th { width: 44%; color: #51626e; font-weight: 500; }
.rp-kv td { font-weight: 600; }
.rp-calc thead th, .rp-refs thead th { background: var(--rp-ink); color: #fff; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; border: none; }
.rp-calc tfoot td, .rp-refs tfoot td { border-bottom: none; padding: 3px 6px; color: #51626e; }
.rp-calc tfoot td:first-child, .rp-refs tfoot td:first-child { text-align: right; }
.rp-calc tfoot .rp-sub td { border-top: 1px solid var(--rp-ink); color: var(--rp-ink); font-weight: 600; }
.rp-calc tfoot .rp-total td { background: var(--rp-ink); color: #fff; font-family: var(--display); font-size: 15px; font-weight: 700; padding: 7px 8px; }
.rp-conditie { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 10.5px; }
.rp-conditie em { font-style: normal; color: #8b97a0; margin-right: 4px; }
.rp-muted { color: #8b97a0; font-size: 10.5px; font-weight: 400; }
.rp-waarde { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.rp-w { border: 1px solid var(--rp-line); border-radius: 6px; padding: 8px 12px; background: #fafcfd; }
.rp-w em { display: block; font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: #51626e; }
.rp-w strong { display: block; font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.15; }
.rp-w span { font-size: 10px; color: #8b97a0; }
.rp-w-accent { background: #fff3e8; border-color: #f3c9a3; }
.rp-w-accent strong { color: #e06400; }
.rp-fotos { columns: 3; column-gap: 18px; list-style: none; margin: 0; padding: 0; font-size: 10.5px; }
.rp-fotos li { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; border-bottom: 1px dotted var(--rp-line); break-inside: avoid; }
.rp-fotos .rp-muted { margin-left: auto; font-size: 9.5px; }
.rp-foto-nr { font-family: var(--display); font-weight: 700; color: var(--rp-accent); width: 20px; }
.rp-sign { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; margin-top: 22px; }
.rp-sign p { margin: 0; font-size: 11px; }
.rp-sign-block { font-size: 10.5px; padding-top: 6px; }
.rp-sign-line { border-bottom: 1px solid var(--rp-ink); height: 46px; margin-bottom: 6px; display: flex; align-items: flex-end; }
.rp-handtekening { font-family: "Brush Script MT", "Segoe Script", "Comic Sans MS", cursive; font-size: 24px; color: #1f4b6e; transform: rotate(-4deg); padding: 0 8px 4px; }
.rp-foot { margin-top: 26px; padding-top: 10px; border-top: 1px solid var(--rp-line); font-size: 9.5px; color: #51626e; }
.rp-foot > div:first-child { font-weight: 600; color: var(--rp-ink); }
.rp-disclaimer { margin-top: 4px; line-height: 1.4; }
.rp-foot-nr { margin-top: 6px; text-align: right; color: #8b97a0; }
body.rapport-mode .main { background: #e6edf2; }

/* ---------- Tijdlijn ---------- */
.tijdlijn { list-style: none; margin: 0; padding: 4px 0 0 0; position: relative; }
.tijdlijn::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: var(--line-soft); }
.tl-item { display: flex; gap: 14px; padding: 6px 0; position: relative; }
.tl-dot { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; background: var(--green); border: 3px solid var(--card); box-shadow: 0 0 0 2px var(--green); margin-top: 1px; }
.tl-done .tl-dot::after { content: "✓"; color: #fff; font-size: 10px; font-weight: 700; display: block; text-align: center; line-height: 14px; }
.tl-open { opacity: 0.45; }
.tl-open .tl-dot { background: var(--card); box-shadow: 0 0 0 2px var(--grey); }
.tl-extra .tl-dot { background: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.tl-datum { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 700; }
.tl-titel { font-weight: 600; font-size: 14px; }
.tl-sub { font-size: 12.5px; color: var(--ink-soft); }
@media (min-width: 761px) {
  .tijdlijn { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 14px 8px; padding-top: 10px; }
  .tijdlijn::before { display: none; }
  .tl-item { flex-direction: column; gap: 8px; padding: 0 4px; }
  .tl-item::before { content: ""; position: absolute; top: 10px; left: 26px; right: -8px; height: 2px; background: var(--line-soft); }
  .tl-item:last-child::before { display: none; }
  .tl-done + .tl-done::before, .tl-done:has(+ .tl-done)::before { background: var(--green); opacity: 0.5; }
}

/* ---------- Verstuur naar klant ---------- */
.btn-verstuur { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn-verstuur:hover { background: #0f2636; }
.verstuur-tabs .tab { font-size: 13.5px; }
.verstuur-meta { font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.verstuur-preview {
  font-family: var(--sans); font-size: 13px; line-height: 1.5; white-space: pre-wrap; margin: 0;
  background: var(--blue-pale); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 12px 14px; max-height: 260px; overflow: auto;
}
.verstuur-link { font-size: 12.5px; word-break: break-all; }
.verstuur-link a { color: var(--accent); font-weight: 600; }
.verstuur-status.ok { background: var(--green-bg); color: #1d7a41; border: 1px solid #b6dfc6; border-radius: var(--radius); padding: 8px 12px; font-size: 13px; font-weight: 600; }

/* ---------- Print: alleen het rapport, schone A4 ---------- */
@page { size: A4; margin: 0; }
@media print {
  html, body { background: #fff !important; }
  .rapport-toolbar, .no-print, .sidebar, .bottom-nav, .fab, .toast, .modal-backdrop, .meer-menu { display: none !important; }
  body.rapport-mode .app { display: block; }
  body.rapport-mode .main { padding: 0; background: #fff; }
  body.rapport-mode .view { max-width: none; padding: 0; margin: 0; }
  body.rapport-mode .rapport { box-shadow: none; width: 210mm; min-height: 0; margin: 0; padding: 14mm 15mm 12mm; border-top: 6px solid #ff7700; }
  .rapport, .rapport * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.rapport-mode .print-header { display: none !important; }
}
@media (max-width: 760px) {
  .rapport { width: 100%; padding: 18px 14px; min-height: 0; font-size: 11px; }
  .rp-head { flex-direction: column; }
  .rp-meta { text-align: left; }
  .rp-meta-tbl { margin-left: 0; }
  .rp-meta-tbl th { text-align: left; padding-right: 10px; }
  .rp-cols, .rp-sign { grid-template-columns: 1fr; }
  .rp-waarde { grid-template-columns: 1fr; }
  .rp-fotos { columns: 1; }
  .rp-calc-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px; }
  .rp-calc { font-size: 10px; min-width: 520px; }
  .rp-calc th, .rp-calc td { padding: 3px 3px; }
  .rapport-toolbar .btn { flex: 1 1 auto; text-align: center; }
  .dossier-head-actions { grid-template-columns: 1fr 1fr; }
}
