/* @statkit/admin — plain, functionele dashboard-stijl (F1.5 K4).
   Token-gestyled: erft de klant-thema-variabelen (var(--*)) waar aanwezig, met veilige
   fallbacks zodat het dashboard ook standalone (dev-server) werkt. Function-first —
   leesbaar en bruikbaar, NIET ontworpen. Visuele politoer komt later. */

:root {
  --bg: var(--sk-bg, #f6f6f4);
  --panel: var(--sk-panel, #ffffff);
  --ink: var(--sk-ink, #1c1c1a);
  --muted: var(--sk-muted, #6b6b64);
  --line: var(--sk-line, #e2e2dc);
  --accent: var(--sk-accent, #2f6f4f);
  --accent-ink: var(--sk-accent-ink, #ffffff);
  --warn: #9a5b00;
  --warn-bg: #fff6e6;
  --err: #a11;
  --ok: #2f6f4f;
  --radius: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }

/* Het hidden-attribuut MOET winnen van de display-regels hieronder (.login/.app/.liveedit/
   .versions zetten display:grid/flex met dezelfde specificiteit als de UA-[hidden]-regel,
   en een auteur-regel verslaat de UA-regel — dus zonder dit blijft #login zichtbaar ONDER
   #app zodra je inlogt). !important sluit die klasse van bugs voorgoed. */
[hidden] { display: none !important; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 460px; width: 100%; }
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.login-card .sub { color: var(--muted); margin: 0 0 20px; }
.login-form { display: grid; gap: 12px; }
.login-form h2 { font-size: 15px; margin: 0; }
.login-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.login-form input { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
.or { text-align: center; color: var(--muted); margin: 18px 0 12px; font-size: 13px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.err { color: var(--err); font-size: 13px; margin: 4px 0 0; }

/* ---------- buttons ---------- */
.btn { font: inherit; padding: 9px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- app shell ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 600; }
.spacer { flex: 1; }
.status { font-size: 13px; color: var(--muted); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.status.dirty { color: var(--warn); background: var(--warn-bg); border-color: #f0dcae; }
.status.ok { color: var(--ok); }
.workspace-notice { padding: 9px 16px; border-bottom: 1px solid #f0dcae; background: var(--warn-bg); color: var(--warn); font-size: 13px; text-align: center; }
.workspace-notice[data-kind="renderer-bridge"] { border-color: #b9d7c8; background: #eef8f2; color: #285b43; }

.body { flex: 1; display: flex; align-items: stretch; }
.nav { width: 200px; border-right: 1px solid var(--line); background: var(--panel); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: block; padding: 9px 12px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 14px; }
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: var(--accent); color: var(--accent-ink); }
.nav-item.dirty::after { content: "•"; color: var(--warn); margin-left: 6px; }
.nav-item.active.dirty::after { color: var(--accent-ink); }
/* LE1e: scheidt de pagina-tabs van de vaste content-tabs (site/blog/legal/feedback). */
.nav-group-label { margin: 14px 0 2px; padding: 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

.editor { flex: 1; padding: 20px; max-width: 820px; }

/* ---------- CMS-05: eenvoudige klantstart ---------- */
.client-home { max-width: 900px; }
.client-home h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.12; letter-spacing: -.025em; }
.client-eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.client-lead { max-width: 62ch; margin: 12px 0 22px; color: var(--muted); font-size: 16px; }
.home-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 22px; }
.home-action { min-height: 112px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); cursor: pointer; text-align: left; }
.home-action:hover { border-color: var(--accent); transform: translateY(-1px); }
.home-action strong, .home-action span { display: block; }
.home-action strong { margin-bottom: 5px; font-size: 17px; }
.home-action span { color: var(--muted); font-size: 13.5px; }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.home-card { margin: 0; }
.home-card dl { margin: 0; }
.home-card dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; border-top: 1px solid var(--line); }
.home-card dt { color: var(--muted); }
.home-card dd { margin: 0; font-weight: 650; text-align: right; }
.home-card ul { margin: 0; padding-left: 20px; }
.home-card li + li { margin-top: 7px; }
.client-help { margin: 18px 0 0; color: var(--muted); font-size: 13.5px; }
.client-workspace .editor { max-width: 980px; }

/* ---------- CMS-08: lokaal vlootbeheer, bewust alleen-lezen ---------- */
.fleet-surface .editor { max-width: none; min-width: 0; width: 100%; }
.fleet-surface #versionsBtn,
.fleet-surface #viewSiteBtn,
.fleet-surface #liveBtn,
.fleet-surface #hostedPreviewBtn,
.fleet-surface #revokePreviewBtn,
.fleet-surface #revertBtn,
.fleet-surface #saveBtn { display: none !important; }
.fleet-overview { width: 100%; max-width: 1320px; }
.fleet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.fleet-head h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.12; letter-spacing: -.025em; }
.fleet-head .client-lead { margin-bottom: 0; }
.fleet-loading { color: var(--muted); }
.fleet-error { max-width: 720px; margin-top: 16px; padding: 14px 16px; border: 1px solid #efb8b8; border-radius: 9px; background: #fff7f7; color: var(--err); }
.fleet-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.fleet-metric { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.fleet-metric span, .fleet-metric small, .fleet-table small, .fleet-table code { display: block; }
.fleet-metric span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.fleet-metric strong { display: block; margin: 5px 0 2px; font-size: 25px; }
.fleet-metric small { color: var(--muted); }
.fleet-metric.is-ok { border-top: 3px solid var(--ok); }
.fleet-metric.is-warn { border-top: 3px solid var(--warn); }
.fleet-metric.is-err { border-top: 3px solid var(--err); }
.fleet-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.fleet-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fleet-table th, .fleet-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.fleet-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.fleet-table tr:last-child td { border-bottom: 0; }
.fleet-table td > strong, .fleet-table td > span { display: block; margin-bottom: 4px; }
.fleet-table small { margin-top: 4px; color: var(--muted); line-height: 1.4; }
.fleet-table code { margin-top: 5px; overflow-wrap: anywhere; font-size: 11px; }
.fleet-checks summary { cursor: pointer; font-weight: 700; }
.fleet-checks ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.fleet-checks li + li { margin-top: 4px; }
.fleet-checks .is-ok::marker { color: var(--ok); }
.fleet-checks .is-fail { color: var(--err); }
.fleet-badge { display: inline-flex !important; width: max-content; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 750; }
.fleet-badge.is-normal { color: var(--ok); background: #f4fbf6; border-color: #b9d8c5; }
.fleet-badge.is-warning { color: var(--warn); background: var(--warn-bg); border-color: #f0dcae; }
.fleet-badge.is-blocked { color: var(--err); background: #fff7f7; border-color: #efb8b8; }
.fleet-plan { margin-top: 16px; padding: 20px; }
.fleet-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.fleet-section-head h2, .fleet-boundary h2 { margin: 0; font-size: 21px; }
.fleet-plan-sites { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 18px 0; padding: 0; list-style: none; }
.fleet-plan-sites li { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.fleet-plan-sites li > span { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--bg); font-weight: 750; }
.fleet-plan-sites li.is-canary { border-color: var(--accent); }
.fleet-plan-sites strong, .fleet-plan-sites small { display: block; }
.fleet-plan-sites small { margin-top: 3px; color: var(--muted); }
.fleet-gates { display: flex; flex-wrap: wrap; gap: 7px; }
.fleet-gates span { padding: 5px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; }
.fleet-boundary { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); gap: 22px; margin-top: 16px; padding: 20px; border: 1px solid #f0dcae; border-radius: 10px; background: var(--warn-bg); }
.fleet-boundary p { max-width: 68ch; margin-bottom: 0; color: var(--warn); }
.fleet-boundary ul { margin: 0; padding-left: 20px; }
.fleet-boundary li + li { margin-top: 7px; }
.fleet-footnote { color: var(--muted); font-size: 12px; }

/* ---------- CMS-07: AI-voorstel, nooit direct publiceren ---------- */
.ai-assistant { max-width: 980px; }
.ai-assistant > h1 { margin: 0; max-width: 18ch; font-size: clamp(28px, 4vw, 42px); line-height: 1.12; letter-spacing: -.025em; }
.ai-layout { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr); gap: 16px; align-items: start; }
.ai-form { display: grid; gap: 8px; }
.ai-form > label { margin-top: 5px; color: var(--muted); font-size: 13px; font-weight: 650; }
.ai-form textarea, .ai-form select { width: 100%; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); padding: 10px 11px; font: inherit; }
.ai-form textarea { min-height: 126px; resize: vertical; }
.ai-examples { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.ai-examples button { border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); padding: 6px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.ai-examples button:hover { border-color: var(--accent); }
.ai-submit { margin-top: 8px; }
.ai-result { min-width: 0; }
.ai-empty, .ai-loading, .ai-error, .ai-saved, .ai-proposal { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 20px; }
.ai-empty p, .ai-error p, .ai-saved p { margin: 7px 0 0; color: var(--muted); }
.ai-loading { color: var(--muted); }
.ai-error { border-color: #efb8b8; background: #fff7f7; }
.ai-error strong { color: var(--err); }
.ai-saved { border-color: #b9d8c5; background: #f4fbf6; }
.ai-saved code { display: inline-block; margin-top: 12px; color: var(--ok); }
.ai-saved-actions { display: flex; margin-top: 16px; }
.ai-saved-actions .btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.ai-preview-error { color: var(--err) !important; }
.ai-proposal h2 { margin: 2px 0 18px; font-size: 22px; line-height: 1.25; }
.ai-proposal h3 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ai-impact, .ai-evidence { margin: 0; padding-left: 20px; }
.ai-impact li + li, .ai-evidence li + li { margin-top: 5px; }
.ai-operations { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ai-operation { border-radius: 999px; background: var(--bg); border: 1px solid var(--line); padding: 4px 9px; font-size: 12px; }
.ai-diffs { display: grid; gap: 8px; }
.ai-diff { border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; min-width: 0; }
.ai-diff > strong { display: block; margin-bottom: 6px; font: 11.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); overflow-wrap: anywhere; }
.ai-diff > div { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 8px; font-size: 12.5px; overflow-wrap: anywhere; }
.ai-before { color: var(--muted); text-decoration: line-through; }
.ai-arrow { color: var(--muted); }
.ai-after { color: var(--ink); font-weight: 650; }
.ai-small { color: var(--muted); font-size: 12.5px; }
.ai-boundary { margin: 18px 0 0; padding: 10px 12px; border-radius: 7px; background: var(--warn-bg); color: var(--warn); font-size: 12.5px; }
.ai-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 16px; }

/* ---------- cards + fields ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 16px; }
.card > b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 12px; }
.section-card.is-disabled { border-style: dashed; }
.section-card.is-disabled > :not(.section-visibility):not(b) { opacity: .62; }
.section-visibility { padding: 9px 10px; margin: 0 0 14px; border-radius: 6px; background: var(--bg); }
.section-visibility label.toggle { margin: 0; font-weight: 700; }
.field { margin: 0 0 12px; }
.field:last-child { margin-bottom: 0; }
.field > label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.field input[type="text"], .field input[type="url"], .field input[type="number"], .field textarea, .field select {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); width: 100%;
}
.field textarea { resize: vertical; min-height: 60px; font-family: inherit; }
.field label.toggle { display: flex; align-items: center; gap: 8px; flex-direction: row; color: var(--ink); font-size: 14px; }
.field label.toggle input { width: auto; }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.warn { color: var(--warn); background: var(--warn-bg); border: 1px solid #f0dcae; border-radius: 5px; padding: 6px 9px; font-size: 12.5px; margin-top: 6px; }

/* ---------- list editor ---------- */
.list-item { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 8px; overflow: hidden; }
.list-item.open { border-color: var(--muted); }
.li-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; background: var(--bg); }
.li-title { flex: 1; font-size: 14px; }
.li-tools { display: flex; gap: 2px; }
.li-body { padding: 10px 12px; }
.li-body:empty { display: none; }
.iconbtn { border: 1px solid var(--line); background: var(--panel); border-radius: 5px; width: 26px; height: 26px; cursor: pointer; font-size: 13px; line-height: 1; }
.iconbtn:hover { border-color: var(--muted); }
.add-btn { font: inherit; padding: 7px 12px; border: 1px dashed var(--line); border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; margin-top: 6px; }
.add-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- live bewerken (K5) ---------- */
.btn.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.liveedit { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.liveedit-bar { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.liveedit-hint { flex: 1; font-size: 13px; color: var(--muted); }
.liveedit-frame-wrap { flex: 1; min-height: 480px; background: var(--bg); }
.live-preview-frame { width: 100%; height: 100%; min-height: 480px; border: 0; display: block; background: #fff; }

/* ---------- beeld-veld (K6) ---------- */
.img-field .img-row { display: flex; gap: 12px; align-items: flex-start; }
.img-thumb { width: 96px; height: 96px; flex: none; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--bg); display: grid; place-items: center; }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-thumb.empty { border-style: dashed; }
.img-empty-note { color: var(--muted); font-size: 12px; }
.img-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.img-path { font-size: 12px; color: var(--muted); word-break: break-all; }
.img-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- media-picker (K6) ---------- */
.mp-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 40; padding: 24px; }
.mp-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); width: min(760px, 100%); max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
.mp-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mp-head .spacer { flex: 1; }
.mp-status { padding: 8px 16px; font-size: 13px; color: var(--muted); min-height: 18px; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; padding: 4px 16px 16px; overflow-y: auto; }
.mp-empty { grid-column: 1 / -1; color: var(--muted); padding: 24px 0; text-align: center; }
.mp-tile { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 0; cursor: pointer; overflow: hidden; text-align: left; }
.mp-tile:hover { border-color: var(--accent); }
.mp-tile.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.mp-tile.staged { border-color: var(--warn); }
.mp-thumb { aspect-ratio: 4/3; background: var(--bg); }
.mp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-name { padding: 6px 8px; font-size: 11.5px; color: var(--muted); word-break: break-all; }

/* ---------- versie-historie (K7) ---------- */
.versions { flex: 1; padding: 20px; max-width: 820px; }
.versions-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.versions-title { flex: 1; font-weight: 600; font-size: 16px; }
.ver-intro { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; max-width: 60ch; }
.ver-card > b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 4px; }
.ver-loading, .ver-empty { color: var(--muted); font-size: 13.5px; padding: 8px 0; }
.ver-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ver-row:first-of-type { border-top: none; }
.ver-info { flex: 1; min-width: 0; }
.ver-when { font-size: 14px; color: var(--ink); }
.ver-msg { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ver-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.ver-sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ver-now { font-size: 12px; color: var(--ok); background: var(--warn-bg); border: 1px solid #cfe6d8; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ver-latest { font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }

/* de "teruggezet naar <sha>"-notice boven de velden */
.restore-notice { background: var(--warn-bg); border: 1px solid #f0dcae; color: var(--warn); border-radius: var(--radius); padding: 11px 14px; margin: 0 0 16px; font-size: 13.5px; line-height: 1.45; }
.restore-notice strong { color: var(--ink); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 20; max-width: 90vw; display: flex; align-items: center; gap: 12px; }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--err); }
/* LE1b: de 10s-ongedaan-maken-knop op de save-toast (STUDIO-OS-PLAN §3.2). */
.toast-action { flex: none; background: transparent; border: 1px solid rgba(255,255,255,.6); color: #fff; border-radius: 6px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.toast-action:hover { background: rgba(255,255,255,.15); }

/* ---------- LE1-review: de checklist-modal vóór Opslaan (foolproof-eis) ---------- */
.review-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 30; display: flex; align-items: center; justify-content: center; padding: 24px; }
.review-modal { background: var(--surface, #fff); border-radius: var(--radius, 10px); max-width: 640px; width: 100%; max-height: 84vh; display: flex; flex-direction: column; box-shadow: 0 24px 64px -16px rgba(0,0,0,.35); }
.review-modal h3 { margin: 0; padding: 20px 24px 0; font-size: 17px; }
.review-intro { margin: 8px 24px 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.review-actions { display: flex; gap: 8px; margin: 14px 24px 0; }
.review-list { overflow-y: auto; margin: 14px 0 0; padding: 4px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.review-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.review-row:last-child { border-bottom: none; }
.review-row input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.review-row-body { flex: 1; min-width: 0; }
.review-row-where { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.review-row-diff { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; word-break: break-word; }
.review-before { text-decoration: line-through; opacity: .7; }
.review-after { color: var(--ink); font-weight: 600; }
.review-arrow { opacity: .5; }
.review-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; }

/* ---------- LE1c-remainder: het Thema-paneel (token-override, Pieter-only) ---------- */
.theme-token-row { display: flex; align-items: flex-end; gap: 10px; }
.theme-token-row > label { flex: 1; }
.theme-swatch { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line); flex: none; margin-bottom: 1px; }
.theme-issues { background: var(--warn-bg); border: 1px solid #f0dcae; border-radius: 6px; padding: 10px 12px; margin: 12px 0; font-size: 12.5px; color: var(--warn); }
.theme-issues ul { margin: 6px 0 0; padding-left: 18px; }
.theme-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }

@media (max-width: 680px) {
  .topbar { flex-wrap: wrap; padding: 10px 12px; }
  .topbar .brand { flex: 1 1 auto; }
  .topbar .spacer { display: none; }
  .topbar .status { order: 2; }
  .client-workspace .topbar .status { display: none; }
  .topbar .btn { flex: 1 1 auto; }
  .workspace-notice { padding-inline: 12px; text-align: left; }
  .body { flex-direction: column; }
  .nav { width: auto; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .nav-group-label { display: none; }
  .nav-item { flex: 0 0 auto; min-height: 44px; display: flex; align-items: center; }
  .editor { padding: 14px; }
  .home-grid { grid-template-columns: 1fr; }
  .home-actions { grid-template-columns: 1fr; }
  .home-action { min-height: 92px; }
  .ai-layout { grid-template-columns: 1fr; }
  .ai-actions .btn { width: 100%; min-height: 44px; }
  .ai-saved-actions .btn { width: 100%; min-height: 44px; }
  .ai-diff > div { grid-template-columns: 1fr; }
  .ai-arrow { transform: rotate(90deg); width: max-content; }
  .fleet-head { display: grid; gap: 14px; }
  .fleet-head .btn { width: 100%; min-height: 44px; }
  .fleet-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fleet-boundary { grid-template-columns: 1fr; }
}

@media (min-width: 681px) and (max-width: 980px) {
  .topbar { flex-wrap: wrap; }
  .body { min-width: 0; }
  .nav { width: 180px; flex: 0 0 180px; }
  .editor { min-width: 0; padding: 18px; }
  .home-grid { grid-template-columns: 1fr; }
  .ai-layout { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .fleet-table-wrap { overflow: visible; border: 0; background: transparent; }
  .fleet-table, .fleet-table tbody { display: block; }
  .fleet-table thead { display: none; }
  .fleet-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
  .fleet-table td, .fleet-table tr:last-child td { display: block; min-width: 0; border-bottom: 1px solid var(--line); }
  .fleet-table td::before { content: attr(data-label); display: block; margin-bottom: 7px; color: var(--muted); font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
}

@media (max-width: 520px) {
  .fleet-table tr { grid-template-columns: 1fr; }
  .fleet-metrics { grid-template-columns: 1fr; }
  .fleet-section-head { display: grid; }
}
