/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --accent:      #2563eb;
  --accent-dark: #1d4ed8;
  --accent-licht:#eef2ff;
  --tekst:       #1a1a2e;
  --tekst-zacht: #5a6070;
  --tekst-muted: #94a3b8;
  --rand:        #e2e8f0;
  --wit:         #ffffff;
  --achter:      #fafbfc;
  --succes:      #22c55e;
  --radius:      12px;
  --schaduw:     0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --font-main:   "Inter", "Segoe UI", Arial, sans-serif;
  --font-mono:   "JetBrains Mono", "Courier New", Consolas, monospace;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  color: var(--tekst);
  background: var(--wit);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Header ────────────────────────────────────────────────────── */
.header {
  background: var(--wit);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 15px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  letter-spacing: -0.02em;
}
.logo-text { font-weight: 600; font-size: 15px; color: #1e293b; }
.logo-sub { font-size: 12px; color: var(--tekst-muted); margin-left: 6px; }
.header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-email {
  font-size: 13px;
  font-weight: 400;
  color: var(--accent);
  text-decoration: none;
}
.header-email:hover {
  color: var(--accent);
  text-decoration: underline;
}
.ai-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-licht);
  border: 1px solid rgba(37, 99, 235, .2);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  background: var(--wit);
  color: var(--tekst);
  padding: 64px 24px 56px;
  border-bottom: 2px solid var(--accent);
}
.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.hero-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tekst-muted);
  margin-bottom: 20px;
}
.hero-title {
  font-family: var(--font-main);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 12px;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 16px;
  color: var(--tekst-zacht);
  margin-bottom: 36px;
  line-height: 1.5;
}

/* Search box */
.search-box {
  background: white;
  border-radius: var(--radius);
  border: 1px solid #d1d5db;
  display: flex;
  align-items: flex-end;
  gap: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(37,99,235,.12);
}
.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 16px 20px;
  font-family: var(--font-main);
  font-size: 15px;
  color: var(--tekst);
  resize: none;
  min-height: 56px;
  max-height: 160px;
  overflow-y: auto;
  background: transparent;
}
.search-input::placeholder { color: #b0b8c8; }
.search-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0 24px;
  height: 56px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background .15s;
}
.search-btn:hover { background: var(--accent-dark); }

.search-hint {
  font-size: 12px;
  color: var(--tekst-muted);
  margin-top: 12px;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: -4px 0 24px;
}
.mode-btn {
  border: 1px solid #d1d5db;
  background: var(--wit);
  color: var(--tekst);
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  transition: all .15s;
}
.mode-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-licht);
}

/* Quick tags — neutrale grijze stijl */
.quick-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tag {
  background: var(--wit);
  color: var(--tekst-zacht);
  border: 1px solid #d1d5db;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-licht);
}

/* ── Footer / Disclaimer ──────────────────────────────────────── */
.site-footer {
  background: #f8fafc;
  border-top: 1px solid var(--rand);
  padding: 28px 24px;
  text-align: center;
}
.site-footer-inner {
  max-width: 760px;
  margin: 0 auto;
}
.disclaimer-tekst {
  font-size: 12px;
  line-height: 1.7;
  color: #64748b;
}
.footer-links {
  margin-top: 14px;
  font-size: 12px;
  color: var(--tekst-muted);
}
.footer-links a {
  color: var(--tekst-zacht);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Procesontwerper */
.proces-ontwerper {
  padding: 32px 24px;
  background: var(--achter);
}
.proces-ontwerper-inner {
  max-width: 1400px;
  margin: 0 auto;
  background: var(--wit);
  border: 1px solid var(--rand);
  box-shadow: var(--schaduw);
  border-radius: var(--radius);
}
.proces-ontwerper-header {
  align-items: center;
  border-bottom: 1px solid var(--rand);
  display: flex;
  justify-content: space-between;
  padding: 18px 22px;
}
.proces-kicker {
  color: var(--tekst-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  margin: 0 0 3px;
  text-transform: uppercase;
}
.proces-ontwerper-header h2 {
  color: var(--tekst);
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}
#proces-ontwerp-inhoud {
  padding: 20px;
}
.proces-bronnen {
  border-top: 1px solid var(--rand);
  padding: 18px 22px 22px;
}
.proces-bronnen h3 {
  color: var(--tekst);
  font-size: 15px;
  margin: 0 0 10px;
}
.proces-bron-item {
  border-top: 1px solid var(--rand);
  padding: 9px 0;
}
.proces-leeg {
  background: #fef9ec;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 14px;
  padding: 14px 18px;
  border-radius: 8px;
}
.proces-intake-paneel {
  border-bottom: 1px solid var(--rand);
  padding: 18px 22px;
}
.proces-intake-kop {
  margin-bottom: 14px;
}
.proces-intake-kop h3 {
  color: var(--tekst);
  font-size: 18px;
  margin: 0;
}
.proces-intake-kop p {
  color: var(--tekst-muted);
  font-size: 13px;
  margin: 6px 0 0;
}
.proces-wens-veld {
  display: grid;
  gap: 6px;
}
.proces-wens-veld span,
.proces-verfijn span {
  color: var(--tekst-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.proces-wens-veld textarea {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: 7px;
  color: var(--tekst);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  min-height: 112px;
  padding: 12px 13px;
  resize: vertical;
}
.proces-verfijn {
  border: 1px solid var(--rand);
  border-radius: 8px;
  margin-top: 14px;
  padding: 0;
}
.proces-verfijn summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style-position: inside;
  padding: 12px 14px;
}
.proces-verfijn .proces-intake-grid {
  border-top: 1px solid var(--rand);
  padding: 14px;
}
.proces-intake-grid {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(2, minmax(180px, 1fr));
  gap: 12px;
}
.proces-intake-grid label {
  display: grid;
  gap: 6px;
}
.proces-intake-grid span {
  color: var(--tekst-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.proces-intake-grid input,
.proces-intake-grid select,
.proces-intake-grid textarea {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: 7px;
  color: var(--tekst);
  font-family: var(--font-main);
  font-size: 13px;
  min-height: 40px;
  padding: 9px 11px;
  resize: vertical;
}
.proces-intake-grid textarea {
  min-height: 76px;
}
.proces-intake-start {
  background: #1e293b;
  border: 1px solid #1e293b;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  margin-top: 14px;
  padding: 10px 14px;
  transition: background .15s;
}
.proces-intake-start:hover {
  background: #0f172a;
}
.organigram-paneel {
  border-bottom: 1px solid var(--rand);
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 12px 18px;
  padding: 18px 22px;
}
.organigram-paneel h3 {
  color: var(--tekst);
  font-size: 18px;
  margin: 0;
}
.organigram-upload {
  align-self: center;
  background: #1e293b;
  border: 1px solid #1e293b;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  transition: background .15s;
}
.organigram-upload:hover { background: #0f172a; }
.organigram-refresh {
  align-self: center;
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: 7px;
  color: var(--tekst);
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  transition: all .15s;
}
.organigram-refresh:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.organigram-upload input {
  display: none;
}
.organigram-status {
  color: var(--tekst-muted);
  font-size: 13px;
  grid-column: 1 / -1;
}
.organigram-eenheden {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  max-height: 190px;
  overflow: auto;
  padding-right: 4px;
}
.organigram-chip {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: 8px;
  color: var(--tekst);
  cursor: pointer;
  display: grid;
  gap: 2px;
  min-height: 44px;
  min-width: 120px;
  padding: 8px 10px;
  text-align: left;
  transition: all .15s;
}
.organigram-chip span {
  font-size: 13px;
  font-weight: 700;
}
.organigram-chip small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.25;
}
.organigram-chip.actief {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
}
.organigram-chip.actief small {
  color: #cbd5e1;
}
.proces-acties {
  border-bottom: 1px solid var(--rand);
  display: flex;
  justify-content: flex-end;
  padding: 16px 22px;
}
@media (max-width: 1100px) {
  .proces-intake-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .proces-intake-grid,
  .organigram-paneel {
    grid-template-columns: 1fr;
  }
  .organigram-upload,
  .organigram-refresh {
    justify-self: start;
  }
}

/* ── Resultaten layout ─────────────────────────────────────────── */
.resultaten {
  padding: 32px 24px;
  background: var(--achter);
}

.resultaten-inner {
  max-width: 1700px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.content {
  min-width: 0;
}

.sidebar,
.kaarten-kolom {
  background: var(--wit);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 20px;
}

.kompas-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kompas-header {
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:16px;
}

.kompas-icon {
    font-size:22px;
}

.kompas-title {
    font-size:18px;
    font-weight:700;
    color:#1f2937;
}

.kompas-subtitle {
    font-size:12px;
    color:#6b7280;
}

.kompas-lijst {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kompas-item {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.kompas-item strong {
  display: block;
  font-size: 12px;
  color: var(--tekst);
  margin-bottom: 4px;
}

.kompas-waarde {
  font-size: 13px;
  color: var(--tekst-zacht);
  line-height: 1.5;
}

.kaarten-kolom-header {
  margin-bottom: 12px;
}

.kaarten-kolom-header h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--tekst);
}

.kaarten-kolom-header p {
  margin: 0;
  font-size: 13px;
  color: var(--tekst-zacht);
}

@media (max-width: 1024px) {
  .resultaten-inner {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .kaarten-kolom {
    width: 100%;
  }
}

/* ── Loader ────────────────────────────────────────────────────── */
.loader {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 20px;
  color: var(--tekst-zacht);
  font-size: 14px;
}
.loader.actief { display: flex; }
.loader-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--rand);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Kaarten ───────────────────────────────────────────────────── */
.analyse-kaart, .vragen-kaart, .advies-kaart {
  background: var(--wit);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--schaduw);
}

/* Badges */
.badges { display: flex; gap: 12px; flex-wrap: wrap; }
.badge {
  background: var(--achter);
  border: 1px solid var(--rand);
  border-radius: 8px;
  padding: 10px 16px;
  min-width: 120px;
}
.badge-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--tekst-muted);
  margin-bottom: 4px;
}
.badge-value { font-size: 14px; font-weight: 600; }

/* Vragen */
.vraag-item { margin-bottom: 16px; }
.vraag-item label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.vraag-item input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--rand);
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.vraag-item input:focus { border-color: var(--accent); }

/* Advies inhoud */
.advies-acties {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.btn-actie {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--wit);
  font-family: var(--font-main);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.btn-actie:hover { border-color: var(--accent); background: var(--accent-licht); }
.btn-suggestie {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
  margin-left: auto;
}
.btn-suggestie:hover {
  background: #16a34a;
  border-color: #16a34a;
}

.suggestie-paneel {
  background: #f8fafc;
  border: 1px solid var(--rand);
  border-radius: 8px;
  margin: 0 0 20px;
  max-width: 760px;
  padding: 14px;
}
.suggestie-paneel label {
  color: #061735;
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.suggestie-paneel textarea {
  border: 1px solid var(--rand);
  border-radius: 6px;
  color: #061735;
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  min-height: 86px;
  padding: 10px 12px;
  resize: vertical;
  width: 100%;
}
.suggestie-paneel textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.suggestie-acties {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}
.btn-secundair {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: 8px;
  color: #0f172a;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
}
.btn-secundair:hover {
  background: #f8fafc;
  border-color: var(--accent);
}

.advies-inhoud {
  max-width: 860px;
  margin: 0 auto;
  color: #061735;
  font-size: 14px;
  line-height: 1.7;
}
.advies-tekst {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  text-align: left;
}
.advies-inhoud h2 {
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.28;
  margin: 30px 0 12px;
  color: #0f172a;
  border-bottom: 0;
  padding-bottom: 0;
}
.advies-inhoud h2:first-child {
  margin-top: 0;
  color: #0f172a;
  font-size: 23px;
}
.advies-inhoud h3 {
  font-family: var(--font-main);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  margin: 24px 0 9px;
  color: #0f172a;
}
.advies-inhoud h4 {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  margin: 18px 0 7px;
  color: #0f172a;
}
.advies-inhoud p {
  font-size: 14px;
  margin-bottom: 13px;
  line-height: 1.62;
}
.advies-inhoud ul, .advies-inhoud ol {
  padding-left: 28px;
  margin: 0 0 18px 16px;
}
.advies-inhoud li {
  font-size: 14px;
  margin-bottom: 7px;
  line-height: 1.58;
  padding-left: 6px;
}
.advies-inhoud strong { font-weight: 700; color: #0f172a; }
.advies-inhoud a { color: var(--accent); text-decoration: none; }
.advies-inhoud a:hover { text-decoration: underline; }
.advies-inhoud code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* Markdown content for chat messages */
.markdown-content p {
  font-size: 14px;
  margin-bottom: 13px;
  line-height: 1.62;
}
.markdown-content ul, .markdown-content ol {
  padding-left: 28px;
  margin: 0 0 16px 16px;
}
.markdown-content li {
  font-size: 14px;
  margin-bottom: 6px;
  line-height: 1.58;
  padding-left: 6px;
}
.markdown-content h2, .markdown-content h3 {
  font-family: var(--font-main);
  font-weight: 700;
  margin: 20px 0 10px;
  color: #0f172a;
}
.markdown-content h2 { font-size: 18px; }
.markdown-content h3 { font-size: 16px; }
.markdown-content strong { font-weight: 700; color: #0f172a; }
.markdown-content a { color: var(--accent); text-decoration: none; }
.markdown-content a:hover { text-decoration: underline; }
.markdown-content code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.advies-inhoud table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  margin: 18px 0 24px;
}
.advies-inhoud th {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  text-align: left;
}
.advies-inhoud th,
.advies-inhoud td {
  border: 1px solid var(--rand);
  padding: 9px 11px;
  vertical-align: top;
}
.advies-inhoud .afas-note {
  background: #f8fafc;
  border: 1px solid var(--rand);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  margin: 18px 0 24px;
}
.advies-inhoud .afas-note strong {
  display: block;
  margin-bottom: 8px;
}
.advies-inhoud .afas-note p {
  margin: 0;
}

/* Navigatiepad blok */
/* AFAS-achtige procesontwerp preview — neutrale kleuren */
.afas-workflow-preview {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  margin: 0 0 24px;
  overflow: hidden;
  border-radius: 8px;
}
.afas-preview-bar {
  min-height: 30px;
  background: #fff;
  border-top: 3px solid #1e293b;
  border-bottom: 1px solid #d7dee8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}
.afas-breadcrumb { color: #475569; font-size: 13px; }
.afas-preview-close {
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  cursor: default;
}
.afas-preview-title {
  background: #fff;
  border-bottom: 1px solid #d7dee8;
  color: #0f172a;
  font-size: 20px;
  font-weight: 700;
  padding: 10px 14px;
}
.afas-preview-shell {
  display: grid;
  grid-template-columns: 178px minmax(360px, 1fr) 260px;
  min-height: 390px;
}
.afas-toolbox,
.afas-properties {
  background: #f8fbff;
  border-right: 1px solid #d7dee8;
  padding: 10px;
}
.afas-properties {
  border-right: 0;
  border-left: 1px solid #d7dee8;
}
.afas-panel-title,
.afas-properties h4 {
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
}
.afas-panel-title {
  border-top: 1px solid #d7dee8;
  padding-top: 10px;
}
.afas-panel-title:first-child { border-top: 0; padding-top: 0; }
.afas-tool-item {
  background: #f1f5f9;
  border: 1px solid #d1d5db;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.25;
  margin-bottom: 8px;
  min-height: 32px;
  padding: 8px 10px;
}
.afas-tool-special {
  background: #dcfce7;
  border-color: #86efac;
}
.afas-tool-action {
  background: #e0e7ff;
  border-color: #a5b4fc;
}
.afas-canvas {
  background: #f4f7fb;
  overflow: auto;
}
.afas-toolbar {
  height: 38px;
  background: #fff;
  border-bottom: 1px solid #d7dee8;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}
.afas-toolbar span {
  width: 15px;
  height: 15px;
  border: 1px solid #64748b;
  background: #f8fafc;
}
.afas-toolbar input,
.afas-toolbar select {
  border: 1px solid #d7dee8;
  background: #fff;
  color: #475569;
  font-size: 12px;
  height: 26px;
  padding: 0 8px;
}
.afas-toolbar input { width: 170px; margin-left: auto; }
.procesplaat {
  background: #ffffff;
  border-bottom: 1px solid #d7dee8;
  padding: 14px 16px;
}
.procesplaat-kop {
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}
.procesplaat-flow {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.procesplaat-stap {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  min-width: 118px;
  max-width: 150px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px;
}
.procesplaat-nummer {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  background: #1e293b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}
.procesplaat-label {
  color: #0f172a;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.procesplaat-pijl {
  color: #64748b;
  display: grid;
  place-items: center;
  font-size: 18px;
  min-width: 16px;
}
.afas-flow {
  min-width: 760px;
  padding: 44px 36px;
  display: flex;
  align-items: flex-start;
}
.afas-flow-node-wrap {
  display: flex;
  align-items: center;
}
.afas-flow-node {
  width: 118px;
  min-height: 58px;
  background: #fff;
  border: 1px solid #cbd5e1;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 7px;
  padding: 8px;
  position: relative;
}
.afas-flow-node-start {
  background: #fef3c7;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
}
.afas-flow-node-end { background: #f1f5f9; }
.afas-node-icon {
  width: 20px;
  height: 20px;
  background: #e2e8f0;
  border: 1px solid #94a3b8;
  color: #475569;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
}
.afas-node-text {
  color: #0f172a;
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.afas-flow-line {
  width: 28px;
  border-top: 1px solid #94a3b8;
  position: relative;
}
.afas-flow-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  border-left: 6px solid #94a3b8;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.afas-properties section {
  border-bottom: 1px solid #d7dee8;
  padding: 0 0 12px;
  margin: 0 0 12px;
}
.afas-properties label {
  display: block;
  color: #475569;
  font-size: 12px;
  margin-bottom: 5px;
}
.afas-prop-field {
  background: #fff;
  border: 1px solid #d7dee8;
  color: #0f172a;
  font-size: 13px;
  min-height: 34px;
  padding: 8px 10px;
}
.afas-properties ul {
  margin: 0;
  padding-left: 18px;
}
.afas-properties li {
  color: #0f172a;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 5px;
}
.afas-preview-note {
  background: #fff;
  border-top: 1px solid #d7dee8;
  color: #64748b;
  font-size: 12px;
  padding: 9px 14px;
}
@media (max-width: 1024px) {
  .afas-preview-shell { grid-template-columns: 1fr; }
  .afas-toolbox, .afas-properties { display: none; }
  .afas-flow { min-width: 680px; }
}

.nav-pad {
  background: var(--accent-licht);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 8px 14px;
  margin: 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
}

/* Checkbox checklijst */
.advies-inhoud .check-item {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--rand);
}
.advies-inhoud .check-item:last-child { border-bottom: none; }
.check-box {
  font-size: 16px;
  line-height: 1.4;
  color: var(--tekst-zacht);
  flex-shrink: 0;
}
.check-done { opacity: .5; text-decoration: line-through; }

/* Feedback */
.feedback-sectie {
  border-top: 1px solid var(--rand);
  margin-top: 24px;
  padding-top: 16px;
}
.feedback-vraag { font-size: 14px; margin-bottom: 10px; }
.feedback-btns { display: flex; gap: 8px; }
.btn-feedback {
  padding: 8px 16px;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--wit);
  font-family: var(--font-main);
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.btn-feedback:hover { border-color: var(--accent); }
.btn-feedback:disabled { opacity: .5; cursor: not-allowed; }
.feedback-msg {
  font-size: 13px;
  color: var(--succes);
  margin-top: 10px;
  font-weight: 500;
}

/* Doorvragen */
.doorvraag-sectie {
  border-top: 1px solid var(--rand);
  margin-top: 16px;
  padding-top: 16px;
}
.doorvraag-label { font-size: 13px; color: var(--tekst-zacht); margin-bottom: 10px; }
.doorvraag-input { display: flex; gap: 8px; }
.doorvraag-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--rand);
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
}
.doorvraag-input input:focus { border-color: var(--accent); }

/* Bronnen */
.bronnen-sectie {
  border-top: 1px solid var(--rand);
  margin-top: 16px;
  padding-top: 16px;
}
.bronnen-titel { font-size: 13px; font-weight: 600; margin-bottom: 12px; }

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-opnieuw {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  border: 1px dashed var(--rand);
  border-radius: 8px;
  background: none;
  font-family: var(--font-main);
  font-size: 14px;
  color: var(--tekst-zacht);
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.btn-opnieuw:hover { border-color: var(--accent); color: var(--accent); }

/* ── Artikel kaarten (rechts) ──────────────────────────────────── */
.kaarten-kolom { position: sticky; top: 80px; }
.kaarten-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--tekst-zacht);
  margin-bottom: 12px;
}
.artikel-kaart {
  background: var(--wit);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.artikel-kaart:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(37,99,235,.08);
}
.artikel-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tekst-zacht);
  margin-bottom: 4px;
}
.artikel-titel {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 6px;
  line-height: 1.4;
}
.artikel-titel:hover { text-decoration: underline; }
.artikel-score {
  display: inline-block;
  background: var(--accent-licht);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

/* ── Index bijwerken modal ─────────────────────────────────────── */
.btn-admin {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--achter);
  color: var(--tekst-zacht);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.btn-admin:hover { background: var(--accent-licht); color: var(--accent); }

/* Modal overlay */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Modal venster */
.modal-venster {
  background: var(--wit);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  width: 100%;
  max-width: 600px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--rand);
  background: var(--achter);
}
.modal-header h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.modal-sluiten {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--tekst-zacht);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.modal-sluiten:hover { color: var(--tekst); }

.modal-body { padding: 24px; }

/* Opties */
.index-opties {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  font-size: 13px;
}
.index-opties input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}
.index-opties label { cursor: pointer; }
.index-opties small { color: var(--tekst-zacht); }

/* Progressbar */
.index-progress-wrap {
  margin-bottom: 16px;
}
.index-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--tekst-zacht);
  margin-bottom: 6px;
}
.index-progress-balk {
  height: 8px;
  background: var(--rand);
  border-radius: 4px;
  overflow: hidden;
}
.index-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  width: 0%;
  transition: width .3s ease;
}

/* Log output */
.index-log-wrap {
  margin-bottom: 16px;
}
.index-log-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tekst-zacht);
  margin-bottom: 6px;
}
.index-log {
  background: #0f1117;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  padding: 12px 14px;
  border-radius: 8px;
  height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.log-info   { color: #94a3b8; }
.log-succes { color: #4ade80; }
.log-warn   { color: #fbbf24; }
.log-error  { color: #f87171; }

/* Status badge */
.index-status {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  min-height: 20px;
}
.index-status.succes { color: var(--succes); }
.index-status.fout   { color: #ef4444; }

/* Footer knoppen */
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--rand);
  background: var(--achter);
}

/* ── AFAS Copilot Styles ────────────────────────────────────────── */
.sidebar-tabs {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.sidebar-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--tekst-zacht);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sidebar-tab:hover {
  color: var(--tekst);
}
.sidebar-tab.active {
  background: var(--wit);
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.sidebar-panel {
  display: none;
}
.sidebar-panel.active {
  display: block;
}

/* Copilot cards & blocks */
.copilot-state-message {
  text-align: center;
  padding: 32px 16px;
  color: var(--tekst-zacht);
}
.copilot-icon-container {
  font-size: 32px;
  margin-bottom: 12px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.copilot-state-message h3 {
  font-size: 16px;
  color: var(--tekst);
  margin-bottom: 6px;
}
.copilot-state-message p {
  font-size: 13px;
  line-height: 1.5;
}
.copilot-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 16px;
  color: var(--tekst-zacht);
  font-size: 13px;
}

.copilot-card {
  background: var(--wit);
  border: 1px solid var(--rand);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.copilot-card h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--tekst);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.copilot-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.copilot-card-header h4 {
  margin-bottom: 0;
}
.confidence-badge {
  font-size: 11px;
  font-weight: 700;
  color: #16a34a;
  background: #f0fdf4;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(22, 163, 74, 0.2);
}
.category-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-licht);
  padding: 2px 6px;
  border-radius: 4px;
}

.copilot-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.meta-item {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--rand);
}
.meta-lbl {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--tekst-muted);
}
.meta-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--tekst);
  margin-top: 2px;
}
.copilot-details-box {
  background: #f8fafc;
  border: 1px solid var(--rand);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  text-align: left;
}
.copilot-details-line {
  margin-bottom: 4px;
}
.copilot-details-line:last-child {
  margin-bottom: 0;
}
.copilot-details-line strong {
  color: var(--tekst-zacht);
}
.copilot-uitleg-text {
  font-size: 13px;
  color: var(--tekst-zacht);
  line-height: 1.5;
  text-align: left;
}

/* Intent buttons */
.intent-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.intent-btn {
  width: 100%;
  text-align: left;
  border: 1px solid var(--rand);
  background: var(--wit);
  color: var(--tekst-zacht);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.intent-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-licht);
}
.intent-btn.active {
  border-color: var(--accent-dark);
  color: var(--wit);
  background: var(--accent-dark);
}
.intent-pct {
  font-size: 11px;
  opacity: 0.8;
  font-weight: normal;
}
.intent-btn.active .intent-pct {
  opacity: 0.9;
}

/* Checklist items */
.checklist-intro {
  font-size: 12px;
  color: var(--tekst-zacht);
  margin-bottom: 8px;
}
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  text-align: left;
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--tekst-zacht);
}
.checklist-item input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--accent);
}
.checklist-item.checked {
  color: var(--tekst-muted);
  text-decoration: line-through;
  opacity: 0.7;
}

.copilot-action-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: none;
}
.copilot-advice-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--tekst);
  text-align: left;
}

/* Screenshot styling */
.upload-btn {
  background: transparent;
  border: none;
  color: var(--tekst-muted);
  cursor: pointer;
  height: 56px;
  padding: 0 12px 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.upload-btn:hover {
  color: var(--accent);
}
.search-box:focus-within .upload-btn {
  color: var(--tekst-zacht);
}

.upload-label {
  background: transparent;
  border: none;
  color: var(--tekst-muted);
  cursor: pointer;
  height: 56px;
  padding: 0 12px 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  border-left: 1px solid #e2e8f0;
}
.upload-label:hover {
  color: var(--accent);
}

.screenshot-preview-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid var(--rand);
  border-radius: 10px;
  padding: 8px;
  margin: 10px 0 0;
  max-width: 140px;
  width: fit-content;
  position: relative;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}
.screenshot-preview-img {
  height: 96px;
  width: 96px;
  max-height: 96px;
  max-width: 96px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: block;
}
.remove-screenshot-btn {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  position: absolute;
  top: -6px;
  right: -6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.remove-screenshot-btn:hover {
  background: #dc2626;
}

/* ── AI Kompas Compact Bar ─────────────────────────────────── */
.ai-kompas-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 18px;
  margin: 0 auto 24px;
  max-width: 720px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  gap: 16px;
}

.ai-kompas-bar-text {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}

#hero-screenshot-btn {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s;
}

#hero-screenshot-btn:hover {
  background-color: #1d4ed8;
}

/* ── Example Tags ────────────────────────────────────────── */
.example-queries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 12px auto 24px;
  max-width: 720px;
}

.example-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.example-tag:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

@media (max-width: 600px) {
  .ai-kompas-bar {
    flex-direction: column;
    align-items: center;
    text-align: center !important;
    gap: 12px;
  }
}

/* ── Print styles ──────────────────────────────────────────────── */
@media print {
  .header, .hero, .sidebar, .kaarten-kolom,
  .feedback-sectie, .doorvraag-sectie, .btn-opnieuw,
  .advies-acties, .site-footer { display: none !important; }
  .resultaten-inner { grid-template-columns: 1fr !important; }
  .advies-kaart { box-shadow: none; border: none; }
}

/* ── Screenshot selectie + privacy ─────────────────────────────── */
.screenshot-name {
  color: var(--tekst-zacht);
  font-size: 13px;
  margin-top: 10px;
  word-break: break-word;
}

.privacy-block {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  margin-top: 14px;
  padding: 14px 16px;
  text-align: left;
}

.privacy-warning {
  color: #1e40af;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 10px;
}

.privacy-check {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tekst);
}

.privacy-check input[type="checkbox"] {
  accent-color: var(--accent);
  height: 16px;
  width: 16px;
}

/* ── Feedback in USER UI ───────────────────────────────────────── */
.btn-feedback.active {
  border-color: var(--accent-dark);
  background: var(--accent-licht);
}

#feedbackComment {
  border: 1px solid var(--rand);
  border-radius: 8px;
  color: var(--tekst);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 12px;
  min-height: 76px;
  padding: 10px 12px;
  resize: vertical;
  width: 100%;
}

#feedbackComment:focus {
  border-color: var(--accent);
  outline: none;
}

.fb-comment {
  border: 1px solid var(--rand);
  border-radius: 8px;
  color: var(--tekst);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 12px;
  min-height: 76px;
  padding: 10px 12px;
  resize: vertical;
  width: 100%;
}
.fb-comment:focus {
  border-color: var(--accent);
  outline: none;
}