/* ==========================================================================
   NEXUS CORE // Personal Command Center Design System
   Target Domain: core.voermanweg.nl
   Modern Dark Glassmorphism + Dynamic Neon Aura
   ========================================================================== */

:root {
    --bg-base: #0a0b10;
    --bg-surface: rgba(18, 22, 34, 0.65);
    --bg-surface-hover: rgba(26, 32, 50, 0.85);
    --bg-surface-active: rgba(35, 43, 67, 0.95);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-glow: rgba(0, 242, 254, 0.4);
    
    --text-main: #f0f4f8;
    --text-muted: #8b9bb4;
    --text-dim: #54647b;
    
    --primary: #00f2fe;
    --primary-glow: rgba(0, 242, 254, 0.25);
    --secondary: #fe0979;
    --secondary-glow: rgba(254, 9, 121, 0.25);
    --accent: #4facfe;

    --success: #00ff87;
    --warning: #ffb800;
    --danger: #ff416c;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;
}

/* Theme Presets */
body.theme-cyber-neon {
    --primary: #00f2fe;
    --primary-glow: rgba(0, 242, 254, 0.25);
    --secondary: #fe0979;
    --secondary-glow: rgba(254, 9, 121, 0.25);
    --accent: #4facfe;
    --border-glass-glow: rgba(0, 242, 254, 0.4);
}

body.theme-electric-violet {
    --primary: #a855f7;
    --primary-glow: rgba(168, 85, 247, 0.25);
    --secondary: #ec4899;
    --secondary-glow: rgba(236, 72, 153, 0.25);
    --accent: #8b5cf6;
    --border-glass-glow: rgba(168, 85, 247, 0.4);
}

body.theme-matrix-emerald {
    --primary: #00ff87;
    --primary-glow: rgba(0, 255, 135, 0.25);
    --secondary: #60efff;
    --secondary-glow: rgba(96, 239, 255, 0.25);
    --accent: #10b981;
    --border-glass-glow: rgba(0, 255, 135, 0.4);
}

body.theme-sunset-outrun {
    --primary: #ff8a00;
    --primary-glow: rgba(255, 138, 0, 0.25);
    --secondary: #e52e71;
    --secondary-glow: rgba(229, 46, 113, 0.25);
    --accent: #ff4e50;
    --border-glass-glow: rgba(255, 138, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* Background Canvas & Ambient Orbs */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: auto;
}

.ambient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    animation: orbFloat 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -150px;
    left: -100px;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation-delay: -7s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 80px) scale(1.1); }
    100% { transform: translate(-40px, 40px) scale(0.95); }
}

/* App Layout */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 1480px;
    margin: 0 auto;
    padding: 24px 32px 100px 32px;
}

/* Glass Surface Styling */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

/* Navigation Header — 3-Zone Cyber Command HUD */
.top-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 20px;
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
    background: rgba(14, 18, 28, 0.75);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    box-shadow: 0 12px 36px 0 rgba(0, 0, 0, 0.5);
    gap: 16px;
    position: relative;
}

/* Zone 1: Brand & System Indicator */
.nav-brand-zone {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: start;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--primary-glow);
    color: #fff;
    flex-shrink: 0;
}

.brand-titles {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.brand-title-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    background: linear-gradient(90deg, #ffffff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.brand-title-sep {
    font-size: 0.9rem;
    color: var(--primary);
    font-family: var(--font-mono);
    opacity: 0.7;
}

.brand-title-sub {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.brand-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-family: var(--font-mono);
}

.brand-domain {
    color: var(--text-muted);
    letter-spacing: 0.4px;
}

.brand-dot-sep {
    color: var(--text-dim);
}

/* Compact DB status pill attached to brand */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-family: var(--font-mono);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    line-height: 1.2;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: pulse 2s infinite;
}

.status-pill-warning .status-dot {
    background: var(--warning);
    box-shadow: 0 0 6px var(--warning);
}

.status-pill-danger .status-dot {
    background: var(--danger);
    box-shadow: 0 0 6px var(--danger);
}

/* Zone 2: Centered Telemetry HUD Capsule */
.nav-telemetry-hud {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    justify-self: center;
}

.hud-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-mono);
    min-width: 90px;
}

.digital-time {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
    letter-spacing: 1px;
    line-height: 1.1;
}

.digital-date {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.hud-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
}

.hud-divider-sm {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
}

.hud-weather {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: var(--radius-full);
    padding: 2px 6px;
}

.hud-weather:hover {
    color: var(--primary);
}

.weather-icon-wrap {
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-icon-wrap i {
    width: 18px;
    height: 18px;
}

.weather-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.weather-temp-line {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.1;
}

.weather-temp {
    font-size: 0.92rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #fff;
}

.weather-cond {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.weather-loc {
    font-size: 0.64rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    letter-spacing: 0.3px;
}

/* Zone 3: Streamlined Actions Dock & User Profile */
.nav-actions-zone {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
}

.nav-btn-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Compact Search Trigger */
.nav-search-btn {
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
    padding: 0 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-search-btn i {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

.nav-search-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 12px var(--primary-glow);
    transform: translateY(-1px);
}

.nav-btn-highlight {
    border-color: rgba(0, 242, 254, 0.3);
}

.kbd-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 2px 5px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Audio Feedback Toggle Button */
.nav-icon-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-icon-btn i {
    width: 16px;
    height: 16px;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-icon-btn.audio-active {
    color: var(--primary);
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Theme Selector Pill */
.theme-select-wrap {
    height: 36px;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0 8px 0 10px;
    gap: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.theme-select-wrap:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.theme-icon {
    width: 14px;
    height: 14px;
    color: var(--secondary);
    pointer-events: none;
}

.theme-dropdown-clean {
    background: transparent;
    color: var(--text-main);
    border: none;
    outline: none;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 14px;
}

.theme-dropdown-clean option {
    background: #0f131f;
    color: #fff;
    padding: 8px;
}

.theme-chevron {
    width: 12px;
    height: 12px;
    color: var(--text-muted);
    position: absolute;
    right: 8px;
    pointer-events: none;
}

/* User Identity Capsule with Logout */
.user-capsule {
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px 0 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    transition: all 0.2s;
}

.user-avatar-badge {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-badge .shield-icon {
    width: 15px;
    height: 15px;
    color: var(--primary);
}

.user-avatar-badge .user-avatar-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

.user-details {
    display: flex;
    align-items: center;
    font-size: 0.78rem;
    font-family: var(--font-mono);
}

.user-callsign {
    color: var(--text-main);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-callsign-name {
    color: var(--text-main);
    font-weight: 600;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role-badge {
    font-size: 0.65rem;
    color: var(--primary);
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.3);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.user-logout-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.user-logout-btn i {
    width: 14px;
    height: 14px;
}

.user-logout-btn:hover {
    color: var(--danger);
    background: rgba(255, 65, 108, 0.15);
}

/* Responsive HUD Breakpoints */
@media (max-width: 1200px) {
    .top-nav {
        flex-wrap: wrap;
        gap: 14px;
    }
    .nav-telemetry-hud {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .btn-label, .kbd-badge {
        display: none;
    }
    .theme-dropdown-clean {
        display: none;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* Buttons and Controls */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #050811;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 0 16px var(--primary-glow);
}

.btn-primary:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.icon-btn, .icon-btn-sm {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.icon-btn {
    width: 38px;
    height: 38px;
}

.icon-btn-sm {
    width: 28px;
    height: 28px;
}

.icon-btn:hover, .icon-btn-sm:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.btn-danger-hover:hover {
    color: var(--danger) !important;
}

.theme-dropdown {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 0.85rem;
    cursor: pointer;
}

.theme-dropdown option {
    background: #121622;
    color: #fff;
}

.audio-btn.audio-active {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary-glow);
}

/* Telemetry Stats Bar */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.stat-val {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-top: 4px;
}

.stat-icon {
    color: var(--primary);
    opacity: 0.8;
}

/* Donut Progress Gauge */
.progress-ring-wrap {
    position: relative;
    width: 80px;
    height: 80px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    stroke: rgba(255, 255, 255, 0.08);
}

.progress-ring-indicator {
    stroke: var(--primary);
    stroke-dasharray: 213.6;
    stroke-dashoffset: 213.6;
    transition: stroke-dashoffset 0.8s ease-in-out;
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #fff;
}

/* Dashboard Layout Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 28px;
}

.dash-column {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Section Containers */
.section-box {
    padding: 24px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.section-title i {
    color: var(--primary);
}

/* Filters */
.filter-tabs {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
}

.filter-pill {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-pill:hover {
    color: #fff;
}

.filter-pill.active {
    background: var(--primary);
    color: #050811;
    font-weight: 600;
}

/* Tasks Module */
.add-task-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.input-glass {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
    transition: border 0.2s;
}

.input-glass:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
}

.task-completed .task-title {
    text-decoration: line-through;
    color: var(--text-dim);
}

.task-details {
    flex: 1;
}

.task-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-title {
    font-weight: 500;
    font-size: 0.95rem;
}

.task-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.task-meta {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.task-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Badges */
.badge {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.badge-priority-urgent {
    background: rgba(255, 65, 108, 0.2);
    color: #ff416c;
    border: 1px solid rgba(255, 65, 108, 0.4);
    box-shadow: 0 0 8px rgba(255, 65, 108, 0.3);
}

.badge-priority-high {
    background: rgba(255, 184, 0, 0.2);
    color: #ffb800;
    border: 1px solid rgba(255, 184, 0, 0.4);
}

.badge-priority-medium {
    background: rgba(0, 242, 254, 0.15);
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.3);
}

.badge-priority-low {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

/* Custom Checkbox */
.custom-checkbox {
    position: relative;
    cursor: pointer;
    user-select: none;
    margin-top: 2px;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    transition: all 0.2s;
}

.custom-checkbox:hover .checkmark {
    border-color: var(--primary);
}

.custom-checkbox input:checked ~ .checkmark {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #050811;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark::after {
    display: block;
}

/* Bookmarks Launcher */
.search-bar-wrap {
    margin-bottom: 16px;
}

.bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.bookmark-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
}

.bookmark-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-glow, var(--primary));
    box-shadow: 0 6px 20px var(--accent-glow, var(--primary-glow));
}

.bookmark-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bookmark-info {
    flex: 1;
    min-width: 0;
}

.bookmark-title {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-category {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.bookmark-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.click-badge {
    font-size: 0.65rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* Scratchpad */
.scratchpad-wrap {
    position: relative;
}

.scratchpad-area {
    width: 100%;
    min-height: 140px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: #e2e8f0;
    padding: 14px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    resize: vertical;
    outline: none;
    line-height: 1.6;
}

.scratchpad-area:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.scratchpad-status {
    position: absolute;
    bottom: 12px;
    right: 14px;
    font-size: 0.7rem;
    color: var(--success);
    font-family: var(--font-mono);
}

/* Notes Vault */
.notes-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.note-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.note-pinned {
    border-left: 3px solid var(--primary);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.note-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pin-indicator {
    color: var(--primary);
    display: flex;
}

.pin-indicator i {
    width: 14px;
    height: 14px;
}

.note-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.note-card-actions {
    display: flex;
    gap: 4px;
}

.note-body {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: pre-wrap;
    max-height: 120px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 10px;
    border-radius: 6px;
    font-family: var(--font-mono);
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.75rem;
}

.note-category-tag {
    color: var(--text-dim);
}

.note-tags {
    display: flex;
    gap: 6px;
}

.tag-pill {
    color: var(--primary);
    font-family: var(--font-mono);
}

/* Activity Chart */
.chart-wrap {
    position: relative;
    width: 100%;
    margin-top: 12px;
}

/* Retro HUD Terminal Bottom Drawer */
.hud-terminal-drawer {
    position: fixed;
    bottom: -340px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1200px, 94vw);
    height: 360px;
    background: rgba(8, 10, 16, 0.94);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass-glow);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.7);
    z-index: 100;
    transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.hud-terminal-drawer.terminal-open {
    bottom: 0;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-glass);
    cursor: pointer;
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 14px 18px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    overflow: hidden;
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.term-line {
    white-space: pre-wrap;
    word-break: break-all;
}

.term-input {
    color: var(--primary);
    font-weight: 600;
}

.term-response {
    color: #e2e8f0;
}

.term-error {
    color: var(--danger);
}

.terminal-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border-glass);
    padding-top: 8px;
}

.term-prompt {
    color: var(--primary);
    font-weight: 700;
}

.term-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.modal-open {
    display: flex;
}

.modal-dialog {
    width: min(540px, 92vw);
    padding: 28px;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
}

/* Auth Portal */
.auth-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 20px;
}

.auth-card {
    width: min(480px, 100%);
    padding: 36px 32px;
}

.auth-header {
    text-align: center;
    margin-bottom: 26px;
}

.auth-domain-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary);
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid var(--border-glass-glow);
    margin-bottom: 12px;
}

.auth-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-bottom: 22px;
}

.auth-tab-btn {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab-btn.active {
    background: var(--primary);
    color: #050811;
    font-weight: 700;
}

.auth-error {
    background: rgba(255, 65, 108, 0.15);
    border: 1px solid rgba(255, 65, 108, 0.4);
    color: #ff6b8b;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    margin-bottom: 14px;
    display: none;
}

.auth-hint {
    margin-top: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    font-size: 0.72rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* Forced Password Change Modal Alert */
.force-pwd-dialog {
    border: 1px solid rgba(255, 184, 0, 0.6) !important;
    box-shadow: 0 0 30px rgba(255, 184, 0, 0.25) !important;
}

/* Command Palette */
.palette-dialog {
    width: min(640px, 94vw);
    padding: 16px;
}

.palette-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-glass);
}

.palette-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1.1rem;
    font-family: var(--font-sans);
}

.palette-results {
    max-height: 380px;
    overflow-y: auto;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.palette-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    background: rgba(255, 255, 255, 0.02);
}

.palette-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left: 2px solid var(--primary);
}

.palette-item-text {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.palette-item-title {
    font-size: 0.9rem;
    color: #fff;
}

.palette-item-type {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.empty-state {
    text-align: center;
    color: var(--text-dim);
    padding: 30px 10px;
    font-size: 0.85rem;
    font-style: italic;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .app-container {
        padding: 14px 14px 100px 14px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .top-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .nav-telemetry {
        width: 100%;
        justify-content: space-between;
    }
}
