    /*!
     * NANDA-I Diagnose Assistent
     * Copyright © 2026 Martijn van Vliet — Alle rechten voorbehouden.
     * UNLICENSED — proprietary, redistributie/gebruik vereist toestemming.
     */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      /* Brand */
      --teal-dark: #085041;
      --teal-mid: #0F6E56;
      --teal-light: #E1F5EE;
      --teal-pale: #f0faf6;

      /* Layout */
      --sidebar-w: 240px;
      --gordon-w: 240px;

      /* Dimension */
      --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
      --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.06);
      --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.08);
      --radius-sm: 6px;
      --radius-md: 10px;
      --radius-lg: 16px;
    }

    /* LIGHT theme (default) */
    :root, :root[data-theme="light"] {
      --bg: #f7f8fa;
      --surface: #ffffff;
      --surface-alt: #f1f5f9;
      --surface-hover: #f8fafc;
      --text: #0f172a;
      --text-muted: #64748b;
      --text-dim: #94a3b8;
      --border: #e2e8f0;
      --border-strong: #cbd5e1;

      /* Legacy aliases — bestaande selectors blijven werken */
      --gray-bg: var(--bg);
      --gray-border: var(--border);
      --gray-muted: var(--text-dim);
      --gray-text: var(--text-muted);
      --white: var(--surface);
    }

    /* DARK theme */
    :root[data-theme="dark"] {
      --bg: #0a0e1a;
      --surface: #131826;
      --surface-alt: #1c2333;
      --surface-hover: #1e2638;
      --text: #f1f5f9;
      --text-muted: #94a3b8;
      --text-dim: #64748b;
      --border: #1f2937;
      --border-strong: #334155;
      --teal-light: #134e4a;
      --teal-pale: #0f3a37;

      --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
      --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
      --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

      --gray-bg: var(--bg);
      --gray-border: var(--border);
      --gray-muted: var(--text-dim);
      --gray-text: var(--text-muted);
      --white: var(--surface);
    }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
      background: var(--bg);
      height: 100vh;
      display: flex;
      overflow: hidden;
      color: var(--text);
      transition: background 0.2s ease, color 0.2s ease;
      -webkit-font-smoothing: antialiased;
    }

    /* ---- LEFT SIDEBAR (sessies) ---- */
    .sidebar {
      width: var(--sidebar-w);
      background: var(--surface);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      transition: background 0.2s ease;
    }

    .sidebar-header {
      padding: 14px 12px;
      border-bottom: 1px solid var(--gray-border);
    }

    .sidebar-logo {
      display: flex; align-items: center; gap: 8px;
      margin-bottom: 12px;
    }

    .logo-icon {
      width: 28px; height: 28px;
      background: var(--teal-light);
      border-radius: 7px;
      display: flex; align-items: center; justify-content: center;
      color: var(--teal-mid);
    }
    .logo-icon svg { width: 16px; height: 16px; stroke-width: 2; }

    .sidebar-logo span { font-size: 13px; font-weight: 600; }

    .new-btn {
      width: 100%;
      padding: 8px 10px;
      background: var(--teal-mid);
      color: white;
      border: none;
      border-radius: 7px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
    }
    .new-btn:hover { background: var(--teal-dark); }

    .sidebar-list { flex: 1; overflow-y: auto; padding: 6px; }

    .sidebar-label {
      font-size: 10px; font-weight: 700;
      color: var(--gray-muted);
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 8px 6px 4px;
    }

    .session-item {
      padding: 8px 8px;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 6px;
      margin-bottom: 1px;
    }
    .session-item:hover { background: var(--gray-bg); }
    .session-item.active { background: var(--teal-light); }

    .session-info { flex: 1; min-width: 0; }
    .session-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .session-date { font-size: 11px; color: var(--gray-text); margin-top: 1px; }

    .session-badges { display: flex; gap: 3px; flex-shrink: 0; align-items: flex-start; margin-top: 1px; }

    .session-badge {
      font-size: 9px;
      background: var(--teal-light);
      color: var(--teal-mid);
      padding: 2px 5px;
      border-radius: 3px;
      font-weight: 700;
    }

    .session-del {
      opacity: 0;
      background: none; border: none;
      cursor: pointer;
      color: var(--gray-muted);
      font-size: 13px;
      padding: 1px 3px;
      border-radius: 3px;
      flex-shrink: 0;
    }
    .session-item:hover .session-del { opacity: 1; }
    .session-del:hover { background: #fee2e2; color: #dc2626; }

    .empty-sidebar {
      padding: 16px 10px;
      text-align: center;
      color: var(--gray-muted);
      font-size: 12px;
      line-height: 1.6;
    }

    /* ---- MAIN ---- */
    .main {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    .topbar {
      padding: 10px 18px;
      border-bottom: 1px solid var(--gray-border);
      background: var(--white);
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 52px;
    }

    .topbar-text { flex: 1; min-width: 0; }
    .topbar-title {
      font-size: 14px; font-weight: 600;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .topbar-sub {
      font-size: 11px; color: var(--gray-text); margin-top: 1px;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }

    .topbar-actions { display: flex; gap: 6px; flex-shrink: 0; }

    .menu-btn {
      display: none;
      width: 40px; height: 40px;
      align-items: center; justify-content: center;
      background: none; border: 1px solid var(--gray-border);
      border-radius: 7px; cursor: pointer;
      font-size: 17px; color: var(--text);
      flex-shrink: 0;
    }
    .menu-btn:hover { background: var(--gray-bg); }
    .menu-btn svg { width: 18px; height: 18px; stroke-width: 1.75; color: var(--text-muted); }
    .icon-btn svg { width: 16px; height: 16px; stroke-width: 1.75; }

    .backdrop {
      display: none;
      position: fixed; inset: 0;
      background: rgba(0, 0, 0, 0.42);
      opacity: 0; pointer-events: none;
      transition: opacity 0.22s ease;
      z-index: 99;
    }
    .backdrop.show { opacity: 1; pointer-events: auto; }

    /* ---- LOGIN OVERLAY ---- */
    .login-overlay {
      position: fixed; inset: 0; z-index: 200;
      background: var(--bg);
      display: none;
      align-items: center; justify-content: center;
      padding: 20px;
    }
    .login-overlay.show { display: flex; }
    .login-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 32px 28px;
      width: 340px; max-width: 100%;
      text-align: center;
      box-shadow: var(--shadow-lg);
    }
    .login-logo {
      width: 96px; height: 96px;
      margin: 0 auto 14px;
      background: var(--teal-light);
      border-radius: 50%;
      overflow: hidden;
      display: flex; align-items: center; justify-content: center;
      color: var(--teal-mid);
    }
    .login-logo svg { width: 26px; height: 26px; stroke-width: 2; }
    .login-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .login-title {
      font-size: 18px; font-weight: 600;
      letter-spacing: -0.01em;
      margin-bottom: 4px;
    }
    .login-sub {
      font-size: 13px; color: var(--text-muted);
      margin-bottom: 18px;
    }
    .login-pin {
      display: flex; gap: 7px; justify-content: center;
      margin-bottom: 6px;
    }
    .login-pin-cell {
      width: 38px; height: 50px;
      border: 1.5px solid var(--border);
      border-radius: 8px;
      font-size: 22px; font-weight: 600;
      display: flex; align-items: center; justify-content: center;
      background: var(--surface-alt);
      color: var(--teal-mid);
      transition: background 0.12s, border-color 0.12s;
    }
    .login-pin-cell.filled {
      background: var(--teal-light);
      border-color: var(--teal-mid);
    }
    .login-error {
      color: #dc2626; font-size: 12px;
      min-height: 18px; margin: 8px 0 12px;
    }
    .login-keypad {
      display: grid; grid-template-columns: repeat(3, 1fr);
      gap: 8px;
    }
    .login-key {
      padding: 14px 0;
      font-size: 18px; font-weight: 500;
      background: var(--surface-alt);
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: background 0.12s, transform 0.08s;
      font-family: inherit;
      min-height: 48px;
    }
    .login-key:hover { background: var(--teal-pale); border-color: var(--teal-mid); }
    .login-key:active { transform: scale(0.97); }
    .login-key.action { font-size: 13px; color: var(--text-muted); }
    .login-key.action svg { width: 16px; height: 16px; vertical-align: middle; stroke-width: 1.75; }

    /* ---- SIDEBAR-USER ---- */
    .sidebar-user {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 10px;
      margin: 8px 0 10px;
      background: var(--teal-pale);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      font-size: 12px;
    }
    .sidebar-user-name {
      flex: 1; font-weight: 500; color: var(--teal-dark);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .sidebar-user-logout {
      background: none; border: none; cursor: pointer;
      color: var(--text-muted);
      width: 26px; height: 26px;
      display: flex; align-items: center; justify-content: center;
      border-radius: 4px;
    }
    .sidebar-user-logout:hover { background: var(--surface); color: var(--text); }
    .sidebar-user-logout svg { width: 14px; height: 14px; stroke-width: 1.75; }
    :root[data-theme="dark"] .sidebar-user-name { color: #6ee7b7; }

    .icon-btn {
      padding: 6px 11px;
      background: none;
      border: 1px solid var(--gray-border);
      border-radius: 6px;
      font-size: 12px;
      color: var(--gray-text);
      cursor: pointer;
      display: flex; align-items: center; gap: 4px;
    }
    .icon-btn:hover { background: var(--gray-bg); color: var(--text); }

    /* ---- CHAT + RIGHT PANEL layout ---- */
    .content-row {
      flex: 1;
      display: flex;
      overflow: hidden;
    }

    .chat-col {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .chat-area {
      flex: 1;
      overflow-y: auto;
      padding: 20px 28px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    /* ---- GORDON PANEL (right) ---- */
    .gordon-panel {
      width: var(--gordon-w);
      border-left: 1px solid var(--gray-border);
      background: var(--white);
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      overflow-y: auto;
    }

    .gordon-header {
      padding: 12px 14px 8px;
      border-bottom: 1px solid var(--gray-border);
      position: sticky;
      top: 0;
      background: var(--white);
    }

    .gordon-header h3 {
      font-size: 11px;
      font-weight: 700;
      color: var(--gray-muted);
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }

    .gordon-header p {
      font-size: 11px;
      color: var(--gray-muted);
      margin-top: 2px;
      line-height: 1.4;
    }

    .gordon-list { padding: 8px; }

    .gordon-item {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      padding: 7px 8px;
      border-radius: 6px;
      margin-bottom: 1px;
      transition: background 0.1s;
    }

    .gordon-item.active {
      background: var(--teal-light);
    }

    .gordon-item.done {
      background: var(--gray-bg);
    }

    .gordon-num {
      width: 20px; height: 20px;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 10px;
      font-weight: 700;
      flex-shrink: 0;
      border: 1.5px solid var(--gray-border);
      color: var(--gray-muted);
      margin-top: 1px;
    }

    .gordon-item.active .gordon-num {
      background: var(--teal-mid);
      border-color: var(--teal-mid);
      color: white;
    }

    .gordon-item.done .gordon-num {
      background: var(--gray-border);
      border-color: var(--gray-border);
      color: var(--gray-text);
    }

    .gordon-item.diagnose .gordon-num {
      background: #854F0B;
      border-color: #854F0B;
      color: white;
      font-size: 12px;
    }

    .gordon-text { flex: 1; }
    .gordon-name {
      font-size: 12px;
      font-weight: 500;
      color: var(--text);
      line-height: 1.3;
    }
    .gordon-item.done .gordon-name { color: var(--gray-text); }
    .gordon-item.active .gordon-name { color: var(--teal-dark); font-weight: 600; }

    /* ---- WELCOME ---- */
    .welcome {
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      height: 100%;
      gap: 18px; text-align: center;
      padding: 24px;
    }
    .welcome-illustration {
      width: 320px; max-width: 70%;
      height: auto;
      margin-bottom: 4px;
    }
    .copyright {
      display: block;
      font-size: 11px; color: var(--text-dim);
      margin-top: 8px;
    }
    .login-card .copyright { margin-top: 18px; }

    .disclaimer {
      font-size: 12px;
      color: var(--text-muted);
      background: var(--surface-alt);
      border-left: 3px solid var(--teal-mid);
      padding: 10px 14px;
      border-radius: var(--radius-sm);
      max-width: 480px;
      line-height: 1.55;
      text-align: left;
      margin-top: 4px;
    }
    .disclaimer strong { color: var(--text); }

    .crisis-alert {
      background: #fef2f2;
      border: 1px solid #fecaca;
      border-left: 4px solid #dc2626;
      border-radius: var(--radius-sm);
      padding: 12px 14px;
      margin: 6px 0 12px 0;
      color: #7f1d1d;
      font-size: 13px;
      line-height: 1.55;
    }
    .crisis-alert-img {
      float: right;
      width: 96px; height: auto;
      margin: 0 0 6px 12px;
      border-radius: var(--radius-sm);
    }
    .crisis-alert-title {
      display: flex; align-items: center; gap: 6px;
      font-weight: 600; color: #dc2626;
      margin-bottom: 6px;
    }
    .crisis-alert a { color: #dc2626; font-weight: 500; }
    :root[data-theme="dark"] .crisis-alert {
      background: #2a1414;
      border-color: #7f1d1d;
      color: #fca5a5;
    }
    :root[data-theme="dark"] .crisis-alert-title { color: #f87171; }
    :root[data-theme="dark"] .crisis-alert a { color: #fca5a5; }

    /* Lucide icons */
    .gordon-icon {
      width: 18px; height: 18px;
      stroke-width: 1.75;
      color: var(--text-muted);
      flex-shrink: 0;
    }
    .gordon-item.active .gordon-icon { color: var(--teal-mid); }
    .gordon-item.done .gordon-icon { color: var(--text-dim); }
    .gordon-item.diagnose .gordon-icon { color: #854F0B; }
    .welcome-icon {
      width: 64px; height: 64px;
      background: var(--teal-light); border-radius: var(--radius-lg);
      display: flex; align-items: center; justify-content: center;
      font-size: 30px;
    }
    .welcome h2 {
      font-size: 22px; font-weight: 600;
      letter-spacing: -0.01em;
      color: var(--text);
    }
    .welcome p {
      font-size: 14px; color: var(--text-muted);
      max-width: 380px; line-height: 1.65;
    }
    .welcome-btn {
      padding: 11px 26px;
      background: var(--teal-mid); color: white;
      border: none; border-radius: var(--radius-md);
      font-size: 14px; font-weight: 500; cursor: pointer;
      box-shadow: var(--shadow-md);
      transition: background 0.15s, transform 0.08s, box-shadow 0.15s;
    }
    .welcome-btn:hover { background: var(--teal-dark); box-shadow: var(--shadow-lg); }
    .welcome-btn:active { transform: translateY(1px); }

    /* ---- THEME TOGGLE ---- */
    .theme-toggle {
      width: 38px; height: 38px;
      display: flex; align-items: center; justify-content: center;
      background: none; border: 1px solid var(--border);
      border-radius: var(--radius-sm); cursor: pointer;
      color: var(--text-muted);
      flex-shrink: 0;
      transition: background 0.15s, color 0.15s;
    }
    .theme-toggle:hover { background: var(--surface-alt); color: var(--text); }
    .theme-toggle svg { width: 17px; height: 17px; }
    .theme-toggle .icon-sun { display: none; }
    :root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
    :root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

    /* ---- MESSAGES ---- */
    .msg { display: flex; gap: 10px; max-width: 84%; }
    .msg.user { align-self: flex-end; flex-direction: row-reverse; }

    .av {
      width: 28px; height: 28px; border-radius: 50%;
      flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      font-size: 10px; font-weight: 700;
    }
    .av.ai { background: var(--teal-light); color: var(--teal-mid); }
    .av.user { background: var(--surface-alt); color: var(--text-muted); border: 1px solid var(--border); }

    .bubble {
      padding: 11px 15px;
      border-radius: 14px;
      font-size: 14px;
      line-height: 1.65;
      box-shadow: var(--shadow-sm);
      animation: bubble-in 0.22s ease-out;
    }
    .bubble.ai {
      background: var(--surface);
      border: 1px solid var(--border);
      border-bottom-left-radius: 4px;
      color: var(--text);
    }
    .bubble.user {
      background: var(--teal-mid);
      color: white;
      border-bottom-right-radius: 4px;
    }

    @keyframes bubble-in {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .patroon-tag {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 11px; font-weight: 600;
      color: var(--teal-mid);
      background: var(--teal-light);
      padding: 2px 8px; border-radius: 4px;
      margin-bottom: 7px;
    }

    .diagnose-card {
      background: var(--surface-alt);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 13px 15px;
      margin-top: 9px;
      box-shadow: var(--shadow-sm);
    }
    .diagnose-card + .diagnose-card { margin-top: 7px; }
    .dx-bron {
      font-size: 11px !important;
      margin-top: 10px !important;
      padding: 0 !important;
      background: transparent !important;
      border-radius: 0;
      display: block;
    }
    .dx-bron.verified { color: var(--text-muted); }
    .dx-bron.unverified { color: #854F0B; }
    :root[data-theme="dark"] .dx-bron.verified { color: var(--text-muted); }
    :root[data-theme="dark"] .dx-bron.unverified { color: #fbbf24; }

    .prio-badge {
      display: inline-block; font-size: 10px; font-weight: 700;
      padding: 2px 7px; border-radius: 4px; margin-bottom: 4px;
    }
    .p1 { background: #FCEBEB; color: #A32D2D; }
    .p2 { background: #FAEEDA; color: #854F0B; }
    .p3 { background: #E1F5EE; color: #0F6E56; }
    .p4 { background: #ede9fe; color: #5b21b6; }

    .diagnose-card h4 {
      font-size: 13px; font-weight: 600;
      color: var(--teal-mid); margin-bottom: 5px;
    }
    .diagnose-card p {
      font-size: 12px; color: var(--gray-text);
      line-height: 1.5; margin-bottom: 2px;
    }
    .diagnose-card p strong { color: var(--text); font-weight: 500; }
    .post-note { font-size: 12px; color: var(--gray-text); margin-top: 8px; line-height: 1.6; }

    .nnn-block {
      margin-top: 10px;
      padding: 4px 0 4px 12px;
      border-radius: 0;
      border-left: 2px solid var(--border);
      background: transparent;
    }
    .nnn-block.nnn-noc { border-left-color: var(--border); }
    .nnn-label {
      font-size: 11px; font-weight: 600;
      color: var(--text); text-transform: uppercase;
      letter-spacing: 0.04em; margin-bottom: 4px;
    }
    .nnn-items { margin: 0; padding: 0; list-style: none; }
    .nnn-item {
      display: flex; gap: 8px; align-items: center;
      padding: 6px 0;
      font-size: 13px; color: var(--text-muted);
      line-height: 1.55;
    }
    .nnn-item.done .nnn-item-text { text-decoration: line-through; opacity: 0.6; }
    .nnn-item-check {
      flex-shrink: 0;
      width: 14px; height: 14px;
      margin: 0; padding: 0;
      cursor: pointer;
      accent-color: var(--teal-mid);
    }
    .nnn-item-body { flex: 1; min-width: 0; }
    .nnn-item-text { color: var(--text-muted); }
    .nic-type-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 10px; font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-muted);
      white-space: nowrap;
      background: transparent;
    }
    .nnn-block:not(.nnn-noc) .nnn-item-body {
      display: grid;
      grid-template-columns: auto 1fr auto;
      column-gap: 10px;
      align-items: center;
    }
    .nic-type-badge::before {
      content: '';
      display: inline-block;
      width: 6px; height: 6px;
      border-radius: 50%;
      background: var(--nic-dot, var(--text-muted));
      flex-shrink: 0;
    }
    .nic-type-observeer { --nic-dot: #2563eb; }
    .nic-type-doe       { --nic-dot: #059669; }
    .nic-type-leer      { --nic-dot: #7c3aed; }
    .nic-type-verwijs   { --nic-dot: #c2410c; }
    :root[data-theme="dark"] .nic-type-observeer { --nic-dot: #93c5fd; }
    :root[data-theme="dark"] .nic-type-doe       { --nic-dot: #6ee7b7; }
    :root[data-theme="dark"] .nic-type-leer      { --nic-dot: #c4b5fd; }
    :root[data-theme="dark"] .nic-type-verwijs   { --nic-dot: #fdba74; }
    .noc-indicator { color: var(--text); font-weight: 500; }
    .noc-streefwaarde { color: var(--text-muted); }
    .noc-termijn {
      display: inline-block;
      font-size: 10px;
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 3px;
      padding: 1px 5px;
      color: var(--text-muted);
      margin-left: 5px;
      white-space: nowrap;
    }
    .nnn-item-actions {
      display: inline-flex;
      gap: 1px;
      margin-left: 6px;
      opacity: 0.25;
      transition: opacity 0.15s;
      flex-shrink: 0;
    }
    .nnn-item:hover .nnn-item-actions,
    .nnn-item:focus-within .nnn-item-actions { opacity: 1; }
    .nnn-icon-btn {
      background: none; border: 0;
      cursor: pointer;
      padding: 2px 4px;
      border-radius: 3px;
      color: var(--text-muted);
      line-height: 0;
    }
    .nnn-icon-btn i { width: 11px; height: 11px; }
    .nnn-icon-btn:hover { background: var(--white); color: var(--text); }
    .nnn-icon-btn.danger:hover { color: #dc2626; }
    .nnn-add-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      background: none;
      border: 1px dashed var(--border);
      border-radius: 4px;
      padding: 3px 8px;
      margin-top: 5px;
      cursor: pointer;
      color: var(--text-muted);
      font-family: inherit;
    }
    .nnn-add-btn:hover { border-color: var(--teal-mid); color: var(--teal-mid); }
    .nnn-add-btn i { width: 12px; height: 12px; }
    .nnn-edit-form {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 5px;
      padding: 8px 10px;
      margin: 4px 0;
      width: 100%;
      box-sizing: border-box;
    }
    .nnn-edit-form label {
      font-size: 9px; font-weight: 600;
      color: var(--text-muted);
      display: block;
      margin: 5px 0 2px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }
    .nnn-edit-form input,
    .nnn-edit-form select,
    .nnn-edit-form textarea {
      width: 100%;
      box-sizing: border-box;
      font-size: 12px;
      font-family: inherit;
      padding: 5px 7px;
      border: 1px solid var(--border);
      border-radius: 4px;
      background: var(--white);
      color: var(--text);
      outline: none;
      resize: vertical;
    }
    .nnn-edit-form textarea { min-height: 50px; }
    .nnn-edit-form input:focus,
    .nnn-edit-form select:focus,
    .nnn-edit-form textarea:focus { border-color: var(--teal-mid); }
    .nnn-edit-actions {
      display: flex; gap: 6px;
      margin-top: 8px;
      justify-content: flex-end;
    }
    .nnn-edit-actions button {
      font-size: 11px;
      padding: 4px 10px;
      border: 1px solid var(--border);
      background: var(--surface-alt);
      border-radius: 4px;
      cursor: pointer;
      color: var(--text);
      font-family: inherit;
    }
    .nnn-edit-actions button.primary {
      background: var(--teal-mid);
      color: white;
      border-color: var(--teal-mid);
    }

    .typing { display: flex; gap: 10px; align-items: center; }
    .dots {
      display: flex; gap: 4px;
      padding: 11px 14px;
      background: var(--white);
      border: 1px solid var(--gray-border);
      border-radius: 13px;
      border-bottom-left-radius: 4px;
    }
    .dot {
      width: 6px; height: 6px; border-radius: 50%;
      background: var(--gray-muted);
      animation: bounce 1.2s ease-in-out infinite;
    }
    .dot:nth-child(2) { animation-delay: 0.2s; }
    .dot:nth-child(3) { animation-delay: 0.4s; }
    @keyframes bounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

    /* ---- INPUT ---- */
    .input-bar {
      padding: 12px 28px;
      border-top: 1px solid var(--gray-border);
      background: var(--white);
      display: none; gap: 8px;
    }

    textarea {
      flex: 1;
      border: 1px solid var(--gray-border);
      border-radius: 9px;
      padding: 9px 13px;
      font-size: 14px;
      font-family: inherit;
      background: var(--gray-bg);
      color: var(--text);
      resize: none; outline: none;
      min-height: 40px; max-height: 110px;
      line-height: 1.5;
    }
    textarea:focus { border-color: var(--teal-mid); background: var(--white); }

    .send-btn {
      width: 40px; height: 40px;
      background: var(--teal-mid); color: white;
      border: none; border-radius: 9px;
      cursor: pointer; font-size: 15px; flex-shrink: 0;
    }
    .send-btn:hover { background: var(--teal-dark); }
    .send-btn:disabled { background: #d1d5db; cursor: default; }

    /* ---- MODAL ---- */
    .modal-overlay {
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.3);
      display: flex; align-items: center; justify-content: center;
      z-index: 100;
    }
    .modal {
      background: var(--white); border-radius: 12px;
      padding: 22px; width: 380px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    }
    .modal h3 { font-size: 15px; font-weight: 600; margin-bottom: 5px; }
    .modal p { font-size: 13px; color: var(--gray-text); margin-bottom: 14px; }
    .modal input {
      width: 100%; border: 1px solid var(--gray-border);
      border-radius: 7px; padding: 8px 11px;
      font-size: 13px; outline: none; margin-bottom: 14px;
      font-family: inherit;
    }
    .modal input:focus { border-color: var(--teal-mid); }

    .mode-select {
      display: flex; flex-direction: column; gap: 8px;
      margin-bottom: 16px;
    }
    .mode-option {
      cursor: pointer; display: block;
    }
    .mode-option input[type="radio"] {
      position: absolute; opacity: 0; pointer-events: none;
    }
    .mode-card {
      display: flex; align-items: center; gap: 11px;
      padding: 11px 13px;
      border: 1.5px solid var(--border);
      border-radius: var(--radius-md);
      background: var(--surface);
      transition: border-color 0.15s, background 0.15s;
    }
    .mode-option:hover .mode-card { border-color: var(--teal-mid); background: var(--teal-pale); }
    .mode-option input[type="radio"]:checked + .mode-card {
      border-color: var(--teal-mid);
      background: var(--teal-light);
    }
    .mode-icon {
      width: 36px; height: 36px;
      background: var(--surface-alt);
      border-radius: var(--radius-sm);
      display: flex; align-items: center; justify-content: center;
      color: var(--teal-mid); flex-shrink: 0;
    }
    .mode-icon svg { width: 18px; height: 18px; stroke-width: 1.75; }
    .mode-option input[type="radio"]:checked + .mode-card .mode-icon {
      background: var(--teal-mid); color: white;
    }
    .mode-text { flex: 1; min-width: 0; }
    .mode-name { font-size: 14px; font-weight: 600; color: var(--text); }
    .mode-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }

    .mode-badge {
      display: inline-flex; align-items: center; gap: 4px;
      font-size: 10px; font-weight: 600;
      padding: 2px 7px; border-radius: 4px;
      background: var(--teal-light); color: var(--teal-mid);
      letter-spacing: 0.04em; text-transform: uppercase;
      margin-left: 6px;
    }
    .mode-badge.ggz { background: #f3e8ff; color: #6b21a8; }
    :root[data-theme="dark"] .mode-badge.ggz { background: #2d1b46; color: #c4a8e6; }

    .modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
    .btn-cancel {
      padding: 7px 14px; background: none;
      border: 1px solid var(--gray-border);
      border-radius: 6px; font-size: 13px;
      cursor: pointer; color: var(--gray-text);
    }
    .btn-confirm {
      padding: 7px 14px; background: var(--teal-mid);
      color: white; border: none; border-radius: 6px;
      font-size: 13px; cursor: pointer; font-weight: 500;
    }
    .btn-confirm:hover { background: var(--teal-dark); }

    .keuze-form {
      display: flex; flex-direction: column; gap: 6px;
      margin: 10px 0 4px 0;
    }
    .keuze-option {
      display: flex; align-items: flex-start; gap: 10px;
      padding: 10px 12px; border-radius: var(--radius-sm);
      background: var(--surface-alt); border: 1px solid var(--border);
      color: var(--text);
      cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.08s;
      font-size: 14px; line-height: 1.4;
    }
    .keuze-option:hover { background: var(--teal-pale); border-color: var(--teal-mid); }
    .keuze-option:active { transform: scale(0.995); }
    .keuze-option input[type="checkbox"] {
      margin: 2px 0 0 0; width: 16px; height: 16px;
      cursor: pointer; accent-color: var(--teal-mid); flex-shrink: 0;
    }
    .keuze-option input[type="checkbox"]:disabled { cursor: default; }
    .keuze-option:has(input:disabled) { cursor: default; background: var(--surface-alt); opacity: 0.85; }
    .keuze-option:has(input:disabled):hover { background: var(--surface-alt); border-color: var(--border); }
    .keuze-option:has(input:checked) { background: var(--teal-light); border-color: var(--teal-mid); }
    .keuze-actions {
      display: flex; gap: 8px; margin-top: 12px;
      flex-wrap: wrap;
    }
    .keuze-btn {
      padding: 10px 18px;
      background: var(--teal-mid); color: white;
      border: none; border-radius: 6px;
      font-size: 13px; font-weight: 500; cursor: pointer;
    }
    .keuze-btn:hover { background: var(--teal-dark); }
    .keuze-btn-back {
      padding: 10px 16px;
      background: white; color: var(--teal-mid);
      border: 1px solid var(--teal-mid); border-radius: 6px;
      font-size: 13px; font-weight: 500; cursor: pointer;
    }
    .keuze-btn-back:hover { background: var(--teal-pale); }

    /* ---- WIZARD ---- */
    .wizard-stepper {
      display: flex; gap: 4px;
      overflow-x: auto;
      padding: 4px 2px 8px;
      scrollbar-width: thin;
      scroll-snap-type: x proximity;
      margin-bottom: 4px;
    }
    .wizard-step {
      display: flex; align-items: center; gap: 6px;
      padding: 6px 10px;
      background: var(--surface-alt);
      border: 1px solid var(--border);
      border-radius: 999px;
      font-size: 12px; font-weight: 500;
      color: var(--text-muted);
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
      scroll-snap-align: start;
      transition: background 0.15s, border-color 0.15s, color 0.15s;
      font-family: inherit;
    }
    .wizard-step:disabled { cursor: default; opacity: 0.55; }
    .wizard-step:not(:disabled):hover { background: var(--teal-pale); border-color: var(--teal-mid); color: var(--text); }
    .wizard-step svg { width: 14px; height: 14px; stroke-width: 2; }
    .wizard-step.done {
      background: var(--teal-light); border-color: var(--teal-mid); color: var(--teal-dark);
    }
    .wizard-step.active {
      background: var(--teal-mid); border-color: var(--teal-mid); color: white;
      font-weight: 600;
    }
    :root[data-theme="dark"] .wizard-step.done { color: #6ee7b7; }
    :root[data-theme="dark"] .wizard-step.active { color: white; }

    .wizard-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 22px 24px;
      box-shadow: var(--shadow-sm);
      animation: bubble-in 0.22s ease-out;
    }
    .wizard-card-title {
      display: flex; align-items: center; gap: 10px;
      font-size: 17px; font-weight: 600;
      letter-spacing: -0.01em;
      margin-bottom: 6px;
      color: var(--text);
    }
    .wizard-card-title svg { width: 20px; height: 20px; stroke-width: 1.75; color: var(--teal-mid); }
    .wizard-card-intro {
      font-size: 13px; color: var(--text-muted);
      margin-bottom: 14px;
      line-height: 1.55;
    }
    .wizard-actions {
      display: flex; gap: 10px;
      margin-top: 16px;
      flex-wrap: wrap;
    }
    .wizard-actions .keuze-btn-back,
    .wizard-actions .keuze-btn { display: inline-flex; align-items: center; gap: 5px; }
    .wizard-actions svg { width: 14px; height: 14px; stroke-width: 2; }
    .wizard-loading {
      display: flex; align-items: center; gap: 8px;
      padding: 30px; color: var(--text-muted);
      font-size: 14px;
    }
    .wizard-loading svg { width: 18px; height: 18px; animation: spin 1s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ---- OVERZICHT (overview) ---- */
    .wizard-overview {
      display: flex; flex-direction: column; gap: 10px;
    }
    .wizard-overview-header {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 18px 22px;
      box-shadow: var(--shadow-sm);
    }
    .wizard-overview-header h2 {
      display: flex; align-items: center; gap: 8px;
      font-size: 17px; font-weight: 600;
      margin-bottom: 4px;
      letter-spacing: -0.01em;
    }
    .wizard-overview-header h2 svg { width: 20px; height: 20px; color: var(--teal-mid); stroke-width: 1.75; }
    .wizard-overview-header p {
      font-size: 13px; color: var(--text-muted);
      line-height: 1.55;
    }
    .overview-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 12px 14px;
      box-shadow: var(--shadow-sm);
    }
    .overview-card-header {
      display: flex; align-items: center; gap: 8px;
      margin-bottom: 4px;
    }
    .overview-card-header svg.lucide { width: 16px; height: 16px; color: var(--teal-mid); stroke-width: 1.75; flex-shrink: 0; }
    .overview-pattern-num {
      font-size: 11px; font-weight: 700;
      color: var(--text-dim);
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }
    .overview-pattern-name {
      flex: 1;
      font-size: 14px; font-weight: 600;
      color: var(--text);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .overview-edit {
      width: 28px; height: 28px;
      background: none; border: 1px solid var(--border);
      border-radius: 6px; cursor: pointer;
      color: var(--text-muted);
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .overview-edit:hover { background: var(--surface-alt); color: var(--teal-mid); border-color: var(--teal-mid); }
    .overview-edit svg { width: 14px; height: 14px; stroke-width: 1.75; }
    .overview-empty {
      font-size: 12px; color: var(--text-dim);
      font-style: italic;
      padding-left: 24px;
    }
    .overview-list {
      list-style: none; padding-left: 24px;
      font-size: 13px; line-height: 1.55;
    }
    .overview-list li {
      padding: 2px 0;
      color: var(--text);
    }
    .overview-list li::before {
      content: '✓';
      color: var(--teal-mid);
      margin-right: 6px;
      font-weight: 600;
    }
    .wizard-generate-btn {
      display: inline-flex; align-items: center; justify-content: center;
      gap: 8px;
      padding: 13px 22px;
      margin-top: 6px;
      background: var(--teal-mid); color: white;
      border: none; border-radius: var(--radius-md);
      font-size: 14px; font-weight: 500;
      cursor: pointer;
      box-shadow: var(--shadow-md);
      transition: background 0.15s, box-shadow 0.15s, transform 0.08s;
      align-self: flex-start;
      font-family: inherit;
      min-height: 46px;
    }
    .wizard-generate-btn:hover { background: var(--teal-dark); box-shadow: var(--shadow-lg); }
    .wizard-generate-btn:active { transform: translateY(1px); }
    .wizard-generate-btn svg { width: 16px; height: 16px; stroke-width: 1.75; }

    .wizard-back {
      align-self: flex-start;
      display: inline-flex; align-items: center; gap: 6px;
      margin-bottom: 4px;
    }
    .wizard-back svg { width: 14px; height: 14px; stroke-width: 2; }

    .diagnose-banner {
      display: flex; align-items: center; gap: 14px;
      background: linear-gradient(135deg, var(--teal-pale), var(--surface));
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 12px 16px;
      margin: 4px 0 12px 0;
      box-shadow: var(--shadow-sm);
    }
    .diagnose-banner img {
      height: 76px; width: auto;
      flex-shrink: 0;
    }
    .diagnose-banner-text { flex: 1; min-width: 0; }
    .diagnose-banner-title {
      font-size: 14px; font-weight: 600;
      color: var(--text);
      letter-spacing: -0.01em;
    }
    .diagnose-banner-sub {
      font-size: 12px; color: var(--text-muted);
      margin-top: 2px; line-height: 1.4;
    }

    @media (max-width: 767px) {
      body { height: 100dvh; }

      .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0;
        width: 280px; max-width: 85vw;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 100;
        box-shadow: 2px 0 16px rgba(0, 0, 0, 0.14);
      }
      .sidebar.open { transform: translateX(0); }

      .gordon-panel {
        position: fixed; right: 0; top: 0; bottom: 0;
        width: 280px; max-width: 85vw;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        z-index: 100;
        box-shadow: -2px 0 16px rgba(0, 0, 0, 0.14);
      }
      .gordon-panel.open { transform: translateX(0); }

      .backdrop { display: block; }
      .menu-btn { display: flex; }
      .icon-btn-label { display: none; }
      .icon-btn { padding: 8px 11px; font-size: 16px; min-height: 40px; }

      .topbar { padding: 9px 12px; gap: 8px; }
      .topbar-sub { display: none; }

      .chat-area { padding: 14px 12px; gap: 11px; }
      .msg { max-width: 94%; gap: 8px; }
      .av { width: 26px; height: 26px; font-size: 9px; }
      .bubble { font-size: 15px; line-height: 1.55; padding: 11px 13px; }

      .keuze-option {
        padding: 12px 12px; font-size: 15px;
        min-height: 50px; align-items: center;
      }
      .keuze-option input[type="checkbox"] {
        width: 20px; height: 20px; margin-top: 0;
      }

      .keuze-actions { gap: 10px; }
      .keuze-btn, .keuze-btn-back {
        padding: 13px 18px; font-size: 14px; min-height: 46px;
        flex: 1;
      }

      .diagnose-card { padding: 12px 13px; }
      .diagnose-banner { padding: 10px 12px; gap: 10px; }
      .diagnose-banner img { height: 56px; }
      .diagnose-banner-title { font-size: 13px; }
      .diagnose-banner-sub { font-size: 11px; }
      .modal { width: 92vw; max-width: 92vw; }
      .welcome { padding: 0 18px; }
      .welcome h2 { font-size: 20px; }
      .welcome p { font-size: 14px; }
      .welcome-btn { padding: 13px 26px; font-size: 14px; min-height: 46px; }

      /* Voorkom iOS auto-zoom bij focus op text-inputs (drempel = 16px) */
      .modal input, textarea, input[type="text"] { font-size: 16px; }
    }


    /* Visueel verborgen, maar leesbaar voor screenreaders. */
    .visually-hidden {
      position: absolute;
      width: 1px; height: 1px;
      padding: 0; margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    /* Toetsenbord-focus: zichtbare ring i.p.v. de browser-default. */
    :focus-visible {
      outline: 2px solid var(--teal-mid);
      outline-offset: 2px;
    }
