    /* ===== RESET & BASE ===== */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { height: 100%; font-family: var(--font-body); }
    h1, h2, h3, h4, .kpi-value, .topbar-title, .stat-value, .modal-title, .drawer-title, .login-title, .notif-panel-header, .kanban-card-title, .kanban-card-value { font-family: var(--font-display); }

    /* ===== LOGIN PAGE ===== */
    #login-page {
      min-height: 100vh;
      background: var(--grad-dark);
      display: flex; align-items: center; justify-content: center; padding: 1rem;
    }
    .login-card {
      background: rgba(255,255,255,0.97); border-radius: var(--r-modal);
      padding: 2.5rem 2.5rem 2rem; width: 100%; max-width: 420px;
      box-shadow: var(--sh-hover), 0 0 0 1px rgba(255,255,255,0.1);
      text-align: center;
    }
    .login-logo {
      margin-bottom: 1.5rem; display: flex; flex-direction: column;
      align-items: center; gap: 0.5rem;
    }
    .login-logo-img { width: 80px; height: 80px; object-fit: contain; border-radius: var(--r-icon); }
    .login-logo svg { filter: drop-shadow(0 4px 12px rgba(74,159,212,0.3)); }
    .login-logo-text { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--dark); letter-spacing: var(--track-heading); }
    .login-logo-sub { font-size: 0.78rem; color: var(--text-muted); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
    .login-title { font-size: 1.15rem; font-weight: 600; color: var(--dark); margin-bottom: 0.3rem; }
    .login-sub { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 1.8rem; }
    .login-field { margin-bottom: 1rem; text-align: left; }
    .login-field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; letter-spacing: 0.02em; }
    .login-field input {
      width: 100%; padding: 0.7rem 0.9rem; border: 1.5px solid var(--border);
      border-radius: var(--r-btn); font-family: var(--font-body); font-size: 0.9rem;
      color: var(--dark); background: var(--white); transition: border-color 0.2s, box-shadow 0.2s; outline: none;
    }
    .login-field input:focus { border-color: var(--ice); box-shadow: var(--focus-ring); background: var(--white); }
    .login-btn {
      width: 100%; padding: 0.8rem;
      background: var(--grad-primary); color: var(--white);
      border: none; border-radius: var(--r-btn); font-family: var(--font-body);
      font-size: 0.95rem; font-weight: 600; cursor: pointer; margin-top: 0.5rem;
      transition: transform 0.15s, box-shadow 0.15s;
      box-shadow: var(--sh-btn);
    }
    .login-btn:hover { transform: translateY(-1px); box-shadow: var(--sh-btn); }
    .login-btn:active { transform: translateY(0); }
    .login-error {
      color: var(--danger); font-size: 0.82rem; margin-top: 0.6rem;
      padding: 0.5rem 0.7rem; background: var(--danger-bg); border-radius: var(--r-btn); border: 1px solid var(--danger-bg);
    }
    .login-footer { margin-top: 1.5rem; font-size: 0.75rem; color: var(--text-muted); }

    /* ===== APP LAYOUT ===== */
    #app { display: flex; height: 100vh; overflow: hidden; background: var(--grey); }

    /* ===== SIDEBAR ===== */
    .sidebar {
      width: 240px; min-width: 240px;
      background: var(--grad-dark-v);
      color: var(--white); display: flex; flex-direction: column; overflow-y: auto; z-index: 100;
    }
    .sidebar-brand {
      padding: 1.4rem 1.2rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,0.08);
      display: flex; align-items: center; gap: 0.7rem;
    }
    .sidebar-logo-img { width: 34px; height: 34px; object-fit: contain; border-radius: var(--r-btn); flex-shrink: 0; }
    .sidebar-brand svg { flex-shrink: 0; }
    .sidebar-brand-text { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; letter-spacing: var(--track-heading); }
    .sidebar-brand-sub { font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
    .sidebar-section-label { padding: 1rem 1rem 0.3rem; font-size: 0.65rem; font-weight: 700; color: var(--ice); letter-spacing: 0.12em; text-transform: uppercase; }
    .sidebar-nav { padding: 0.3rem 0.6rem; flex: 1; }
    .nav-item {
      display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.8rem;
      border-radius: var(--r-btn); cursor: pointer; font-size: 0.85rem; font-weight: 500;
      color: var(--text-muted); transition: background 0.15s, color 0.15s; margin-bottom: 1px; user-select: none;
    }
    .nav-item:hover { background: rgba(255,255,255,0.07); color: var(--border); }
    .nav-item.active { background: var(--ice-tint-22); color: var(--white); }
    .nav-item .nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; }
    .count-badge { background: var(--danger); color: var(--white); font-weight: 700; }
    .count-badge-pill { display: inline-block; font-size: 0.65rem; padding: 1px 6px; border-radius: var(--r-pill); }
    .nav-item .count-badge { margin-left: auto; }
    .sidebar-footer { padding: 0.8rem 0.6rem 1rem; border-top: 1px solid rgba(255,255,255,0.08); }
    .sidebar-user { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.8rem; border-radius: var(--r-btn); margin-bottom: 0.3rem; }
    .sidebar-avatar { width: 30px; height: 30px; background: var(--grad-primary); border-radius: var(--r-avatar); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: var(--white); flex-shrink: 0; }
    .sidebar-user-info { flex: 1; min-width: 0; }
    .sidebar-user-name { font-size: 0.8rem; font-weight: 600; color: var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sidebar-user-role { font-size: 0.68rem; color: var(--text-muted); }
    .logout-btn { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.55rem 0.8rem; background: rgba(204,75,55,0.1); border: 1px solid rgba(204,75,55,0.2); border-radius: var(--r-btn); color: var(--danger); font-family: var(--font-body); font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: background 0.15s, color 0.15s; text-align: left; }
    .logout-btn:hover { background: rgba(204,75,55,0.2); color: var(--danger); }

    /* ===== MAIN CONTENT ===== */
    .main-content { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
    .topbar { background: var(--white); border-bottom: 1px solid var(--border); padding: 0.9rem 1.5rem; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
    .topbar-title { font-size: 1.15rem; font-weight: 700; color: var(--dark); }
    .nav-toggle { display: none; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; color: var(--dark); padding: 0.5rem; margin-right: 0.4rem; border-radius: var(--r-btn); transition: background 0.15s; }
    .nav-toggle:hover { background: var(--grey); }
    .nav-scrim { display: none; }
    .topbar-right { display: flex; align-items: center; gap: 0.8rem; }
    .notif-wrap { position: relative; }
    .topbar-date { font-size: 0.8rem; color: var(--text-muted); }
    .notif-btn { position: relative; background: none; border: none; cursor: pointer; font-size: 1.1rem; padding: 0.35rem; border-radius: var(--r-btn); transition: background 0.15s; }
    .notif-btn:hover { background: var(--grey); }
    .count-badge-dot { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 14px; height: 14px; font-size: 0.6rem; border-radius: var(--r-avatar); }
    .notif-panel { display: none; position: absolute; top: 55px; right: 1.5rem; width: 320px; background: var(--white); border-radius: var(--r-card); box-shadow: var(--sh-hover); border: 1px solid var(--border); z-index: 200; overflow: hidden; }
    .notif-panel.open { display: block; }
    .notif-panel-header { padding: 0.9rem 1rem; border-bottom: 1px solid var(--grey); font-weight: 700; font-size: 0.9rem; color: var(--dark); display: flex; align-items: center; gap: 0.4rem; }
    .notif-item { padding: 0.7rem 1rem; border-bottom: 1px solid var(--grey); font-size: 0.82rem; color: var(--text); }
    .notif-item:last-child { border-bottom: none; }
    .notif-item strong { color: var(--dark); }

    /* ===== PAGE SECTIONS ===== */
    .page-section { display: none; padding: 1.5rem; }
    .page-section.active { display: block; }

    /* ===== KPI CARDS ===== */
    .kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
    .kpi-card { background: var(--white); border-radius: var(--r-card); padding: 1.1rem 1.2rem; border: 1px solid var(--border); box-shadow: var(--sh-card); }
    .kpi-label { font-size: 0.75rem; font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.4rem; }   /* --text-muted haalt op wit geen AA (regel 10) */
    .kpi-value { font-size: 1.8rem; font-weight: 700; color: var(--dark); margin-bottom: 0.2rem; }
    .kpi-delta { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; }
    .kpi-delta.up { color: var(--ok); }
    .kpi-delta.down { color: var(--danger); }
    .kpi-delta [data-icon="arrow-down"] { display: none; }
    .kpi-delta.down [data-icon="arrow-up"] { display: none; }
    .kpi-delta.down [data-icon="arrow-down"] { display: inline-flex; }
    .section-heading { display: flex; align-items: center; gap: 0.5rem; }
    .section-heading [data-icon] { color: var(--ice); }

    /* ===== PIPELINE CHART ===== */
    .pipeline-chart { background: var(--white); border-radius: var(--r-card); border: 1px solid var(--border); padding: 1.2rem; margin-bottom: 1.5rem; box-shadow: var(--sh-card); }
    .pipeline-chart h3 { font-size: 0.95rem; font-weight: 700; color: var(--dark); margin-bottom: 1rem; }
    .pipeline-stage { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.7rem; }
    .pipeline-stage-label { width: 100px; font-size: 0.78rem; color: var(--text); font-weight: 500; }
    .pipeline-bar-wrap { flex: 1; background: var(--grey); border-radius: var(--r-badge); height: 22px; overflow: hidden; }
    .pipeline-bar { height: 100%; width: var(--bar-width); border-radius: var(--r-badge); display: flex; align-items: center; padding-left: 8px; font-size: 0.72rem; font-weight: 600; color: var(--white); min-width: 30px; transition: width 0.6s ease; }
    .pipeline-count { width: 40px; text-align: right; font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }

    /* ===== DASHBOARD GRID ===== */
    .dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
    .dash-card { background: var(--white); border-radius: var(--r-card); border: 1px solid var(--border); padding: 1.1rem; box-shadow: var(--sh-card); }
    .dash-card h3 { font-size: 0.9rem; font-weight: 700; color: var(--dark); margin-bottom: 0.8rem; }
    .dash-card-heading { display: flex; justify-content: space-between; align-items: center; }
    .reminders-count-badge { background: var(--ice-bg); color: var(--ice); font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: var(--r-pill); }
    .followup-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0; border-bottom: 1px solid var(--grey); font-size: 0.82rem; }
    .followup-item:last-child { border-bottom: none; }
    .followup-dot { width: 8px; height: 8px; border-radius: var(--r-avatar); flex-shrink: 0; background: var(--ice); }
    .followup-name { flex: 1; font-weight: 500; color: var(--dark); }
    .followup-time { color: var(--text-muted); font-size: 0.75rem; }

    /* ===== SECTION HEADER ===== */
    .section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
    .section-header h2 { font-size: 1.05rem; font-weight: 700; color: var(--dark); }
    .section-header-actions { display: flex; gap: 0.5rem; align-items: center; }
    .filter-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; flex-wrap: wrap; }
    .filter-row input, .filter-row select { padding: 0.5rem 0.8rem; border: 1.5px solid var(--border); border-radius: var(--r-btn); font-family: var(--font-body); font-size: 0.82rem; color: var(--text); background: var(--white); outline: none; transition: border-color 0.2s; }
    .filter-row input:focus, .filter-row select:focus { border-color: var(--ice); }
    .filter-row input[type="text"] { min-width: 200px; }

