        /* ═══════════════════════════════════════════════════════════
           Shadow Guardian · Command Center (Enterprise Build)
           Design Language: Cupertino Precision
           ═══════════════════════════════════════════════════════════ */

        :root {
            /* Core Pallet */
            --bg-base: #000000;
            --bg-surface: #1C1C1E;
            --bg-surface-elevated: #2C2C2E;
            --bg-sidebar: rgba(28, 28, 30, 0.75);
            
            /* Typography */
            --text-primary: rgba(255, 255, 255, 0.95);
            --text-secondary: rgba(255, 255, 255, 0.60);
            --text-tertiary: rgba(255, 255, 255, 0.35);
            
            /* Accents (Apple HI Colors) */
            --accent-blue: #0A84FF;
            --accent-blue-dim: rgba(10, 132, 255, 0.15);
            --accent-green: #30D158;
            --accent-red: #FF453A;
            --accent-red-dim: rgba(255, 69, 58, 0.15);
            --accent-orange: #FF9F0A;
            --accent-purple: #BF5AF2;
            
            /* Structural */
            --border-color: rgba(255, 255, 255, 0.08);
            --border-strong: rgba(255, 255, 255, 0.15);
            --radius-modal: 20px;
            --radius-panel: 14px;
            --radius-sm: 8px;
            --radius-pill: 999px;
            
            /* Typefaces */
            --font-ui: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
            --font-mono: 'SF Mono', 'JetBrains Mono', ui-monospace, monospace;
            
            /* Motion */
            --ease-apple: cubic-bezier(0.25, 1, 0.5, 1);
            --dur-fast: 150ms;
            --dur-med: 300ms;
        }

        /* ─── Base ───────────────────────────────────────────────── */
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        body {
            font-family: var(--font-ui);
            background-color: var(--bg-base);
            color: var(--text-primary);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            font-size: 14px;
            line-height: 1.5;
            min-height: 100vh;
            overflow: hidden;
        }

        .hidden { display: none !important; }

        /* ─── Scrollbars (Subtle) ────────────────────────────────── */
        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { 
            background: var(--text-tertiary); 
            border-radius: var(--radius-pill); 
            border: 2px solid var(--bg-surface);
        }
        ::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

        /* ─── Overlays & Modals ──────────────────────────────────── */
        .overlay {
            position: fixed; inset: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            display: flex; align-items: center; justify-content: center;
            z-index: 9999;
            animation: fade-in var(--dur-med) var(--ease-apple);
        }

        .modal-glass {
            background: rgba(28, 28, 30, 0.85);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-modal);
            box-shadow: 0 24px 48px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
            width: 100%; max-width: 440px;
            padding: 40px;
            transform-origin: center;
            animation: scale-up var(--dur-med) var(--ease-apple);
        }
        .login-modal { max-width: 380px; }

        .modal-header { text-align: center; margin-bottom: 32px; }
        .icon-container {
            width: 56px; height: 56px;
            background: linear-gradient(180deg, var(--bg-surface-elevated), var(--bg-surface));
            border: 1px solid var(--border-color);
            border-radius: 16px;
            display: flex; align-items: center; justify-content: center;
            margin: 0 auto 16px;
            color: var(--accent-blue);
            box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        }
        .icon-container svg { width: 28px; height: 28px; }

        .modal-header h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
        .modal-subtitle { font-size: 13px; color: var(--text-secondary); }

        /* ─── Forms ──────────────────────────────────────────────── */
        .form-group { margin-bottom: 20px; }
        .form-group label {
            display: block; font-size: 12px; font-weight: 500;
            color: var(--text-secondary); margin-bottom: 8px;
        }
        input[type="text"], input[type="password"], input[type="url"], textarea {
            width: 100%;
            background: rgba(0,0,0,0.2);
            border: 1px solid var(--border-strong);
            border-radius: var(--radius-sm);
            padding: 12px 14px;
            color: var(--text-primary);
            font-size: 14px;
            font-family: var(--font-ui);
            transition: all var(--dur-fast) var(--ease-apple);
        }
        input:focus, textarea:focus {
            outline: none;
            border-color: var(--accent-blue);
            box-shadow: 0 0 0 3px var(--accent-blue-dim);
        }
        input::placeholder, textarea::placeholder { color: var(--text-tertiary); }
        .divider { height: 1px; background: var(--border-color); margin: 24px 0; }
        .auth-expand { animation: slide-down 0.3s var(--ease-apple); }

        /* ─── Toggles & Buttons ──────────────────────────────────── */
        .toggle-row {
            display: flex; align-items: center; justify-content: space-between;
            cursor: pointer;
        }
        .toggle-label { font-size: 14px; font-weight: 500; }
        .toggle-switch {
            width: 44px; height: 24px;
            position: relative;
        }
        .toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
        .toggle-slider {
            position: absolute; inset: 0;
            background: var(--bg-surface-elevated);
            border-radius: 24px;
            border: 1px solid var(--border-color);
            transition: var(--dur-fast) var(--ease-apple);
        }
        .toggle-slider::before {
            content: ''; position: absolute;
            height: 20px; width: 20px;
            left: 1px; bottom: 1px;
            background: #fff; border-radius: 50%;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            transition: var(--dur-fast) var(--ease-apple);
        }
        input:checked + .toggle-slider { background: var(--accent-green); border-color: var(--accent-green); }
        input:checked + .toggle-slider::before { transform: translateX(20px); }

        .btn-primary {
            width: 100%; padding: 14px;
            background: var(--accent-blue);
            color: #fff; border: none;
            border-radius: var(--radius-sm);
            font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
            cursor: pointer;
            transition: background var(--dur-fast);
            margin-top: 10px;
        }
        .btn-primary:hover { background: #0071E3; }
        .btn-primary:active { transform: scale(0.98); }

        .btn-outline {
            padding: 10px 20px;
            background: transparent;
            border: 1px solid var(--border-strong);
            border-radius: var(--radius-sm);
            color: var(--text-primary);
            font-size: 13px; font-weight: 500;
            cursor: pointer; transition: all var(--dur-fast);
        }
        .btn-outline:hover { background: var(--bg-surface-elevated); }

        .error-text { color: var(--accent-red); font-size: 13px; text-align: center; margin-top: 12px; }

        /* ─── Dashboard Layout ───────────────────────────────────── */
        #dashboard {
            display: grid;
            grid-template-columns: 260px 1fr;
            height: 100vh;
        }

        /* ─── Sidebar ────────────────────────────────────────────── */
        .sidebar-v2 {
            background: var(--bg-sidebar);
            backdrop-filter: blur(30px);
            -webkit-backdrop-filter: blur(30px);
            border-right: 1px solid var(--border-color);
            display: flex; flex-direction: column;
            z-index: 10;
        }

        .sidebar-header { padding: 24px 20px; }
        .brand-identity { display: flex; align-items: center; gap: 12px; }
        .brand-icon {
            width: 36px; height: 36px;
            background: var(--accent-blue);
            border-radius: 10px;
            display: flex; align-items: center; justify-content: center;
            color: #fff; flex-shrink: 0;
            box-shadow: 0 4px 12px var(--accent-blue-dim);
        }
        .brand-icon svg { width: 18px; height: 18px; }
        .brand-title { font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }

        .status-indicator { margin-top: 4px; }
        .status-pill {
            font-size: 11px; font-weight: 600;
            padding: 2px 8px; border-radius: var(--radius-pill);
            display: inline-flex; align-items: center; gap: 6px;
        }
        .status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
        .status-pill.offline { background: var(--accent-red-dim); color: var(--accent-red); }
        .status-pill.offline::before { background: var(--accent-red); }
        .status-pill.online { background: rgba(48, 209, 88, 0.15); color: var(--accent-green); }
        .status-pill.online::before { background: var(--accent-green); }
        .status-pill.off { background: rgba(255,255,255,0.1); color: var(--text-secondary); }
        .status-pill.off::before { background: var(--text-tertiary); }
        .status-pill.active { background: var(--accent-blue-dim); color: var(--accent-blue); }
        .status-pill.active::before { background: var(--accent-blue); }

        .sidebar-scroll { flex: 1; overflow-y: auto; padding: 0 12px; }
        .nav-group-title {
            font-size: 11px; font-weight: 600; color: var(--text-tertiary);
            text-transform: uppercase; letter-spacing: 0.05em;
            padding: 16px 12px 8px;
        }
        .nav-item {
            display: flex; align-items: center; gap: 10px;
            padding: 10px 12px; border-radius: var(--radius-sm);
            color: var(--text-secondary); font-size: 14px; font-weight: 500;
            text-decoration: none; transition: var(--dur-fast);
            margin-bottom: 2px;
        }
        .nav-item svg { width: 18px; height: 18px; opacity: 0.7; }
        .nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
        .nav-item.active { background: var(--accent-blue); color: #fff; }
        .nav-item.active svg { opacity: 1; }

        .nav-badge {
            margin-left: auto; background: var(--accent-red); color: #fff;
            font-size: 11px; font-weight: 700; padding: 2px 6px;
            border-radius: var(--radius-pill); min-width: 20px; text-align: center;
        }

        .sidebar-footer { padding: 20px; border-top: 1px solid var(--border-color); }
        .hardware-stats { display: flex; justify-content: space-between; margin-bottom: 16px; }
        .stat-block { display: flex; flex-direction: column; gap: 4px; }
        .stat-lbl { font-size: 10px; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; }
        .stat-val { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--text-primary); }

        .powered-by { text-align: center; font-size: 10px; color: var(--text-tertiary); letter-spacing: 0.02em; }

        /* ─── Workspace & Panels ─────────────────────────────────── */
        .workspace {
            padding: 32px;
            overflow-y: auto;
            background: radial-gradient(circle at top right, rgba(10, 132, 255, 0.05), transparent 400px);
        }

        .grid-layout {
            display: grid; grid-template-columns: repeat(2, 1fr);
            gap: 24px; max-width: 1400px; margin: 0 auto;
        }
        .span-full { grid-column: 1 / -1; }

        .panel {
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.15);
            display: flex; flex-direction: column;
            overflow: hidden;
        }

        .panel-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 12px 16px; border-bottom: 1px solid var(--border-color);
            background: transparent;
        }
        .panel-title { display: flex; align-items: center; gap: 8px; }
        .panel-title svg { width: 16px; height: 16px; color: var(--text-secondary); }
        .panel-title h2 { font-size: 14px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.01em; }

        .panel-badge {
            background: var(--bg-surface-elevated); border: 1px solid var(--border-strong);
            color: var(--text-primary); font-family: var(--font-mono); font-size: 12px;
            padding: 2px 10px; border-radius: var(--radius-pill); font-weight: 500;
        }
        .panel-badge.critical { background: var(--accent-red-dim); color: var(--accent-red); border-color: transparent; }

        .panel-content { flex: 1; display: flex; flex-direction: column; }
        .panel-content.scrollable { overflow-y: auto; }
        .panel-content.no-pad { padding: 0; }
        .panel-content.padding-rich { padding: 16px; }

        /* ─── Data Trees & Lists ─────────────────────────────────── */
        .empty-message { padding: 40px 20px; text-align: center; color: var(--text-tertiary); font-size: 14px; }

        .process-group { border-bottom: 1px solid var(--border-color); }
        .process-group:last-child { border-bottom: none; }
        .process-header {
            display: flex; align-items: center; gap: 12px; padding: 12px 20px;
            cursor: pointer; transition: var(--dur-fast);
        }
        .process-header:hover { background: rgba(255,255,255,0.03); }
        .process-header.is-foreground { background: var(--accent-blue-dim); }

        .app-icon-sys {
            width: 32px; height: 32px; border-radius: 8px;
            display: flex; align-items: center; justify-content: center;
            font-size: 14px; font-weight: 600; color: #fff;
            box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
        }
        .process-info { flex: 1; min-width: 0; }
        .process-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .process-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

        .process-stats { display: flex; align-items: center; gap: 12px; }
        .window-count { font-size: 12px; color: var(--text-secondary); background: var(--bg-surface-elevated); padding: 2px 8px; border-radius: var(--radius-pill); }
        .expand-icon { width: 16px; height: 16px; color: var(--text-tertiary); transition: var(--dur-fast); }
        .process-group.expanded .expand-icon { transform: rotate(180deg); color: var(--text-primary); }

        .process-children { display: none; background: rgba(0,0,0,0.2); border-top: 1px solid var(--border-color); }
        .process-group.expanded .process-children { display: block; }
        .child-row {
            display: flex; align-items: center; gap: 12px; padding: 8px 20px 8px 64px;
            border-bottom: 1px solid rgba(255,255,255,0.02);
        }
        .child-row:last-child { border-bottom: none; }
        .child-title { flex: 1; font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .child-pid { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); }
        .indicator-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-green); }

        /* ─── Tables ─────────────────────────────────────────────── */
        .data-table { width: 100%; border-collapse: collapse; text-align: left; }
        .data-table th {
            padding: 10px 16px; font-size: 11px; font-weight: 600;
            color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em;
            border-bottom: 1px solid var(--border-color);
            position: sticky; top: 0; background: var(--bg-surface); z-index: 2;
        }
        .data-table td {
            padding: 10px 16px; font-size: 13px; color: var(--text-primary);
            border-bottom: 1px solid var(--border-color);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px;
        }
        .data-table tr:last-child td { border-bottom: none; }
        .data-table tr:hover td { background: rgba(255,255,255,0.02); }
        .placeholder td { text-align: center; color: var(--text-tertiary); padding: 30px; }

        /* ─── Timeline ───────────────────────────────────────────── */
        .timeline-v2 { padding: 16px 20px; position: relative; }
        .timeline-v2::before {
            content: ''; position: absolute; left: 26px; top: 16px; bottom: 16px;
            width: 2px; background: var(--border-strong); border-radius: 2px;
        }
        .time-node { position: relative; padding: 12px 0 12px 32px; }
        .time-node::before {
            content: ''; position: absolute; left: -2px; top: 18px;
            width: 8px; height: 8px; border-radius: 50%;
            background: var(--bg-surface); border: 2px solid var(--text-secondary);
            z-index: 2;
        }
        .time-node.t-lock::before { border-color: var(--accent-orange); background: var(--accent-orange); }
        .time-node.t-unlock::before { border-color: var(--accent-green); background: var(--accent-green); }
        .t-title { font-size: 14px; font-weight: 500; text-transform: capitalize; }
        .t-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }

        /* ─── Alerts ─────────────────────────────────────────────── */
        .alert-feed { padding: 8px; }
        .alert-card {
            background: var(--bg-surface-elevated); border-radius: var(--radius-sm);
            padding: 12px 16px; margin-bottom: 8px;
            display: flex; align-items: flex-start; gap: 12px;
        }
        .alert-card:last-child { margin-bottom: 0; }
        .alert-card.sev-high { border-left: 3px solid var(--accent-red); }
        .alert-card.sev-med { border-left: 3px solid var(--accent-orange); }
        .alert-card.sev-low { border-left: 3px solid var(--accent-blue); }

        .alert-body { flex: 1; }
        .alert-msg { font-size: 13px; font-weight: 500; line-height: 1.4; }
        .alert-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }
        .btn-ack {
            background: transparent; border: 1px solid var(--border-strong);
            color: var(--text-secondary); font-size: 11px; font-weight: 600;
            padding: 4px 10px; border-radius: 6px; cursor: pointer;
            transition: var(--dur-fast);
        }
        .btn-ack:hover { background: var(--accent-green); border-color: var(--accent-green); color: #fff; }

        /* ─── Utilities & Animations ─────────────────────────────── */
        .highlight-row { background: var(--bg-surface-elevated); padding: 16px; border-radius: var(--radius-sm); margin-bottom: 16px; }
        .input-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
        .input-stack textarea { min-height: 100px; }

        @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
        @keyframes scale-up { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
        @keyframes slide-down { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

        /* ─── Responsive ─────────────────────────────────────────── */
        @media (max-width: 1024px) { .grid-layout { grid-template-columns: 1fr; } }
        @media (max-width: 768px) { #dashboard { grid-template-columns: 1fr; } .sidebar-v2 { display: none; } .workspace { padding: 16px; } }
