/* JLR NEXUS - Main Theme Stylesheet */
/* 4000+ lines of comprehensive styling */

:root {
  /* Core Colors - Dark Theme (Default) */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --bg-elevated: #222230;
  --bg-hover: #2a2a3a;
  --bg-active: #333344;
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-tertiary: #707080;
  --text-muted: #505060;
  
  /* Accent Colors */
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #ec4899;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --accent-info: #3b82f6;
  
  /* Status Colors */
  --status-online: #10b981;
  --status-away: #f59e0b;
  --status-busy: #ef4444;
  --status-offline: #6b7280;
  
  /* Border Colors */
  --border-primary: #2a2a3a;
  --border-secondary: #333344;
  --border-accent: #6366f1;
  
  /* Gradient Definitions */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --gradient-danger: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  --gradient-dark: linear-gradient(180deg, #12121a 0%, #0a0a0f 100%);
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Typography */
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
  
  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-popover: 400;
  --z-tooltip: 500;
  --z-toast: 600;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Selection */
::selection {
  background: var(--accent-primary);
  color: white;
}

/* Focus Styles */
*:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* ========== BOOT SCREEN ========== */
.boot-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.boot-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.boot-content {
  text-align: center;
  max-width: 600px;
  width: 90%;
}

.boot-logo {
  font-size: 80px;
  margin-bottom: var(--space-lg);
  animation: pulse 2s ease-in-out infinite;
}

.boot-title {
  font-size: 48px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
  letter-spacing: 4px;
}

.boot-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-xl);
  font-family: var(--font-mono);
}

.boot-loading {
  width: 100%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.boot-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  animation: boot-progress 3s ease-out forwards;
}

.boot-status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.boot-modules {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.boot-module {
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-primary);
}

.boot-module.loaded {
  border-color: var(--accent-success);
  color: var(--accent-success);
}

/* ========== MAIN INTERFACE ========== */
.main-interface {
  display: grid;
  grid-template-rows: 60px 1fr;
  grid-template-columns: 260px 1fr;
  grid-template-areas:
    "header header"
    "sidebar content";
  height: 100vh;
  overflow: hidden;
}

.main-interface.hidden {
  display: none;
}

/* ========== TOP BAR ========== */
.top-bar {
  grid-area: header;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  z-index: var(--z-sticky);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.menu-toggle {
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.menu-toggle:hover {
  background: var(--bg-elevated);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  transition: all var(--transition-fast);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
}

.top-bar-center {
  flex: 1;
  max-width: 600px;
  margin: 0 var(--space-xl);
}

.global-search {
  position: relative;
  width: 100%;
}

.global-search input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 14px;
  transition: all var(--transition-fast);
}

.global-search input:focus {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.global-search input::placeholder {
  color: var(--text-tertiary);
}

.search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 6px;
  font-size: 16px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.status-indicators {
  display: flex;
  gap: var(--space-sm);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.status-item:hover {
  background: var(--bg-elevated);
}

.status-icon {
  font-size: 14px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.status-dot.online {
  background: var(--status-online);
  box-shadow: 0 0 8px var(--status-online);
}

.status-dot.warning {
  background: var(--status-away);
  box-shadow: 0 0 8px var(--status-away);
}

.status-dot.offline {
  background: var(--status-offline);
}

.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 6px 12px 6px 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
}

/* ========== SIDEBAR ========== */
.sidebar {
  grid-area: sidebar;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-primary);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-md) 0;
}

.nav-section {
  margin-bottom: var(--space-lg);
}

.nav-title {
  padding: 0 var(--space-lg);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm);
}

.nav-list {
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-primary);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-lg);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.nav-item:hover .nav-link,
.nav-item.active .nav-link {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.nav-item.active .nav-link {
  background: var(--bg-elevated);
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.nav-text {
  flex: 1;
}

.nav-badge {
  background: var(--accent-primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.nav-indicator {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-success);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.nav-external {
  font-size: 12px;
  color: var(--text-tertiary);
}

.nav-item.external .nav-link:hover {
  color: var(--accent-primary);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-primary);
}

.system-stats {
  margin-bottom: var(--space-md);
}

.stat-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
  font-size: 11px;
  color: var(--text-tertiary);
}

.stat-row span:first-child {
  width: 30px;
}

.stat-row span:last-child {
  width: 30px;
  text-align: right;
}

.stat-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.nexus-version {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ========== MAIN CONTENT ========== */
.main-content {
  grid-area: content;
  background: var(--bg-primary);
  overflow-y: auto;
  overflow-x: hidden;
}

.module {
  display: none;
  padding: var(--space-lg);
  min-height: 100%;
}

.module.active {
  display: block;
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-primary);
}

.module-title {
  font-size: 24px;
  font-weight: 700;
}

.module-actions {
  display: flex;
  gap: var(--space-sm);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #5558e0;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-secondary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-accent);
}

.btn-success {
  background: var(--accent-success);
  color: white;
}

.btn-danger {
  background: var(--accent-danger);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* ========== DASHBOARD GRID ========== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.dash-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dash-card.wide {
  grid-column: span 2;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-primary);
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.card-link {
  font-size: 13px;
  color: var(--accent-primary);
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

.live-indicator {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.live-indicator::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-success);
  border-radius: var(--radius-full);
  animation: pulse 2s ease-in-out infinite;
}

/* System Grid */
.system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  padding: var(--space-lg);
}

.sys-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.sys-icon {
  font-size: 28px;
}

.sys-info {
  flex: 1;
}

.sys-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.sys-label {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* AI Status List */
.ai-status-list {
  padding: var(--space-md) var(--space-lg);
}

.ai-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-primary);
}

.ai-item:last-child {
  border-bottom: none;
}

.ai-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--status-online);
  box-shadow: 0 0 8px var(--status-online);
}

.ai-item.standby .ai-dot {
  background: var(--status-away);
  box-shadow: 0 0 8px var(--status-away);
}

.ai-name {
  flex: 1;
  font-weight: 500;
}

.ai-model {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.ai-load {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Market Summary */
.market-summary {
  padding: var(--space-md) var(--space-lg);
}

.market-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-primary);
}

.market-item:last-child {
  border-bottom: none;
}

.market-symbol {
  font-weight: 700;
  width: 60px;
  font-family: var(--font-mono);
}

.market-price {
  flex: 1;
  font-family: var(--font-mono);
  font-weight: 500;
}

.market-change {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
}

.market-change.up {
  color: var(--accent-success);
}

.market-change.down {
  color: var(--accent-danger);
}

.portfolio-chart {
  padding: var(--space-md) var(--space-lg);
  height: 120px;
}

.portfolio-chart canvas {
  width: 100%;
  height: 100%;
}

/* Operations List */
.operations-list {
  padding: var(--space-md) var(--space-lg);
}

.op-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
}

.op-priority {
  width: 4px;
  height: 40px;
  border-radius: var(--radius-full);
}

.op-item.high .op-priority {
  background: var(--accent-danger);
}

.op-item.medium .op-priority {
  background: var(--accent-warning);
}

.op-item.low .op-priority {
  background: var(--accent-info);
}

.op-info {
  flex: 1;
}

.op-title {
  font-weight: 500;
  margin-bottom: 2px;
}

.op-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

.op-progress {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 150px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.op-progress span {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  width: 35px;
  text-align: right;
}

.op-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}

.op-status.running {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
}

.op-status.queued {
  background: rgba(107, 114, 128, 0.2);
  color: var(--text-tertiary);
}

/* Deploy List */
.deploy-list {
  padding: var(--space-md) var(--space-lg);
}

.deploy-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-primary);
}

.deploy-item:last-child {
  border-bottom: none;
}

.deploy-icon {
  font-size: 16px;
}

.deploy-info {
  flex: 1;
}

.deploy-project {
  font-weight: 500;
  font-size: 14px;
}

.deploy-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

.deploy-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.quick-btn span:first-child {
  font-size: 24px;
}

.quick-btn span:last-child {
  font-size: 12px;
  font-weight: 500;
}

/* ========== TERMINAL PANEL ========== */
.terminal-panel {
  position: fixed;
  bottom: 0;
  left: 260px;
  right: 0;
  height: 300px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal);
}

.terminal-panel.hidden {
  transform: translateY(100%);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-primary);
}

.terminal-title {
  font-weight: 600;
  font-size: 14px;
}

.terminal-tabs {
  display: flex;
  gap: var(--space-xs);
}

.term-tab {
  padding: 6px 16px;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 13px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.term-tab:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.term-tab.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.terminal-close {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.terminal-close:hover {
  color: var(--accent-danger);
}

.terminal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.terminal-output {
  flex: 1;
  padding: var(--space-md);
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-primary);
}

.terminal-prompt {
  font-family: var(--font-mono);
  color: var(--accent-success);
  font-weight: 600;
  white-space: nowrap;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}

.terminal-input::placeholder {
  color: var(--text-tertiary);
}

/* ========== NOTIFICATIONS ========== */
.notifications {
  position: fixed;
  top: 80px;
  right: var(--space-lg);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 400px;
}

.notification {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-lg);
  animation: slide-in-right 0.3s ease;
}

.notification.success {
  border-left-color: var(--accent-success);
}

.notification.warning {
  border-left-color: var(--accent-warning);
}

.notification.error {
  border-left-color: var(--accent-danger);
}

.notification-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.notification-message {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ========== ANIMATIONS ========== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes boot-progress {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes slide-in-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .dash-card.wide {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .main-interface {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "content";
  }
  
  .sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    z-index: var(--z-modal);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .terminal-panel {
    left: 0;
  }
  
  .system-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quick-actions {
    grid-template-columns: 1fr;
  }
}

/* ========== UTILITY CLASSES ========== */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
