@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@300;400;500;600;700;800&display=swap');
/**
 * ═══════════════════════════════════════════════════════════════════════════
 * DECISIONBRIDGE COMMAND CENTER v7.0.0
 * Theme: SPATIAL NEBULA — Cinematic Sci-Fi Command Interface
 * ═══════════════════════════════════════════════════════════════════════════
 * 
 * Design Philosophy:
 * - Deep space void with living nebula energy
 * - Glassmorphism with holographic edge lighting
 * - Subtle scanline overlays for that command center feel
 * - Pulsing life in every status indicator
 * - Magnetic hover states with 3D depth
 * - Cinematic transitions and micro-interactions
 * 
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ==========================================================================
   §1. DESIGN TOKENS — THE DNA
   ========================================================================== */
:root {
    /* ─── THE VOID (Backgrounds) ─── */
    --void-abyss: #000000;
    --void-deep: #020108;
    --void-surface: #0a0814;
    --void-elevated: #12101c;
    
    /* ─── ENERGY SPECTRUM (Accents) ─── */
    --energy-violet: #8b5cf6;
    --energy-violet-bright: #a78bfa;
    --energy-violet-glow: rgba(139, 92, 246, 0.5);
    --energy-violet-subtle: rgba(139, 92, 246, 0.15);
    
    --energy-cyan: #06b6d4;
    --energy-cyan-bright: #22d3ee;
    --energy-cyan-glow: rgba(6, 182, 212, 0.5);
    --energy-cyan-subtle: rgba(6, 182, 212, 0.15);
    
    --energy-magenta: #d946ef;
    --energy-magenta-glow: rgba(217, 70, 239, 0.4);
    
    /* ─── STATUS INDICATORS ─── */
    --status-online: #10b981;
    --status-online-glow: rgba(16, 185, 129, 0.5);
    --status-warning: #f59e0b;
    --status-warning-glow: rgba(245, 158, 11, 0.5);
    --status-danger: #ef4444;
    --status-danger-glow: rgba(239, 68, 68, 0.5);
    --status-info: #3b82f6;
    --status-info-glow: rgba(59, 130, 246, 0.5);
    
    /* ─── TEXT HIERARCHY ─── */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-ghost: #475569;
    
    /* ─── GLASS SYSTEM ─── */
    --glass-bg: rgba(15, 10, 30, 0.7);
    --glass-bg-solid: rgba(18, 14, 35, 0.95);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-light: rgba(255, 255, 255, 0.12);
    --glass-border-active: rgba(255, 255, 255, 0.2);
    --glass-shine: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    
    /* ─── HOLOGRAPHIC GRADIENT ─── */
    --holo-gradient: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.1) 0%,
        rgba(6, 182, 212, 0.1) 50%,
        rgba(217, 70, 239, 0.1) 100%
    );
    
    /* ─── DIMENSIONS ─── */
    --sidebar-width: 260px;
    --header-height: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* ─── SHADOWS ─── */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow-violet: 0 0 30px var(--energy-violet-glow);
    --shadow-glow-cyan: 0 0 30px var(--energy-cyan-glow);
    
    /* ─── Z-INDEX SCALE ─── */
    --z-nebula: -1;
    --z-scanlines: 1;
    --z-content: 10;
    --z-header: 50;
    --z-sidebar: 100;
    --z-dropdown: 200;
    --z-modal-backdrop: 900;
    --z-modal: 1000;
    --z-toast: 2000;
    --z-loader: 9999;
    
    /* ─── TIMING ─── */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-out-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}


/* ==========================================================================
   §2. RESET & FOUNDATION
   ========================================================================== */

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

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--void-abyss);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

/* ─── Links ─── */
a {
    color: var(--energy-cyan-bright);
    text-decoration: none;
    transition: all 0.2s var(--ease-out-expo);
}

a:hover {
    color: #fff;
    text-shadow: 0 0 12px var(--energy-cyan-glow);
}

/* ─── Button Reset ─── */
button {
    font-family: inherit;
    font-size: inherit;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

/* ─── Form Elements ─── */
input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ─── Selection ─── */
::selection {
    background: var(--energy-violet);
    color: white;
}

/* ─── Custom Scrollbars ─── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
    background-clip: content-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}


/* ==========================================================================
   §3. THE LIVING NEBULA — ANIMATED BACKGROUND
   ========================================================================== */
#nebula-canvas {
    position: fixed;
    inset: 0;
    z-index: var(--z-nebula);
    overflow: hidden;
    pointer-events: none;
}

/* ─── Deep Space Base ─── */
#nebula-canvas::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        /* Stars layer */
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.8) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 20%, rgba(255,255,255,0.7) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 50%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 10% 80%, rgba(255,255,255,0.9) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 90% 10%, rgba(255,255,255,0.8) 0%, transparent 100%),
        /* Void gradient */
        radial-gradient(ellipse at 50% 0%, #1e1b4b 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, #312e81 0%, transparent 40%),
        radial-gradient(ellipse at 0% 100%, #3b0764 0%, transparent 40%),
        var(--void-abyss);
    background-size: 
        200px 200px, 300px 300px, 250px 250px, 400px 400px, 350px 350px, 450px 450px,
        100% 100%, 100% 100%, 100% 100%, 100% 100%;
    opacity: 0.8;
}

/* ─── Animated Nebula Clouds ─── */
#nebula-canvas::after {
    content: '';
    position: absolute;
    inset: -50%;
    background: 
        radial-gradient(circle at 30% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(6, 182, 212, 0.12) 0%, transparent 35%),
        radial-gradient(circle at 20% 80%, rgba(217, 70, 239, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 80% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 35%);
    animation: nebulaFlow 30s ease-in-out infinite alternate;
    filter: blur(60px);
}

@keyframes nebulaFlow {
    0% { 
        transform: translate(0, 0) rotate(0deg) scale(1); 
    }
    33% { 
        transform: translate(5%, -3%) rotate(2deg) scale(1.05); 
    }
    66% { 
        transform: translate(-3%, 5%) rotate(-1deg) scale(0.98); 
    }
    100% { 
        transform: translate(2%, 2%) rotate(1deg) scale(1.02); 
    }
}

/* ─── Scanline Overlay (Subtle CRT Effect) ─── */
.scanline-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-scanlines);
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    opacity: 0.4;
}


/* ==========================================================================
   §4. AUTHENTICATION LAYER — CINEMATIC SPLASH
   ========================================================================== */
#auth-layer {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at center, rgba(30, 27, 75, 0.3) 0%, var(--void-abyss) 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--glass-bg-solid);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-xl);
    box-shadow: 
        0 25px 80px -20px rgba(0, 0, 0, 0.8),
        0 0 60px -20px var(--energy-violet-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: authCardAppear 0.8s var(--ease-out-expo);
    position: relative;
}

/* ─── Holographic Edge Shimmer ─── */
.auth-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.3) 0%,
        transparent 30%,
        transparent 70%,
        rgba(6, 182, 212, 0.3) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: holoShimmer 3s linear infinite;
}

@keyframes holoShimmer {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

@keyframes authCardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-header {
    padding: 48px 32px 24px;
    text-align: center;
    position: relative;
}

.logo-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-shield {
    font-size: 56px;
    z-index: 2;
    filter: drop-shadow(0 0 20px var(--energy-violet-glow));
    animation: shieldFloat 4s ease-in-out infinite;
}

@keyframes shieldFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.logo-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--energy-violet);
    opacity: 0;
    animation: pulseRing 3s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.logo-pulse:nth-child(2) {
    animation-delay: 1s;
}

@keyframes pulseRing {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(2); opacity: 0; }
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.version-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
}

.auth-body {
    padding: 16px 32px 40px;
}

.auth-description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.btn-auth {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
    color: #1e293b;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.5s var(--ease-out-expo);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.15);
}

.btn-auth:hover::before {
    transform: translateX(100%);
}

.btn-auth:active {
    transform: scale(0.98);
}

.auth-footer {
    padding: 16px 24px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-ghost);
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


/* ==========================================================================
   §5. APP SHELL & LAYOUT
   ========================================================================== */
#app-shell {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: var(--z-content);
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s var(--ease-out-expo);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    position: relative;
}

/* ─── View System ─── */
.view {
    display: none;
    animation: viewEnter 0.4s var(--ease-out-expo);
    min-height: 100%;
}

.view.active {
    display: block;
}

@keyframes viewEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-depth-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1800px;
    margin: 0 auto;
    width: 100%;
}


/* ==========================================================================
   §6. SIDEBAR NAVIGATION — COMMAND RAIL
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: var(--z-sidebar);
    background: var(--glass-bg-solid);
    backdrop-filter: blur(40px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s var(--ease-out-expo);
}

/* ─── Sidebar Glow Edge ─── */
.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        var(--energy-violet-glow) 30%,
        var(--energy-cyan-glow) 70%,
        transparent 100%
    );
    opacity: 0.5;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

.sidebar-logo span:first-child {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 8px var(--energy-violet-glow));
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.nav-section-title {
    padding: 12px 24px 8px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-ghost);
    font-weight: 600;
    margin-top: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
    border-left: 3px solid transparent;
    position: relative;
    width: 100%;
    background: transparent;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: #fff;
    background: linear-gradient(90deg, var(--energy-violet-subtle) 0%, transparent 100%);
    border-left-color: var(--energy-violet);
}

/* ─── Active Indicator Glow ─── */
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--energy-violet);
    box-shadow: 0 0 12px var(--energy-violet-glow);
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    width: 24px;
    text-align: center;
    font-size: 1.1em;
    flex-shrink: 0;
}

.nav-label {
    flex: 1;
    text-align: left;
}

.nav-badge {
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-weight: 600;
}

.nav-badge.alert-badge {
    background: var(--status-danger);
    color: white;
    box-shadow: 0 0 12px var(--status-danger-glow);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.status-indicator {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-ghost);
}

.status-indicator.status-ok {
    background: var(--status-online);
    box-shadow: 0 0 8px var(--status-online-glow);
}

/* ─── Pulsing Status Ring ─── */
.status-indicator.status-ok::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid var(--status-online);
    animation: statusPulse 2s ease-out infinite;
}

@keyframes statusPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2); opacity: 0; }
}


/* ==========================================================================
   §7. HEADER — COMMAND BAR
   ========================================================================== */
.top-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: auto;
}

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.breadcrumb {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.breadcrumb span:first-child {
    font-size: 1.2em;
}

/* ─── Connection Status Pill ─── */
.connection-status {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-online);
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: all 0.3s var(--ease-out-expo);
}

.connection-status.disconnected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.pulse-dot {
    position: relative;
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
}

.pulse-aura {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 1px solid currentColor;
    animation: statusPulse 2s ease-out infinite;
}

/* ─── User Menu ─── */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px 6px 6px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--glass-border-light);
}

/* ─── Avatar — Polished Gem Effect ─── */
.user-avatar,
.card-avatar,
.roster-avatar,
.result-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--energy-violet) 0%, var(--energy-cyan) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* ─── Avatar Shine ─── */
.user-avatar::after,
.card-avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-20deg);
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.7rem;
    color: var(--energy-violet-bright);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}


/* ==========================================================================
   §8. GLASS PANELS & FORM ELEMENTS
   ========================================================================== */

/* ─── Glass Panel — Core Component ─── */
.glass-panel,
.allowlist-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

/* ─── Inner Glow Effect ─── */
.glass-panel::before,
.allowlist-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.glass-panel-subtle,
.view-toolbar,
.allowlist-toolbar {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px;
}

/* ─── Toolbar Layout ─── */
.view-toolbar,
.allowlist-toolbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.toolbar-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 180px;
}

.toolbar-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Inputs & Selects ─── */
.glass-input,
.toolbar-select,
select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-sm);
    color: #fff;
    transition: all 0.2s var(--ease-out-expo);
    appearance: none;
    -webkit-appearance: none;
}

.glass-input::placeholder {
    color: var(--text-ghost);
}

.glass-input:focus,
select:focus {
    outline: none;
    border-color: var(--energy-violet);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 3px var(--energy-violet-subtle);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

/* ─── Autofill Fix ─── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1a1625 inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}


/* ==========================================================================
   §9. BUTTONS — ENERGY FIELDS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s var(--ease-out-expo);
    border: 1px solid transparent;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 0.7rem;
}

/* ─── Primary Button — Violet Energy ─── */
.btn-primary {
    background: linear-gradient(135deg, var(--energy-violet) 0%, #7c3aed 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 4px 15px var(--energy-violet-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px var(--energy-violet-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: brightness(1.1);
}

/* ─── Energy Sweep Effect ─── */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s var(--ease-out-expo);
}

.btn-primary:hover::before {
    left: 100%;
}

/* ─── Outline Button ─── */
.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border-light);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ─── Ghost Button ─── */
.btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* ─── Danger Button ─── */
.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: var(--status-danger);
    color: white;
    box-shadow: 0 4px 20px var(--status-danger-glow);
}

/* ─── Warning Button ─── */
.btn-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--status-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
    background: var(--status-warning);
    color: #000;
}


/* ==========================================================================
   §10. DEVICE GRID — COMMAND CARDS
   ========================================================================== */
.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.device-card {
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

/* ─── Card Hover — Magnetic Lift ─── */
.device-card:hover {
    transform: translateY(-6px);
    border-color: var(--glass-border-active);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(139, 92, 246, 0.1);
}

/* ─── Top Edge Glow on Hover ─── */
.device-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--energy-violet), var(--energy-cyan));
    opacity: 0;
    transition: opacity 0.3s;
}

.device-card:hover::before {
    opacity: 1;
}

.device-card.selected {
    border-color: var(--energy-violet);
    box-shadow: 
        0 0 0 1px var(--energy-violet),
        0 0 30px var(--energy-violet-glow);
}

.device-card.locked {
    border-color: var(--status-warning);
}

.device-card.locked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(245, 158, 11, 0.05);
    pointer-events: none;
}

.lock-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.2rem;
    z-index: 10;
    filter: drop-shadow(0 0 8px var(--status-warning-glow));
}

.card-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.card-avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    flex-shrink: 0;
}

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

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-subtitle {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ─── Status Indicator with Glow ─── */
.status-indicator {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-online {
    background: var(--status-online);
    box-shadow: 0 0 8px var(--status-online-glow);
}

.status-offline {
    background: var(--text-ghost);
}

.status-aura {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 1px solid currentColor;
    animation: statusPulse 2s ease-out infinite;
}

.status-offline .status-aura {
    display: none;
}

/* ─── Telemetry Bar ─── */
.card-telemetry {
    padding: 8px 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--glass-border);
}

.telemetry-item {
    font-size: 0.7rem;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-enterprise {
    background: var(--energy-cyan-subtle);
    color: var(--energy-cyan-bright);
}

.battery-good { color: var(--status-online); }
.battery-low { color: var(--status-warning); }
.battery-critical { 
    color: var(--status-danger); 
    animation: criticalPulse 1s ease-in-out infinite;
}

@keyframes criticalPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ─── Card Preview ─── */
.card-preview {
    height: 150px;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: all 0.3s var(--ease-out-expo);
}

.device-card:hover .card-preview img {
    opacity: 1;
    transform: scale(1.02);
}

.preview-placeholder {
    font-size: 2.5rem;
    opacity: 0.2;
    color: var(--text-tertiary);
}

.card-url {
    padding: 10px 16px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'JetBrains Mono', monospace;
}

/* ─── Card Actions ─── */
.card-actions {
    padding: 12px;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.card-btn {
    flex: 1;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s var(--ease-out-expo);
}

.card-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-border-light);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.card-btn.warning:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--status-warning);
    color: var(--status-warning);
}


/* ==========================================================================
   §11. DATA TABLES — HOLOGRAPHIC GRIDS
   ========================================================================== */
.data-table,
.allowlist-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.data-table th,
.allowlist-table th {
    text-align: left;
    padding: 14px 16px;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border-light);
    background: rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.data-table td,
.allowlist-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Zebra Striping with Gradient ─── */
.data-table tbody tr:nth-child(even),
.allowlist-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

/* ─── Row Hover — Holographic Highlight ─── */
.data-table tbody tr:hover,
.allowlist-table tbody tr:hover {
    background: linear-gradient(90deg, var(--energy-violet-subtle) 0%, transparent 100%);
}

/* ─── Table Column Widths ─── */

/* Activity Feed & Block Log */
#history-table th:nth-child(1), #history-table td:nth-child(1),
#hits-table th:nth-child(1), #hits-table td:nth-child(1) { width: 160px; }

#history-table th:nth-child(2), #history-table td:nth-child(2),
#hits-table th:nth-child(2), #hits-table td:nth-child(2) { width: 22%; }

#history-table th:nth-child(3), #history-table td:nth-child(3),
#hits-table th:nth-child(3), #hits-table td:nth-child(3) { width: auto; }

#history-table th:nth-child(4), #history-table td:nth-child(4),
#hits-table th:nth-child(4), #hits-table td:nth-child(4) { 
    width: 130px; 
    text-align: right; 
}

/* Allowlist Table */
.allowlist-table th:nth-child(1), .allowlist-table td:nth-child(1) { 
    width: 50px; 
    text-align: center; 
}
.allowlist-table th:nth-child(2), .allowlist-table td:nth-child(2) { width: 22%; }
.allowlist-table th:nth-child(3), .allowlist-table td:nth-child(3) { width: 100px; }
.allowlist-table th:nth-child(8), .allowlist-table td:nth-child(8) { 
    width: 100px; 
    text-align: right; 
}

/* Device Inventory */
#view-devices .data-table th:nth-child(1) { width: 140px; }
#view-devices .data-table th:nth-child(2) { width: 22%; }
#view-devices .data-table th:nth-child(7) { width: 80px; text-align: center; }

/* Audit Log */
#audit-table th:nth-child(1) { width: 150px; }
#audit-table th:nth-child(2) { width: 18%; }
#audit-table th:nth-child(3) { width: 18%; }
#audit-table th:nth-child(4) { width: 90px; }
#audit-table th:nth-child(7) { width: 100px; text-align: right; }

/* ─── Badges ─── */
.badge {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-block;
    white-space: nowrap;
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--status-online);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--status-warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--status-danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: var(--status-info);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* ─── Monospace Text ─── */
.mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    letter-spacing: -0.02em;
}

/* ─── Text Colors ─── */
.text-muted { color: var(--text-tertiary); }
.text-primary { color: var(--energy-violet-bright); }
.text-danger { color: var(--status-danger); }
.text-success { color: var(--status-online); }
.text-warning { color: var(--status-warning); }

/* ─── Table Footer ─── */
.allowlist-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.allowlist-footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

#allowlist-page-size {
    width: auto;
    padding: 6px 32px 6px 12px;
    font-size: 0.85rem;
}


/* ==========================================================================
   §12. CLASSROOM DASHBOARD
   ========================================================================== */
.class-dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    height: calc(100vh - 180px);
    min-height: 500px;
}

.classes-list-section {
    overflow-y: auto;
    padding-right: 8px;
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    align-content: start;
}

.class-card {
    padding: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all 0.2s var(--ease-out-expo);
    position: relative;
}

.class-card:hover {
    border-color: var(--energy-violet);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.class-card.selected {
    border-color: var(--energy-cyan);
    background: var(--energy-cyan-subtle);
}

.class-card.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--energy-cyan);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.class-icon {
    font-size: 2rem;
}

.class-info {
    flex: 1;
}

.class-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.class-meta {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.class-status-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
}

.class-status-badge.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--status-online);
}

.class-status-badge.inactive {
    color: var(--text-tertiary);
}

.class-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.class-card:hover .class-delete-btn {
    opacity: 1;
}

/* ─── Class Details Panel ─── */
.class-details-section {
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 100%;
}

.roster-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--glass-border);
}

.roster-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.roster-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.roster-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.roster-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.roster-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--glass-border-light);
}

.roster-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

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

.roster-email {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Student Search ─── */
.roster-search {
    position: relative;
    margin-bottom: 16px;
}

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--glass-bg-solid);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-sm);
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: var(--z-dropdown);
    box-shadow: var(--shadow-lg);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.search-result-item:hover {
    background: var(--energy-violet-subtle);
}

.result-add {
    font-size: 1.2rem;
    color: var(--energy-cyan);
    font-weight: 700;
}


/* ==========================================================================
   §13. SYSTEM SETUP
   ========================================================================== */
.setup-section {
    margin-bottom: 48px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-title span:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 700px;
    line-height: 1.7;
}

/* ─── Health Grid ─── */
.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.health-card {
    padding: 24px 20px;
    text-align: center;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: all 0.2s var(--ease-out-expo);
}

.health-card:hover {
    transform: translateY(-2px);
    border-color: var(--glass-border-light);
}

.health-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.health-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.health-value.success {
    color: var(--status-online);
    text-shadow: 0 0 15px var(--status-online-glow);
}

.health-value.warning {
    color: var(--status-warning);
}

.health-value.error {
    color: var(--status-danger);
}

/* ─── Location Cards ─── */
.location-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    padding: 20px;
}

.location-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.location-item:hover {
    border-color: var(--glass-border-light);
    background: rgba(255, 255, 255, 0.03);
}

.location-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.location-bssids {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--energy-cyan-bright);
}

/* ─── OU Tree ─── */
.ou-tree {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.ou-table-header {
    display: grid;
    grid-template-columns: 1fr 160px 100px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ou-col-rec {
    text-align: center;
}

.ou-row {
    display: grid;
    grid-template-columns: 1fr 160px 100px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
    align-items: center;
    transition: background 0.15s;
}

.ou-row:last-child {
    border-bottom: none;
}

.ou-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.ou-row > div:nth-child(3) {
    display: flex;
    justify-content: center;
}

.ou-path {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ou-path.configured {
    color: var(--energy-violet-bright);
}

.ou-select {
    padding: 6px 28px 6px 10px;
    font-size: 0.8rem;
}

.ou-select.configured {
    border-color: var(--energy-violet);
    background: var(--energy-violet-subtle);
}

.ou-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--energy-violet);
    cursor: pointer;
}


/* ==========================================================================
   §14. DOMAIN LOOKUP
   ========================================================================== */
.lookup-container {
    max-width: 700px;
    margin: 0 auto;
}

.lookup-header {
    padding: 48px 40px;
    text-align: center;
    background: radial-gradient(circle at center, var(--energy-violet-subtle) 0%, transparent 60%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.lookup-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.lookup-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.lookup-input-wrapper {
    display: flex;
    gap: 12px;
    width: 100%;
}

.lookup-input-wrapper input {
    flex: 1;
    padding: 14px 18px;
    font-size: 1rem;
}

/* ─── Lookup Result Card ─── */
.lookup-card {
    padding: 40px;
    text-align: center;
    margin: 24px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
}

.lookup-card.allowed {
    border-color: var(--status-online);
    box-shadow: 
        0 0 40px rgba(16, 185, 129, 0.15),
        inset 0 0 60px rgba(16, 185, 129, 0.03);
}

.lookup-card.blocked {
    border-color: var(--status-danger);
    box-shadow: 
        0 0 40px rgba(239, 68, 68, 0.15),
        inset 0 0 60px rgba(239, 68, 68, 0.03);
}

.lookup-status {
    font-size: 1.5rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.lookup-icon {
    font-size: 2.5rem;
}

.lookup-badge {
    font-weight: 800;
    letter-spacing: 0.05em;
    font-size: 1.4rem;
}

.lookup-card.allowed .lookup-badge { color: var(--status-online); }
.lookup-card.blocked .lookup-badge { color: var(--status-danger); }

.lookup-domain {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.lookup-category,
.lookup-reason,
.lookup-level {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
}


/* ==========================================================================
   §15. ALERTS
   ========================================================================== */
.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--energy-violet);
    transition: all 0.2s var(--ease-out-expo);
}

.alert-card:hover {
    background: rgba(255, 255, 255, 0.02);
}

.alert-card[data-priority="critical"] {
    border-left-color: var(--status-danger);
    background: rgba(239, 68, 68, 0.03);
}

.alert-card[data-priority="high"] {
    border-left-color: var(--status-warning);
}

.alert-card[data-priority="low"],
.alert-card[data-priority="undefined"] {
    border-left-color: var(--status-info);
}

.alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
    min-width: 0;
}

.alert-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.alert-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 8px;
}


/* ==========================================================================
   §16. MODALS — CINEMATIC OVERLAYS
   ========================================================================== */

/* ─── Native Dialog Reset & Base ─── */
dialog {
    padding: 0;
    border: none;
    background: transparent;
    max-width: none;
    max-height: none;
    overflow: visible;
    color: var(--text-primary);
}

/* ─── Dialog Backdrop ─── */
dialog::backdrop {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ─── Centered Dialog Positioning ─── */
dialog[open] {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    margin: auto;
    width: 100vw;
    height: 100vh;
    background: transparent;
}

/* ─── Modal Card (The Actual Content Box) ─── */
dialog .modal-card,
.modal-card,
.modal-content {
    background: var(--glass-bg-solid);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    box-shadow: 
        0 25px 80px -20px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 60px rgba(139, 92, 246, 0.1);
    animation: modalAppear 0.3s var(--ease-out-expo);
    overflow: hidden;
    position: relative;
}

/* ─── Wide Modal Variant ─── */
dialog.modal-wide .modal-card,
.modal-card.modal-wide {
    max-width: 700px;
}

/* ─── Modal Appear Animation ─── */
@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ─── Modal Header ─── */
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.modal-header h2,
.modal-header h3,
.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

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

/* ─── Modal Close Button ─── */
.modal-close {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 1.25rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-out-expo);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    flex-shrink: 0;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-border-light);
}

/* ─── Modal Body ─── */
.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    color: var(--text-primary);
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-body label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s var(--ease-out-expo);
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: var(--energy-violet);
    box-shadow: 0 0 0 3px var(--energy-violet-subtle);
}

.modal-body input::placeholder,
.modal-body textarea::placeholder {
    color: var(--text-ghost);
}

/* ─── Form Groups in Modal ─── */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

/* ─── Modal Footer ─── */
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.modal-footer .btn {
    min-width: 100px;
}

/* ─── Modal Info Grid (Device Details, etc.) ─── */
.info-grid,
#device-info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
    flex-shrink: 0;
    min-width: 100px;
}

.info-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    text-align: right;
    word-break: break-word;
}

/* ─── Modal Preview (Screenshots, etc.) ─── */
.modal-preview,
.device-preview {
    background: #000;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-preview img,
.device-preview img,
#device-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-placeholder,
#device-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-ghost);
    font-size: 3rem;
    opacity: 0.3;
}

/* ─── Modal Actions Grid ─── */
.modal-actions,
.device-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn,
.device-actions .btn {
    padding: 12px 16px;
    font-size: 0.85rem;
}

/* ─── Wipe Modal Specific ─── */
.wipe-option {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
    margin-bottom: 12px;
}

.wipe-option:hover {
    border-color: var(--glass-border-light);
    background: rgba(255, 255, 255, 0.04);
}

.wipe-option.danger:hover {
    border-color: var(--status-danger);
    background: rgba(239, 68, 68, 0.05);
}

.wipe-option h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.wipe-option p {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin: 0;
}

#wipe-warning {
    padding: 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

#wipe-warning strong {
    color: var(--status-danger);
}

#wipe-confirm-input {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ─── Image Viewer Modal ─── */
#modal-image {
    cursor: zoom-out;
}

#modal-image .modal-card {
    background: transparent;
    border: none;
    box-shadow: none;
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
}

#modal-image img,
#viewer-image {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

#viewer-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg-solid);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

/* ─── Legacy Modal Support (non-dialog) ─── */
.modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-backdrop);
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal.active,
.modal[open] {
    display: flex;
}

.allowlist-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-backdrop);
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.allowlist-modal.active {
    display: flex;
}

/* ==========================================================================
   §16.5 ENHANCED MODAL COMPONENTS
   ========================================================================== */

/* ─── Modal Header with Avatar/Icon ─── */
.modal-header-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.modal-header-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.modal-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--energy-violet) 0%, var(--energy-cyan) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-header-text {
    flex: 1;
    min-width: 0;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-subtitle {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin: 2px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Device Preview with Fullscreen Button ─── */
.device-preview {
    position: relative;
    background: #000;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    margin-bottom: 20px;
}

.device-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.device-preview img.hidden {
    display: none;
}

.preview-fullscreen-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s var(--ease-out-expo);
}

.device-preview:hover .preview-fullscreen-btn {
    opacity: 1;
}

.preview-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    color: var(--text-primary);
    border-color: var(--energy-violet);
}

.preview-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-ghost);
}

.preview-placeholder span:first-child {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 8px;
}

.placeholder-text {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* ─── Quick Actions Bar ─── */
.device-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
}

.quick-action-btn:hover {
    background: var(--energy-violet-subtle);
    border-color: var(--energy-violet);
    transform: translateY(-2px);
}

.quick-action-icon {
    font-size: 1.4rem;
}

.quick-action-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.quick-action-btn:hover .quick-action-label {
    color: var(--text-primary);
}

/* ─── Device Info Section ─── */
.device-info-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

/* ─── Split Footer (Left & Right Actions) ─── */
.modal-footer-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-footer-left,
.modal-footer-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ─── Form Elements ─── */
.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.required {
    color: var(--status-danger);
    font-weight: 400;
}

.optional {
    color: var(--text-ghost);
    font-size: 0.8em;
    font-weight: 400;
}

textarea.glass-input {
    resize: vertical;
    min-height: 80px;
}

/* ─── Image Viewer Enhancements ─── */
.modal-image-viewer {
    background: rgba(0, 0, 0, 0.95) !important;
    cursor: zoom-out;
}

.modal-image-viewer::backdrop {
    background: rgba(0, 0, 0, 0.95);
}

.image-viewer-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
    z-index: 10;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

#viewer-image {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
    cursor: default;
}

#viewer-info {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg-solid);
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

/* ─── Responsive Modal ─── */
@media (max-width: 600px) {
    .device-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-footer-split {
        flex-direction: column;
        gap: 12px;
    }
    
    .modal-footer-left,
    .modal-footer-right {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   §17. APP LOADER — CINEMATIC BOOT SEQUENCE
   ========================================================================== */
#app-loader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #1e1b4b 0%, var(--void-abyss) 70%);
    z-index: var(--z-loader);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s;
}

#app-loader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.loader-logo {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shield-icon {
    font-size: 72px;
    z-index: 10;
    filter: drop-shadow(0 0 30px var(--energy-violet-glow));
    animation: shieldLevitate 3s ease-in-out infinite;
}

@keyframes shieldLevitate {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.02); }
}

.loader-spinner {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: var(--energy-cyan);
    border-right-color: var(--energy-violet);
    border-radius: 50%;
    animation: spinnerRotate 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes spinnerRotate {
    to { transform: rotate(360deg); }
}

.loader-aura {
    position: absolute;
    inset: 25px;
    background: radial-gradient(circle, var(--energy-violet) 0%, transparent 70%);
    opacity: 0.3;
    filter: blur(25px);
    border-radius: 50%;
    animation: auraPulse 2s ease-in-out infinite;
}

@keyframes auraPulse {
    0%, 100% { transform: scale(0.8); opacity: 0.2; }
    50% { transform: scale(1.3); opacity: 0.5; }
}

.loader-text {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loader-subtext {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-ghost);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: subtextPulse 1.5s infinite alternate;
}

@keyframes subtextPulse {
    from { opacity: 0.4; }
    to { opacity: 1; }
}


/* ==========================================================================
   §18. TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: var(--glass-bg-solid);
    border: 1px solid var(--glass-border-light);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    min-width: 320px;
    max-width: 420px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    animation: toastSlideIn 0.4s var(--ease-out-back);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

/* ─── Toast Type Indicators ─── */
.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast-success::before { background: var(--status-online); }
.toast-error::before { background: var(--status-danger); }
.toast-info::before { background: var(--energy-cyan); }
.toast-warning::before { background: var(--status-warning); }

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.toast.toast-out {
    animation: toastSlideOut 0.3s var(--ease-in-out-smooth) forwards;
}

@keyframes toastSlideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}


/* ==========================================================================
   §19. KEYBOARD SHORTCUTS HINT
   ========================================================================== */
.shortcuts-hint {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
    padding: 14px 28px;
    background: var(--glass-bg-solid);
    border: 1px solid var(--glass-border-light);
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-toast);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out-expo);
}

body.show-shortcuts .shortcuts-hint {
    opacity: 1;
    visibility: visible;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.shortcut-key {
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-primary);
    border: 1px solid var(--glass-border-light);
    font-weight: 600;
}


/* ==========================================================================
   §20. EMPTY & LOADING STATES
   ========================================================================== */
.empty-state,
.empty-placeholder {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-secondary);
}

.empty-icon,
.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-tertiary);
    max-width: 300px;
    margin: 0 auto;
}

/* ─── Loading States ─── */
.loading-placeholder,
.loading-row {
    text-align: center;
    padding: 40px;
    color: var(--text-tertiary);
}

.loader-pulse {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--energy-violet);
    border-radius: 50%;
    margin-right: 12px;
    animation: loaderPulse 1s ease-in-out infinite;
}

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

.table-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
}


/* ==========================================================================
   §21. UTILITY CLASSES
   ========================================================================== */
.hidden { display: none !important; }
.truncate { 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}
.p-4 { padding: 16px; }
.text-center { text-align: center; }

/* ─── Focus Visible for Accessibility ─── */
:focus-visible {
    outline: 2px solid var(--energy-violet);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--energy-violet);
    outline-offset: 2px;
}


/* ==========================================================================
   §22. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
    .class-dashboard-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .class-details-section {
        height: 400px;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .device-grid {
        grid-template-columns: 1fr;
    }
    
    .header-center {
        display: none;
    }
    
    .view-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: space-between;
    }
    
    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}


/* ==========================================================================
   §23. PRINT STYLES
   ========================================================================== */
@media print {
    body {
        background: #fff;
        color: #000;
        overflow: visible;
        height: auto;
    }
    
    .sidebar,
    .top-header,
    #nebula-canvas,
    .scanline-overlay,
    .toast-container,
    .view-toolbar,
    .shortcuts-hint,
    #app-loader {
        display: none !important;
    }
    
    .main-wrapper {
        margin: 0;
    }
    
    .main-content {
        padding: 0;
        overflow: visible;
    }
    
    .view {
        display: none !important;
    }
    
    .view.active {
        display: block !important;
    }
    
    .glass-panel,
    .device-card,
    .alert-card {
        background: none;
        border: 1px solid #ddd;
        box-shadow: none;
        color: #000;
        backdrop-filter: none;
    }
    
    .data-table {
        border: 1px solid #000;
    }
    
    .data-table th,
    .data-table td {
        border: 1px solid #ccc;
        color: #000;
        background: none !important;
    }
}