:root {
    --cyan: #00E5FF;
    --purple: #7C3AED;
    --obsidian: #0B0E14;
    --emerald: #10B981;
    --crimson: #EF4444;
    --amber: #F59E0B;
    --slate-800: #1E293B;
    --slate-900: #0F172A;
    --logo-navy: #0F172A;
    --logo-blue: #1E3A8A;

    /* Institutional Light (Default) */
    --bg-color: #F5F7FA;
    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 209, 255, 0.2);
    --sidebar-bg: #FFFFFF;
    --border-color: rgba(15, 23, 42, 0.08);
    --card-hover-bg: #FFFFFF;
    --overlay-bg: rgba(241, 245, 249, 0.98);
    --muted-bg: rgba(15, 23, 42, 0.05);
}

.dark-theme {
    /* Sentinel Dark */
    --bg-color: var(--obsidian);
    --text-primary: #E2E8F0;
    --text-secondary: #64748b;
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --sidebar-bg: rgba(15, 23, 42, 0.8);
    --border-color: rgba(255, 255, 255, 0.05);
    --card-hover-bg: rgba(30, 41, 59, 0.6);
    --overlay-bg: rgba(11, 14, 20, 0.9);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    background-image: radial-gradient(circle at 0% 0%, rgba(0, 229, 255, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 100% 100%, rgba(124, 58, 237, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    letter-spacing: -0.01em;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.glass:hover {
    border-color: rgba(0, 229, 255, 0.3);
    background: var(--card-hover-bg);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.text-cyan { color: var(--cyan); }
.text-emerald { color: var(--emerald); }
.text-crimson { color: var(--crimson); }
.text-amber { color: var(--amber); }

.glow-cyan { text-shadow: 0 0 15px rgba(0, 229, 255, 0.3); }
.glow-emerald { text-shadow: 0 0 15px rgba(16, 185, 129, 0.3); }

.mono { font-family: 'JetBrains Mono', monospace; }

/* Sidebar Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 80px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: background-color 0.3s ease, width 0.3s ease;
}

.main-content {
    flex: 1;
    margin-left: 80px;
    padding: 24px;
    transition: margin-left 0.3s ease;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: 60px;
        bottom: 0;
        top: auto;
        flex-direction: row;
        justify-content: space-around;
        padding: 0;
        border-right: none;
        border-top: 1px solid var(--glass-border);
        backdrop-filter: blur(20px);
    }
    .sidebar .mb-12 { display: none; }
    .sidebar nav { flex-direction: row !important; gap: 0 !important; width: 100%; height: 100%; }
    .nav-item { margin-bottom: 0; height: 100%; width: 25%; border-radius: 0; }
    .main-content { margin-left: 0; padding-bottom: 80px; }
    header { flex-direction: column !important; align-items: stretch !important; }
}

.nav-item {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 16px;
    color: #64748b;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--cyan);
}

.nav-item.active {
    background: rgba(0, 229, 255, 0.1);
    color: var(--cyan);
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.dark-theme .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Automation Toggle */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--muted-bg);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--glass-border);
}

.dark-theme .slider {
    background-color: rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 4px;
    bottom: 3px;
    background-color: #94a3b8;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: rgba(0, 229, 255, 0.1);
    border-color: var(--cyan);
}

input:checked + .slider:before {
    transform: translateX(22px);
    background-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

/* UI Elements */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}
.dark-theme input[type=range]::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.1);
}

input[type=range]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--cyan);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    box-shadow: 0 0 10px rgba(0, 225, 255, 0.5);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.02); }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.2); }

.dark-theme ::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); }
.dark-theme ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); }
.dark-theme ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }