/* ==========================================================================
   EVC SMART CHARGING BUSINESS PLATFORM - ENTERPRISE DESIGN SYSTEM (V5.0)
   Corporate Commercial Architecture • High-End SaaS & SCADA Telemetry Aesthetics
   Typography: Inter (System UI) + JetBrains Mono (Financial & Metric Precision)
   Palette: Executive Slate, Deep Navy, Signal Emerald, Warning Amber, Alarm Red
   Theme: Dual Adaptive System (Executive Midnight Dark & Minimalist Cloud Light)
   ========================================================================== */

:root {
  /* Dark Mode Core Palette (Executive Midnight) */
  --bg-main: #090d16;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-hover: rgba(22, 33, 56, 0.85);
  --bg-card-solid: #0d1527;
  --bg-sidebar: rgba(11, 18, 33, 0.88);
  --bg-input: rgba(13, 20, 36, 0.9);
  
  --border-color: rgba(255, 255, 255, 0.07);
  --border-color-hover: rgba(255, 255, 255, 0.14);
  --border-subtle: rgba(255, 255, 255, 0.04);
  
  /* Functional Semantic Status Colors (Mature, Non-Neon) */
  --brand-blue: #2563eb;
  --brand-blue-hover: #1d4ed8;
  --status-online: #10b981;
  --status-charging: #059669;
  --status-idle: #64748b;
  --status-warning: #f59e0b;
  --status-danger: #ef4444;
  --status-info: #0284c7;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-metric: 'Outfit', 'Manrope', 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', Consolas, monospace;

  /* Smooth Spring-Like Motion Curve */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   GLOBAL BASE & BODY
   ========================================================================== */
body {
  background-color: var(--bg-main);
  background-image:
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.04) 0px, transparent 45%),
    radial-gradient(at 50% 100%, rgba(15, 23, 42, 0.8) 0px, transparent 70%);
  color: #f1f5f9;
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s var(--ease-smooth), color 0.25s var(--ease-smooth);
}

/* ==========================================================================
   LIGHT MODE ADAPTIVE STYLES (CLEAN ENTERPRISE CLOUD SAAS)
   ========================================================================== */
html.light body {
  background-color: #f8fafc;
  background-image:
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.06) 0px, transparent 45%),
    radial-gradient(at 50% 100%, rgba(226, 232, 240, 0.6) 0px, transparent 65%);
  color: #0f172a;
}

html.light header {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px 0 rgba(15, 23, 42, 0.04) !important;
}

html.light .header-breadcrumb-box {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3) !important;
  border: none !important;
}

html.light .header-breadcrumb-box i {
  color: #ffffff !important;
}

html.light #header-breadcrumb {
  color: #0f172a !important;
  font-weight: 900 !important;
}

html.light .glass-panel {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 16px -2px rgba(15, 23, 42, 0.05) !important;
  border-radius: 1rem !important;
}

html.light .glass-panel:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 20px -2px rgba(37, 99, 235, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04) !important;
}

html.light .station-sidebar,
html.light .fleet-sidebar {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: none !important;
}

/* Navigation Buttons in Light Mode: Vibrant, Contrast & Beautiful */
html.light .sidebar-nav-btn,
html.light .fleet-sidebar-nav-btn {
  color: #334155 !important;
  font-weight: 600 !important;
  border-radius: 0.75rem !important;
  background-color: transparent !important;
  transition: all 0.18s ease-in-out !important;
}

html.light .sidebar-nav-btn:hover,
html.light .fleet-sidebar-nav-btn:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html.light .sidebar-nav-btn.active,
html.light .fleet-sidebar-nav-btn.active {
  background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%) !important;
  color: #1d4ed8 !important;
  border-left: 4px solid #2563eb !important;
  box-shadow: 0 2px 8px -2px rgba(37, 99, 235, 0.15) !important;
  font-weight: 700 !important;
}

html.light .sidebar-nav-btn.active i,
html.light .fleet-sidebar-nav-btn.active i {
  color: #2563eb !important;
}

/* Distinct Vibrant Icon Colors for Menu Items */
html.light .fleet-sidebar-nav-btn [class*="fa-charging-station"] { color: #2563eb !important; }
html.light .fleet-sidebar-nav-btn [class*="fa-chart-pie"] { color: #7c3aed !important; }
html.light .fleet-sidebar-nav-btn [class*="fa-table-cells"] { color: #0284c7 !important; }
html.light .fleet-sidebar-nav-btn [class*="fa-id-card"] { color: #d97706 !important; }

html.light .sidebar-nav-btn [class*="fa-chart-line"] { color: #059669 !important; }
html.light .sidebar-nav-btn [class*="fa-sliders"] { color: #2563eb !important; }
html.light .sidebar-nav-btn [class*="fa-receipt"] { color: #0284c7 !important; }
html.light .sidebar-nav-btn [class*="fa-shield-halved"] { color: #e11d48 !important; }
html.light .sidebar-nav-btn [class*="fa-tags"] { color: #d97706 !important; }
html.light .sidebar-nav-btn [class*="fa-code"] { color: #64748b !important; }

html.light .metric-card {
  background-color: #ffffff !important;
  border-color: rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

html.light .text-white { color: #0f172a !important; }
html.light .text-slate-100 { color: #0f172a !important; }
html.light .text-slate-200 { color: #1e293b !important; }
html.light .text-slate-300 { color: #334155 !important; }
html.light .text-slate-400 { color: #64748b !important; }
html.light .text-slate-500 { color: #64748b !important; }

/* Keep white text on primary/action buttons in Light Mode */
html.light .btn-primary,
html.light .btn-primary *,
html.light .btn-success,
html.light .btn-success *,
html.light .btn-danger,
html.light .btn-danger *,
html.light button.bg-blue-600,
html.light button.bg-blue-600 *,
html.light button.bg-emerald-600,
html.light button.bg-emerald-600 *,
html.light button.bg-purple-600,
html.light button.bg-purple-600 *,
html.light button.bg-red-600,
html.light button.bg-red-600 *,
html.light button.bg-amber-600,
html.light button.bg-amber-600 *,
html.light button.bg-rose-600,
html.light button.bg-rose-600 * {
  color: #ffffff !important;
}

html.light .text-cyan-400,
html.light .text-cyan-300 { color: #0284c7 !important; }
html.light .text-emerald-400,
html.light .text-emerald-300 { color: #059669 !important; }
html.light .text-amber-400,
html.light .text-amber-300 { color: #d97706 !important; }
html.light .text-purple-400,
html.light .text-purple-300 { color: #7c3aed !important; }
html.light .text-rose-400,
html.light .text-rose-300 { color: #dc2626 !important; }
html.light .text-blue-400,
html.light .text-blue-300 { color: #2563eb !important; }

/* Secondary Buttons, Icon Buttons & Subtle Controls in Light Mode */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.16s var(--ease-smooth);
  cursor: pointer;
  background-color: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}
.btn-secondary:hover {
  background-color: rgba(51, 65, 85, 0.9);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

html.light .btn-secondary,
html.light button.bg-slate-800,
html.light button.bg-slate-800\/80,
html.light button.bg-slate-800\/90 {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}
html.light .btn-secondary:hover,
html.light button.bg-slate-800:hover,
html.light button.bg-slate-800\/80:hover,
html.light button.bg-slate-800\/90:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

/* Secondary dark backgrounds mapped to clean light grays */
html.light .bg-slate-800,
html.light .bg-slate-800\/90,
html.light .bg-slate-800\/80,
html.light .bg-slate-800\/70,
html.light .bg-slate-800\/60,
html.light .bg-slate-800\/50 {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

/* Light Theme: Modals & Popups */
html.light .fixed.inset-0.bg-black\/80,
html.light .fixed.inset-0.bg-black\/85,
html.light .fixed.inset-0.bg-slate-950\/80 {
  background-color: rgba(15, 23, 42, 0.55) !important;
}
html.light .fixed.inset-0 .glass-panel {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15) !important;
}

html.light .bg-slate-900\/80,
html.light .bg-slate-900\/90,
html.light .bg-slate-900\/70,
html.light .bg-slate-900\/60,
html.light .bg-slate-900\/50,
html.light .bg-slate-900 {
  background-color: #f8fafc !important;
  border-color: rgba(226, 232, 240, 0.95) !important;
}

html.light .bg-slate-950,
html.light .bg-slate-950\/90,
html.light .bg-slate-950\/80 {
  background-color: #f1f5f9 !important;
  border-color: rgba(226, 232, 240, 0.95) !important;
}

html.light .border-slate-800,
html.light .border-slate-800\/80,
html.light .border-slate-800\/60,
html.light .border-slate-700,
html.light .border-slate-700\/80,
html.light .border-slate-700\/60 {
  border-color: rgba(226, 232, 240, 0.95) !important;
}

/* Segmented Filter Pills */
html.light .fleet-filter-btn {
  background-color: transparent !important;
  color: #64748b !important;
  border: none !important;
}
html.light .fleet-filter-btn:hover {
  background-color: rgba(255, 255, 255, 0.8) !important;
  color: #0f172a !important;
}
html.light .fleet-filter-btn[class*="bg-blue-600"] {
  background-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3) !important;
}
html.light .fleet-filter-btn[data-filter="fire"] {
  color: #e11d48 !important;
}
html.light .fleet-filter-btn[data-filter="fire"]:hover {
  background-color: #ffe4e6 !important;
  color: #be123c !important;
}
html.light .fleet-filter-btn[data-filter="fire"][class*="bg-rose-600"] {
  background-color: #e11d48 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.3) !important;
}

/* Badges & Pills in Light Mode */
html.light .badge {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
html.light .badge.bg-slate-800 {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}
html.light .badge.bg-emerald-500\/15,
html.light .badge.bg-emerald-500\/10 {
  background-color: #ecfdf5 !important;
  color: #059669 !important;
  border-color: #a7f3d0 !important;
}
html.light .badge.bg-rose-500\/10,
html.light .badge.bg-rose-500\/15 {
  background-color: #fef2f2 !important;
  color: #e11d48 !important;
  border-color: #fecdd3 !important;
}
html.light .badge.bg-blue-500\/10 {
  background-color: #eff6ff !important;
  color: #2563eb !important;
  border-color: #bfdbfe !important;
}
html.light .badge.bg-purple-500\/20,
html.light .badge.bg-purple-500\/10 {
  background-color: #f5f3ff !important;
  color: #7c3aed !important;
  border-color: #ddd6fe !important;
}
html.light .badge.bg-sky-500\/20,
html.light .badge.bg-sky-500\/15,
html.light .badge.bg-cyan-500\/20,
html.light .badge.bg-cyan-500\/15,
html.light .badge.bg-blue-500\/15,
html.light #live-session-mode-badge,
html.light [id^="fleet-card-mode-"] {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
  border-color: #7dd3fc !important;
  font-weight: 700 !important;
}
html.light #live-session-mode-text,
html.light [id^="fleet-card-mode-"] span {
  color: #0369a1 !important;
  font-weight: 700 !important;
}
html.light #live-session-mode-icon,
html.light [id^="fleet-card-mode-"] i {
  color: #0284c7 !important;
}
html.light #live-session-remaining,
html.light .live-session-remaining-text {
  color: #047857 !important;
  font-weight: 700 !important;
}
html.light #live-session-rate-detail {
  color: #047857 !important;
  font-weight: 700 !important;
}
html.light #r1Countdown {
  color: #0369a1 !important;
  font-weight: 700 !important;
}
html.light .text-sky-300,
html.light .text-cyan-300,
html.light .text-cyan-400,
html.light .text-blue-300 {
  color: #0369a1 !important;
  font-weight: 700 !important;
}
html.light .text-emerald-400 {
  color: #047857 !important;
}
html.light .text-rose-400,
html.light .text-rose-500 {
  color: #e11d48 !important;
}

/* ==========================================================================
   FLEET & FINANCIAL KPI CARDS IN LIGHT MODE (HIGH CONTRAST & READABLE)
   ========================================================================== */
html.light #fleet-kpi-banner .glass-panel {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 4px 12px -2px rgba(15, 23, 42, 0.04) !important;
}

html.light #fleet-kpi-banner span.uppercase {
  color: #475569 !important;
  font-weight: 700 !important;
}

html.light #fleet-kpi-devices-count,
html.light #kpi-total-power,
html.light #kpi-total-kwh {
  color: #0f172a !important;
}

html.light #kpi-total-cost {
  color: #e11d48 !important;
}

html.light #kpi-net-profit {
  color: #059669 !important;
}

html.light #kpi-net-profit.text-rose-400,
html.light #kpi-net-profit.text-rose-600 {
  color: #e11d48 !important;
}

html.light #kpi-margin-badge {
  background-color: #d1fae5 !important;
  color: #065f46 !important;
  border: 1px solid #6ee7b7 !important;
}

html.light #kpi-total-revenue {
  color: #0f172a !important;
}

html.light #fleet-kpi-banner .text-slate-400,
html.light #fleet-kpi-banner .text-slate-500 {
  color: #64748b !important;
}

html.light #fleet-kpi-charging-badge > span {
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
}

html.light #fleet-kpi-charging-badge > span.bg-slate-800,
html.light #fleet-kpi-charging-badge > span[class*="bg-slate-800"] {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

#fleet-kpi-charging-badge .charging-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  background-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35) !important;
}

html.light #fleet-kpi-charging-badge .charging-dot {
  background-color: #059669 !important;
  box-shadow: 0 0 0 2px #6ee7b7 !important;
}

/* Tab Doanh Thu & Station Detail Financial KPI Cards in Light Mode */
html.light #fleet-rev-kpi-revenue,
html.light #fin-kpi-revenue {
  color: #059669 !important;
}

html.light #fleet-rev-kpi-cost,
html.light #fin-kpi-evn-cost {
  color: #e11d48 !important;
}

html.light #fleet-rev-kpi-profit {
  color: #0284c7 !important;
}

html.light #fin-kpi-profit {
  color: #0f172a !important;
}

html.light #fleet-rev-kpi-energy,
html.light #fin-kpi-energy {
  color: #0f172a !important;
}

html.light #fleet-rev-kpi-margin {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
  border-color: #7dd3fc !important;
}

html.light .glass-panel.bg-slate-900\/60,
html.light .glass-panel.bg-slate-900\/80 {
  background-color: #ffffff !important;
}

/* Station Card Sub-Boxes & Sessions in Light Mode */
.station-metric-subbox {
  background-color: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  padding: 0.5rem 0.25rem;
  min-width: 0;
  overflow: hidden;
  transition: all 0.18s ease;
}
html.light .station-metric-subbox {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
html.light .station-metric-subbox:hover {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}
html.light .station-card .bg-slate-900,
html.light .station-card .bg-slate-900\/60,
html.light .station-card .bg-slate-900\/90 {
  background-color: #f8fafc !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
}
html.light .station-card .bg-slate-900.border-emerald-500\/30,
html.light .station-card .fleet-card-user-box {
  background-color: #f0fdf4 !important;
  background-image: none !important;
  border-color: #86efac !important;
  box-shadow: 0 2px 6px -1px rgba(16, 185, 129, 0.15) !important;
}
html.light .station-card .fleet-card-user-box-idle {
  background-color: #f8fafc !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
}
html.light .station-card .fleet-card-user-box-idle span {
  color: #1e293b !important;
}
html.light .station-card .fleet-card-user-box-idle .text-slate-500 {
  color: #64748b !important;
}
html.light .station-card [id^="fleet-card-user-"] {
  color: #0f172a !important;
}
html.light .station-card [id^="fleet-card-uid-"] {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
html.light .station-card [id^="fleet-card-duration-"] {
  background-color: #ffffff !important;
  border-color: #fde68a !important;
  color: #b45309 !important;
}
html.light .station-card .bg-slate-950 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}
html.light .station-metric-subbox .metric-value {
  color: #0f172a !important;
}
html.light .station-card h4[id^="fleet-card-title-"] {
  color: #0f172a !important;
}
html.light .station-card .border-t {
  border-top-color: #f1f5f9 !important;
}
html.light .station-card [id^="fleet-card-temp-"] {
  color: #334155 !important;
}
html.light .station-card [id^="fleet-card-status-"] {
  font-weight: 700 !important;
}
html.light .station-card:hover h4[id^="fleet-card-title-"] {
  color: #2563eb !important;
}
html.light .station-card .station-mac-label {
  color: #475569 !important;
}
html.light .station-card .btn-rename-station {
  color: #64748b !important;
}
html.light .station-card .btn-rename-station:hover {
  color: #0284c7 !important;
  background-color: #f1f5f9 !important;
}
html.light .station-card .btn-delete-station {
  color: #94a3b8 !important;
}
html.light .station-card .btn-delete-station:hover {
  color: #e11d48 !important;
  background-color: #fee2e2 !important;
}
html.light .station-card-chip.kpi-chip-emerald {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important;
  color: #059669 !important;
  border: 1.5px solid #86efac !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2) !important;
}
html.light .station-card-chip.kpi-chip-blue {
  background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
  color: #2563eb !important;
  border: 1.5px solid #bfdbfe !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.16) !important;
}
html.light .station-card-chip.kpi-chip-slate {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
  color: #64748b !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(71, 85, 105, 0.1) !important;
}
html.light .station-card-status-dot.dot-charging,
html.light .station-card-status-dot.dot-online {
  background-color: #059669 !important;
  box-shadow: 0 0 0 2px #6ee7b7 !important;
}
html.light .station-card-status-dot.dot-offline {
  background-color: #dc2626 !important;
  box-shadow: 0 0 0 2px #fca5a5 !important;
}

/* Sidebar User Widget ("NGƯỜI SẠC HIỆN TẠI") in Light Mode - No Black Background/Gradients */
html.light #sidebar-user-box,
html.light .sidebar-user-box-idle {
  background-color: #f8fafc !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04) !important;
}
html.light #sidebar-user-box.bg-emerald-950\/40,
html.light #sidebar-user-box.sidebar-user-box-active,
html.light #sidebar-user-box[class*="emerald"] {
  background-color: #f0fdf4 !important;
  background-image: none !important;
  border-color: #86efac !important;
  box-shadow: 0 2px 6px -1px rgba(16, 185, 129, 0.12) !important;
}
html.light #sidebar-user-box #sidebar-user-name {
  color: #0f172a !important;
}
html.light #sidebar-user-box #sidebar-card-uid {
  color: #334155 !important;
}
html.light #sidebar-user-box #sidebar-charge-duration {
  color: #059669 !important;
}
html.light #sidebar-user-box .text-slate-400 {
  color: #64748b !important;
}
html.light .sidebar-text span.text-slate-400 {
  color: #64748b !important;
}

/* Active Live Charging Session Banner in Light Mode (Pure White with Crisp Emerald Accent) */
html.light .charging-active-box {
  background: #ffffff !important;
  background-image: none !important;
  border: 1.5px solid #10b981 !important;
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.15), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}
html.light .charging-active-box .border-b {
  border-bottom-color: #e2e8f0 !important;
}
html.light .charging-active-box .bg-slate-900 {
  background-color: #ffffff !important;
  background-image: none !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
}
html.light .charging-active-box .bg-slate-950 {
  background-color: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}
html.light .charging-active-box #live-session-user {
  color: #0f172a !important;
}
html.light .charging-active-box #live-session-kwh {
  color: #059669 !important;
}
html.light .charging-active-box #live-session-id {
  color: #0f172a !important;
}
html.light .charging-active-box #live-session-cost {
  color: #dc2626 !important;
}
html.light .charging-active-box #live-session-revenue {
  color: #059669 !important;
}
html.light .charging-active-box #live-session-profit {
  color: #2563eb !important;
}
html.light .charging-active-box #live-session-duration {
  color: #d97706 !important;
}
html.light .charging-active-box .text-slate-300 {
  color: #334155 !important;
}
html.light .charging-active-box .text-slate-400 {
  color: #64748b !important;
}
html.light .charging-active-box #live-session-card-uid {
  background-color: #eff6ff !important;
  color: #2563eb !important;
  border-color: #bfdbfe !important;
}

/* Modal Calculation & Simulation in Light Mode - No Black Gradients */
html.light #input-hourly-rate {
  color: #d97706 !important;
  background-color: transparent !important;
}
html.light .bg-gradient-to-br.from-slate-900.to-slate-950 {
  background: #f8fafc !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
}
html.light button[onclick^="sendBT48"] {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}
html.light button[onclick^="sendBT48"]:hover {
  background-color: #f1f5f9 !important;
}
html.light button[onclick="sendBT48('triple_press')"] {
  background-color: #fffbeb !important;
  border-color: #fde68a !important;
  color: #b45309 !important;
}
html.light button[onclick="clearQrScreen1()"] {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}
html.light button[onclick="clearQrScreen1()"]:hover {
  background-color: #fef2f2 !important;
  color: #dc2626 !important;
}

html.light input,
html.light select,
html.light textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
html.light input::placeholder {
  color: #94a3b8 !important;
}

html.light tr.border-b,
html.light .divide-y > * {
  border-color: rgba(226, 232, 240, 0.85) !important;
}
html.light tr:hover {
  background-color: rgba(241, 245, 249, 0.75) !important;
}
html.light thead tr {
  background-color: #f8fafc !important;
}
html.light thead th {
  color: #475569 !important;
}

html.light .station-card:hover {
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.08) !important;
  border-color: #94a3b8 !important;
}

/* ==========================================================================
   SURFACES & CARDS (ENTERPRISE GLASS PANELS)
   ========================================================================== */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth), transform 0.2s var(--ease-spring);
}

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

/* Corporate Minimalist Accent Header Line (Restrained, Not Rainbow) */
.glass-panel-glow {
  position: relative;
  overflow: hidden;
}
.glass-panel-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2563eb, #10b981, transparent);
  opacity: 0.8;
}

/* ==========================================================================
   ENTERPRISE NAVIGATION SIDEBAR
   ========================================================================== */
/* Modern App Shell Left Sidebar */
#app-sidebar {
  background: var(--bg-sidebar);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border-color);
  transition: width 0.25s var(--ease-spring);
  overflow-x: hidden !important;
}

#app-sidebar .station-sidebar,
#app-sidebar .fleet-sidebar {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  width: 100% !important;
}

.brand-title-charging {
  color: #f1f5f9;
}
html.light .brand-title-charging {
  color: #0f172a !important;
}

html.light .min-h-screen {
  color: #0f172a;
}

html.light #app-sidebar {
  background: #ffffff !important;
  border-right-color: #e2e8f0 !important;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03) !important;
}

html.light #app-sidebar .border-b,
html.light #app-sidebar .border-t {
  border-color: #e2e8f0 !important;
}

html.light #app-sidebar #sidebar-footer-container {
  background-color: transparent !important;
  border-top-color: #e2e8f0 !important;
}

html.light #app-sidebar #sidebar-user-card {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

html.light #theme-toggle-btn {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

html.light #theme-toggle-btn:hover {
  background-color: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

html.light header {
  background: rgba(255, 255, 255, 0.98) !important;
  border-bottom-color: #e2e8f0 !important;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.04) !important;
}

html.light #header-breadcrumb {
  color: #0f172a !important;
}

html.light #header-station-controls {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

html.light #header-station-controls .bg-slate-950 {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}

html.light #header-station-controls button {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

html.light #header-station-controls button:hover {
  background-color: #f1f5f9 !important;
}

html.light header .bg-slate-900 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

.station-sidebar,
.fleet-sidebar {
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  box-shadow: 0 8px 30px -6px rgba(0, 0, 0, 0.5);
  transition: width 0.25s var(--ease-spring), padding 0.25s var(--ease-smooth);
}

.sidebar-nav-btn,
.fleet-sidebar-nav-btn {
  transition: all 0.18s var(--ease-smooth);
}
.sidebar-nav-btn:hover,
.fleet-sidebar-nav-btn:hover {
  background: rgba(30, 41, 59, 0.6);
  transform: translateX(2px);
}
.sidebar-nav-btn.active,
.fleet-sidebar-nav-btn.active {
  background: rgba(37, 99, 235, 0.12);
  border-left-color: #2563eb !important;
  color: #60a5fa !important;
}

/* Collapsible Sidebar Compact Mode */
@media (min-width: 1024px) {
  #app-sidebar.sidebar-collapsed {
    width: 4.75rem !important;
  }
  #app-sidebar.sidebar-collapsed .sidebar-text {
    display: none !important;
  }
  #app-sidebar.sidebar-collapsed .brand-header-row {
    justify-content: center !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }
  #app-sidebar.sidebar-collapsed .brand-container {
    justify-content: center !important;
    gap: 0 !important;
    width: 100% !important;
  }
  #app-sidebar.sidebar-collapsed .brand-logo-box {
    margin: 0 auto !important;
  }
  #app-sidebar.sidebar-collapsed .fleet-sidebar-nav-btn,
  #app-sidebar.sidebar-collapsed .sidebar-nav-btn {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  #app-sidebar.sidebar-collapsed .fleet-sidebar-nav-btn i,
  #app-sidebar.sidebar-collapsed .sidebar-nav-btn i {
    margin-right: 0 !important;
    font-size: 1.15rem !important;
  }
  #app-sidebar.sidebar-collapsed #btn-toggle-fleet-sidebar,
  #app-sidebar.sidebar-collapsed #btn-toggle-station-sidebar {
    margin: 0 auto !important;
  }
  #app-sidebar.sidebar-collapsed #sidebar-footer-container {
    padding: 0.5rem 0.25rem !important;
  }
  #app-sidebar.sidebar-collapsed #sidebar-user-card {
    justify-content: center !important;
    padding: 0.5rem 0 !important;
  }
  #app-sidebar.sidebar-collapsed #theme-toggle-btn {
    justify-content: center !important;
    padding: 0.5rem 0 !important;
    width: 2.75rem !important;
    height: 2.75rem !important;
    margin: 0 auto !important;
  }

  .fleet-sidebar.sidebar-collapsed,
  .station-sidebar.sidebar-collapsed {
    width: 4.25rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  .fleet-sidebar.sidebar-collapsed .sidebar-text,
  .station-sidebar.sidebar-collapsed .sidebar-text {
    display: none !important;
  }
  .fleet-sidebar.sidebar-collapsed .fleet-sidebar-nav-btn,
  .station-sidebar.sidebar-collapsed .sidebar-nav-btn {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .fleet-sidebar.sidebar-collapsed .fleet-sidebar-nav-btn i,
  .station-sidebar.sidebar-collapsed .sidebar-nav-btn i {
    margin-right: 0 !important;
    font-size: 1rem !important;
  }
}

/* ==========================================================================
   ACTIVE CHARGING STATUS BANNER (SOPHISTICATED ENTERPRISE SCADA)
   ========================================================================== */
.charging-active-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.15), 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ==========================================================================
   STATION CARD (FLEET GRID) - MODERN ENTERPRISE EV SCADA STYLE
   ========================================================================== */
.station-card {
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s var(--ease-smooth), border-color 0.22s var(--ease-smooth);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.station-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: rgba(59, 130, 246, 0.35);
}

.station-card[data-charging="true"] {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 20px -4px rgba(16, 185, 129, 0.12);
}

.station-card[data-charging="true"]:hover {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 16px 36px -8px rgba(16, 185, 129, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Station Card Prominent Anchor Chip & Harmonious 2-Row Header Layout */
.station-card-chip {
  width: 2.75rem !important;
  height: 2.75rem !important;
  border-radius: 0.85rem !important;
  font-size: 1.2rem !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.22s var(--ease-smooth);
}

@media (min-width: 640px) {
  .station-card-chip {
    width: 3rem !important;
    height: 3rem !important;
    border-radius: 0.95rem !important;
    font-size: 1.3rem !important;
  }
}

.station-card-chip.kpi-chip-emerald {
  background: radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.28), rgba(16, 185, 129, 0.12)) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.45) !important;
  color: #34d399 !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.22) !important;
}

.station-card-chip.kpi-chip-blue {
  background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.25), rgba(37, 99, 235, 0.1)) !important;
  border: 1.5px solid rgba(37, 99, 235, 0.4) !important;
  color: #60a5fa !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2) !important;
}

.station-card-chip.kpi-chip-slate {
  background: radial-gradient(circle at 30% 30%, rgba(100, 116, 139, 0.2), rgba(100, 116, 139, 0.08)) !important;
  border: 1.5px solid rgba(100, 116, 139, 0.3) !important;
  color: #94a3b8 !important;
}

.station-card-header-content {
  min-height: 2.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.05rem 0;
}

@media (min-width: 640px) {
  .station-card-header-content {
    min-height: 3rem;
    padding: 0.1rem 0;
  }
}

/* Station MAC address display - Always completely visible without truncation */
.station-mac-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem !important;
  letter-spacing: -0.025em !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* Responsive fleet-grid columns when persistent sidebar is expanded (navbar bật) */
@media (min-width: 1280px) and (max-width: 1535px) {
  #app-sidebar:not(.sidebar-collapsed) ~ div #fleet-grid {
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)) !important;
  }
}

@media (min-width: 1536px) and (max-width: 1750px) {
  #app-sidebar:not(.sidebar-collapsed) ~ div #fleet-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Status Dots inside Station Card */
.station-card-status-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
}
.station-card-status-dot.dot-charging,
.station-card-status-dot.dot-online {
  background-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4) !important;
}
.station-card-status-dot.dot-offline {
  background-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4) !important;
}

/* ==========================================================================
   TELEMETRY METRIC GAUGES
   ========================================================================== */
.metric-card {
  transition: transform 0.18s var(--ease-spring), border-color 0.18s var(--ease-smooth);
}
.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

/* ==========================================================================
   METRIC & DATA PRECISION TYPOGRAPHY (OUTFIT, MANROPE & LEXEND)
   Clean, modern, sans-serif numerals with no slab feet on digit 1
   ========================================================================== */
.metric-value,
.font-metric,
.data-metric,
.metric-value.font-mono,
#live-session-kwh,
#live-session-cost,
#live-session-revenue,
#live-session-profit,
#live-session-duration,
#fin-kpi-revenue,
#fin-kpi-evn-cost,
#fin-kpi-profit,
#fin-kpi-energy,
#fleet-rev-kpi-revenue,
#fleet-rev-kpi-cost,
#fleet-rev-kpi-profit,
#fleet-rev-kpi-energy,
#kpi-total-power,
#kpi-total-kwh,
#kpi-total-cost,
#kpi-net-profit,
#fleet-kpi-devices-count,
#health-utilization-pct,
#health-avg-voltage {
  font-family: var(--font-metric) !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-feature-settings: 'tnum' 1, 'lnum' 1;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  letter-spacing: -0.025em;
  text-rendering: optimizeLegibility;
}

/* ==========================================================================
   ENTERPRISE SEMANTIC ICON CHIPS (KPI CARDS & FLEET GRID)
   ========================================================================== */
.kpi-chip {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.2s var(--ease-smooth);
}

.kpi-chip-banner {
  width: 2.15rem !important;
  height: 2.15rem !important;
  border-radius: 0.65rem !important;
  font-size: 0.92rem !important;
  flex-shrink: 0 !important;
}
@media (min-width: 1440px) {
  .kpi-chip-banner {
    width: 2.45rem !important;
    height: 2.45rem !important;
    font-size: 1.05rem !important;
  }
}
@media (min-width: 1536px) {
  .kpi-chip-banner {
    width: 2.85rem !important;
    height: 2.85rem !important;
    font-size: 1.2rem !important;
  }
}

.kpi-chip-blue {
  background-color: rgba(37, 99, 235, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.kpi-chip-sky {
  background-color: rgba(2, 132, 199, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.kpi-chip-indigo {
  background-color: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.kpi-chip-rose {
  background-color: rgba(225, 29, 72, 0.12);
  color: #fb7185;
  border: 1px solid rgba(225, 29, 72, 0.25);
}

.kpi-chip-emerald {
  background-color: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.kpi-chip-amber {
  background-color: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.kpi-chip-slate {
  background-color: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

/* Light Theme Tinted Pastels for Chips (Eliminates Black Squares on Light Background) */
html.light .kpi-chip-blue {
  background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18) !important;
}

html.light .kpi-chip-sky {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe) !important;
  color: #0284c7 !important;
  border: 1px solid #bae6fd !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.18) !important;
}

html.light .kpi-chip-indigo {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff) !important;
  color: #4f46e5 !important;
  border: 1px solid #c7d2fe !important;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.18) !important;
}

html.light .kpi-chip-rose {
  background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
  color: #e11d48 !important;
  border: 1px solid #fecdd3 !important;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.18) !important;
}

html.light .kpi-chip-emerald {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.18) !important;
}

html.light .kpi-chip-amber {
  background: linear-gradient(135deg, #fffbeb, #fef3c7) !important;
  color: #d97706 !important;
  border: 1px solid #fde68a !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.18) !important;
}

html.light .kpi-chip-slate {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 6px rgba(71, 85, 105, 0.12) !important;
}

/* ==========================================================================
   BUTTONS (ENTERPRISE SAAS STYLE - POLISHED, SERIOUS, NO NEON GLOW)
   ========================================================================== */
.btn-enterprise {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 0.65rem;
  transition: all 0.16s var(--ease-smooth);
  cursor: pointer;
  user-select: none;
}
.btn-enterprise:active {
  transform: scale(0.98);
}

/* Primary Enterprise Action */
.btn-primary {
  background-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}
.btn-primary:hover {
  background-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Success Action (Start Charging) */
.btn-success {
  background-color: #059669;
  color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}
.btn-success:hover {
  background-color: #047857;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

/* Danger / Emergency Action (Emergency Stop) */
.btn-danger {
  background-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}
.btn-danger:hover {
  background-color: #b91c1c;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

/* Light Theme Vibrant Buttons */
html.light .btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
  border: 1px solid #1d4ed8 !important;
}
html.light .btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45) !important;
}

html.light .btn-success {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
  border: 1px solid #059669 !important;
}
html.light .btn-success:hover {
  background: linear-gradient(135deg, #059669, #047857) !important;
}

html.light .btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
  border: 1px solid #dc2626 !important;
}
html.light .btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
}

/* Legacy Alias for backward compatibility */
.btn-neon {
  transition: all 0.16s var(--ease-smooth);
}
.btn-neon:hover {
  transform: translateY(-1px);
}
.btn-neon:active {
  transform: scale(0.98);
}

/* ==========================================================================
   BADGES & PILLS
   ========================================================================== */
.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
}

/* Micro-LED Status Dot (Delicate, Non-Aggressive) */
.pulse-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  vertical-align: middle;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 9999px;
  animation: pulse-ring 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  opacity: 0.5;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.7; }
  70%, 100% { transform: scale(2.0); opacity: 0; }
}

.pulse-green { background: #10b981; }
.pulse-green::after { background: rgba(16, 185, 129, 0.5); }
.pulse-red { background: #ef4444; }
.pulse-red::after { background: rgba(239, 68, 68, 0.5); }
.pulse-amber { background: #f59e0b; }
.pulse-amber::after { background: rgba(245, 158, 11, 0.5); }
.pulse-blue { background: #2563eb; }
.pulse-blue::after { background: rgba(37, 99, 235, 0.5); }
.pulse-slate { background: #64748b; }
.pulse-slate::after { display: none; }

/* ==========================================================================
   INPUTS & FORM CONTROLS
   ========================================================================== */
input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
  border-color: #2563eb !important;
}

/* ==========================================================================
   DATA TABLES (CORPORATE SCADA MONITORING MATRIX)
   ========================================================================== */
tbody tr {
  transition: background-color 0.15s ease;
}
td.font-mono,
th.font-mono,
.table-num {
  font-family: var(--font-metric), var(--font-mono);
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-feature-settings: 'tnum' 1, 'lnum' 1;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* ==========================================================================
   ANIMATIONS & MOTION
   ========================================================================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.anim-fade-up {
  animation: fadeUp 0.35s var(--ease-spring) both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.anim-fade-in {
  animation: fadeIn 0.25s var(--ease-smooth) both;
}

/* KPI Banner Staggered Entrance */
#fleet-kpi-banner > div {
  animation: fadeUp 0.35s var(--ease-spring) both;
}
#fleet-kpi-banner > div:nth-child(2) { animation-delay: 40ms; }
#fleet-kpi-banner > div:nth-child(3) { animation-delay: 80ms; }
#fleet-kpi-banner > div:nth-child(4) { animation-delay: 120ms; }
#fleet-kpi-banner > div:nth-child(5) { animation-delay: 160ms; }

/* Modal Presentation Animation */
.fixed.inset-0:not(.hidden) > .glass-panel {
  animation: modalScaleUp 0.26s var(--ease-spring) both;
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}
::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.7);
}

/* Toast Notifications (Dark & Light Mode Enterprise SaaS) */
.toast {
  animation: toastSlideIn 0.28s var(--ease-spring) forwards;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

html.light .toast {
  background-color: #ffffff !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
}
html.light .toast div,
html.light .toast span {
  color: #0f172a !important;
}

html.light .toast.toast-info,
html.light .toast.border-cyan-500\/50,
html.light .toast.border-blue-500\/40 {
  background-color: #ffffff !important;
  border: 1px solid #93c5fd !important;
  border-left: 4px solid #2563eb !important;
  color: #0f172a !important;
}
html.light .toast.toast-info i,
html.light .toast.border-cyan-500\/50 i,
html.light .toast.border-blue-500\/40 i {
  color: #2563eb !important;
}

html.light .toast.toast-success,
html.light .toast.border-emerald-500\/50,
html.light .toast.border-emerald-500\/40 {
  background-color: #ffffff !important;
  border: 1px solid #86efac !important;
  border-left: 4px solid #10b981 !important;
  color: #0f172a !important;
}
html.light .toast.toast-success i,
html.light .toast.border-emerald-500\/50 i,
html.light .toast.border-emerald-500\/40 i {
  color: #059669 !important;
}

html.light .toast.toast-warning,
html.light .toast.border-amber-500\/50,
html.light .toast.border-amber-500\/40 {
  background-color: #ffffff !important;
  border: 1px solid #fde68a !important;
  border-left: 4px solid #f59e0b !important;
  color: #0f172a !important;
}
html.light .toast.toast-warning i,
html.light .toast.border-amber-500\/50 i,
html.light .toast.border-amber-500\/40 i {
  color: #d97706 !important;
}

html.light .toast.toast-error,
html.light .toast.border-rose-500\/50,
html.light .toast.border-rose-500\/40 {
  background-color: #ffffff !important;
  border: 1px solid #fecdd3 !important;
  border-left: 4px solid #ef4444 !important;
  color: #0f172a !important;
}
html.light .toast.toast-error i,
html.light .toast.border-rose-500\/50 i,
html.light .toast.border-rose-500\/40 i {
  color: #dc2626 !important;
}

html.light .toast .toast-close,
html.light .toast button {
  color: #64748b !important;
}
html.light .toast .toast-close:hover,
html.light .toast button:hover {
  color: #0f172a !important;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(105%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Enhanced Navbar Breadcrumbs and Elevated Station Content */
#header-breadcrumb {
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  font-weight: 800 !important;
  line-height: 1.25;
  text-transform: none !important;
}
@media (min-width: 640px) {
  #header-breadcrumb {
    font-size: 1.25rem;
  }
}
@media (min-width: 1024px) {
  #header-breadcrumb {
    font-size: 1.35rem;
  }
}

html.light #header-breadcrumb {
  text-transform: none !important;
}

/* Elevate station detail view: eliminate gap so content starts flush at the top */
#view-station-detail {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#view-station-detail > #active-session-card.hidden,
#view-station-detail > #active-session-card[hidden],
#view-station-detail > #active-session-card[style*="display: none"] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
}

#view-station-detail > .detail-tab-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#view-station-detail > #active-session-card:not(.hidden):not([hidden]) {
  margin-bottom: 1rem !important;
}

.session-metric-subbox {
  min-height: 6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

html.light .session-metric-subbox {
  background-color: #ffffff !important;
  border-color: rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 2px 8px -2px rgba(15, 23, 42, 0.04) !important;
}

.metric-card {
  min-height: 5.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ==========================================================================
   PERMISSION & ROLE FLOATING TOOLTIP (ADAPTIVE DARK / LIGHT THEME)
   ========================================================================== */
#share-perm-tooltip {
  background-color: rgba(2, 6, 23, 0.96) !important;
  border: 1px solid rgba(51, 65, 85, 0.8) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
  color: #f1f5f9 !important;
}

#share-perm-tooltip .tooltip-header-title {
  color: #ffffff !important;
}

#share-perm-tooltip .tooltip-divider {
  border-color: rgba(51, 65, 85, 0.6) !important;
}

#share-perm-tooltip .tooltip-item-allowed {
  color: #f1f5f9 !important;
}
#share-perm-tooltip .tooltip-item-allowed strong {
  color: #ffffff !important;
}
#share-perm-tooltip .tooltip-item-allowed span {
  color: #cbd5e1 !important;
}

#share-perm-tooltip .tooltip-item-disallowed {
  color: #64748b !important;
}
#share-perm-tooltip .tooltip-item-disallowed strong,
#share-perm-tooltip .tooltip-item-disallowed span {
  color: #64748b !important;
}

#share-perm-tooltip .tooltip-desc {
  color: #94a3b8 !important;
}

/* Light Theme Tooltip (Clean, Crisp Enterprise Cloud Look) */
html.light #share-perm-tooltip {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 20px 35px -5px rgba(15, 23, 42, 0.16), 0 10px 15px -3px rgba(15, 23, 42, 0.08) !important;
  color: #1e293b !important;
}

html.light #share-perm-tooltip .tooltip-header-title {
  color: #0f172a !important;
}

html.light #share-perm-tooltip .tooltip-divider {
  border-color: #e2e8f0 !important;
}

html.light #share-perm-tooltip .tooltip-item-allowed {
  color: #1e293b !important;
}
html.light #share-perm-tooltip .tooltip-item-allowed strong {
  color: #0f172a !important;
}
html.light #share-perm-tooltip .tooltip-item-allowed span {
  color: #334155 !important;
}

html.light #share-perm-tooltip .tooltip-item-disallowed {
  color: #94a3b8 !important;
}
html.light #share-perm-tooltip .tooltip-item-disallowed strong,
html.light #share-perm-tooltip .tooltip-item-disallowed span {
  color: #94a3b8 !important;
}

html.light #share-perm-tooltip .tooltip-desc {
  color: #64748b !important;
}

/* ==========================================================================
   PERM SUMMARY PILLS (FOR BOTH LIGHT & DARK THEMES)
   ========================================================================== */
.perm-summary-pill {
  transition: all 0.18s ease-in-out;
}
.perm-summary-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Dark Mode Defaults */
.perm-summary-total {
  background-color: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}
.perm-summary-total:hover {
  border-color: #60a5fa;
  background-color: rgba(37, 99, 235, 0.22);
}
.perm-summary-total i { color: #60a5fa; }

.perm-summary-viewer {
  background-color: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}
.perm-summary-viewer:hover {
  border-color: #60a5fa;
  background-color: rgba(37, 99, 235, 0.22);
}
.perm-summary-viewer i { color: #60a5fa; }

.perm-summary-operator {
  background-color: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}
.perm-summary-operator:hover {
  border-color: #34d399;
  background-color: rgba(16, 185, 129, 0.22);
}
.perm-summary-operator i { color: #34d399; }

.perm-summary-technician {
  background-color: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}
.perm-summary-technician:hover {
  border-color: #fbbf24;
  background-color: rgba(245, 158, 11, 0.22);
}
.perm-summary-technician i { color: #fbbf24; }

.perm-summary-manager {
  background-color: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
}
.perm-summary-manager:hover {
  border-color: #c084fc;
  background-color: rgba(168, 85, 247, 0.22);
}
.perm-summary-manager i { color: #c084fc; }

/* Light Theme: High Contrast Crisp Pastel Pills on White Background */
html.light .perm-summary-total {
  background-color: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08) !important;
}
html.light .perm-summary-total:hover {
  background-color: #dbeafe !important;
  border-color: #93c5fd !important;
}
html.light .perm-summary-total i { color: #2563eb !important; }

html.light .perm-summary-viewer {
  background-color: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08) !important;
}
html.light .perm-summary-viewer:hover {
  background-color: #dbeafe !important;
  border-color: #93c5fd !important;
}
html.light .perm-summary-viewer i { color: #2563eb !important; }

html.light .perm-summary-operator {
  background-color: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #047857 !important;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.08) !important;
}
html.light .perm-summary-operator:hover {
  background-color: #d1fae5 !important;
  border-color: #6ee7b7 !important;
}
html.light .perm-summary-operator i { color: #059669 !important; }

html.light .perm-summary-technician {
  background-color: #fffbeb !important;
  border: 1px solid #fde68a !important;
  color: #b45309 !important;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.08) !important;
}
html.light .perm-summary-technician:hover {
  background-color: #fef3c7 !important;
  border-color: #fcd34d !important;
}
html.light .perm-summary-technician i { color: #d97706 !important; }

html.light .perm-summary-manager {
  background-color: #faf5ff !important;
  border: 1px solid #e9d5ff !important;
  color: #6b21a8 !important;
  box-shadow: 0 1px 2px rgba(168, 85, 247, 0.08) !important;
}
html.light .perm-summary-manager:hover {
  background-color: #f3e8ff !important;
  border-color: #d8b4fe !important;
}
html.light .perm-summary-manager i { color: #7c3aed !important; }

/* Light Theme Badges & Table for Shares */
html.light #full-shares-table-wrapper {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 16px -2px rgba(15, 23, 42, 0.05) !important;
}
html.light #full-shares-table-wrapper thead {
  background-color: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}
html.light #full-shares-table-body tr {
  border-bottom-color: #f1f5f9 !important;
}
html.light #full-shares-table-body tr:hover {
  background-color: #f8fafc !important;
}
html.light #full-shares-table-body select {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

/* ==========================================================================
   SIDEBAR USER SETTINGS MENU (ADAPTIVE DARK / LIGHT THEME)
   ========================================================================== */
#sidebar-user-menu-dropdown {
  background-color: rgba(2, 6, 23, 0.98);
  border: 1px solid rgba(51, 65, 85, 0.8);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

html.light #sidebar-user-menu-dropdown {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.15), 0 5px 12px -2px rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

html.light #sidebar-user-menu-dropdown strong {
  color: #0f172a !important;
}

html.light #sidebar-user-menu-dropdown button {
  color: #334155 !important;
}

html.light #sidebar-user-menu-dropdown button:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html.light #sidebar-user-menu-dropdown button.text-rose-400 {
  color: #dc2626 !important;
}

html.light #sidebar-user-menu-dropdown button.text-rose-400:hover {
  background-color: #fef2f2 !important;
  color: #b91c1c !important;
}

html.light #sidebar-user-menu-dropdown .border-b,
html.light #sidebar-user-menu-dropdown .border-t {
  border-color: #e2e8f0 !important;
}

/* Light mode for Logout confirmation modal */
html.light #modal-confirm-logout .glass-panel {
  background-color: #ffffff !important;
  border-color: #fecdd3 !important;
}

html.light #modal-confirm-logout h3 {
  color: #0f172a !important;
}

html.light #modal-confirm-logout p {
  color: #475569 !important;
}

/* Light mode for Fleet Matrix & Pagination & Revenue Filters */
html.light .matrix-filter-btn[class*="bg-slate-950"],
html.light #fleet-revenue-pagination button[class*="bg-slate-800"],
html.light #detail-sessions-pagination button[class*="bg-slate-800"] {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

html.light .matrix-filter-btn[class*="bg-slate-950"]:hover,
html.light #fleet-revenue-pagination button[class*="hover:bg-slate-700"]:hover,
html.light #detail-sessions-pagination button[class*="hover:bg-slate-700"]:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

html.light #fleet-revenue-pagination button[class*="bg-slate-900"],
html.light #detail-sessions-pagination button[class*="bg-slate-900"] {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
}

/* Universal Pagination Controls in Dark & Light Themes */
[id$="-pagination"] button:disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
}

html.light [id$="-pagination"] {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  border-top-color: #e2e8f0 !important;
}

html.light [id$="-pagination"] button.bg-slate-800\/80,
html.light [id$="-pagination"] button.bg-slate-800 {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

html.light [id$="-pagination"] button.bg-slate-800\/80:hover,
html.light [id$="-pagination"] button.bg-slate-800:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

html.light [id$="-pagination"] .text-slate-400 {
  color: #64748b !important;
}

html.light [id$="-pagination"] .text-white {
  color: #0f172a !important;
}

html.light #fleet-rev-custom-day-box input[type="date"],
html.light #fleet-rev-custom-month-box input[type="month"],
html.light #fleet-rev-custom-year-box select,
html.light #detail-fin-custom-day-box input[type="date"],
html.light #detail-fin-custom-month-box input[type="month"],
html.light #detail-fin-custom-year-box select {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* ==========================================================================
   STATION CARD FIRE ALERT HIGHLIGHT & AI ADVICE LIGHT MODE
   ========================================================================== */
.station-card.station-card-fire,
.station-card[data-fire="true"] {
  border-color: #f43f5e !important;
  background: rgba(76, 5, 25, 0.35) !important;
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.35), inset 0 0 15px rgba(244, 63, 94, 0.15) !important;
}
.station-card.station-card-fire:hover,
.station-card[data-fire="true"]:hover {
  border-color: #fb7185 !important;
  box-shadow: 0 0 35px rgba(244, 63, 94, 0.5), inset 0 0 20px rgba(244, 63, 94, 0.2) !important;
}

html.light .station-card.station-card-fire,
html.light .station-card[data-fire="true"] {
  background: linear-gradient(135deg, #fff1f2, #ffe4e6) !important;
  border: 2px solid #f43f5e !important;
  box-shadow: 0 8px 24px -4px rgba(244, 63, 94, 0.3) !important;
}
html.light .station-card.station-card-fire:hover,
html.light .station-card[data-fire="true"]:hover {
  border-color: #e11d48 !important;
  box-shadow: 0 12px 28px -4px rgba(244, 63, 94, 0.4) !important;
}
html.light .station-card.station-card-fire .fleet-card-user-box,
html.light .station-card.station-card-fire .fleet-card-user-box-idle {
  background-color: rgba(254, 226, 226, 0.7) !important;
  border-color: #fca5a5 !important;
}

/* AI Live Diagnostic Advice Banner in Light Mode */
html.light #telemetry-ai-advice.ai-advice-danger,
html.light #telemetry-ai-advice.bg-rose-950\/40 {
  background: linear-gradient(135deg, #fff1f2, #fee2e2) !important;
  border: 1.5px solid #f87171 !important;
  color: #991b1b !important;
  box-shadow: 0 4px 14px -2px rgba(239, 68, 68, 0.25) !important;
}

html.light #telemetry-ai-advice.ai-advice-danger strong,
html.light #telemetry-ai-advice.bg-rose-950\/40 strong,
html.light #telemetry-ai-advice.ai-advice-danger .text-rose-300,
html.light #telemetry-ai-advice.bg-rose-950\/40 .text-rose-300 {
  color: #b91c1c !important;
  font-weight: 800 !important;
}

html.light #telemetry-ai-advice.ai-advice-danger i,
html.light #telemetry-ai-advice.bg-rose-950\/40 i {
  color: #dc2626 !important;
}

html.light #telemetry-ai-advice.ai-advice-warning,
html.light #telemetry-ai-advice.bg-amber-950\/40 {
  background: linear-gradient(135deg, #fffbeb, #fef3c7) !important;
  border: 1.5px solid #fcd34d !important;
  color: #92400e !important;
  box-shadow: 0 4px 14px -2px rgba(245, 158, 11, 0.2) !important;
}

html.light #telemetry-ai-advice.ai-advice-warning strong,
html.light #telemetry-ai-advice.bg-amber-950\/40 strong,
html.light #telemetry-ai-advice.ai-advice-warning .text-amber-300,
html.light #telemetry-ai-advice.bg-amber-950\/40 .text-amber-300 {
  color: #b45309 !important;
  font-weight: 800 !important;
}

html.light #telemetry-ai-advice.ai-advice-warning i,
html.light #telemetry-ai-advice.bg-amber-950\/40 i {
  color: #d97706 !important;
}

html.light #telemetry-ai-advice.ai-advice-safe,
html.light #telemetry-ai-advice.bg-slate-900\/80 {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

html.light #telemetry-ai-advice.ai-advice-safe i,
html.light #telemetry-ai-advice.bg-slate-900\/80 i {
  color: #10b981 !important;
}

html.light #telemetry-ai-badge.bg-rose-500\/20 {
  background-color: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}

/* ==========================================================================
   DETAIL VIEW FIRE ALERT AMBIENT RED TINT
   ========================================================================== */
#view-station-detail.detail-fire-alert-active {
  position: relative;
}

#view-station-detail.detail-fire-alert-active .glass-panel {
  background: rgba(76, 5, 25, 0.28) !important;
  border-color: rgba(244, 63, 94, 0.45) !important;
  box-shadow: 0 4px 20px -2px rgba(244, 63, 94, 0.18) !important;
}

#view-station-detail.detail-fire-alert-active .metric-card {
  background: rgba(76, 5, 25, 0.32) !important;
  border-color: rgba(244, 63, 94, 0.45) !important;
}

#view-station-detail.detail-fire-alert-active div[class*="bg-slate-900"] {
  background-color: rgba(76, 5, 25, 0.3) !important;
  border-color: rgba(244, 63, 94, 0.4) !important;
}

#view-station-detail.detail-fire-alert-active .station-sidebar {
  background: rgba(45, 5, 15, 0.8) !important;
  border-color: rgba(244, 63, 94, 0.45) !important;
}

/* Light Mode Detail View Fire Alert */
html.light #view-station-detail.detail-fire-alert-active .glass-panel {
  background: linear-gradient(135deg, #fff5f5, #ffe4e6) !important;
  border: 1.5px solid #fca5a5 !important;
  box-shadow: 0 4px 16px -2px rgba(239, 68, 68, 0.15) !important;
}

html.light #view-station-detail.detail-fire-alert-active .metric-card {
  background: #ffffff !important;
  border: 1.5px solid #fca5a5 !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1) !important;
}

html.light #view-station-detail.detail-fire-alert-active div[class*="bg-slate-900"] {
  background-color: #fff1f2 !important;
  border-color: #fca5a5 !important;
}

html.light #view-station-detail.detail-fire-alert-active .station-sidebar {
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
}

/* Fleet Sidebar Diagnostic Box */
#fleet-sidebar-diag-box.diag-danger {
  background: rgba(76, 5, 25, 0.45) !important;
  border-color: rgba(244, 63, 94, 0.6) !important;
  box-shadow: 0 4px 16px -2px rgba(225, 29, 72, 0.25) !important;
}

#fleet-sidebar-diag-box.diag-warning {
  background: rgba(69, 26, 3, 0.45) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
}

/* Light Mode Fleet Sidebar Diagnostic Box */
html.light #fleet-sidebar-diag-box {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

html.light #fleet-sidebar-diag-box #fleet-sidebar-desc {
  color: #475569 !important;
}

html.light #fleet-sidebar-diag-box.diag-danger {
  background: linear-gradient(135deg, #fff1f2, #ffe4e6) !important;
  border-color: #f87171 !important;
  box-shadow: 0 4px 14px -2px rgba(239, 68, 68, 0.2) !important;
}

html.light #fleet-sidebar-diag-box.diag-danger #fleet-sidebar-desc {
  color: #991b1b !important;
  font-weight: 700 !important;
}

html.light #fleet-sidebar-diag-box.diag-warning {
  background: linear-gradient(135deg, #fffbeb, #fef3c7) !important;
  border-color: #fcd34d !important;
}

html.light #fleet-sidebar-diag-box.diag-warning #fleet-sidebar-desc {
  color: #92400e !important;
}


