/*
  Autosoft Web · designsysteem
  Bron: docs/autosoft-web/03-ux-designsysteem.md §3 en de mock-ups (Main.dc.html).
  Alle kleuren komen uit deze tokens. De klantkleur (--tenant-accent) enkel voor de band bovenaan,
  de rand van het logo, de begroeting en de avatar-ring; nooit voor knoppen, statussen of grafieken.
*/

/*
  Lettertypes: zelf gehost (GDPR, offline, geen externe verbinding; ADR 0011). De bestanden staan in wwwroot/fonts/ van dit
  project (OFL-licentie). Ontbreekt een bestand, dan valt de tekst netjes terug op het systeemlettertype (zie --font en --mono).
*/
/* Lettertypes zelf gehost (variabel, OFL; licenties in fonts/). Geen externe bronnen (ADR 0011). */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('fonts/PlusJakartaSans-Variable.ttf') format('truetype'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('fonts/JetBrainsMono-Variable.ttf') format('truetype'); }

:root {
  --bg: #F3F6FA;
  --surface: #FFFFFF;
  --surface2: #F7F9FC;
  --border: #E1E7EF;
  --ink: #0F1B2D;
  --muted: #55627A;
  --brand: #2791D0;
  --brand-strong: #1A6DA6;
  --brand-hover: #124E78;
  --brand-soft: #E6F2FA;
  --accent: #F5A524;
  --accent-soft: #FFF4E0;
  --accent-ink: #9A5300;
  --ok: #0B7A3E;
  --ok-soft: #E5F6EC;
  --warn: #8F5A00;
  --warn-soft: #FFF3D6;
  --bad: #B4232F;
  --bad-soft: #FCE9EA;
  --damage: #4632B8;
  --damage-soft: #EEF0FF;
  --invoiced: #6B4FD8;
  --planned: #8FA3BC;
  --side: #0C1B2E;
  --side-ink: #DCE6F2;
  --side-muted: #8FA3BC;
  --side-active: #163A5E;
  --side-hover: #13304F;
  --on-brand: #FFFFFF;
  --on-status: #FFFFFF; /* tekst op een gevulde statuskleur (ok, bad, invoiced) */
  --tenant-accent: #2791D0;

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, 'Liberation Mono', monospace;

  --r-field: 10px;
  --r-card: 16px;
  --r-tile: 12px;
  --r-pill: 999px;
  --shadow-float: 0 12px 32px rgba(15, 27, 45, .16), 0 2px 6px rgba(15, 27, 45, .08);
  --page-pad: 28px;
  --gap-section: 22px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0A111C;
  --surface: #111A27;
  --surface2: #152131;
  --border: #223047;
  --ink: #E8EEF6;
  --muted: #9AA9BE;
  --brand: #4FAEE6;
  --brand-strong: #6CBDEB;
  --brand-hover: #8DCDF0;
  --brand-soft: #16314A;
  --accent: #F5B54A;
  --accent-soft: #3A2A10;
  --accent-ink: #F7C46E;
  --ok: #5AD08E;
  --ok-soft: #10301F;
  --warn: #F2C25B;
  --warn-soft: #33270C;
  --bad: #F2828A;
  --bad-soft: #3A1619;
  --damage: #B3A6FF;
  --damage-soft: #231D4A;
  --invoiced: #9D88F2;
  --side: #070D16;
  --side-active: #17304C;
  --on-brand: #06121F;
  --on-status: #0A111C;
  color-scheme: dark;
}

@media (max-width: 720px) {
  :root { --page-pad: 16px; }
}

/* ---------- Basis ---------- */

html, body { margin: 0; min-height: 100%; }
body.as-body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.as-body a { color: var(--brand-strong); }
.as-body a:hover { color: var(--brand-hover); }
.as-body :focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.as-sr-only { position: absolute; left: 0; /* nooit horizontaal buiten beeld (geen scrollen op de telefoon) */ width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.as-muted { color: var(--muted); }
.as-num { font-variant-numeric: tabular-nums; }
.as-mono { font-family: var(--mono); }
.as-row { display: flex; align-items: center; gap: 12px; }
.as-spacer { flex: 1 1 auto; }

h1.as-h1 { margin: 4px 0 6px; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h2.as-h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
@media (max-width: 720px) { h1.as-h1 { font-size: 24px; } }

/* ---------- Kaarten en knoppen ---------- */

.as-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.as-card-pad { padding: 16px 18px; }
.as-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

.as-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; box-sizing: border-box;
  border-radius: var(--r-field); padding: 9px 14px;
  font: 600 14px var(--font);
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .12s, border-color .12s, transform .06s;
}
.as-body a.as-btn { color: var(--ink); }
.as-btn:hover { background: var(--surface2); }
.as-btn:active { transform: translateY(1px); }
.as-btn.primary, .as-body a.as-btn.primary { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--on-brand); }
.as-btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.as-btn.ghost { background: transparent; border-color: transparent; }

.as-iconbtn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-field); border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  cursor: pointer; position: relative; padding: 0; flex: none;
}
.as-body a.as-iconbtn { color: var(--ink); }
.as-iconbtn:hover { background: var(--surface2); }
.as-badge-count {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 4px; box-sizing: border-box;
  background: var(--bad); color: var(--on-status); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

.as-chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  border-radius: var(--r-pill); padding: 7px 14px; min-height: 36px; box-sizing: border-box;
  font: 600 13px var(--font); cursor: pointer;
}
.as-chip:hover { border-color: var(--muted); }
.as-chip[aria-pressed="true"], .as-chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.as-body a.as-chip { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.as-body a.as-chip.on { color: var(--bg); }

/* ---------- Pillen en statussen ---------- */

.as-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill); padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.as-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.as-pill.neutral { background: var(--surface2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.as-pill.brand { background: var(--brand-soft); color: var(--brand-strong); }
.as-pill.strong { background: var(--brand-strong); color: var(--on-brand); }
.as-pill.wait { background: var(--warn-soft); color: var(--warn); }
.as-pill.ok { background: var(--ok-soft); color: var(--ok); }
.as-pill.invoiced { background: var(--damage-soft); color: var(--invoiced); }
.as-pill.damage { background: var(--damage-soft); color: var(--damage); }
.as-pill.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- Nummerplaat (altijd wit met rode letters, ook in donkere modus) ---------- */

.as-plate { display: inline-flex; align-items: stretch; border: 1.5px solid #C8102E; border-radius: 5px; background: #FFFFFF; overflow: hidden; line-height: 1; flex: none; vertical-align: middle; }
.as-plate .eu { background: #1F4FB4; color: #FFFFFF; font-size: 8px; font-weight: 700; padding: 0 3px 3px; display: flex; align-items: flex-end; }
.as-plate .nr { font-family: var(--mono); font-weight: 700; color: #C8102E; font-size: 13px; padding: 5px 7px; letter-spacing: .04em; }
.as-plate.s .nr { font-size: 11px; padding: 3px 5px; }
.as-plate.l .nr { font-size: 20px; padding: 8px 10px; }
.as-plate.l .eu { font-size: 10px; padding: 0 4px 5px; }

/* ---------- Voortgang ---------- */

.as-bar { height: 8px; border-radius: var(--r-pill); background: var(--surface2); overflow: hidden; border: 1px solid var(--border); }
.as-bar > span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--brand); transition: width .4s ease; }

.as-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; background: var(--brand-soft); color: var(--brand-strong);
}
.as-avatar.s { width: 34px; height: 34px; font-size: 13px; }
.as-avatar.ring { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--tenant-accent); }
.as-avatar.t1 { background: #DCEFFA; color: #124E78; }
.as-avatar.t2 { background: #FFE9C7; color: #7A4300; }
.as-avatar.t3 { background: #E3F5EA; color: #0B5A2E; }
.as-avatar.t4 { background: #EEE8FF; color: #46309E; }
.as-avatar.t5 { background: #FCE4E6; color: #8A1C26; }
.as-avatar.accent { background: var(--accent); color: #2A1700; }
/* Donker: dezelfde tinten gedempt, anders lichten de initialen op als felle bollen. */
:root[data-theme="dark"] .as-avatar.t1 { background: #12324A; color: #A9D6F5; }
:root[data-theme="dark"] .as-avatar.t2 { background: #3D2A0E; color: #FFD08A; }
:root[data-theme="dark"] .as-avatar.t3 { background: #123A24; color: #9FE0B8; }
:root[data-theme="dark"] .as-avatar.t4 { background: #2A2152; color: #C9BBFF; }
:root[data-theme="dark"] .as-avatar.t5 { background: #47181D; color: #F6B3BA; }

/* ---------- KPI en flow ---------- */

.as-kpi { padding: 18px 20px; min-width: 0; }
.as-kpi .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.as-kpi .value { font-size: 34px; font-weight: 800; margin: 6px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.as-kpi .hint { font-size: 13px; color: var(--muted); }
.as-kpi .hint.ok { color: var(--ok); font-weight: 600; }
.as-kpi .hint.warn { color: var(--warn); font-weight: 600; }
.as-kpi .hint.bad { color: var(--bad); font-weight: 600; }

.as-goal { padding: 20px; display: flex; align-items: center; gap: 18px; min-width: 0; border: none; color: #FFFFFF; background: linear-gradient(135deg, #1A6DA6, #0F4C7A); }
:root[data-theme="dark"] .as-goal { background: linear-gradient(135deg, #12507C, #0A2F4D); }
.as-goal .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #CFE6F6; }
.as-goal .title { font-size: 22px; font-weight: 800; margin: 4px 0 6px; }
.as-goal .text { font-size: 14px; color: #E3F0FA; }
.as-goal .streak { display: flex; gap: 6px; margin-top: 12px; }
.as-goal .streak span { width: 26px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.25); }
.as-goal .streak span.on { background: #F5A524; }
.as-goal-ring circle.track { stroke: rgba(255,255,255,.18); }
.as-goal-ring circle.value { stroke: #F5A524; transition: stroke-dasharray .6s ease; }

.as-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.as-flow-item { display: block; text-decoration: none; color: var(--ink); background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-tile); padding: 12px 14px; transition: border-color .12s, transform .12s; }
.as-body a.as-flow-item { color: var(--ink); }
.as-flow-item:hover { border-color: var(--brand); transform: translateY(-1px); }
.as-flow-item .label { font-size: 12px; font-weight: 700; color: var(--muted); }
.as-flow-item .value { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.as-flow-item .as-bar { margin-top: 8px; }
.as-flow-item.wait { background: var(--warn-soft); }
.as-flow-item.wait .label { color: var(--warn); }
.as-flow-item.ok { background: var(--ok-soft); }
.as-flow-item.ok .label { color: var(--ok); }

/* ---------- Lijsten ---------- */

.as-list-row {
  display: grid; grid-template-columns: 52px 116px minmax(0,1fr) 124px 136px 24px;
  align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 14px;
  color: var(--ink); text-decoration: none;
}
.as-body a.as-list-row { color: var(--ink); }
.as-list-row:hover { background: var(--surface2); }
.as-list-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.as-list-text > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-list-text .as-muted { font-size: 13px; }
.as-list-scroll { overflow-x: auto; }
.as-list-scroll > div { min-width: 720px; }

.as-alert { display: flex; gap: 12px; text-decoration: none; color: var(--ink); padding: 10px 12px; border-radius: var(--r-tile); background: var(--surface2); border: 1px solid var(--border); font-size: 14px; }
.as-body a.as-alert { color: var(--ink); }
.as-alert svg { flex: none; margin-top: 1px; color: var(--brand-strong); }
.as-alert.bad { background: var(--bad-soft); border-color: transparent; }
.as-alert.bad svg { color: var(--bad); }
.as-alert.warn { background: var(--warn-soft); border-color: transparent; }
.as-alert.warn svg { color: var(--warn); }
.as-alert:hover { filter: brightness(.98); }

.as-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 16px; color: var(--muted); }
.as-empty .icon { width: 48px; height: 48px; border-radius: 14px; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; }
.as-empty b { color: var(--ink); font-size: 15px; }

.as-celebrate { padding: 16px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; background: var(--accent-soft); border-color: transparent; }
.as-celebrate .medal { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: #2A1700; display: flex; align-items: center; justify-content: center; flex: none; }
.as-celebrate .text { font-size: 14px; color: var(--accent-ink); }

/* ---------- Shell ---------- */

/* App-indeling: de topbalk blijft staan, enkel de inhoud scrolt (nodig voor de virtuele grids van XAF). */
.as-app { height: 100vh; height: 100dvh; display: flex; align-items: stretch; border-top: 4px solid var(--tenant-accent); box-sizing: border-box; overflow: hidden; }

.as-side {
  width: 248px; flex: none; background: var(--side); padding: 18px 12px; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 2px; height: 100%; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #24405F transparent;
}

.as-brand {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: none;
  background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.09), inset 3px 0 0 var(--tenant-accent);
  cursor: pointer; text-align: left; font-family: inherit; margin-bottom: 12px;
}
.as-brand-logo { width: 40px; height: 40px; border-radius: 11px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.as-brand-logo img { max-width: 34px; max-height: 34px; object-fit: contain; }
.as-brand-text { min-width: 0; flex: 1 1 auto; }
/* Een lange firmanaam ("Carrosserie Demo", "Autohuis Claessens") loopt over twee regels in plaats van afgekapt te worden. */
.as-brand-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; color: #FFFFFF; font-weight: 800; font-size: 14px;
  line-height: 1.2; letter-spacing: -0.01em; overflow: hidden; overflow-wrap: anywhere; }
.as-brand-sub { display: block; color: var(--side-muted); font-size: 12px; }

.as-nav {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-field);
  color: var(--side-ink); text-decoration: none; font-size: 14px; font-weight: 500; min-height: 40px; box-sizing: border-box;
}
.as-body a.as-nav { color: var(--side-ink); }
.as-body a.as-nav:hover { background: var(--side-hover); color: #FFFFFF; }
.as-body a.as-nav.active { background: var(--side-active); color: #FFFFFF; font-weight: 600; }
.as-nav svg { flex: none; }
.as-navgroup { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--side-muted); font-weight: 700; padding: 14px 12px 6px; }
.as-powered { display: flex; align-items: center; gap: 8px; padding: 14px 12px 2px; color: var(--side-muted); font-size: 11px; font-weight: 600; }
.as-powered .mark { width: 18px; height: 18px; border-radius: 5px; background: var(--brand); color: var(--on-brand); display: inline-flex; align-items: center; justify-content: center; flex: none; }

.as-main { flex: 1 1 auto; min-width: 0; height: 100%; display: flex; flex-direction: column; }
.as-top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px var(--page-pad);
  border-bottom: 1px solid var(--border); background: var(--surface); z-index: 20; flex: none;
}
.as-content { flex: 1 1 auto; min-height: 0; overflow: auto; }
.as-search {
  flex: 1 1 320px; max-width: 560px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--border); color: var(--muted); font: 400 14px var(--font); cursor: text; text-align: left;
}
.as-search:hover { border-color: var(--muted); }
.as-search svg { flex: none; }
.as-kbd { font: 600 12px var(--mono); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; background: var(--surface); color: var(--muted); }
.as-user { display: flex; align-items: center; gap: 10px; padding-left: 6px; font-size: 13px; line-height: 1.3; }
.as-user b { display: block; }
.as-menu-toggle { display: none; }

.as-page { padding: var(--page-pad); display: flex; flex-direction: column; gap: var(--gap-section); max-width: 1360px; width: 100%; box-sizing: border-box; }
.as-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.as-page-head > :first-child { flex: 1 1 420px; }
.as-greeting-accent { color: var(--ink); text-decoration: underline; text-decoration-color: var(--tenant-accent); text-decoration-thickness: 3px; text-underline-offset: 6px; }

.as-grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.as-grid-kpi > .span-2 { grid-column: span 2; }
@media (max-width: 560px) { .as-grid-kpi > .span-2 { grid-column: auto; flex-direction: column; text-align: center; } }
.as-split { display: flex; flex-wrap: wrap; gap: var(--gap-section); align-items: flex-start; }
.as-split > .wide { flex: 999 1 560px; min-width: 0; }
.as-split > .narrow { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: var(--gap-section); }

/* Tablet en telefoon: zijbalk wordt een lade */
@media (max-width: 1024px) {
  .as-menu-toggle { display: inline-flex; }
  .as-side { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; width: 272px; }
  .as-side.open { transform: none; box-shadow: var(--shadow-float); }
  .as-scrim { position: fixed; inset: 0; background: rgba(6, 18, 31, .45); z-index: 40; }
}

/* ---------- Pagina-elementen ---------- */

.as-dag { font-size: 14px; font-weight: 600; }
.as-sub { font-size: 15px; }
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.as-body a.as-link-strong { font-size: 14px; font-weight: 600; text-decoration: none; }
.as-body a.as-link-strong:hover { text-decoration: underline; }
.as-brand-strong { color: var(--brand-strong); }
.as-badge-inline { min-width: 22px; height: 22px; border-radius: 11px; padding: 0 7px; box-sizing: border-box; background: var(--bad-soft); color: var(--bad); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.as-stack { display: flex; flex-direction: column; gap: 10px; }
.as-stack.roomy { gap: 14px; }
.as-tech-sub { font-size: 12px; margin: 2px 0 6px; }
.as-tech.afwezig { opacity: .55; }
.as-skip:focus { position: fixed; left: 12px; top: 12px; width: auto; height: auto; clip: auto; z-index: 200; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: var(--r-field); box-shadow: var(--shadow-float); }

/* Skeletten tijdens het laden: de vorm van de pagina staat er meteen */
.as-skeleton, .as-skeleton-head span { background: linear-gradient(90deg, var(--surface2) 0%, var(--border) 50%, var(--surface2) 100%); background-size: 200% 100%; animation: as-glans 1.4s ease-in-out infinite; border-radius: var(--r-card); }
.as-skeleton { height: 152px; }
.as-skeleton.tall { height: 120px; }
.as-skeleton-head { display: flex; flex-direction: column; gap: 10px; }
.as-skeleton-head span { display: block; height: 16px; width: 180px; border-radius: 8px; }
.as-skeleton-head span:nth-child(2) { height: 36px; width: min(640px, 90%); }
.as-skeleton-head span:nth-child(3) { width: min(420px, 70%); }
@keyframes as-glans { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Je pakket (licenties) ---------- */

.as-pakket { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.as-module { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.as-module.uit { background: var(--surface2); }
.as-module.uit b { color: var(--muted); }
.as-pakket-melding { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 20px; border-color: transparent; background: var(--brand-soft); }
.as-pakket-melding .icoon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-strong); color: var(--on-brand); display: flex; align-items: center; justify-content: center; flex: none; }
.as-pakket-melding > div { flex: 1 1 280px; }

/* ---------- Instellingen > Alle instellingen: groepen met snelkoppelingen ---------- */

.as-instellingen { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.as-instellingen ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.as-instellingen a { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; margin: 0 -10px; border-radius: var(--r-field); color: var(--ink); text-decoration: none; }
.as-instellingen a:hover, .as-instellingen a:focus-visible { background: var(--surface2); }
.as-instellingen a > svg { flex: none; margin-top: 2px; color: var(--brand-strong); }
.as-instellingen a b { font-weight: 600; }
.as-instellingen a .as-muted { display: block; font-size: 13px; }

/* ---------- Menu's (details/summary) ---------- */

.as-menu { position: relative; }
.as-menu > summary { list-style: none; cursor: pointer; }
.as-menu > summary::-webkit-details-marker { display: none; }
.as-menu-list {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 210px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-float);
  display: flex; flex-direction: column;
}
.as-menu-list.right { left: auto; right: 0; }
.as-menu-list a, .as-menu-list button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; border: none; background: transparent;
  color: var(--ink); font: 500 14px var(--font); text-decoration: none; cursor: pointer; text-align: left; min-height: 40px;
}
.as-body .as-menu-list a { color: var(--ink); }
.as-menu-list a:hover, .as-menu-list button:hover { background: var(--surface2); }
/* Telefoon: één compacte topbalk */
@media (max-width: 720px) {
  .as-top { flex-wrap: nowrap; gap: 8px; padding: 10px var(--page-pad); }
  .as-search { flex: 1 1 auto; min-width: 0; padding: 10px 12px; }
  .as-search > .as-spacer { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .as-search .as-kbd, .as-top > .as-spacer, .as-hide-sm { display: none; }
  .as-top .as-btn.primary { padding: 9px 10px; }
}
.as-user { padding: 4px 8px 4px 6px; border-radius: 12px; }
.as-user:hover { background: var(--surface2); }
.as-user-text { display: flex; flex-direction: column; }
@media (max-width: 720px) { .as-user-text { display: none; } }

/* ---------- Dialoog ---------- */

.as-dialog-scrim { position: fixed; inset: 0; background: rgba(6, 18, 31, .45); z-index: 80; }
.as-dialog {
  position: fixed; z-index: 90; top: 12vh; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px));
  background: var(--surface); color: var(--ink); border-radius: var(--r-card); box-shadow: var(--shadow-float); padding: 18px 20px;
  border: 1px solid var(--border);
}
.as-dialog p { font-size: 14px; line-height: 1.5; }
.as-dialog-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Verbindingsmelding en toasts ---------- */

.as-toast-host { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.as-toast { display: flex; align-items: center; gap: 12px; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 10px 12px 10px 16px; box-shadow: var(--shadow-float); font-size: 14px; }
.as-toast button { background: transparent; border: none; color: var(--brand); font: 700 14px var(--font); cursor: pointer; padding: 6px 8px; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  /* Laadindicatoren blijven draaien, wel trager: een stilstaande ring lijkt een vastgelopen app (laadscherm van XAF,
     spinners bij wachten en verbinden). */
  #applicationLoadingPanel .loading-floated-circle { animation: loading 2s linear infinite !important; }
  .xaf-loading-content .spinner-border { animation: xaf-spinner-border 2s linear infinite !important; }
  .as-palette-busy, .as-reconnect-spinner, .lg-bezig { animation: as-draai 2s linear infinite !important; }
}

/* ======================================================================
   Stap 2: detailpagina's en werkbord
   ====================================================================== */

/* ---------- Velden ---------- */

.as-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.as-input {
  box-sizing: border-box; width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--r-field);
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: 500 14px var(--font);
}
.as-input:hover { border-color: var(--muted); }
.as-input.num { text-align: right; font-variant-numeric: tabular-nums; width: 88px; min-height: 34px; padding: 5px 8px; }
.as-input.num.small { width: 64px; }
textarea.as-input { resize: vertical; line-height: 1.45; background: var(--surface2); }
select.as-input { padding-right: 28px; }
.as-iconbtn.small { width: 34px; height: 34px; }
.as-btn.small { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.as-btn[disabled], .as-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* Segmentknop (weergave bord/lijst) */
.as-segment { display: inline-flex; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 3px; }
.as-segment > a, .as-segment > button {
  border: none; background: transparent; border-radius: 9px; padding: 7px 14px; min-height: 34px; box-sizing: border-box;
  font: 600 13px var(--font); color: var(--muted); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.as-body .as-segment > a { color: var(--muted); }
.as-segment > [aria-pressed="true"], .as-segment > [aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(15, 27, 45, .08); }
.as-body .as-segment > a[aria-current="page"] { color: var(--ink); }

/* ---------- EntityHeader ---------- */

.as-entity { background: var(--surface); border-bottom: 1px solid var(--border); padding: 18px var(--page-pad) 0; }
.as-entity-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.as-entity-crumbs .sep { color: var(--muted); }
.as-entity-main { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 12px; }
.as-entity-title { flex: 1 1 320px; min-width: 0; }
.as-entity-titlerow { flex-wrap: wrap; gap: 10px; }
.as-entity-title h1.as-h1 { font-size: 26px; margin: 0; }
.as-entity-sub { font-size: 14px; margin-top: 2px; }
.as-entity-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 720px) { .as-entity-title h1.as-h1 { font-size: 21px; } .as-entity-actions { width: 100%; } }

/* ---------- StatusStepper ---------- */

.as-stepper { list-style: none; margin: 22px 0 6px; padding: 0 0 4px; display: flex; align-items: flex-start; overflow-x: auto; }
.as-step { position: relative; flex: 1 1 0; min-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; font-weight: 700; }
.as-step::before { content: ""; position: absolute; top: 14px; right: 50%; width: 100%; height: 3px; background: var(--border); z-index: 0; }
.as-step:first-child::before { display: none; }
.as-step.done::before, .as-step.current::before { background: var(--ok); }
.as-step-dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; background: var(--surface2); border: 2px solid var(--border); color: var(--muted); box-sizing: border-box; }
.as-step.done .as-step-dot { background: var(--ok); border-color: var(--ok); color: var(--on-status); }
.as-step.current .as-step-dot { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--on-brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.as-step.current.wait .as-step-dot { background: var(--accent); border-color: var(--accent); color: #2A1700; box-shadow: 0 0 0 5px var(--warn-soft); }
.as-step.current.invoiced .as-step-dot { background: var(--invoiced); border-color: var(--invoiced); color: var(--on-status); box-shadow: 0 0 0 5px var(--damage-soft); }
.as-step.current .as-step-label { color: var(--brand-strong); }
.as-step.current.wait .as-step-label { color: var(--warn); }
.as-step.current.bad .as-step-dot { background: var(--bad); border-color: var(--bad); color: var(--on-status); box-shadow: 0 0 0 5px var(--bad-soft); }
.as-step.current.bad .as-step-label { color: var(--bad); }
.as-step.current.ok .as-step-dot { background: var(--ok); border-color: var(--ok); color: var(--on-status); box-shadow: 0 0 0 5px var(--ok-soft); }
.as-step.current.ok .as-step-label { color: var(--ok); }
.as-step.todo .as-step-label { color: var(--muted); }
.as-step-detail { color: var(--muted); font-weight: 500; }

/* ---------- Tabs ---------- */

.as-tabs { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: thin; }
.as-tab { padding: 12px 4px; font-size: 14px; font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.as-body a.as-tab { color: var(--muted); }
.as-body a.as-tab:hover { color: var(--ink); }
.as-body a.as-tab.on { color: var(--ink); border-bottom-color: var(--brand-strong); font-weight: 800; }
.as-tab-badge { font-size: 12px; font-weight: 700; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 0 7px; color: var(--muted); }
.as-tabpanel:focus { outline: none; }
.as-tabpanel:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; border-radius: 8px; }

/* ---------- Kanban ---------- */

.as-kanban { display: flex; gap: 14px; align-items: flex-start; min-width: max-content; }
.as-kcol { flex: 0 0 272px; width: 272px; display: flex; flex-direction: column; gap: 10px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-card); padding: 12px; box-sizing: border-box; scroll-margin: 16px; transition: box-shadow .12s, border-color .12s; }
.as-kcol.wait { background: var(--warn-soft); border-color: transparent; }
.as-kcol.ok { background: var(--ok-soft); border-color: transparent; }
.as-kcol.focus { box-shadow: 0 0 0 3px var(--brand); }
.as-kcol.drop { border: 2px dashed var(--brand); }
.as-kcol.drop.geen { border-color: var(--bad); }
.as-kcol-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; }
.as-kcol-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--planned); flex: none; }
.as-kcol.brand .as-kcol-head .dot { background: var(--brand); }
.as-kcol.strong .as-kcol-head .dot { background: var(--brand-strong); }
.as-kcol.wait .as-kcol-head .dot { background: var(--accent); }
.as-kcol.ok .as-kcol-head .dot { background: var(--ok); }
.as-kcol.invoiced .as-kcol-head .dot { background: var(--invoiced); }
.as-kcol-title { margin: 0; font-size: 14px; font-weight: 800; }
.as-kcount { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--surface); border-radius: var(--r-pill); padding: 2px 8px; color: var(--muted); font-variant-numeric: tabular-nums; }
.as-kcount.over { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--accent); }
.as-kdrop { border: 2px dashed var(--brand); border-radius: 14px; min-height: 64px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px 12px; color: var(--brand-strong); font-weight: 700; font-size: 13px; background: var(--brand-soft); }
.as-kcol.geen .as-kdrop { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); font-weight: 600; }
.as-kempty { margin: 4px; font-size: 13px; color: var(--muted); }
.as-kcards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.as-kitem { position: relative; border-radius: 14px; }
.as-kitem[draggable="true"] { cursor: grab; }
.as-kitem.sleept { opacity: .45; }
.as-kitem.gekozen .as-kcard { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.as-kmove { position: absolute; right: 8px; bottom: 8px; z-index: 2; }
.as-kmove-btn { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--muted); border: 1px solid var(--border); background: var(--surface); box-sizing: border-box; }
.as-kmove-btn:hover, .as-kmove[open] .as-kmove-btn { color: var(--brand-strong); border-color: var(--brand); }
.as-kmove .as-menu-list { top: auto; bottom: calc(100% + 6px); min-width: 220px; }
.as-menu-title { font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 12px 4px; }
.as-kmenu-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--planned); flex: none; }
.as-kmenu-dot.brand { background: var(--brand); }
.as-kmenu-dot.strong { background: var(--brand-strong); }
.as-kmenu-dot.wait { background: var(--accent); }
.as-kmenu-dot.ok { background: var(--ok); }
.as-menu-list button.geen { color: var(--muted); }
.as-kmenu-nee { margin-left: auto; font-size: 12px; font-weight: 500; }

.as-kcard { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; color: var(--ink); box-shadow: 0 1px 2px rgba(15, 27, 45, .06); transition: border-color .12s, box-shadow .12s; }
.as-kcard:hover { border-color: var(--brand); }
.as-kcard.alert { border-color: var(--bad); box-shadow: inset 3px 0 0 var(--bad); }
.as-kcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.as-kcard-corner { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.as-kcard-title { margin: 10px 0 0; font-size: 14px; font-weight: 700; padding-right: 4px; }
.as-body a.as-kcard-link { color: var(--ink); text-decoration: none; }
.as-kcard-link::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.as-kcard-link:focus-visible { outline: none; }
.as-kcard-link:focus-visible::after { outline: 3px solid var(--brand); outline-offset: 2px; }
.as-kcard-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-kcard-progress { margin-top: 10px; }
.as-kcard-progresslabel { justify-content: space-between; font-size: 12px; margin-bottom: 4px; gap: 8px; }
.as-kcard-progresslabel b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-kcard-progress .as-bar { height: 6px; }
.as-kcard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--muted); margin-top: 10px; padding-right: 36px; min-height: 22px; }
.as-kcard-meta .late { color: var(--bad); font-weight: 700; }
.as-kcard-meta .as-row { gap: 4px; }

/* ---------- Werkbord-pagina ---------- */

.as-boardhead { background: var(--surface); border-bottom: 1px solid var(--border); padding: 18px var(--page-pad) 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.as-boardhead > .titel { flex: 1 1 260px; }
.as-boardhead h1.as-h1 { font-size: 26px; margin: 2px 0 0; }
.as-filters { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.as-filters .sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.as-avatarbtn { border: 2px solid transparent; border-radius: 50%; padding: 0; background: none; cursor: pointer; line-height: 0; }
.as-avatarbtn[aria-current="true"] { border-color: var(--ink); }
.as-avatarbtn .as-avatar { width: 32px; height: 32px; font-size: 12px; }
.as-filtersearch { margin-left: auto; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--r-field); padding: 0 12px; background: var(--surface2); color: var(--muted); min-height: 38px; }
.as-filtersearch input { border: none; background: transparent; outline: none; font: 500 14px var(--font); color: var(--ink); width: 220px; min-height: 36px; }
.as-filtersearch:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.as-boardscroll { position: relative; overflow-x: auto; padding: 18px var(--page-pad) var(--page-pad); scroll-snap-type: x proximity; }
.as-boardscroll .as-kcol { scroll-snap-align: start; }
.as-boardfoot { padding: 0 var(--page-pad) var(--page-pad); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
@media (max-width: 720px) {
  .as-filtersearch { margin-left: 0; flex: 1 1 100%; }
  .as-filtersearch input { width: 100%; }
  .as-kcol { flex-basis: 84vw; width: 84vw; max-width: 300px; }
  .as-boardhead h1.as-h1 { font-size: 22px; }
  /* Telefoon: de hele pagina scrolt (vegen), geen apart scrollvak voor het bord */
  .as-boardscroll { flex-shrink: 0; }
  .as-boardfoot .hint { display: none; }
}

.as-table-scroll { overflow-x: auto; }
.as-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.as-table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 10px 14px; background: var(--surface2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.as-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.as-table tr:last-child td { border-bottom: none; }
.as-table tbody tr:hover td { background: var(--surface2); }
.as-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.as-table .late { color: var(--bad); font-weight: 700; }
.as-body .as-table a { font-weight: 700; text-decoration: none; }

/* ---------- Detailpagina ---------- */

.as-detail { padding: 24px var(--page-pad); display: flex; flex-wrap: wrap; gap: var(--gap-section); align-items: flex-start; max-width: 1360px; box-sizing: border-box; }
.as-detail > .hoofd { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--gap-section); }
.as-detail > aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
/* Labelkolom zo breed als het langste label (hoogstens 120px): korte labels laten meer plaats aan OGM, chassisnummer of e-mail. */
.as-kv { display: grid; grid-template-columns: fit-content(120px) minmax(0, 1fr); gap: 8px 12px; font-size: 14px; margin: 0; }
.as-kv dt { color: var(--muted); margin: 0; }
.as-kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.as-callout { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-tile); background: var(--warn-soft); color: var(--warn); font-size: 14px; }
.as-callout.info { background: var(--brand-soft); color: var(--brand-strong); }
.as-callout.ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- DocumentLines ---------- */

.as-lines-scroll { overflow-x: auto; }
.as-lines-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.as-lines-table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.as-lines-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.as-lines-table td:nth-child(5) { white-space: nowrap; }
.as-lines-table .as-input.num { width: 76px; }
.as-lines-table .as-input.num.small { width: 52px; }
.as-lines-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.as-lines-desc { min-width: 180px; }
.as-lines-desc > * { margin-right: 8px; }
.as-lines-code { font-size: 12px; color: var(--muted); }
.as-lines-total { font-weight: 700; }
.as-lines-actions { width: 1%; white-space: nowrap; text-align: right; }
.as-lines-bevestig { display: inline-flex; gap: 6px; align-items: center; }
.as-lines-add { margin-top: 14px; padding: 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-tile); display: flex; flex-direction: column; gap: 12px; }
.as-totals { margin: 16px 0 0 auto; max-width: 360px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.as-totals > div { display: flex; justify-content: space-between; gap: 16px; }
.as-totals dt, .as-totals dd { margin: 0; }
.as-totals dd { font-variant-numeric: tabular-nums; font-weight: 600; }
.as-totals .grand { border-top: 2px solid var(--ink); padding-top: 8px; font-weight: 800; font-size: 16px; }
.as-totals .grand dd { font-weight: 800; }

.as-addrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.as-addrow > .grow { flex: 1 1 200px; min-width: 0; }
.as-panel { padding: 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-tile); }
.as-addrow .as-input { min-height: 38px; }
.as-results { list-style: none; margin: 6px 0 0; padding: 4px; border: 1px solid var(--border); border-radius: var(--r-field); background: var(--surface); max-height: 280px; overflow-y: auto; }
.as-results button { width: 100%; display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; border: none; background: transparent; padding: 8px 10px; border-radius: 8px; font: 500 14px var(--font); color: var(--ink); cursor: pointer; min-height: 40px; }
.as-results button:hover, .as-results button:focus-visible { background: var(--surface2); }
.as-results .code { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- ActivityFeed ---------- */

.as-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.as-feed-item { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.as-feed-icon { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; background: var(--surface2); color: var(--muted); border: 1px solid var(--border); box-sizing: border-box; }
.as-feed-item.status .as-feed-icon { background: var(--brand-soft); color: var(--brand-strong); border-color: transparent; }
.as-feed-item.bericht .as-feed-icon { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.as-feed-item.notitie .as-feed-icon { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.as-feed-body { min-width: 0; }
.as-feed-text { overflow-wrap: anywhere; line-height: 1.4; }
.as-feed-meta { font-size: 12px; margin-top: 2px; }
.as-feed-add { margin-bottom: 16px; }
.as-feed-add-actions { justify-content: flex-end; margin-top: 8px; }

/* ---------- Foto's ---------- */

.as-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.as-photo { margin: 0; border: 1px solid var(--border); border-radius: var(--r-tile); overflow: hidden; background: var(--surface2); }
.as-photo img { display: block; width: 100%; height: 110px; object-fit: cover; background: var(--surface2); }
.as-photo .placeholder { height: 110px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.as-photo figcaption { padding: 8px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.as-photo figcaption b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 12px; border: 2px dashed var(--border); border-radius: var(--r-tile); background: var(--surface2); margin-bottom: 14px; }
.as-upload input[type="file"] { font: 500 13px var(--font); color: var(--ink); max-width: 100%; }

/* ---------- Uren ---------- */

.as-uren-groep + .as-uren-groep { margin-top: 18px; }
.as-uren-kop { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.as-uren-kop b { flex: 1 1 auto; }
.as-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; animation: as-pols 1.6s ease-out infinite; }
@keyframes as-pols { 0% { box-shadow: 0 0 0 0 var(--ok); } 100% { box-shadow: 0 0 0 8px transparent; } }

/* ---------- Toasts (aanvulling) ---------- */

.as-toast-host { pointer-events: none; width: min(560px, calc(100vw - 32px)); }
.as-toast-stack { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.as-toast { pointer-events: auto; }
.as-toast > svg { flex: none; }
.as-toast.ok > svg { color: var(--ok-soft); }
.as-toast.bad { background: var(--bad); color: var(--on-status); }
.as-toast.wait > svg { color: var(--accent); }
.as-toast-text { flex: 1 1 auto; min-width: 0; line-height: 1.4; }
.as-toast .as-toast-action { color: var(--brand-soft); white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.as-toast.bad .as-toast-action { color: var(--on-status); }
.as-toast .as-toast-close { color: inherit; opacity: .75; padding: 6px; display: inline-flex; }
.as-toast .as-toast-close:hover { opacity: 1; }
:root[data-theme="dark"] .as-toast .as-toast-action { color: var(--brand-strong); }
:root[data-theme="dark"] .as-toast.ok > svg { color: var(--ok); }
:root[data-theme="dark"] .as-toast.bad { background: var(--bad-soft); color: var(--ink); }

/* ---------- Stap 3: koppelingen boven een uitgerekte link ---------- */

.as-plate-link { position: relative; z-index: 1; display: inline-flex; border-radius: 6px; line-height: 0; }
.as-plate-link:hover .as-plate { box-shadow: 0 0 0 2px var(--brand); }
.as-list-row.stretch { position: relative; }
.as-body a.as-stretch-link { color: var(--ink); text-decoration: none; }
.as-stretch-link::after { content: ""; position: absolute; inset: 0; }
.as-stretch-link:focus-visible { outline: none; }
.as-list-row.stretch:focus-within { box-shadow: inset 0 0 0 3px var(--brand); }
.as-above { position: relative; z-index: 1; }

/* ---------- CarDamageMap ---------- */

.as-damage { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.as-damage-car { position: relative; flex: 0 1 300px; width: 100%; max-width: 300px; aspect-ratio: 300 / 340; margin: 0 auto; }
.as-damage-car svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.as-damage-body { fill: var(--surface2); stroke: var(--planned); stroke-width: 2.5; }
.as-damage-glass { fill: var(--brand-soft); stroke: var(--planned); stroke-width: 2; }
.as-damage-roof { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.as-damage-wheel { fill: var(--planned); }
.as-damage-mirror { fill: var(--border); }
.as-damage-dir { font: 700 11px var(--font); fill: var(--muted); letter-spacing: .08em; }
.as-damage-area { fill: transparent; transition: fill .12s; }
.as-damage-area.on { fill: var(--bad); fill-opacity: .16; }
.as-damage-pt {
  position: absolute; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; font: 800 13px var(--font); cursor: pointer; padding: 0;
  background: var(--surface); color: var(--muted); border: 2px dashed var(--planned); transition: background-color .1s;
}
.as-damage-pt:hover { border-color: var(--bad); color: var(--bad); }
.as-damage-pt.on { background: var(--bad); color: var(--on-status); border: 3px solid var(--surface); box-shadow: 0 2px 6px rgba(15, 27, 45, .25); }
.as-damage-pt[aria-busy="true"] { opacity: .7; }
span.as-damage-pt { cursor: default; width: 30px; height: 30px; }
.as-damage-side { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.as-damage-extra { display: flex; flex-wrap: wrap; gap: 8px; }
.as-damage-title { margin: 4px 0 0; font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.as-damage-empty, .as-damage-hint { margin: 0; font-size: 13px; }
.as-damage-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.as-damage-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.as-damage-list li:first-child { border-top: none; }
.as-damage-list .grow { flex: 1 1 auto; min-width: 0; }
.as-damage-nr { width: 26px; height: 26px; border-radius: 50%; background: var(--bad); color: var(--on-status); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }

/* ---------- PhotoGallery ---------- */

.as-gallery-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.as-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.as-gallery-tile { position: relative; display: block; width: 100%; height: 110px; padding: 0; border: 1px solid var(--border); border-radius: var(--r-tile); overflow: hidden; cursor: zoom-in; background: var(--surface2); }
.as-gallery-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.as-gallery-tile:hover img { transform: scale(1.04); }
.as-gallery-label { position: absolute; left: 8px; bottom: 8px; border-radius: var(--r-pill); padding: 2px 9px; font-size: 12px; font-weight: 600; background: rgba(6, 18, 31, .62); color: #FFFFFF; }
.as-viewer-scrim { position: fixed; inset: 0; background: rgba(6, 18, 31, .72); z-index: 90; }
.as-viewer {
  position: fixed; z-index: 91; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; gap: 10px; background: var(--surface); border-radius: var(--r-card); padding: 14px; box-sizing: border-box; box-shadow: var(--shadow-float);
}
.as-viewer:focus { outline: none; }
.as-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.as-viewer-caption { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-viewer-figure { margin: 0; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.as-viewer-figure img { display: block; width: 100%; max-height: calc(100vh - 220px); object-fit: contain; background: var(--surface2); border-radius: var(--r-tile); }
.as-viewer-figure figcaption { font-size: 13px; }
.as-viewer-nav { display: flex; justify-content: space-between; gap: 8px; }

/* ---------- CustomerCard ---------- */

.as-customer-heading { margin-bottom: 12px; }
.as-customer-top { gap: 14px; align-items: center; }
.as-customer-mark { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.as-customer-name { font-weight: 800; font-size: 17px; overflow-wrap: anywhere; }
.as-body .as-customer-name a { text-decoration: none; }
.as-customer-badges { gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.as-customer-contact { font-size: 14px; margin-top: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.as-customer-actions { gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.as-customer-sms { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-tile); background: var(--surface2); }
.as-customer-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 0; }
.as-spec { background: var(--surface2); border-radius: var(--r-tile); padding: 10px 12px; min-width: 0; }
.as-spec dt { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0; }
.as-spec dd { font-size: 15px; font-weight: 700; margin: 2px 0 0; overflow-wrap: anywhere; }
.as-spec dd.bad { color: var(--bad); }
.as-spec dd.wait { color: var(--warn); }
.as-spec dd.ok { color: var(--ok); }
.as-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; }

/* ---------- MileageChart ---------- */

.as-km { margin: 0; }
.as-km svg { display: block; width: 100%; height: auto; }
.as-km-grid { stroke: var(--border); }
.as-km-base { stroke: var(--planned); }
.as-km-axis { font: 500 11px var(--font); fill: var(--muted); }
.as-km-value { font: 700 12px var(--font); fill: var(--ink); }
.as-km-line { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.as-km-dot { fill: var(--surface); stroke: var(--brand); stroke-width: 2.5; }
.as-km-dot.last { fill: var(--brand); }
.as-km-dot.bad { fill: var(--bad); stroke: var(--bad); }
.as-km-empty { margin: 0; font-size: 14px; }

/* ---------- DocumentLines: groepen ---------- */

.as-lines-group th, .as-lines-group td { background: var(--surface2); font-size: 13px; font-weight: 800; color: var(--ink); padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.as-lines-group td.num { text-align: right; }
.as-lines-group .as-muted { font-weight: 600; }

/* ---------- Detailpagina's stap 3 ---------- */

.as-banner { display: flex; flex-direction: column; gap: 8px; }
.as-callout.bad { background: var(--bad-soft); color: var(--bad); }
.as-callout.neutral { background: var(--surface2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--border); }
.as-calc-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 16px; }
.as-calc-summary > div { background: var(--surface2); border-radius: var(--r-tile); padding: 12px 14px; }
.as-calc-summary > div.total { background: var(--brand-soft); }
.as-calc-summary dt { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0; }
.as-calc-summary > div.total dt { color: var(--brand-strong); }
.as-calc-summary dd { margin: 2px 0 0; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.as-split-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 14px; font-size: 14px; }
.as-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.as-form-grid .as-input { width: 100%; box-sizing: border-box; }
/* Een link die als knop nog niet kan (bv. "Etiketten afdrukken" zonder keuze). */
.as-btn.disabled, a.as-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
/* Een rij met een ingevulde wijziging (inventaris: geteld ≠ voorraad). */
.as-table tr.as-rij-gewijzigd > td { background: var(--brand-soft); }
.as-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.as-field-error { color: var(--bad); font-size: 13px; font-weight: 600; margin-top: 10px; }
.as-tl { display: flex; flex-direction: column; }
.as-tl-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--border); }
.as-tl-item:first-child { border-top: none; }
.as-tl-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-strong); }
.as-tl-icon.damage { background: var(--damage-soft); color: var(--damage); }
.as-tl-icon.ok { background: var(--ok-soft); color: var(--ok); }
.as-tl-icon.invoiced { background: var(--damage-soft); color: var(--invoiced); }
.as-tl-icon.neutral { background: var(--surface2); color: var(--muted); }
.as-tl-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.as-body .as-tl-body a { font-weight: 700; text-decoration: none; }
.as-tl-detail { font-size: 13px; overflow-wrap: anywhere; }
.as-tl-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; text-align: right; white-space: nowrap; }
.as-vehicles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.as-vehicle { position: relative; border: 1px solid var(--border); border-radius: var(--r-tile); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.as-vehicle:hover { border-color: var(--brand); }
.as-vehicle:focus-within { box-shadow: 0 0 0 3px var(--brand); }
.as-headline-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.as-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
@media (max-width: 720px) {
  .as-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .as-kpi-row .as-kpi { padding: 12px 14px; }
  .as-kpi-row .as-kpi .value { font-size: 22px; }
}
.as-entity-meta { font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .as-tl-item { grid-template-columns: 34px minmax(0, 1fr); }
  .as-tl-icon { width: 34px; height: 34px; }
  .as-tl-side { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; white-space: normal; }
  .as-damage-car { max-width: 280px; }
}

/* ---------- Tijdlijn (TimelineScheduler, stap 5) ---------- */

.as-sched { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.as-sched-pending { flex: 1 1 250px; max-width: 300px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.as-sched-hint { font-size: 13px; }
.as-sched-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.as-sched-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; display: flex; flex-direction: column; gap: 4px; }
.as-sched-card[draggable="true"] { cursor: grab; }
.as-sched-card.sleept { opacity: .5; border: 2px solid var(--brand); }
.as-sched-when { font-size: 12px; font-weight: 700; }
.as-sched-card-title { font-weight: 700; font-size: 14px; margin-top: 4px; }
.as-body .as-sched-card-title a { color: var(--ink); text-decoration: none; }
.as-sched-card-title a:hover { text-decoration: underline; }
.as-sched-card-sub { font-size: 13px; }
.as-sched-card-foot { justify-content: space-between; margin-top: 6px; flex-wrap: wrap; gap: 8px; }
.as-sched-need { font-size: 12px; font-weight: 700; color: var(--brand-strong); }
.as-sched-board { flex: 999 1 620px; min-width: 0; overflow: hidden; }
.as-sched-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.as-sched-search { margin-left: auto; display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: var(--r-field); padding: 4px 8px; background: var(--surface2); color: var(--muted); }
.as-sched-search-input { border: none; background: transparent; outline: none; font: 600 13px var(--font); color: var(--ink); width: 170px; min-height: 30px; }
.as-sched-search:focus-within { box-shadow: 0 0 0 2px var(--brand); }
.as-sched-count { font-size: 12px; font-weight: 700; white-space: nowrap; }
.as-sched-scroll { overflow-x: auto; }
.as-sched-grid { --as-sched-res: 220px; min-width: calc(var(--as-sched-res) + var(--as-sched-slots) * var(--as-sched-slot)); }
.as-sched-row { display: grid; grid-template-columns: var(--as-sched-res) repeat(var(--as-sched-slots), minmax(var(--as-sched-slot), 1fr)); border-bottom: 1px solid var(--border); position: relative; min-height: 58px; }
.as-sched-head { background: var(--surface2); min-height: 0; }
.as-sched-res { grid-row: 1; grid-column: 1; padding: 9px 14px; display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; font-weight: 800; color: var(--muted); position: sticky; left: 0; background: var(--surface); z-index: 3; border-right: 1px solid var(--border); }
.as-sched-head .as-sched-res { background: var(--surface2); }
.as-sched-res-text { min-width: 0; color: var(--ink); }
.as-sched-res-label { font-size: 12px; font-weight: 600; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-sched-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.as-sched-day { grid-row: 1; padding: 8px 4px 6px; text-align: center; border-left: 1px solid var(--border); font-size: 13px; font-weight: 800; min-width: 0; }
.as-sched-day.today { background: var(--accent-soft); color: var(--accent-ink); }
.as-sched-day.weekend { color: var(--muted); }
.as-sched-halves { display: flex; justify-content: space-around; font-size: 11px; font-weight: 700; color: var(--muted); }
.as-sched-grid.compact .as-sched-halves { display: none; }
.as-sched-grid.compact .as-sched-day { font-size: 11px; padding: 6px 0; }
.as-sched-dayname { display: block; white-space: nowrap; overflow: hidden; }
.as-sched-cell { grid-row: 1; border-left: 1px solid var(--border); min-height: 58px; }
.as-sched-cell.pm { border-left: 1px dashed var(--border); }
.as-sched-cell.weekend { background: var(--surface2); }
.as-sched-cell.today { background: var(--accent-soft); }
.as-sched-cell.hover { background: var(--brand-soft); }
.as-sched-ghost { grid-row: 1; margin: 9px 3px; border-radius: 10px; border: 2px dashed var(--brand); background: var(--brand-soft); color: var(--brand-strong); font-size: 12px; font-weight: 700; display: flex; align-items: center; padding: 0 10px; white-space: nowrap; overflow: hidden; pointer-events: none; z-index: 2; }
.as-sched-ghost.geen { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.as-sched-bar { grid-row: 1; margin: 9px 3px; border-radius: 10px; position: relative; display: flex; align-items: stretch; min-width: 0; z-index: 1; background: var(--brand-strong); color: var(--on-brand); }
.as-sched-bar[draggable="true"] { cursor: grab; }
.as-sched-bar.voor { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.as-sched-bar.na { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.as-sched-bar.strong, .as-sched-bar.brand { background: var(--brand-strong); color: var(--on-brand); }
.as-sched-bar.bad { background: var(--bad); color: var(--on-status); }
.as-sched-bar.ok { background: var(--ok); color: var(--on-status); }
.as-sched-bar.neutral { background: var(--surface2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.as-sched-bar.outline { background: var(--brand-soft); color: var(--brand-strong); box-shadow: inset 0 0 0 1.5px var(--brand); }
.as-sched-bar.sleept { opacity: .45; }
.as-sched-bar.hit { box-shadow: 0 0 0 2px var(--accent); }
.as-sched-bar.hit.current { box-shadow: 0 0 0 3px var(--accent), 0 6px 16px rgba(15, 27, 45, .18); z-index: 2; }
.as-sched-grab { position: absolute; inset: 0; display: flex; z-index: 1; }
.as-sched-grab a { flex: 1 1 0; }
.as-sched-bar-text { position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 6px 26px 6px 10px; text-decoration: none; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.as-body a.as-sched-bar-text, a.as-sched-bar-text { color: inherit; }
.as-sched-bar-text:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.as-sched-bar-title, .as-sched-bar-sub { overflow: hidden; text-overflow: ellipsis; }
.as-sched-bar-sub { font-weight: 600; opacity: .88; }
.as-sched-bar-menu { position: absolute; top: 2px; right: 8px; z-index: 2; border: none; background: transparent; color: inherit; font: 800 16px var(--font); line-height: 1; padding: 4px 4px 8px; cursor: pointer; border-radius: 6px; opacity: .8; }
.as-sched-bar-menu:hover, .as-sched-bar-menu:focus-visible { opacity: 1; background: rgba(255, 255, 255, .2); }
.as-sched-handle { position: absolute; top: 0; right: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 2; border-radius: 0 10px 10px 0; background: rgba(255, 255, 255, .25); }
.as-sched-menu { top: calc(100% + 4px); left: auto; right: 0; color: var(--ink); z-index: 70; }
.as-sched-empty { padding: 20px; }
.as-sched-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 16px; font-size: 12px; font-weight: 600; border-top: 1px solid var(--border); align-items: center; }
.as-sched-legend .stip { width: 18px; height: 10px; border-radius: 4px; display: inline-block; margin-right: 6px; vertical-align: middle; }
/* Stap 10: bezetting per rij, afwezigheid (gearceerd), conflicten en twee balken boven elkaar. */
.as-sched-load { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.as-sched-load-track { flex: 1 1 auto; min-width: 40px; height: 6px; border-radius: 3px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.as-sched-load-fill { display: block; height: 100%; border-radius: 3px; background: var(--ok); }
.as-sched-load-fill.wait { background: var(--warn); }
.as-sched-load-fill.bad { background: var(--bad); }
.as-sched-load-text { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.as-sched-block { grid-row: 1; margin: 3px 0; border-radius: 6px; background: repeating-linear-gradient(135deg, var(--surface2) 0 6px, var(--bad-soft) 6px 12px); color: var(--bad); font-size: 11px; font-weight: 700; display: flex; align-items: flex-end; padding: 2px 6px; overflow: hidden; white-space: nowrap; pointer-events: none; z-index: 0; }
.as-sched-bar.conflict { box-shadow: inset 0 0 0 2px var(--bad); }
/* Het menu van een balk ligt boven de balken van de rijen eronder (anders vangen die de klik). */
.as-sched-bar.menu-open { z-index: 60; }
.as-sched-warn { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--bad); color: var(--on-status); font-size: 11px; font-weight: 800; margin-right: 5px; vertical-align: -2px; }
.as-sched-row.lanes, .as-sched-row.lanes .as-sched-cell { min-height: 100px; }
.as-sched-bar.lane-0 { margin-bottom: 52px; }
.as-sched-bar.lane-1 { margin-top: 52px; }
.as-callout.warn { background: var(--warn-soft); color: var(--warn); }
.as-wizard { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0 0 16px; padding: 0; counter-reset: stap; }
.as-wizard li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); padding: 6px 12px 6px 6px; border-radius: var(--r-pill); background: var(--surface2); }
.as-wizard li::before { counter-increment: stap; content: counter(stap); width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--border); color: var(--ink); font-size: 12px; }
.as-wizard li[aria-current="step"] { background: var(--brand-soft); color: var(--brand-strong); }
.as-wizard li[aria-current="step"]::before { background: var(--brand-strong); color: var(--on-brand); }
.as-wizard li.klaar::before { content: "✓"; background: var(--ok); color: var(--on-status); }
.as-voortgang { display: inline-block; width: 80px; height: 6px; border-radius: 3px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.as-voortgang > span { display: block; height: 100%; background: var(--brand); }
.as-table tr.gekozen td { background: var(--brand-soft); }
.as-table td.negatief, .as-num-neg { color: var(--bad); }
.as-dialog .as-wijziging { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; margin: 8px 0 14px; }
.as-dialog .as-wijziging dt { color: var(--muted); font-weight: 600; }
.as-dialog .as-wijziging dd { margin: 0; font-weight: 700; }
@media (max-width: 720px) {
  .as-sched-pending { max-width: none; }
  .as-sched-grid { --as-sched-res: 120px; }
  .as-sched-res { padding: 8px; }
  .as-sched-res .as-plate { display: none; }
  .as-sched-search { margin-left: 0; width: 100%; box-sizing: border-box; }
  .as-sched-search-input { flex: 1 1 auto; width: auto; min-width: 0; }
}

/* ---------- Brandstof (FuelGauge) ---------- */

.as-fuel { display: inline-flex; align-items: center; gap: 10px; }
.as-fuel-bars { display: inline-flex; gap: 4px; align-items: flex-end; }
.as-fuel-bar { width: 22px; height: 28px; border-radius: 5px; border: 1.5px solid var(--border); background: var(--surface2); padding: 0; cursor: pointer; font: 700 11px var(--font); color: var(--muted); }
.as-fuel.readonly .as-fuel-bar { width: 12px; height: 16px; cursor: default; display: inline-block; box-sizing: border-box; }
.as-fuel-bar.leeg { width: 26px; background: var(--surface); }
.as-fuel-bar.on { background: var(--ok); border-color: var(--ok); }
.as-fuel-bar.laag { background: var(--accent); border-color: var(--accent); }
.as-fuel-bar[aria-checked="true"] { box-shadow: 0 0 0 2px var(--brand-strong); }
.as-fuel-bar:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.as-fuel-text { font-weight: 700; font-size: 14px; min-width: 32px; }

/* ---------- Peppol (PeppolPanel) ---------- */

.as-peppol { display: flex; flex-direction: column; gap: 10px; }
.as-peppol-ontvanger { font-size: 13px; }
.as-peppol-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.as-peppol-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 7px 0; }
.as-peppol-tick { width: 22px; height: 22px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; }
.as-peppol-checks li.ok .as-peppol-tick { background: var(--ok-soft); color: var(--ok); }
.as-peppol-checks li.fout .as-peppol-tick { background: var(--bad-soft); color: var(--bad); }
.as-peppol-checks li.fout { color: var(--bad); font-weight: 600; }
.as-peppol-help { display: block; color: var(--muted); font-weight: 500; font-size: 13px; margin-top: 2px; }
.as-peppol-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.as-peppol-blocked { font-size: 13px; }
.as-peppol-sub { margin: 8px 0 0; font-size: 14px; font-weight: 800; }
.as-peppol-steps { list-style: none; margin: 0; padding: 0; }
.as-peppol-steps li { display: flex; gap: 12px; align-items: flex-start; position: relative; padding-bottom: 14px; font-size: 14px; }
.as-peppol-steps li:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px; background: var(--border); }
.as-peppol-stepdot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); flex: none; margin-top: 4px; box-sizing: border-box; }
.as-peppol-steps li.done .as-peppol-stepdot { background: var(--brand-strong); border-color: var(--brand-strong); }
.as-peppol-steps li.busy .as-peppol-stepdot { border-color: var(--brand); background: var(--brand-soft); }
.as-peppol-steps li.failed .as-peppol-stepdot { background: var(--bad); border-color: var(--bad); }
.as-peppol-steps li.todo { color: var(--muted); }
.as-peppol-stepdetail { display: block; font-size: 12px; }

/* ---------- Factuur en offerte (stap 6) ---------- */

.as-doc-head { display: flex; flex-wrap: wrap; gap: 22px; }
.as-doc-head > div { flex: 1 1 260px; min-width: 0; }
.as-doc-label { font-size: 12px; font-weight: 800; color: var(--muted); display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .02em; }
.as-doc-party { font-weight: 800; font-size: 16px; margin-top: 2px; }
.as-doc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; font-size: 14px; }
.as-doc-fields .span-2 { grid-column: span 2; }
.as-ogm { font-family: var(--mono); font-weight: 700; letter-spacing: .02em; }
.as-splitsing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.as-splitsing > div { border: 1px solid var(--border); border-radius: var(--r-tile); padding: 12px 14px; background: var(--surface2); }
.as-splitsing b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.as-keten { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.as-keten li { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.as-keten li.huidig { font-weight: 800; }
.as-keten-afdruk { display: inline-flex; vertical-align: -2px; margin-left: 6px; padding: 4px; border-radius: 6px; color: var(--muted); }
.as-keten-afdruk:hover, .as-keten-afdruk:focus-visible { color: var(--brand); background: var(--brand-soft); }
.as-betalingen { width: 100%; border-collapse: collapse; font-size: 14px; }
.as-betalingen td { padding: 6px 0; border-bottom: 1px solid var(--border); }
.as-betalingen td.num { text-align: right; font-variant-numeric: tabular-nums; }
.as-form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.as-form-row > div { flex: 1 1 140px; min-width: 0; }
.as-form-row .as-input { width: 100%; box-sizing: border-box; }
.as-dialog .as-form-row { margin: 12px 0; }
.as-dialog h2 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.as-dialog { max-height: 80vh; overflow-y: auto; }
@media (max-width: 560px) { .as-doc-fields, .as-splitsing { grid-template-columns: 1fr; } .as-doc-fields .span-2 { grid-column: auto; } }

/* ---------- Printpagina's (factuur, offerte, uitleenovereenkomst) ---------- */

.as-print-body { background: var(--bg); min-height: 100vh; padding: 24px 16px; box-sizing: border-box; }
.as-print-bar { max-width: 210mm; margin: 0 auto 16px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.as-print { max-width: 210mm; margin: 0 auto; background: #FFFFFF; color: #0F1B2D; padding: 16mm 15mm; box-sizing: border-box; border-radius: 6px; box-shadow: 0 2px 10px rgba(15, 27, 45, .12); font: 400 11pt/1.45 var(--font); border-top: 6px solid var(--tenant-accent); }
.as-print h1 { font-size: 20pt; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.as-print h2 { font-size: 12pt; font-weight: 800; margin: 18px 0 6px; }
.as-print-kop { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.as-print-kop img { max-height: 48px; max-width: 160px; }
.as-print-firma { font-size: 9.5pt; color: #55627A; text-align: right; line-height: 1.5; }
.as-print-adres { display: flex; justify-content: space-between; gap: 20px; margin-top: 22px; flex-wrap: wrap; }
.as-print-adres > div { flex: 1 1 220px; }
.as-print-tekst { margin: 12px 0 0; white-space: pre-line; font-size: 10pt; }
.as-print-voorwaarden { margin-top: 18px; padding-top: 10px; border-top: 1px solid #D8DEE8; font-size: 8pt; line-height: 1.45; color: #55627A; }
.as-print-voorwaarden h2 { font-size: 9pt; margin: 0 0 4px; }
.as-print-voorwaarden p, .as-print-voorwaarden ol { margin: 0; white-space: pre-line; }
.as-print-qr { flex: none; margin: 0; width: 26mm; text-align: center; font-size: 7.5pt; color: #55627A; }
.as-print-qr svg { display: block; width: 26mm; height: 26mm; }
.as-print-label { font-size: 8.5pt; font-weight: 800; color: #55627A; text-transform: uppercase; letter-spacing: .04em; }
.as-print table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 10pt; }
.as-print th { text-align: left; font-size: 8.5pt; font-weight: 800; color: #55627A; border-bottom: 1.5px solid #0F1B2D; padding: 6px 4px; }
.as-print td { padding: 6px 4px; border-bottom: 1px solid #E1E7EF; vertical-align: top; }
.as-print .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.as-print-totalen { margin-left: auto; width: 46%; min-width: 240px; margin-top: 12px; font-size: 10.5pt; }
.as-print-totalen div { display: flex; justify-content: space-between; padding: 3px 0; }
.as-print-totalen .groot { font-weight: 800; font-size: 13pt; border-top: 1.5px solid #0F1B2D; margin-top: 4px; padding-top: 6px; }
.as-print-betaal { margin-top: 18px; border: 1.5px solid #0F1B2D; border-radius: 6px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 10.5pt; }
.as-print-voet { margin-top: 26px; font-size: 8.5pt; color: #55627A; border-top: 1px solid #E1E7EF; padding-top: 8px; }
.as-print-handtekening { display: flex; gap: 20px; margin-top: 26px; flex-wrap: wrap; }
.as-print-handtekening > div { flex: 1 1 220px; border: 1px solid #8FA3BC; border-radius: 6px; height: 34mm; padding: 6px 10px; font-size: 9pt; color: #55627A; }
.as-print-kv { display: grid; grid-template-columns: minmax(max-content, 38%) 1fr; gap: 4px 12px; font-size: 10.5pt; margin: 0; }
.as-print-kv dt { color: #55627A; }
.as-print-kv dd { margin: 0; font-weight: 600; }
/* Stap 10: werkfiche voor de technieker, picklijst, bestek, akkoord, afrekeningsstaat, aankoopborderel en proforma. */
.as-print .vak { display: inline-block; width: 12px; height: 12px; border: 1.3px solid #0F1B2D; border-radius: 2px; vertical-align: -2px; }
.as-print .groep td { font-weight: 800; background: #F7F9FC; font-size: 9pt; color: #55627A; text-transform: uppercase; letter-spacing: .03em; }
.as-print-notities { border: 1px solid #8FA3BC; border-radius: 6px; min-height: 28mm; padding: 6px 10px; font-size: 9pt; color: #55627A; margin-top: 14px; }
.as-print-lijnen { background-image: repeating-linear-gradient(transparent 0 7mm, #E1E7EF 7mm calc(7mm + 1px)); }
.as-print-stempel { display: inline-block; border: 2px solid #B4232F; color: #B4232F; font-weight: 800; padding: 2px 10px; border-radius: 6px; letter-spacing: .06em; text-transform: uppercase; font-size: 10pt; }
.as-print-twee { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; margin-top: 14px; }
@media (max-width: 560px) { .as-print-twee { grid-template-columns: 1fr; } }
.as-print .as-fuel-bar.on { background: #0B7A3E; border-color: #0B7A3E; }
.as-print .as-fuel-bar { background: #F7F9FC; border-color: #E1E7EF; }
@media (max-width: 560px) { .as-print { padding: 16px; } .as-print-totalen { width: 100%; } }
.as-print-klein { color: #55627A; font-size: 8.5pt; }
/* Kassaticket: smal zoals een bonnetje (80 mm), zonder kaderrand. */
.as-print-bar.ticket, .as-print.ticket { max-width: 80mm; }
.as-print.ticket { padding: 6mm 5mm; font-size: 9.5pt; line-height: 1.4; border-top-width: 4px; }
.as-print.ticket table { font-size: 9.5pt; margin-top: 8px; }
.as-print.ticket td { padding: 4px 0; }
.as-print.ticket .as-print-totalen { width: 100%; min-width: 0; }
/* Uitstalfiche: de prijs groot, de uitrusting in drie kolommen met een vinkje. */
.as-print-uitstal-prijs { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; margin-top: 18px; padding: 12px 16px; border-radius: 6px; background: #F7F9FC; border-left: 6px solid var(--tenant-accent); }
.as-print-uitstal-prijs b { font-size: 30pt; font-weight: 800; letter-spacing: -.02em; }
.as-print-kv.vier { grid-template-columns: max-content 1fr max-content 1fr; gap: 4px 14px; }
@media (max-width: 560px) { .as-print-kv.vier { grid-template-columns: max-content 1fr; } }
.as-print-uitrusting { columns: 3 140px; column-gap: 18px; margin: 0; padding: 0; list-style: none; font-size: 10pt; }
.as-print-uitrusting li { break-inside: avoid; padding: 2px 0 2px 18px; position: relative; }
.as-print-uitrusting li::before { content: "✓"; position: absolute; left: 0; color: #0B7A3E; font-weight: 800; }
/* Etiketten (X062): 70 × 36 mm, drie naast elkaar op A4. */
.as-etiketten { display: grid; grid-template-columns: repeat(auto-fill, 70mm); gap: 0; justify-content: center; }
.as-etiket { width: 70mm; height: 36mm; box-sizing: border-box; border: 1px dashed #C9D2DE; padding: 2.5mm 3.5mm; display: flex; flex-direction: column; gap: .8mm; overflow: hidden; break-inside: avoid; }
.as-etiket b { font-size: 9.5pt; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.as-etiket-rij { display: flex; justify-content: space-between; align-items: baseline; font-size: 8pt; color: #55627A; }
.as-etiket-prijs { font-size: 13pt; font-weight: 800; color: #0F1B2D; }
.as-etiket svg { width: 100%; height: 10mm; margin-top: auto; }
.as-etiket-cijfers { font: 600 7.5pt var(--mono); letter-spacing: .12em; text-align: center; }
@media print { .as-print.as-print-etiketten { padding: 6mm 3mm; border-top: 0; } }
/* Badgekaarten (X076): bankkaartformaat met snijlijn, naam links en de QR rechts. */
.as-badgekaarten { display: grid; grid-template-columns: repeat(auto-fill, 85.6mm); gap: 6mm; justify-content: center; }
.as-badgekaart { width: 85.6mm; height: 54mm; box-sizing: border-box; border: 1px dashed #8FA3BC; border-radius: 3mm; padding: 4mm; display: flex; align-items: center; gap: 4mm; break-inside: avoid; border-top: 2.5mm solid var(--tenant-accent); }
.as-badgekaart svg { flex: none; width: 30mm; height: 30mm; }
.as-badgekaart-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1mm; }
.as-badgekaart-tekst img { max-height: 9mm; max-width: 30mm; object-fit: contain; align-self: flex-start; margin-bottom: 2mm; }
.as-badgekaart-tekst b { font-size: 12pt; line-height: 1.15; }
.as-badgekaart-tekst span { color: #55627A; font-size: 9pt; }
.as-badgekaart-tekst small { color: #55627A; font-size: 7.5pt; margin-top: auto; }
@media print { .as-print-verberg { display: none !important; } }
/* Afvinklijst op papier (pick-up): een leeg vakje in plaats van een vinkje. */
.as-print-uitrusting li.as-print-vak { padding: 4px 0 4px 22px; }
.as-print-uitrusting li.as-print-vak::before { content: ""; top: 6px; width: 11px; height: 11px; border: 1.5px solid #0F1B2D; border-radius: 2px; }
.as-print-ticketlijn { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 6px; border-top: 1px dashed #8FA3BC; font-weight: 700; }
@media print {
  @page { size: A4; margin: 0; }
  .as-print-body { background: #FFFFFF; padding: 0; }
  .as-print-bar, .as-toast-host, #blazor-error-ui, .as-skip { display: none !important; }
  .as-print { box-shadow: none; border-radius: 0; max-width: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .as-print.ticket { max-width: 80mm; border-top: 0; }
}

/* ======================================================================
   Stap 4, 7 en 8: Ctrl K, helpcentrum, meldingen, badgezuil en telefoon
   ====================================================================== */

mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; box-shadow: inset 0 -2px 0 var(--accent); }
.as-linkbtn { background: none; border: none; padding: 0; font: inherit; color: var(--brand-strong); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.as-linkbtn:hover { color: var(--brand-hover); }

/* ---------- CommandPalette ---------- */

.as-palette {
  position: fixed; z-index: 90; top: 10vh; left: 50%; transform: translateX(-50%); width: min(680px, calc(100vw - 24px));
  max-height: 76vh; display: flex; flex-direction: column; background: var(--surface); color: var(--ink);
  border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-float); overflow: hidden;
}
.as-palette-input { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--brand-strong); }
.as-palette-input input { flex: 1 1 auto; min-width: 0; border: none; outline: none; background: transparent; color: var(--ink); font: 600 18px var(--font); }
.as-palette-input input::-webkit-search-cancel-button { display: none; }
.as-palette-esc { cursor: pointer; }
.as-palette-busy { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--brand); animation: as-draai .8s linear infinite; }
@keyframes as-draai { to { transform: rotate(360deg); } }
.as-palette-list { overflow-y: auto; padding-bottom: 6px; }
.as-palette-group { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 18px 6px; }
.as-palette-item {
  display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; min-height: 48px; padding: 8px 18px;
  border: none; background: transparent; color: var(--ink); font: 400 14px var(--font); text-align: left; text-decoration: none; cursor: pointer;
}
.as-body a.as-palette-item { color: var(--ink); }
.as-palette-item:hover { background: var(--surface2); }
.as-palette-item.on { background: var(--brand-soft); }
.as-palette-icon { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--surface2); color: var(--brand-strong); border: 1px solid var(--border); }
.as-palette-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-palette-meta { font-size: 13px; }
.as-palette-enter { width: 14px; color: var(--muted); font-weight: 700; flex: none; }
.as-palette-empty { padding: 18px; color: var(--muted); font-size: 14px; }
.as-palette-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--border); background: var(--surface2); font-size: 12px; color: var(--muted); }
.as-palette-keys { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.as-palette-keys .as-linkbtn { color: var(--muted); text-decoration: none; display: inline-flex; gap: 4px; align-items: center; margin-left: 8px; }
.as-plate.s .nr mark { background: transparent; box-shadow: inset 0 -2px 0 currentColor; color: inherit; }
@media (max-width: 720px) {
  .as-palette { top: 0; left: 0; transform: none; width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .as-palette-item { min-height: 52px; }
}

/* ---------- HelpPanel ---------- */

.as-help-scrim { position: fixed; inset: 0; background: rgba(6, 18, 31, .25); z-index: 70; }
.as-help {
  position: fixed; z-index: 75; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink); border-left: 1px solid var(--border); box-shadow: var(--shadow-float);
}
.as-help.inline { position: static; width: auto; box-shadow: none; border: 1px solid var(--border); border-radius: var(--r-card); max-width: 860px; }
.as-help-head { padding: 16px 18px 10px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.as-help-title { margin: 0; font-size: 18px; font-weight: 800; }
.as-help-search { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface2); color: var(--muted); }
.as-help-search input { flex: 1 1 auto; min-width: 0; border: none; background: transparent; color: var(--ink); font: 500 15px var(--font); outline: none; }
/* Het veld zelf heeft geen rand (outline: none): de focus toont het kader (WCAG 2.4.7). */
.as-help-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.as-palette-input:focus-within { box-shadow: inset 0 -2px 0 var(--brand); }
.as-help-also { font-size: 13px; color: var(--muted); }
.as-help-also b { color: var(--ink); }
.as-help-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.as-help-chips .as-chip { min-height: 32px; padding: 5px 11px; font-size: 12px; }
.as-help-body { flex: 1 1 auto; overflow-y: auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 8px; }
.as-help.inline .as-help-body { overflow: visible; }
.as-help-section { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.as-help-hit {
  display: flex; flex-direction: column; gap: 3px; width: 100%; box-sizing: border-box; text-align: left; cursor: pointer;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: 400 14px var(--font);
}
.as-help-hit:hover { border-color: var(--muted); }
.as-help-hit.context { background: var(--brand-soft); border-color: transparent; }
.as-help-hit-title { gap: 8px; }
.as-help-cat { font-size: 12px; }
.as-help-snippet { font-size: 13px; color: var(--muted); line-height: 1.45; }
.as-help-recent { text-align: left; background: none; border: none; padding: 6px 2px; color: var(--brand-strong); font: 600 14px var(--font); cursor: pointer; }
.as-help-recent:hover { text-decoration: underline; }
.as-help-article { font-size: 14px; line-height: 1.55; }
.as-help-article h3 { margin: 4px 0 8px; font-size: 18px; font-weight: 800; }
.as-help-article p, .as-help-article ul, .as-help-article ol { margin: 0 0 10px; }
.as-help-article kbd { font: 600 12px var(--mono); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; background: var(--surface2); }
.as-help-ticket { display: flex; flex-direction: column; gap: 8px; }
.as-help-ticket h3 { margin: 4px 0; font-size: 18px; font-weight: 800; }
.as-help-ticket .as-label { margin: 6px 0 0; }
.as-help-context { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.as-help-context dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 6px 0 0; }
.as-help-context dt { color: var(--muted); }
.as-help-context dd { margin: 0; overflow-wrap: anywhere; }
.as-help-sent { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 0; }
.as-help-sent-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); display: inline-flex; align-items: center; justify-content: center; }
.as-help-foot { padding: 12px 18px 16px; border-top: 1px solid var(--border); background: var(--surface2); font-size: 13px; }
.as-help-foot ol { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* ---------- Meldingen (bel) ---------- */

.as-bell > summary { display: inline-flex; }
.as-bell-list { width: min(360px, calc(100vw - 24px)); gap: 4px; }
.as-menu-list a.as-bell-item { align-items: flex-start; border-radius: 10px; line-height: 1.35; }
.as-bell-item svg { flex: none; margin-top: 2px; color: var(--brand-strong); }
.as-bell-item.bad svg { color: var(--bad); }
.as-bell-item.warn svg { color: var(--warn); }
.as-bell-item .as-muted { font-size: 13px; }
.as-bell-empty { display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--ok); font-size: 14px; }
.as-menu-list a.as-bell-all { justify-content: space-between; color: var(--brand-strong); font-weight: 700; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; }

/* ---------- Badgezuil (kiosk): schermvullend, donker, grote doelen ---------- */

.as-kiosk-body { min-height: 100dvh; background: var(--side); color: var(--side-ink); font-family: var(--font); }
.as-kiosk { min-height: 100dvh; box-sizing: border-box; padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; user-select: none; -webkit-user-select: none; }
.as-kiosk :focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.as-kiosk-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 4px solid var(--tenant-accent); padding-top: 14px; }
.as-kiosk-logo { width: 48px; height: 48px; border-radius: 12px; background: var(--side-active); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; font-weight: 800; font-size: 20px; box-shadow: 0 0 0 2px var(--tenant-accent); }
.as-kiosk-logo img { width: 100%; height: 100%; object-fit: contain; background: #FFFFFF; }
.as-kiosk-firma { font-weight: 800; font-size: 18px; }
.as-kiosk-dag { color: var(--side-muted); font-size: 14px; }
.as-kiosk-klok { margin-left: auto; font: 700 44px var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.as-kiosk-talen { display: flex; gap: 6px; }
.as-kiosk-talen button { min-width: 64px; min-height: 64px; border-radius: 12px; border: 1px solid var(--side-hover); background: transparent; color: var(--side-ink); font: 700 15px var(--font); cursor: pointer; }
.as-kiosk-talen button[aria-pressed="true"] { background: var(--side-ink); color: var(--side); }
.as-kiosk-main { display: flex; gap: 22px; flex: 1 1 auto; min-height: 0; flex-wrap: wrap; }
.as-kiosk-people { flex: 1 1 560px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.as-kiosk h1 { margin: 0; font-size: 28px; font-weight: 800; }
.as-kiosk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.as-kiosk-tile {
  min-height: 128px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; padding: 16px;
  border-radius: 18px; border: 1px solid var(--side-hover); background: var(--side-active); color: var(--side-ink); font: 400 14px var(--font); cursor: pointer;
  touch-action: manipulation;
}
.as-kiosk-tile:hover { background: var(--side-hover); }
.as-kiosk-tile:active { transform: scale(.98); }
.as-kiosk-tile-top { display: flex; align-items: center; gap: 12px; }
.as-kiosk-tile-top .as-avatar { width: 48px; height: 48px; font-size: 17px; }
.as-kiosk-tile-name { font-weight: 800; font-size: 17px; }
.as-kiosk-state { border-radius: var(--r-pill); padding: 4px 10px; font-size: 13px; font-weight: 700; background: var(--side); color: var(--side-muted); }
.as-kiosk-tile.present .as-kiosk-state { background: var(--ok-soft); color: var(--ok); }
.as-kiosk-tile.pause .as-kiosk-state { background: var(--warn-soft); color: var(--warn); }
.as-kiosk-tile-detail { color: var(--side-muted); font-size: 13px; }
.as-kiosk-aside { flex: 0 1 290px; display: flex; flex-direction: column; gap: 14px; }
.as-kiosk-card { background: var(--side-active); border-radius: 18px; padding: 18px 20px; }
/* N007: bericht van de zaakvoerder bovenaan de zuil, groot genoeg om in het voorbijgaan te lezen. */
.as-kiosk-boodschap { display: flex; align-items: center; gap: 14px; background: var(--side-active); border-left: 6px solid var(--warn); border-radius: 14px; padding: 14px 18px; font-size: 19px; font-weight: 700; }
.as-kiosk-boodschap svg { flex: none; color: var(--warn); }
/* X076: badgen met de QR-code op de badgekaart. Groot aanraakdoel naast de tegels. */
.as-kiosk-scan { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 72px; border: 0; border-radius: 18px; background: var(--brand); color: var(--on-brand); font: 800 20px/1.2 var(--font); cursor: pointer; }
.as-kiosk-scan:hover { background: var(--brand-hover); }
.as-kiosk-scan:focus-visible { outline: 3px solid var(--on-brand); outline-offset: -6px; }
.as-kiosk-card .as-kiosk-big { font-size: 40px; font-weight: 800; line-height: 1.1; }
.as-kiosk-muted { color: var(--side-muted); }
.as-kiosk-bar { height: 8px; border-radius: var(--r-pill); background: var(--side); margin-top: 10px; overflow: hidden; }
.as-kiosk-bar > span { display: block; height: 100%; background: var(--brand); }
.as-kiosk-person { display: flex; flex-direction: column; gap: 18px; flex: 1 1 auto; max-width: 1100px; }
.as-kiosk-person-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.as-kiosk-person-head .as-avatar { width: 64px; height: 64px; font-size: 22px; }
.as-kiosk-back { min-height: 64px; min-width: 120px; border-radius: 14px; border: 1px solid var(--side-hover); background: transparent; color: var(--side-ink); font: 700 16px var(--font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; }
.as-kiosk-now { background: var(--side-active); border-radius: 20px; padding: 18px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.as-kiosk-now-label { font-size: 13px; font-weight: 700; color: var(--side-muted); text-transform: uppercase; letter-spacing: .06em; }
.as-kiosk-now-taak { font-size: 20px; font-weight: 800; }
.as-kiosk-timer { margin-left: auto; font: 700 36px var(--mono); font-variant-numeric: tabular-nums; }
.as-kiosk-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.as-kiosk-btn {
  min-height: 72px; display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 16px; text-align: left; cursor: pointer;
  border: 1px solid var(--side-hover); background: var(--side-active); color: var(--side-ink); font: 700 17px var(--font); touch-action: manipulation; width: 100%; box-sizing: border-box;
}
.as-kiosk-btn:hover { background: var(--side-hover); }
.as-kiosk-btn:active { transform: translateY(1px); }
.as-kiosk-btn[disabled] { opacity: .5; cursor: not-allowed; }
.as-kiosk-btn.primary { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--on-brand); }
.as-kiosk-btn.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.as-kiosk-btn.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.as-kiosk-btn.danger { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.as-kiosk-btn-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.as-kiosk-btn-detail { font-size: 13px; font-weight: 500; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-kiosk-section { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--side-muted); margin-top: 6px; }
.as-kiosk-melding { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100; max-width: calc(100vw - 32px); border-radius: 16px; padding: 16px 22px; font-size: 18px; font-weight: 700; background: var(--ok-soft); color: var(--ok); box-shadow: var(--shadow-float); }
.as-kiosk-melding.fout { background: var(--bad-soft); color: var(--bad); }
.as-kiosk-terug { color: var(--side-muted); font-size: 14px; }
.as-kiosk-meer > summary { cursor: pointer; min-height: 64px; display: flex; align-items: center; }
.as-kiosk .as-plate { vertical-align: middle; }

/* PinPad */
.as-pin { display: flex; flex-direction: column; align-items: center; gap: 14px; outline: none; max-width: 360px; margin: 0 auto; }
.as-pin-label { font-size: 20px; font-weight: 800; }
.as-pin-dots { display: flex; gap: 16px; }
.as-pin-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--side-muted); }
.as-pin-dot.on { background: var(--side-ink); border-color: var(--side-ink); }
.as-pin-error { color: var(--bad); background: var(--bad-soft); border-radius: 12px; padding: 8px 12px; font-weight: 700; text-align: center; }
.as-pin-keys { display: grid; grid-template-columns: repeat(3, 88px); gap: 12px; }
.as-pin-key { height: 72px; border-radius: 18px; border: 1px solid var(--side-hover); background: var(--side-active); color: var(--side-ink); font: 800 26px var(--font); cursor: pointer; touch-action: manipulation; }
.as-pin-key.small { font-size: 15px; }
.as-pin-key:active { transform: scale(.96); }

/* ---------- Telefoon: Mijn werk ---------- */

.as-phone-body { min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: var(--font); }
.as-phone { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; }
.as-phone-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.as-phone-head h1 { margin: 2px 0 0; font-size: 26px; font-weight: 800; }
.as-phone-now { background: var(--side); color: var(--side-ink); border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.as-phone-now .as-muted { color: var(--side-muted); }
.as-phone-now-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--side-muted); }
.as-phone-timer { font: 700 20px var(--mono); color: var(--side-ink); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.as-phone-now-title { font-size: 20px; font-weight: 800; }
.as-phone-now .as-bar { background: var(--side-active); }
.as-phone-now-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.as-phone-now-actions .as-kiosk-btn { min-height: 64px; justify-content: center; }
.as-phone-now a { color: var(--side-ink); }
.as-phone-section { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.as-phone-section h2 { margin: 0; font-size: 17px; font-weight: 800; }
.as-phone-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--ink);
}
.as-phone-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.as-phone-row-text > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-phone-row-text a { color: var(--ink); font-weight: 700; text-decoration: none; }
.as-phone-start { min-width: 64px; min-height: 52px; border-radius: 14px; border: none; background: var(--brand-strong); color: var(--on-brand); font: 700 14px var(--font); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.as-phone-start[disabled] { opacity: .5; }
.as-phone-foto { position: relative; overflow: hidden; }
.as-phone-foto input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.as-phone-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.as-phone-extra .as-btn { min-height: 48px; justify-content: center; }
.as-phone-extra .as-btn[aria-expanded=true] { border-color: var(--brand); color: var(--brand-strong); }
.as-phone-invoer { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.as-phone-invoer .as-input { min-height: 48px; font-size: 16px; }
.as-phone-invoer .as-row { gap: 8px; }
.as-phone-invoer .as-row .as-btn { flex: 1 1 0; min-height: 48px; justify-content: center; }
.as-phone .as-details > summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.as-phone-scan { display: flex; gap: 8px; }
.as-phone-scan .as-input { font: 700 18px var(--mono); text-transform: uppercase; min-height: 52px; }
.as-phone-meer { display: flex; flex-direction: column; gap: 8px; }
.as-phone-meer a, .as-phone-meer button { justify-content: flex-start; min-height: 56px; }
.as-phone-scanknop { min-height: 72px; justify-content: center; font-size: 17px; border-radius: 16px; }
.as-phone-gescand { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: var(--brand-soft); }
.as-phone-gescand-kop { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--brand-strong); }
.as-phone-of { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.as-phone-of::before, .as-phone-of::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Camerascan (CodeScanner, ADR 0018): altijd donker, zoals een camera-app */
.as-scanner { position: fixed; inset: 0; z-index: 120; background: var(--side); color: var(--side-ink); overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.as-scanner-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.as-scanner-video.uit { display: none; }
.as-scanner-leeg {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); width: 128px; height: 128px; border-radius: 32px;
  display: flex; align-items: center; justify-content: center; background: var(--side-active); color: var(--side-muted);
}
.as-scanner-kader {
  position: absolute; left: 50%; top: 46%; width: min(72vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%);
  border: 3px solid var(--side-ink); border-radius: 22px; box-shadow: 0 0 0 100vmax rgba(6, 18, 31, .55); transition: transform .15s ease, border-color .15s ease;
}
.as-scanner-lijn { position: absolute; left: 10%; right: 10%; top: 10%; height: 2px; border-radius: 2px; background: var(--brand-hover); box-shadow: 0 0 12px var(--brand-hover); animation: as-scanlijn 1.8s ease-in-out infinite alternate; }
@keyframes as-scanlijn { to { top: 90%; } }
.as-scanner.gevonden .as-scanner-kader { border-color: var(--ok-soft); transform: translate(-50%, -50%) scale(.94); }
.as-scanner.gevonden .as-scanner-lijn { animation: none; opacity: 0; }
.as-scanner-kop, .as-scanner-voet { position: relative; display: flex; gap: 12px; padding: max(16px, env(safe-area-inset-top)) 16px 16px; }
.as-scanner-kop { align-items: flex-start; justify-content: space-between; background: linear-gradient(rgba(6, 18, 31, .7), transparent); }
.as-scanner-kop h2 { margin: 0; font-size: 19px; font-weight: 800; }
.as-scanner-uitleg { color: var(--side-muted); font-size: 14px; margin-top: 2px; }
.as-scanner-voet { flex-direction: column; padding-bottom: max(20px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(6, 18, 31, .8)); }
.as-scanner-status { margin: 0; text-align: center; font-weight: 700; font-size: 15px; min-height: 1.4em; }
.as-scanner-acties { display: flex; gap: 10px; justify-content: center; }
.as-scanner-knop {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 48px; min-height: 48px;
  border-radius: 14px; border: 1px solid var(--side-hover); background: var(--side-active); color: var(--side-ink); font: 700 15px var(--font); cursor: pointer;
}
.as-scanner-knop.breed { flex: 1 1 0; max-width: 220px; min-height: 56px; }
.as-scanner-knop.hoofd { background: var(--brand-strong); border-color: transparent; color: var(--on-brand); }
.as-scanner-knop[aria-pressed=true] { background: var(--side-ink); color: var(--side); }
.as-scanner-knop:focus-visible { outline: 3px solid var(--brand-hover); outline-offset: 2px; }
.as-scanner-foto { overflow: hidden; }
.as-scanner-foto input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  .as-scanner-lijn { animation: none; top: 50%; }
  .as-scanner-kader { transition: none; }
}

/* Onderste tabbalk */
.as-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-top: 1px solid var(--border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.as-tabbar-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; }
.as-phone-body a.as-tabbar-item { color: var(--muted); }
.as-phone-body a.as-tabbar-item.on { color: var(--brand-strong); background: var(--brand-soft); }

/* ---------- Pariteitsronde (ADR 0013): grafieken, binnenkomst, kassa, taken en beheer ---------- */

.as-bars { margin: 0; }
.as-bars svg { width: 100%; height: auto; display: block; overflow: visible; }
.as-bars-bar { fill: var(--brand); }
.as-bars-bar.current { stroke: var(--brand); stroke-width: 1.5; }
.as-bars-current-bg { fill: var(--brand-soft); }
.as-bars-current-line { stroke: var(--brand); stroke-width: 3; }
.as-bars-value { font: 700 11px var(--font); fill: var(--ink); font-variant-numeric: tabular-nums; }
.as-bars-target { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 4; }
.as-bars-target-label { font: 700 11px var(--font); fill: var(--muted); }
.as-bars-empty { margin: 8px 0; font-size: 14px; }

.as-wizard { max-width: 1080px; }
.as-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.as-choice {
  display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; min-height: 56px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); color: var(--ink); font: 500 14px var(--font); cursor: pointer;
}
.as-choice:hover:not(:disabled) { border-color: var(--muted); }
.as-choice:disabled { opacity: .55; cursor: not-allowed; }
.as-choice[aria-pressed="true"], .as-choice[aria-checked="true"] { border-color: var(--brand-strong); box-shadow: inset 0 0 0 1px var(--brand-strong); background: var(--brand-soft); }
.as-choice > span:last-child { min-width: 0; }
.as-choice b { display: block; font-size: 15px; }
.as-choice .as-muted { font-size: 13px; }
.as-choice-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--surface2); color: var(--brand-strong); flex: none; }
.as-wizard-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.as-plate-input { font: 700 24px var(--mono); letter-spacing: .06em; text-transform: uppercase; min-height: 56px; max-width: 420px; }
.as-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0; }
.as-summary > div { background: var(--surface2); border-radius: var(--r-tile); padding: 12px 14px; }
.as-summary dt { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0; }
.as-summary dd { margin: 4px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.as-done { display: flex; gap: 16px; align-items: flex-start; }
.as-done-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; flex: none; }

.as-kassa { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: var(--gap-section); align-items: start; }
@media (max-width: 900px) { .as-kassa { grid-template-columns: minmax(0, 1fr); } }
.as-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.as-tile-btn {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 12px; min-height: 76px;
  border: 1px solid var(--border); border-radius: var(--r-tile); background: var(--surface); color: var(--ink); font: 600 13px var(--font); text-align: left; cursor: pointer;
}
.as-tile-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.as-tile-btn .prijs { font-variant-numeric: tabular-nums; color: var(--brand-strong); font-weight: 800; font-size: 15px; }
.as-ticket-total { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.as-todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.as-todo-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--border); }
.as-todo-item:first-child { border-top: none; }
.as-todo-item input[type="checkbox"] { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--brand-strong); cursor: pointer; }
.as-todo-item.klaar .as-todo-text b { text-decoration: line-through; color: var(--muted); }
.as-todo-text { cursor: pointer; overflow-wrap: anywhere; }
.as-todo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.as-body .as-todo-meta a { font-weight: 700; text-decoration: none; }

.as-swatch { width: 44px; height: 40px; padding: 2px; border-radius: var(--r-field); border: 1px solid var(--border); background: var(--surface); flex: none; cursor: pointer; }
.as-preview { border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; background: var(--surface); }
.as-preview-band { height: 6px; }
.as-preview-body { padding: 14px 16px; display: flex; gap: 14px; align-items: center; }
.as-preview-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; border: 2px solid; background: var(--surface); padding: 4px; box-sizing: border-box; }

/* ---------- Pariteitsronde 3 (ADR 0015): verlof, orders, batchfacturatie, advertenties, documenten ---------- */
.as-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: var(--gap-section); align-items: start; }
@media (max-width: 960px) { .as-split { grid-template-columns: minmax(0, 1fr); } }
.as-keuzelijst { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.as-keuzelijst .as-btn { width: 100%; justify-content: flex-start; text-align: left; }
.as-todo-item.gekozen { background: var(--brand-soft); border-radius: var(--r-tile); padding-left: 8px; padding-right: 8px; }
.as-todo-meta .late, .as-kv .late { color: var(--bad); font-weight: 700; }

.as-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0 0 12px; padding: 0; font-size: 13px; color: var(--muted); }
.as-legende li { display: inline-flex; align-items: center; gap: 6px; }
.as-kal-staal { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--border); }
.as-kal { border-collapse: separate; border-spacing: 2px; font-size: 12px; min-width: 900px; }
.as-kal th { font-weight: 600; color: var(--muted); }
.as-kal th.naam { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: 4px 10px 4px 0; min-width: 180px; max-width: 220px; }
.as-kal th.naam b { display: block; color: var(--ink); font-size: 13px; }
.as-kal th.naam .as-muted { display: block; font-weight: 400; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-kal th.dag { width: 26px; text-align: center; line-height: 1.15; padding: 2px 0; border-radius: 6px; }
.as-kal th.dag span { display: block; font-size: 10px; text-transform: uppercase; }
.as-kal th.dag b { display: block; color: var(--ink); font-size: 12px; }
.as-kal th.weekend { color: var(--muted); opacity: .7; }
.as-kal th.feestdag { background: var(--ok-soft); }
.as-kal th.vandaag { box-shadow: inset 0 0 0 2px var(--brand-strong); }
.as-kal td { height: 30px; min-width: 24px; text-align: center; border-radius: 6px; background: var(--surface2); font-weight: 700; color: var(--ink); }
.as-kal tfoot td { background: transparent; color: var(--muted); font-weight: 600; height: 22px; }
.as-kal tfoot td.druk { color: var(--warn); font-weight: 800; }
.as-kal td.vrij, .as-kal-staal.vrij { background: repeating-linear-gradient(135deg, var(--surface2) 0 4px, var(--border) 4px 5px); color: var(--muted); }
.as-kal td.verlof, .as-kal-staal.verlof { background: var(--planned); color: var(--on-status); }
.as-kal td.opleiding, .as-kal-staal.opleiding { background: var(--brand-soft); color: var(--brand-strong); }
.as-kal td.afwezig, .as-kal-staal.afwezig { background: var(--warn-soft); color: var(--warn); }
.as-kal td.feestdag, .as-kal-staal.feestdag { background: var(--ok-soft); color: var(--ok); }
.as-kal td.aangevraagd, .as-kal-staal.aangevraagd { background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 2px var(--planned); }

.as-verlof { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--gap-section); align-items: start; }
.as-feestdagen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; font-size: 14px; }
.as-feestdagen li.voorbij { color: var(--muted); }
.as-rooster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.as-rooster-dag { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-tile); background: var(--surface); }
.as-rooster-dag.vrij { background: transparent; border-style: dashed; color: var(--muted); }
.as-rooster-dag .as-input { width: 100%; box-sizing: border-box; min-height: 34px; padding: 4px 8px; }
.as-prestatiedagen { display: flex; flex-wrap: wrap; gap: 6px; }
.as-prestatiedagen > div { display: flex; flex-direction: column; min-width: 74px; padding: 6px 8px; border-radius: var(--r-tile); background: var(--surface); border: 1px solid var(--border); font-size: 12px; font-variant-numeric: tabular-nums; }
.as-prestatiedagen > div.verlof { border-color: var(--planned); }
.as-prestatiedagen > div.vrij { background: var(--ok-soft); }
.as-prestatiedagen .laat { color: var(--warn); font-weight: 700; }

.as-velden { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.as-veld { display: inline-block; font: 600 12px var(--mono); padding: 2px 8px; border-radius: var(--r-pill); background: var(--ok-soft); color: var(--ok); border: 0; cursor: default; }
button.as-veld { cursor: pointer; }
button.as-veld:hover { background: var(--brand-soft); color: var(--brand-strong); }
.as-veld.onbekend { background: var(--bad-soft); color: var(--bad); }
.as-papier { background: #FFFFFF; color: #1A2233; border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-float); padding: 28px 32px; max-height: 620px; overflow: auto; font-size: 14px; line-height: 1.5; }
.as-papier p { margin: 0 0 8px; white-space: pre-wrap; }
.as-papier .titel { font-size: 20px; margin: 10px 0 12px; }
.as-papier h4 { font-size: 15px; margin: 14px 0 4px; }
.as-papier .klein { font-size: 12px; color: #55627A; }
.as-papier .vet { font-weight: 700; }

.as-advertenties { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.as-advertentie { border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.as-advertentie textarea.as-input { width: 100%; box-sizing: border-box; resize: vertical; }
.as-advertentie-voorbeeld { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; margin-top: 12px; padding: 10px; border-radius: var(--r-tile); background: var(--surface2); }
.as-advertentie-voorbeeld .foto { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 72px; border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 11px; }
.as-advertentie-voorbeeld .tekst { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.as-advertentie-voorbeeld .tekst > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-advertentie-voorbeeld .prijs { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--brand-strong); }
.as-payload { margin: 10px 0 0; max-height: 280px; overflow: auto; padding: 10px 12px; border-radius: var(--r-tile); background: var(--surface2); font: 12px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Bestandsbeheer en rapporten (ADR 0016) ---------- */

.as-link-btn { background: none; border: 0; padding: 4px 6px; margin: -4px -6px; border-radius: 8px; font: inherit; color: var(--brand-strong); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.as-link-btn:hover { background: var(--brand-soft); }
.as-th-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-transform: inherit; }
th[aria-sort="ascending"] .as-th-btn::after { content: " ↑"; }
th[aria-sort="descending"] .as-th-btn::after { content: " ↓"; }
.as-btn.danger { background: var(--bad); border-color: var(--bad); color: var(--on-status); }
.as-btn.danger:hover { filter: brightness(.92); }
.as-menu-list button.danger { color: var(--bad); }

.as-files { display: flex; flex-direction: column; gap: 12px; }
.as-files-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.as-files-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.as-files-crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.as-files-crumbs [aria-current="page"] { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.as-files-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.as-files-search { min-height: 40px; width: 220px; max-width: 100%; box-sizing: border-box; }
.as-files-upload-btn { cursor: pointer; }
.as-files-drop {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px dashed var(--border);
  border-radius: var(--r-tile); color: var(--muted); font-size: 14px; background: var(--surface2); transition: border-color .12s, background-color .12s;
}
.as-files-drop b { color: var(--ink); }
.as-files-drop .as-files-kies { color: var(--brand-strong); font-weight: 700; text-decoration: underline; }
.as-files-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.as-files-drop.over, .as-files-drop:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.as-files-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.as-files-inline .as-input { min-height: 36px; flex: 1 1 200px; box-sizing: border-box; }
.as-files-table { min-width: 560px; }
.as-files-table tr.drop td { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.as-files-table tr[draggable="true"] { cursor: grab; }
.as-file-name { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; font: 600 14px var(--font); color: var(--ink); cursor: pointer; text-align: left; overflow-wrap: break-word; word-break: normal; min-width: 0; }
.as-body a.as-file-name { color: var(--ink); font-weight: 600; }
.as-file-name:hover { text-decoration: underline; }
.as-file-name mark { background: var(--accent-soft); color: inherit; border-radius: 3px; }
.as-file-icon { flex: none; width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font: 800 9px var(--font); letter-spacing: .02em; background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }
.as-file-icon.map { background: var(--brand-soft); color: var(--brand-strong); border-color: transparent; }
.as-file-icon.pdf { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.as-file-icon.beeld { background: var(--damage-soft); color: var(--damage); border-color: transparent; }
.as-file-icon.mail { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.as-file-icon.office { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.as-files-actions { white-space: nowrap; text-align: right; width: 1%; }
.as-files-actions > * { vertical-align: middle; }
.as-files-actions .as-iconbtn { width: 34px; height: 34px; margin-left: 4px; }
.as-files-actions .as-iconbtn.danger:hover { color: var(--bad); border-color: var(--bad); }
.as-files-count { margin: 0; font-size: 13px; }

/* Voorbeeld van een bestand (PDF, foto, tekst, mail) in een groot venster. */
.as-dialog.as-preview-dialog {
  top: 4vh; width: min(1100px, calc(100vw - 32px)); height: 92vh; max-height: 92vh; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px; padding: 12px 14px;
}
.as-preview-dialog:focus { outline: none; }
.as-preview-dialog:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.as-preview-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.as-preview-dialog .as-preview-title { margin: 0; font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
.as-preview-meta { font-size: 13px; }
.as-preview-actions { display: flex; gap: 4px; margin-left: auto; }
.as-preview-frame { flex: 1; min-height: 0; border: 1px solid var(--border); border-radius: var(--r-field); background: var(--surface2); overflow: auto; display: flex; }
.as-preview-frame iframe { flex: 1; width: 100%; height: 100%; border: 0; background: #fff; }
.as-preview-frame img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
.as-preview-text { flex: 1; padding: 16px 20px; background: var(--surface); font-size: 14px; line-height: 1.5; }
.as-preview-text h3 { margin: 0 0 10px; font-size: 18px; }
.as-preview-text dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0 0 14px; font-size: 13px; }
.as-preview-text dt { color: var(--muted); font-weight: 600; }
.as-preview-text dd { margin: 0; overflow-wrap: anywhere; }
.as-preview-text pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 0; }
.as-preview-text dl + pre { border-top: 1px solid var(--border); padding-top: 14px; }
.as-preview-text ul { list-style: none; margin: 14px 0 0; padding: 0; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
@media (max-width: 720px) {
  .as-dialog.as-preview-dialog { top: 0; width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
}

/* Beheer > Bestanden: opbouw van de mappen en de regels. */
.as-bestanden-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0 12px; font-size: 13px; }
.as-bestanden-dl dt { color: var(--muted); font-weight: 600; }
.as-bestanden-dl dd { margin: 0; overflow-wrap: anywhere; }
.as-bestanden-boom, .as-bestanden-boom ul { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.as-bestanden-boom ul { padding-left: 18px; border-left: 1px solid var(--border); margin-left: 6px; }
.as-bestanden-boom li { padding: 3px 0; overflow-wrap: anywhere; }
.as-bestanden-mappen { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.as-bestanden-mappen li {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; box-sizing: border-box; padding: 4px 14px;
  border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); font: 600 13px var(--font);
}
.as-bestanden-mappen li:has(button) { padding-right: 4px; }
.as-bestanden-mappen button {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
}
.as-bestanden-mappen button:hover { background: var(--surface2); color: var(--ink); }
.as-bestanden-mappen button:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
.as-bestanden-regels { margin: 10px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; display: grid; gap: 4px; }

.as-rapport-kop { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.as-rapport-kop .as-input { min-height: 40px; }
.as-rapport-viewer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; height: calc(100vh - 230px); min-height: 520px; }
.as-rapport-viewer > * { height: 100%; }
@media (max-width: 720px) {
  .as-rapport-viewer { height: calc(100vh - 280px); min-height: 420px; }
  /* Telefoon: naam en acties; datum en grootte staan dan niet in de weg. */
  .as-files-table { min-width: 0; }
  .as-files-table th:nth-child(2), .as-files-table td:nth-child(2), .as-files-table th:nth-child(3), .as-files-table td:nth-child(3) { display: none; }
  .as-files-table td, .as-files-table th { padding: 8px 4px; }
  .as-files-actions .as-iconbtn { width: 30px; height: 30px; margin-left: 1px; }
  .as-file-name { gap: 8px; }
  .as-file-icon { width: 30px; height: 30px; }
  .as-files-search { width: 100%; }
}

/* ---------- Firmawissel en overgang (ADR 0022) ---------- */

.as-tenant { margin-bottom: 12px; }
.as-tenant > summary.as-brand { margin-bottom: 0; }
.as-brand-wissel { transition: background .12s, box-shadow .12s; }
.as-brand-wissel:hover { background: rgba(255,255,255,.10); }
.as-brand-wissel:focus-visible { outline: 2px solid #8DCDF0; outline-offset: 2px; }
.as-tenant[open] > .as-brand-wissel { background: rgba(255,255,255,.12); }
.as-brand-letter { font-size: 18px; font-weight: 800; color: var(--tenant-accent); }
.as-brand-pijl { color: var(--side-muted); flex: none; transition: transform .15s ease; }
.as-tenant[open] .as-brand-pijl { transform: rotate(180deg); }
/* Vast op het scherm naast de zijbalk: de zijbalk scrolt (overflow) en zou de lijst anders afknippen. */
.as-tenant-list { position: fixed; left: 256px; top: 14px; width: 330px; max-height: min(80vh, 600px); overflow-y: auto; padding: 8px; z-index: 70; animation: as-tenant-in .16s ease; }
.as-side.collapsed .as-tenant-list { left: 80px; }
@keyframes as-tenant-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.as-tenant-list .as-menu-title { padding: 8px 10px 4px; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 800; }
.as-tenant-item { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); min-height: 48px; }
.as-body .as-menu-list a.as-tenant-item { color: var(--ink); display: grid; }
.as-menu-list a.as-tenant-item:hover, .as-menu-list a.as-tenant-item:focus-visible { background: var(--brand-soft); outline: none; }
.as-tenant-item.huidig { background: var(--surface2); }
.as-tenant-item.huidig::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--firma); }
.as-tenant-item.dicht { opacity: .65; }
.as-tenant-item.dicht small { color: var(--bad); }
.as-tenant-logo { width: 32px; height: 32px; border-radius: 9px; background: #FFFFFF; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.as-tenant-logo img { width: 26px; height: 26px; object-fit: contain; }
.as-tenant-logo span { font-weight: 800; font-size: 15px; }
.as-tenant-text { display: grid; min-width: 0; }
.as-tenant-text b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-tenant-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-tenant-vink { color: var(--ok); }
.as-menu-list a.as-tenant-alle { border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; margin-top: 6px; color: var(--muted); font-size: 13px; }
/* Telefoon en tablet: de zijbalk is een lade (transform), de lijst komt ín de lade onder het logo. */
@media (max-width: 1024px) { .as-tenant-list { left: 12px; top: 84px; width: 248px; } }

.as-overgang {
  position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: #FFFFFF; text-align: center; opacity: 0; transition: opacity .18s ease;
  background: radial-gradient(420px 300px at 50% 42%, color-mix(in srgb, var(--overgang) 38%, transparent), transparent 70%), linear-gradient(180deg, #0B1A2B, #0C1B2E);
}
.as-overgang.zichtbaar { opacity: 1; }
.as-overgang-logo {
  width: 84px; height: 84px; border-radius: 24px; background: #FFFFFF; display: inline-flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 800; color: var(--overgang); transform: scale(.85); transition: transform .3s cubic-bezier(.2, .9, .3, 1.2);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--overgang) 25%, transparent), 0 22px 50px rgba(0,0,0,.45);
}
.as-overgang.zichtbaar .as-overgang-logo { transform: scale(1); }
.as-overgang-logo img { width: 66px; height: 66px; object-fit: contain; }
.as-overgang b { font-size: 22px; letter-spacing: -.01em; }
.as-overgang small { color: #9FB4CC; font-size: 14px; min-height: 1em; }
.as-overgang-balk { width: 180px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; margin-top: 6px; }
.as-overgang-balk i { display: block; width: 40%; height: 100%; border-radius: 999px; background: var(--overgang); animation: as-overgang-loop 1s ease-in-out infinite; }
@keyframes as-overgang-loop { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ---------- Gebruikers beheren en zijpaneel (ADR 0022) ---------- */

.as-drawer {
  position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink); border-left: 1px solid var(--border); box-shadow: -18px 0 48px rgba(15, 27, 45, .16);
  animation: as-drawer-in .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes as-drawer-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
.as-drawer-kop { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.as-drawer-kop h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.as-drawer-inhoud { flex: 1 1 auto; overflow-y: auto; padding: 10px 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.as-drawer-inhoud .as-label { margin-top: 10px; }
.as-drawer-acties { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface2); }
.as-stappen { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0 20px; margin: 6px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.as-stappen li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--border); }
.as-stappen li span { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--border); color: var(--ink); }
.as-stappen li.klaar span { background: var(--ok); color: var(--on-status); }
.as-stappen li.actief { color: var(--brand-strong); background: var(--brand-soft); border-color: var(--brand-soft); }
.as-stappen li.actief span { background: var(--brand-strong); color: var(--on-brand); }

.as-gb { display: flex; flex-direction: column; gap: 14px; }
.as-gb-kop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.as-gb-teller { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 12px 16px; }
.as-gb-teller-icoon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-strong); display: inline-flex; align-items: center; justify-content: center; }
.as-gb-aantal { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.as-gb-aantal.klein { font-size: 20px; }
.as-gb-uitleg { display: block; font-size: 13px; }
.as-gb-lijst { padding: 4px; }
.as-gb-rij { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.as-gb-rij + .as-gb-rij { box-shadow: 0 -1px 0 var(--border); }
.as-gb-rij.nieuw { animation: as-gb-nieuw 2.4s ease; }
@keyframes as-gb-nieuw { 0%, 30% { background: var(--ok-soft); } 100% { background: transparent; } }
.as-gb-rij.weg { opacity: .8; }
.as-gb-wie { display: flex; align-items: center; gap: 10px; min-width: 0; }
.as-gb-naam { display: grid; min-width: 0; }
.as-gb-naam b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-gb-naam small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-gb-laatst { font-size: 13px; }
.as-gb-menu .as-menu-list { min-width: 250px; }
.as-gb-weg > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--muted); padding: 6px 2px; }
.as-gb-weg > summary::-webkit-details-marker { display: none; }
.as-gb-weg[open] .as-gb-weg-pijl { transform: rotate(90deg); }
.as-gb-weg-pijl { transition: transform .15s; }
.as-gb-weg .as-gb-lijst { margin-top: 8px; }
.as-gb-klein { font-size: 13px; margin: 4px 0 0; }
.as-rolkaarten { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.as-rolkaart { display: grid; gap: 4px; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font: 500 12.5px/1.4 var(--font); color: var(--muted); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.as-rolkaart b { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.as-rolkaart:hover { border-color: var(--brand); }
.as-rolkaart.aan { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); }
.as-rolkaart:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.as-gb-opties { display: grid; gap: 8px; margin-top: 14px; font-size: 14px; }
.as-gb-opties label { display: flex; align-items: center; gap: 8px; }
.as-gb-opties input, .as-meerkost input { width: 18px; height: 18px; accent-color: var(--brand-strong); flex: none; }
.as-gb-samen { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.as-gb-samen-wie, .as-gb-samen-mini { display: flex; align-items: center; gap: 12px; }
.as-gb-samen-wie b, .as-gb-samen-mini b { display: block; font-size: 15px; }
.as-gb-samen-wie small, .as-gb-samen-mini small { display: block; font-size: 13px; }
.as-gb-samen-mini { padding: 4px 0 10px; }
.as-gb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.as-gb-na { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-top: 6px; }
.as-meerkost { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; padding: 12px; border-radius: 12px; border: 1.5px solid var(--brand); background: var(--brand-soft); font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.as-meerkost input { margin-top: 1px; }
.as-gb-klaar { display: grid; justify-items: start; gap: 8px; }
.as-gb-klaar h3 { margin: 4px 0 0; font-size: 18px; }
.as-gb-klaar p { margin: 0; font-size: 14px; line-height: 1.5; }
.as-gb-klaar-icoon { width: 56px; height: 56px; border-radius: 18px; background: var(--ok-soft); color: var(--ok); display: inline-flex; align-items: center; justify-content: center; animation: as-gb-pop .35s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes as-gb-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.as-gb-gevolgen { margin: 6px 0 14px; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
@media (max-width: 960px) {
  .as-gb-rij { grid-template-columns: minmax(0, 1fr) auto auto; }
  .as-gb-rol, .as-gb-laatst { display: none; }
  .as-rolkaarten { grid-template-columns: 1fr; }
}

/* ---------- Rollen beheren (ADR 0029) ---------- */

.as-rolkaart b svg { flex: none; }
.as-rolkaart b .as-pill { font-size: 11px; padding: 1px 8px; }
.as-rolkaart-naam { flex: 1 1 auto; min-width: 0; }
.as-rb { display: flex; flex-direction: column; gap: 16px; }
.as-rb-uitleg { margin: 0; max-width: 72ch; font-size: 14px; line-height: 1.5; }
.as-rb-titel { padding: 14px 16px 10px; margin: 0; }
.as-rb-tabel th[scope="col"] { vertical-align: bottom; }
.as-rb-tabel tbody th { text-align: left; font-weight: 500; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; left: 0; z-index: 1; }
.as-rb-tabel tbody tr:last-child th { border-bottom: none; }
.as-rb-kolom, .as-rb-groep { display: grid; gap: 2px; }
.as-rb-kolom b { color: var(--ink); font-size: 13px; }
.as-rb-kolom small { font-weight: 500; }
.as-rb-groep b { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.as-rb-groep small { font-size: 12px; white-space: normal; }
.as-rb-niveau { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.as-rb-niveau.bewerken { color: var(--ok); }
.as-rb-niveau.lezen { color: var(--ink); }
.as-rb-niveau.geen { color: var(--muted); font-weight: 500; }
.as-rb-tabel td.as-rb-aangepast { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.as-rb-rij { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.as-rb-rij + .as-rb-rij { box-shadow: 0 -1px 0 var(--border); }
.as-rb-rij.nieuw { animation: as-gb-nieuw 2.4s ease; }
.as-rb-icoon { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong); display: inline-flex; align-items: center; justify-content: center; }
.as-rb-acties { display: inline-flex; align-items: center; gap: 6px; }
.as-rb-lade { width: min(560px, 100vw); }
.as-rb-basis { grid-template-columns: repeat(3, 1fr); }
.as-rb-kopgroep { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.as-rb-kopgroep .as-label { margin: 0; }
.as-rb-keuzes { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; }
.as-rb-keuzes li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.as-rb-keuzes li:last-child { border-bottom: none; }
.as-rb-keuzes .as-rb-groep { flex: 1 1 200px; min-width: 0; }
.as-rb-segment > button { padding: 6px 12px; min-height: 32px; }
@media (max-width: 960px) {
  .as-rb-rij { grid-template-columns: auto minmax(0, 1fr) auto; }
  .as-rb-rij > .as-pill { display: none; }
  .as-rb-basis { grid-template-columns: 1fr; }
}

/* Kosten (docs/azure-kosten.md): na lange inactiviteit verbreekt de browser de verbinding (autosoft.activiteit). */
.as-pauze { position: fixed; inset: 0; background: rgba(6, 18, 31, .45); z-index: 200; display: grid; place-items: center; padding: 16px; }
.as-pauze-kaart { background: var(--surface); color: var(--ink); border-radius: 14px; padding: 24px; max-width: 420px; display: grid; gap: 12px; box-shadow: inset 0 0 0 1px var(--border); }
.as-pauze-kaart h2 { margin: 0; font-size: 20px; }
.as-pauze-kaart p { margin: 0; line-height: 1.5; }