/* ==========================================================================
   Essential Solutions - Corporate Tech Modernism Design System
   Domain: essentialsolutions.services
   ========================================================================== */

:root {
  --primary-emerald: #10b981;
  --primary-dark: #006c49;
  --surface-slate-900: #0b121e;
  --surface-slate-800: #131b2e;
  --surface-slate-700: #213145;
  --glow-emerald: rgba(16, 185, 129, 0.25);
  --border-subtle: rgba(255, 255, 255, 0.08);
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #10b981;
}

/* Glassmorphism & Micro-elevations */
.glass-header {
  background: rgba(248, 249, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dark-glass-card {
  background: rgba(19, 27, 46, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dark-glass-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 25px -5px rgba(16, 185, 129, 0.15);
}

/* Emerald Edge Glow */
.emerald-glow {
  box-shadow: 0 0 35px -5px rgba(16, 185, 129, 0.3);
}

.emerald-border-glow:hover {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.2);
}

/* Pulsing Status Dot */
@keyframes status-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-pulse-dot {
  animation: status-pulse 2s infinite ease-in-out;
}

/* Mobile Drawer Transitions */
#mobile-drawer {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

#mobile-drawer.closed {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

#mobile-drawer.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* Modal Backdrops & Dialogs */
.modal-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  transform: scale(0.95) translateY(15px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: #0f172a;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(16, 185, 129, 0.2);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Telemetry Sparkline Animation */
@keyframes sparkline-dash {
  to {
    stroke-dashoffset: 0;
  }
}

.animated-sparkline {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: sparkline-dash 2.5s ease-out forwards;
}
