:root {
    /* Premium Color Palette */
    --bg-dark: #050508;
    --sidebar-bg: rgba(10, 10, 18, 0.8);
    --card-bg: rgba(20, 20, 35, 0.4);
    --card-hover: rgba(30, 30, 50, 0.6);
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.3);
    --cyber-cyan: #06b6d4;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(255, 255, 255, 0.08);
    --border-bright: rgba(255, 255, 255, 0.15);
    
    /* Layout */
    --sidebar-width: 260px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
}

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

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
}

/* --- Branding --- */
.sidebar-logo {
    padding: 0 24px 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(to right, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

/* --- Navigation --- */
.nav-section {
    padding: 0 16px;
    margin-bottom: 32px;
}

.nav-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0 8px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 4px;
    font-weight: 500;
}

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

.nav-item.active {
    background: var(--accent-glow);
    color: #fff;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

/* --- Dashboard Grid --- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
    border-color: var(--border-bright);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s;
}

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

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.stat-title {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    width: 42px;
    height: 42px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 20px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    font-family: 'Inter';
}

.stat-subtext {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- Content Sections --- */
.section-container {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 32px;
}

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

.section-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- Data Table --- */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 16px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* --- Badges & Indicators --- */
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-critical { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-high { background: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-medium { background: rgba(234, 179, 8, 0.15); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.3); }
.badge-low { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-running::before { background: var(--success); box-shadow: 0 0 10px var(--success); }
.status-stopped::before { background: var(--danger); box-shadow: 0 0 10px var(--danger); }

/* --- Header Section --- */
.dashboard-header {
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px 32px;
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-identity {
    display: flex;
    align-items: center;
    gap: 24px;
}

.node-chip {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    position: relative;
}

.pulse-indicator::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    animation: pulse 2s infinite;
}

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

/* --- Buttons --- */
.btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-bright);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

/* --- Charts Glass Container --- */
.chart-container {
    height: 200px;
    position: relative;
}