:root {
  --bg: #0f172a;
  --bg-2: #1e293b;
  --bg-page: #f1f5f9;
  --card: #ffffff;
  --surface-2: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #1856a8;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --radius: 14px;
  --tap: 56px;
}

html[data-theme="dark"] {
  --bg-page: #0b1220;
  --card: #1e293b;
  --surface-2: #273449;
  --ink: #e5e9f0;
  --muted: #94a3b8;
  --line: #334155;
  --brand: #3b82f6;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-page);
  color: var(--ink);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* Sticky-footer layout: the page fills at least the viewport so the footer
   banner sits at the bottom on tall/big screens instead of leaving whitespace. */
body { min-height: 100dvh; display: flex; flex-direction: column; }
/* width:100% keeps the centered max-width column (a flex item with auto side
   margins would otherwise shrink-wrap to its content and look mobile-narrow). */
body > .app { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
body > .site-footer { flex-shrink: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(120deg, #0b2545 0%, #164a8f 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(11, 37, 69, .25);
}
.brand { display: flex; align-items: center; gap: 12px; flex: 1; font-weight: 700; font-size: 18px; }
.brand-stack { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; }
.brand-sub { font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, .72); }
.topbar button {
  min-width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.topbar button:active { background: rgba(255,255,255,.25); }

/* Left-corner navigation: "Terug" (previous page) + "Home". Icon + short label. */
.topbar .navbtn {
  min-width: 0;
  width: auto;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
}
.navbtn-ico { font-size: 20px; line-height: 1; }
@media (max-width: 420px) {
  .navbtn-txt { display: none; }
  .topbar .navbtn { padding: 0; min-width: 44px; justify-content: center; }
}

/* View indicator (Monteur / Receptie) — a compact pill, tap to switch. */
.role-badge {
  min-width: 0 !important;
  height: 44px;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,.35) !important;
}
.role-badge.mechanic { background: rgba(37, 99, 235, .35) !important; }
.role-badge.reception { background: rgba(16, 185, 129, .30) !important; }

.app { padding: 16px; max-width: 1100px; margin: 0 auto; }
.review-title { font-size: 24px; margin: 20px 0 4px; }
.quote-office { border-block: 1px solid var(--line); margin: 16px 0; }
.tire-size-field { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 14px; }
.tire-size-field[hidden] { display: none; }
.quote-dialog select[name=reason] { display: block; width: 100%; margin: 8px 0 16px; }
#cssConnector h2 { font-size: 20px; }
#cssConnector input { min-height: 44px; max-width: 100%; padding: 8px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.service-admin-link { padding: 16px 0; }
.service-admin { max-width: none; }
.service-console h1, .service-lock h1 { font-size: 24px; margin: 16px 0; }
.service-toolbar, .service-agent-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.service-feedback { overflow-wrap: anywhere; min-height: 24px; }
.service-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 24px 0; padding: 20px 0; border-block: 1px solid var(--line); }
.service-metrics dt, .service-agent-data dt { color: var(--muted); font-size: 14px; }
.service-metrics dd { margin: 6px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.service-agent { padding: 16px 0; border-bottom: 1px solid var(--line); }
.service-agent h2 { margin: 0; overflow-wrap: anywhere; }
.service-agent-data { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); gap: 8px 16px; }
.service-agent-data dd { margin: 0; overflow-wrap: anywhere; }
.service-toggle { display: flex; align-items: center; gap: 16px; min-height: 44px; }
.service-setting-status { color: var(--muted); font-size: 14px; }
.service-warning { background: var(--surface-2); border-left: 4px solid var(--warn); padding: 12px; overflow-wrap: anywhere; }
.service-logs > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.service-logs > summary::before { content: '+'; margin-right: 8px; }
.service-logs[open] > summary::before { content: '-'; }
.service-log-scroll { overflow-x: auto; margin-top: 12px; }
.service-log-scroll table { border-collapse: collapse; width: 100%; background: var(--card); font-size: 14px; }
.service-log-scroll th, .service-log-scroll td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); }
.service-log-scroll th { background: var(--surface-2); color: var(--muted); }
.service-lock { max-width: 480px; margin: 32px auto; }
.service-lock input { display: block; width: 100%; font: inherit; min-height: 56px; margin-top: 8px; padding: 12px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.service-lock [role=alert] { color: var(--danger); }
.service-console input[data-code] { width: 320px; display: block; margin-top: 8px; }
.service-console :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
#cssConnector .switch input { min-height: 0; padding: 0; }
#cssConnector .switch:focus-within { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 999px; }
@media (max-width: 600px) { .service-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .service-agent-data { grid-template-columns: minmax(0, 1fr); } }
.quote-public .app { max-width: 1100px; margin-inline: auto; }
.quote-office > summary, .quote-findings > summary { min-height: 56px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.quote-office > summary::before, .quote-findings > summary::before { content: '+'; margin-right: 12px; font-size: 22px; }
.quote-office[open] > summary::before, .quote-findings[open] > summary::before { content: '-'; }
.quote-office-body { padding: 16px 0 24px; }
.quote-office h2, .quote-confirmation h2 { font-size: 20px; margin: 0 0 16px; }
.quote-table-scroll { overflow-x: auto; width: 100%; min-width: 0; }
.quote-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); }
.quote-table th { background: var(--surface-2); text-align: left; padding: 12px; color: var(--muted); }
.quote-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.quote-table td:first-child { min-width: 210px; max-width: 500px; overflow-wrap: anywhere; }
.quote-table td:not(:first-child) { font-variant-numeric: tabular-nums; }
.quote-table small { display: block; color: var(--muted); margin-top: 5px; }
.quote-totals { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; margin: 20px 0; padding: 16px 0; border-bottom: 1px solid var(--line); max-width: 520px; }
.quote-totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.quote-controls, .quote-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.quote-heading h1 { flex: 1; font-size: 24px; margin: 0; }
.quote-warning { padding: 12px 16px; border-left: 4px solid var(--warn); background: var(--surface-2); overflow-wrap: anywhere; }
ul.quote-warning { padding-left: 40px; list-style-position: outside; }
ul.quote-warning li { padding-left: 4px; margin-block: 6px; }
.quote-feedback, .quote-dialog [role=alert] { color: var(--danger); overflow-wrap: anywhere; }
.quote-check { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.quote-check input, .quote-choice input { width: 20px; height: 20px; accent-color: var(--brand); flex-shrink: 0; }
.quote-release { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.quote-release h3 { font-size: 17px; margin: 0; }
.quote-dialog { width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 24px); background: var(--card); color: var(--ink); padding: 20px; border: 1px solid var(--line); border-radius: 8px; }
.quote-dialog::backdrop { background: rgb(0 0 0 / 55%); }
.quote-dialog h2 { font-size: 20px; }
.quote-phone-line { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.quote-dialog textarea, .quote-dialog select, .quote-message textarea { font: inherit; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; min-height: 44px; padding: 10px; max-width: 100%; }
.quote-dialog textarea, .quote-message textarea { display: block; width: 100%; margin: 8px 0 16px; resize: vertical; }
.quote-choice { border: 0; padding: 0; margin: 0; min-width: 145px; }
.quote-choice label { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.quote-confirmation { border-top: 3px solid var(--brand); padding: 20px 0; margin-top: 20px; }
.quote-answer { border-left: 4px solid var(--ok); padding: 12px; background: var(--surface-2); }
.quote-finding { padding: 16px 0; border-top: 1px solid var(--line); }
.quote-finding h3 { font-size: 17px; }
@media (max-width: 600px) { .quote-phone-line { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .quote-public .quote-table, .quote-public .quote-table tbody { display: block; }
  .quote-public .quote-table thead { display: none; }
  .quote-public .quote-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 2px solid var(--line); }
  .quote-public .quote-table td:first-child, .quote-public .quote-table td:last-child { grid-column: 1 / -1; min-width: 0; max-width: none; }
  .quote-public .quote-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
  .quote-public .quote-table td:last-child { background: var(--surface-2); }
  .quote-public .quote-choice { display: flex; flex-wrap: wrap; gap: 8px 24px; }
}
@media print { .quote-heading button, .quote-controls, .quote-confirmation button, #quoteChoices > button { display: none !important; } }
.review-closed { margin-top: 20px; border-top: 1px solid var(--line); }
.review-closed > summary { min-height: 48px; padding: 12px 0; cursor: pointer; color: var(--muted); font-weight: 600; }
.review-closed > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.review-intro { color: var(--muted); margin: 0 0 20px; }
.review-simple .rev-group > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; cursor: pointer; font-weight: 700; font-size: 18px; border-bottom: 1px solid var(--line); }
.review-simple .rev-group > .review-intro { margin: 12px 16px; }
.review-simple .rev-group > .review-admin { padding: 0 16px 8px; }
.review-simple .rev-count { display: inline-grid; place-items: center; min-width: 28px; min-height: 28px; padding: 2px 8px; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-size: 14px; }
.review-simple .rev-group > summary::before { content: '\203A'; }
.review-simple .rev-group[open] > summary::before { transform: rotate(90deg); }
.review-admin { margin-top: 8px; color: var(--muted); font-size: 14px; }
.review-admin > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; text-decoration: underline; }
.review-admin .btn, .review-admin .rag { margin-block: 8px; }
.review-finding h3 { font-size: 17px; margin: 0 0 8px; }
.review-finding p { margin: 6px 0; overflow-wrap: anywhere; }
.review-simple .line { padding-block: 16px; }
.review-simple .rev-head { padding: 12px 16px; }
.review-simple .rev-group { padding: 0; }
.review-simple .review-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: start; padding: 12px 16px; }
.review-simple .review-item > .body { min-width: 0; }
.review-simple .review-item > .rag { min-height: 44px; }
.review-simple .review-item .review-admin { margin-top: 2px; }
.review-simple .review-item .review-admin > summary { min-height: 44px; }
.review-simple .review-item .review-admin .copy-row { flex-wrap: wrap; }
.review-simple .review-item .review-admin .css-where { overflow-wrap: anywhere; }
.review-simple .review-finding h3 { margin-bottom: 4px; }
.review-simple .review-finding p { margin-block: 4px; }
.review-simple .rev-group[data-severity=apk] { border-left: 5px double var(--ink); }
.review-simple .rev-group[data-severity=red] { border-left: 5px solid var(--danger); }
.review-simple .rev-group[data-severity=amber] { border-left: 5px solid var(--warn); }
body:has(.review-simple) .topbar .brand, body:has(.review-simple) .topbar .brand-stack { min-width: 0; }
body:has(.review-simple) .topbar .brand-name { overflow-wrap: anywhere; }
.app:is(#app, .admin):not(.checklist-page) { max-width: none; }
.crm-view { min-width: 0; }
.crm-view h1 { font-size: 24px; margin: 18px 0 12px; }
.crm-view h2 { font-size: 18px; margin: 24px 0 12px; }
.crm-view a { color: var(--brand); }
.crm-nav { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.crm-nav a { padding: 12px 0; font-weight: 700; text-decoration: none; }
.crm-nav [aria-current] { border-bottom: 3px solid var(--brand); }
.crm-toolbar, .crm-pager { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.crm-toolbar .search-box { flex: 1 1 260px; width: auto; margin: 0; }
.crm-view input:not([type=checkbox]), .crm-view select, .crm-view textarea { font: inherit; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); padding: 10px; min-height: 44px; border-radius: 6px; max-width: 100%; }
.crm-view input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--brand); }
.crm-toolbar label, .crm-pager label { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.crm-view :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.crm-table-scroll { overflow-x: auto; width: 100%; border-top: 1px solid var(--line); }
.crm-table { width: 100%; border-collapse: collapse; background: var(--card); font-size: 14px; }
.crm-table th { text-align: left; background: var(--surface-2); padding: 10px; white-space: nowrap; color: var(--muted); }
.crm-table th button { font: inherit; font-weight: 700; border: 0; color: inherit; background: none; min-height: 44px; cursor: pointer; text-align: left; }
.crm-table td { border-bottom: 1px solid var(--line); padding: 12px 10px; vertical-align: top; min-width: 90px; }
.crm-table td:first-child { min-width: 190px; }
.crm-table td a { display: inline-block; padding: 8px 0; font-weight: 700; }
.crm-view small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
.crm-pager > span { margin-right: auto; }
.crm-identity p { margin: 4px 0; color: var(--muted); }
.crm-tabs { flex-wrap: wrap; }
.crm-panel { padding: 16px 0 32px; border-top: 1px solid var(--line); }
.crm-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 16px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.crm-metrics div { color: var(--muted); font-size: 13px; }
.crm-metrics strong { display: block; font-size: 22px; color: var(--ink); margin-bottom: 4px; overflow-wrap: anywhere; }
.crm-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 16px 0; }
.crm-form h2 { width: 100%; }
.crm-form label { display: flex; flex-direction: column; gap: 6px; min-width: 150px; flex: 1 1 180px; font-size: 14px; }
.crm-form textarea { width: 100%; min-height: 90px; resize: vertical; }
.crm-form [role=status] { width: 100%; color: var(--danger); }
.crm-followup { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.crm-followup:has(input:checked) span { color: var(--muted); text-decoration: line-through; }
.crm-note, .crm-history { border-bottom: 1px solid var(--line); padding: 14px 0; }
.crm-note time { color: var(--muted); font-size: 12px; }
.crm-note p { white-space: pre-wrap; overflow-wrap: anywhere; }
.crm-history summary { cursor: pointer; min-height: 44px; }
@media (max-width: 700px) {
  .crm-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-toolbar .search-box { flex-basis: 100%; }
  .crm-view .kv dd { overflow-wrap: anywhere; }
}
@media print { .crm-nav, .crm-toolbar, .crm-pager, .crm-tabs, .crm-form { display: none !important; } }
.loading { text-align: center; color: var(--muted); padding: 40px; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }

/* mechanic grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--ink);
}
.tile:active { border-color: var(--brand); }
.tile .name { font-size: 19px; font-weight: 700; }
.tile .role { color: var(--muted); font-size: 14px; }

/* workorder cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--brand);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
}
.card.today { border-left-color: var(--warn); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.plate {
  font-weight: 800;
  font-size: 18px;
  background: #fef08a;
  border: 1px solid #ca8a04;
  border-radius: 6px;
  padding: 2px 8px;
  letter-spacing: 1px;
  color: #1c1917;
}
.when { color: var(--muted); font-size: 14px; white-space: nowrap; }
.veh { margin-top: 6px; font-size: 16px; }
.cust { color: var(--muted); font-size: 14px; margin-top: 2px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--brand);
}
.badge.apk { background: #dcfce7; color: var(--ok); }
.badge.danger { background: #fee2e2; color: var(--danger); }
.badge.wait { background: #fef3c7; color: var(--warn); }
.badge.done { background: #dcfce7; color: var(--ok); }
.badge.new { background: #dcfce7; color: var(--ok); }
.progress { margin-top: 10px; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ok); }

/* detail */
.section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.section h2 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.remarks { white-space: pre-wrap; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }

.line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.line:last-child { border-bottom: 0; }
.line .mark {
  width: 28px; height: 28px; flex: none;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 16px;
}
.line.task .mark { background: #eef2ff; color: var(--brand); }
.line.part .mark { background: #f1f5f9; color: var(--muted); }
.line.done .mark { background: #dcfce7; color: var(--ok); }
.line .body { flex: 1; }
.line .desc { font-weight: 600; }
.line.done .desc { text-decoration: line-through; color: var(--muted); }
.line .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* office review: "copy value \2192 where it goes in CSS" keying helper */
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.css-where {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--brand);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 10px;
}

/* office review: items grouped by CSS destination (one target + copy-all per group) */
.rev-head { padding-bottom: 12px; }
.rev-group { padding: 0; overflow: hidden; }
.rev-group-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--card); border-bottom: 3px solid var(--brand);
}
.rev-group-head .css-where { background: transparent; border: 0; padding: 0; font-size: 15px; font-weight: 800; }
.rev-group-head .rev-count {
  flex: none; background: var(--brand); color: #fff; font-weight: 800; font-size: 12px;
  border-radius: 999px; padding: 2px 9px; min-width: 20px; text-align: center;
}
.rev-group-head .rev-copyall { margin-left: auto; }
.rev-list { padding: 2px 16px 10px; }
.rev-list .line { padding: 10px 0; }
.rev-list .line .copy-row { margin-top: 6px; }
.rev-list .line .tag.green { opacity: .8; }
html[data-theme="dark"] .rev-group-head { background: var(--surface-2); }

/* compact clocked-time overview (review detail): total + breakdown + sessions */
.wt-summary { padding: 12px 16px 14px; }
.wt-total {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px;
  cursor: pointer; list-style: none;
}
.wt-total::-webkit-details-marker { display: none; }
.wt-total-val { font-size: 24px; font-weight: 800; color: var(--ink); }
.wt-total-sub { color: var(--muted); font-size: 13px; font-weight: 600; }
.wt-total .wt-copy { margin-left: auto; }
.wt-total::after {
  content: '\25BE'; color: var(--muted); font-size: 16px;
  align-self: center; transition: transform .2s;
}
.wt-summary[open] .wt-total::after { transform: rotate(180deg); }
.wt-body { margin-top: 2px; }
.wt-by { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wt-chip {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink); font-size: 12px; font-weight: 700;
}
.wt-list { margin-top: 10px; border-top: 1px solid var(--line); }
.wt-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.wt-row:last-child { border-bottom: 0; }
.wt-min {
  flex: none; min-width: 66px; font-weight: 800; color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.wt-info { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.wt-who { font-weight: 600; }
.wt-note { color: var(--muted); font-size: 13px; }
.wt-when { flex: none; color: var(--muted); font-size: 12px; white-space: nowrap; }

.offline-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--warn);
  color: #fff;
  text-align: center;
  padding: 10px;
  font-weight: 600;
}

/* interactive write-back controls */
[hidden] { display: none !important; }
.form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.form-row.col { flex-direction: column; align-items: stretch; }
.form-row.col label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.form-row .num { width: 160px; }
.form-row .txt { flex: 1; min-width: 180px; }
.form-row input,
.form-row textarea {
  min-height: var(--tap);
  padding: 12px 14px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.form-row textarea { min-height: 72px; resize: vertical; }

/* one-tap quick-note chips above the mechanic note field */
.qnotes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.qnotes-inline { margin-top: 8px; }
.qnote {
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--brand); background: #eef4ff;
  border: 1px solid #d3e2ff; border-radius: 999px;
  padding: 8px 16px; cursor: pointer; min-height: 40px;
}
.qnote:hover { background: #e0edff; }
.qnote:active { filter: brightness(.95); }
/* multi-select part bubbles: highlight the picked ones */
.qnote.selected {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
.qnote.selected::before { content: '\2713 '; font-weight: 800; }
html[data-theme="dark"] .qnote.selected { background: var(--brand); color: #fff; border-color: var(--brand); }

/* small subtitle under a section heading (e.g. CSS last-updated stamp) */
.section-sub { color: var(--muted); font-size: 13px; margin: -2px 0 10px; }

/* editable "balloon" chips (admin quick-text editor) */
.chips-edit { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chips-edit:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--brand);
  background: #eef4ff; border: 1px solid #d3e2ff; border-radius: 999px;
  padding: 6px 8px 6px 14px;
}
.chip-txt { line-height: 1.2; }
.chip-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border: 0; border-radius: 999px;
  background: rgba(11, 37, 69, .08); color: var(--brand);
  font-size: 16px; line-height: 1; cursor: pointer; padding: 0;
}
.chip-x:hover { background: var(--danger); color: #fff; }
.chip-input { max-width: 340px; }

/* live job timer (start / stop) */
.worktimer {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 12px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px;
}
.worktimer.running { background: #eff5ff; border-color: #bcd4ff; }
.wt-clock {
  font-size: 30px; font-weight: 800; letter-spacing: 1px;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.worktimer.running .wt-clock { color: var(--brand); }
.wt-btn { flex: 1; min-width: 150px; }
.worktimer.running .wt-btn { background: var(--danger); }
.wt-del {
  flex: none; align-self: center;
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff;
  color: var(--danger); font-size: 15px; line-height: 1; cursor: pointer;
}
.wt-del:hover { background: #fef2f2; border-color: #fecaca; }
.wt-hint {
  margin: -4px 0 12px; padding: 8px 12px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
  color: #92400e; font-size: 13px; font-weight: 600;
}
.worktimer.flash { animation: wtflash .5s ease-in-out 2; }
@keyframes wtflash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
  50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, .45); border-color: var(--danger); }
}
.worktimer.longrun { background: #fffbeb; border-color: #fcd34d; }
.wt-longrun {
  margin: -4px 0 12px; padding: 8px 12px;
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px;
  color: #b91c1c; font-size: 13px; font-weight: 600;
}
html[data-theme="dark"] .wt-hint { background: #3a2e10; border-color: #6b5313; color: #fcd34d; }
html[data-theme="dark"] .worktimer.longrun { background: #3a2e10; border-color: #6b5313; }
html[data-theme="dark"] .wt-longrun { background: #3a1616; border-color: #7f1d1d; color: #fca5a5; }

/* floating overview of all running work clocks (switch between jobs) */
#activeTimers { position: fixed; right: 12px; bottom: 12px; z-index: 65; }
.at-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--brand); color: #fff; font: inherit; font-size: 14px; font-weight: 800;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.at-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.25); font-variant-numeric: tabular-nums;
}
.at-panel {
  position: absolute; right: 0; bottom: 52px; width: min(420px, 94vw);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.28); overflow: hidden;
}
.at-head {
  padding: 12px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--muted); border-bottom: 1px solid var(--line);
}
.at-list { max-height: 60vh; overflow-y: auto; }
.at-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
}
.at-row:last-child { border-bottom: 0; }
.at-row.current { background: #eff5ff; }
.at-jump {
  display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
  border: 0; background: transparent; font: inherit; color: var(--ink);
  text-align: left; cursor: pointer; padding: 6px 4px; border-radius: 8px;
}
.at-jump:hover { background: var(--surface-2); }
.at-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.at-plate { font-weight: 700; }
.at-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-time {
  flex: none; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--brand);
}
.at-actions { display: flex; gap: 6px; flex: none; }
.at-act {
  width: 38px; height: 38px; flex: none; border: 1px solid var(--line); border-radius: 9px;
  background: var(--card); color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.at-act:hover { background: var(--surface-2); }
.at-act:active { filter: brightness(.95); }
.at-act.at-stop { color: var(--danger); border-color: rgba(220,38,38,.4); }
.at-row.longrun .at-time { color: var(--danger); }
.at-row.longrun .at-plate::after { content: ' \26A0\FE0F'; }
.at-row.paused .at-time { color: var(--muted); }
.at-row.paused .at-time::after { content: ' \00B7 pauze'; font-size: 11px; font-weight: 700; }
.at-pill.warn { background: var(--danger); animation: atpulse 1.6s ease-in-out infinite; }
@keyframes atpulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(220, 38, 38, .35); }
  50% { box-shadow: 0 6px 22px rgba(220, 38, 38, .6); }
}
html[data-theme="dark"] .at-row.current { background: var(--surface-2); }
.wt-del:active { filter: brightness(.95); }

/* "Meld gereed" ready-for-pickup toggle */
.ready-sec { display: flex; flex-direction: column; gap: 10px; }
.ready-sec.on { background: #f0fdf4; border-color: #86efac; }
.ready-hint, .ready-state { color: var(--muted); font-size: 14px; }
.ready-state { color: #15803d; }
.ready-btn { background: #16a34a; align-self: flex-start; }
.ready-btn:active { filter: brightness(.94); }

/* Workflow tracker (Domino's-style) at the top of a workorder */
.wo-tracker { border-left: 6px solid var(--brand); }
/* Open RDW recall (terugroepactie) warning at the top of a workorder */
.recall-banner {
  background: #fef2f2; border: 1px solid #fca5a5; border-left: 6px solid var(--danger);
  color: #991b1b; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px;
  font-weight: 700; font-size: 15px; line-height: 1.4;
}
html[data-theme="dark"] .recall-banner { background: #3b0d0d; border-color: #7f1d1d; color: #fecaca; }
.wo-track { display: flex; align-items: flex-start; }
.wo-step {
  flex: 1; min-width: 0; position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
/* connector line to the previous step */
.wo-step::before {
  content: ""; position: absolute; top: 19px; right: 50%; width: 100%; height: 3px;
  background: var(--line); z-index: 0;
}
.wo-step:first-child::before { display: none; }
.wo-step.done::before, .wo-step.active::before { background: var(--ok); }
.wo-dot {
  position: relative; z-index: 1;
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center; font-size: 18px; font-weight: 800;
  background: var(--surface-2); border: 2px solid var(--line); color: var(--muted);
}
.wo-slbl { margin-top: 7px; font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.2; }
.wo-step.done .wo-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.wo-step.active .wo-dot {
  background: var(--brand); border-color: var(--brand); color: #fff;
  animation: ccr-pulse 1.8s ease-in-out infinite;
}
.wo-step.active.warn .wo-dot { background: var(--warn); border-color: var(--warn); animation: none; }
.wo-step.active.warn::before { background: var(--warn); }
.wo-step.active .wo-slbl { color: var(--ink); font-weight: 700; }
.wo-cap {
  margin-top: 14px; text-align: center; font-size: 15px; font-weight: 700;
  color: var(--ink);
}
@keyframes ccr-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(24, 86, 168, .45); }
  50% { box-shadow: 0 0 0 7px rgba(24, 86, 168, 0); }
}
@media (prefers-reduced-motion: reduce) { .wo-step.active .wo-dot { animation: none; } }

/* Motorcycle marker: only motors are tagged in lists (a car is the norm), so it
   has to read at a glance without competing with the plate. */
.vkind { font-size: 15px; line-height: 1; vertical-align: -1px; }

/* offline write-queue badge + toast */
#queueBadge {
  position: fixed; left: 12px; bottom: 12px; z-index: 60;
  background: #b45309; color: #fff; font-size: 13px; font-weight: 700;
  padding: 8px 14px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
/* Something the server refused — tappable, opens the list so it can be retried. */
#queueBadge.bad { background: var(--danger); cursor: pointer; }
.fw-list { list-style: none; margin: 4px 0 0; padding: 0; text-align: left; max-height: 40vh; overflow-y: auto; }
.fw-list li {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.fw-list b { flex: 1; min-width: 140px; }
.fw-list span { color: var(--muted); font-size: 13px; width: 100%; }

/* Office progress on the mechanic's workorder: proof their input reached CSS. */
.office-review {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin: 0 0 12px; padding: 10px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
}
.office-review .orv-ok { color: var(--ok); }
.office-review .orv-open { color: var(--warn); }
.office-review .orv-drop { color: var(--muted); }
#toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px);
  z-index: 70; max-width: 90vw;
  background: #0f172a; color: #fff; font-size: 14px; font-weight: 600;
  padding: 12px 18px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.3);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* reception: persistent "cars ready" counter */
#readyBadge {
  position: fixed; right: 12px; bottom: 12px; z-index: 60;
  border: 0; cursor: pointer;
  background: #16a34a; color: #fff; font: inherit; font-size: 14px; font-weight: 800;
  padding: 10px 16px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.28);
}
#readyBadge:hover { background: #15803d; }
#readyBadge:active { filter: brightness(.95); }
/* reception: persistent "waiting for parts" counter (stacks above ready) */
#partsBadge {
  position: fixed; right: 12px; bottom: 58px; z-index: 60;
  border: 0; cursor: pointer;
  background: #d97706; color: #fff; font: inherit; font-size: 14px; font-weight: 800;
  padding: 10px 16px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.28);
}
#partsBadge:hover { background: #b45309; }
#partsBadge:active { filter: brightness(.95); }
/* mechanic tablet: persistent "customer approved" counter */
#approvalsBadge {
  position: fixed; right: 12px; bottom: 12px; z-index: 60;
  border: 0; cursor: pointer;
  background: #16a34a; color: #fff; font: inherit; font-size: 14px; font-weight: 800;
  padding: 10px 16px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.28);
}
#approvalsBadge:hover { background: #15803d; }
#approvalsBadge:active { filter: brightness(.95); }

/* reception: home tools + agenda / search / floor */
.home-tools { display: flex; gap: 8px; margin-top: 10px; }
.home-tools .btn { flex: 1; }
.seg { display: inline-flex; gap: 0; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg-btn { border: 0; background: #fff; font: inherit; font-weight: 700; padding: 8px 16px; min-height: 40px; cursor: pointer; color: var(--muted); }
.seg-btn.on { background: var(--brand); color: #fff; }
.agenda-day { font-weight: 800; margin: 16px 0 8px; text-transform: capitalize; }
.agenda-day span { color: var(--muted); font-weight: 600; font-size: 13px; }
.agenda-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--ink); }
.agenda-row:hover { border-color: #bcd4ff; background: #f8faff; }
.agenda-time { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 44px; }
.agenda-main { flex: 1; min-width: 0; }
.agenda-plate { font-weight: 700; }
.agenda-veh { color: var(--muted); font-weight: 500; font-size: 14px; }
.agenda-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.agenda-row .badges { margin-top: 4px; }
.agenda-arrow { flex: none; color: var(--muted); font-size: 22px; }

/* single-day overview (drill-in from the week calendar) */
.agenda-daybar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.agenda-back { border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; color: var(--brand); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.agenda-back:hover { background: var(--surface-2); }
.agenda-daytitle { font-size: 18px; font-weight: 800; text-transform: capitalize; }
.agenda-daytitle .agenda-today { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: #fff; background: var(--brand); border-radius: 999px; padding: 2px 8px; vertical-align: 2px; }
.agenda-daytitle .agenda-count { color: var(--muted); font-weight: 700; font-size: 14px; }
/* Week header: no capitalize (it would render "7 T/m 13 September") and it grows
   so the prev/next buttons sit at the outer edges. */
.week-title { flex: 1; text-transform: none; }
.week-range { font-weight: 600; color: var(--muted); font-size: 15px; }
.week-nav { margin-top: 4px; }
html[data-theme="dark"] .agenda-back { background: var(--surface-2); }

/* week calendar (Planning -> Deze week): day columns with stacked appointments */
.cal-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* minmax(0,1fr) lets the seven columns shrink to the container, so the week fits
   inside .app (1068px of content) instead of always overflowing by ~30px; the
   min-width below is what actually triggers scrolling, on narrow screens only. */
.calw { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: start; min-width: 820px; }
.calw-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.calw-col.today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.calw-h {
  display: block; width: 100%; position: sticky; top: 0; z-index: 1; padding: 8px 10px;
  font: inherit; font-weight: 800; text-transform: capitalize; color: var(--ink);
  background: var(--card); border: 0; border-bottom: 1px solid var(--line); text-align: center; cursor: pointer;
}
.calw-h:hover { background: var(--surface-2); color: var(--brand); }
.calw-col.today .calw-h { color: var(--brand); }
.calw-h span { color: var(--muted); font-weight: 700; font-size: 12px; }
.calw-list { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.calw-empty { color: var(--muted); text-align: center; padding: 10px 0; }
.board-statuses { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.board-status { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: 6px; background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
.board-status > span { flex: none; }
.board-status.danger { border-left-color: var(--danger); }
.board-status.warning { border-left-color: var(--warn); }
.board-status.success { border-left-color: var(--ok); }
.board-status.info { border-left-color: var(--brand); }
.board-status.danger > span { color: var(--danger); }
.board-status.success > span { color: var(--ok); }
.mechanic-card.attention { border-left: 4px solid var(--danger); }
.mechanic-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.css-work-check { width: 24px; height: 24px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.css-work-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; cursor: pointer; }
.work-approval-warning { padding: 12px; margin-bottom: 12px; border-left: 4px solid var(--warn); background: var(--surface-2); color: var(--ink); }
.calw-leave { padding: 8px; border-bottom: 1px solid var(--line); background: var(--card); }
.calw-leave-title { color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.calw-absence { border-left: 3px solid var(--warn); padding-left: 7px; font-size: 12px; overflow-wrap: anywhere; }
.calw-absence + .calw-absence { margin-top: 8px; }
.calw-absence b, .calw-absence span { display: block; }
.calw-absence span { color: var(--muted); }
.calw-ev {
  display: block; width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  padding: 7px 9px; border: 1px solid #bcd4ff; border-left: 3px solid var(--brand);
  border-radius: 9px; background: #eff5ff;
}
.calw-ev:hover { background: #e2edff; }
.calw-ev.apk { border-left-color: var(--warn); border-color: #fed7aa; background: #fff7ed; }
.calw-ev-t { font-weight: 800; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calw-ev-time { font-variant-numeric: tabular-nums; color: var(--brand); }
.calw-ev.apk .calw-ev-time { color: var(--warn); }
.calw-ev-s { font-size: 12px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calw-ev-m { font-size: 11px; color: var(--brand); font-weight: 700; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-badge { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 999px; font-size: 9px; font-weight: 800; background: var(--warn); color: #fff; vertical-align: 1px; }
html[data-theme="dark"] .calw-ev { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .calw-col.today .calw-h { color: #fff; }

/* management summary (TV / stand-up view) */
.msum-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.msum-date { font-size: 30px; font-weight: 900; text-transform: capitalize; }
.msum-sub { font-size: 18px; color: var(--muted); font-weight: 700; }
.msum-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.msum-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; text-align: center; }
.msum-kpi-n { font-size: 46px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.msum-kpi-l { font-size: 14px; font-weight: 800; color: var(--muted); margin-top: 6px; text-transform: uppercase; letter-spacing: .5px; }
.msum-kpi.apk .msum-kpi-n { color: var(--warn); }
.msum-kpi.wait .msum-kpi-n { color: var(--danger); }
.msum-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.msum-group { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.msum-group-h { padding: 12px 16px; font-size: 19px; font-weight: 900; background: var(--card); border-bottom: 3px solid var(--brand); display: flex; justify-content: space-between; align-items: center; }
.msum-group-h span { color: var(--muted); font-size: 16px; }
.msum-card { display: block; width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--ink); background: transparent; border: 0; border-left: 4px solid transparent; border-bottom: 1px solid var(--line); padding: 12px 16px; }
.msum-card:last-child { border-bottom: 0; }
.msum-card:hover { background: var(--card); }
.msum-card.apk { border-left-color: var(--warn); }
.msum-plate { font-size: 23px; font-weight: 900; letter-spacing: .5px; }
.msum-veh { font-size: 15px; font-weight: 700; margin-top: 1px; }
.msum-cust { font-size: 15px; color: var(--muted); }
.msum-type { font-size: 14px; color: var(--brand); font-weight: 800; margin-top: 2px; }
.msum-badges { margin-top: 8px; display: flex; gap: 6px; }
.msum-badge { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.msum-badge.apk { background: var(--warn); color: #fff; }
.msum-badge.wait { background: var(--danger); color: #fff; }
@media (min-width: 1600px) {
  .msum-date { font-size: 36px; }
  .msum-kpi-n { font-size: 56px; }
  .msum-plate { font-size: 26px; }
  .msum-group-h { font-size: 22px; }
}

/* Samenvatting (TV) view: use the full page width and fit every mechanic column
   on one screen — one equal-width column per mechanic, no wrapping/scrolling.
   Scoped with :has(.msum) so it only applies while the summary is on screen and
   never leaks onto other views. */
.app:has(.msum) { max-width: none; }
.app:has(.msum) .msum-groups {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

.search-box { width: 100%; box-sizing: border-box; min-height: 48px; padding: 12px 16px; font: inherit; font-size: 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.search-results { display: flex; flex-direction: column; gap: 8px; }
.search-row, .floor-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink);
}
.search-row:hover, .floor-row:hover { border-color: #bcd4ff; background: #f8faff; }
.search-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.si-veh { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-owner { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.floor-head { font-weight: 800; margin: 16px 0 8px; }
.floor-head span { color: var(--muted); font-weight: 600; font-size: 13px; }
.floor-head.ready { color: #15803d; }
.floor-head.busy { color: var(--brand); }
.floor-row { margin-bottom: 8px; }

/* mechanic: collapsible CSS service history */
.hist-det .hist-sum {
  cursor: pointer; font-weight: 800; font-size: 17px; list-style: none;
  display: flex; align-items: center; gap: 8px; padding: 2px 0;
}
.hist-det .hist-sum::-webkit-details-marker { display: none; }
.hist-det .hist-sum::after { content: '\25BE'; margin-left: auto; color: var(--muted); transition: transform .2s; }
.hist-det[open] .hist-sum::after { transform: rotate(180deg); }
.hist-body { margin-top: 10px; }
.hist-visit { padding: 10px 0; border-top: 1px solid var(--line); }
.hist-vh { display: flex; align-items: baseline; gap: 10px; }
.hist-vh .when { margin-left: auto; color: var(--muted); font-size: 13px; }
.hist-tasks { margin: 6px 0 0; padding-left: 18px; }
.hist-tasks li { margin: 2px 0; }
.hist-parts { margin-top: 6px; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* parts used, shown as small scannable tags (history timelines) */
.part-tag {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.7;
}

/* office review: compact plate overview */
.plate-list { display: flex; flex-direction: column; gap: 10px; }
.plate-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; text-align: left; cursor: pointer;
  background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px;
  font: inherit; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.plate-row:hover { border-color: #bcd4ff; background: #f8faff; }
.plate-row:active { filter: brightness(.98); }
/* Closed/invoiced in CSS: can't be keyed back, so dim it and grey the plate. */
.plate-row.closed { opacity: .72; }
.plate-row.closed .plate { background: #e2e8f0; color: #475569; }
.plate-row.closed .pi-sub { color: var(--danger, #dc2626); }
.plate-row .plate {
  font-weight: 800; font-size: 15px; letter-spacing: .5px;
  background: #fde047; color: #1c1917; border-radius: 6px;
  padding: 4px 10px; white-space: nowrap;
}
.plate-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pi-veh { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate-count {
  flex: none; min-width: 26px; height: 26px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 13px; border-radius: 999px;
}
.plate-arrow { flex: none; color: var(--muted); font-size: 22px; line-height: 1; }

/* quick switch between workorders */
.wo-switch { display: flex; align-items: stretch; gap: 8px; margin-bottom: 12px; }
.wo-nav {
  flex: none; width: 44px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 22px; line-height: 1; color: var(--brand); cursor: pointer;
}
.wo-nav:disabled { color: #cbd5e1; cursor: default; }
.wo-nav:not(:disabled):hover { background: #f8faff; border-color: #bcd4ff; }
.wo-sel {
  flex: 1; min-width: 0; min-height: 44px;
  padding: 0 12px; font: inherit; font-weight: 600;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:active { filter: brightness(.92); }
.btn.ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--line, #cbd5e1);
}

/* RAG inspection */
.rag-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.rag-summary .pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
}
.rag-summary .pill.g { background: #dcfce7; color: #14532d; }
.rag-summary .pill.a { background: #fef3c7; color: #854d0e; }
.rag-summary .pill.r { background: #fee2e2; color: #991b1b; }
.rag-summary .checked { color: var(--muted); font-size: 14px; margin-left: auto; }

/* "Alles OK" bulk action — APK list only */
.rag-bulk { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.btn.ok-all { background: var(--ok); }
.btn.ok-all:disabled { opacity: .6; cursor: default; }
.rag-bulk-hint { flex: 1; min-width: 200px; color: var(--muted); font-size: 13px; line-height: 1.35; }

.rag-cat {
  margin: 16px 0 6px;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2px solid var(--line);
  padding-bottom: 4px;
}
.rag-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.rag-item:last-child { border-bottom: 0; }
.rag-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rag-label { flex: 1; min-width: 140px; font-weight: 600; }
.rag-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.rag {
  min-width: 66px;
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.rag.g.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.rag.a.on { background: var(--warn); border-color: var(--warn); color: #fff; }
.rag.r.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.rag.apk { border-style: double; border-width: 3px; }
.rag.apk.on, .tag.apk { background: var(--ink); border-color: var(--ink); color: var(--card); }
.rag-summary .pill.apk { background: var(--ink); color: var(--card); }
.finding.apk { border-left-color: var(--ink); }
.rag.n.on { background: var(--muted); border-color: var(--muted); color: #fff; }
.rag-detail { display: flex; gap: 8px; margin-top: 8px; }
.rag-detail .num { width: 90px; }
.rag-detail .txt { flex: 1; }
.rag-detail input {
  min-height: 44px;
  padding: 8px 12px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.rag-photos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.accu-health { margin-top: 6px; font-weight: 800; font-size: 14px; }
.accu-health.ok { color: #15803d; }
.accu-health.warn { color: #b45309; }
.accu-health.bad { color: var(--danger); }
.accu-replace { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 700; font-size: 14px; cursor: pointer; }
.accu-replace input { width: 20px; height: 20px; }
.cam {
  min-height: 44px;
  padding: 0 14px;
  border: 1px dashed var(--brand);
  border-radius: 10px;
  background: #eff6ff;
  color: var(--brand);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.cam:disabled { opacity: .6; cursor: default; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Intake photos — five required shots taken as the first step after Start klus */
.intake-sec.complete { background: #f0fdf4; border-color: #86efac; }
.intake-count {
  font-size: 14px; font-weight: 700; color: var(--brand);
  background: #e0edff; border-radius: 999px; padding: 2px 10px; margin-left: 8px;
}
.intake-sec.complete .intake-count { color: #15803d; background: #dcfce7; }
.intake-hint { color: var(--muted); font-size: 14px; margin: 4px 0 12px; }
.intake-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.intake-tile {
  display: flex; flex-direction: column; gap: 8px;
  flex: 1 1 160px; min-width: 150px;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff);
}
.intake-tile.done { border-color: #86efac; background: #f0fdf4; }
.intake-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-height: 96px; padding: 12px;
  border: 1px dashed var(--brand); border-radius: 10px; background: #eff6ff;
  color: var(--brand); font: inherit; font-weight: 600; cursor: pointer;
}
.intake-tile.done .intake-btn { border-style: solid; border-color: #86efac; background: #ecfdf5; color: #15803d; }
.intake-btn:disabled { opacity: .6; cursor: default; }
.intake-ico { font-size: 26px; line-height: 1; }
.intake-lbl { font-size: 14px; text-align: center; }
.intake-cta { font-size: 13px; opacity: .85; }
.intake-tile .thumbs { justify-content: center; }
html[data-theme="dark"] .intake-tile { background: var(--surface-2); border-color: var(--line); }
html[data-theme="dark"] .intake-btn { background: transparent; }

/* Photo visibility notes — tells the mechanic which photos the customer gets to see */
.vis-note {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; line-height: 1.35;
  padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  margin: 0 0 12px;
}
.vis-note .vis-ico { font-size: 15px; line-height: 1.3; }
.vis-note.private { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.vis-note.public { background: #eff5ff; border-color: #bcd4ff; color: var(--brand); }
html[data-theme="dark"] .vis-note.private { background: var(--surface-2); border-color: #78350f; color: #fbbf24; }
html[data-theme="dark"] .vis-note.public { background: var(--surface-2); border-color: #1e40af; color: #93c5fd; }

/* customer report */
.finding { border-left: 6px solid var(--line); }
.finding.red { border-left-color: var(--danger); }
.finding.amber { border-left-color: var(--warn); }
.finding-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 17px; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; color: #fff; }
.tag.red { background: var(--danger); }
.tag.amber { background: var(--warn); }
.tag.green { background: var(--ok); }
.tag.na { background: var(--muted); }

/* parts lifecycle: nodig -> besteld -> binnen */
.btn.small {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}
.part-item .prow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pchip {
  font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  color: #fff; background: var(--muted); vertical-align: middle;
}
.pchip.needed { background: var(--danger); }
.pchip.ordered { background: var(--warn); }
.pchip.arrived { background: var(--ok); }
.parts-card { padding-top: 6px; }
.parts-cardhead {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: transparent; border: 0; padding: 6px 0 10px; cursor: pointer;
  text-align: left; font: inherit; color: var(--ink); border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.parts-cardhead .plate { font-weight: 800; }
div.parts-cardhead { cursor: default; }
.parts-cardhead .plate-arrow { margin-left: auto; color: var(--muted); font-size: 22px; }

/* customer decision on inspection findings */
.rag-auth { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.auth-chip {
  font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: #f1f5f9; color: var(--ink);
}
.auth-chip.ok { background: #dcfce7; color: var(--ok); }
.auth-chip.no { background: #fee2e2; color: var(--danger); }
.meas { font-weight: 700; color: var(--muted); }
.finding-price { margin-top: 6px; font-size: 15px; }
.finding-price b { color: var(--ink, #0f172a); }
.choose { display: flex; gap: 10px; margin-top: 12px; }
.choose .rag { flex: 1; min-height: var(--tap); }

/* running total of approved findings */
.total-bar {
  position: sticky;
  bottom: 8px;
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-size: 16px;
  text-align: center;
}
.total-bar b { font-size: 18px; }

/* "what we checked and was OK" reassurance */
.ok-summary { border-left: 6px solid var(--ok, #16a34a); }
.ok-list {
  margin: 8px 0 0;
  padding-left: 18px;
  columns: 2;
  column-gap: 20px;
}
.ok-list li { margin: 2px 0; color: var(--muted); break-inside: avoid; }

/* mechanic price input */
.rag-detail .price { max-width: 160px; }

/* admin settings page */
.app.admin { padding-bottom: 96px; }
.mail-test-banner { margin: 0 0 20px; padding: 20px 24px; border-block: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 16%, var(--card)); color: var(--ink); overflow-wrap: anywhere; }
.mail-test-banner > strong { display: block; font-size: 20px; line-height: 1.3; }
.mail-test-banner p { margin: 10px 0 6px; font-size: 16px; }
.mail-test-banner small { font-size: 13px; }
.campaigns-panel { min-width: 0; }
.campaign-toolbar, .campaign-delivery header, .campaign-delivery footer, .campaign-dialog header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.campaign-toolbar h2, .campaign-delivery header > b, .campaign-dialog header h2 { flex: 1; min-width: 0; }
.campaign-toolbar h2 { min-width: 120px; }
#adminTabs { background: var(--surface-2); border-color: var(--line); }
#adminTabs .cl-tab { background: var(--card); color: var(--ink); }
#adminTabs .cl-tab.on { background: var(--brand); color: #fff; }
.campaign-toolbar h2, .campaign-dialog h2 { font-size: 20px; margin: 0; }
.campaigns-panel > .seg { display: flex; flex-wrap: wrap; margin-top: 16px; }
.campaigns-panel .seg-btn { flex: 1; min-height: 44px; }
.campaign-card { display: grid; grid-template-columns: 240px minmax(0, 1fr) 180px; align-items: center; gap: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 14px 0; }
.campaign-card h3, .campaign-delivery h3 { margin: 0 0 4px; font-size: 17px; overflow-wrap: anywhere; }
.campaign-feedback, .campaign-notice { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.campaign-identity { display: flex; align-items: center; gap: 16px; min-width: 0; }
.campaign-identity > div { min-width: 0; }
.campaign-identity p { margin: 4px 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.campaign-identity .campaign-audience { color: var(--brand); }
.campaign-title, .campaign-mode, .campaign-repeat, .campaign-preview, .campaign-appointment, .campaign-step { font: inherit; background: none; border: 0; color: var(--ink); cursor: pointer; min-height: 44px; }
.campaign-title { text-align: left; padding: 0; font-weight: 700; }
.campaign-source-mark { display: grid; place-items: center; flex: 0 0 48px; height: 48px; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 24px; }
.campaign-track { min-width: 0; overflow-x: auto; padding: 12px 2px; }
.campaign-steps { display: flex; list-style: none; padding: 0; margin: 0; min-width: 100%; }
.campaign-node { position: relative; flex: 0 0 max(156px, 20%); min-width: 0; }
.campaign-node + .campaign-node::before { content: ''; position: absolute; height: 2px; background: var(--line); top: 23px; left: calc(-50% + 24px); width: calc(100% - 48px); }
.campaign-node + .campaign-node::after { content: '\203A'; position: absolute; top: 8px; left: -5px; font-size: 24px; color: var(--muted); line-height: 28px; }
.campaign-gap { position: absolute; top: 32px; left: calc(-50% + 24px); width: calc(100% - 48px); text-align: center; font-size: 11px; color: var(--muted); line-height: 16px; }
.campaign-step { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; padding: 0 8px 8px; text-align: center; }
.campaign-node-mark { display: grid; place-items: center; box-sizing: border-box; width: 48px; height: 48px; flex-shrink: 0; margin-bottom: 20px; border: 2px solid var(--brand); border-radius: 50%; background: var(--card); color: var(--brand); font-size: 23px; }
.campaign-node[data-channel=call] .campaign-node-mark { border-color: var(--warn); color: var(--warn); }
.campaign-step > span:last-child:not(.campaign-node-mark) { color: var(--muted); font-size: 12px; }
.campaign-node-add .campaign-node-mark { border-style: dashed; border-color: var(--muted); color: var(--muted); }
.campaign-node-add strong { font-size: 13px; font-weight: 600; color: var(--muted); }
.campaign-step:hover .campaign-node-mark { background: var(--surface-2); }
.campaign-settings { display: flex; flex-direction: column; align-items: center; border-left: 1px solid var(--line); padding-left: 24px; min-width: 0; text-align: center; }
.campaign-mode { display: grid; justify-items: center; gap: 6px; padding: 0; width: 100%; }
.campaign-mode > span:not(.campaign-mode-mark), .campaign-settings small { color: var(--muted); font-size: 12px; }
.campaign-mode strong { font-size: 14px; overflow-wrap: anywhere; }
.campaign-mode-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 22px; }
.campaign-card[data-mode=approval] .campaign-mode-mark { background: var(--warn); }
.campaign-card[data-mode=off] .campaign-mode-mark { background: var(--surface-2); color: var(--muted); }
.campaign-repeat, .campaign-preview, .campaign-appointment { font-size: 12px; color: var(--brand); padding: 8px; }
.campaign-repeat { display: inline-flex; align-items: center; gap: 6px; }
.campaign-repeat svg { width: 16px; height: 16px; flex-shrink: 0; }
.campaign-card :focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
@media (max-width: 1100px) {
  .campaign-card { grid-template-columns: minmax(0, 1fr) 160px; gap: 20px; }
  .campaign-identity { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .campaign-card { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: 16px; }
  .campaign-track { overflow: visible; padding: 8px 0; }
  .campaign-steps { flex-direction: column; }
  .campaign-node { flex: none; padding-bottom: 20px; }
  .campaign-node:last-child { padding-bottom: 0; }
  .campaign-step { min-height: 64px; display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; align-items: center; column-gap: 16px; row-gap: 2px; text-align: left; padding: 0; }
  .campaign-node-mark { grid-row: 1 / 3; margin-bottom: 0; }
  .campaign-step strong { align-self: end; }
  .campaign-step > span:last-child:not(.campaign-node-mark) { align-self: start; }
  .campaign-node + .campaign-node::before { top: -28px; left: 23px; width: 2px; height: 36px; }
  .campaign-node + .campaign-node::after { content: '\2304'; top: -15px; left: 17px; font-size: 20px; }
  .campaign-gap { top: -18px; left: 64px; width: auto; text-align: left; }
  .campaign-node-add .campaign-step { grid-template-rows: auto; }
  .campaign-node-add strong { align-self: center; }
  .campaign-settings { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); text-align: left; }
  .campaign-mode { grid-column: 1 / -1; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; justify-items: start; text-align: left; }
  .campaign-mode-mark { grid-row: 1 / 3; }
  .campaign-mode strong { grid-column: 2; }
  .campaign-repeat { text-align: left; padding-left: 0; }
  .campaign-settings small { grid-row: 3; }
  .campaign-preview { grid-column: 2; grid-row: 3; }
  .campaign-appointment { grid-column: 1 / -1; grid-row: 4; text-align: left; padding-left: 0; }
}
.campaign-feedback { margin: 10px 0; }
.campaign-notice { border-left: 3px solid var(--warn); padding: 8px 12px; }
.campaign-delivery { border-bottom: 1px solid var(--line); padding: 16px 0; overflow-wrap: anywhere; }
.campaign-delivery summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--brand); }
.campaign-delivery footer { margin-top: 12px; }
.campaign-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.photo-viewer { width: calc(100% - 24px); height: calc(100dvh - 24px); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); overflow: hidden; }
.photo-viewer[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.photo-viewer::backdrop { background: rgb(0 0 0 / 75%); }
.photo-viewer-toolbar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; flex-wrap: wrap; }
.photo-viewer-count { flex: 1; font-size: 15px; }
.photo-viewer-toolbar label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.photo-viewer-toolbar button, .photo-viewer-toolbar select { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; }
.photo-viewer-toolbar button { font-size: 24px; }
.photo-viewer-toolbar button:disabled { opacity: .4; cursor: default; }
.photo-viewer-toolbar .photo-delete { color: var(--danger); }
.photo-viewer-toolbar button[hidden] { display: none; }
.photo-viewer :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.photo-viewer footer { justify-content: center; }
.photo-viewer-stage { position: relative; min-width: 0; min-height: 0; overflow: auto; background: var(--surface-2); display: grid; place-items: center; }
.photo-viewer-stage img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.photo-viewer-picture { position: relative; flex-shrink: 0; }
.photo-viewer-picture[hidden] { display: none; }
.photo-drawing-layer { position: absolute; inset: 0; }
.photo-draw-tools { border-block: 1px solid var(--line); gap: 8px; }
.photo-tool-group { display: flex; gap: 4px; padding-right: 8px; border-right: 1px solid var(--line); }
.photo-viewer-toolbar button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.photo-viewer-toolbar [aria-pressed=true] { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--surface-2); }
.photo-viewer-toolbar .photo-color { width: 44px; }
.photo-color::before { content: ''; width: 22px; height: 22px; border-radius: 50%; background: var(--swatch); border: 1px solid var(--muted); }
.photo-viewer-toolbar .photo-save { font-size: 14px; padding-inline: 12px; background: var(--brand); color: #fff; }
.photo-edit-feedback { flex: 1; font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .photo-draw-tools { flex-wrap: nowrap; overflow-x: auto; }
  .photo-draw-tools > * { flex-shrink: 0; }
  .photo-viewer-count { flex: 1 0 calc(100% - 68px); order: 0; }
  .photo-viewer header [data-action=close] { order: 1; }
  .photo-viewer header label { order: 2; }
  .photo-viewer header .photo-delete { order: 3; }
  .photo-viewer header .photo-save { order: 4; }
}
.photo-viewer-stage img[hidden] { display: none; }
.photo-viewer-stage.photo-viewer-zoomed { display: block; }
.photo-viewer-stage.photo-viewer-zoomed img { max-width: none; max-height: none; }
.photo-viewer-stage [role=status] { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; margin: 16px; text-align: center; }
.campaign-dialog { box-sizing: border-box; width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); }
.campaign-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.campaign-dialog > header { position: sticky; top: 0; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); z-index: 1; }
.campaign-dialog-body { padding: 16px; }
.campaign-editor { display: grid; gap: 14px; }
.campaign-editor label { display: grid; gap: 6px; min-width: 0; font-size: 14px; font-weight: 600; }
.campaign-editor input:not([type=checkbox]), .campaign-editor select, .campaign-editor textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font: inherit; }
.campaign-editor textarea { resize: vertical; }
.campaign-editor fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 0; }
.campaign-editor legend { font-weight: 700; padding: 0 6px; }
.campaign-editor .campaign-check { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; margin-right: 14px; }
.campaign-check input { width: 20px; height: 20px; accent-color: var(--brand); }
.campaign-edit-steps { display: grid; gap: 14px; }
.campaign-edit-step > label { margin-top: 12px; }
.campaign-edit-step .campaign-toolbar > label { flex: 1 1 100px; }
.campaign-error { color: var(--danger); margin: 0; overflow-wrap: anywhere; }
.campaign-editor [hidden] { display: none; }
@media (max-width: 480px) {
  .campaign-toolbar > h2 { flex-basis: 100%; }
  .campaigns-panel .seg-btn { flex-basis: 50%; padding-inline: 8px; }
  .campaign-dialog-body { padding: 12px; }
}
.admin-intro { color: var(--muted); margin: 4px 2px 16px; font-size: 14px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 18px 10px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
}
.card-head { padding: 14px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.card-head h2 { margin: 0; font-size: 16px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.card-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }

.toggle-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .meta { flex: 1; min-width: 0; }
.toggle-row .t { font-weight: 600; font-size: 15px; }
.toggle-row .desc { color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.35; }

/* iOS-style switch */
.switch { position: relative; flex: none; width: 52px; height: 30px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background .18s ease;
}
.switch .slider::before {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .35);
  transition: transform .18s ease;
}
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::before { transform: translateX(22px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--brand); outline-offset: 2px; }

/* fields */
.field { display: block; margin: 16px 0; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field .inp {
  display: block; width: 100%;
  min-height: 48px; padding: 10px 14px;
  font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  background: #f8fafc;
}
.field .inp:focus { outline: none; border-color: var(--brand); background: #fff; }
.field .inp.num { max-width: 140px; }
.field .inp.ta { min-height: 96px; line-height: 1.5; resize: vertical; font-size: 15px; }
.field .hint { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.35; }

/* sticky save bar */
.save-bar {
  position: fixed;
  right: 16px; bottom: 16px; left: auto;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .22);
  z-index: 20;
}
.save-msg { font-size: 14px; }

/* checklist editor */
.app.admin.checklist-page { max-width: 1040px; padding-bottom: 120px; }
.checklist-title { font-size: 24px; margin: 6px 0 20px; }
.cl-reset-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 8px; padding: 24px; background: var(--card); color: var(--ink); }
.cl-reset-dialog::backdrop { background: rgb(0 0 0 / 55%); }
.cl-reset-dialog h2 { font-size: 20px; margin: 0 0 12px; }
.cl-reset-dialog p { margin: 0 0 24px; overflow-wrap: anywhere; }
.cl-reset-actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.cl-reset-confirm { background: var(--danger); }
.cl-reset-dialog :focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.checklist-page .cl-tabs-label { text-transform: none; letter-spacing: 0; font-size: 15px; display: block; }
.cl-picker { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.cl-picker select { min-width: 240px; }
.cl-picker-count, .cl-category-count { color: var(--muted); font-size: 13px; }
.cl-mapping { border-top: 1px solid var(--line); margin-top: 24px; }
.cl-mapping > summary { min-height: 56px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.checklist-page .cl-cat { background: var(--card); padding: 0 16px 16px; border-radius: 8px; }
.checklist-page .cl-cat > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; cursor: pointer; }
.checklist-page .cl-cat > summary::before { content: '\203A'; }
.checklist-page .cl-cat[open] > summary::before { transform: rotate(90deg); }
.cl-category-title { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.cl-editor-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.checklist-page .cl-cat-head { align-items: end; }
.checklist-page .cl-cat-head .cl-editor-field { flex: 1; }
.checklist-page .cl-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 200px) auto; align-items: end; gap: 12px; }
.checklist-page .inp { width: 100%; min-width: 0; padding: 10px 12px; min-height: 48px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.checklist-page .cl-item-wrap { border-top: 1px solid var(--line); padding: 14px 0; margin: 0; }
.checklist-page .cl-ic { min-width: 44px; height: 44px; background: var(--surface-2); }
.checklist-page .cl-ic:disabled { opacity: .35; cursor: default; }
.checklist-page .cl-thresholds { background: var(--surface-2); margin-top: 12px; }
.checklist-page .cl-thresholds[hidden] { display: none; }
.checklist-page :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rag-detail .measurement-text { width: 240px; max-width: 100%; }
body:has(.checklist-page) .save-bar { max-width: calc(100% - 32px); flex-wrap: wrap; }
@media (max-width: 600px) {
  .checklist-page .cl-item { grid-template-columns: minmax(0, 1fr) auto; }
  .checklist-page .cl-item > .cl-editor-field:first-child { grid-column: 1 / -1; }
  .checklist-page .cl-cat-head { flex-wrap: wrap; }
  .cl-picker select { min-width: 0; flex: 1 1 100%; }
}
.cl-tabs-label { font-size: 13px; font-weight: 700; color: var(--muted); margin: 6px 2px 8px; text-transform: uppercase; letter-spacing: .02em; }
.cl-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 16px; padding: 8px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 14px;
}
.cl-tab {
  border: 1px solid transparent; background: #fff; color: var(--ink);
  padding: 8px 16px; border-radius: 999px; font: inherit; font-weight: 600;
  font-size: 14px; cursor: pointer; box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  transition: background .12s, color .12s, border-color .12s;
}
.cl-tab:hover { border-color: #d3e2ff; background: #eef4ff; color: var(--brand); }
.cl-tab.on { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 2px 8px rgba(11, 37, 69, .25); }
.cl-tab.on:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.cl-cat { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 14px 0; background: #f8fafc; }
.cl-cat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cl-cat-name { font-weight: 700; }
.cl-item { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.cl-item-label { flex: 1; min-width: 0; }
.cl-mm {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.cl-mm input { width: 18px; height: 18px; }
.cl-tools { display: inline-flex; gap: 4px; }
.cl-ic {
  min-width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); font-size: 14px; cursor: pointer; line-height: 1;
}
.cl-ic.danger { color: var(--danger); }
.cl-ic:active { background: var(--surface-2, #eef2f7); }
.cl-add, .cl-add-item { margin-top: 10px; }
.cl-add-item { font-size: 14px; min-height: 40px; padding: 0 14px; }
.cl-item-wrap { margin: 6px 0; }
.cl-item-wrap .cl-item { margin: 0; }
.cl-thresholds {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 4px 0 2px 4px; padding: 6px 10px;
  background: #fff; border: 1px dashed var(--line); border-radius: 8px;
  font-size: 13px;
}
.cl-th-label { color: var(--muted); font-weight: 600; }
.cl-th { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.cl-th-amber { color: var(--warn); }
.cl-th-red { color: var(--danger); }
.cl-th-in {
  width: 68px; font: inherit; padding: 5px 8px; border: 1px solid var(--line);
  border-radius: 8px; background: #f8fafc; color: var(--ink);
}
.admin-intro code {
  background: #eef4ff; color: var(--brand); border: 1px solid #d3e2ff;
  border-radius: 6px; padding: 1px 6px; font-size: 12px;
}

/* work type -> checklist mapping */
.tm-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tm-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; flex-wrap: wrap;
}
.tm-row + .tm-row { border-top: 1px solid var(--line); }
.tm-row:nth-child(odd) { background: #f8fafc; }
.tm-badge {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 26px; padding: 0 8px;
  background: #eef4ff; color: var(--brand); border: 1px solid #d3e2ff;
  border-radius: 999px; font-size: 13px; font-weight: 700;
}
.tm-name { flex: 1; min-width: 120px; font-weight: 600; }
.tm-arrow { color: var(--muted); font-size: 16px; flex: none; }
.tm-selwrap { position: relative; flex: none; }
.tm-sel {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-weight: 600; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 34px 8px 12px; min-height: 40px; min-width: 190px; cursor: pointer;
}
.tm-sel:focus { outline: none; border-color: var(--brand); }
.tm-selwrap::after {
  content: '\25BE'; position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 12px;
}

/* checklist preview (admin): the active checklist shown as the monteur sees it */
.preview-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(15, 23, 42, .55);
}
.preview-modal {
  display: flex; flex-direction: column;
  width: 100%; max-width: 720px; max-height: 92vh;
  background: var(--bg-page); color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, .35);
}
.preview-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  background: var(--card); border-radius: var(--radius) var(--radius) 0 0;
}
.preview-title { font-weight: 800; font-size: 17px; }
.preview-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.preview-close {
  margin-left: auto; flex: none;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
}
.preview-close:hover { background: var(--surface-2); color: var(--ink); }
.preview-body { padding: 16px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.preview-th { align-self: center; white-space: nowrap; }
.preview-foot {
  display: flex; justify-content: flex-end;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--card);
}
@media (min-width: 640px) {
  .preview-overlay { align-items: center; padding: 20px; }
  .preview-modal { border-radius: var(--radius); }
}

/* one-clock-per-mechanic conflict notice (start blocked, offer to stop the other) */
.cc-overlay {
  position: fixed; inset: 0; z-index: 220;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(15, 23, 42, .55);
}
.cc-modal {
  width: 100%; max-width: 420px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
  padding: 20px; text-align: center;
}
.cc-ico { font-size: 40px; line-height: 1; }
.cc-modal h3 { margin: 10px 0 6px; font-size: 19px; font-weight: 800; }
.cc-modal p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.cc-actions { display: flex; flex-direction: column; gap: 10px; }
.cc-actions .cc-stop { background: var(--danger); }

/* appointment booking iframe */
.booking { padding: 0; overflow: hidden; }
.booking-frame {
  display: block;
  width: 100%;
  height: 82vh;
  min-height: 620px;
  border: 0;
}

/* shared customer footer: appointment CTA + contact / trust banner */
.site-footer { margin: 24px 0 0; padding: 0; }
.sf-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px;
  width: calc(100% - 32px); max-width: 1100px; margin: 0 auto 14px; box-sizing: border-box;
  background: linear-gradient(120deg, #0b2545 0%, #164a8f 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
}
.sf-cta span { font-weight: 600; }
.sf-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 0 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
.sf-cta .btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, .26); }
.sf-cta .btn:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(0, 0, 0, .2); filter: none; }
.sf-cta .cta-ico { font-size: 18px; line-height: 1; }

/* Contact / trust block: a full-width banner styled like the header, so it
   reads as a distinct footer rather than another content card. */
.sf-contact {
  background: linear-gradient(120deg, #0b2545 0%, #164a8f 100%);
  color: #fff;
  border: 0;
  border-radius: 0;
  padding: 32px 16px calc(32px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(11, 37, 69, .3);
  text-align: center;
}
.sf-contact > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.sf-brand { font-weight: 800; font-size: 18px; margin-bottom: 12px; }
.sf-badge {
  display: inline-block; margin-left: 6px; padding: 2px 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  color: #fff; background: rgba(255, 255, 255, .18); border-radius: 999px; vertical-align: middle;
}
.sf-list { margin: 0 auto; display: inline-block; text-align: left; max-width: 100%; }
.sf-list > div { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.sf-list > div:last-child { border-bottom: 0; }
.sf-list dt { flex: 0 0 120px; color: rgba(255, 255, 255, .7); font-size: 14px; }
.sf-list dd { margin: 0; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.sf-list a { color: #fff; text-decoration: underline; }
.sf-copy { margin-top: 14px; color: rgba(255, 255, 255, .72); font-size: 12px; text-align: center; }
.sf-copy a { color: rgba(255, 255, 255, .8); text-decoration: underline; }

/* status banner: itemized progress */
.sb-progress {
  display: inline-block; margin-top: 4px;
  font-size: 13px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .25);
}

/* APK reminder banner (history page) */
.apk-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: #fffbeb; border: 1px solid #fde68a; border-left: 6px solid var(--warn);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px;
}
.apk-banner.expired { background: #fef2f2; border-color: #fecaca; border-left-color: var(--danger); }
.apk-txt { display: flex; flex-direction: column; }
.apk-txt strong { font-size: 15px; }
.apk-txt span { color: var(--muted); font-size: 13px; }
.apk-banner .btn { min-height: 44px; }

/* customer question / callback block on the report */
.contact-req textarea.txt { width: 100%; box-sizing: border-box; resize: vertical; min-height: 66px; }
.contact-req .txt {
  width: 100%; box-sizing: border-box; margin-top: 8px;
  padding: 10px 12px; font: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: #f8fafc;
}
.contact-req .cb { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; font-weight: 600; cursor: pointer; }
.contact-req .cb input { width: 20px; height: 20px; }

/* two-way contact choice: teruggebeld worden / WhatsApp */
.contact-choice { display: flex; flex-wrap: wrap; gap: 10px; }
.cc-opt {
  flex: 1; min-width: 200px; min-height: var(--tap);
  padding: 12px 14px; font: inherit; font-weight: 700; cursor: pointer;
  color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 10px;
}
.cc-opt.on { color: #fff; background: var(--brand); border-color: var(--brand); }
.cc-opt[data-cc="whatsapp"].on { background: #25d366; border-color: #1fb457; }
.wa-btn { display: flex; width: 100%; margin-top: 10px; background: #25d366; border-color: #1fb457; color: #fff; }
.wa-btn:hover { background: #1fb457; }
.tel-btn { display: flex; width: 100%; margin-top: 10px; }
html[data-theme="dark"] .cc-opt { background: var(--surface-2); border-color: var(--line); color: var(--ink); }

/* Internal workshop credit line (werkkaarten / Beheer / Checklists): a small,
   muted single line at the very bottom. Customer pages use .site-footer. */
.wk-footer {
  flex-shrink: 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* print: keep only the report content, hide interactive/nav chrome */
.print-logo { display: none; }
.veh, .report-intro { position: relative; }
@media print {
  .topbar, .noprint, .choose, .contact-req, .total-bar, .save-bar, .site-footer,
  .wk-footer, .status-banner, .apk-banner, .veh-status { display: none !important; }
  body { background: #fff; }
  .app { padding: 0; }
  .section { break-inside: avoid; border-color: #ccc; box-shadow: none; }
  .print-logo { display: block; }
  .veh .print-logo, .report-intro .print-logo {
    position: absolute; top: 14px; right: 16px; margin: 0;
  }
  .veh .print-logo img, .report-intro .print-logo img { height: 44px; width: auto; }
}

/* share link box */
.sharebox { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.sharebox input {
  flex: 1; min-width: 180px; min-height: var(--tap);
  padding: 10px 12px; font: inherit;
  border: 1px solid var(--line); border-radius: 10px;
  background: #f8fafc;
}

/* customer history — calm vehicle card + chips */
.actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.veh-title { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.customer-vehicle .veh-title { margin: 0; overflow-wrap: anywhere; }
.customer-vehicle .veh-sub { overflow-wrap: anywhere; }
.customer-updates { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.customer-updates .actions { flex-wrap: wrap; gap: 8px; margin: 0; }
.customer-warning { color: var(--warn); font-weight: 600; }
.customer-login-panel { max-width: 460px; margin: 0 auto; }
.customer-login h1 { margin-top: 0; font-size: 22px; }
.customer-login label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.customer-login .txt { width: 100%; min-width: 0; box-sizing: border-box; }
.customer-login-message { margin-top: 12px; color: var(--danger); }
@media (max-width: 480px) {
  .customer-updates .actions { width: 100%; }
  .customer-updates .actions .btn { flex: 1; }
}
.veh-sub { color: var(--muted); margin-top: 2px; }
.veh-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mi { font-size: 14px; font-weight: 600; color: var(--ink); background: #f1f5f9; border-radius: 999px; padding: 5px 12px; }
.mi.apk.warn { background: #fffbeb; color: #b45309; }
.mi.apk.bad { background: #fef2f2; color: var(--danger); }
.veh-status { margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; padding: 6px 14px; border-radius: 999px; }
.chip.ok { background: #dcfce7; color: #15803d; }
.chip.busy { background: #e0edff; color: var(--brand); }

/* prominent current-status banner inside the vehicle card */
.statusbox { border-radius: 12px; padding: 14px 16px; }
.statusbox.ok {
  display: flex; align-items: center; gap: 10px;
  background: #dcfce7; border: 1px solid #86efac; color: #15803d;
  font-size: 16px; font-weight: 800;
}
.statusbox.busy {
  background: #eff5ff; border: 1px solid #bcd4ff;
}
.statusbox-head { display: flex; align-items: center; gap: 10px; }
.statusbox-ico { font-size: 20px; line-height: 1; }
.statusbox.busy .statusbox-txt { font-size: 16px; font-weight: 800; color: var(--brand); }
.statusbox-count { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--brand); background: #dbe8ff; border-radius: 999px; padding: 3px 10px; }
.progressbar { margin-top: 12px; height: 10px; border-radius: 999px; background: #dbe8ff; overflow: hidden; }
.progressbar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #2563eb); transition: width .4s ease; }
.statusbox-report { margin-top: 12px; display: inline-flex; background: #fff; }
.statusbox.ok .statusbox-report { border-color: #86efac; color: #15803d; }
@keyframes ccr-spin { to { transform: rotate(360deg); } }
.statusbox-ico.spin { display: inline-block; animation: ccr-spin 2.4s linear infinite; }
@media (prefers-reduced-motion: reduce) { .statusbox-ico.spin { animation: none; } }
.veh-action { margin-top: 16px; }
.demo-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hist-head { display: flex; align-items: baseline; gap: 8px; margin: 18px 2px 12px; font-size: 16px; font-weight: 800; }

/* --- settings/cog menu ---------------------------------------------------- */
.menu-pop {
  position: fixed; z-index: 100; min-width: 220px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
}
.menu-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 0; font: inherit; font-weight: 600; color: var(--ink);
  padding: 12px 14px; border-radius: 8px;
}
.menu-item:hover { background: var(--surface-2); }
.menu-label { padding: 8px 12px 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-version {
  display: block; width: 100%; text-align: right; cursor: pointer;
  background: transparent; border: 0; font: inherit; font-size: 11px;
  color: var(--muted); padding: 4px 12px 6px;
}
.menu-version:hover { color: var(--brand); text-decoration: underline; }

/* changelog / "wat is nieuw" */
.chg-rel { padding-top: 10px; }
.chg-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.chg-ver { font-weight: 800; font-size: 16px; }
.chg-date { font-size: 12px; color: var(--muted); }
.chg-list { margin: 0; padding-left: 20px; }
.chg-list li { margin: 4px 0; line-height: 1.4; }

/* reception home */
.recep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.recep-home .cl-tab { min-height: 44px; }
.recep-home .cl-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.recep-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 130px; padding: 20px; cursor: pointer; text-align: center; font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.recep-tile:hover { border-color: var(--brand); }
.recep-tile.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.recep-ico { font-size: 34px; line-height: 1; }
.recep-label { font-size: 17px; font-weight: 700; }

/* admin password gate */
.lock-card { max-width: 420px; margin: 8px auto; }
.lock-input {
  width: 100%; box-sizing: border-box; min-height: 48px; margin: 6px 0 4px;
  padding: 12px 14px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink);
}
.lock-input:focus { outline: none; border-color: var(--brand); }
.lock-card .btn { width: 100%; margin-top: 8px; }

/* --- dark-mode surface overrides for hardcoded light backgrounds ---------- */
html[data-theme="dark"] .seg-btn,
html[data-theme="dark"] .agenda-row,
html[data-theme="dark"] .search-row,
html[data-theme="dark"] .floor-row,
html[data-theme="dark"] .plate-row,
html[data-theme="dark"] .wt-del,
html[data-theme="dark"] .wo-nav,
html[data-theme="dark"] .wo-sel,
html[data-theme="dark"] .rag,
html[data-theme="dark"] .btn.ghost,
html[data-theme="dark"] .statusbox-report {
  background: var(--card); color: var(--ink);
}
html[data-theme="dark"] .seg-btn.on { background: var(--brand); color: #fff; }
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .field .inp,
html[data-theme="dark"] .form-row input,
html[data-theme="dark"] .form-row textarea,
html[data-theme="dark"] .remarks,
html[data-theme="dark"] .contact-req .txt,
html[data-theme="dark"] .sharebox input,
html[data-theme="dark"] .cam,
html[data-theme="dark"] .rag-detail input {
  background: var(--surface-2); color: var(--ink); border-color: var(--line);
}
html[data-theme="dark"] .cam { color: var(--brand); border-color: var(--brand); }
html[data-theme="dark"] .mi { background: var(--surface-2); color: var(--ink); }
html[data-theme="dark"] .worktimer { background: var(--surface-2); border-color: var(--line); }
html[data-theme="dark"] .line.part .mark { background: var(--surface-2); color: var(--muted); }
html[data-theme="dark"] .agenda-row:hover,
html[data-theme="dark"] .search-row:hover,
html[data-theme="dark"] .floor-row:hover,
html[data-theme="dark"] .plate-row:hover { background: #223049; border-color: var(--brand); }
html[data-theme="dark"] .qnote { background: #1f3a5f; color: #cfe0ff; border-color: #2c5286; }
html[data-theme="dark"] .empty,
html[data-theme="dark"] .loading { color: var(--muted); }
.hist-head span { color: var(--muted); font-weight: 600; font-size: 14px; }

/* customer history timeline */
.timeline { border-left: 3px solid var(--line); }
.timeline.current { border-left: 4px solid var(--brand); background: #f5f9ff; }
.tl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tl-date { font-weight: 800; font-size: 17px; }
.tl-now {
  font-size: 12px; font-weight: 800; color: #fff; background: var(--brand);
  border-radius: 999px; padding: 2px 10px; margin-left: 8px; vertical-align: middle;
  text-transform: uppercase; letter-spacing: .5px;
}
.tl-km { color: var(--muted); font-weight: 600; white-space: nowrap; }
.tl-tasks { margin: 8px 0 6px; padding-left: 20px; }
.tl-tasks li { font-weight: 600; margin: 2px 0; }
.tl-parts { color: var(--muted); font-size: 14px; margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-inv { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* customer status banner (history page) */
.status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.status-banner .sb-icon { font-size: 24px; line-height: 1; }
.status-banner .sb-body { display: flex; flex-direction: column; gap: 2px; }
.status-banner .sb-body strong { font-size: 16px; }
.status-banner .sb-body span { font-size: 14px; opacity: .85; }
.status-banner.ready { background: #dcfce7; border-color: #86efac; color: #14532d; }
.status-banner.received { background: #e0f2fe; border-color: #7dd3fc; color: #0c4a6e; }

/* print / PDF export (customer history) */
@media print {
  .topbar, .noprint, .offline-banner, .wo-tracker { display: none !important; }
  html, body { background: #fff; }
  .app { padding: 0; max-width: 100%; margin: 0; }
  .section {
    border: 1px solid #cbd5e1;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 10px;
  }
  .timeline { break-inside: avoid; page-break-inside: avoid; }
  a[href]::after { content: ''; }
  .print-logo { display: block; }
  .veh .print-logo, .report-intro .print-logo {
    position: absolute; top: 14px; right: 16px; margin: 0;
  }
  .veh .print-logo img, .report-intro .print-logo img { height: 44px; width: auto; }
}

/* Mechanic view is landscape-only: cover the screen with a rotate prompt when
   the device is held in portrait. #rotate-hint only exists on the mechanic
   index page, so this never affects the customer portal. */
#rotate-hint { display: none; }
@media (orientation: portrait) {
  #rotate-hint {
    display: flex; position: fixed; inset: 0; z-index: 9999;
    flex-direction: column; align-items: center; justify-content: center; gap: 16px;
    background: #0b2545; color: #fff; text-align: center; padding: 24px;
  }
  #rotate-hint .rot-ico { font-size: 56px; animation: rotate-hint-turn 2.4s ease-in-out infinite; }
  #rotate-hint .rot-txt { font-size: 18px; font-weight: 700; line-height: 1.4; max-width: 340px; }
}
@keyframes rotate-hint-turn {
  0%, 45% { transform: rotate(0deg); }
  55%, 100% { transform: rotate(-90deg); }
}
