/* =============================================================
   ADO-RE Portal ? Workspace styles
   Premium B2B SaaS ? Inter, slate, blue/emerald.
   Inspired by Linear / Stripe Dashboard / Pipedrive.
   ============================================================= */

:root {
  /* Surfaces */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --surface-tint: #f8fafc;

  /* Sidebar (dark workspace anchor) */
  --side-bg: #0b1220;
  --side-bg-hover: #111a2f;
  --side-bg-active: #18243d;
  --side-text: #cbd5e1;
  --side-text-muted: #64748b;
  --side-text-strong: #f1f5f9;
  --side-border: #1a2540;

  /* Borders */
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-soft: #eef2f7;

  /* Text */
  --text: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;
  --text-faint: #cbd5e1;

  /* Brand */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --primary-ring: rgba(37, 99, 235, 0.18);

  /* Status palette ? calm, not shouty */
  --success: #10b981;
  --success-soft: #ecfdf5;
  --success-dark: #047857;

  --warning: #d97706;
  --warning-soft: #fffbeb;
  --warning-dark: #b45309;

  --danger: #dc2626;
  --danger-soft: #fef2f2;

  --indigo: #6366f1;
  --indigo-soft: #eef2ff;

  --slate: #475569;
  --slate-soft: #f1f5f9;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px -8px rgba(15, 23, 42, 0.1), 0 8px 16px -6px rgba(15, 23, 42, 0.06);
  /* Form controls use a calm border-only focus state; no large outer halo. */
  --shadow-focus: none;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --side-w: 248px;
  --top-h: 60px;
  --ease: cubic-bezier(0.25, 0.85, 0.35, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

/* =============================================================
   App shell
   ============================================================= */

.app {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  grid-template-rows: 100vh;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */

.side {
  background: var(--side-bg);
  border-right: 1px solid var(--side-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: sticky;
  top: 0;
  height: 100vh;
}

.side__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--side-border);
}

.side__brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  color: white;
  letter-spacing: -0.02em;
  position: relative;
}

.side__brand-mark::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  top: -1px;
  right: -1px;
  border: 2px solid var(--side-bg);
}

.side__brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.side__brand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--side-text-strong);
  letter-spacing: -0.01em;
}

.side__brand-env {
  font-size: 10px;
  font-weight: 500;
  color: var(--side-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.side__nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.side__section-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--side-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 12px;
  margin-bottom: 6px;
}

.side__group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--side-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 140ms var(--ease);
  position: relative;
}

.side__link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke-width: 1.8;
  opacity: 0.85;
}

.side__link:hover {
  background: var(--side-bg-hover);
  color: var(--side-text-strong);
}

.side__link.is-active {
  background: var(--side-bg-active);
  color: white;
  font-weight: 600;
}

.side__link.is-active svg {
  opacity: 1;
  color: #60a5fa;
}

.side__link-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

.side__link-badge--muted {
  background: var(--side-bg-active);
  color: var(--side-text);
}

.side__foot {
  border-top: 1px solid var(--side-border);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side__foot .side__profile {
  border-top: none;
  margin-top: 4px;
  padding: 8px 8px 4px;
}

.side__logout-form {
  margin: 0;
}

.side__logout {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

button.side__logout:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}

.side__profile {
  border-top: 1px solid var(--side-border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.side__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #059669);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.side__profile-body {
  flex: 1;
  min-width: 0;
}

.side__profile-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--side-text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side__profile-role {
  font-size: 11px;
  color: var(--side-text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.side__profile-role::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
}

.side__profile-menu {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--side-text-muted);
  display: grid;
  place-items: center;
  transition: all 140ms var(--ease);
}

.side__profile-menu:hover {
  background: var(--side-bg-hover);
  color: var(--side-text-strong);
}

/* ---------- Main column ---------- */

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  height: 100vh;
}

/* ---------- Topbar ---------- */

.top {
  height: var(--top-h);
  /* .main is een flex-kolom: zonder flex-shrink:0 wordt de topbar op lange
     pagina's platgedrukt en oogt hij per pagina anders hoog. */
  flex: 0 0 auto;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  transition: box-shadow 160ms ease, border-color 160ms ease;
  position: sticky;
  top: 0;
  z-index: 10;
}

.main.is-scrolled .top {
  border-bottom-color: transparent;
  box-shadow: 0 6px 18px -10px rgba(15, 23, 42, 0.28), 0 1px 0 0 var(--border-soft);
}

.top__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px 0 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  flex: 0 0 auto;
  transition: all 150ms var(--ease);
}
.top__back:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface-tint);
  transform: translateX(-2px);
}
.top__back svg { flex: 0 0 auto; }

.top__crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 0;
}

.top__crumb-sep {
  color: var(--text-faint);
}

.top__crumb-current {
  color: var(--text);
  font-weight: 600;
}

.top__search {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, 44vw);
  margin: 0;
}

/* Hoge specificiteit (input[type=text]) zodat de globale input-regel in
   app.css deze padding niet overschrijft. */
.top__search input[type="text"] {
  width: 100%;
  height: 36px;
  padding: 0 66px 0 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-tint);
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  text-overflow: ellipsis;
  -webkit-appearance: none;
  appearance: none;
  transition: all 160ms var(--ease);
}

.top__search input::placeholder {
  color: var(--text-muted);
}

.top__search input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-focus);
}

.top__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.top__kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 3px;
  pointer-events: none;
}

.top__kbd kbd {
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.4;
}

/* Zoekresultaten-dropdown */
.top__results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg, 0 12px 34px rgba(15, 23, 42, 0.16));
  padding: 6px;
  max-height: min(64vh, 460px);
  overflow-y: auto;
  z-index: 60;
}

.top__results[hidden] {
  display: none;
}

.top__results-group + .top__results-group {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
}

.top__results-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  padding: 8px 10px 4px;
}

.top__result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.top__result:hover,
.top__result.is-active {
  background: var(--surface-tint);
}

.top__result-ic {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--surface-tint);
  color: var(--text-secondary);
}

.top__result.is-active .top__result-ic {
  background: var(--primary-soft, rgba(37, 99, 235, 0.12));
  color: var(--primary);
}

.top__result-body {
  min-width: 0;
  flex: 1;
}

.top__result-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top__result-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top__result-badge {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-tint);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 2px 8px;
}

.top__results-empty {
  padding: 22px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.top__results-empty strong {
  color: var(--text-secondary);
}

@media (max-width: 760px) {
  .top__search { width: 52vw; }
  .top__kbd { display: none; }
  .top__search input[type="text"] { padding-right: 14px; }
}

.top__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top__divider {
  width: 1px;
  height: 22px;
  background: var(--border-soft);
  margin: 0 4px;
  flex: 0 0 auto;
}

.top__icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: all 160ms var(--ease);
  position: relative;
}

.top__icon-btn:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.top__icon-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.top__icon-btn-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

/* ---------- Meldingen (bell + dropdown) ---------- */
.notif { position: relative; }
.notif__badge {
  position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--danger, #ef4444); color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 99px; border: 2px solid var(--surface, #fff); line-height: 1;
  box-shadow: 0 1px 4px rgba(220, 38, 38, .35);
}
.notif[open] summary.top__icon-btn {
  background: var(--surface-soft, #f6f8fb);
  color: var(--text, #1f2733);
}

.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 380px; max-width: calc(100vw - 32px);
  background: var(--surface, #fff); border: 1px solid var(--border, #e6e9f0); border-radius: 12px;
  box-shadow: 0 18px 44px -14px rgba(15, 23, 42, .2);
  z-index: 900; overflow: hidden;
  transform-origin: top right; animation: notifPop 150ms var(--ease, ease);
}
@keyframes notifPop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

.notif-panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px 12px; border-bottom: 1px solid var(--border-soft, #eef1f6);
}
.notif-panel__headtxt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.notif-panel__title { font-size: 14px; font-weight: 700; color: var(--text, #1f2733); letter-spacing: -0.01em; }
.notif-panel__sub { font-size: 11.5px; color: var(--text-tertiary, #8a95a6); }
.notif-panel__readall {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600;
  color: var(--text-secondary, #5b6b80); padding: 5px 0; border-radius: 0; flex: 0 0 auto;
  transition: background 120ms var(--ease, ease);
}
.notif-panel__readall:hover { color: var(--primary, #2563eb); background: transparent; }

.notif-panel__list { max-height: 390px; overflow-y: auto; padding: 0; }
.notif-panel__list::-webkit-scrollbar { width: 8px; }
.notif-panel__list::-webkit-scrollbar-thumb { background: var(--border, #e2e6ee); border-radius: 99px; }

/* Rustige inboxrij: ongelezen wordt uitsluitend door gewicht + één stip getoond. */
.notif-row { position: relative; border-radius: 0; border-bottom: 1px solid var(--border-soft, #eef1f6); }
.notif-row:last-child { border-bottom: 0; }
.notif-row + .notif-row { margin-top: 0; }
.notif-row .notif-item { transition: background 130ms var(--ease, ease); }
.notif-row:not(.is-read) .notif-item { background: var(--surface, #fff); }
.notif-row.is-read .notif-ic { opacity: .55; }
.notif-row__read {
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%); margin: 0; opacity: 0;
  transition: opacity 120ms var(--ease, ease);
}
.notif-row:hover .notif-row__read,
.notif-row:focus-within .notif-row__read { opacity: 1; }
.notif-row__read button {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border: 0; background: var(--surface-soft, #f6f8fb); color: var(--text-secondary, #5b6b80);
  border-radius: 6px; cursor: pointer; box-shadow: none;
  transition: all 120ms var(--ease, ease);
}
.notif-row__read button:hover { background: var(--success-soft, #dcfce7); color: var(--success-dark, #15803d); border-color: var(--success, #22c55e); }

.notif-item {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) 78px; gap: 11px; align-items: start;
  min-height: 64px; padding: 11px 14px; border-radius: 0; text-decoration: none;
}
.notif-item:hover { background: var(--surface-soft, #f6f8fb); }
.notif-row:not(.is-read) .notif-item:hover { background: var(--surface-soft, #f6f8fb); }
.notif-item:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: -2px; }

/* Icoon blijft functioneel maar concurreert niet met de inhoud. */
.notif-ic {
  width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; flex: 0 0 auto;
  background: transparent; color: var(--text-tertiary, #8a95a6);
}
.notif-ic svg { width: 15px; height: 15px; }
.notif-ic--warning { color: var(--warning-dark, #b45309); }
.notif-ic--danger  { color: var(--danger, #dc2626); }
.notif-ic--info, .notif-ic--indigo, .notif-ic--primary { color: var(--primary, #2563eb); }
.notif-ic--success { color: var(--success-dark, #15803d); }
.notif-ic--neutral { color: var(--text-tertiary, #8a95a6); }

.notif-item__body { min-width: 0; }
.notif-item__title {
  font-size: 12.5px; font-weight: 500; color: var(--text-secondary, #5b6b80); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-row:not(.is-read) .notif-item__title { font-weight: 650; color: var(--text, #1f2733); }
.notif-item__meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; min-width: 0; }
.notif-item__dossier {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-secondary, #5b6b80); background: transparent;
  border: 0; border-radius: 0; padding: 0;
}
.notif-item__sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint, #cbd5e1); flex: 0 0 auto; }
.notif-item__org { font-size: 11.5px; color: var(--text-tertiary, #8a95a6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.notif-item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; margin-top: 1px; min-width: 0; }
.notif-item__due {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; white-space: nowrap;
  color: var(--warning-dark, #b45309); background: transparent;
  padding: 1px 0; border-radius: 0;
}
.notif-item__due.is-critical { color: var(--danger, #dc2626); background: var(--danger-soft, #fee2e2); }
.notif-item__due.is-critical { padding: 2px 7px; border-radius: 99px; }
.notif-item__unread { width: 6px; height: 6px; border-radius: 50%; background: var(--primary, #2563eb); margin-right: 2px; }

/* Onlezen rijen hebben een gelezen-knop die op hover verschijnt. Reserveer de
   ruimte permanent zodat de due-chip/stip niet verspringt zodra de knop opduikt. */
.notif-row:not(.is-read) .notif-item__side { padding-right: 30px; }

.notif-empty { display: flex; align-items: center; gap: 14px; padding: 30px 20px; color: var(--text-tertiary, #8a95a6); }
.notif-empty__ic {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--success-soft, #dcfce7); color: var(--success-dark, #15803d);
}
.notif-empty__title { font-size: 13.5px; font-weight: 600; color: var(--text, #1f2733); }
.notif-empty__sub { font-size: 12.5px; color: var(--text-tertiary, #8a95a6); margin-top: 2px; }

.notif-panel__foot {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border-top: 1px solid var(--border-soft, #eef1f6);
  font-size: 12px; font-weight: 600; color: var(--text-secondary, #5b6b80); background: var(--surface, #fff);
  text-decoration: none; transition: background 120ms var(--ease, ease);
}
.notif-panel__foot:hover { background: var(--surface-2, #f1f4f9); }
.notif-panel__foot svg { transition: transform 120ms var(--ease, ease); }
.notif-panel__foot:hover svg { transform: translateX(2px); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: all 160ms var(--ease);
  white-space: nowrap;
}

.btn svg { width: 15px; height: 15px; stroke-width: 2; }

.btn--primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.btn--primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn--ghost:hover {
  background: var(--surface-soft);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn--sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn--sm svg { width: 13px; height: 13px; }

/* ---------- Canvas / page content ---------- */

.canvas {
  padding: 28px 32px 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: none;
}

/* ---------- Greeting bar ---------- */

.greeting {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.greeting__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 4px;
}

.greeting__title em {
  font-style: normal;
  color: var(--primary);
}

.greeting__sub {
  font-size: 13.5px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.greeting__sub-dot {
  width: 3px;
  height: 3px;
  background: var(--text-faint);
  border-radius: 50%;
}

.greeting__actions {
  display: flex;
  gap: 8px;
}

/* ---------- KPI strip ---------- */

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: all 200ms var(--ease);
}

.kpi:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.kpi__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi__icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
}

.kpi__icon svg { width: 15px; height: 15px; stroke-width: 2; }

.kpi__icon--success { color: var(--success-dark); background: var(--success-soft); }
.kpi__icon--warning { color: var(--warning-dark); background: var(--warning-soft); }
.kpi__icon--indigo { color: var(--indigo); background: var(--indigo-soft); }

.kpi__value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.kpi__value small {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0;
}

.kpi__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-tertiary);
}

.kpi__trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
}

.kpi__trend--up   { color: var(--success-dark); background: var(--success-soft); }
.kpi__trend--down { color: var(--danger); background: var(--danger-soft); }
.kpi__trend--flat { color: var(--text-tertiary); background: var(--surface-soft); }

.kpi__trend svg { width: 11px; height: 11px; stroke-width: 2.5; }

/* ---------- Card (generic surface) ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card__head {
  padding: 16px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.card__title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
}

.card__title-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--surface-soft);
  border-radius: 999px;
  padding: 1px 9px;
}

.card__sub {
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card__link {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.card__link svg { width: 13px; height: 13px; stroke-width: 2; }

.card__link:hover { color: var(--primary-hover); }

.card__body { padding: 6px 0; }

.card__body--padded { padding: 18px 20px; }

/* ---------- Action list (Vraagt aandacht) ---------- */

.attention {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e6e9f0);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.attention__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.attention__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--warning-dark);
}

.attention__title svg { width: 17px; height: 17px; }

.attention__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.att-item {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto 16px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px 12px 0;
  background: #fff;
  border: 1px solid var(--border, #e6e9f0);
  border-radius: 11px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), transform 160ms var(--ease);
}
.att-item:hover {
  border-color: #cfd5e2;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}

/* Statuskleurige rail aan de linkerkant */
.att-item__rail { align-self: stretch; border-radius: 11px 0 0 11px; background: var(--text-faint, #94a3b8); }
.att-item__rail--warning { background: #f59e0b; }
.att-item__rail--danger  { background: #ef4444; }
.att-item__rail--info    { background: #3b82f6; }
.att-item__rail--indigo  { background: #6366f1; }
.att-item__rail--success { background: #22c55e; }
.att-item__rail--slate,
.att-item__rail--neutral { background: #94a3b8; }

.att-item__body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.att-item__title {
  font-size: 13.5px; font-weight: 600; color: var(--text, #1f2733); letter-spacing: -0.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.att-item__meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.att-item__meta .pill { font-size: 10.5px; padding: 1px 7px; flex: 0 0 auto; }
.att-item__org {
  font-size: 12px; color: var(--text-secondary, #5b6b80);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.att-item__dossier {
  flex: 0 0 auto; font-size: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-tertiary, #8a95a6); background: var(--surface-2, #f4f6fa);
  border: 1px solid var(--border-soft, #eef1f6); border-radius: 6px; padding: 1px 7px;
}

.att-item__due {
  display: inline-flex; align-items: center; gap: 5px; justify-self: end;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--warning-dark, #b45309); background: var(--warning-soft, #fef3c7);
  padding: 4px 9px; border-radius: 99px;
}
.att-item__due svg { opacity: .8; }
.att-item__due.is-critical { color: var(--danger, #dc2626); background: var(--danger-soft, #fee2e2); }

.att-item__chev { color: var(--text-muted, #b6bdc8); justify-self: center; }
.att-item:hover .att-item__chev { color: var(--text-secondary, #5b6b80); }

/* ---------- Two-column workspace grid ---------- */

.work-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 18px;
}

/* ---------- Offerte pipeline (kanban) ---------- */

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px 16px 18px;
}

.pipe-col {
  background: var(--surface-soft);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
}

.pipe-col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 6px;
}

.pipe-col__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pipe-col__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pipe-col__dot--new       { background: var(--slate); }
.pipe-col__dot--voorstel  { background: var(--indigo); }
.pipe-col__dot--akkoord   { background: var(--success); }
.pipe-col__dot--gestart   { background: var(--primary); }

.pipe-col__count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--surface);
  border-radius: 999px;
  padding: 1px 7px;
}

.pipe-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 160ms var(--ease);
}

.pipe-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.pipe-card__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.35;
}

.pipe-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-tertiary);
}

.pipe-card__meta-dot {
  width: 3px;
  height: 3px;
  background: var(--text-faint);
  border-radius: 50%;
}

.pipe-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 1px;
}

.pipe-card__amount {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.pipe-card__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 700;
  color: white;
}

.pipe-card__avatar--hk { background: linear-gradient(135deg, #34d399, #059669); }
.pipe-card__avatar--gw { background: linear-gradient(135deg, #818cf8, #4f46e5); }

.pipe-card__type {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.pipe-card__type--wvp { color: var(--primary); background: var(--primary-soft); }
.pipe-card__type--flex { color: var(--indigo); background: var(--indigo-soft); }
.pipe-card__type--ls { color: var(--warning-dark); background: var(--warning-soft); }

/* ---------- Activity feed ---------- */

.activity {
  display: flex;
  flex-direction: column;
  padding: 8px 4px 8px 0;
}

.activity__item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 11px 18px 11px 20px;
  position: relative;
}

.activity__item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 37px;
  top: 36px;
  bottom: -1px;
  width: 1px;
  background: var(--border-soft);
}

.activity__icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--text-tertiary);
  position: relative;
  z-index: 1;
}

.activity__icon svg { width: 13px; height: 13px; stroke-width: 2; }

.activity__icon--success { background: var(--success-soft); color: var(--success-dark); }
.activity__icon--primary { background: var(--primary-soft); color: var(--primary); }
.activity__icon--indigo  { background: var(--indigo-soft); color: var(--indigo); }
.activity__icon--warning { background: var(--warning-soft); color: var(--warning-dark); }

.activity__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.activity__text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.activity__text strong {
  color: var(--text);
  font-weight: 600;
}

.activity__text a {
  color: var(--primary);
  font-weight: 500;
}

.activity__meta {
  font-size: 11.5px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.activity__meta-dot { width: 3px; height: 3px; background: var(--text-faint); border-radius: 50%; }

/* ---------- Status pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.4;
  white-space: nowrap;
}

.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.pill--neutral { color: var(--slate); background: var(--slate-soft); }
.pill--info    { color: var(--primary); background: var(--primary-soft); }
.pill--success { color: var(--success-dark); background: var(--success-soft); }
.pill--warning { color: var(--warning-dark); background: var(--warning-soft); }
.pill--danger  { color: var(--danger); background: var(--danger-soft); }
.pill--indigo  { color: var(--indigo); background: var(--indigo-soft); }

/* ---------- Trajecten snapshot list ---------- */

.traj-list {
  display: flex;
  flex-direction: column;
}

.traj-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 110px 140px 28px 16px;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 140ms var(--ease);
}

.traj-row:first-child { border-top: none; }

.traj-row:hover { background: var(--surface-tint); }

.traj-row__lang {
  display: flex;
  gap: 1px;
}

.traj-row__lang-flag {
  width: 20px;
  height: 15px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface-soft);
  box-shadow: 0 0 0 1px var(--border-soft, #e8edf4);
  display: inline-grid;
  place-items: center;
  font-size: 8.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.traj-row__lang-flag .flag-img { border-radius: 0; box-shadow: none; width: 100%; height: 100%; }

/* Landvlag als kleine afbeelding (flagcdn). Vervangt tekstcodes zoals "RO". */
.flag-img {
  display: inline-block;
  width: 20px; height: 15px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .10);
  vertical-align: middle;
}
.flag-img--none { width: auto; height: auto; box-shadow: none; }

.traj-row__name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.traj-row__name-primary {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}

.traj-row__name-secondary {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.traj-row__name-secondary-dot { width: 3px; height: 3px; background: var(--text-faint); border-radius: 50%; }

.traj-row__progress {
  width: 110px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.traj-row__progress-track {
  height: 5px;
  background: var(--surface-soft);
  border-radius: 99px;
  overflow: hidden;
}

.traj-row__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--indigo));
  border-radius: inherit;
}

.traj-row__progress-label {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  justify-content: space-between;
}

.traj-row__deadline {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 92px;
}

.traj-row__deadline strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.traj-row__deadline-none {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-faint);
}

.traj-row__deadline--warning strong { color: var(--warning-dark); }
.traj-row__deadline--critical strong { color: var(--danger); }
.traj-row__deadline .pill { white-space: nowrap; }

.traj-row__ad {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 700;
  color: white;
}

.traj-row__ad--hk { background: linear-gradient(135deg, #34d399, #059669); }
.traj-row__ad--gw { background: linear-gradient(135deg, #818cf8, #4f46e5); }

.traj-row__arrow {
  color: var(--text-muted);
  display: grid;
  place-items: center;
}

/* ---------- Trajecten page (overzicht) ---------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 160ms var(--ease);
}

.chip:hover { border-color: var(--border-strong); color: var(--text); }

.chip.is-active {
  background: var(--text);
  color: white;
  border-color: var(--text);
  font-weight: 600;
}

.chip__count {
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 99px;
  opacity: 0.9;
}

.chip:not(.is-active) .chip__count {
  background: var(--surface-soft);
  color: var(--text-tertiary);
}

/* ---------- Table ---------- */

.table-wrap {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table thead th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  padding: 12px 16px;
  background: var(--surface-tint);
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}

.table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr {
  cursor: pointer;
  transition: background 120ms var(--ease);
}

.table tbody tr:hover { background: var(--surface-tint); }

.table__client {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.table__client-primary {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}

.table__client-secondary {
  font-size: 12px;
  color: var(--text-tertiary);
}

.table__lang {
  display: flex;
  gap: 2px;
}

.table__deadline {
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.table__deadline strong {
  font-weight: 600;
  color: var(--text);
}

.table__deadline-rel {
  font-size: 11.5px;
  color: var(--text-tertiary);
}

.table__deadline--warning strong { color: var(--warning-dark); }
.table__deadline--critical strong { color: var(--danger); }

/* ---------- Traject detail ---------- */

.traj-header {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.traj-header__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.traj-header__title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.traj-header__id {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.traj-header__name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.traj-header__name-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-soft, #f1f4f9);
  border: 1px solid var(--border-soft);
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  letter-spacing: 0;
}
.traj-header__name-flag em { font-style: normal; font-size: 14px; line-height: 1; }
.traj-header__name-flag .flag-img { width: 18px; height: 13px; }

.traj-header__sub {
  font-size: 13.5px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.traj-header__sub-dot { width: 3px; height: 3px; background: var(--text-faint); border-radius: 50%; }

.traj-header__actions {
  display: flex;
  gap: 8px;
}

.traj-meta {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.traj-meta__item {
  padding: 12px 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.traj-meta__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.traj-meta__value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}

.traj-meta__value-sub {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-tertiary);
}

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  gap: 4px;
  padding: 2px 4px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  margin-bottom: -1px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  border-radius: 7px;
  cursor: pointer;
  transition: all 140ms var(--ease);
  white-space: nowrap;
}

.tab svg { width: 14px; height: 14px; stroke-width: 2; }

.tab:hover { background: var(--surface-soft); color: var(--text); }

.tab.is-active {
  background: var(--text);
  color: white;
  font-weight: 600;
}

.tab__count {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-tertiary);
}

.tab.is-active .tab__count {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

/* ---------- Timeline + document layout ---------- */

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 18px;
  align-items: start;
}

/* Trajectoverzicht (Tijdlijn-tab) */
.trajov-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.trajov-doc__title { font-size: 15px; font-weight: 700; color: var(--text); }
.trajov-doc__kind { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.trajov-doc__desc { font-size: 13px; line-height: 1.55; color: var(--text-secondary); margin: 12px 0 0; }
.trajov-doc__desc strong { color: var(--text); font-weight: 600; }
.trajov-doc__actions { display: flex; gap: 8px; margin-top: 14px; }
@media (max-width: 560px) { .trajov-kpis { grid-template-columns: 1fr; } }

/* ---------- Voortgang dossier: horizontale stepper ---------- */

.case-steps {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 16px 20px 18px;
}

.case-steps__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.case-steps__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.case-steps__status { display: flex; align-items: center; gap: 8px; }

.case-steps__track {
  display: flex;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-step {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 7px;
}

/* Verbindingslijn tussen de bolletjes; kleurt mee tot de huidige fase. */
.case-step + .case-step::before {
  content: '';
  position: absolute;
  top: 9px;
  left: calc(-50% + 16px);
  width: calc(100% - 32px);
  height: 2px;
  border-radius: 99px;
  background: var(--border, #e2e8f0);
}
.case-step.is-done + .case-step.is-done::before,
.case-step.is-done + .case-step.is-current::before {
  background: var(--primary, #2563eb);
}

.case-step__node {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface, #fff);
  border: 2px solid var(--border, #d7dee8);
  color: #fff;
}
.case-step.is-done .case-step__node {
  background: var(--primary, #2563eb);
  border-color: var(--primary, #2563eb);
}
.case-step.is-current .case-step__node {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary, #2563eb) 14%, transparent);
}
.case-step.is-current .case-step__node::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary, #2563eb);
}

.case-step__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary, #8a95a6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 0 4px;
}
.case-step.is-done .case-step__label { color: var(--text-secondary, #475569); }
.case-step.is-current .case-step__label { color: var(--text, #0f172a); font-weight: 700; }

.case-step__meta {
  font-size: 11px;
  color: var(--text-tertiary, #94a3b8);
  margin-top: -3px;
}

.case-steps__note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft, #eef1f6);
  font-size: 12.5px;
  color: var(--text-secondary, #475569);
}

@media (max-width: 640px) {
  .case-steps__track { flex-wrap: wrap; gap: 10px 0; }
  .case-step { flex: 1 1 33%; }
  .case-step + .case-step::before { display: none; }
}

/* ---------- Document preview NL/PL ---------- */

.docpreview {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.docpreview__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.docpreview__lead {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.55;
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
}

.docpreview__lead strong { color: var(--primary); font-weight: 600; }

.docform-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  background: var(--primary-soft);
  border: 1px solid var(--border-soft);
  padding: 12px 14px;
  border-radius: 10px;
}

.docform-note svg { color: var(--primary); flex: 0 0 auto; margin-top: 1px; }
.docform-note strong { color: var(--text-primary); font-weight: 600; }

.docpreview__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.docpane {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.docpane__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-tint);
  border-bottom: 1px solid var(--border-soft);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.docpane__flag {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.02em;
}

.docpane__flag--nl { background: linear-gradient(180deg, #ae1c28 0%, #ae1c28 33%, #ffffff 33%, #ffffff 66%, #21468b 66%, #21468b 100%); color: transparent; }
.docpane__flag--pl { background: linear-gradient(180deg, #ffffff 0%, #ffffff 50%, #dc143c 50%, #dc143c 100%); color: transparent; }
.docpane__flag--ro { background: linear-gradient(90deg, #002b7f 0%, #002b7f 33%, #fcd116 33%, #fcd116 66%, #ce1126 66%, #ce1126 100%); color: transparent; }
.docpane__flag--de { background: linear-gradient(180deg, #000000 0%, #000000 33%, #dd0000 33%, #dd0000 66%, #ffce00 66%, #ffce00 100%); color: transparent; }

.docpane__status {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: auto;
}

.docpane__status--draft { background: var(--surface-soft); color: var(--text-tertiary); }
.docpane__status--ready { background: var(--success-soft); color: var(--success-dark); }

.docpane__body {
  padding: 16px 18px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  min-height: 240px;
  font-family: ui-serif, Georgia, 'Times New Roman', serif;
  background: white;
}

.docpane__body h6 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}

.docpane__body p {
  margin-bottom: 10px;
}

.docpane__body p:last-child { margin-bottom: 0; }

.docpane__body em {
  background: var(--warning-soft);
  font-style: normal;
  padding: 0 2px;
  color: var(--warning-dark);
  font-weight: 500;
}

/* ---------- Stakeholders rail ---------- */

.stakers {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stakers__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stakers__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.staker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.staker:last-child { border-bottom: none; padding-bottom: 0; }

.staker__role {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.staker__person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.staker__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #94a3b8, #64748b);
  flex-shrink: 0;
}

.staker__person-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.staker__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staker__org {
  font-size: 11.5px;
  color: var(--text-tertiary);
}

.staker__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-tertiary);
}

.staker__lang {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.staker__lang-flag {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .10);
}

.staker__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.staker__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.staker__status-dot--green { background: var(--success); }
.staker__status-dot--amber { background: var(--warning); }
.staker__status-dot--grey  { background: var(--text-muted); }

/* ---------- Compliance strip ---------- */

.compliance {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.compliance__item {
  background: var(--surface);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.compliance__icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.compliance__icon--ok { background: var(--success-soft); color: var(--success-dark); }
.compliance__icon--pending { background: var(--surface-soft); color: var(--text-tertiary); }

.compliance__icon svg { width: 14px; height: 14px; stroke-width: 2.2; }

.compliance__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.compliance__label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}

.compliance__sub {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* =============================================================
   Offertes ? full pipeline view
   ============================================================= */

.pipeline-full {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.pipeline-full .pipe-col { min-height: 480px; }

.offer-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 160ms var(--ease);
}

.offer-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.offer-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.offer-card__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.35;
}

.offer-card__id {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.offer-card__body {
  font-size: 12.5px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.offer-card__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.offer-card__row svg { width: 13px; height: 13px; stroke-width: 1.8; }

.offer-card__amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
}

.offer-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 9px;
  border-top: 1px solid var(--border-soft);
}

.offer-card__age {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.offer-card__age--warn { color: var(--warning-dark); }
.offer-card__age--crit { color: var(--danger); }

/* =============================================================
   CRM ? contact cards
   ============================================================= */

.crm-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  width: fit-content;
}

.crm-tab {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  border-radius: 7px;
  cursor: pointer;
  transition: all 140ms var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.crm-tab:hover { background: var(--surface-soft); color: var(--text); }

.crm-tab.is-active {
  background: var(--text);
  color: white;
  font-weight: 600;
}

.crm-tab__count {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--surface-soft);
  color: var(--text-tertiary);
}

.crm-tab.is-active .crm-tab__count {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.crm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.contact {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all 200ms var(--ease);
}

.contact:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.contact__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.contact__avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  flex-shrink: 0;
}

.contact__avatar--client { background: linear-gradient(135deg, #2563eb, #1e40af); }
.contact__avatar--person { background: linear-gradient(135deg, #6366f1, #4338ca); }
.contact__avatar--worker { background: linear-gradient(135deg, #dc2626, #b91c1c); border-radius: 50%; }

.contact__body { flex: 1; min-width: 0; }

.contact__name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  margin-bottom: 2px;
}

.contact__sub {
  font-size: 12.5px;
  color: var(--text-tertiary);
}

.contact__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.contact__meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact__meta-row svg { width: 13px; height: 13px; color: var(--text-tertiary); stroke-width: 1.8; }

.contact__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--text-tertiary);
}

.contact__chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.contact__chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.contact__chip--news { background: var(--accent-soft, var(--success-soft)); color: var(--success-dark); }
.contact__chip--blog { background: var(--indigo-soft); color: var(--indigo); }

/* =============================================================
   Documenten ? template library
   ============================================================= */

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.doc-tile {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all 200ms var(--ease);
  position: relative;
}

.doc-tile:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.doc-tile__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.doc-tile__icon {
  width: 40px;
  height: 50px;
  border-radius: 6px;
  background: linear-gradient(180deg, #fafbfd 0%, #eef2f7 100%);
  border: 1px solid var(--border);
  position: relative;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.doc-tile__icon::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 8px 8px 0;
  border-color: transparent var(--border) transparent transparent;
}

.doc-tile__icon--ado { background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%); border-color: #bfdbfe; color: var(--primary); }
.doc-tile__icon--addendum { background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%); border-color: #c7d2fe; color: var(--indigo); }
.doc-tile__icon--vraag { background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%); border-color: #fde68a; color: var(--warning-dark); }
.doc-tile__icon--brief { background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%); border-color: #bbf7d0; color: var(--success-dark); }

.doc-tile__menu {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  transition: all 140ms var(--ease);
}

.doc-tile__menu:hover { background: var(--surface-soft); color: var(--text); }

.doc-tile__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.35;
}

.doc-tile__sub {
  font-size: 12.5px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.doc-tile__langs {
  display: flex;
  gap: 3px;
  margin-top: 2px;
}

.doc-tile__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  font-size: 11.5px;
  color: var(--text-tertiary);
}

.doc-tile__version {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.doc-tile__version-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

/* =============================================================
   Statistieken ? charts (pure CSS)
   ============================================================= */

.stats-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 220px;
  padding: 12px 4px 4px;
  border-bottom: 1px dashed var(--border);
}

.bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bar__stack {
  width: 100%;
  max-width: 38px;
  display: flex;
  flex-direction: column;
  background: var(--surface-soft);
  border-radius: 6px 6px 0 0;
  overflow: hidden;
}

.bar__seg {
  width: 100%;
}

.bar__seg--wvp { background: var(--primary); }
.bar__seg--flex { background: var(--indigo); }
.bar__seg--ls { background: var(--warning); }

.bar__label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.chart-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
  padding: 16px 0 4px;
}

.chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.donut {
  width: 200px;
  height: 200px;
  margin: 8px auto;
  position: relative;
}

.donut__ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  -webkit-mask: radial-gradient(circle, transparent 56%, #000 57%);
  mask: radial-gradient(circle, transparent 56%, #000 57%);
}

.donut__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  flex-direction: column;
  text-align: center;
}

.donut__center-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.donut__center-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.h-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.h-bar {
  display: grid;
  grid-template-columns: 100px 1fr 50px;
  gap: 12px;
  align-items: center;
}

.h-bar__label {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.h-bar__track {
  height: 8px;
  background: var(--surface-soft);
  border-radius: 99px;
  overflow: hidden;
}

.h-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--indigo));
  border-radius: inherit;
}

.h-bar__val {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.sparkline {
  display: inline-block;
}

/* =============================================================
   Audit log ? denser timeline
   ============================================================= */

.audit-log {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.audit-row {
  display: grid;
  grid-template-columns: 90px 32px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
  transition: background 120ms var(--ease);
}

.audit-row:first-child { border-top: none; }

.audit-row:hover { background: var(--surface-tint); }

.audit-row__time {
  font-size: 11.5px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.audit-row__time-rel {
  font-weight: 600;
  color: var(--text-secondary);
}

.audit-row__icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--text-tertiary);
}

.audit-row__icon svg { width: 13px; height: 13px; stroke-width: 2; }

.audit-row__icon--success { background: var(--success-soft); color: var(--success-dark); }
.audit-row__icon--primary { background: var(--primary-soft); color: var(--primary); }
.audit-row__icon--indigo  { background: var(--indigo-soft); color: var(--indigo); }
.audit-row__icon--warning { background: var(--warning-soft); color: var(--warning-dark); }
.audit-row__icon--danger  { background: var(--danger-soft); color: var(--danger); }

.audit-row__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.audit-row__action {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

.audit-row__action strong { font-weight: 600; }

.audit-row__action a { color: var(--primary); font-weight: 500; }

.audit-row__ctx {
  font-size: 11.5px;
  color: var(--text-tertiary);
}

.audit-row__user {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.audit-row__user-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 700;
  color: white;
  display: grid;
  place-items: center;
}

.audit-row__user-avatar--hk { background: linear-gradient(135deg, #34d399, #059669); }
.audit-row__user-avatar--gw { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.audit-row__user-avatar--sys { background: linear-gradient(135deg, #94a3b8, #64748b); }
.audit-row__user-avatar--ext { background: linear-gradient(135deg, #fb923c, #ea580c); }

.audit-row__ip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  color: var(--text-tertiary);
  background: var(--surface-soft);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Retention dashboard */
.retention-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.retention-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.retention-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.retention-card__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.retention-card__sub {
  font-size: 11.5px;
  color: var(--text-tertiary);
}

.retention-card__date {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--warning-dark);
  background: var(--warning-soft);
  padding: 3px 9px;
  border-radius: 5px;
}

.retention-card__date--critical { color: var(--danger); background: var(--danger-soft); }

.retention-card__actions {
  display: flex;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}

/* =============================================================
   Settings ? two-pane layout
   ============================================================= */

.settings-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: start;
}

.settings-nav {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: calc(var(--top-h) + 24px);
}

.settings-nav__link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 140ms var(--ease);
}

.settings-nav__link svg { width: 15px; height: 15px; stroke-width: 1.8; opacity: 0.75; }

.settings-nav__link:hover { background: var(--surface-soft); color: var(--text); }

.settings-nav__link.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.settings-nav__link.is-active svg { opacity: 1; }

.settings-pane {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-block {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}

.settings-block__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.settings-block__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}

.settings-block__sub {
  font-size: 12.5px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
}

.settings-row:first-of-type { border-top: none; padding-top: 6px; }

.settings-row__label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.settings-row__hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.toggle {
  width: 40px;
  height: 22px;
  background: var(--border-strong);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  transition: background 200ms var(--ease);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 200ms var(--ease);
}

.toggle.is-on { background: var(--success); }
.toggle.is-on::after { transform: translateX(18px); }

.input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: all 160ms var(--ease);
  width: 280px;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

/* =============================================================
   Login screen
   ============================================================= */

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  background: var(--bg);
}

.login__panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  background: var(--surface);
}

.login__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login__brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: white;
  letter-spacing: -0.02em;
  position: relative;
}

.login__brand-mark::after {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--success);
  border-radius: 50%;
  top: -1px;
  right: -1px;
  border: 2px solid var(--surface);
}

.login__brand-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.login__form {
  max-width: 380px;
  width: 100%;
  margin: auto 0;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.login__heading {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 4px;
}

.login__lead {
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1.55;
}

.login__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login__field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.login__field-input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  font-size: 14px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: all 160ms var(--ease);
}

.login__field-input:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

.login__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.login__check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  cursor: pointer;
}

.login__check input { accent-color: var(--primary); }

.login__link {
  color: var(--primary);
  font-weight: 500;
}

.login__submit {
  height: 48px;
  background: var(--text);
  color: white;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 160ms var(--ease);
  cursor: pointer;
  border: 0;
}

.login__submit:hover { background: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.login__sso {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-tertiary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.login__sso::before, .login__sso::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login__2fa {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.login__2fa-cell {
  width: 52px;
  height: 56px;
  font-size: 20px;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 600;
  color: var(--text);
  outline: none;
  transition: all 140ms var(--ease);
  font-family: inherit;
}

.login__2fa-cell:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

.login__2fa-cell.has-value {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.login__foot {
  font-size: 12.5px;
  color: var(--text-tertiary);
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.login__art {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(ellipse 80% 60% at 80% 70%, rgba(37, 99, 235, 0.16), transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(16, 185, 129, 0.12), transparent 60%),
    linear-gradient(135deg, #0b1220 0%, #111a2f 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px;
  color: #cbd5e1;
  position: relative;
  overflow: hidden;
}

.login__art::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: -1px -1px;
  pointer-events: none;
}

.login__quote {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.login__quote-text {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #f1f5f9;
  margin-bottom: 16px;
}

.login__quote-cite {
  font-size: 13px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 10px;
}

.login__quote-cite-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #059669);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.login__badges {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.login__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
  backdrop-filter: blur(8px);
}

.login__badge svg { width: 14px; height: 14px; color: #34d399; stroke-width: 2.2; }

/* =============================================================
   Block ? generic section container (card with header)
   ============================================================= */

.block {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.block + .block { margin-top: 18px; }

.block__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.block__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 3px;
}

.block__sub {
  font-size: 12.5px;
  color: var(--text-tertiary);
  line-height: 1.55;
  max-width: 620px;
}

/* =============================================================
   Modal ? overlay + centered card
   ============================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease);
}

/* ---------- Bevestigingsdialoog ---------- */
.confirm-ov {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity 160ms var(--ease);
}
.confirm-ov.is-open { opacity: 1; pointer-events: auto; }
.confirm-box {
  background: var(--surface); border-radius: 16px; width: 100%; max-width: 400px;
  padding: 26px 26px 20px; text-align: center;
  box-shadow: 0 24px 64px -12px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(15, 23, 42, 0.05);
  transform: scale(0.95) translateY(8px); transition: transform 200ms var(--ease);
}
.confirm-ov.is-open .confirm-box { transform: scale(1) translateY(0); }
.confirm-box__icon {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center;
  color: var(--danger, #dc2626); background: var(--danger-soft, #fef2f2);
}
.confirm-box__title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.confirm-box__msg { font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); margin-bottom: 22px; }
.confirm-box__actions { display: flex; gap: 10px; }
.confirm-box__actions .btn { flex: 1; justify-content: center; }

.btn--danger {
  background: var(--danger, #dc2626); color: #fff; border: 1px solid var(--danger, #dc2626);
}
.btn--danger:hover { background: var(--danger-dark, #b91c1c); border-color: var(--danger-dark, #b91c1c); }

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 24px 64px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.05);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  transform: scale(0.96) translateY(8px);
  transition: transform 220ms var(--ease);
  overflow: hidden;
}

.modal--md { max-width: 640px; }
.modal--lg { max-width: 780px; }

.modal-overlay.is-open .modal { transform: scale(1) translateY(0); }

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 4px;
}

.modal__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.35;
}

.modal__sub {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
  line-height: 1.5;
}

.modal__close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 140ms var(--ease);
}

.modal__close:hover { background: var(--surface-soft); color: var(--text); }

.modal__close svg { width: 16px; height: 16px; stroke-width: 2; }

.modal__body {
  padding: 16px 24px 8px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}

.modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal__field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.modal__field-hint {
  font-size: 11.5px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.modal__field-input,
.modal__field-select,
.modal__field-textarea {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: all 160ms var(--ease);
  width: 100%;
}

.modal__field-textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  line-height: 1.55;
  resize: vertical;
}

.modal__field-input:focus,
.modal__field-select:focus,
.modal__field-textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

.modal__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal__chiplist {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.modal__chip {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 140ms var(--ease);
}

.modal__chip:hover { background: var(--surface-soft); }
.modal__chip.is-selected { background: var(--primary-soft); border-color: rgba(37, 99, 235, 0.25); color: var(--primary); font-weight: 600; }

.modal__warn {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: var(--warning-soft);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--warning-dark);
  line-height: 1.55;
}

.modal__warn svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; stroke-width: 2; }

.modal__warn--danger {
  background: var(--danger-soft);
  border-color: rgba(220, 38, 38, 0.16);
  color: var(--danger);
}

.modal__btn-danger {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--danger);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  transition: all 160ms var(--ease);
}

.modal__btn-danger:hover { background: #b91c1c; }

/* =============================================================
   Dropdown / popover
   ============================================================= */

.dropdown {
  position: absolute;
  z-index: 900;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms var(--ease), transform 140ms var(--ease);
}

.dropdown.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown__item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms var(--ease);
  text-align: left;
  background: transparent;
  border: 0;
  width: 100%;
  font-family: inherit;
}

.dropdown__item:hover { background: var(--surface-soft); color: var(--text); }

.dropdown__item svg { width: 14px; height: 14px; color: var(--text-tertiary); stroke-width: 1.8; }

.dropdown__item--danger { color: var(--danger); }
.dropdown__item--danger svg { color: var(--danger); }
.dropdown__item--danger:hover { background: var(--danger-soft); color: var(--danger); }

.dropdown__sep {
  height: 1px;
  background: var(--border-soft);
  margin: 4px 2px;
}

.dropdown__label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 8px 10px 4px;
}

/* (De meldingen-styling staat verderop in het definitieve
   "Meldingen (bell + dropdown)"-blok.) */

/* =============================================================
   Command palette (Ctrl+K)
   ============================================================= */

.cmdk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  display: grid;
  place-items: start center;
  padding: 100px 24px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms var(--ease);
}

.cmdk-overlay.is-open { opacity: 1; pointer-events: auto; }

.cmdk {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 24px 64px -12px rgba(15, 23, 42, 0.4);
  width: 100%;
  max-width: 600px;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.97) translateY(-4px);
  transition: transform 200ms var(--ease);
}

.cmdk-overlay.is-open .cmdk { transform: scale(1) translateY(0); }

.cmdk__input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
}

.cmdk__input-wrap svg { width: 18px; height: 18px; color: var(--text-tertiary); stroke-width: 2; }

.cmdk__input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15.5px;
  color: var(--text);
  font-family: inherit;
  letter-spacing: -0.005em;
}

.cmdk__input::placeholder { color: var(--text-muted); }

.cmdk__hint {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  gap: 4px;
}

.cmdk__hint kbd {
  font-size: 10px;
  padding: 2px 5px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-weight: 600;
  color: var(--text-secondary);
}

.cmdk__list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.cmdk__group-label {
  padding: 8px 22px 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.cmdk__item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  padding: 9px 22px;
  cursor: pointer;
  align-items: center;
  transition: background 100ms var(--ease);
}

.cmdk__item:hover,
.cmdk__item.is-focused {
  background: var(--primary-soft);
}

.cmdk__item-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text-tertiary);
  display: grid;
  place-items: center;
}

.cmdk__item-icon svg { width: 13px; height: 13px; stroke-width: 2; }

.cmdk__item-body {
  font-size: 13.5px;
  color: var(--text);
  letter-spacing: -0.005em;
}

.cmdk__item-sub {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 1px;
}

.cmdk__item-kbd {
  font-size: 10.5px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.cmdk__foot {
  display: flex;
  justify-content: space-between;
  padding: 10px 22px;
  border-top: 1px solid var(--border-soft);
  font-size: 11.5px;
  color: var(--text-tertiary);
}

.cmdk__foot-keys {
  display: flex;
  gap: 14px;
}

.cmdk__foot-key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* =============================================================
   Tab panes (show/hide content blocks)
   ============================================================= */

.tab-pane { display: none; }
.tab-pane.is-active { display: block; }

/* Hidden by filter chip ? works on offer-card, contact, traj-row, audit-row */
.is-filtered-out {
  display: none !important;
}

/* =============================================================
   Toast notifications (auto-dismiss confirmations)
   ============================================================= */

.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1200;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--text);
  color: white;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  min-width: 280px;
  max-width: 380px;
  pointer-events: auto;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 220ms var(--ease), opacity 220ms var(--ease);
}

.toast.is-shown { transform: translateY(0); opacity: 1; }

.toast svg { width: 16px; height: 16px; stroke-width: 2; color: #34d399; flex-shrink: 0; }

.toast--error svg { color: #f87171; }

/* =============================================================
   Generic badge ? small key/value tag for inline labels
   ============================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid var(--border-soft);
  white-space: nowrap;
}

.badge svg { width: 12px; height: 12px; stroke-width: 2.2; }

.badge--green {
  background: var(--success-soft);
  color: var(--success-dark);
  border-color: rgba(16, 185, 129, 0.18);
}

/* =============================================================
   Page header helper
   ============================================================= */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.page-head__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 4px;
}

.page-head__sub {
  font-size: 13.5px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-head__actions {
  display: flex;
  gap: 8px;
}

.mail-row { transition: background 120ms; }
.mail-row:hover { background: var(--surface-soft); }
.mail-row:hover .link { color: var(--primary); }

/* =============================================================
   Tweede-spoorproces (gedeelde documentenlaag)
   ============================================================= */

.spoor { padding: 0; overflow: hidden; }

.spoor__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px 16px;
}

.spoor__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.spoor__intro {
  margin: 5px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 64ch;
}

.spoor__progress { text-align: right; flex-shrink: 0; }

.spoor__progress-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.spoor__progress-label {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.spoor__bar {
  height: 4px;
  background: var(--surface-soft);
  margin: 0 24px;
  border-radius: 99px;
  overflow: hidden;
}

.spoor__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-hover, var(--primary)));
  border-radius: 99px;
  transition: width 400ms var(--ease);
}

.spoor__steps {
  list-style: none;
  margin: 12px 0 6px;
  padding: 0;
}

.spoor__step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 24px;
  border-top: 1px solid var(--border-soft);
  position: relative;
}

.spoor__step:first-child { border-top: none; }

.spoor__step-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  margin-top: 1px;
}

.spoor__step-marker svg { width: 15px; height: 15px; }
.spoor__step-nr { font-size: 12px; font-weight: 700; }
.spoor__step-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.spoor__step--definitief .spoor__step-marker {
  background: var(--success-soft, #ecfdf5);
  color: var(--success-dark, #047857);
  border-color: transparent;
}
.spoor__step--concept .spoor__step-marker {
  background: var(--warning-soft, #fffbeb);
  color: var(--warning-dark, #b45309);
  border-color: transparent;
}
.spoor__step--gereed .spoor__step-marker {
  background: var(--primary-soft, #eef2ff);
  color: var(--primary);
  border-color: transparent;
}
.spoor__step--wacht-op-sjabloon { opacity: 0.72; }

.spoor__step-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.spoor__step-title { font-size: 13.5px; font-weight: 600; color: var(--text); }

.spoor__step-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  background: var(--surface-soft);
  padding: 2px 7px;
  border-radius: 5px;
}

.spoor__step-desc {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.spoor__step-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.spoor__step-meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-faint, var(--text-tertiary));
}

.spoor__step-action {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 84px;
  justify-content: flex-end;
  margin-top: 1px;
}

.spoor__step-preview {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-decoration: none;
  white-space: nowrap;
}
.spoor__step-preview:hover { color: var(--brand, var(--text-primary)); text-decoration: underline; }

.spoor__step-hint {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-faint, var(--text-tertiary));
}

@media (max-width: 720px) {
  .spoor__head { flex-direction: column; gap: 10px; }
  .spoor__progress { text-align: left; }
  .spoor__step { grid-template-columns: 28px minmax(0, 1fr); }
  .spoor__step-action { grid-column: 2; justify-content: flex-start; margin-top: 8px; }
}

/* =============================================================
   Responsiveness
   ============================================================= */

@media (max-width: 1280px) {
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipeline-full { grid-template-columns: repeat(3, 1fr); }
  .work-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .traj-meta { grid-template-columns: repeat(2, 1fr); }
  .compliance { grid-template-columns: repeat(2, 1fr); }
  .crm-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: 1fr; }
  .settings-shell { grid-template-columns: 1fr; }
  .retention-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .login { grid-template-columns: 1fr; }
  .login__art { display: none; }
  .crm-grid { grid-template-columns: 1fr; }
  .doc-grid { grid-template-columns: 1fr; }
  .retention-grid { grid-template-columns: 1fr; }
  .pipeline-full { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --side-w: 0; }
  /* Zonder zichtbare sidebar wordt .main het eerste grid-kind; het grid moet
     dan ??n volle kolom hebben, anders belandt de hele app in de 0px-kolom. */
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .canvas { padding: 20px 18px 56px; }
  .top { padding: 0 18px; }
  .top__back-label { display: none; }
  .top__back { padding: 0 9px; }
}

/* ===================== Upload: dropzone ===================== */
.dropzone {
  display: block;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg, 14px);
  background: var(--surface-soft, #f8fafc);
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.dropzone:hover { border-color: var(--primary, #2563eb); background: var(--primary-soft, #eef2ff); }
.dropzone.is-drag {
  border-color: var(--primary, #2563eb);
  background: var(--primary-soft, #eef2ff);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.dropzone__idle { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-secondary); }
.dropzone__idle svg { color: var(--primary, #2563eb); }
.dropzone__title { font-size: 14px; color: var(--text); line-height: 1.4; }
.dropzone__link { color: var(--primary, #2563eb); font-weight: 600; text-decoration: underline; }
.dropzone__hint { font-size: 12px; color: var(--text-tertiary, #94a3b8); }
.dropzone__idle[hidden], .dropzone__chosen[hidden] { display: none; }
.dropzone__chosen {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.dropzone__chosen svg { color: var(--primary, #2563eb); flex-shrink: 0; }
.dropzone__fname { font-weight: 600; color: var(--text); font-size: 14px; word-break: break-all; }
.dropzone__fsize { font-size: 12px; color: var(--text-tertiary, #94a3b8); margin-top: 2px; }
.dropzone__clear {
  margin-left: auto; flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  color: var(--text-tertiary, #94a3b8); padding: 4px; border-radius: 6px;
  display: inline-flex; align-items: center;
}
.dropzone__clear:hover { background: var(--surface-soft, #f1f5f9); color: var(--text); }

/* ===================== Upload: viewer ===================== */
.upload-viewer {
  display: block; width: 100%; height: 72vh; min-height: 480px;
  border: 0; border-radius: 0 0 var(--radius-lg, 14px) var(--radius-lg, 14px);
  background: #f1f5f9;
}
.upload-viewer--img {
  height: auto; min-height: 0; padding: 24px; text-align: center;
  background: #f1f5f9;
}
.upload-viewer--img img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,.08)); }
.upload-fallback {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 48px 24px; text-align: center; color: var(--text-secondary);
}
.upload-fallback svg { color: var(--text-tertiary, #94a3b8); }
.upload-fallback__title { font-weight: 600; color: var(--text); font-size: 15px; word-break: break-all; }
.upload-fallback__sub { font-size: 13px; color: var(--text-tertiary, #94a3b8); margin-bottom: 6px; }

/* ===================== Beheer: gebruikers ===================== */
.ustat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.ustat__card {
  background: var(--surface, #fff); border: 1px solid var(--border); border-radius: var(--radius-lg, 14px);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 2px;
}
.ustat__num { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.1; }
.ustat__label { font-size: 12.5px; color: var(--text-tertiary, #94a3b8); }
.uavatar {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px;
  background: var(--primary-soft, #eef2ff); color: var(--primary, #2563eb);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.uform { display: flex; flex-direction: column; gap: 18px; }
.uform__toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.uform__toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary, #2563eb); }
.uform__sec {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0; flex-wrap: wrap;
}
.uform__sec:first-child { padding-top: 4px; }
@media (max-width: 720px) {
  .ustat { grid-template-columns: 1fr; }
  .uform__sec { align-items: stretch; }
}

/* ===================== Beheer: rollen & rechten ===================== */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.role-card {
  background: var(--surface, #fff); border: 1px solid var(--border); border-radius: var(--radius-lg, 14px);
  padding: 18px; display: flex; flex-direction: column; gap: 16px;
}
.role-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.role-card__name { font-weight: 700; font-size: 15px; color: var(--text); }
.role-card__slug {
  font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--text-tertiary, #94a3b8);
  background: var(--surface-soft, #f1f5f9); padding: 1px 7px; border-radius: 6px; display: inline-block; margin-top: 4px;
}
.role-card__stats { display: flex; gap: 22px; }
.role-card__stats > div { display: flex; flex-direction: column; }
.role-card__num { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.1; }
.role-card__lbl { font-size: 11.5px; color: var(--text-tertiary, #94a3b8); }
.role-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }

.rolenote {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px;
  background: var(--primary-soft, #eef2ff); border: 1px solid rgba(37, 99, 235, .2);
  border-radius: 12px; padding: 14px 16px; color: var(--text-secondary); font-size: 13.5px; line-height: 1.5;
}
.rolenote svg { color: var(--primary, #2563eb); flex-shrink: 0; margin-top: 1px; }

.perm-list { display: flex; flex-direction: column; gap: 8px; }
.perm {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 1px solid var(--border-soft, #eef1f5); border-radius: 10px; padding: 12px 14px;
  cursor: pointer; transition: border-color .14s ease, background .14s ease;
}
.perm:hover { border-color: var(--border-strong, #cbd5e1); }
.perm.is-on { border-color: rgba(37, 99, 235, .28); background: var(--primary-soft, #eef2ff); }
.perm__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.perm__name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.perm__key { font-family: ui-monospace, monospace; font-size: 11px; color: var(--text-tertiary, #94a3b8); }

/* Switch (toggle) */
.switch { position: relative; flex: 0 0 auto; width: 42px; height: 24px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__slider {
  position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong, #cbd5e1);
  transition: background .16s ease; pointer-events: none;
}
.switch__slider::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: transform .16s ease; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .switch__slider { background: var(--primary, #2563eb); }
.switch input:checked + .switch__slider::before { transform: translateX(18px); }
.switch input:disabled + .switch__slider { opacity: .65; }
.switch input:disabled { cursor: default; }

.role-save-bar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 16px; margin-top: 4px;
  background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-md, 0 6px 18px rgba(0,0,0,.06));
}
@media (max-width: 720px) { .role-grid { grid-template-columns: 1fr; } }

/* ============ Team & toegang (trajecten) ============ */
.linklike {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 11.5px;
  color: var(--brand, #4f46e5); text-decoration: none;
}
.linklike:hover { text-decoration: underline; }

.team-avatars { display: inline-flex; align-items: center; }
.team-avatars__a, .team-avatars__more {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-left: -6px; border-radius: 50%;
  background: var(--surface-soft, #eef1f6); color: var(--text-secondary, #4b5563);
  border: 2px solid var(--surface, #fff);
  font-size: 9.5px; font-weight: 700; letter-spacing: .02em;
}
.team-avatars__a:first-child { margin-left: 0; }
.team-avatars__more { background: var(--brand, #4f46e5); color: #fff; }

/* ============ Acties: volgende-stap banner ============ */
.next-step {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; margin-bottom: 18px;
  border-radius: 12px; border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong, #cbd5e1);
  background: var(--surface, #fff);
}
.next-step__body { flex: 1; min-width: 0; }
.next-step__eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .01em; color: var(--text-tertiary); }
.next-step__title { font-size: 15px; font-weight: 700; color: var(--text); margin-top: 2px; }
.next-step__desc { font-size: 13px; color: var(--text-secondary); margin: 3px 0 0; }
.next-step__cta { flex: 0 0 auto; white-space: nowrap; }
.next-step--indigo  { border-left-color: var(--primary, #4f46e5); }
.next-step--warning { border-left-color: var(--warning, #d97706); }
.next-step--success { border-left-color: var(--success, #16a34a); }
.next-step--danger  { border-left-color: var(--danger, #dc2626); }
@media (max-width: 640px) { .next-step { flex-direction: column; align-items: flex-start; } .next-step__cta { width: 100%; justify-content: center; } }

/* Verstuurde-lijst + kopieerknoppen */
.sent-list { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.sent-list__title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-tertiary); }
.token-card__meta { display: flex; gap: 8px; align-items: center; margin: 6px 0 8px; flex-wrap: wrap; font-size: 11.5px; }
.token-card__actions { display: flex; gap: 8px; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border-strong, var(--border)); background: var(--surface, #fff);
  color: var(--text-secondary); font-size: 12px; font-weight: 600; text-decoration: none;
  transition: border-color .12s, color .12s, background .12s;
}
.copy-btn:hover { border-color: var(--primary, #4f46e5); color: var(--primary, #4f46e5); }
.copy-btn--primary { background: var(--primary, #4f46e5); border-color: var(--primary, #4f46e5); color: #fff; }
.copy-btn--primary:hover { background: var(--primary-dark, #4338ca); border-color: var(--primary-dark, #4338ca); color: #fff; }
.copy-btn.is-copied { border-color: var(--success, #16a34a); color: var(--success-dark, #15803d); background: color-mix(in srgb, var(--success, #16a34a) 8%, transparent); }

/* Danger zone (bewaartermijn & verwijderen) */
.danger-zone {
  margin-top: 18px; padding: 16px 18px; border-radius: 14px;
  border: 1px dashed var(--border-strong, var(--border)); background: var(--surface-soft, #f8fafc);
}
.danger-zone.is-active { border-style: solid; border-color: color-mix(in srgb, var(--danger, #dc2626) 45%, var(--border)); background: color-mix(in srgb, var(--danger, #dc2626) 6%, var(--surface)); }
.danger-zone__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.danger-zone__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--text); }
.danger-zone.is-active .danger-zone__title { color: var(--danger, #dc2626); }
.danger-zone__text { font-size: 13px; color: var(--text-secondary); margin: 10px 0 12px; line-height: 1.5; }

/* AD-kolom met snelle "+"-toewijzing in de trajectenlijst */
.ad-cell { display: inline-flex; align-items: center; gap: 6px; }

/* Overlappende initialen-rondjes van toegewezen mensen */
.ad-stack { display: inline-flex; align-items: center; }
.ad-stack__a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-left: -9px; border-radius: 50%;
  background: var(--surface-soft, #eef1f6); color: var(--text-secondary, #4b5563);
  border: 2px solid var(--surface, #fff);
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
}
.ad-stack__a:first-child { margin-left: 0; }
.ad-stack__a--more { background: var(--brand, #4f46e5); color: #fff; }

.ad-add {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px dashed var(--border); background: var(--surface, #fff);
  color: var(--text-tertiary); cursor: pointer; padding: 0;
  transition: border-color .12s, color .12s, background .12s;
}
.ad-add:hover { border-color: var(--brand, #4f46e5); color: var(--brand, #4f46e5); border-style: solid; }

.assign-list { display: flex; flex-direction: column; gap: 8px; }
.assign-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s;
}
.assign-row:hover { border-color: var(--brand-soft, #c7d2fe); background: var(--surface-soft, #f8fafc); }
.assign-row.is-on { border-color: var(--brand, #4f46e5); background: color-mix(in srgb, var(--brand, #4f46e5) 6%, transparent); }
.assign-row input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.assign-row__avatar {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-soft, #eef1f6); color: var(--text-secondary, #4b5563);
  font-size: 12px; font-weight: 700;
}
.assign-row.is-on .assign-row__avatar { background: var(--brand, #4f46e5); color: #fff; }
.assign-row__info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.assign-row__name { font-weight: 600; font-size: 13.5px; color: var(--text-primary); }
.assign-row__resp {
  margin-left: 6px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--brand, #4f46e5);
}
.assign-row__role { font-size: 12px; color: var(--text-tertiary); }
.assign-row__check {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--border); color: transparent; transition: all .12s;
}
.assign-row__check svg { width: 13px; height: 13px; }
.assign-row.is-on .assign-row__check { background: var(--brand, #4f46e5); border-color: var(--brand, #4f46e5); color: #fff; }

/* ============================================================
   E-mail composer (opstellen + live preview)
   ============================================================ */
.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) { .composer { grid-template-columns: 1fr; } }

.composer__edit { padding: 0; overflow: hidden; }
.composer__section { padding: 18px 20px; border-bottom: 1px solid var(--border-soft, #eef1f6); }
.composer__section:last-of-type { border-bottom: none; }
.composer__section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-tertiary, #8a95a6); margin: 0 0 12px;
}
.composer__edit .auth-field { margin-bottom: 12px; }
.composer__edit .auth-field:last-child { margin-bottom: 0; }
.composer__edit textarea { width: 100%; font-family: inherit; line-height: 1.6; resize: vertical; }

.var-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.var-chips__label { font-size: 12px; color: var(--text-tertiary, #8a95a6); margin-right: 2px; }
.var-chip {
  border: 1px solid var(--border, #dfe3ea); background: var(--surface-2, #f6f8fb);
  color: var(--text-secondary, #4a5568); border-radius: 99px; padding: 4px 10px;
  font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer;
  transition: all .12s;
}
.var-chip:hover { border-color: var(--brand, #4f46e5); color: var(--brand, #4f46e5); background: #eef2ff; }

.composer__foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 20px; background: var(--surface-2, #f8fafc); border-top: 1px solid var(--border-soft, #eef1f6);
}

.composer__preview { position: sticky; top: 16px; border: 1px solid var(--border, #dfe3ea); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 6px 24px rgba(15,23,42,.06); }
.composer__preview-head { padding: 12px 16px; background: var(--surface-2, #f8fafc); border-bottom: 1px solid var(--border-soft, #eef1f6); }
.composer__preview-eyebrow { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand, #4f46e5); }
.composer__preview-subject { display: block; font-size: 14px; font-weight: 600; color: var(--text, #1f2733); margin-top: 3px; }
.composer__preview-frame { background: #eef1f6; }
.composer__preview-frame iframe { display: block; width: 100%; height: 620px; border: 0; }

/* Taalwissel + taaltags (beheer e-mailsjablonen) */
.lang-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.lang-switch__label { font-size: 12px; font-weight: 600; color: var(--text-tertiary, #8a95a6); }
.lang-switch__item {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px;
  border: 1px solid var(--border, #dfe3ea); background: #fff; color: var(--text-secondary, #4a5568);
  font-size: 13px; text-decoration: none; transition: all .12s;
}
.lang-switch__item:hover { border-color: var(--brand, #4f46e5); color: var(--brand, #4f46e5); }
.lang-switch__item.is-active { background: var(--brand, #4f46e5); border-color: var(--brand, #4f46e5); color: #fff; }
.lang-switch__dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.lang-switch__item.is-active .lang-switch__dot { background: #fff; }

.lang-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.lang-tag { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: var(--surface-2, #f6f8fb); border: 1px solid var(--border-soft, #eef1f6); color: var(--text-secondary, #4a5568); }

/* ============================================================
   Acties-tab: actie-tegels + verstuurde-lijst
   ============================================================ */
.action-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .action-tiles { grid-template-columns: 1fr; } }

.action-tile {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface, #fff); border: 1px solid var(--border, #dfe3ea);
  border-radius: 14px; padding: 18px 20px; transition: box-shadow .14s, border-color .14s;
}
.action-tile:hover { border-color: #cfd5e2; box-shadow: 0 6px 20px rgba(15,23,42,.06); }
.action-tile__icon {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.action-tile__icon svg { width: 22px; height: 22px; }
.action-tile__icon--indigo  { background: #eef2ff; color: #4f46e5; }
.action-tile__icon--emerald { background: #ecfdf5; color: #059669; }
.action-tile__main { flex: 1 1 auto; min-width: 0; }
.action-tile__title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 15px; font-weight: 700; color: var(--text, #1f2733);
}
.action-tile__desc { margin: 5px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-secondary, #5b6b80); }
.action-tile__cta { flex: 0 0 auto; }
@media (max-width: 520px) {
  .action-tile { flex-wrap: wrap; }
  .action-tile__cta { width: 100%; justify-content: center; }
}

.sent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding: 4px 0 8px; }

/* Dossieracties — rustige command-center hiërarchie */
.case-work {
  --case-work-accent: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--case-work-accent) 4%, var(--surface));
  border-left: 3px solid var(--case-work-accent);
  border-radius: 0 9px 9px 0;
}
.case-work--warning { --case-work-accent: #d97706; }
.case-work--success { --case-work-accent: #15803d; }
.case-work__body { min-width: 0; }
.case-work__body > span { display: block; margin-bottom: 2px; color: var(--case-work-accent); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.case-work__body strong { display: block; color: var(--text); font-size: 14px; }
.case-work__body p { margin: 3px 0 0; color: var(--text-secondary); font-size: 12.5px; }
.case-work > .btn { flex-shrink: 0; }

.case-requests { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 11px; overflow: hidden; }
.case-requests__head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 17px; }
.case-requests__head h2 { margin: 0; color: var(--text); font-size: 14px; }
.case-requests__head p { margin: 3px 0 0; color: var(--text-tertiary); font-size: 11.5px; }
.case-requests__actions { display: flex; gap: 7px; flex-shrink: 0; }
.case-requests__empty { margin: 0; padding: 13px 17px; color: var(--text-tertiary); font-size: 12px; border-top: 1px solid var(--border-soft); }
.case-requests__list { border-top: 1px solid var(--border-soft); }
.case-request { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 9px 12px 9px 17px; border-bottom: 1px solid var(--border-soft); }
.case-request:last-child { border-bottom: 0; }
.case-request__dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: #94a3b8; }
.case-request__dot--success { background: var(--success, #16a34a); }
.case-request__dot--warning { background: var(--warning, #f59e0b); }
.case-request__dot--indigo { background: #6366f1; }
.case-request__dot--danger { background: var(--danger, #dc2626); }
.case-request__body { flex: 1; min-width: 0; }
.case-request__body strong,
.case-request__body span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-request__body strong { color: var(--text); font-size: 12.5px; }
.case-request__body span { margin-top: 2px; color: var(--text-tertiary); font-size: 11.5px; }

.workflow-agreements { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--border-soft); }
.workflow-agreements__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.workflow-agreements__head > div { display: flex; align-items: baseline; gap: 7px; }
.workflow-agreements__head strong { color: var(--text); font-size: 12.5px; }
.workflow-agreements__head span { color: var(--text-tertiary); font-size: 11px; }
.workflow-agreements__add { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; color: var(--primary); font-size: 11.5px; font-weight: 650; background: transparent; border: 0; cursor: pointer; }
.workflow-agreements__add svg { width: 13px; height: 13px; }
.workflow-agreements__list { display: flex; flex-direction: column; }
.workflow-agreement { display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; align-items: center; gap: 10px; width: 100%; padding: 9px 7px; color: inherit; font: inherit; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--border-soft); cursor: pointer; }
.workflow-agreement:hover { background: var(--surface-tint); }
.workflow-agreement > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.workflow-agreement strong { overflow: hidden; color: var(--text); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.workflow-agreement small { margin-top: 2px; color: var(--text-tertiary); font-size: 11px; }
.workflow-agreement > svg { width: 13px; height: 13px; color: var(--text-tertiary); }

.consent-intro { margin: 0 0 13px; color: var(--text-secondary); font-size: 12px; line-height: 1.55; }
.consent-list { border-top: 1px solid var(--border-soft); }
.consent-row { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.consent-row__head { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.consent-row__head strong { overflow: hidden; color: var(--text); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.consent-row__role,
.consent-row__meta { display: block; margin-top: 3px; color: var(--text-tertiary); font-size: 11.5px; line-height: 1.4; }
.consent-row__role { color: var(--text-secondary); font-weight: 600; }
.consent-row > p { margin: 7px 0 0; color: var(--text-secondary); font-size: 11.5px; line-height: 1.45; }
.consent-row__revoke { margin-top: 8px; }
.consent-empty { margin: 0; padding: 11px 0; color: var(--text-tertiary); font-size: 12px; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.consent-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  padding: 5px 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 650;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.consent-add:hover { color: var(--primary-dark, #1d4ed8); }
.consent-add svg { width: 14px; height: 14px; }

.client-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.client-empty p { margin: 0; color: var(--text-tertiary); font-size: 12.5px; }
.client-empty .btn { flex-shrink: 0; }

.acts-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 0 20px;
}
.acts-head__eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--text-tertiary);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.acts-head__title { margin: 0; color: var(--text); font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.acts-head__sub { margin: 7px 0 0; color: var(--text-secondary); font-size: 13px; }
.acts-head__stats { display: flex; align-items: center; gap: 18px; color: var(--text-tertiary); font-size: 12px; white-space: nowrap; }
.acts-head__stats span + span { padding-left: 18px; border-left: 1px solid var(--border-soft); }
.acts-head__stats strong { margin-right: 4px; color: var(--text); font-size: 15px; }

.acts-now {
  --acts-accent: var(--primary);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 15px 16px;
  background: color-mix(in srgb, var(--acts-accent) 4%, var(--surface));
  border-left: 3px solid var(--acts-accent);
  border-radius: 0 10px 10px 0;
}
.acts-now--warning { --acts-accent: #d97706; }
.acts-now--success { --acts-accent: #15803d; }
.acts-now--danger { --acts-accent: #dc2626; }
.acts-now__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--acts-accent) 10%, var(--surface));
  color: var(--acts-accent);
}
.acts-now__mark svg { width: 16px; height: 16px; }
.acts-now__eyebrow { display: block; margin-bottom: 2px; color: var(--acts-accent); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.acts-now__title { margin: 0; color: var(--text); font-size: 14px; font-weight: 700; }
.acts-now__desc { margin: 3px 0 0; color: var(--text-secondary); font-size: 12.5px; line-height: 1.4; }
.acts-now__cta { white-space: nowrap; }
.acts-now__cta svg { width: 13px; height: 13px; }

.acts-launch {
  display: grid;
  grid-template-columns: 110px repeat(3, minmax(0, 1fr));
  align-items: stretch;
  margin-top: 20px;
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.acts-launch__label {
  display: flex;
  align-items: center;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.acts-launch__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 14px 15px;
  color: inherit;
  text-decoration: none;
  border-left: 1px solid var(--border-soft);
  transition: background .12s ease;
}
.acts-launch__item:hover { background: var(--surface-tint); }
.acts-launch__icon { display: grid; place-items: center; width: 29px; height: 29px; color: var(--text-secondary); }
.acts-launch__icon svg { width: 18px; height: 18px; }
.acts-launch__item strong,
.acts-launch__item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acts-launch__item strong { color: var(--text); font-size: 12.5px; font-weight: 650; }
.acts-launch__item small { margin-top: 2px; color: var(--text-tertiary); font-size: 11px; }
.acts-launch__chev { width: 13px; height: 13px; color: var(--text-tertiary); }

.acts-section { margin-top: 30px; }
.acts-section__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 11px; }
.acts-section__title { margin: 0; color: var(--text); font-size: 14px; font-weight: 700; }
.acts-section__sub { margin: 4px 0 0; color: var(--text-tertiary); font-size: 11.5px; }
.acts-section__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 6px;
  color: var(--text-secondary);
  font-size: 10.5px;
  line-height: 1;
  vertical-align: 1px;
  background: var(--surface-tint);
  border-radius: 99px;
}
.acts-empty { padding: 14px 0; color: var(--text-tertiary); font-size: 12.5px; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.acts-list { display: flex; flex-direction: column; border-top: 1px solid var(--border-soft); }
.acts-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 11px 8px 11px 15px;
  overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  transition: background .12s ease;
}
.acts-row:hover { background: var(--surface-tint); }
.acts-row--clickable {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-top: 0;
  border-right: 0;
  border-left: 0;
}
.acts-row--clickable:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.acts-row__chev { width: 14px; height: 14px; flex-shrink: 0; color: var(--text-tertiary); transition: transform .12s, color .12s; }
.acts-row--clickable:hover .acts-row__chev { color: var(--primary); transform: translateX(2px); }
.acts-row__rail { position: absolute; top: 17px; left: 1px; width: 5px; height: 5px; border-radius: 50%; background: var(--border); }
.acts-row__rail--success { background: var(--success, #16a34a); }
.acts-row__rail--warning { background: var(--warning, #f59e0b); }
.acts-row__rail--indigo { background: #6366f1; }
.acts-row__rail--danger { background: var(--danger, #dc2626); }
.acts-row__rail--slate { background: #94a3b8; }
.acts-row__body { flex: 1; min-width: 0; }
.acts-row__title { overflow: hidden; color: var(--text); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.acts-row__meta { display: flex; align-items: center; gap: 7px; margin-top: 3px; overflow: hidden; color: var(--text-muted); font-size: 11.5px; }
.acts-row__meta .flag-img { width: 16px; height: 12px; }
.acts-row__dot { width: 3px; height: 3px; flex-shrink: 0; border-radius: 50%; background: var(--text-tertiary); }
.acts-row__over { color: var(--danger, #dc2626); font-weight: 600; }
.acts-row__status { flex-shrink: 0; }
.acts-row__actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.acts-score { color: var(--success-dark, #15803d); font-weight: 700; }
.icon-act { display: grid; place-items: center; width: 30px; height: 30px; color: var(--text-secondary); cursor: pointer; background: transparent; border: 0; border-radius: 6px; transition: background .12s, color .12s; }
.icon-act:hover { color: var(--primary); background: var(--surface-soft); }
.icon-act.is-copied { color: var(--success-dark, #15803d); }
.btn--xs { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.acts-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 2px;
  color: var(--primary);
  background: transparent;
  border: 0;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}
.acts-add:hover { color: var(--primary-dark, #1d4ed8); }
.acts-add svg { width: 14px; height: 14px; }

@media (max-width: 900px) {
  .acts-launch { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .acts-launch__label { grid-column: 1 / -1; padding: 10px 0 5px; }
  .acts-launch__item:first-of-type { border-left: 0; }
}
@media (max-width: 680px) {
  .case-work,
  .case-requests__head { align-items: flex-start; flex-direction: column; }
  .case-request { flex-wrap: wrap; }
  .acts-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .acts-now { grid-template-columns: auto minmax(0, 1fr); }
  .acts-now__cta { grid-column: 2; justify-self: start; }
  .acts-launch { display: block; }
  .acts-launch__label { padding: 12px 0 7px; }
  .acts-launch__item { border-top: 1px solid var(--border-soft); border-left: 0; }
  .acts-row { flex-wrap: wrap; }
  .acts-row__status { display: none; }
  .acts-row__actions { margin-left: auto; }
}

/* ============================================================
   Interne notities per traject
   ============================================================ */
.notes { display: flex; flex-direction: column; gap: 16px; }

.note-compose { padding: 14px 16px; }
.note-compose__input {
  width: 100%; border: 1px solid var(--border, #dfe3ea); border-radius: 10px;
  padding: 11px 13px; font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; min-height: 64px;
  background: var(--surface, #fff);
}
.note-compose__input:focus { outline: none; border-color: var(--primary, #4f46e5); box-shadow: var(--shadow-focus); }
.note-compose__field { position: relative; }
.note-compose__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.note-compose__hint { font-size: 12px; color: var(--text-tertiary, #8a95a6); }
.note-compose__hint kbd {
  font: inherit; font-size: 11px; background: var(--surface-soft, #f1f4f9); color: var(--text-secondary, #4a5568);
  border: 1px solid var(--border, #e2e6ee); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px;
}

/* @-mention autocomplete */
.mention-pop {
  position: absolute; left: 0; top: calc(100% + 4px); z-index: 40; min-width: 240px; max-width: 320px;
  background: var(--surface, #fff); border: 1px solid var(--border, #e2e6ee); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 27, 45, .16); padding: 5px; overflow: hidden;
}
.mention-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; border-radius: 8px; padding: 7px 9px; cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--text, #1f2733);
}
.mention-opt.is-active, .mention-opt:hover { background: var(--primary-soft, #eef2ff); }
.mention-opt__av {
  width: 26px; height: 26px; border-radius: 50%; color: #fff; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700;
}
.mention-opt__ic {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
  background: var(--primary-soft, #eef2ff); color: var(--primary, #4f46e5);
}
.mention-opt__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-opt__hint { font-size: 12px; color: var(--text-tertiary, #8a95a6); flex: 0 0 auto; }

.notes-empty {
  display: flex; align-items: center; gap: 16px; padding: 30px 24px;
  background: var(--surface-soft, #f8fafc); border: 1px dashed var(--border, #dfe3ea);
  border-radius: 14px; color: var(--text-tertiary, #8a95a6);
}
.notes-empty svg { color: var(--text-muted, #b6bdc8); flex: 0 0 auto; }
.notes-empty__title { font-size: 14px; font-weight: 700; color: var(--text, #1f2733); }
.notes-empty__sub { font-size: 13px; color: var(--text-tertiary, #8a95a6); margin-top: 2px; }

.note-list { display: flex; flex-direction: column; gap: 10px; }
.note-item {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px;
  padding: 14px 16px; background: var(--surface, #fff);
  border: 1px solid var(--border, #e6e9f0); border-radius: 12px;
}
.note-item.is-pinned { border-color: #fcd34d; background: linear-gradient(180deg, #fffdf5, #fff); }
.note-item__avatar {
  width: 36px; height: 36px; border-radius: 50%; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.note-item__body { min-width: 0; }
.note-item__head { display: flex; align-items: center; gap: 9px; }
.note-item__author { font-size: 13.5px; font-weight: 700; color: var(--text, #1f2733); }
.note-item__time { font-size: 11.5px; color: var(--text-tertiary, #8a95a6); }
.note-item__pin-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--warning-dark, #b45309); background: var(--warning-soft, #fef3c7); padding: 1px 7px; border-radius: 99px;
}
.note-item__actions { margin-left: auto; display: inline-flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.note-item:hover .note-item__actions { opacity: 1; }
.note-item__act {
  background: none; border: none; cursor: pointer; color: var(--text-tertiary, #8a95a6);
  padding: 4px; border-radius: 6px; display: inline-flex; line-height: 0;
}
.note-item__act:hover { background: var(--surface-soft, #f1f4f9); color: var(--text, #1f2733); }
.note-item__act--danger:hover { background: var(--danger-soft, #fee2e2); color: var(--danger, #dc2626); }
.note-item__text { font-size: 14px; line-height: 1.6; color: var(--text, #1f2733); margin-top: 4px; word-wrap: break-word; white-space: pre-wrap; }
.note-item__text .mention {
  color: var(--primary, #4f46e5); background: var(--primary-soft, #eef2ff);
  font-weight: 600; padding: 0 4px; border-radius: 5px;
}

/* Reacties (thread) onder een notitie */
.note-replies {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 2px solid var(--border-soft, #e5e7eb);
  display: flex; flex-direction: column; gap: 10px;
}
.note-reply { display: flex; gap: 10px; }
.note-reply__avatar {
  flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .02em;
}
.note-reply__body { min-width: 0; flex: 1; }
.note-reply__head { display: flex; align-items: center; gap: 8px; }
.note-reply__text {
  font-size: 13.5px; line-height: 1.55; color: var(--text, #1f2733);
  margin-top: 2px; word-wrap: break-word; white-space: pre-wrap;
}
.note-reply__text .mention {
  color: var(--primary, #4f46e5); background: var(--primary-soft, #eef2ff);
  font-weight: 600; padding: 0 4px; border-radius: 5px;
}

/* Reageren-knop + inline reply-composer */
.note-item__reply { margin-top: 10px; }
.note-reply-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; background: none; padding: 4px 8px; margin-left: -8px;
  border-radius: 7px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--text-tertiary, #94a3b8);
  transition: all .13s ease;
}
.note-reply-toggle:hover { color: var(--primary, #4f46e5); background: var(--primary-soft, #eef2ff); }
.note-reply-form { margin-top: 8px; }
.note-reply-form .note-compose__input {
  width: 100%; border: 1px solid var(--border, #dfe3ea); border-radius: 9px;
  padding: 9px 12px; font: inherit; font-size: 13.5px; resize: vertical;
  background: var(--surface, #fff);
}
.note-reply-form .note-compose__input:focus {
  outline: none; border-color: var(--primary, #4f46e5);
  box-shadow: var(--shadow-focus);
}
.note-reply-form__foot {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px;
}

.offer-head-stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--success-soft, #ecfdf5);
  color: var(--success-dark, #047857);
  font-size: 12px;
  font-weight: 600;
}
.offer-head-stat strong {
  color: var(--text, #1f2733);
  font-size: 12.5px;
}

/* ---------- Bell als native <details>/<summary> ---------- */
.notif summary.top__icon-btn {
  list-style: none;
  cursor: pointer;
  border: 0;
  background: transparent;
}
.notif summary.top__icon-btn::-webkit-details-marker {
  display: none;
}
.notif:not([open]) .notif-panel { display: none; }
.notif[open] .notif-panel { display: flex; flex-direction: column; }

/* ---------- Quick-create (global "+ Nieuw") ---------- */
.quick { position: relative; }
.quick > summary.quick__toggle {
  list-style: none;
  cursor: pointer;
  gap: 6px;
}
.quick > summary.quick__toggle::-webkit-details-marker { display: none; }
.quick__caret { opacity: .85; transition: transform 140ms var(--ease, ease); }
.quick[open] .quick__caret { transform: rotate(180deg); }

.quick-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 268px;
  background: var(--surface, #fff); border: 1px solid var(--border, #e6e9f0); border-radius: 14px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, .16); z-index: 900; overflow: hidden; padding: 6px;
  transform-origin: top right; animation: notifPop 140ms var(--ease, ease);
}
.quick:not([open]) .quick-panel { display: none; }

.quick-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 10px; text-decoration: none;
  color: var(--text, #1f2733); transition: background 120ms var(--ease, ease);
}
.quick-item:hover { background: var(--surface-soft, #f6f8fb); }
.quick-item__ic {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
}
.quick-item__ic--case   { background: #e0e7ff; color: #4338ca; }
.quick-item__ic--offer  { background: #dcfce7; color: #15803d; }
.quick-item__ic--client { background: #fef3c7; color: #b45309; }
.quick-item__ic--org    { background: #e0f2fe; color: #0369a1; }
.quick-item__tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.quick-item__t { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.quick-item__s { font-size: 11.5px; color: var(--text-tertiary, #8a95a6); line-height: 1.3; }

/* ---------- Lijst-toolbar, zoek, klikbare rijen ---------- */
.list-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-top: 18px; flex-wrap: wrap;
}
.list-search { position: relative; display: flex; align-items: center; }
.list-search svg {
  position: absolute; left: 11px; color: var(--text-tertiary, #94a3b8); pointer-events: none;
}
/* Dubbele selector met [type]: de globale input-regels in app.css laden later
   en hebben anders dezelfde specificiteit, waardoor de padding voor het
   zoekicoon wegvalt en het icoon over de tekst heen staat. */
.list-search input,
.list-search input[type="text"] {
  width: 260px; max-width: 60vw; font-size: 13px; padding: 8px 12px 8px 32px;
  border: 1px solid var(--border, #e5e7eb); border-radius: 10px; background: var(--surface, #fff);
  color: var(--text, #0f172a); transition: border-color 120ms ease, box-shadow 120ms ease;
}
.list-search input:focus,
.list-search input[type="text"]:focus {
  outline: none; border-color: var(--primary, #2563eb);
  box-shadow: var(--shadow-focus);
}

.chip[data-filter] { cursor: pointer; }

.rowlink { cursor: pointer; transition: background 110ms ease; }
.rowlink:hover { background: var(--surface-soft, #f6f8fb); }
.rowlink:focus-visible {
  outline: 2px solid var(--primary, #2563eb); outline-offset: -2px;
  background: var(--surface-soft, #f6f8fb);
}
.rowlink__chev { color: var(--text-tertiary, #cbd5e1); transition: transform 110ms ease, color 110ms ease; }
.rowlink:hover .rowlink__chev { transform: translateX(2px); color: var(--primary, #2563eb); }

.list-empty { padding: 46px 24px; text-align: center; }
.list-empty__ic {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px;
  display: grid; place-items: center; background: var(--surface-soft, #f1f5f9); color: var(--text-tertiary, #94a3b8);
}
.list-empty__title { font-size: 15px; font-weight: 700; color: var(--text, #0f172a); }
.list-empty__sub { font-size: 13px; color: var(--text-tertiary, #8a95a6); margin: 4px 0 14px; }

/* Mini scorebalk in tabellen */
.score-mini { display: inline-flex; align-items: center; gap: 8px; }
.score-mini__val { font-size: 14px; font-weight: 700; }
.score-mini__val small { font-size: 11px; font-weight: 500; color: var(--text-tertiary, #94a3b8); }
.score-mini__bar { width: 46px; height: 6px; border-radius: 99px; background: var(--border, #e5e7eb); overflow: hidden; }
.score-mini__fill { display: block; height: 100%; border-radius: 99px; }
.score-mini--good .score-mini__val { color: #15803d; }
.score-mini--good .score-mini__fill { background: #22c55e; }
.score-mini--ok .score-mini__val { color: #b45309; }
.score-mini--ok .score-mini__fill { background: #f59e0b; }
.score-mini--bad .score-mini__val { color: #b91c1c; }
.score-mini--bad .score-mini__fill { background: #ef4444; }


/* Dicteerknop (spraak-naar-tekst, dictate.js) ? statusweergave */
[data-dictate-for].is-busy, .dictate-fab.is-busy { opacity: .55; pointer-events: auto; }
[data-dictate-for].is-rec, .dictate-fab.is-rec {
	color: #dc2626 !important;
	background: #fef2f2 !important;
	animation: dictatePulse 1.4s ease-in-out infinite;
}
[data-dictate-for].is-error, .dictate-fab.is-error { color: #dc2626 !important; }
@keyframes dictatePulse {
	0%, 100% { opacity: 1; }
	50% { opacity: .45; }
}

/* Taalmenu van de dicteerknop (rechtsklik) */
.dictate-menu {
	position: fixed; z-index: 130;
	min-width: 210px; padding: 4px;
	background: var(--surface, #fff);
	border: 1px solid var(--border-soft, #e8edf4); border-radius: 11px;
	box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
	max-height: 320px; overflow-y: auto;
}
.dictate-menu__head {
	padding: 7px 10px 4px; font-size: 11px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .05em;
	color: var(--text-tertiary, #94a3b8);
}
.dictate-menu__item {
	display: flex; align-items: center; gap: 8px; width: 100%;
	padding: 6px 10px; border: none; background: none; border-radius: 8px;
	cursor: pointer; font: inherit; font-size: 13px; font-weight: 550;
	color: var(--text, #0f172a); text-align: left;
}
.dictate-menu__item:hover { background: var(--surface-soft, #f1f5f9); }
.dictate-menu__item.is-active { font-weight: 700; }
.dictate-menu__item.is-active::after {
	content: ''; margin-left: auto; width: 14px; height: 14px; flex: 0 0 auto;
	background: currentColor;
	-webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center / contain no-repeat;
	mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center / contain no-repeat;
}
.dictate-menu__sep { height: 1px; margin: 4px 6px; background: var(--border-soft, #eef1f6); }

/* Vlaggetje op de dicteerknop: toont de gekozen gesproken taal */
[data-dictate-for], .dictate-fab { position: relative; }
.dictate-flag {
	position: absolute; right: -1px; bottom: -1px;
	width: 12px; height: 12px; border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 0 0 1.5px var(--surface, #fff);
	background: var(--surface, #fff);
	display: grid; place-items: center;
	pointer-events: none;
}
.dictate-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dictate-flag--auto { color: var(--text-secondary, #64748b); background: var(--surface-soft, #eef1f6); }

/* In het taalmenu staan de vlaggetjes gewoon in de regel (niet zwevend) */
.dictate-menu__item .dictate-flag {
	position: static;
	width: 16px; height: 16px; flex: 0 0 auto;
	box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
}

/* Strakke wikkel rond een dicteerveld; de knop landt in de veldhoek zelf. */
.dictate-wrap { position: relative; display: block; width: 100%; }
.dictate-wrap > textarea,
.dictate-wrap > input { width: 100%; box-sizing: border-box; display: block; }

/* Zwevende dicteerknop in tekstvelden (data-dictate) */
.dictate-fab {
	position: absolute; right: 7px; bottom: 7px; z-index: 3;
	width: 26px; height: 26px; border-radius: 8px;
	display: grid; place-items: center;
	border: none; background: none; cursor: pointer;
	color: var(--text-tertiary, #a8b3c2);
	transition: background .12s ease, color .12s ease;
}
.dictate-fab:hover { background: var(--surface-soft, #f1f5f9); color: var(--text, #0f172a); }
