:root {
    --operator-bg: #0a0a0f;
    --operator-surface: #14141d;
    --operator-surface-elevated: #1c1c28;
    --operator-border: #2d2d3d;
    --operator-accent: #6366f1;
    --operator-accent-glow: rgba(99, 102, 241, 0.3);
    
    --status-healthy: #10b981;
    --status-active: #3b82f6;
    --status-degraded: #f59e0b;
    --status-down: #ef4444;
    --status-muted: #6b7280;

    --font-mono: 'IBM Plex Mono', 'JetBrains Mono', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.operator-theme {
    background-color: var(--operator-bg);
    color: #e5e7eb;
    font-family: var(--font-sans);
}

/* Reduced User Profile Block */
.operator-theme .top-nav {
    height: 50px;
    padding: 0 1.5rem;
    background: var(--operator-surface);
    border-bottom: 1px solid var(--operator-border);
}

.operator-theme .user-menu {
    gap: 1rem;
}

.operator-theme .user-info {
    padding: 0.25rem 0.5rem;
    border-left: 1px solid var(--operator-border);
}

.operator-theme .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
}

.operator-theme .user-details {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.operator-theme .user-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.operator-theme .user-role {
    font-size: 0.7rem;
    background: var(--operator-surface-elevated);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--operator-accent);
}

/* Operator Grade Panels */
.operator-theme .summary-cards {
    display: none !important;
}

.operator-theme .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.operator-theme .card {
    background: var(--operator-surface);
    border: 1px solid var(--operator-border);
    border-radius: 8px;
    overflow: hidden;
}

.operator-theme .card-header {
    background: var(--operator-surface-elevated);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--operator-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.operator-theme .card-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--status-muted);
}

.operator-theme .status-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.operator-theme .status-healthy { color: var(--status-healthy); background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); }
.operator-theme .status-active { color: var(--status-active); background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); }
.operator-theme .status-degraded { color: var(--status-degraded); background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.2); }
.operator-theme .status-down { color: var(--status-down); background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); }

/* Network Semantics Classes */
.network-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--status-muted);
}

.pop-tag {
    color: var(--operator-accent);
    font-weight: 600;
}

.vrf-tag {
    background: rgba(99, 102, 241, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Analytics Panels */
.analytics-metric {
    padding: 1rem;
}

.metric-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--status-muted);
    margin-top: 0.25rem;
}

/* Sidebar Overhaul */
.operator-theme .sidebar {
    background: var(--operator-bg);
    border-right: 1px solid var(--operator-border);
    width: 220px;
}

.operator-theme .nav-link {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 0;
    border-left: 2px solid transparent;
}

.operator-theme .nav-link.active {
    background: var(--operator-surface);
    border-left-color: var(--operator-accent);
    color: #fff;
}

.operator-theme .nav-section-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding-left: 1rem;
    margin-top: 1.5rem;
    color: var(--status-muted);
}

/* ============================================
   Light Mode Overrides for Operator Theme
   ============================================ */
body.operator-theme:not(.dark-mode) {
    --operator-bg: #F3F4F6;
    --operator-surface: #FFFFFF;
    --operator-surface-elevated: #F9FAFB;
    --operator-border: #E5E7EB;
    --operator-accent: #4F46E5;
    --operator-accent-glow: rgba(79, 70, 229, 0.2);
    background-color: var(--operator-bg);
    color: #111827;
}

body.operator-theme:not(.dark-mode) .top-nav {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
}

body.operator-theme:not(.dark-mode) .sidebar {
    background: #FFFFFF;
    border-right: 1px solid #E5E7EB;
}

body.operator-theme:not(.dark-mode) .card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.operator-theme:not(.dark-mode) .card-header {
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

body.operator-theme:not(.dark-mode) .card-title {
    color: #4B5563;
}

body.operator-theme:not(.dark-mode) .nav-link {
    color: #374151;
}

body.operator-theme:not(.dark-mode) .nav-link:hover {
    background: #F3F4F6;
    color: #4F46E5;
}

body.operator-theme:not(.dark-mode) .nav-link.active {
    background: #EEF2FF;
    border-left-color: #4F46E5;
    color: #4F46E5;
}

body.operator-theme:not(.dark-mode) .nav-section-title {
    color: #9CA3AF;
}

body.operator-theme:not(.dark-mode) .user-role {
    background: #EEF2FF;
    color: #4F46E5;
}

body.operator-theme:not(.dark-mode) .user-name {
    color: #111827;
}

body.operator-theme:not(.dark-mode) .network-meta {
    color: #6B7280;
}

body.operator-theme:not(.dark-mode) .metric-value {
    color: #111827;
}

body.operator-theme:not(.dark-mode) .metric-label {
    color: #6B7280;
}

body.operator-theme:not(.dark-mode) .pop-tag {
    color: #4F46E5;
}

body.operator-theme:not(.dark-mode) .vrf-tag {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.2);
    color: #4F46E5;
}

body.operator-theme:not(.dark-mode) .analytics-metric {
    background: #FFFFFF !important;
}

body.operator-theme:not(.dark-mode) .status-pill.status-muted {
    color: #6B7280;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
}
