/* ==============================================================================
   NXP FAIL2BAN SECURITY CENTER - SOC CYBER DARK THEME
   ============================================================================== */

:root {
  --bg-darkest: #050811;
  --bg-darker: #090e1a;
  --bg-dark: #0f172a;
  --bg-card: #131d33;
  --bg-card-hover: #172440;
  --bg-surface: #1e293b;
  --bg-input: #0b1120;

  --border-subtle: #1e293b;
  --border-bright: #2d3f66;
  --border-glow: rgba(0, 240, 255, 0.3);

  --accent-cyan: #00f0ff;
  --accent-cyan-glow: rgba(0, 240, 255, 0.4);
  --accent-green: #00ff9d;
  --accent-green-glow: rgba(0, 255, 157, 0.4);
  --accent-crimson: #ff3366;
  --accent-crimson-glow: rgba(255, 51, 102, 0.4);
  --accent-gold: #ffb800;
  --accent-gold-glow: rgba(255, 184, 0, 0.4);
  --accent-purple: #a855f7;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-cyan: #38bdf8;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Rajdhani', sans-serif;
  --font-brand: 'Orbitron', sans-serif;

  --shadow-hud: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --shadow-neon-cyan: 0 0 15px rgba(0, 240, 255, 0.25);
  --shadow-neon-crimson: 0 0 15px rgba(255, 51, 102, 0.3);
}

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

body {
  background-color: var(--bg-darkest);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darkest);
}
::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Cyber Glow Animations */
@keyframes pulseGlow {
  0% { transform: scale(1); filter: drop-shadow(0 0 4px var(--accent-cyan)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 12px var(--accent-cyan)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 4px var(--accent-cyan)); }
}

.pulse-glow {
  animation: pulseGlow 3s infinite ease-in-out;
}

.cyan-text { color: var(--accent-cyan); }
.neon-green { color: var(--accent-green); }
.neon-cyan { color: var(--accent-cyan); }
.neon-crimson { color: var(--accent-crimson); }
.neon-gold { color: var(--accent-gold); }
.text-danger { color: var(--accent-crimson) !important; }
.text-success { color: var(--accent-green) !important; }
.text-warning { color: var(--accent-gold) !important; }

/* App Layout Grid */
.app-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Topbar */
.soc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  background-color: var(--bg-darker);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 20px;
  z-index: 100;
  gap: 20px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.sidebar-toggle-btn:hover {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-shield {
  font-size: 26px;
  color: var(--accent-cyan);
}

.brand-name {
  font-family: var(--font-brand);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 1.5px;
  display: block;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 2px;
  display: block;
}

.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.system-pills {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(11, 17, 32, 0.6);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

.sys-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-right: 1px solid var(--border-subtle);
}

.sys-pill:last-child {
  border-right: none;
}

.sys-pill-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.sys-pill-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-stream-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 255, 157, 0.08);
  border: 1px solid rgba(0, 255, 157, 0.3);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.4; transform: scale(0.9); }
}

.stream-text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-green);
  letter-spacing: 1px;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-neon-cyan);
}

.user-menu-wrapper {
  position: relative;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px 4px 6px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.user-profile-badge:hover {
  border-color: var(--border-bright);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

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

.user-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.role-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}

.role-admin { color: var(--accent-cyan); }
.role-operator { color: var(--accent-green); }

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  min-width: 180px;
  box-shadow: var(--shadow-hud);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
}

.user-dropdown.active {
  display: flex;
}

.dropdown-item {
  padding: 10px 16px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--bg-surface);
  color: var(--accent-cyan);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

/* Layout Body & Sidebar */
.soc-layout-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.soc-sidebar {
  width: 240px;
  background-color: var(--bg-darker);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  transition: width 0.25s ease;
}

.sidebar-nav {
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
}

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

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  border-left: 3px solid var(--accent-cyan);
  font-weight: 600;
}

.nav-pill {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.pill-alert {
  background: rgba(255, 51, 102, 0.2);
  color: var(--accent-crimson);
  border: 1px solid rgba(255, 51, 102, 0.4);
}

.sidebar-subnodes {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 28px;
  margin-bottom: 6px;
}

.sub-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  border-radius: 4px;
}

.sub-nav-item:hover {
  color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.03);
}

.status-dot-sm {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-dot-sm.online { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.status-dot-sm.offline { background: var(--accent-crimson); box-shadow: 0 0 6px var(--accent-crimson); }

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

.soc-health-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.health-label {
  color: var(--text-dim);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 1px;
}

.health-val.green {
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Main Viewport Container */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: radial-gradient(circle at 50% 0%, #0d1527 0%, var(--bg-darkest) 75%);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .soc-sidebar {
    position: fixed;
    left: -240px;
    top: 64px;
    bottom: 0;
    z-index: 99;
  }
  .soc-sidebar.open {
    left: 0;
  }
  .topbar-center {
    display: none;
  }
}
