﻿        /* ==========================================================================
           1. CSS VARIABLES & ZAKELIJK THEMA
           ========================================================================== */
        :root {
            --bg-dark: #101211;
            --bg-panel: #1a1d1b;
            --bg-panel-hover: #242824;
            --border-color: #343a35;
            
            --accent-blue: #4f8cff;
            --accent-blue-hover: #3d74dc;
            --accent-success: #26b982;
            --accent-warning: #e8b54f;
            --accent-warm: #d9854a;
            --accent-teal: #2bbfb2;
            --status-todo: #3f7cff;
            --status-progress: #8b5cf6;
            --status-review: #f59e0b;
            --status-done: #22c55e;
            
            --text-main: #f1f4ef;
            --text-muted: #a2aaa1;
            
            --font-main: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
            --transition: all 0.18s cubic-bezier(.2,.8,.2,1);
            --radius: 8px;
            --shadow-soft: 0 1px 2px rgba(0,0,0,0.16);
            --shadow-lift: 0 2px 6px rgba(0,0,0,0.16);
        }

        /* ===========================================================================
           BOOT LOADER
           =========================================================================== */
        .boot-screen { position: fixed; inset: 0; z-index: 800; display: flex; align-items: center; justify-content: center; background: var(--bg-dark); color: var(--text-main); transition: opacity 0.22s ease, visibility 0.22s ease; }
        .boot-screen.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
        .boot-loader { width: min(340px, calc(100vw - 48px)); display: flex; flex-direction: column; align-items: center; gap: 18px; }
        .boot-brand { font-size: 1.05rem; font-weight: 850; letter-spacing: 0; color: var(--text-main); }
        .boot-board { width: 240px; height: 128px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); background: #181b18; }
        .boot-column { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
        .boot-column span { height: 24px; border-radius: 5px; background: #242a25; border: 1px solid rgba(255,255,255,0.07); animation: bootCard 1.45s cubic-bezier(.2,.8,.2,1) infinite; transform-origin: center; }
        .boot-column:nth-child(1) span:nth-child(1) { animation-delay: 0s; background: #2f6f5f; }
        .boot-column:nth-child(1) span:nth-child(2) { animation-delay: 0.12s; }
        .boot-column:nth-child(1) span:nth-child(3) { animation-delay: 0.24s; }
        .boot-column:nth-child(2) span:nth-child(1) { animation-delay: 0.18s; }
        .boot-column:nth-child(2) span:nth-child(2) { animation-delay: 0.3s; background: #365f8f; }
        .boot-column:nth-child(2) span:nth-child(3) { animation-delay: 0.42s; }
        .boot-column:nth-child(3) span:nth-child(1) { animation-delay: 0.36s; }
        .boot-column:nth-child(3) span:nth-child(2) { animation-delay: 0.48s; }
        .boot-column:nth-child(3) span:nth-child(3) { animation-delay: 0.6s; background: #8a7136; }
        .boot-status { color: var(--text-muted); font-size: 0.84rem; font-weight: 700; }
        .boot-status::after { content: ''; display: inline-block; width: 18px; text-align: left; animation: bootDots 1.1s steps(4, end) infinite; }
        @keyframes bootCard { 0%, 100% { transform: translateY(0); opacity: 0.56; } 42% { transform: translateY(-5px); opacity: 1; } 70% { transform: translateY(3px); opacity: 0.78; } }
        @keyframes bootDots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75%, 100% { content: '...'; } }
        /* ==========================================================================
           2. BASE STYLES
           ========================================================================== */
        * { box-sizing: border-box; margin: 0; padding: 0; }
        html, body {
            height: 100%;
        }

        body {
            font-family: var(--font-main);
            background: var(--bg-dark);
            color: var(--text-main);
            height: 100vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            letter-spacing: 0;
        }

        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: var(--bg-dark); }
        ::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

        /* ==========================================================================
           3. LAYOUT (Sidebar & Main Content)
           ========================================================================== */
        .topbar {
            height: 58px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 24px;
            background: rgba(18, 20, 18, 0.96);
            border-bottom: 1px solid var(--border-color);
            z-index: 20;
        }

        .brand-text { font-size: 1.02rem; font-weight: 750; letter-spacing: 0; color: var(--text-main); }

        .app-layout {
            flex: 1;
            min-height: 0;
            display: flex;
            overflow: hidden;
        }

        .sidebar {
            width: 270px;
            background: rgba(18, 20, 18, 0.94);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            padding: 16px 0;
            z-index: 10;
            box-shadow: none;
        }

        .nav-menu { list-style: none; padding: 0 10px; display: flex; flex-direction: column; height: 100%; }
        .nav-spacer { flex-grow: 1; }

        .nav-item {
            padding: 11px 14px; margin-bottom: 6px; border-radius: var(--radius);
            cursor: pointer; color: var(--text-muted); transition: var(--transition);
            display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9rem;
            position: relative;
        }
        .nav-item::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: transparent; transition: var(--transition); }
        .nav-item:hover { background-color: rgba(255,255,255,0.045); color: var(--text-main); transform: translateX(2px); }
        .nav-item.active { background-color: rgba(79, 140, 255, 0.13); color: #dce8ff; box-shadow: inset 0 0 0 1px rgba(79,140,255,0.18); }
        .nav-item.active::before { background: var(--accent-blue); box-shadow: none; }

        .main-content { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; position: relative; overflow: hidden; }
        .user-profile { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }
        .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-blue); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; box-shadow: none; }

        .module { display: none; flex: 1; min-height: 0; padding: 26px 32px 34px; height: auto; overflow-y: auto; animation: fadeIn 0.18s ease-out; }
        .module.active { display: block; }
        
        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

        /* ==========================================================================
           4. ALGEMENE COMPONENTEN
           ========================================================================== */
        .btn { padding: 9px 16px; background: var(--accent-blue); color: #fff; border: none; border-radius: var(--radius); cursor: pointer; font-weight: 700; font-size: 0.85rem; transition: var(--transition); box-shadow: none; }
        .btn:hover { background: var(--accent-blue-hover); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
        .btn:active { transform: translateY(0) scale(0.98); }
        .btn-outline { background: rgba(255,255,255,0.03); border: 1px solid var(--border-color); color: var(--text-main); box-shadow: none; }
        .btn-outline:hover { background: var(--bg-panel-hover); border-color: rgba(255,255,255,0.18); box-shadow: none; }
        .btn-small { padding: 6px 10px; font-size: 0.76rem; }

        .top-controls { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; gap: 15px; flex-wrap: wrap; }
        .control-group { display: flex; align-items: center; gap: 10px; background: rgba(26,29,27,0.82); padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border-color); flex-wrap: wrap; box-shadow: var(--shadow-soft); }
        .control-group label { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; }
        .control-group input[type="date"], .control-group input[type="range"] { background: #111411; border: 1px solid var(--border-color); color: var(--text-main); padding: 7px 9px; border-radius: 6px; font-size: 0.85rem; }
        .range-label { color: var(--text-muted); font-size: 0.8rem; font-weight: 700; padding-left: 8px; border-left: 1px solid var(--border-color); }

        /* ==========================================================================
           5. MODULE: KANBAN BOARD & CATEGORIE MANAGEMENT
           ========================================================================== */
        .cat-inline-box { background: rgba(26,29,27,0.66); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 16px; box-shadow: var(--shadow-soft); }
        .cat-inline-box summary { cursor: pointer; color: var(--text-muted); font-weight: 800; font-size: 0.82rem; list-style: none; }
        .cat-inline-box summary::-webkit-details-marker { display: none; }
        .cat-inline-box summary::before { content: "+ "; color: var(--accent-blue); }
        .cat-inline-box[open] { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
        .cat-inline-box[open] summary { width: 100%; margin-bottom: 8px; color: var(--text-main); }
        .cat-inline-box[open] summary::before { content: "- "; }
        .cat-tags-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
        .cat-pill { background: #111411; border: 1px solid rgba(255,255,255,0.08); padding: 5px 10px; border-radius: 999px; font-size: 0.75rem; display: flex; align-items: center; gap: 6px; color: #dce6dc; }
        .cat-pill button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; }
        .cat-pill button:hover { color: #ef4444; }
        .board-helper { display: flex; justify-content: space-between; gap: 18px; align-items: center; background: rgba(79,140,255,0.08); border: 1px solid rgba(79,140,255,0.16); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow-soft); }
        .board-helper-title { font-weight: 800; font-size: 0.96rem; margin-bottom: 3px; }
        .board-helper-text { color: var(--text-muted); font-size: 0.84rem; line-height: 1.4; }
        .board-helper-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

        #module-kanban { overflow-x: auto; overflow-y: hidden; }
        .kanban-board { display: flex; gap: 16px; height: 100%; min-width: max-content; align-items: stretch; padding-bottom: 6px; }
        .kanban-col { flex: 0 0 285px; background: rgba(26,29,27,0.84); border-radius: var(--radius); border: 1px solid var(--border-color); display: flex; flex-direction: column; height: 100%; max-height: 100%; box-shadow: var(--shadow-soft); overflow: hidden; }
        .kanban-col[data-status="To Do"], .kanban-col[data-tone="todo"] { border-top: 3px solid var(--status-todo); }
        .kanban-col[data-status="In Progress"], .kanban-col[data-tone="progress"] { border-top: 3px solid var(--status-progress); }
        .kanban-col[data-status="Review"], .kanban-col[data-tone="review"] { border-top: 3px solid var(--status-review); }
        .kanban-col[data-status="Done"], .kanban-col[data-tone="done"] { border-top: 3px solid var(--status-done); }
        .kanban-add-column { flex: 0 0 245px; min-height: 100%; border: 1px dashed rgba(255,255,255,0.18); border-radius: var(--radius); background: #141714; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font: inherit; transition: var(--transition); }
        .kanban-add-column span { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.12); background: #171a17; color: var(--text-main); font-size: 1.15rem; }
        .kanban-add-column strong { font-size: 0.86rem; }
        .kanban-add-column:hover { color: var(--text-main); border-color: rgba(255,255,255,0.3); background-color: rgba(255,255,255,0.025); }
        .kanban-add-column:disabled { opacity: 0.4; cursor: not-allowed; }
        .col-header { padding: 13px 14px; border-bottom: 1px solid var(--border-color); font-weight: 800; font-size: 0.86rem; display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.025); }
        .col-count { background: #101211; padding: 3px 8px; border-radius: 999px; font-size: 0.75rem; color: var(--text-muted); border: 1px solid var(--border-color); min-width: 26px; text-align: center; }
        .col-body { padding: 12px; min-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 11px; transition: var(--transition); }
        .col-empty { border: 1px dashed rgba(255,255,255,0.1); border-radius: var(--radius); padding: 18px 12px; color: var(--text-muted); font-size: 0.82rem; text-align: center; line-height: 1.4; }
        .col-quick-add { padding: 8px 12px 10px; border-top: 1px solid rgba(255,255,255,0.06); background: transparent; }
        .quick-add-btn { width: 100%; background: transparent; border: none; color: var(--text-muted); border-radius: 5px; padding: 7px 2px; cursor: pointer; text-align: left; font-weight: 650; font-size: 0.82rem; opacity: 0.72; transition: var(--transition); }
        .quick-add-btn:hover { color: var(--text-main); opacity: 1; background: rgba(255,255,255,0.035); padding-left: 7px; }
        
        .task-card { background: #151815; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 13px 13px 11px; cursor: grab; transition: var(--transition); box-shadow: none; position: relative; overflow: hidden; }
        .task-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--status-todo); opacity: 0.9; }
        .kanban-col[data-status="In Progress"] .task-card::before, .kanban-col[data-tone="progress"] .task-card::before { background: var(--status-progress); }
        .kanban-col[data-status="Review"] .task-card::before, .kanban-col[data-tone="review"] .task-card::before { background: var(--status-review); }
        .kanban-col[data-status="Done"] .task-card::before, .kanban-col[data-tone="done"] .task-card::before { background: var(--status-done); }
        .task-card:hover { border-color: rgba(255,255,255,0.18); transform: translateY(-1px); box-shadow: none; }
        .task-card.dragging { transform: rotate(1deg) scale(1.01); border-color: rgba(79,140,255,0.65); box-shadow: var(--shadow-lift); }
        .task-card:active { cursor: grabbing; transform: scale(0.99); }
        .task-drop-placeholder { border: 1px dashed rgba(255,255,255,0.18); border-radius: var(--radius); background: rgba(255,255,255,0.035); flex-shrink: 0; }
        .task-tag { display: none; }
        .task-title { font-size: 0.95rem; font-weight: 750; margin-bottom: 13px; line-height: 1.42; color: var(--text-main); display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
        .task-reaction { flex-shrink: 0; font-size: 0.95rem; line-height: 1; opacity: 0.9; }
        .task-progress-text { display: none; }
        .task-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.72rem; color: var(--text-muted); }
        .task-meta { min-width: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; opacity: 0.78; }
        .task-meta span { white-space: nowrap; }
        .task-meta .task-check-complete { color: var(--status-done); font-weight: 800; opacity: 1; }
        .task-meta span:not(:last-child)::after { content: ""; display: inline-block; width: 3px; height: 3px; margin-left: 8px; border-radius: 50%; background: var(--text-muted); opacity: 0.45; vertical-align: middle; }
        .task-assignees { display: flex; }
        .mini-avatar { width: 22px; height: 22px; border-radius: 50%; background: #2f3530; border: 1px solid rgba(255,255,255,0.11); display: flex; align-items: center; justify-content: center; font-size: 0.56rem; color: var(--text-main); margin-left: -5px; }
        .mini-avatar:first-child { margin-left: 0; }
        .col-body.drag-over { background-color: rgba(79, 140, 255, 0.08); outline: 1px dashed rgba(79,140,255,0.42); outline-offset: -7px; }

        .reaction-popover { position: fixed; display: none; align-items: center; gap: 4px; padding: 5px; background: #20251f; border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,0.22); z-index: 200; transform: translate(-8px, -100%); }
        .reaction-popover.active { display: flex; animation: reactionIn 0.12s ease-out; }
        .reaction-popover button { width: 32px; height: 32px; border: none; border-radius: 50%; background: transparent; cursor: pointer; font-size: 1.05rem; transition: var(--transition); }
        .reaction-popover button:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }
        .reaction-popover button.active { background: rgba(79,140,255,0.18); box-shadow: inset 0 0 0 1px rgba(79,140,255,0.45); }
        @keyframes reactionIn { from { opacity: 0; transform: translate(-8px, calc(-100% + 4px)) scale(0.96); } to { opacity: 1; transform: translate(-8px, -100%) scale(1); } }

        /* ==========================================================================
           6. MODULE: PLANNING (Gantt)
           ========================================================================== */
        .planning-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.07); }
        .planning-zoom { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text-muted); }
        .planning-zoom button { border: none; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 0.8rem; padding: 4px 2px; transition: var(--transition); }
        .planning-zoom button:hover { color: var(--text-main); }
        .planning-zoom input[type="range"] { width: 150px; accent-color: var(--accent-blue); }
        .planning-add-btn { border: 1px solid rgba(255,255,255,0.1); background: transparent; color: var(--text-main); border-radius: var(--radius); padding: 7px 11px; cursor: pointer; font-weight: 700; font-size: 0.82rem; transition: var(--transition); }
        .planning-add-btn:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.04); }
        .planning-tip { margin: -6px 0 14px; color: var(--text-muted); font-size: 0.84rem; background: rgba(43,191,178,0.07); border: 1px solid rgba(43,191,178,0.15); border-radius: var(--radius); padding: 10px 12px; }
        .gantt-container { background: rgba(26,29,27,0.88); border: 1px solid var(--border-color); border-radius: var(--radius); overflow-x: auto; overflow-y: auto; max-height: calc(100% - 80px); box-shadow: var(--shadow-soft); }
        .gantt-grid { display: grid; gap: 1px; background-color: rgba(255,255,255,0.06); border: 1px solid var(--border-color); width: 100%; min-width: max-content; }
        .gantt-header { background: #1b1f1c; padding: 9px 8px; font-size: 0.74rem; text-align: center; color: var(--text-muted); font-weight: 800; position: sticky; top: 0; z-index: 4; }
        .gantt-row { display: contents; }
        .gantt-cell { background: #111411; min-height: 48px; position: relative; border-bottom: 1px solid rgba(255,255,255,0.04); }
        .gantt-task-name { background: #181b18; padding: 9px 12px; font-weight: 700; font-size: 0.8rem; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.06); color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--border-color); cursor: grab; transition: var(--transition); position: relative; }
        .gantt-task-name:hover { color: #dce8ff; background: #20251f; }
        .gantt-task-name.name-dragging { opacity: 0.45; cursor: grabbing; }
        .gantt-task-name.drop-before::before,
        .gantt-task-name.drop-after::after { content: ""; position: absolute; left: 8px; right: 8px; height: 2px; background: var(--accent-blue); border-radius: 999px; }
        .gantt-task-name.drop-before::before { top: 1px; }
        .gantt-task-name.drop-after::after { bottom: 1px; }
        .gantt-category-row { background: #20251f; grid-column: 1 / -1; padding: 7px 12px; font-size: 0.75rem; font-weight: 800; color: #dce8ff; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border-color); }
        
        .gantt-bar {
            position: absolute; top: 7px; bottom: 7px; background: var(--status-todo); border-radius: 6px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px;
            font-size: 0.7rem; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 2; cursor: grab; transition: transform 0.16s cubic-bezier(.2,.8,.2,1), width 0.16s cubic-bezier(.2,.8,.2,1), filter 0.16s ease; box-shadow: var(--shadow-soft); touch-action: none; user-select: none;
        }
        .gantt-bar:hover { filter: brightness(1.07); transform: translateY(-1px); }
        .gantt-bar.dragging { cursor: grabbing; filter: brightness(1.12); opacity: 0.95; z-index: 6; transition: none; }
        .gantt-bar.progress { background: var(--status-progress); }
        .gantt-bar.done { background: var(--status-done); }
        .gantt-bar.review { background: var(--status-review); color: #17130b; }
        .gantt-bar-content { min-width: 0; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
        .gantt-bar-meta { font-size: 0.6rem; opacity: 0.8; margin-left: 8px; flex-shrink: 0; pointer-events: none; }
        .gantt-resize-handle { position: absolute; top: 0; bottom: 0; width: 12px; cursor: ew-resize; z-index: 7; }
        .gantt-resize-handle::after { content: ""; position: absolute; top: 9px; bottom: 9px; width: 3px; border-radius: 999px; background: rgba(255,255,255,0.55); opacity: 0; transition: opacity 0.14s ease; }
        .gantt-resize-handle.left { left: 0; }
        .gantt-resize-handle.left::after { left: 4px; }
        .gantt-resize-handle.right { right: 0; }
        .gantt-resize-handle.right::after { right: 4px; }
        .gantt-bar:hover .gantt-resize-handle::after,
        .gantt-bar.dragging .gantt-resize-handle::after { opacity: 1; }
        .gantt-container.gantt-editing { cursor: grabbing; }

        /* ==========================================================================
           7. MODULE: VERSLAGEN & LOGS & GEBRUIKERS
           ========================================================================== */
        .note-card { background: rgba(26,29,27,0.88); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 20px; margin-bottom: 15px; box-shadow: var(--shadow-soft); transition: var(--transition); }
        .note-card:hover { border-color: rgba(43,191,178,0.38); transform: translateY(-1px); }
        .note-header { display: flex; justify-content: space-between; margin-bottom: 12px; border-bottom: 1px solid var(--border-color); padding-bottom: 12px; align-items: center; gap: 14px; }
        .note-header h3 { font-size: 1.05rem; font-weight: 800; }
        .note-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; display: flex; gap: 20px; flex-wrap: wrap; }
        .note-body { font-size: 0.92rem; line-height: 1.6; margin-bottom: 15px; white-space: pre-line; color: var(--text-main); }
        .note-actions-section { background: #111411; border: 1px solid rgba(43,191,178,0.2); border-radius: var(--radius); padding: 12px; margin-top: 10px; }
        .note-add-tile { width: 100%; min-height: 92px; border: 1px dashed rgba(255,255,255,0.13); border-radius: var(--radius); background: transparent; color: var(--text-muted); cursor: pointer; font: inherit; font-size: 0.9rem; transition: var(--transition); }
        .note-add-tile:hover { border-color: rgba(255,255,255,0.24); color: var(--text-main); background: rgba(255,255,255,0.025); }
        
        .log-item { background: rgba(26,29,27,0.88); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 13px 15px; font-size: 0.85rem; display: flex; align-items: flex-start; gap: 15px; margin-bottom: 10px; box-shadow: var(--shadow-soft); }
        .log-time { color: var(--text-muted); width: 140px; flex-shrink: 0; }
        .log-content { flex: 1; line-height: 1.4; }
        .log-content span { color: #cfe0ff; font-weight: 800; }
        
        .checklist-item { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.85rem; }
        .checklist-item input { accent-color: var(--accent-blue); cursor: pointer; }
        .empty-state { padding: 46px; text-align: center; color: var(--text-muted); font-size: 0.9rem; font-style: italic; background: rgba(26,29,27,0.72); border: 1px dashed rgba(255,255,255,0.11); border-radius: var(--radius); }

        /* ==========================================================================
           8. MODALS
           ========================================================================== */
        .modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.58); backdrop-filter: blur(8px); display: none; justify-content: center; align-items: center; z-index: 480; padding: 24px; }
        .modal-overlay.active { display: flex; animation: overlayIn 0.18s ease-out; }
        .modal-overlay.active .modal-content { animation: modalIn 0.22s cubic-bezier(.2,.8,.2,1); }
        .modal-content { background: #181b18; border: 1px solid rgba(255,255,255,0.09); border-radius: var(--radius); width: 720px; max-width: 96vw; max-height: 92vh; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,0.22); }
        .modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; font-size: 1.05rem; font-weight: 750; margin-bottom: 0; border-bottom: 1px solid rgba(255,255,255,0.07); padding: 18px 22px 14px; position: sticky; top: 0; background: rgba(24,27,24,0.96); backdrop-filter: blur(14px); z-index: 3; }
        @keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
        @keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
        .modal-title-block { display: flex; flex-direction: column; gap: 4px; }
        .modal-subtitle { color: var(--text-muted); font-size: 0.78rem; font-weight: 400; line-height: 1.4; }
        .modal-form-body { padding: 16px 22px 22px; }
        .form-section { background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.07); border-radius: 0; padding: 0 0 16px; margin-bottom: 16px; box-shadow: none; }
        .form-section:last-of-type { border-bottom: none; margin-bottom: 8px; }
        .form-section-title { font-size: 0.72rem; color: var(--text-muted); font-weight: 750; text-transform: none; letter-spacing: 0; margin-bottom: 12px; display: block; }
        .form-section-title::before { content: none; }
        .close-btn { cursor: pointer; color: var(--text-muted); font-size: 1.2rem; }
        .close-btn:hover { color: var(--text-main); }
        .form-group { margin-bottom: 12px; }
        .form-group:last-child { margin-bottom: 0; }
        .form-group label { display: block; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 6px; text-transform: none; letter-spacing: 0; }
        .form-control { width: 100%; padding: 9px 10px; background: #141714; border: 1px solid rgba(255,255,255,0.09); color: var(--text-main); border-radius: 6px; font-family: var(--font-main); font-size: 0.9rem; line-height: 1.35; transition: var(--transition); }
        .form-control::placeholder { color: #64748b; }
        .form-control:hover { border-color: rgba(255,255,255,0.14); }
        .form-control:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(79,140,255,0.15); background: #20251f; }
        .form-row { display: flex; gap: 14px; }
        .form-row .form-group { flex: 1; }
        .field-hint { color: var(--text-muted); font-size: 0.72rem; line-height: 1.35; margin-top: 5px; opacity: 0.75; }
        .inline-add { display: flex; gap: 10px; align-items: stretch; }
        .inline-add .btn { flex-shrink: 0; }
        .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; border-top: 1px solid rgba(255,255,255,0.07); padding-top: 14px; }
        .category-combobox { position: relative; }
        .category-combobox .form-control { padding-right: 38px; }
        .category-toggle { position: absolute; right: 5px; top: 5px; width: 30px; height: 30px; border: none; border-radius: 5px; background: transparent; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
        .category-toggle:hover { background: rgba(255,255,255,0.06); color: var(--text-main); }
        .category-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; display: none; max-height: 180px; overflow-y: auto; background: #181b18; border: 1px solid var(--border-color); border-radius: 6px; padding: 5px; box-shadow: var(--shadow-lift); }
        .category-combobox.open .category-menu { display: block; }
        .category-option { width: 100%; border: none; border-radius: 5px; background: transparent; color: var(--text-main); padding: 8px 9px; text-align: left; cursor: pointer; font: inherit; font-size: 0.84rem; transition: var(--transition); }
        .category-option:hover, .category-option.active { background: rgba(255,255,255,0.06); }
        .category-option.create { color: var(--accent-success); border-top: 1px solid rgba(255,255,255,0.07); margin-top: 4px; padding-top: 9px; }        textarea.form-control { resize: vertical; min-height: 140px; }
        .progress-bar-bg { width: 100%; height: 8px; background: #0c0f0d; border-radius: 999px; margin-top: 5px; overflow: hidden; border: 1px solid var(--border-color); }
        .progress-bar-fill { height: 100%; background: var(--accent-success); width: 0%; transition: width 0.24s cubic-bezier(.2,.8,.2,1); }
        .checklist-panel { background: #141714; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 8px; min-height: 40px; }
        .checklist-item { background: transparent; border: 1px solid rgba(255,255,255,0.07); border-radius: 6px; padding: 8px 9px; margin-bottom: 7px; transition: var(--transition); }
        .checklist-item:hover { border-color: rgba(43,191,178,0.26); }
        .checklist-item:last-child { margin-bottom: 0; }
        .checklist-add-trigger { width: 100%; border: none; background: transparent; color: var(--text-muted); text-align: left; padding: 7px 4px; cursor: pointer; font-size: 0.84rem; opacity: 0.76; transition: var(--transition); }
        .checklist-add-trigger:hover { color: var(--text-main); opacity: 1; }
        .checklist-input-row { margin-top: 7px; }
        .checklist-input { width: 100%; border: none; border-bottom: 1px solid rgba(255,255,255,0.16); background: transparent; color: var(--text-main); padding: 8px 2px; font-family: var(--font-main); font-size: 0.88rem; outline: none; }
        .checklist-input:focus { border-bottom-color: var(--accent-blue); }
        .empty-inline { font-size: 0.8rem; color: var(--text-muted); display: block; padding: 2px; }

        @media (max-width: 1180px) {
            .kanban-board { height: 70vh; }
            .kanban-col { max-height: 520px; }
        }

        @media (max-width: 900px) {
            body { overflow: auto; height: auto; min-height: 100vh; }
            .topbar { position: sticky; top: 0; }
            .app-layout { display: block; overflow: visible; }
            .sidebar { width: 100%; flex-direction: row; align-items: center; padding: 12px; border-right: none; border-bottom: 1px solid var(--border-color); overflow-x: auto; }
            .nav-menu { flex-direction: row; height: auto; padding: 0; gap: 6px; }
            .nav-spacer { display: none; }
            .nav-item { margin-bottom: 0; white-space: nowrap; }
            .main-content { height: auto; min-height: calc(100vh - 116px); overflow: visible; }
            .module { height: auto; min-height: calc(100vh - 140px); padding: 22px 18px 28px; }
        }

        @media (max-width: 720px) {
            body { overflow: auto; }
            .kanban-board { height: auto; min-height: 520px; }
            .planning-toolbar { flex-direction: column; align-items: stretch; }
            .planning-zoom { flex-wrap: wrap; }
            .planning-add-btn { width: 100%; }
            .board-helper { flex-direction: column; align-items: stretch; }
            .board-helper-actions { justify-content: stretch; }
            .board-helper-actions .btn { flex: 1; }
            .top-controls, .cat-inline-box { align-items: stretch; }
            .control-group { width: 100%; }
            .modal-overlay { align-items: flex-start; padding: 10px; }
            .modal-content { max-width: 100%; max-height: calc(100vh - 20px); }
            .modal-header { padding: 18px; }
            .modal-form-body { padding: 16px 18px 20px; }
            .form-row, .inline-add, .modal-actions { flex-direction: column; }
            .modal-actions .btn { width: 100%; }
        }

        /* ==========================================================================
           9. AUTH & GEBRUIKERSBEHEER
           ========================================================================== */
        body.auth-required .topbar,
        body.auth-required .app-layout,
        body.auth-required .reaction-popover,
        body.auth-required .modal-overlay { display: none !important; }

        .auth-screen { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg-dark); }
        .auth-screen.hidden { display: none; }
        .auth-panel { width: min(440px, 100%); background: #181b18; border: 1px solid var(--border-color); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-soft); }
        .auth-brand { font-size: 0.86rem; font-weight: 800; color: #dce8ff; margin-bottom: 18px; }
        .auth-panel h1 { font-size: 1.35rem; line-height: 1.2; margin-bottom: 8px; }
        .auth-panel p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 18px; }
        .auth-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; background: #111411; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 5px; margin-bottom: 18px; }
        .auth-tabs button { border: none; border-radius: 6px; background: transparent; color: var(--text-muted); padding: 8px 6px; cursor: pointer; font: inherit; font-size: 0.78rem; font-weight: 750; transition: var(--transition); }
        .auth-tabs button.active { background: #242824; color: var(--text-main); }
        .auth-form { display: none; flex-direction: column; gap: 8px; }
        .auth-form.active { display: flex; }
        .auth-form label { color: var(--text-muted); font-size: 0.72rem; margin-top: 4px; }
        .auth-form .btn { margin-top: 10px; }
        .auth-message { min-height: 20px; margin-top: 14px; color: var(--text-muted); font-size: 0.82rem; line-height: 1.4; }
        .auth-message.error { color: #fca5a5; }
        .auth-message.success { color: var(--accent-success); }
        .logout-btn { border: 1px solid rgba(255,255,255,0.1); background: transparent; color: var(--text-muted); border-radius: 6px; padding: 6px 9px; cursor: pointer; font: inherit; font-size: 0.76rem; transition: var(--transition); }
        .logout-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.04); }

        .viewer-mode .planning-add-btn,
        .viewer-mode .quick-add-btn,
        .viewer-mode .cat-inline-box input,
        .viewer-mode .cat-inline-box button,
        .viewer-mode .note-add-tile,
        .viewer-mode .note-header button,
        .viewer-mode .task-card,
        .viewer-mode .gantt-bar,
        .viewer-mode .gantt-task-name { cursor: not-allowed; }
        .viewer-mode .planning-add-btn,
        .viewer-mode .quick-add-btn,
        .viewer-mode .cat-inline-box input,
        .viewer-mode .cat-inline-box button,
        .viewer-mode .note-add-tile,
        .viewer-mode .note-header button { opacity: 0.42; }
        .viewer-lock-toast { position: fixed; right: 20px; bottom: 20px; z-index: 600; background: #20251f; border: 1px solid rgba(255,255,255,0.12); color: var(--text-main); border-radius: var(--radius); padding: 11px 13px; box-shadow: var(--shadow-soft); opacity: 0; transform: translateY(8px); pointer-events: none; transition: var(--transition); font-size: 0.84rem; }
        .viewer-lock-toast.active { opacity: 1; transform: translateY(0); }

        .users-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
        .users-head h2 { font-size: 1.2rem; margin-bottom: 6px; }
        .users-head p,
        .muted-copy { color: var(--text-muted); font-size: 0.86rem; line-height: 1.45; }
        .access-badge { border: 1px solid rgba(38,185,130,0.34); color: var(--accent-success); border-radius: 999px; padding: 6px 10px; font-size: 0.76rem; font-weight: 800; white-space: nowrap; }
        .access-badge.viewer { border-color: rgba(232,181,79,0.34); color: var(--accent-warning); }
        .users-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
        .users-card { background: rgba(26,29,27,0.88); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-soft); }
        .users-card.full { overflow-x: auto; }
        .users-card-title { font-size: 0.86rem; font-weight: 800; margin-bottom: 12px; }
        .session-line { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 0.86rem; }
        .session-line:last-child { border-bottom: none; }
        .session-line span { color: var(--text-muted); }
        .project-key-box code { margin-top: 12px; background: #111411; border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; padding: 10px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--text-main); }
        .users-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
        .users-table th,
        .users-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,0.07); }
        .users-table th { color: var(--text-muted); font-size: 0.72rem; font-weight: 800; }
        .users-table td span { display: block; color: var(--text-muted); font-size: 0.76rem; margin-top: 3px; }

        @media (max-width: 720px) {
            .auth-panel { padding: 20px; }
            .users-head,
            .users-grid { display: block; }
            .users-card { margin-bottom: 12px; }
        }

        /* ==========================================================================
           10. PROJECT SWITCHER
           ========================================================================== */
        .brand-area { display: flex; align-items: center; gap: 12px; min-width: 0; }
        .project-switcher { position: relative; }
        .project-switcher-button { display: flex; align-items: center; gap: 7px; max-width: 280px; border: 1px solid rgba(255,255,255,0.1); background: #171a17; color: var(--text-main); border-radius: var(--radius); padding: 7px 10px; cursor: pointer; font: inherit; font-size: 0.84rem; font-weight: 700; transition: var(--transition); }
        .project-switcher-button:hover { background: #20251f; border-color: rgba(255,255,255,0.18); }
        #active-project-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .project-chevron { color: var(--text-muted); font-size: 0.72rem; }
        .project-menu { position: absolute; top: calc(100% + 8px); left: 0; width: 280px; max-width: calc(100vw - 24px); background: #181b18; border: 1px solid var(--border-color); border-radius: var(--radius); box-shadow: var(--shadow-lift); padding: 6px; display: none; z-index: 80; }
        .project-switcher.open .project-menu { display: block; animation: projectMenuIn 0.14s ease-out; }
        .project-menu-list { max-height: 280px; overflow-y: auto; }
        .project-menu-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: none; background: transparent; color: var(--text-main); border-radius: 6px; padding: 9px 10px; cursor: pointer; text-align: left; font: inherit; font-size: 0.84rem; transition: var(--transition); }
        .project-menu-item:hover { background: rgba(255,255,255,0.045); }
        .project-menu-item.active { background: rgba(79,140,255,0.14); color: #dce8ff; }
        .project-menu-item small { color: var(--text-muted); font-size: 0.72rem; white-space: nowrap; }
        .project-create-btn { width: 100%; margin-top: 6px; border: none; border-top: 1px solid rgba(255,255,255,0.07); background: transparent; color: var(--text-muted); padding: 10px; cursor: pointer; text-align: left; font: inherit; font-size: 0.82rem; font-weight: 750; transition: var(--transition); }
        .project-create-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.035); }
        .viewer-mode .project-create-btn { opacity: 0.42; cursor: not-allowed; }
        @keyframes projectMenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

        @media (max-width: 720px) {
            .topbar { gap: 12px; padding: 0 14px; }
            .brand-area { gap: 8px; }
            .project-switcher-button { max-width: 160px; }
            .user-profile span#user-display-name { display: none; }
        }

        /* ==========================================================================
           11. INSTELLINGEN
           ========================================================================== */
        .settings-shell { max-width: 1040px; }
        .settings-tabs { display: inline-flex; gap: 4px; background: #111411; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 5px; margin-bottom: 18px; }
        .settings-tab { border: none; border-radius: 6px; background: transparent; color: var(--text-muted); padding: 8px 12px; cursor: pointer; font: inherit; font-size: 0.82rem; font-weight: 750; transition: var(--transition); }
        .settings-tab:hover { color: var(--text-main); }
        .settings-tab.active { background: #242824; color: var(--text-main); }
        .settings-panel { display: none; }
        .settings-panel.active { display: block; animation: fadeIn 0.16s ease-out; }
        .settings-label { display: block; color: var(--text-muted); font-size: 0.72rem; margin-bottom: 7px; }
        .settings-inline-form { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
        .settings-inline-form .form-control { min-width: 0; }
        .project-settings-list { display: grid; gap: 7px; margin-bottom: 14px; }
        .project-settings-row { width: 100%; display: flex; justify-content: space-between; gap: 14px; align-items: center; border: 1px solid rgba(255,255,255,0.08); background: #141714; color: var(--text-main); border-radius: 6px; padding: 10px 11px; cursor: pointer; text-align: left; font: inherit; transition: var(--transition); }
        .project-settings-row:hover { border-color: rgba(255,255,255,0.16); background: #1d211d; }
        .project-settings-row.active { border-color: rgba(79,140,255,0.36); background: rgba(79,140,255,0.12); }
        .project-settings-row small { color: var(--text-muted); white-space: nowrap; }
        .viewer-mode .settings-inline-form button,
        .viewer-mode .settings-inline-form input,
        .viewer-mode #settings-create-project-btn { opacity: 0.45; cursor: not-allowed; }

        @media (max-width: 720px) {
            .settings-tabs,
            .settings-inline-form { width: 100%; }
            .settings-tabs { display: grid; grid-template-columns: 1fr; }
            .settings-inline-form { flex-direction: column; align-items: stretch; }
        }
        .project-key-box { display: flex; align-items: center; gap: 6px; margin-top: 12px; background: #111411; border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; padding: 4px; }
        .project-key-box code { flex: 1; display: block; margin-top: 0; background: transparent; border: 0; border-radius: 0; padding: 7px 8px; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.86rem; }
        .role-select { width: 150px; max-width: 100%; background: #141714; border: 1px solid rgba(255,255,255,0.1); color: var(--text-main); border-radius: 6px; padding: 7px 8px; font: inherit; font-size: 0.82rem; }
        .role-select:disabled { opacity: 0.5; cursor: not-allowed; }


        /* ==========================================================================
           12. PROJECT START
           ========================================================================== */
        body.project-required .app-layout,
        body.project-required .reaction-popover,
        body.project-required .project-switcher { display: none !important; }
        .project-onboarding { position: fixed; inset: 58px 0 0; z-index: 450; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg-dark); }
        .project-onboarding.hidden { display: none; }
        .project-onboarding-panel { width: min(760px, 100%); background: #181b18; border: 1px solid var(--border-color); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-soft); }
        .project-onboarding-panel h1 { font-size: 1.35rem; margin-bottom: 8px; }
        .project-onboarding-panel p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 18px; }
        .project-onboarding-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
        .project-onboarding-card { background: #141714; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 9px; }
        .project-onboarding-card h2 { font-size: 0.98rem; margin-bottom: 2px; }
        .project-onboarding-card label { color: var(--text-muted); font-size: 0.72rem; }
        .project-menu-empty { padding: 10px; color: var(--text-muted); font-size: 0.82rem; }
        .project-key-box .btn, .project-key-action { flex-shrink: 0; }
        .project-key-action { width: 32px; height: 32px; border-radius: 5px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: var(--text-muted); font-size: 1rem; }
        .project-key-action:hover { background: rgba(255,255,255,0.08); color: var(--text-main); }
        .project-key-action:disabled { opacity: 0.35; cursor: not-allowed; }

        @media (max-width: 720px) {
            .project-onboarding { inset: 58px 0 0; align-items: flex-start; }
            .project-onboarding-grid { grid-template-columns: 1fr; }
            .project-key-box { align-items: center; flex-direction: row; }
        }
        .danger-zone { border-color: rgba(239,68,68,0.28); }
        .danger-zone .users-card-title { color: #fca5a5; }
        .btn-danger { background: transparent; border: 1px solid rgba(239,68,68,0.45); color: #fca5a5; }
        .btn-danger:hover { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.65); color: #fecaca; }
        .viewer-mode .btn-danger { opacity: 0.45; cursor: not-allowed; }

        /* ==========================================================================
           13. ACCOUNTINSTELLINGEN
           ========================================================================== */
        .user-profile { border: 1px solid transparent; border-radius: var(--radius); padding: 4px; cursor: pointer; transition: var(--transition); }
        .user-profile:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
        .avatar { background-size: cover; background-position: center; }
        .profile-modal-content { width: 620px; }
        .profile-photo-row { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; margin-bottom: 16px; }
        .profile-photo-preview { width: 72px; height: 72px; border-radius: 50%; background: var(--accent-blue); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; border: 1px solid rgba(255,255,255,0.12); }
        #profile-photo-input { padding: 7px; }

        @media (max-width: 720px) {
            .profile-photo-row { grid-template-columns: 1fr; }
            .profile-photo-preview { width: 64px; height: 64px; }
        }

















