/* ═══════════════════════════════════════════════════════════════════════════
   NOX INTELLIGENCE — SUPER ADMIN CONSOLE
   Design System: Cyber-Glass Intelligence (Stitch-generated)
   Version: 3.0 — Premium Overhaul
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Custom Scrollbar (2px Cyan Track) ─── */
:root {
  /* Global Semantic Design Tokens */
  --bg-main:          #0b0f19;
  --bg-card:          rgba(18, 24, 38, 0.85);
  --bg-card-hover:    rgba(26, 34, 52, 0.9);
  --bg-input:         rgba(15, 23, 42, 0.7);
  --text-primary:     #f8fafc;
  --text-secondary:   #94a3b8;
  --text-muted:       #64748b;
  --border-color:     rgba(255, 255, 255, 0.08);
  --border-focus:     #f59e0b;
  --card-shadow:      0 10px 30px -5px rgba(0, 0, 0, 0.6);

  /* Backgrounds — Website Match */
  --bg:               #080806;
  --bg-surface:       #0c0b08;
  --bg-elevated:      rgba(18, 16, 10, 0.9);
  --bg-overlay:       rgba(8, 8, 6, 0.85);

  /* Glass */
  --glass-bg:         rgba(12, 11, 8, 0.7);
  --glass-border:     rgba(212, 164, 74, 0.12);
  --glass-border-light: rgba(212, 164, 74, 0.18);
  --glass-border-dark:  rgba(212, 164, 74, 0.06);
  --glass-border-h:   rgba(212, 164, 74, 0.25);
  --glass-blur:       blur(20px);

  /* Accent — Premium Gold */
  --accent:           #d4a44a;
  --accent-dim:       rgba(212, 164, 74, 0.15);
  --accent-glow:      0 0 20px rgba(212, 164, 74, 0.3);
  --accent-glow-sm:   0 0 10px rgba(212, 164, 74, 0.2);
  --accent-text:      #fbbf24;

  /* Semantic Colors */
  --success:          #10B981;
  --success-dim:      rgba(16, 185, 129, 0.15);
  --warning:          #F59E0B;
  --warning-dim:      rgba(245, 158, 11, 0.15);
  --error:            #EF4444;
  --error-dim:        rgba(239, 68, 68, 0.15);
  --info:             #3B82F6;
  --info-dim:         rgba(59, 130, 246, 0.15);
  --gold:             #d4a44a;
  --gold-dim:         rgba(212, 164, 74, 0.15);

  /* Typography */
  --fg:               #ffffff;
  --fg-dim:           rgba(255, 255, 255, 0.5);
  --fg-muted:         rgba(255, 255, 255, 0.3);
  --fg-mono:          #bbc9cf;

  /* Borders & Dividers */
  --border:           rgba(212, 164, 74, 0.12);
  --border-active:    rgba(212, 164, 74, 0.4);

  /* Sidebar */
  --sidebar-width:    260px;
  --sidebar-bg:       linear-gradient(180deg, #0d0b08 0%, #0a0907 100%);
  --sidebar-border:   rgba(212, 164, 74, 0.1);
  --nav-active-bar:   linear-gradient(180deg, #d4a44a, #b8860b);
  --nav-active-bg:    rgba(212, 164, 74, 0.08);
  --nav-hover-bg:     rgba(212, 164, 74, 0.04);
  --sidebar-shadow:   4px 0 32px rgba(0, 0, 0, 0.35);

  /* Elevation */
  --shadow-sm:   0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md:   0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg:   0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 8px 32px rgba(212, 164, 74, 0.12);

  /* Stat Card Accents */
  --accent-blue:   #3B82F6;
  --accent-green:  #10B981;
  --accent-cyan:   #d4a44a;
  --accent-gold:   #F59E0B;
  --accent-violet: #8B5CF6;
  --accent-red:    #EF4444;

  /* Glass micro-surface — dark mode (white overlays on dark bg) */
  --glass-surface:    rgba(255, 255, 255, 0.03);
  --glass-surface-2:  rgba(255, 255, 255, 0.06);
  --glass-surface-3:  rgba(255, 255, 255, 0.02);
  --glass-shimmer:    rgba(255, 255, 255, 0.04);
  --glass-shimmer-2:  rgba(255, 255, 255, 0.05);
  --glass-shimmer-3:  rgba(255, 255, 255, 0.07);
  --glass-stroke:     rgba(255, 255, 255, 0.08);
  --glass-stroke-2:   rgba(255, 255, 255, 0.05);
  --glass-stroke-3:   rgba(255, 255, 255, 0.12);
}

/* ─── Light Mode Override ─── */
[data-theme="light"], .light-theme, .light-mode {
  --bg-main:          #f1f5f9;
  --bg-card:          rgba(255, 255, 255, 0.9);
  --bg-card-hover:    rgba(255, 255, 255, 1);
  --bg-input:         #ffffff;
  --text-primary:     #0f172a;
  --text-secondary:   #334155;
  --text-muted:       #64748b;
  --border-color:     rgba(0, 0, 0, 0.1);
  --border-focus:     #d97706;
  --card-shadow:      0 10px 30px -5px rgba(0, 0, 0, 0.08);

  --bg:               #f5f2eb;
  --bg-surface:       #ffffff;
  --bg-elevated:      rgba(255, 255, 255, 0.95);
  --bg-overlay:       rgba(245, 242, 235, 0.85);

  --glass-bg:         rgba(255, 255, 255, 0.75);
  --glass-border:     rgba(212, 164, 74, 0.12);
  --glass-border-light: rgba(212, 164, 74, 0.18);
  --glass-border-dark:  rgba(212, 164, 74, 0.06);
  --glass-border-h:   rgba(212, 164, 74, 0.25);
  --glass-blur:       blur(20px);

  --accent:           #d4a44a;
  --accent-dim:       rgba(212, 164, 74, 0.12);
  --accent-glow:      0 0 20px rgba(212, 164, 74, 0.25);
  --accent-glow-sm:   0 0 10px rgba(212, 164, 74, 0.15);
  --accent-text:      #b8860b;

  --success:          #10B981;
  --success-dim:      rgba(16, 185, 129, 0.12);
  --warning:          #D97706;
  --warning-dim:      rgba(217, 119, 6, 0.12);
  --error:            #DC2626;
  --error-dim:        rgba(220, 38, 38, 0.12);
  --info:             #2563EB;
  --info-dim:         rgba(37, 99, 235, 0.12);
  --gold:             #d4a44a;
  --gold-dim:         rgba(212, 164, 74, 0.12);

  --fg:               #1a1a0e;
  --fg-dim:           #6b6560;
  --fg-muted:         #a09890;
  --fg-mono:          #334155;

  --border:           rgba(212, 164, 74, 0.12);
  --border-active:    rgba(212, 164, 74, 0.4);
}
  --info-dim:         rgba(37, 99, 235, 0.12);
  --gold:             #d4a44a;
  --gold-dim:         rgba(212, 164, 74, 0.12);

  --fg:               #1a1a0e;
  --fg-dim:           #6b6560;
  --fg-muted:         #a09890;
  --fg-mono:          #334155;

  --border:           rgba(212, 164, 74, 0.12);
  --border-active:    rgba(212, 164, 74, 0.4);

  --sidebar-bg:       linear-gradient(180deg, #faf8f3 0%, #f5f2ea 100%);
  --sidebar-border:   rgba(0, 0, 0, 0.06);
  --nav-active-bar:   linear-gradient(180deg, #d4a44a, #b8860b);
  --nav-active-bg:    rgba(212, 164, 74, 0.10);
  --nav-hover-bg:     rgba(0, 0, 0, 0.03);
  --sidebar-shadow:   4px 0 24px rgba(0, 0, 0, 0.06);

  --shadow-sm:   0 2px 8px rgba(15, 23, 42, 0.08);
  --shadow-md:   0 8px 24px rgba(15, 23, 42, 0.12);
  --shadow-lg:   0 16px 48px rgba(15, 23, 42, 0.15);
  --shadow-gold: 0 8px 32px rgba(212, 164, 74, 0.1);

  --accent-blue:   #2563EB;
  --accent-green:  #059669;
  --accent-cyan:   #d4a44a;
  --accent-gold:   #D97706;
  --accent-violet: #7C3AED;
  --accent-red:    #DC2626;

  /* Glass micro-surface — light mode uses dark overlay */
  --glass-surface:    rgba(0, 0, 0, 0.03);
  --glass-surface-2:  rgba(0, 0, 0, 0.06);
  --glass-surface-3:  rgba(0, 0, 0, 0.02);
  --glass-shimmer:    rgba(0, 0, 0, 0.04);
  --glass-shimmer-2:  rgba(0, 0, 0, 0.05);
  --glass-shimmer-3:  rgba(0, 0, 0, 0.07);
  --glass-stroke:     rgba(0, 0, 0, 0.08);
  --glass-stroke-2:   rgba(0, 0, 0, 0.05);
  --glass-stroke-3:   rgba(0, 0, 0, 0.12);
}

/* ─── Base Reset & Typography ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Background radial gradient overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(212, 164, 74, 0.06) 0%, transparent 60%),
              radial-gradient(ellipse 40% 30% at 90% 100%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body::before {
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 70, 229, 0.05) 0%, transparent 60%);
}

/* Monospace number utility */
.mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }

/* ─── Glass Panel Utility ─── */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border-light);
  border-left: 1px solid var(--glass-border-light);
  border-bottom: 1px solid var(--glass-border-dark);
  border-right: 1px solid var(--glass-border-dark);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */


.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group svg {
  position: absolute;
  left: 1rem;
  width: 18px; height: 18px;
  color: var(--fg-muted);
  pointer-events: none;
  z-index: 1;
}

.input-group input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--fg);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim), var(--accent-glow-sm);
  background: var(--bg-card-hover);
}

.input-group input::placeholder { color: var(--fg-muted); }

.login-btn {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.login-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--glass-stroke-3), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.login-btn:hover { transform: translateY(-2px); box-shadow: var(--accent-glow); }
.login-btn:hover::before { opacity: 1; }
.login-btn:active { transform: translateY(0); }

.error-msg {
  color: var(--error);
  font-size: 0.8rem;
  min-height: 18px;
  font-weight: 500;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════════════════════════ */
.admin-app {
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg) !important;
  border: none !important;
  border-right: 1px solid var(--sidebar-border) !important;
  z-index: 100;
  box-shadow: var(--sidebar-shadow);
  position: relative;
  transition: background 0.4s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.sidebar-header {
  height: 60px;
  padding: 0 1.25rem 0 1.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--sidebar-border);
  position: relative;
}

.sidebar-header-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sidebar-logo {
  width: 28px; height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-brand {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent) 0%, var(--fg) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(212, 164, 74, 0.15); border-radius: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.875rem;
  color: var(--fg-dim);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  background: transparent;
}

.nav-item svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: all 0.22s ease;
}

[data-theme="light"] .nav-item svg { opacity: 0.6; }

.nav-item:hover {
  color: var(--fg);
  background: var(--nav-hover-bg);
  border-color: var(--sidebar-border);
}

.nav-item:hover svg { opacity: 0.9; }

[data-theme="light"] .nav-item:hover svg { opacity: 0.8; }

.nav-item.active {
  color: var(--accent);
  background: var(--nav-active-bg);
  border-color: rgba(212, 164, 74, 0.15);
  box-shadow: 0 0 16px rgba(212, 164, 74, 0.06);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 2.5px;
  background: var(--nav-active-bar);
  border-radius: 0 2px 2px 0;
}

.nav-item.active svg { opacity: 1; }

/* Sidebar Footer — User Card */
.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  position: relative;
}

.sidebar-footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,164,74,0.15), transparent);
  pointer-events: none;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  flex: 1;
  transition: all 0.22s ease;
  min-width: 0;
}

.admin-user:hover {
  background: var(--nav-hover-bg);
}

.admin-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8B5CF6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  color: #000;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(212, 164, 74, 0.25);
  overflow: hidden;
  position: relative;
}

.admin-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.admin-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.admin-info .name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-info .role {
  font-size: 0.67rem;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

[data-theme="light"] .admin-info .role { color: rgba(212, 164, 74, 0.9); }

.logout-btn {
  background: none;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.22s ease;
  flex-shrink: 0;
}

.logout-btn:hover { color: var(--error); background: var(--error-dim); }
.logout-btn svg { width: 17px; height: 17px; }

/* Sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}

.sidebar-overlay.show { display: block; opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}

/* ─── Top Header ─── */
.top-header {
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: none !important;
  border-bottom: 1px solid var(--sidebar-border) !important;
  z-index: 50;
  box-shadow: 0 1px 0 var(--border);
  position: relative;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.mobile-menu-btn:hover { background: var(--bg-card); }
.mobile-menu-btn svg { width: 22px; height: 22px; }

#pageTitle {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--fg), var(--accent-text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Status Badge */
.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--success);
  background: var(--success-dim);
  padding: 0.35rem 0.875rem;
  border-radius: 100px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-family: 'JetBrains Mono', monospace;
}

.dot {
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
}

.pulse {
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Notification Button */
.icon-btn {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  color: var(--fg-dim);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  color: var(--fg);
  border-color: var(--glass-border-h);
  box-shadow: var(--accent-glow-sm);
}

.icon-btn svg { width: 18px; height: 18px; }

.badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--error);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 100px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
  font-family: 'JetBrains Mono', monospace;
}

/* Dark/Light Mode Toggle */
.header-theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--glass-surface-2);
  border: 1px solid var(--sidebar-border);
  border-radius: 100px;
  padding: 0.3rem 0.65rem 0.3rem 0.45rem;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.header-theme-toggle:hover {
  border-color: rgba(212, 164, 74, 0.25);
  background: var(--glass-surface-3);
  box-shadow: 0 0 12px rgba(212, 164, 74, 0.08);
}

.toggle-label-icon {
  width: 12px;
  height: 12px;
  transition: color 0.3s ease;
}

.toggle-label-icon.sun-icon {
  color: var(--fg-dim);
}
.toggle-label-icon.moon-icon {
  color: var(--fg-dim);
}

[data-theme="dark"] .toggle-label-icon.sun-icon { color: rgba(255,255,255,0.3); }
[data-theme="dark"] .toggle-label-icon.moon-icon { color: var(--accent); }
[data-theme="light"] .toggle-label-icon.sun-icon { color: var(--accent); }
[data-theme="light"] .toggle-label-icon.moon-icon { color: rgba(0,0,0,0.3); }

.toggle-pill {
  position: relative;
  width: 36px;
  height: 18px;
}

.toggle-pill input { display: none; }

.toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(212, 164, 74, 0.45);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
}

[data-theme="light"] .toggle-track {
  background: rgba(212, 164, 74, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.3s ease;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15), 0 0 6px rgba(212,164,74,0.2);
}

.toggle-pill input:checked ~ .toggle-thumb {
  transform: translateX(18px);
}

[data-theme="light"] .toggle-thumb {
  background: var(--accent);
}

/* ─── Content Area ─── */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 1.75rem 2rem;
  scroll-behavior: smooth;
}

/* ═══════════════════════════════════════════════════════════════════════════
   KPI STAT CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  padding: 1.5rem 1.25rem 1.5rem 1.5rem;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(18,24,34,0.95) 0%, rgba(12,16,22,0.98) 100%);
  border: 1px solid rgba(212,164,74,0.08);
  border-top: 1px solid rgba(212,164,74,0.14);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 0 1px rgba(255,255,255,0.03);
  transition: all 0.35s var(--ease-spring);
  cursor: default;
}

[data-theme="light"] .stat-card {
  background: linear-gradient(160deg, #ffffff 0%, #faf8f4 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-top: 1px solid rgba(212,164,74,0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05), inset 0 0 1px rgba(255,255,255,0.8);
}

.stat-card:hover {
  transform: translateY(-3px) scale(1.008);
  box-shadow: 0 12px 36px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,164,74,0.2), 0 0 24px rgba(212,164,74,0.06);
  border-color: rgba(212,164,74,0.2);
}

/* Left accent bar */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 2px 0 0 2px;
}

/* Color variants for stat cards */
.stat-card.stat-blue::before  { background: linear-gradient(180deg, var(--accent-blue), #60a5fa); }
.stat-card.stat-green::before { background: linear-gradient(180deg, var(--accent-green), #34d399); }
.stat-card.stat-cyan::before  { background: linear-gradient(180deg, var(--accent-cyan), #22d3ee); }
.stat-card.stat-gold::before  { background: linear-gradient(180deg, var(--accent-gold), #fbbf24); }
.stat-card.stat-violet::before{ background: linear-gradient(180deg, var(--accent-violet), #a78bfa); }
.stat-card.stat-red::before   { background: linear-gradient(180deg, var(--accent-red), #f87171); }

/* Corner radial glow */
.stat-card::after {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,164,74,0.06) 0%, transparent 70%);
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.5s, transform 0.5s var(--ease-spring);
}

.stat-card:hover::after { opacity: 0.7; transform: scale(1.4); }

.stat-title {
  color: var(--fg-dim);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: 'Space Grotesk', sans-serif;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-family: 'Space Grotesk', sans-serif;
}

.stat-change {
  font-size: 0.7rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
}

.change-up   { color: var(--success); }
.change-down { color: var(--error); }

.stat-icon {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.stat-icon.blue   { background: rgba(59,130,246,0.12);  color: var(--accent-blue); }
.stat-icon.green  { background: rgba(16,185,129,0.12);  color: var(--accent-green); }
.stat-icon.cyan   { background: rgba(212,164,74,0.12);   color: var(--accent-cyan); }
.stat-icon.gold   { background: rgba(245,158,11,0.12);  color: var(--accent-gold); }
.stat-icon.violet { background: rgba(139,92,246,0.12);  color: var(--accent-violet); }
.stat-icon.red    { background: rgba(239,68,68,0.12);   color: var(--accent-red); }

/* ═══════════════════════════════════════════════════════════════════════════
   CHARTS
   ═══════════════════════════════════════════════════════════════════════════ */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.chart-card {
  padding: 1.25rem 1.5rem 1rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(18,24,34,0.95) 0%, rgba(12,16,22,0.98) 100%);
  border: 1px solid rgba(212,164,74,0.08);
  border-top: 1px solid rgba(212,164,74,0.14);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 0 1px rgba(255,255,255,0.03);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative; overflow: hidden;
}

[data-theme="light"] .chart-card {
  background: linear-gradient(160deg, #ffffff 0%, #faf8f4 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-top: 1px solid rgba(212,164,74,0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05), inset 0 0 1px rgba(255,255,255,0.8);
}

.chart-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,164,74,0.15), 0 0 24px rgba(212,164,74,0.05);
  border-color: rgba(212,164,74,0.18);
  transform: translateY(-2px);
}

.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 0.75rem;
}

.chart-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.chart-subtitle {
  font-size: 0.72rem;
  color: var(--fg-muted);
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}

.chart-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
}

.chart-badge.live {
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════════════ */
.table-card {
  padding: 1.25rem 1.5rem 1rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(18,24,34,0.95) 0%, rgba(12,16,22,0.98) 100%);
  border: 1px solid rgba(212,164,74,0.08);
  border-top: 1px solid rgba(212,164,74,0.14);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 0 1px rgba(255,255,255,0.03);
  position: relative; overflow: hidden;
  overflow-x: auto;
}

[data-theme="light"] .table-card {
  background: linear-gradient(160deg, #ffffff 0%, #faf8f4 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-top: 1px solid rgba(212,164,74,0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05), inset 0 0 1px rgba(255,255,255,0.8);
}

.table-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 0.75rem 0.875rem;
  color: var(--fg-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 0.875rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  vertical-align: middle;
}

td:last-child, th:last-child { padding-right: 0; }

tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background 0.15s;
}

tbody tr:hover td { background: var(--bg-card-hover); }

/* Tags / Status Chips */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

.tag.premium  { background: var(--accent-dim);    color: var(--accent); }
.tag.free     { background: var(--bg-card-hover);  color: var(--fg-dim); }
.tag.success  { background: var(--success-dim);    color: var(--success); }
.tag.error    { background: var(--error-dim);      color: var(--error); }
.tag.warning  { background: var(--warning-dim);    color: var(--warning); }
.tag.info     { background: var(--info-dim);       color: var(--info); }
.tag.active   { background: var(--success-dim);    color: var(--success); }
.tag.inactive { background: var(--bg-card-hover);  color: var(--fg-dim); }
.tag.critical { background: var(--error-dim);      color: var(--error); }

/* ═══════════════════════════════════════════════════════════════════════════
   MODULE HEADER & SEARCH
   ═══════════════════════════════════════════════════════════════════════════ */
.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.module-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--fg), var(--accent-text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.module-header p {
  font-size: 0.8rem;
  color: var(--fg-dim);
  margin-top: 0.2rem;
  font-family: 'JetBrains Mono', monospace;
}

.search-group {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  overflow: hidden;
  min-width: 220px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-group svg {
  position: absolute;
  left: 0.75rem;
  width: 16px; height: 16px;
  color: var(--fg-muted);
  pointer-events: none;
}

.search-group input {
  border: none;
  background: transparent;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  font-size: 0.82rem;
  width: 100%;
  color: var(--fg);
  font-family: inherit;
}

.search-group input::placeholder { color: var(--fg-muted); }
.search-group input:focus { outline: none; box-shadow: none; }

/* Action Buttons */
.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.625rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}

.text-blue    { color: var(--accent-blue); }
.text-warning { color: var(--warning); }
.text-error   { color: var(--error); }
.text-success { color: var(--success); }
.text-cyan    { color: var(--accent); }

.action-btn:hover          { background: var(--bg-card-hover); }
.action-btn.text-blue:hover    { background: var(--info-dim); }
.action-btn.text-warning:hover { background: var(--warning-dim); }
.action-btn.text-error:hover   { background: var(--error-dim); }
.action-btn.text-success:hover { background: var(--success-dim); }
.action-btn.text-cyan:hover    { background: var(--accent-dim); }

/* Primary CTA Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--accent-glow);
}

.btn-primary svg { width: 15px; height: 15px; }

/* Ghost Button */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--bg-card);
  color: var(--fg-dim);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover {
  border-color: var(--glass-border-h);
  color: var(--fg);
  background: var(--bg-card-hover);
}

/* ═══════════════════════════════════════════════════════════════════════════
   WIP / EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */
.wip-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  color: var(--fg-dim);
  gap: 1rem;
}

.wip-state svg { width: 56px; height: 56px; color: var(--glass-border-h); opacity: 0.5; }
.wip-state h3 { font-size: 1rem; font-weight: 600; color: var(--fg); }
.wip-state p  { font-size: 0.82rem; max-width: 300px; line-height: 1.7; }

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes modalFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalScaleUp { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.nox-modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modalFadeIn 0.2s ease;
  padding: 1rem;
}

.nox-modal-content {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  padding: 2rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(212, 164, 74, 0.06);
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nox-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
}

.nox-modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nox-modal-close {
  background: none;
  border: none;
  color: var(--fg-dim);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.nox-modal-close:hover { color: var(--error); background: var(--error-dim); }

/* ─── Form Fields Inside Modals / Settings ─── */
.sett-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--fg-dim);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'JetBrains Mono', monospace;
}

.sett-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--fg);
  font-size: 0.875rem;
  font-family: inherit;
  transition: all 0.25s;
  appearance: none;
  -webkit-appearance: none;
}

[data-theme="light"] .sett-input {
  background: var(--glass-bg);
}

.sett-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: var(--bg-card-hover);
}

.sett-input::placeholder { color: var(--fg-muted); }

.sett-input select { -webkit-appearance: none; appearance: none; }

/* Permissions Grid */
.perms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  margin-top: 0.5rem;
}

.perm-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.perm-checkbox-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.perm-checkbox-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px; height: 15px;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DRAWER
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes drawerSlide { from { transform: translateX(100%); } to { transform: translateX(0); } }

.nox-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999;
  animation: modalFadeIn 0.2s ease;
}

.nox-drawer-content {
  position: fixed;
  top: 0; right: 0;
  width: 100%;
  max-width: 580px;
  height: 100vh;
  padding: 2rem;
  z-index: 1000;
  background: var(--bg-surface);
  border-left: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.5);
  animation: drawerSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nox-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  padding: 0.875rem;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  transition: border-color 0.2s;
}

.activity-item:hover { border-color: var(--glass-border-h); }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════════════════ */
.pagination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.pag-btn {
  padding: 0.4rem 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--fg);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
}

.pag-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.pag-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════════════════════
   SETTINGS TOGGLES
   ═══════════════════════════════════════════════════════════════════════════ */
.sett-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}

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

.sett-toggle {
  position: relative;
  display: inline-block;
  width: 44px; height: 24px;
  flex-shrink: 0;
}

.sett-toggle input { opacity: 0; width: 0; height: 0; }

.sett-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  transition: all 0.3s;
}

.sett-toggle-slider::before {
  position: absolute;
  content: "";
  height: 16px; width: 16px;
  left: 3px; bottom: 3px;
  background: var(--fg-muted);
  border-radius: 50%;
  transition: all 0.3s;
}

.sett-toggle input:checked + .sett-toggle-slider {
  background: var(--success-dim);
  border-color: rgba(16, 185, 129, 0.3);
}

.sett-toggle input:checked + .sett-toggle-slider::before {
  transform: translateX(20px);
  background: var(--success);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DISK MONITORING — ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes spin-platter { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes wiggle-arm { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(4deg); } 50% { transform: rotate(-2deg); } 70% { transform: rotate(5deg); } 90% { transform: rotate(-3deg); } }
@keyframes led-blink-fast { 0%, 100% { opacity: 0.15; } 50% { opacity: 1; filter: drop-shadow(0 0 6px var(--accent)); } }

.platter-spinning { animation: spin-platter 1s linear infinite; transform-origin: 50% 50%; }
.arm-oscillating  { animation: wiggle-arm 0.4s ease-in-out infinite; transform-origin: 20% 20%; }
.led-blinking     { animation: led-blink-fast 0.15s ease-in-out infinite; }

.disk-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.disk-card-premium {
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.disk-card-premium:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-h);
  box-shadow: var(--shadow-cyan);
}

.disk-card-premium::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.disk-card-premium:hover::after { opacity: 1; }

.server-cluster-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.disk-visualizer-box {
  width: 64px; height: 64px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.disk-radial-container {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.5rem 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATION PANEL
   ═══════════════════════════════════════════════════════════════════════════ */
.notif-panel {
  position: absolute;
  top: 68px; right: 1.5rem;
  width: 340px;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  animation: modalScaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notif-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
}

.notif-list { max-height: 360px; overflow-y: auto; }

.notif-item {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  font-size: 0.82rem;
  cursor: pointer;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-card-hover); }
.notif-item.unread { border-left: 2px solid var(--accent); }
.notif-time { font-size: 0.68rem; color: var(--fg-muted); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════════════════
   PROGRESS BARS
   ═══════════════════════════════════════════════════════════════════════════ */
.progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--bg-card-hover);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent), #8B5CF6);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 20px; height: 100%;
  background: rgba(255, 255, 255, 0.4);
  filter: blur(4px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */
.section-divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

.text-accent   { color: var(--accent); }
.text-success  { color: var(--success); }
.text-warning  { color: var(--warning); }
.text-error    { color: var(--error); }
.text-dim      { color: var(--fg-dim); }
.text-muted    { color: var(--fg-muted); }
.text-mono     { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; }

.card-section {
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

.card-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.card-section-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.card-section-title { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; }
.card-section-desc  { font-size: 0.75rem; color: var(--fg-dim); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .server-cluster-map { grid-template-columns: 1fr; gap: 1.25rem; }
  .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 260px; }

  .sidebar {
    position: fixed;
    top: 0; bottom: 0;
    left: calc(-1 * var(--sidebar-width));
    height: 100%;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
  }

  .sidebar.open { left: 0; }
  .mobile-menu-btn { display: flex; }

  .grid-container { grid-template-columns: 1fr !important; }
  .charts-grid { grid-template-columns: 1fr; }

  .top-header { padding: 0 1.25rem; }
  .content-area { padding: 1.25rem; }
  .status-badge { display: none; }
  .table-card { padding: 1rem; }
  .module-header { flex-direction: column; align-items: flex-start; }
  .module-header h2 { font-size: 1.25rem; }
  .search-group { width: 100%; }

  .col-device, .col-time { display: none; }
}

@media (max-width: 480px) {
  .login-box { padding: 2rem 1.5rem; }
  .header-actions { gap: 0.5rem; }
  .stat-value { font-size: 1.6rem; }
  .perms-grid { grid-template-columns: 1fr; }
  .nox-modal-content { padding: 1.5rem; }
  .nox-drawer-content { max-width: 100%; padding: 1.5rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MICRO-ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate-fade-in-up { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
.animate-fade-in    { animation: fadeIn 0.3s ease both; }

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }

/* ═══════════════════════════════════════════════════════════════════════════
   BUILD-16A INTELLIGENCE CONSOLE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.intel-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.intel-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

/* Bento Cards styling with distinct glass highlighting */
.intel-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border-light);
  border-left: 1px solid var(--glass-border-light);
  border-bottom: 1px solid var(--glass-border-dark);
  border-right: 1px solid var(--glass-border-dark);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.intel-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.15) 0%, rgba(6, 184, 212, 0.15) 50%, transparent 100%);
  pointer-events: none;
}

.intel-card:hover {
  border-color: var(--glass-border-h);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.intel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-shimmer-2);
}

.intel-card-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--fg);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.intel-card-title span.glow-purple {
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.intel-card-title span.glow-cyan {
  text-shadow: 0 0 8px rgba(6, 184, 212, 0.6);
}

/* AI Health gauge styling */
.health-ring-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.health-ring-svg {
  transform: rotate(-90deg);
  width: 140px;
  height: 140px;
}

.health-ring-bg {
  fill: none;
  stroke: var(--glass-surface);
  stroke-width: 8;
}

.health-ring-fill {
  fill: none;
  stroke: url(#healthGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.health-ring-glow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  filter: blur(4px);
  opacity: 0.4;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.health-ring-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.health-ring-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.1;
  text-shadow: 0 0 10px rgba(6, 184, 212, 0.4);
}

.health-ring-txt {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  margin-top: 0.2rem;
}

/* Sound wave visualizer */
.voice-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 50px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border: 1px solid var(--glass-shimmer);
  padding: 0 1.25rem;
  margin: 1.25rem 0;
}

.voice-bar {
  width: 3px;
  height: 6px;
  background: rgba(168, 85, 247, 0.4);
  border-radius: 10px;
  transition: height 0.15s ease, background 0.3s ease;
}

.voice-visualizer.listening .voice-bar {
  background: linear-gradient(180deg, var(--accent), #a855f7);
  animation: voiceWave 1.2s ease-in-out infinite alternate;
}

.voice-bar:nth-child(odd) { animation-delay: 0.15s; }
.voice-bar:nth-child(even) { animation-delay: 0.3s; }
.voice-bar:nth-child(3n) { animation-delay: 0.45s; }
.voice-bar:nth-child(4n) { animation-delay: 0.05s; }

/* Micro-animations */
@keyframes voiceWave {
  0% { height: 6px; }
  100% { height: 38px; }
}

/* Mic push-to-talk button */
.mic-btn-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mic-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(6, 184, 212, 0.06) 100%);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #ddb7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  outline: none;
}

.mic-btn::after {
  content: '';
  position: absolute;
  top: -4px; left: -4px; right: -4px; bottom: -4px;
  border-radius: 50%;
  border: 1px solid rgba(6, 184, 212, 0.2);
  opacity: 0;
  transition: all 0.3s ease;
}

.mic-btn:hover {
  border-color: rgba(6, 184, 212, 0.5);
  color: #fff;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(6, 184, 212, 0.15) 100%);
  transform: scale(1.05);
}

.mic-btn:hover::after {
  opacity: 1;
  transform: scale(1.03);
}

.mic-btn.listening {
  background: linear-gradient(135deg, #a855f7 0%, var(--accent) 100%);
  border-color: transparent;
  color: #fff;
  animation: micPulse 1.6s infinite;
  box-shadow: 0 0 20px rgba(6, 184, 212, 0.4);
}

@keyframes micPulse {
  0% { box-shadow: 0 0 0 0 rgba(6, 184, 212, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(6, 184, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(6, 184, 212, 0); }
}

.mic-status-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

.mic-status-label.listening {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(6, 184, 212, 0.4);
}

/* Pulsing Status Dot */
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.pulse-dot::after {
  content: '';
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: absolute;
  top: 0; left: 0;
  animation: dotPulse 1.8s infinite ease-in-out;
}

.pulse-dot.success { background-color: var(--success); }
.pulse-dot.success::after { background-color: var(--success); }

.pulse-dot.warning { background-color: var(--warning); }
.pulse-dot.warning::after { background-color: var(--warning); }

@keyframes dotPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* Telemetry list custom values */
.telemetry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}

.telemetry-label {
  color: var(--fg-dim);
  font-family: 'Space Grotesk', sans-serif;
}

.telemetry-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--fg);
}

.telemetry-progress-wrapper {
  background: var(--glass-shimmer);
  border-radius: 4px;
  height: 6px;
  width: 100%;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--glass-surface-3);
}

.telemetry-progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease-in-out;
}

.bg-purple-gradient {
  background: linear-gradient(90deg, #a855f7, #c084fc);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

.bg-cyan-gradient {
  background: linear-gradient(90deg, var(--accent), #22d3ee);
  box-shadow: 0 0 8px rgba(6, 184, 212, 0.3);
}

.bg-green-gradient {
  background: linear-gradient(90deg, #10B981, #34d399);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.bg-gold-gradient {
  background: linear-gradient(90deg, #F59E0B, #fbbf24);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

/* SVG Line Chart styling */
.chart-gridline {
  stroke: var(--glass-shimmer);
  stroke-width: 1;
}

.chart-path {
  fill: none;
  stroke: url(#chartStrokeGrad);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 8px rgba(6, 184, 212, 0.2));
}

.chart-area-fill {
  fill: url(#chartAreaGrad);
}

.chart-point {
  fill: var(--accent);
  stroke: #131315;
  stroke-width: 2;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-point:hover {
  r: 6;
  fill: #fff;
  filter: drop-shadow(0 0 8px var(--accent));
}

/* Table styles */
.intel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  color: var(--fg);
}

.intel-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  color: var(--fg-dim);
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--glass-surface-2);
}

.intel-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--glass-shimmer);
  font-family: 'JetBrains Mono', monospace;
}

.intel-table tr:last-child td {
  border-bottom: none;
}

.intel-table tbody tr {
  transition: background 0.2s ease;
}

.intel-table tbody tr:hover {
  background: var(--glass-surface-3);
}

/* Badge styling */
.intel-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.intel-badge.success {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.intel-badge.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.intel-badge.accent {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

/* Real-time Console Log Stream */
.console-log-area {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  border: 1px solid var(--glass-surface);
  padding: 0.75rem;
  height: 180px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--fg-mono);
}

.console-log-row {
  margin-bottom: 0.4rem;
  word-break: break-all;
  display: flex;
  gap: 0.5rem;
}

.console-log-time {
  color: var(--accent);
  opacity: 0.6;
  flex-shrink: 0;
}

.console-log-tag {
  color: #a855f7;
  font-weight: 600;
  flex-shrink: 0;
}

.console-log-msg {
  color: var(--fg);
}

.console-log-msg.err {
  color: #ef4444;
}

.console-log-msg.warn {
  color: #f59e0b;
}

.console-log-msg.ok {
  color: #10b981;
}

/* Textarea input styles */
.intel-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-shimmer-3);
  border-radius: 6px;
  color: var(--fg);
  padding: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  resize: none;
  outline: none;
  transition: border-color 0.25s ease;
}

.intel-textarea:focus {
  border-color: rgba(6, 184, 212, 0.5);
  box-shadow: 0 0 10px rgba(6, 184, 212, 0.15);
}

/* Custom interactive inputs inside grid */
.intel-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--glass-shimmer-3);
  border-radius: 2px;
  outline: none;
  margin: 0.5rem 0;
}

.intel-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(212, 164, 74, 0.6);
  transition: transform 0.1s ease;
}

.intel-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

@media (max-width: 1024px) {
  .intel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .col-span-8, .col-span-6, .col-span-4, .col-span-3, .col-span-12 {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .intel-grid {
    grid-template-columns: 1fr;
  }
  .col-span-8, .col-span-6, .col-span-4, .col-span-3, .col-span-12 {
    grid-column: span 1;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM CYBER-GLASS UPGRADE (GRID, PARTICLES, NEURAL NETS & SHIMMER)
   ═══════════════════════════════════════════════════════════════════════════ */

.intel-cyber-grid {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: 
    linear-gradient(rgba(168, 85, 247, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
  animation: intelGridPulse 12s infinite alternate ease-in-out;
}

@keyframes intelGridPulse {
  0% { transform: scale(1.0); opacity: 0.6; }
  100% { transform: scale(1.03); opacity: 0.95; }
}

.intel-dust-particles {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.intel-dust-particles .particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.3);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.8);
  filter: blur(0.5px);
}

.intel-dust-particles .p1 { top: 15%; left: 25%; animation: floatP1 14s infinite linear; }
.intel-dust-particles .p2 { top: 45%; left: 75%; animation: floatP2 18s infinite linear; background: rgba(168, 85, 247, 0.3); box-shadow: 0 0 8px rgba(168, 85, 247, 0.8); }
.intel-dust-particles .p3 { top: 75%; left: 15%; animation: floatP3 22s infinite linear; }
.intel-dust-particles .p4 { top: 80%; left: 60%; animation: floatP4 16s infinite linear; background: rgba(168, 85, 247, 0.25); box-shadow: 0 0 8px rgba(168, 85, 247, 0.7); }

@keyframes floatP1 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.2; }
  50% { transform: translate(50px, -40px) scale(1.3); opacity: 0.8; }
  100% { transform: translate(100px, 0) scale(1); opacity: 0.2; }
}
@keyframes floatP2 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  50% { transform: translate(-60px, 60px) scale(0.8); opacity: 0.7; }
  100% { transform: translate(-120px, 0) scale(1); opacity: 0.3; }
}
@keyframes floatP3 {
  0% { transform: translate(0, 0) scale(1.2); opacity: 0.15; }
  50% { transform: translate(80px, 30px) scale(0.9); opacity: 0.6; }
  100% { transform: translate(160px, 0) scale(1.2); opacity: 0.15; }
}
@keyframes floatP4 {
  0% { transform: translate(0, 0) scale(0.9); opacity: 0.25; }
  50% { transform: translate(-40px, -70px) scale(1.2) opacity: 0.75; }
  100% { transform: translate(-80px, 0) scale(0.9); opacity: 0.25; }
}

/* Concentric Neural Net SVG */
.neural-core-viz {
  width: 90px;
  height: 90px;
  margin: 0.5rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.neural-net-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.orbiting-nodes {
  transform-origin: 50px 50px;
  animation: rotateNet 25s linear infinite;
}

@keyframes rotateNet {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Shimmer Progress Level Bars */
.telemetry-progress-bar {
  position: relative;
}

.telemetry-progress-bar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--glass-stroke-3) 50%,
    transparent
  );
  background-size: 200% 100%;
  animation: barShimmer 3s infinite linear;
}

@keyframes barShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Card Decorative Corners */
.intel-card-corner {
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: rgba(6, 184, 212, 0.45);
  border-style: solid;
  pointer-events: none;
}

.intel-card-corner.top-left {
  top: 6px; left: 6px;
  border-width: 1px 0 0 1px;
}

.intel-card-corner.top-right {
  top: 6px; right: 6px;
  border-width: 1px 1px 0 0;
}

.intel-card-corner.bottom-left {
  bottom: 6px; left: 6px;
  border-width: 0 0 1px 1px;
}

.intel-card-corner.bottom-right {
  bottom: 6px; right: 6px;
  border-width: 0 1px 1px 0;
}

/* Pulsing radar loops on active agents card */
.agent-radar-container {
  position: relative;
  overflow: visible;
}

.agent-radar-loop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  border: 1px solid rgba(6, 184, 212, 0.2);
  animation: radarPulse 2.5s infinite ease-out;
  pointer-events: none;
}

@keyframes radarPulse {
  0% { transform: scale(1.0); opacity: 0.8; }
  100% { transform: scale(1.05); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUILD-16B PREMIUM ENTERPRISE AI OPERATING SYSTEM STYLING
   ═══════════════════════════════════════════════════════════════════════════ */

.intel-radial-gauge-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0.5rem auto;
}

.intel-radial-gauge-bg {
  fill: none;
  stroke: var(--glass-surface);
  stroke-width: 8;
}

.intel-radial-gauge-fill {
  fill: none;
  stroke: url(#healthGrad);
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.intel-radial-gauge-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.intel-radial-gauge-val {
  font-size: 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.intel-radial-gauge-lbl {
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: -0.15rem;
}

/* Metric Sub-Indicators */
.health-sub-indicators {
  display: flex;
  justify-content: space-around;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--glass-shimmer-2);
}

.health-sub-item {
  text-align: center;
}

.health-sub-val {
  font-size: 0.88rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--fg);
}

.health-sub-lbl {
  font-size: 0.68rem;
  color: var(--fg-muted);
}

/* Enterprise Metric Cards layout */
.intel-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1200px) {
  .intel-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .intel-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.intel-metric-card {
  background: rgba(15, 15, 20, 0.55);
  border: 1px solid var(--glass-shimmer);
  border-radius: 8px;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.25s var(--ease-smooth);
}

.intel-metric-card:hover {
  border-color: rgba(168, 85, 247, 0.25);
  background: rgba(20, 20, 25, 0.75);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.06);
  transform: translateY(-1px);
}

.intel-metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.intel-metric-title {
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.intel-metric-trend {
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.intel-metric-trend.up {
  color: var(--success);
  background: rgba(0, 229, 160, 0.08);
}

.intel-metric-trend.down {
  color: var(--error);
  background: rgba(255, 77, 106, 0.08);
}

.intel-metric-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}

.intel-metric-val {
  font-size: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--fg);
}

/* Sparklines styling */
.intel-sparkline-wrap {
  width: 70px;
  height: 24px;
}

.intel-sparkline {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.intel-sparkline path {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* AI Voice Console Waveform styling */
.voice-console-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 48px;
  margin: 1rem 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border: 1px solid var(--glass-surface);
  padding: 0.5rem;
  overflow: hidden;
}

.voice-wave-bar {
  width: 3px;
  height: 10%;
  background: var(--accent);
  border-radius: 2px;
  transition: height 0.08s ease;
}

.voice-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  background: var(--glass-shimmer);
  border: 1px solid var(--glass-surface-2);
}

.voice-status-pill.active {
  color: var(--accent);
  border-color: rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.08);
}

.voice-status-pill.active .pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: dotPulse 1.2s infinite alternate;
}

@keyframes dotPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 1; }
}

/* Command Palette Overlay */
.nox-cmd-palette-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  padding-top: 10vh;
  animation: fadeIn 0.2s ease-out;
}

.nox-cmd-palette {
  width: 90%;
  max-width: 600px;
  background: rgba(20, 20, 25, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-shimmer-3);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(6, 182, 212, 0.15);
  height: fit-content;
  max-height: 450px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nox-cmd-input-wrap {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--glass-shimmer-3);
  gap: 0.75rem;
}

.nox-cmd-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 1.05rem;
  outline: none;
}

.nox-cmd-results {
  overflow-y: auto;
  padding: 0.5rem;
  max-height: 320px;
}

.nox-cmd-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.nox-cmd-item.active, .nox-cmd-item:hover {
  background: rgba(6, 182, 212, 0.08);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.15);
}

.nox-cmd-item-title {
  font-weight: 500;
  font-size: 0.92rem;
}

.nox-cmd-item-desc {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-left: auto;
}

.nox-cmd-item-shortcut {
  font-size: 0.68rem;
  font-family: 'JetBrains Mono', monospace;
  background: var(--glass-shimmer-2);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--glass-shimmer-3);
  color: var(--fg-muted);
  margin-left: 0.5rem;
}

/* Slide Drawer Notification Panel Overwrite */
#noxNotifPanel {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: 400px !important;
  max-width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  border-left: 1px solid var(--glass-shimmer-3) !important;
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
  z-index: 10001 !important;
  animation: notifSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes notifSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes notifSlideOut {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

/* Accessibility Focus Outline */
.intel-card button:focus-visible,
.intel-card a:focus-visible,
.intel-card input:focus-visible,
.intel-card select:focus-visible,
.nox-orb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .intel-cyber-grid, .intel-dust-particles .particle, .orbiting-nodes, .telemetry-progress-bar::after, .agent-radar-loop, .nox-orb::before, .nox-orb, .voice-wave-bar, .nox-scanline-overlay, .pulse-dot::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ─── Compact Mode Adjustments ─── */
.compact-layout.intel-grid {
  gap: 0.65rem !important;
}
.compact-layout .intel-card {
  padding: 0.85rem !important;
}
.compact-layout .intel-card-header {
  margin-bottom: 0.65rem !important;
  padding-bottom: 0.4rem !important;
}

/* ─── Presentation Mode (Fullscreen Clean HUD) ─── */
.presentation-mode-active .sidebar,
.presentation-mode-active .header {
  display: none !important;
}
.presentation-mode-active .main-content {
  margin-left: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  padding: 1.5rem !important;
}

/* ─── Widget Registry Framework Overlays ─── */
.intel-widget-wrapper {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.widget-collapsed .intel-card-body {
  display: none !important;
}
.widget-collapsed .intel-card {
  height: auto !important;
  min-height: unset !important;
}
.widget-actions-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.widget-action-btn {
  background: transparent;
  border: none;
  color: var(--fg-dim);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  width: 22px;
  height: 22px;
}
.widget-action-btn:hover {
  background: var(--glass-shimmer-2);
  color: var(--fg);
}
[data-theme="light"] .widget-action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}
.widget-action-btn svg {
  width: 12px;
  height: 12px;
}

/* Loading Shimmer & Error Overlays */
.widget-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease-out;
}
.widget-loading-overlay {
  background: rgba(10, 10, 20, 0.6);
}
[data-theme="light"] .widget-loading-overlay {
  background: rgba(240, 244, 248, 0.6);
}
.widget-error-overlay {
  background: rgba(20, 10, 10, 0.85);
  border: 1px solid var(--error);
  color: var(--error);
  padding: 1.5rem;
  text-align: center;
}
[data-theme="light"] .widget-error-overlay {
  background: rgba(254, 242, 242, 0.95);
}
.widget-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--accent-dim);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 0.5rem;
}

/* ─── Layout Personalization Drawer ─── */
.nox-personalization-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 320px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  z-index: 10005;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nox-personalization-drawer.open {
  transform: translateX(0);
}
.nox-personalization-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 10004;
  animation: fadeIn 0.2s ease-out;
}
.pers-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  background: var(--glass-surface-3);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
[data-theme="light"] .pers-list-item {
  background: rgba(0, 0, 0, 0.02);
}
.pers-order-btns {
  display: flex;
  gap: 0.25rem;
}
.pers-order-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--fg-dim);
  cursor: pointer;
  border-radius: 4px;
  width: 20px;
  height: 20px;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pers-order-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ─── Embedded NOX AI Copilot Subsystem ─── */
.nox-copilot-trigger {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, var(--accent));
  box-shadow: 0 8px 24px rgba(212, 164, 74, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.nox-copilot-trigger:hover {
  transform: scale(1.08) rotate(15deg);
  box-shadow: 0 12px 30px rgba(212, 164, 74, 0.5);
}
.nox-copilot-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 350px;
  height: 420px;
  max-width: calc(100vw - 3rem);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(212, 164, 74, 0.1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.nox-copilot-header {
  padding: 1rem;
  background: rgba(10, 10, 20, 0.5);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nox-copilot-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nox-copilot-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.15);
}
.nox-copilot-message {
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.4;
  max-width: 85%;
  word-break: break-word;
}
.nox-copilot-message.user {
  background: var(--glass-shimmer-2);
  align-self: flex-end;
  color: var(--fg);
  border-bottom-right-radius: 2px;
  border: 1px solid var(--glass-shimmer-2);
}
[data-theme="light"] .nox-copilot-message.user {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.04);
}
.nox-copilot-message.copilot {
  background: rgba(212, 164, 74, 0.05);
  align-self: flex-start;
  color: var(--fg);
  border-bottom-left-radius: 2px;
  border: 1px solid rgba(212, 164, 74, 0.15);
}
.nox-copilot-input-area {
  padding: 0.75rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(10, 10, 20, 0.4);
  display: flex;
  gap: 0.5rem;
}
.nox-copilot-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  color: var(--fg);
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.nox-copilot-input:focus {
  border-color: var(--accent);
}
.nox-copilot-send {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.nox-copilot-send:hover {
  opacity: 0.9;
}

/* ─── Notification Drawer Custom Filters ─── */
.notif-filters-wrap {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--glass-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.notif-filters-wrap::-webkit-scrollbar {
  display: none;
}
.notif-filter-chip {
  background: var(--glass-shimmer);
  border: 1px solid var(--glass-border);
  color: var(--fg-dim);
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.notif-filter-chip:hover, .notif-filter-chip.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}
.notif-search-wrap {
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--glass-border);
}
.notif-search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  color: var(--fg);
  font-size: 0.75rem;
  outline: none;
}
.notif-search-input:focus {
  border-color: var(--accent);
}

/* ─── Stitch Cyber-Glass Design System Additions ─── */
.nox-ambient-glow {
  position: fixed;
  width: 50vw;
  height: 50vh;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  opacity: 0.05;
  filter: blur(120px);
}
.nox-ambient-glow.top-right {
  top: -10%;
  right: -10%;
  background: var(--accent);
}
.nox-ambient-glow.bottom-left {
  bottom: -10%;
  left: -10%;
  background: var(--success);
}

.pulse-dot {
  position: relative;
  display: inline-block;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.7); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(0.7); opacity: 0; }
}

/* ─── Intelligence Tab Navigation Styles ─── */
.intel-tabs-nav {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 5;
}
.intel-tab-btn {
  background: transparent;
  border: none;
  color: var(--fg-dim);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  position: relative;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.intel-tab-btn::after {
  content: '';
  position: absolute;
  bottom: -0.6rem;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.intel-tab-btn:hover {
  color: var(--fg);
}
.intel-tab-btn.active {
  color: var(--accent);
}
.intel-tab-btn.active::after {
  transform: scaleX(1);
}


