/* =========================================================
   COMPONENTS — editorial dossier, geen SaaS-dashboard
   ========================================================= */

/* Globale hidden — wint van display-overrides verderop. */
[hidden] { display: none !important; }

/* ===================== SHELL ===================== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
.main { display: flex; flex-direction: column; min-width: 0; }

.page {
  padding: var(--sp-5) var(--page-pad) var(--sp-9);
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
}

/* Intro-regel tussen banner en content — warme overgang */
.intro-lead {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-5);
  padding: var(--sp-4) 0 var(--sp-3);
}
.intro-lead .dash {
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--accent);
  margin: 0 2px;
}
.intro-lead em {
  font-style: normal;
  color: var(--accent-ink);
  font-weight: 600;
}

/* Subtiele fade-in bij paginaload — één rustig moment */
.page > * {
  opacity: 0;
  transform: translateY(8px);
  animation: rise var(--dur-4) var(--ease-out) forwards;
}
.page > *:nth-child(1) { animation-delay: 40ms; }
.page > *:nth-child(2) { animation-delay: 120ms; }
.page > *:nth-child(3) { animation-delay: 200ms; }
.page > *:nth-child(4) { animation-delay: 280ms; }
.page > *:nth-child(5) { animation-delay: 360ms; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== SIDEBAR ===================== */
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  padding: var(--sp-6) var(--sp-4);
  position: sticky; top: 0; height: 100vh;
}

.sidebar-brand {
  padding: var(--sp-2) var(--sp-3) var(--sp-6);
  display: flex; flex-direction: column;
  gap: 2px;
}
.sidebar-brand-mark {
  width: 32px; height: 32px;
  object-fit: contain;
  margin-bottom: 2px;
  display: block;
}
.sidebar-brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.sidebar-brand-sub {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-weight: 500;
}

.sidebar-section { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--sp-5); }
.sidebar-section-label {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-weight: 500;
  padding: 0 var(--sp-3);
  margin-bottom: var(--sp-2);
}

.nav-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 9px var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--ink-soft);
  font-size: var(--fs-base);
  font-weight: 500;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
  min-height: 36px;
  position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item .icon { width: 17px; height: 17px; flex: none; stroke-width: 1.5; }
.nav-item.is-active {
  color: var(--ink);
  font-weight: 600;
}
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-item.is-active .icon { color: var(--accent); }

.sidebar-footer {
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: var(--sp-1);
}

.user-card {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  flex: none;
}
.user-meta { min-width: 0; line-height: 1.25; }
.user-name { font-weight: 600; font-size: var(--fs-sm); }
.user-sub  { font-size: var(--fs-xs); color: var(--ink-whisper); }

.logout-btn {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 8px var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--ink-whisper);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.logout-btn:hover { color: var(--ink); background: var(--surface-2); }
.logout-btn .icon { width: 15px; height: 15px; }

/* ===================== TOPBAR ===================== */
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--page-pad);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in oklch, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
  gap: var(--sp-5);
}

.breadcrumb {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--ink-whisper);
}
.breadcrumb a { transition: color var(--dur-1) var(--ease); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb-sep { color: var(--rule-strong); }
.breadcrumb .current { color: var(--ink); font-weight: 500; }

.topbar-actions { display: flex; align-items: center; gap: var(--sp-3); }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  padding: 9px 16px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease),
              border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }

.btn-primary  { background: var(--ink); color: var(--ink-invert); }
.btn-primary:hover { background: oklch(26% 0.018 var(--brand-hue)); }

.btn-accent   { background: var(--accent); color: var(--ink-invert); }
.btn-accent:hover { background: var(--accent-hover); }

.btn-ghost    { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-soft); }

.btn-quiet    { background: transparent; color: var(--ink-soft); padding: 6px 10px; }
.btn-quiet:hover { color: var(--ink); }

.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
.btn .icon { width: 15px; height: 15px; }

/* ===================== PAGE HEADERS ===================== */

/* Editorial hero: compact, met wow-moment (oude variant, nog in gebruik elders) */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  padding-bottom: var(--sp-5);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--rule);
}

/* ===================== HERO BANNER (dashboard) =====================
   Grote illustratieve banner met warm welkomstbericht.
*/
.banner {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  padding: var(--sp-6) var(--page-pad);
  background: var(--surface-2);
  isolation: isolate;
  border-bottom: 1px solid var(--rule);
}

.banner-art {
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
}
.banner-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* Gradient overlay voor leesbaarheid */
.banner-art::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(
      to top,
      oklch(18% 0.02 var(--brand-hue) / 0.72) 0%,
      oklch(18% 0.02 var(--brand-hue) / 0.4) 40%,
      oklch(18% 0.02 var(--brand-hue) / 0.05) 80%,
      oklch(18% 0.02 var(--brand-hue) / 0) 100%
    );
}

.banner-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-4);
  align-items: end;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}
@media (max-width: 800px) {
  .banner-content { grid-template-columns: 1fr; }
}

.banner-eyebrow {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: oklch(96% 0.01 var(--brand-hue));
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  text-shadow: 0 1px 2px oklch(18% 0.02 var(--brand-hue) / 0.4);
}
.banner-eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px oklch(from var(--accent) l c h / 0.25);
  animation: banner-pulse 2.4s var(--ease) infinite;
}
@keyframes banner-pulse {
  0%, 100% { box-shadow: 0 0 0 4px oklch(from var(--accent) l c h / 0.25); }
  50%      { box-shadow: 0 0 0 10px oklch(from var(--accent) l c h / 0.05); }
}

.banner-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: oklch(99% 0.003 var(--brand-hue));
  margin-bottom: var(--sp-2);
  max-width: 22ch;
  text-shadow: 0 2px 12px oklch(18% 0.02 var(--brand-hue) / 0.4);
}
.banner-title em {
  font-style: normal;
  color: oklch(82% 0.14 var(--brand-hue));
  font-weight: 600;
}

.banner-sub {
  font-size: var(--fs-sm);
  color: oklch(92% 0.01 var(--brand-hue));
  max-width: 50ch;
  line-height: var(--lh-norm);
  text-shadow: 0 1px 8px oklch(18% 0.02 var(--brand-hue) / 0.4);
  margin-bottom: var(--sp-3);
}

.banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: oklch(99% 0.003 var(--brand-hue));
  color: var(--ink);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: transform var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.banner-cta:hover { background: var(--accent); color: var(--ink-invert); }
.banner-cta .icon { width: 14px; height: 14px; }

/* Rechts-paneel: week-status (compact) */
.banner-panel {
  background: oklch(99% 0.003 var(--brand-hue) / 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid oklch(99% 0.003 var(--brand-hue) / 0.5);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  min-width: 200px;
}
.banner-panel-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
  margin-bottom: 4px;
}
.banner-panel-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 0.2em;
  margin-bottom: var(--sp-2);
}
.banner-panel-value .current { color: var(--accent); }
.banner-panel-value .slash { color: var(--rule-strong); font-size: 0.55em; }
.banner-panel-value .total { color: var(--ink-whisper); font-size: 0.55em; }
.banner-panel-sub {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  margin-top: var(--sp-2);
}

/* Dashboard sectie-kop groter */
.lead-section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: var(--sp-3);
}
.lead-section-title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.lead-section-sub {
  font-size: var(--fs-sm);
  color: var(--ink-whisper);
}
.lead-section-sub.is-urgent {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--fs-xs);
}

/* ===================== LEAD ACTIONS (openstaande taken op portaal-home) ===================== */
.lead-actions { display: flex; flex-direction: column; }
.lead-action {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background var(--dur-1) var(--ease), padding var(--dur-1) var(--ease);
}
.lead-action:first-child { border-top: 1px solid var(--rule); }
.lead-action:hover {
  background: var(--surface-2);
  padding-left: var(--sp-3);
  padding-right: var(--sp-3);
  margin: 0 calc(-1 * var(--sp-3));
  border-radius: var(--r-sm);
}
.lead-action[data-state="done"] { opacity: 0.55; }
.lead-action[data-state="done"] .lead-action-text { text-decoration: line-through; color: var(--ink-soft); }
.lead-action[data-state="done"] .action-check { background: var(--ink); border-color: var(--ink); }
.lead-action[data-state="done"] .action-check::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M5 13l4 4L19 7'/></svg>") center/14px 14px no-repeat;
}
.lead-action .action-check { position: relative; }

.lead-action-text {
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.lead-action-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 600;
  margin-bottom: 2px;
}
.lead-action-due {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
  margin-top: 2px;
}
.lead-action-chevron {
  width: 16px; height: 16px;
  color: var(--ink-whisper);
  flex: none;
}
.lead-action:hover .lead-action-chevron { color: var(--ink-soft); transform: translateX(2px); }

/* ===================== CHECKLIST (volwassen, functioneel) ===================== */
.checklist {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.check-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: var(--sp-4) var(--sp-5) var(--sp-3);
  border-bottom: 1px solid var(--rule);
}
.check-head-title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.check-head-meta { font-size: var(--fs-sm); color: var(--ink-whisper); }
.check-head-meta strong { color: var(--ink); font-weight: 600; }

.check-section-label {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-weight: 500;
  color: var(--ink-whisper);
  padding: var(--sp-4) var(--sp-5) var(--sp-2);
}

.check-item {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--rule);
  cursor: pointer;
  position: relative;
  transition: background var(--dur-1) var(--ease);
  color: inherit;
  text-decoration: none;
}
.check-item:hover { background: var(--surface-2); }
.check-item:hover .check-chevron { transform: translateX(3px); color: var(--accent); }

/* Check-box als status-indicator (niet-interactief) */
span.check-box {
  display: block;
  width: 18px; height: 18px;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--r-xs);
  background: var(--surface);
}

.check-box {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--r-xs);
  background: var(--surface);
  cursor: pointer;
  position: relative;
  transition: all var(--dur-1) var(--ease);
  flex: none;
}
.check-box:hover { border-color: var(--accent); }
.check-box:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check-box:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid var(--ink-invert);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.check-title {
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  transition: color var(--dur-1) var(--ease);
}
.check-meta {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.check-meta .sep { color: var(--rule-strong); }

.check-priority {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-whisper);
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  white-space: nowrap;
}
.check-priority.is-high {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: transparent;
}

.check-chevron {
  width: 16px; height: 16px;
  color: var(--ink-whisper);
  transition: transform var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

/* Voltooid */
.check-item[data-state="done"] { background: transparent; }
.check-item[data-state="done"] .check-title {
  color: var(--ink-whisper);
  text-decoration: line-through;
  text-decoration-color: var(--rule-strong);
}
.check-item[data-state="done"] .check-priority { display: none; }
.check-item[data-state="done"] .check-chevron { display: none; }

/* ===================== PROJECT SNAPSHOT STRIP ===================== */
.snapshot {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: var(--sp-5);
  align-items: center;
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-5);
}
@media (max-width: 900px) {
  .snapshot { grid-template-columns: 1fr; gap: var(--sp-3); }
}
.snap-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.snap-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
}
.snap-value {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  display: flex; align-items: center; gap: 6px;
}
.snap-value .dot-live {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}
.snap-link {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: oklch(from var(--accent-ink) l c h / 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-1) var(--ease);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.snap-link:hover { text-decoration-color: var(--accent); }

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--accent-ink);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.hero-eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.hero-title em {
  font-style: italic;
  color: var(--accent-ink);
}

.hero-lead {
  font-size: var(--fs-md);
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: var(--lh-norm);
}

.hero-meta {
  display: flex; gap: var(--sp-4);
  flex-wrap: wrap;
  align-items: center;
  font-size: var(--fs-sm);
  color: var(--ink-whisper);
}
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--rule-strong); }

/* Simple page header voor sub-pagina's */
.page-header {
  padding-bottom: var(--sp-6);
  margin-bottom: var(--sp-7);
  border-bottom: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: var(--sp-5);
  flex-wrap: wrap;
}
.page-title {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
}
.page-subtitle { color: var(--ink-soft); margin-top: var(--sp-3); font-size: var(--fs-md); max-width: 60ch; }

/* ===================== WEEK DIAL (hero wow-moment) ===================== */
.week-dial {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
}
.week-dial-num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--ink);
  display: flex; align-items: baseline; gap: 0.25em;
}
.week-dial-num .current {
  color: var(--accent);
}
.week-dial-num .slash { color: var(--rule-strong); font-size: 0.6em; font-weight: 400; }
.week-dial-num .total { color: var(--ink-whisper); font-size: 0.6em; }
.week-dial-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
}

.week-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: var(--sp-2);
}
.week-bar {
  height: 6px;
  background: var(--surface-3);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.week-bar[data-status="done"]    { background: var(--ink); }
.week-bar[data-status="current"] { background: var(--accent); }
.week-bar[data-status="future"]  { background: var(--surface-3); }

/* Hero layout met dial rechts */
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--sp-8);
  align-items: end;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
}

/* ===================== KERNCIJFERS (geen cards) ===================== */
/* Typografische stat-rij, geen rounded boxes */
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  padding: var(--sp-5) 0;
  margin-bottom: var(--sp-7);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 800px) { .facts { grid-template-columns: 1fr; gap: var(--sp-4); } }

.fact { display: flex; flex-direction: column; gap: 6px; }
.fact-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
}
.fact-value {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink);
}
.fact-value.tone-accent { color: var(--accent); }
.fact-sub {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}

/* ===================== SECTIE-KOP ===================== */
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--rule);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.section-sub {
  font-size: var(--fs-sm);
  color: var(--ink-whisper);
}

/* ===================== SECTIES (geen cards!) ===================== */
.section { margin-bottom: var(--sp-5); }

/* Dashboard grid — main + right-rail (zoals PandaDoc) */
.dash-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: var(--sp-5);
  align-items: start;
}
.dash-main { min-width: 0; }
.dash-rail {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
@media (max-width: 1000px) {
  .dash-grid { grid-template-columns: 1fr; }
}

/* Rail cards: compacter dan frames, zachter */
.rail-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.rail-card-eyebrow {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
  display: flex; justify-content: space-between; align-items: center;
}
.rail-card-eyebrow a { color: var(--accent); font-weight: 600; }

/* Oude split blijft bestaan voor andere pagina's */
.split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-5);
}
.split-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}
@media (max-width: 900px) {
  .split, .split-equal { grid-template-columns: 1fr; gap: var(--sp-4); }
}

/* ===================== PHASES (numerieke tijdlijn) ===================== */
.phases { display: flex; flex-direction: column; }
.phase-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  column-gap: var(--sp-5);
  align-items: center;
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--rule);
  transition: background var(--dur-1) var(--ease);
}
.phase-row:first-child { padding-top: 0; }
.phase-row:last-child { border-bottom: 0; }
.phase-row:hover { background: var(--surface-2); padding-left: var(--sp-3); padding-right: var(--sp-3); margin: 0 calc(-1 * var(--sp-3)); border-radius: var(--r-sm); }

.phase-num {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink-whisper);
  font-weight: 500;
  text-align: left;
}
.phase-row[data-status="done"] .phase-num   { color: var(--ink-soft); }
.phase-row[data-status="active"] .phase-num { color: var(--accent); }

.phase-content { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.phase-name {
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--ink);
  line-height: 1.3;
}
.phase-period {
  font-size: var(--fs-sm);
  color: var(--ink-whisper);
  line-height: 1.3;
}

.phase-row .tag { white-space: nowrap; }

/* ===================== BADGE (subtiel, spaarzaam) ===================== */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-whisper);
  padding: 3px 0;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.tag::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}
.tag.tone-ok     { color: var(--ok); }
.tag.tone-warn   { color: var(--warn); }
.tag.tone-info   { color: var(--info); }
.tag.tone-accent { color: var(--accent); }
.tag.no-dot::before { display: none; }

/* Pill variant (omkaderd, alleen voor hero meta waar nodig) */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 500;
  background: var(--surface-2);
  color: var(--ink-soft);
  border: 1px solid var(--rule);
}
.pill.tone-accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

/* ===================== FULL TIMELINE (week-voor-week) ===================== */
.timeline {
  position: relative;
  padding-left: var(--sp-7);
}
.timeline::before {
  content: "";
  position: absolute;
  left: 14px; top: 14px; bottom: 14px;
  width: 1px;
  background: var(--rule-strong);
}
.timeline-week {
  position: relative;
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--rule);
}
.timeline-week:last-child { border-bottom: 0; }
.timeline-week::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--sp-7) + 8px);
  top: calc(var(--sp-5) + 10px);
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  transition: all var(--dur-2) var(--ease);
}
.timeline-week[data-status="done"]::before    { background: var(--ink); border-color: var(--ink); }
.timeline-week[data-status="current"]::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }

.timeline-week-header {
  display: flex; align-items: baseline; gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.timeline-week-num {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--ink-whisper);
  font-weight: 400;
  min-width: 90px;
}
.timeline-week[data-status="done"]    .timeline-week-num { color: var(--ink); }
.timeline-week[data-status="current"] .timeline-week-num { color: var(--accent); }
.timeline-week-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--ink);
  flex: 1;
}
.timeline-week[data-status="future"] .timeline-week-title { color: var(--ink-soft); }
.timeline-week-body {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: var(--lh-loose);
  margin-left: calc(90px + var(--sp-3));
  max-width: 65ch;
}

/* ===================== UPDATES (editorial stijl) ===================== */
.updates { display: flex; flex-direction: column; }
.update {
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--sp-5);
}
.update:first-child { padding-top: 0; }
.update:last-child { border-bottom: 0; }
@media (max-width: 720px) {
  .update { grid-template-columns: 1fr; gap: var(--sp-2); }
}

.update-date {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--ink-whisper);
  line-height: 1.2;
}
.update-date strong {
  display: block;
  font-size: var(--fs-2xl);
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variant-numeric: oldstyle-nums;
}

.update-body-wrap { min-width: 0; }
.update-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-2);
  line-height: 1.2;
}
.update-text {
  color: var(--ink-soft);
  font-size: var(--fs-base);
  line-height: var(--lh-loose);
  max-width: 65ch;
}
.update-meta { margin-top: var(--sp-3); display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* ===================== ACTIE LIJST ===================== */
.actions { display: flex; flex-direction: column; }
.action {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--rule);
}
.action:first-child { padding-top: var(--sp-2); }
.action:last-child { border-bottom: 0; }

.action-check {
  width: 18px; height: 18px;
  border-radius: var(--r-xs);
  border: 1.5px solid var(--rule-strong);
  background: transparent;
  transition: all var(--dur-1) var(--ease);
  cursor: pointer;
  flex: none;
}
.action-check:hover { border-color: var(--ink-soft); }

.action-text { font-size: var(--fs-base); font-weight: 500; color: var(--ink); }
.action-due  { font-size: var(--fs-xs); color: var(--ink-whisper); margin-top: 2px; }

/* ===================== BETAAL-TERMIJNEN (tabel-achtig) ===================== */
.payments { display: flex; flex-direction: column; }
.pay {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  gap: var(--sp-4);
  align-items: baseline;
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--rule);
}
.pay:first-child { padding-top: var(--sp-2); }
.pay:last-child { border-bottom: 0; }
.pay-num {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--ink-whisper);
  font-weight: 400;
  font-variant-numeric: oldstyle-nums;
}
.pay[data-status="paid"] .pay-num { color: var(--ink); }
.pay[data-status="open"] .pay-num { color: var(--accent); }

.pay-label { font-weight: 600; font-size: var(--fs-base); color: var(--ink); }
.pay-sub   { font-size: var(--fs-xs); color: var(--ink-whisper); margin-top: 2px; }
.pay-amount {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pay[data-status="paid"] .pay-amount { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--rule-strong); }

/* ===================== TICKET LIJST ===================== */
.tickets { display: flex; flex-direction: column; }
.ticket {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-start;
  gap: var(--sp-5);
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--rule);
}
.ticket:first-child { padding-top: var(--sp-2); }
.ticket:last-child { border-bottom: 0; }

.ticket-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 4px;
}
.ticket-meta { font-size: var(--fs-xs); color: var(--ink-whisper); margin-top: var(--sp-3); }
.ticket-body { color: var(--ink-soft); font-size: var(--fs-sm); line-height: var(--lh-loose); max-width: 58ch; }

/* ===================== FORMULIER ===================== */
.form { display: flex; flex-direction: column; gap: var(--sp-4); }
.form-row { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-label {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  font-size: var(--fs-base);
  color: var(--ink);
  font-family: var(--font-sans);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--ink-whisper); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-textarea { min-height: 140px; resize: vertical; line-height: var(--lh-norm); }
.form-hint { font-size: var(--fs-xs); color: var(--ink-whisper); }

.form-success {
  display: none;
  padding: var(--sp-4);
  border-radius: var(--r-sm);
  background: var(--ok-soft);
  color: oklch(32% 0.08 145);
  font-size: var(--fs-sm);
  font-weight: 500;
  border: 1px solid oklch(80% 0.04 145);
}
.form-success.is-visible { display: block; animation: rise var(--dur-2) var(--ease-out); }

.form-actions { display: flex; gap: var(--sp-3); justify-content: flex-end; padding-top: var(--sp-2); }

/* ===================== FACTUREN =====================
   Elke rij heeft EXPLICIET dezelfde kolommen zodat alles recht uitlijnt.
*/
.invoices { display: flex; flex-direction: column; }
.invoice {
  display: grid;
  grid-template-columns:
    40px                     /* icon */
    minmax(0, 1fr)           /* body */
    110px                    /* amount */
    130px                    /* due date */
    100px                    /* status */
    112px;                   /* download */
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--rule);
  transition: background var(--dur-1) var(--ease);
}
.invoice:last-child { border-bottom: 0; }
.invoice:hover { background: var(--surface-2); }

.invoice-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink-soft);
  display: grid; place-items: center;
  box-sizing: border-box;
  flex: none;
}
.invoice-icon .icon { width: 18px; height: 18px; }

/* "Gepland" (nog uit te sturen) — geen border, wel subtielere tint */
.invoice[data-status="planned"] .invoice-icon {
  background: transparent;
  color: var(--ink-whisper);
  box-shadow: inset 0 0 0 1px var(--rule-strong);
}

.invoice-body { min-width: 0; }
.invoice-num {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--ink);
  margin-bottom: 2px;
}
.invoice-desc {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
}
.invoice[data-status="planned"] .invoice-num { color: var(--ink-soft); }

.invoice-amount {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.invoice[data-status="paid"] .invoice-amount { color: var(--ink-soft); }
.invoice[data-status="planned"] .invoice-amount { color: var(--ink-whisper); }

.invoice-due {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.invoice .tag { justify-self: start; }
.invoice .btn { justify-self: end; }

@media (max-width: 800px) {
  .invoice {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: var(--sp-3); padding: var(--sp-4);
  }
  .invoice-amount, .invoice-due, .invoice .tag, .invoice .btn { display: none; }
}

/* Summary strip voor totalen (hergebruik snapshot-stijl) */
.totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  align-items: center;
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-5);
}
@media (max-width: 700px) { .totals { grid-template-columns: 1fr; } }
.totals-cell { display: flex; flex-direction: column; gap: 2px; }
.totals-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
}
.totals-value {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}
.totals-value.is-open { color: var(--accent-ink); }

/* ===================== ACCOUNTS ===================== */
.accounts-group {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--sp-5);
}
.accounts-group-head {
  padding: var(--sp-4) var(--sp-5) var(--sp-3);
  border-bottom: 1px solid var(--rule);
}
.accounts-group-title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.accounts-group-sub {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
  margin-top: 2px;
}

/* Accounts-lijst: naam/purpose + login + openen */
.account {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)         /* name + purpose */
    220px                  /* login chip */
    100px;                 /* openen */
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--rule);
  transition: background var(--dur-1) var(--ease);
}
.account:first-of-type { border-top: 0; }
.account:hover { background: var(--surface-2); }
.account-login { justify-self: start; }
.account-open { justify-self: end; }

@media (max-width: 800px) {
  .account {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--sp-3);
  }
  .account-login { display: none; }
}

.account-logo {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--ink-invert);
  flex: none;
  letter-spacing: -0.02em;
}
.account-body { min-width: 0; }
.account-name {
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--ink);
  margin-bottom: 2px;
  display: flex; align-items: center; gap: var(--sp-2);
}
.account-purpose {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
}
.account-login {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: var(--r-xs);
  border: 1px solid var(--rule);
  white-space: nowrap;
}
.account-open {
  color: var(--ink-soft);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 500;
}
.account-open:hover { color: var(--accent); background: var(--accent-softer); }
.account-open .icon { width: 13px; height: 13px; }

@media (max-width: 800px) {
  .account { grid-template-columns: auto 1fr; }
  .account-login, .account-open { grid-column: 2; }
}

/* Info-strip (voor de wachtwoord-notitie) */
.info-note {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--accent-softer);
  border: 1px solid oklch(from var(--accent) l c h / 0.18);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-5);
}
.info-note-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid; place-items: center;
  flex: none;
  margin-top: 1px;
}
.info-note-icon .icon { width: 12px; height: 12px; stroke-width: 2; }
.info-note-body {
  font-size: var(--fs-sm);
  color: var(--ink);
  line-height: var(--lh-norm);
}
.info-note-body strong { font-weight: 600; }

/* ===================== DOCUMENTEN ===================== */
.docs { display: flex; flex-direction: column; }
.doc {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--rule);
  transition: padding var(--dur-2) var(--ease);
}
.doc:first-child { padding-top: var(--sp-2); }
.doc:last-child { border-bottom: 0; }

.doc-type {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--ink-whisper);
  min-width: 44px;
  text-transform: uppercase;
  font-variant-numeric: oldstyle-nums;
  letter-spacing: 0.06em;
}

.doc-body { min-width: 0; }
.doc-name {
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--ink);
  display: block;
}
.doc-meta { font-size: var(--fs-xs); color: var(--ink-whisper); margin-top: 2px; }
.doc-date { font-size: var(--fs-sm); color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ===================== TOOLTIP ===================== */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px); right: 0;
  padding: 6px 10px;
  background: var(--ink);
  color: var(--ink-invert);
  font-size: var(--fs-xs);
  border-radius: var(--r-xs);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 20;
  animation: rise var(--dur-2) var(--ease-out);
}

/* ===================== CARDS & WIDGETS ===================== */
.frame {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.frame > .section-head {
  padding: var(--sp-4) var(--sp-5) var(--sp-3);
  margin: 0;
  border-bottom: 1px solid var(--rule);
}
.frame-body { padding: var(--sp-2) var(--sp-5) var(--sp-4); }
.frame-body.tight { padding: 0 var(--sp-5); }

/* Stat cards — 4 varianten, één krijgt emphasis */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-height: 112px;
  position: relative;
  transition: border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.stat:hover { border-color: var(--rule-strong); }

.stat-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
}
.stat-value {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink);
  margin-top: auto;
}
.stat-value.num { font-variant-numeric: tabular-nums; }
.stat-sub {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
}

/* Emphasis-variant: één card die eruit springt (bv. openstaande factuur) */
.stat.is-emphasis {
  background: var(--ink);
  color: var(--ink-invert);
  border-color: var(--ink);
}
.stat.is-emphasis .stat-label { color: oklch(75% 0.02 var(--brand-hue)); }
.stat.is-emphasis .stat-value { color: var(--ink-invert); }
.stat.is-emphasis .stat-sub   { color: oklch(75% 0.02 var(--brand-hue)); }

.stat.is-accent {
  background: var(--accent-soft);
  border-color: transparent;
}
.stat.is-accent .stat-label { color: var(--accent-ink); }
.stat.is-accent .stat-value { color: var(--accent-ink); }
.stat.is-accent .stat-sub { color: var(--accent-ink); opacity: 0.8; }

/* =========================================================
   ADMIN — kanban, wizard, tabs, modal, project context
   ========================================================= */

/* ---- Project context strip (boven sub-tabs) ---- */
.project-context {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.project-context-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--sp-5) var(--page-pad) 0;
}
.project-context-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.project-context-eyebrow {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
  margin-bottom: var(--sp-2);
}
.project-context-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.05;
}
.project-context-meta {
  display: flex; gap: var(--sp-3); flex-wrap: wrap;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  align-items: center;
  margin-top: var(--sp-2);
}
.project-context-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--rule-strong); }

/* ---- Tabs (binnen project) ---- */
.tabs {
  display: flex;
  gap: 0;
  margin: 0 calc(-1 * var(--page-pad));
  padding: 0 var(--page-pad);
  overflow-x: auto;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.tab:hover { color: var(--ink); }
.tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.tab-count {
  font-size: 11px;
  color: var(--ink-whisper);
  background: var(--surface-2);
  padding: 1px 7px;
  border-radius: var(--r-pill);
  font-variant-numeric: tabular-nums;
}
.tab.is-active .tab-count {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* ---- Kanban ---- */
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: var(--sp-4);
  overflow-x: auto;
  padding-bottom: var(--sp-4);
}
.kanban-col {
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  min-height: 400px;
}
.kanban-col-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--rule);
}
.kanban-col-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.kanban-col-title::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--col-dot, var(--ink-whisper));
}
.kanban-col[data-col="nieuw"]         { --col-dot: oklch(60% 0.01 var(--brand-hue)); }
.kanban-col[data-col="voorbereiding"] { --col-dot: oklch(60% 0.10 230); }
.kanban-col[data-col="actief"]        { --col-dot: var(--accent); }
.kanban-col[data-col="pauze"]         { --col-dot: var(--warn); }
.kanban-col[data-col="afgerond"]      { --col-dot: var(--ok); }

.kanban-col-count {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
  font-variant-numeric: tabular-nums;
}
.kanban-col-body {
  display: flex; flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-3);
  min-height: 0;
  flex: 1;
}

.kanban-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: var(--sp-4);
  display: flex; flex-direction: column;
  gap: var(--sp-3);
  cursor: grab;
  transition: border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
  text-decoration: none; color: inherit;
}
.kanban-card:hover {
  border-color: var(--rule-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.kanban-card:active { cursor: grabbing; }

.kanban-card-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
}
.kanban-card-title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.kanban-card-meta {
  display: flex; gap: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.kanban-card-meta .meta-item {
  display: inline-flex; align-items: center; gap: 4px;
}
.kanban-card-meta .icon { width: 12px; height: 12px; }
.kanban-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--rule);
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
}

/* ---- Wizard ---- */
.wizard {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--sp-7);
  align-items: start;
}
@media (max-width: 900px) {
  .wizard { grid-template-columns: 1fr; }
}

.wizard-steps {
  display: flex; flex-direction: column;
  gap: 0;
  position: sticky;
  top: calc(var(--topbar-h) + var(--sp-5));
}
.wizard-step {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0;
  color: var(--ink-whisper);
  font-size: var(--fs-sm);
  font-weight: 500;
  position: relative;
}
.wizard-step + .wizard-step::before {
  content: "";
  position: absolute;
  left: 13px; top: -8px; height: 16px;
  width: 1px;
  background: var(--rule-strong);
}
.wizard-step-marker {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--rule-strong);
  color: var(--ink-whisper);
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.wizard-step.is-done .wizard-step-marker {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--ink-invert);
}
.wizard-step.is-active {
  color: var(--ink);
  font-weight: 600;
}
.wizard-step.is-active .wizard-step-marker {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink-invert);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.wizard-panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  display: none;
}
.wizard-panel.is-active { display: block; }

.wizard-panel-head {
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--rule);
}
.wizard-panel-eyebrow {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
  margin-bottom: 4px;
}
.wizard-panel-title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}
.wizard-panel-sub {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}

.wizard-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
@media (max-width: 700px) { .wizard-grid-2 { grid-template-columns: 1fr; } }

.wizard-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--rule);
}

/* AI placeholder bovenaan wizard */
.ai-banner {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-5);
  background: linear-gradient(135deg, oklch(95% 0.04 var(--brand-hue)) 0%, oklch(94% 0.05 290) 100%);
  border: 1px solid oklch(from var(--accent) l c h / 0.22);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-5);
  position: relative;
  overflow: hidden;
}
.ai-banner-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-sm);
  background: oklch(99% 0.003 var(--brand-hue));
  display: grid; place-items: center;
  color: var(--accent);
  flex: none;
}
.ai-banner-icon .icon { width: 26px; height: 26px; }
.ai-banner-body { min-width: 0; }
.ai-banner-title {
  display: flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.ai-banner-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: var(--ink-invert);
  padding: 2px 8px;
  border-radius: var(--r-pill);
}
.ai-banner-text {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: var(--lh-norm);
}

/* Repeatable rows binnen wizard (fases / termijnen / accounts) */
.repeat-row {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  margin-bottom: var(--sp-3);
  position: relative;
}
.repeat-row-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2px;
}
.repeat-row-head-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
}
.repeat-row-cells {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-3);
}
.repeat-row.simple .repeat-row-cells {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 700px) {
  .repeat-row-cells { grid-template-columns: 1fr; }
}
.repeat-row-remove {
  width: 28px; height: 28px;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--ink-whisper);
  border: 1px solid transparent;
  display: grid; place-items: center;
  cursor: pointer;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.repeat-row-remove:hover { color: var(--accent); border-color: var(--rule-strong); }
.repeat-row-remove .icon { width: 14px; height: 14px; }

.add-row-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border: 1px dashed var(--rule-strong);
  background: transparent;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 500;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
  width: 100%;
  justify-content: center;
}
.add-row-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.add-row-btn .icon { width: 14px; height: 14px; }

/* Kanban die exact past in de beschikbare breedte (geen H-scroll)
   Aantal kolommen via --cols variabele (default 4). */
.kanban.kanban-fit {
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  overflow-x: visible;
}
@media (max-width: 1200px) {
  .kanban.kanban-fit { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .kanban.kanban-fit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .kanban.kanban-fit { grid-template-columns: 1fr; }
}

/* ---- Werkboard task-card (compactere kanban-card variant) ---- */
.kanban-col[data-col="todo"]      { --col-dot: oklch(60% 0.01 var(--brand-hue)); }
.kanban-col[data-col="bezig"]     { --col-dot: var(--accent); }
.kanban-col[data-col="wachten"]   { --col-dot: var(--warn); }
.kanban-col[data-col="klaar"]     { --col-dot: var(--ok); }

.task-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: var(--sp-3) var(--sp-4);
  display: flex; flex-direction: column;
  gap: 8px;
  cursor: grab;
  transition: border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
  text-decoration: none; color: inherit;
}
.task-card:hover {
  border-color: var(--rule-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.task-card:active { cursor: grabbing; }

.task-card-project {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
}
.task-card-project::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--task-color, var(--accent));
  flex: none;
}
.task-card-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.task-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
}
.task-card-foot .due { font-variant-numeric: tabular-nums; }

/* Project kleur-tokens */
.task-card[data-project="smito"]      { --task-color: oklch(66% 0.14 38);  }
.task-card[data-project="heyfox"]     { --task-color: oklch(60% 0.13 230); }
.task-card[data-project="visser"]     { --task-color: oklch(60% 0.13 145); }
.task-card[data-project="studio-maan"]{ --task-color: oklch(58% 0.13 290); }
.task-card[data-project="studio"]     { --task-color: oklch(50% 0.05 var(--brand-hue)); }

/* ===================== TASK LIST ROWS =====================
   Voor lijsten op admin-taken + portaal-taken. Bouwt op .task-card,
   maar met een rij-layout: tekst links, acties rechts, compact en netjes. */
.task-card-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-4);
  align-items: center;
}
.task-card-row > *:first-child { min-width: 0; }

.task-card-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 600;
  margin-bottom: 4px;
}
.task-card-body {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.5;
  margin-top: 4px;
}
.task-card-meta {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
  margin-top: 6px;
}
.task-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
.task-card[data-state="done"] { opacity: 0.7; background: var(--surface-2); }
.task-card[data-state="done"] .task-card-title { text-decoration: line-through; color: var(--ink-soft); }

/* Lijst-container: space tussen rijen */
[data-taken] .task-card,
[data-list="taken"] .task-card {
  cursor: default;
  margin-bottom: var(--sp-2);
}
[data-taken] .task-card:last-child,
[data-list="taken"] .task-card:last-child { margin-bottom: 0; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: oklch(18% 0.02 var(--brand-hue) / 0.6);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
  animation: fade-in var(--dur-2) var(--ease-out);
}
.modal-overlay.is-open { display: flex; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pop-in var(--dur-2) var(--ease-out);
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: var(--sp-5) var(--sp-5) var(--sp-3);
}
.modal-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-whisper);
  display: grid; place-items: center;
  cursor: pointer;
}
.modal-close:hover { color: var(--ink); background: var(--surface-2); }
.modal-close .icon { width: 16px; height: 16px; }
.modal-body { padding: 0 var(--sp-5) var(--sp-5); }
.modal-foot {
  display: flex; justify-content: flex-end; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface-2);
  border-top: 1px solid var(--rule);
}

/* ---- Role chip (Eigenaar / Medewerker / Junior) ---- */
.role-chip {
  display: inline-flex; align-items: center;
  padding: 2px 7px;
  border-radius: var(--r-xs);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
  flex: none;
}
.role-chip[data-role="eigenaar"] {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.role-chip[data-role="medewerker"] {
  background: oklch(94% 0.03 230);
  color: oklch(40% 0.12 230);
}
.role-chip[data-role="junior"] {
  background: oklch(94% 0.03 150);
  color: oklch(40% 0.1 150);
}

/* Sidebar user-block met rol */
.user-card-role {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.user-card-role::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- Team member list ---- */
.team-list {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.team-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 120px auto auto auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--rule);
}
.team-row:first-of-type { border-top: 0; }
.team-row:hover { background: var(--surface-2); }

.team-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  flex: none;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.team-avatar[data-color="blue"]   { background: oklch(94% 0.03 230); color: oklch(40% 0.12 230); }
.team-avatar[data-color="green"]  { background: oklch(94% 0.03 150); color: oklch(40% 0.1 150); }
.team-avatar[data-color="purple"] { background: oklch(94% 0.03 290); color: oklch(40% 0.12 290); }

.team-name {
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--ink);
  margin-bottom: 2px;
}
.team-email {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
}
.team-projects {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
}
.team-last {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
}

@media (max-width: 900px) {
  .team-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .team-projects, .team-last { display: none; }
}

/* ---- Activity log ---- */
.activity {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.activity-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 140px 100px;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--rule);
}
.activity-row:first-of-type { border-top: 0; }
.activity-row:hover { background: var(--surface-2); }

.activity-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-ink);
  flex: none;
}
.activity-avatar[data-color="blue"]   { background: oklch(94% 0.03 230); color: oklch(40% 0.12 230); }
.activity-avatar[data-color="green"]  { background: oklch(94% 0.03 150); color: oklch(40% 0.1 150); }
.activity-avatar[data-color="purple"] { background: oklch(94% 0.03 290); color: oklch(40% 0.12 290); }

.activity-text {
  font-size: var(--fs-sm);
  color: var(--ink);
  line-height: 1.4;
}
.activity-text strong { font-weight: 600; }
.activity-text em {
  font-style: normal;
  color: var(--ink-soft);
}
.activity-project {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
  display: inline-flex; align-items: center; gap: 6px;
}
.activity-project::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--task-color, var(--accent));
  flex: none;
}
.activity-project[data-project="smito"]       { --task-color: oklch(66% 0.14 38);  }
.activity-project[data-project="heyfox"]      { --task-color: oklch(60% 0.13 230); }
.activity-project[data-project="visser"]      { --task-color: oklch(60% 0.13 145); }
.activity-project[data-project="studio-maan"] { --task-color: oklch(58% 0.13 290); }
.activity-project[data-project="studio"]      { --task-color: oklch(50% 0.05 var(--brand-hue)); }
.activity-time {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 800px) {
  .activity-row { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .activity-project { display: none; }
}

/* ---- Drafts awaiting approval (dashboard widget) ---- */
.drafts-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-4) var(--sp-5);
  background: oklch(from var(--warn) l c h / 0.08);
  border: 1px solid oklch(from var(--warn) l c h / 0.22);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-5);
}
.drafts-banner-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: oklch(from var(--warn) l c h / 0.2);
  color: oklch(from var(--warn) calc(l - 0.1) c h);
  display: grid; place-items: center;
  flex: none;
}
.drafts-banner-icon .icon { width: 15px; height: 15px; stroke-width: 2; }
.drafts-banner-title {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--ink);
}
.drafts-banner-sub {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  margin-top: 2px;
}

/* ---- Avatar stack (multi-user) ---- */
.avatar-stack {
  display: inline-flex;
}
.avatar-stack .av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  border: 2px solid var(--surface);
  margin-left: -8px;
  box-sizing: content-box;
}
.avatar-stack .av:first-child { margin-left: 0; }

/* ---- Inbox-rij (cross-project tickets) ---- */
.inbox {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.inbox-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 140px 110px 100px;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--rule);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background var(--dur-1) var(--ease);
}
.inbox-row:first-child { border-top: 0; }
.inbox-row:hover { background: var(--surface-2); }
.inbox-row[data-state="unread"] { background: oklch(from var(--accent) l c h / 0.04); }
.inbox-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-whisper);
}
.inbox-row[data-state="unread"] .inbox-dot { background: var(--accent); }
.inbox-row[data-state="answered"] .inbox-dot { background: var(--ok); }

.inbox-body { min-width: 0; }
.inbox-subject {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--ink);
  margin-bottom: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.inbox-snippet {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.inbox-project {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
}
.inbox-meta { font-size: var(--fs-xs); color: var(--ink-whisper); text-align: right; }

@media (max-width: 800px) {
  .inbox-row { grid-template-columns: auto 1fr auto; }
  .inbox-project, .inbox-meta { display: none; }
}

/* ---- Update editor (basic) ---- */
.editor {
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.editor-toolbar {
  display: flex; gap: 2px;
  padding: 6px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--rule);
}
.editor-toolbar button {
  width: 30px; height: 30px;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--ink-soft);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.editor-toolbar button:hover { background: var(--surface); color: var(--ink); }
.editor-toolbar button .icon { width: 14px; height: 14px; }
.editor-area {
  min-height: 200px;
  padding: var(--sp-4);
  font-size: var(--fs-base);
  line-height: var(--lh-loose);
  color: var(--ink);
  background: var(--surface);
  outline: 0;
}
.editor-area:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-whisper);
}

.editor-attachments {
  display: flex; gap: var(--sp-2); flex-wrap: wrap;
  padding: var(--sp-3);
  border-top: 1px solid var(--rule);
  background: var(--surface-2);
}
.attachment-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--rule);
  font-size: var(--fs-xs);
  color: var(--ink-soft);
}
.attachment-chip .icon { width: 12px; height: 12px; }

/* ---- Admin dashboard urgentie-rij ---- */
.urg-list {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.urg-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background var(--dur-1) var(--ease);
}
.urg-row:first-child { border-top: 0; }
.urg-row:hover { background: var(--surface-2); }
.urg-icon {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
}
.urg-icon .icon { width: 15px; height: 15px; }
.urg-icon.tone-warn { background: var(--warn-soft); color: var(--warn); }
.urg-icon.tone-accent { background: var(--accent-soft); color: var(--accent-ink); }
.urg-icon.tone-info { background: var(--info-soft); color: var(--info); }
.urg-text {
  font-size: var(--fs-sm); color: var(--ink); font-weight: 500;
}
.urg-project {
  font-size: var(--fs-xs); color: var(--ink-whisper); margin-top: 2px;
}
.urg-due { font-size: var(--fs-xs); color: var(--ink-soft); }

/* ===================== STACKS ===================== */
.stack    { display: flex; flex-direction: column; gap: var(--sp-5); }
.stack-lg { display: flex; flex-direction: column; gap: var(--sp-7); }
.row      { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }

/* ===================== CONTACT RAIL CARD ===================== */
.contact-rail {
  background: linear-gradient(
    160deg,
    var(--surface) 0%,
    var(--accent-softer) 100%
  );
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.contact-rail-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.contact-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  flex: none;
}
.contact-eyebrow {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--accent-ink);
  font-weight: 600;
  margin-bottom: 2px;
}
.contact-name {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.contact-line {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: var(--lh-norm);
}
.contact-rail .btn { align-self: flex-start; }

/* ===================== NAV BADGE (count) ===================== */
.nav-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}
.nav-item.is-active .nav-badge {
  background: var(--accent);
  color: var(--ink-invert);
}

/* ===================== FILTER TABS ===================== */
.filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 3px;
}
.filter-tab {
  padding: 6px 14px;
  border-radius: var(--r-xs);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-tab:hover { color: var(--ink); }
.filter-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.filter-tab-count {
  font-size: 11px;
  color: var(--ink-whisper);
  font-variant-numeric: tabular-nums;
}
.filter-tab.is-active .filter-tab-count { color: var(--ink-soft); }

/* ===================== TAKEN OVERVIEW ===================== */
.taken-list {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.task-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 110px 100px 130px 20px;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--rule);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
  color: inherit;
  text-decoration: none;
}
.task-row:first-child { border-top: 0; }
.task-row:hover { background: var(--surface-2); }
.task-row:hover .task-chevron { transform: translateX(3px); color: var(--accent); }

.task-icon {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid; place-items: center;
  flex: none;
}
.task-icon .icon { width: 15px; height: 15px; stroke-width: 1.75; }
.task-row[data-state="done"] .task-icon {
  background: oklch(from var(--ok) l c h / 0.15);
  color: var(--ok);
}

.task-body { min-width: 0; }
.task-title {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin-bottom: 2px;
}
.task-row[data-state="done"] .task-title {
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: var(--rule-strong);
}
.task-meta {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
}

.task-type-chip {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  text-align: center;
  white-space: nowrap;
}

.task-priority-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-whisper);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  text-align: center;
}
.task-priority-chip.is-high {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: transparent;
}
.task-priority-chip.is-done {
  background: oklch(from var(--ok) l c h / 0.15);
  color: var(--ok);
  border-color: transparent;
}

.task-due {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.task-chevron {
  width: 16px; height: 16px;
  color: var(--ink-whisper);
  transition: transform var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

@media (max-width: 800px) {
  .task-row { grid-template-columns: 32px minmax(0, 1fr) auto 20px; }
  .task-type-chip, .task-due { display: none; }
}

/* ===================== TASK DETAIL PAGE ===================== */
.task-detail {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--sp-6);
  align-items: start;
}
@media (max-width: 1000px) {
  .task-detail { grid-template-columns: 1fr; }
}

.task-header {
  padding-bottom: var(--sp-5);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--rule);
}
.task-header-chips {
  display: flex; gap: var(--sp-2); flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.task-header h1 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: var(--sp-3);
}
.task-header-lead {
  font-size: var(--fs-md);
  color: var(--ink-soft);
  line-height: var(--lh-norm);
  max-width: 60ch;
}

/* Task-info panel: verticale stack van meta + context + contact */
.task-info {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.task-info-section {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--rule);
}
.task-info-section:first-child { border-top: 0; }

.task-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-3);
  padding: 6px 0;
}
.task-info-row:first-of-type { padding-top: 0; }
.task-info-row:last-of-type { padding-bottom: 0; }

.task-info-label {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
  font-weight: 500;
}
.task-info-value {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}
.task-info-value.is-open { color: var(--accent-ink); }
.task-info-value.is-done { color: var(--ok); }

.task-info-section-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
  margin-bottom: var(--sp-2);
}
.task-info-title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.task-info-text {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: var(--lh-norm);
}
.task-info-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent-ink);
  margin-top: var(--sp-3);
  transition: color var(--dur-1) var(--ease);
}
.task-info-link:hover { color: var(--accent); }
.task-info-link .icon { width: 13px; height: 13px; }

/* Action panel — waar de taak wordt uitgevoerd */
.task-action {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-6);
}
.task-action-head {
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--rule);
}
.task-action-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.task-action-hint {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}

/* Dropzone (Upload type) */
.dropzone {
  border: 2px dashed var(--rule-strong);
  border-radius: var(--r-md);
  padding: var(--sp-7) var(--sp-5);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
  background: var(--surface-2);
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--accent);
  background: var(--accent-softer);
}
.dropzone-icon {
  width: 44px; height: 44px;
  margin: 0 auto var(--sp-3);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--accent);
  display: grid; place-items: center;
}
.dropzone-icon .icon { width: 22px; height: 22px; }
.dropzone-title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.dropzone-hint {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}
.dropzone input[type="file"] { display: none; }

.upload-preview {
  display: none;
  padding: var(--sp-4);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  align-items: center;
  gap: var(--sp-3);
}
.upload-preview.is-visible { display: flex; }
.upload-preview-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid; place-items: center;
  flex: none;
}
.upload-preview-icon .icon { width: 18px; height: 18px; }
.upload-preview-body { flex: 1; min-width: 0; }
.upload-preview-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.upload-preview-size {
  font-size: var(--fs-xs);
  color: var(--ink-whisper);
}

/* Repeatable form rows (Formulier type) */
.form-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.form-list-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--sp-3);
  align-items: flex-start;
}
.form-list-remove {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink-whisper);
  border: 1px solid var(--rule);
  display: grid; place-items: center;
  cursor: pointer;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.form-list-remove:hover { color: var(--accent); border-color: var(--accent); }
.form-list-remove .icon { width: 14px; height: 14px; }

/* Akkoord panel */
.approval {
  padding: var(--sp-5);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--surface-2);
  margin-bottom: var(--sp-5);
}
.approval-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--ink-whisper);
  font-weight: 500;
  margin-bottom: var(--sp-2);
}
.approval-item {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-2);
}
.approval-item a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: oklch(from var(--accent-ink) l c h / 0.3);
  text-underline-offset: 3px;
}

/* Info block */
.info-block {
  padding: var(--sp-5);
  background: var(--accent-softer);
  border: 1px solid oklch(from var(--accent) l c h / 0.18);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-5);
}
.info-block h3 {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--sp-2);
}
.info-block p {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: var(--lh-loose);
  margin-bottom: var(--sp-2);
}

/* Afgerond-state voor task detail */
.task-done-banner {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: oklch(from var(--ok) l c h / 0.1);
  border: 1px solid oklch(from var(--ok) l c h / 0.25);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-5);
}
.task-done-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ok);
  color: var(--ink-invert);
  display: grid; place-items: center;
  flex: none;
}
.task-done-icon .icon { width: 16px; height: 16px; stroke-width: 2.5; }
.task-done-title {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--ink);
}
.task-done-sub {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  margin-top: 2px;
}

/* ===================== DISPLAY FONT OVERRIDES =====================
   Bricolage Grotesque is variable — use weight 500 als default voor
   alle display-font toepassingen (titels, grote cijfers, nummers).
   Oldstyle-nums uit (werkt niet op Bricolage).
*/
.hero-title,
.week-dial-num,
.page-title,
.section-title,
.stat-value,
.phase-num,
.pay-num,
.pay-amount,
.update-title,
.update-date strong,
.ticket-title,
.sidebar-brand-name,
.user-avatar,
.doc-type {
  font-weight: 500;
  font-variant-numeric: normal;
}

/* Nummers met tabular-nums waar nodig */
.stat-value.num,
.week-dial-num .num,
.phase-num,
.pay-amount,
.pay-num,
.update-date .num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Hero titel nog iets zwaarder voor presence */
.hero-title { font-weight: 600; letter-spacing: -0.035em; }
.page-title { font-weight: 600; letter-spacing: -0.03em; }
.week-dial-num { font-weight: 600; letter-spacing: -0.05em; }
