/* Modernistic Cyber-Solar Dashboard Styling - Light & Dark Theme Support */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Light Theme Palette (Default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bg-card: rgba(255, 255, 255, 0.85);
  --border-glass: rgba(226, 232, 240, 0.9);
  --border-glass-hover: rgba(6, 182, 212, 0.5);
  --glow-cyan: rgba(6, 182, 212, 0.2);
  --glow-amber: rgba(245, 158, 11, 0.2);
  --glow-emerald: rgba(16, 185, 129, 0.2);
  --chart-grid: rgba(0, 0, 0, 0.06);
  --chart-text: #64748b;
}

html.dark {
  /* Dark Theme Palette */
  --bg-primary: #070a13;
  --bg-secondary: #0d1322;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --bg-card: rgba(15, 23, 42, 0.68);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(6, 182, 212, 0.35);
  --glow-cyan: rgba(6, 182, 212, 0.35);
  --glow-amber: rgba(245, 158, 11, 0.35);
  --glow-emerald: rgba(16, 185, 129, 0.35);
  --chart-grid: rgba(255, 255, 255, 0.05);
  --chart-text: #94a3b8;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(6, 182, 212, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(245, 158, 11, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  transition: background-color 0.25s ease, color 0.25s ease;
}

html.dark body {
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(245, 158, 11, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(99, 102, 241, 0.07) 0%, transparent 50%);
}

.font-mono {
  font-family: var(--font-mono);
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark .glass-panel {
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-panel:hover {
  border-color: var(--border-glass-hover);
}

.glass-card {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark .glass-card {
  background: rgba(18, 26, 47, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.glass-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 10px 25px -5px rgba(6, 182, 212, 0.15);
}

/* Glowing Neon Accents */
.glow-amber {
  box-shadow: 0 0 20px var(--glow-amber);
}

.glow-cyan {
  box-shadow: 0 0 20px var(--glow-cyan);
}

.glow-emerald {
  box-shadow: 0 0 20px var(--glow-emerald);
}

.text-gradient-amber {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.dark .text-gradient-amber {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 50%, #0369a1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.dark .text-gradient-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* High-tech pulsing dot */
.pulse-dot {
  position: relative;
  display: inline-flex;
}

.pulse-dot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 9999px;
  background-color: currentColor;
  opacity: 0.75;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.35);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.65);
}

/* Navigation active indicator */
.nav-item.active {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.12) 0%, rgba(6, 182, 212, 0.02) 100%);
  border-left: 3px solid #06b6d4;
  color: #0284c7;
}

html.dark .nav-item.active {
  color: #38bdf8;
}

/* Compass Dial */
.compass-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px dashed rgba(6, 182, 212, 0.4);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 182, 212, 0.04);
}

.compass-needle {
  width: 3px;
  height: 42px;
  background: linear-gradient(to top, #06b6d4 50%, #ef4444 50%);
  border-radius: 2px;
  position: absolute;
  transform-origin: bottom center;
  top: 3px;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Range input styling */
input[type=range] {
  -webkit-appearance: none;
  background: #cbd5e1;
  border-radius: 8px;
  height: 6px;
}

html.dark input[type=range] {
  background: #1e293b;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #06b6d4;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
  border: 2px solid #ffffff;
}

/* Mobile Responsive Drawer & Collapsible Styles */
@media (max-width: 1023px) {
  #sidebarMenu {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  #sidebarMenu.drawer-open {
    transform: translateX(0) !important;
  }
  #sidebarBackdrop {
    transition: opacity 0.3s ease;
  }
  #sidebarBackdrop.active {
    display: block !important;
  }
  #searchCollapsibleContainer {
    transition: opacity 0.25s ease;
  }
}

@media (min-width: 1024px) {
  #sidebarMenu {
    transform: none !important;
  }
  #sidebarBackdrop {
    display: none !important;
  }
  #searchCollapsibleContainer {
    display: block !important;
  }
}

/* Fullscreen Overlays & Notifications */
#loadingOverlay {
  z-index: 9999 !important;
}

#toastContainer {
  z-index: 10000 !important;
}


