/* NE8000 BGP Monitor - Part 1: Variables, Reset, Layout */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1629;
    --bg-tertiary: #141b2d;
    --bg-card: rgba(20, 27, 45, 0.8);
    --bg-card-hover: rgba(30, 40, 65, 0.9);
    --bg-glass: rgba(15, 22, 41, 0.6);
    --bg-input: rgba(10, 14, 26, 0.6);
    --bg-sidebar: #0b1022;
    --text-primary: #e8eaf6;
    --text-secondary: #8892b0;
    --text-muted: #5a637e;
    --text-accent: #22d3ee;
    --accent-cyan: #22d3ee;
    --accent-purple: #a78bfa;
    --accent-green: #34d399;
    --accent-red: #f87171;
    --accent-amber: #fbbf24;
    --accent-blue: #60a5fa;
    --accent-pink: #f472b6;
    --gradient-primary: linear-gradient(135deg, #22d3ee, #a78bfa);
    --gradient-green: linear-gradient(135deg, #34d399, #22d3ee);
    --gradient-red: linear-gradient(135deg, #f87171, #f472b6);
    --gradient-amber: linear-gradient(135deg, #fbbf24, #f59e0b);
    --gradient-purple: linear-gradient(135deg, #a78bfa, #8b5cf6);
    --gradient-blue: linear-gradient(135deg, #60a5fa, #3b82f6);
    --border-color: rgba(136, 146, 176, 0.12);
    --border-glow: rgba(34, 211, 238, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow-cyan: 0 0 20px rgba(34, 211, 238, 0.15);
    --shadow-glow-green: 0 0 20px rgba(52, 211, 153, 0.15);
    --shadow-glow-red: 0 0 20px rgba(248, 113, 113, 0.15);
    --sidebar-width: 260px;
    --header-height: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(34,211,238,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(167,139,250,0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-purple); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(136,146,176,0.2); border-radius: 3px; }

.app-layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-slow);
    overflow-y: auto;
}

.sidebar-header { padding: 20px; border-bottom: 1px solid var(--border-color); }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { width: 40px; height: 40px; flex-shrink: 0; }
.logo-icon svg { width: 100%; height: 100%; }
.logo-text { display: flex; flex-direction: column; }

.logo-title {
    font-size: 1.15rem; font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; letter-spacing: -0.02em;
}

.logo-subtitle { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; }
.sidebar-nav { flex: 1; padding: 16px 12px; }
.nav-section { margin-bottom: 24px; }
.nav-section-title { display: block; font-size: 0.68rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; padding: 0 12px; margin-bottom: 8px; }

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-weight: 500; font-size: 0.92rem;
    transition: all var(--transition-fast); margin-bottom: 2px;
    position: relative; overflow: hidden;
}

.nav-item::before {
    content: ''; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px; height: 60%;
    background: var(--gradient-primary);
    border-radius: 0 3px 3px 0;
    transition: transform var(--transition-normal);
}

.nav-item:hover { color: var(--text-primary); background: rgba(34,211,238,0.05); }
.nav-item.active { color: var(--accent-cyan); background: rgba(34,211,238,0.08); }
.nav-item.active::before { transform: translateY(-50%) scaleY(1); }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.nav-icon svg { width: 18px; height: 18px; }

.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border-color); }
.connection-status { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); transition: background var(--transition-fast); }
.status-dot.connected { background: var(--accent-green); box-shadow: 0 0 8px rgba(52,211,153,0.5); animation: pulse-dot 2s ease-in-out infinite; }
.status-dot.disconnected { background: var(--accent-red); box-shadow: 0 0 8px rgba(248,113,113,0.5); }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(52,211,153,0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 16px rgba(52,211,153,0.8); }
}

.status-text { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.sidebar-version { font-size: 0.7rem; color: var(--text-muted); opacity: 0.5; }

/* Main Content */
.main-content { flex: 1; margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }

.top-header {
    height: var(--header-height); display: flex; align-items: center;
    justify-content: space-between; padding: 0 28px;
    background: rgba(11,16,34,0.8);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 50;
}

.header-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle { display: none; background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 8px; border-radius: var(--radius-sm); }
.menu-toggle:hover { background: rgba(34,211,238,0.1); color: var(--text-primary); }
.menu-toggle svg { width: 22px; height: 22px; }
.page-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.header-right { display: flex; align-items: center; gap: 20px; }
.header-info { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; color: var(--text-muted); }
.header-router { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-weight: 600; }
.header-separator { opacity: 0.3; }
.header-host { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; }

.auto-refresh-toggle { display: flex; align-items: center; gap: 8px; }
.toggle-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.toggle-switch { position: relative; width: 40px; height: 22px; display: inline-block; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--bg-tertiary); border-radius: 22px;
    border: 1px solid var(--border-color); transition: all var(--transition-normal);
}

.toggle-slider::before {
    content: ''; position: absolute; width: 16px; height: 16px;
    left: 2px; bottom: 2px; background: var(--text-muted);
    border-radius: 50%; transition: all var(--transition-normal);
}

.toggle-switch input:checked + .toggle-slider { background: rgba(34,211,238,0.2); border-color: var(--accent-cyan); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); background: var(--accent-cyan); box-shadow: 0 0 8px rgba(34,211,238,0.4); }

.content-wrapper { padding: 28px; flex: 1; }
