/* ============================================
   FUELWATCH — COMPLETE PRODUCTION STYLESHEET
   Fleet Intelligence Platform
   Version: 2.0
   ============================================ */

/* CSS VARIABLES */
:root {
  --bg-primary: #070c18;
  --bg-secondary: #0f172a;
  --bg-card: #111827;
  --bg-card-hover: #1a2235;
  --border-color: #1e293b;
  --border-hover: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #38bdf8;
  --accent-blue-light: #7dd3fc;
  --accent-blue-dark: #0ea5e9;
  --accent-green: #34d399;
  --accent-green-light: #6ee7b7;
  --accent-red: #ef4444;
  --accent-red-light: #f87171;
  --accent-purple: #a78bfa;
  --accent-yellow: #fbbf24;
  --accent-pink: #f472b6;
  --accent-whatsapp: #25d366;
  --gradient-hero: radial-gradient(circle at 50% 30%, #0f172a 0%, #070c18 70%);
  --gradient-card: linear-gradient(135deg, rgba(56, 189, 248, 0.05) 0%, transparent 50%);
  --gradient-text: linear-gradient(135deg, #f8fafc 0%, #38bdf8 50%, #7dd3fc 100%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 40px -10px rgba(56, 189, 248, 0.15);
  --shadow-xl: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(56, 189, 248, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  --transition-slower: 0.5s ease;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Courier New', 'Fira Code', monospace;
}

/* RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* STARRY BACKGROUND */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(1px 1px at 20% 30%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 60% 70%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 50% 50%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 80% 10%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 90% 60%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 30% 80%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 70% 40%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 40% 90%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 10% 40%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 95% 85%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 25% 20%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 75% 75%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 15% 65%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 85% 35%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 45% 15%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 55% 25%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 35% 55%, #fff, rgba(255, 255, 255, 0)),
    radial-gradient(1px 1px at 65% 95%, #fff, rgba(255, 255, 255, 0));
  background-size: 200% 200%;
  background-position: 0% 0%;
  background-repeat: repeat;
  pointer-events: none;
  z-index: 0;
  animation: twinkle 3s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* Ensure content is above the stars */
html {
  position: relative;
}

main, section, nav, footer {
  position: relative;
  z-index: 1;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* ============================================
   LOADER
   ============================================ */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none !important;
}

.loader-content {
  text-align: center;
}

.loader-icon {
  font-size: 4rem;
  margin-bottom: 24px;
  animation: loaderBounce 1s ease-in-out infinite;
}

@keyframes loaderBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.loader-bar {
  width: 200px;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto 16px;
}

.loader-progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  border-radius: 2px;
  animation: loaderProgress 2s ease-in-out forwards;
}

@keyframes loaderProgress {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

.loader-text {
  color: var(--text-muted);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(7, 12, 24, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(7, 12, 24, 0.95);
  box-shadow: var(--shadow-md);
  border-bottom-color: rgba(30, 41, 59, 0.8);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  transition: opacity var(--transition-fast);
}

.logo:hover {
  opacity: 0.8;
}

.logo-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.3));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-blue);
  border-radius: 1px;
  transition: width var(--transition-base);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--accent-blue);
  color: var(--bg-primary) !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
  transition: all var(--transition-base) !important;
}

.nav-cta:hover {
  background: var(--accent-blue-light);
  color: var(--bg-primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.nav-cta::after {
  display: none !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 24px 60px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.glow {
  position: absolute;
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, transparent 60%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-particles span {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent-blue);
  border-radius: 50%;
  opacity: 0.2;
  animation: float 20s infinite linear;
}

.hero-particles span:nth-child(1) { left: 5%; top: 10%; animation-delay: 0s; animation-duration: 18s; }
.hero-particles span:nth-child(2) { left: 15%; top: 70%; animation-delay: 2s; animation-duration: 22s; }
.hero-particles span:nth-child(3) { left: 25%; top: 30%; animation-delay: 4s; animation-duration: 16s; }
.hero-particles span:nth-child(4) { left: 35%; top: 85%; animation-delay: 1s; animation-duration: 20s; }
.hero-particles span:nth-child(5) { left: 45%; top: 20%; animation-delay: 3s; animation-duration: 24s; }
.hero-particles span:nth-child(6) { left: 55%; top: 60%; animation-delay: 5s; animation-duration: 19s; }
.hero-particles span:nth-child(7) { left: 65%; top: 40%; animation-delay: 2.5s; animation-duration: 21s; }
.hero-particles span:nth-child(8) { left: 75%; top: 75%; animation-delay: 4.5s; animation-duration: 17s; }
.hero-particles span:nth-child(9) { left: 85%; top: 15%; animation-delay: 1.5s; animation-duration: 23s; }
.hero-particles span:nth-child(10) { left: 95%; top: 55%; animation-delay: 3.5s; animation-duration: 15s; }
.hero-particles span:nth-child(11) { left: 10%; top: 45%; animation-delay: 6s; animation-duration: 25s; }
.hero-particles span:nth-child(12) { left: 30%; top: 90%; animation-delay: 7s; animation-duration: 18s; }
.hero-particles span:nth-child(13) { left: 50%; top: 5%; animation-delay: 8s; animation-duration: 20s; }
.hero-particles span:nth-child(14) { left: 70%; top: 95%; animation-delay: 9s; animation-duration: 22s; }
.hero-particles span:nth-child(15) { left: 90%; top: 35%; animation-delay: 10s; animation-duration: 19s; }

@keyframes float {
  0% { transform: translateY(0) translateX(0) scale(1); opacity: 0.2; }
  25% { transform: translateY(-50px) translateX(20px) scale(1.5); opacity: 0.4; }
  50% { transform: translateY(-100px) translateX(-10px) scale(1); opacity: 0.2; }
  75% { transform: translateY(-50px) translateX(30px) scale(1.3); opacity: 0.3; }
  100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.2; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.15);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--accent-blue);
  margin-bottom: 28px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero > .hero-content > p {
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  outline: none;
}

button:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.primary {
  padding: 14px 28px;
  background: var(--accent-blue);
  color: var(--bg-primary);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
  position: relative;
  overflow: hidden;
}

.primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.primary:hover::before {
  left: 100%;
}

.primary:hover {
  background: var(--accent-blue-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4);
}

.primary:active {
  transform: translateY(0);
}

.secondary {
  padding: 14px 28px;
  background: transparent;
  border: 1.5px solid var(--accent-blue);
  color: var(--accent-blue);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.secondary:hover {
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.1);
}

.secondary svg {
  stroke: var(--accent-blue);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  position: relative;
}

.stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 40px;
  background: var(--border-color);
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  font-family: var(--font-mono);
}

.stat-suffix {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-blue);
}

.stat-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  justify-content: center;
}

.scroll-indicator span {
  width: 4px;
  height: 8px;
  background: var(--accent-blue);
  border-radius: 2px;
  margin-top: 8px;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.5; }
}

/* ============================================
   SECTIONS & CONTAINER
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.dark {
  background: var(--bg-secondary);
}

.center {
  text-align: center;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-blue);
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
}

/* ============================================
   GRID & CARDS
   ============================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  list-style: none;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover::before {
  opacity: 0.5;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Feature Cards */
.features-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.feature-card {
  padding: 32px;
  background: var(--gradient-card), var(--bg-card);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: rgba(56, 189, 248, 0.08);
  color: var(--icon-color, var(--accent-blue));
  transition: all var(--transition-base);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.feature-icon svg {
  stroke: var(--icon-color, var(--accent-blue));
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 1000px;
  margin: 0 auto;
}

.step {
  flex: 1;
  text-align: center;
  padding: 0 24px;
}

.step-number {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 20px;
  color: var(--text-primary);
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.3);
  transition: all var(--transition-base);
}

.step:hover .step-number {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(56, 189, 248, 0.4);
}

.step-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.step-connector {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  margin-top: 32px;
  flex-shrink: 0;
  opacity: 0.5;
  position: relative;
}

.step-connector::after {
  content: '';
  position: absolute;
  right: -6px;
  top: -4px;
  width: 0;
  height: 0;
  border-left: 8px solid var(--accent-purple);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-primary);
}

.dashboard-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.tab {
  padding: 8px 16px;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border: none;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.dashboard-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

.dashboard-content {
  padding: 24px;
}

.dashboard-panel {
  display: none;
}

.dashboard-panel.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Stats Row */
.dashboard-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dash-stat {
  background: var(--bg-primary);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.dash-stat:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.dash-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.dash-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.alert-count {
  color: var(--accent-red);
  animation: alertPulse 2s ease-in-out infinite;
}

/* Truck List */
.truck-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.truck-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  flex-wrap: wrap;
}

.truck-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.truck-item.alert {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
  animation: alertPulse 2s ease-in-out infinite;
}

@keyframes alertPulse {
  0%, 100% { border-color: rgba(239, 68, 68, 0.3); box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  50% { border-color: rgba(239, 68, 68, 0.6); box-shadow: 0 0 20px rgba(239, 68, 68, 0.1); }
}

.truck-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 200px;
}

.truck-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  flex-shrink: 0;
  color: var(--text-primary);
}

.truck-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.truck-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.truck-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.truck-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 150px;
}

.fuel-bar {
  flex: 1;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  max-width: 120px;
}

.fuel-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.alert-fill {
  background: linear-gradient(90deg, var(--accent-red), var(--accent-red-light));
  animation: alertFillPulse 1.5s ease-in-out infinite;
}

@keyframes alertFillPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.fuel-text {
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  white-space: nowrap;
}

.alert-text {
  color: var(--accent-red);
  font-weight: 600;
}

.truck-status {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.status-normal {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-green);
}

.status-fueling {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
}

.status-alert {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  animation: statusBlink 2s ease-in-out infinite;
}

.status-idle {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Map Placeholder */
.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  color: var(--text-muted);
  gap: 16px;
}

.map-placeholder p {
  font-size: 1rem;
  color: var(--text-secondary);
}

.map-note {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Analytics Placeholder */
.analytics-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  color: var(--text-muted);
  gap: 16px;
}

.analytics-chart {
  width: 100%;
  max-width: 400px;
}

.analytics-placeholder p {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Alerts Panel */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert-item {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-blue);
  transition: all var(--transition-base);
}

.alert-item:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.alert-item.critical {
  border-left-color: var(--accent-red);
}

.alert-item.warning {
  border-left-color: var(--accent-yellow);
}

.alert-item.info {
  border-left-color: var(--accent-blue);
}

.alert-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.alert-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.alert-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.alert-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.alert-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   FUEL PRICES
   ============================================ */
.prices-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  align-items: start;
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-base);
}

.price-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.price-card.main-price {
  text-align: center;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(56, 189, 248, 0.05) 100%);
}

.price-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.price-flag {
  font-size: 1.5rem;
}

.price-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.price-values {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.price-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-type {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.price-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.price-change {
  font-size: 0.875rem;
  font-weight: 600;
}

.price-change.up {
  color: var(--accent-red);
}

.price-change.down {
  color: var(--accent-green);
}

.price-divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 0;
}

.price-update {
  display: block;
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.prices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prices-table thead {
  background: var(--bg-card);
}

.prices-table th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  color: var(--accent-blue);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prices-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  transition: color var(--transition-fast);
}

.prices-table tbody tr {
  transition: background var(--transition-fast);
}

.prices-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.prices-table tbody tr:hover td {
  color: var(--text-primary);
}

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

/* ============================================
   GLOBAL MARKET
   ============================================ */
.market-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.market-card {
  padding: 24px;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(56, 189, 248, 0.03) 100%);
}

.market-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.market-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.market-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.market-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.market-exchange {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.market-price {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 4px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.market-change {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.market-change.up {
  color: var(--accent-green);
}

.market-change.down {
  color: var(--accent-red);
}

.mini-chart {
  height: 40px;
  opacity: 0.6;
}

.mini-chart svg {
  width: 100%;
  height: 100%;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.testimonial-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(167, 139, 250, 0.03) 100%);
}

.testimonial-stars {
  color: var(--accent-yellow);
  font-size: 1.25rem;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.testimonial-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  flex: 1;
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-primary);
  flex-shrink: 0;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.author-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 40px;
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  width: 100%;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-base);
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.form-group input.error,
.form-group textarea.error {
  border-color: var(--accent-red);
}

.cta-btn {
  justify-content: center;
  padding: 16px 32px;
  font-size: 1.1rem;
  width: 100%;
}

.cta-note {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 16px 0;
  max-width: 300px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-base);
}

.footer-social a:hover {
  background: var(--accent-blue);
  color: var(--bg-primary);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

.footer-links h4 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--accent-blue);
  transform: translateX(4px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================
   POPUP
   ============================================ */
.popup {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: linear-gradient(135deg, rgba(34, 28, 20, 0.97), rgba(42, 31, 18, 0.97));
  border: 1px solid rgba(251, 191, 36, 0.32);
  border-radius: 12px;
  padding: 10px 12px;
  width: 212px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 18px -6px rgba(251, 191, 36, 0.25);
  z-index: 1000;
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: none;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.popup.popup-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  display: block;
  pointer-events: auto;
}

.popup-close-x {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: rgba(251, 191, 36, 0.8);
  cursor: pointer;
  padding: 2px;
  transition: all 0.2s;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
}

.popup-close-x:hover {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.popup-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.popup h3 {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fde9b8;
  margin: 0;
  line-height: 1.2;
}

.popup > div > p {
  font-size: 0.66rem;
  color: rgba(251, 191, 36, 0.65);
  margin: 1px 0 0 0;
  line-height: 1.1;
}

.popup-actions {
  display: flex;
  flex-direction: row;
  gap: 7px;
}

.popup-actions button {
  flex: 1;
  padding: 6px 4px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.popup-actions button svg { width: 13px; height: 13px; }

.popup-actions button:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.popup .play {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #2a1f10;
}

.popup .play:hover {
  background: linear-gradient(135deg, #fcc838, #f59e0b);
}

.popup .store {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.popup .store:hover {
  background: rgba(251, 191, 36, 0.2);
}

.popup .close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   WHATSAPP FLOAT
   ============================================ */
.whatsapp {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 60px;
  height: 60px;
  background: var(--accent-whatsapp);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-base);
  z-index: 999;
}

.whatsapp:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp svg {
  width: 28px;
  height: 28px;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: 998;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-blue);
  color: var(--bg-primary);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .prices-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .step-connector {
    display: none;
  }

  .steps {
    flex-direction: column;
    gap: 40px;
  }

  .step {
    padding: 0;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-slow);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-cta {
    margin-top: 12px;
    text-align: center;
    justify-content: center;
  }

  .hamburger {
    display: flex;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat:not(:last-child)::after {
    display: none;
  }

  .stat-num {
    font-size: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .popup {
    left: auto;
    right: 14px;
    width: 200px;
    bottom: 80px;
  }

  .whatsapp {
    bottom: 16px;
    left: 16px;
  }

  .back-to-top {
    bottom: 90px;
    right: 16px;
  }

  .truck-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .truck-metrics {
    width: 100%;
  }

  .fuel-bar {
    max-width: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 60px 0;
  }

  .hero {
    padding: 100px 16px 40px;
  }

  .btns {
    flex-direction: column;
    width: 100%;
  }

  .primary, .secondary {
    width: 100%;
    justify-content: center;
  }

  .dashboard-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .market-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 16px;
  }

  .stat {
    min-width: 100px;
  }
}

/* ============================================
   ANIMATIONS & UTILITIES
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  html {
    scroll-behavior: auto;
  }
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Selection color */
::selection {
  background: rgba(56, 189, 248, 0.3);
  color: var(--text-primary);
}

/* ============================================
   AUTH MODAL (dialog-based, centered)
   ============================================ */
dialog#authModal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 360px;
  max-width: 90vw;
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  z-index: 2000;
}
dialog#authModal::backdrop {
  background: rgba(7, 12, 24, 0.75);
  backdrop-filter: blur(4px);
}
.auth-tabs {
  display: flex;
  background: var(--bg-primary);
  border-radius: 10px;
  padding: 3px;
  margin: 8px 0 20px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  background: none;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.auth-tab.active {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.auth-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  outline: none;
  margin-bottom: 10px;
  transition: border-color var(--transition-fast);
}
.auth-input:focus { border-color: var(--accent-blue); }
.auth-input::placeholder { color: var(--text-muted); }
.auth-error {
  display: none;
  font-size: 12px;
  text-align: center;
  margin-bottom: 10px;
  line-height: 1.5;
}
.auth-submit { width: 100%; justify-content: center; margin-top: 4px; }
.auth-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 14px;
}

/* ============================================
   CUSTOMER PORTAL
   ============================================ */
.customer-portal {
  padding: 100px 0 80px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}
.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.portal-header h2 { font-size: 1.8rem; margin-bottom: 4px; }
.portal-sub { color: var(--text-secondary); font-size: 14px; font-family: var(--font-mono); }
.portal-logout {
  background: transparent;
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.portal-logout:hover { background: rgba(239,68,68,0.1); }

.portal-lockout {
  background: var(--bg-card);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.portal-lockout h3 { color: #f87171; font-size: 1.2rem; }
.portal-lockout p { color: var(--text-secondary); max-width: 420px; margin-bottom: 10px; }

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}
.portal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: border-color var(--transition-fast);
}
.portal-card-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; font-family: var(--font-mono); margin-bottom: 6px; }
.portal-card-value { font-size: 1.7rem; font-weight: 600; font-family: var(--font-mono); }
.portal-card-sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.portal-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.portal-truck-list, .portal-alert-list { display: flex; flex-direction: column; gap: 10px; }
.portal-empty { color: var(--text-muted); font-size: 13px; padding: 20px 0; text-align: center; }

.portal-truck-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid;
  border-radius: 10px;
  padding: 14px 16px;
}
.ptc-head { display: flex; justify-content: space-between; align-items: flex-start; }
.ptc-id { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.ptc-model { font-size: 15px; font-weight: 600; margin: 2px 0 4px; }
.ptc-loc { font-size: 12px; color: var(--text-secondary); }
.ptc-right { text-align: right; }
.ptc-badge { font-size: 10px; padding: 3px 9px; border-radius: 20px; font-family: var(--font-mono); font-weight: 500; }
.ptc-pct { font-size: 20px; font-weight: 300; font-family: var(--font-mono); margin-top: 6px; }

.portal-alert-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border-left: 3px solid;
  border-radius: 0 10px 10px 0;
  padding: 10px 14px;
}
.par-title { font-size: 13px; font-weight: 500; text-transform: capitalize; }
.par-msg { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.par-time { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); flex-shrink: 0; }

.portal-billing-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.pay-method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.pay-method-web {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}
.pay-method-web:hover { border-color: var(--border-hover); }
.pay-method-web.active { border-color: var(--accent-blue); background: rgba(56,189,248,0.06); }
.pay-icon-web { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.pay-name-web { font-size: 13px; font-weight: 500; }
.pay-sub-web { font-size: 11px; color: var(--text-muted); }
.web-pay-total { font-size: 14px; color: var(--text-secondary); margin-bottom: 14px; }
.web-pay-total strong { color: var(--text-primary); font-family: var(--font-mono); }
.web-pay-status { font-size: 12px; min-height: 18px; margin: 8px 0; font-family: var(--font-mono); }
.bank-details-web { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 10px; padding: 16px; font-size: 13px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }
.bank-details-web strong { color: var(--text-primary); }

@media (max-width: 768px) {
  .portal-grid { grid-template-columns: 1fr; }
  .pay-method-grid { grid-template-columns: 1fr; }
  .nav-login {
  margin-left: 8px;
}

.nav-login { display: none; } /* shown via hamburger menu space constraints on mobile if needed */
}

/* ============================================
   FOOTER REGION BADGE (Sweden HQ signal)
   ============================================ */
.footer-region-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 12px 6px 8px;
  margin: 14px 0 18px;
}
.region-flag {
  display: inline-flex;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.region-flag svg { display: block; }
.region-text {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  letter-spacing: .2px;
}

/* ============================================
   INFO PAGES (Help Center, Docs, Status, Privacy)
   ============================================ */
.info-page { min-height: 100vh; padding: 120px 0 80px; }
.info-hero { text-align: center; margin-bottom: 56px; }
.info-hero h1 { font-size: 2.4rem; margin-bottom: 12px; }
.info-hero p { color: var(--text-secondary); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.info-narrow { max-width: 760px; margin: 0 auto; }

/* Help Center */
.faq-search {
  display: flex; gap: 10px; max-width: 480px; margin: 0 auto 48px;
}
.faq-search input {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 10px; padding: 13px 16px; color: var(--text-primary); font-size: 14px; outline: none;
}
.faq-search input:focus { border-color: var(--accent-blue); }
.faq-category { margin-bottom: 36px; }
.faq-category h3 { font-size: 1rem; color: var(--accent-blue); margin-bottom: 14px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px;
  margin-bottom: 10px; overflow: hidden;
}
.faq-q {
  padding: 16px 18px; cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; font-size: 14.5px; font-weight: 500;
}
.faq-q:hover { color: var(--accent-blue); }
.faq-q svg { transition: transform .2s; flex-shrink: 0; color: var(--text-muted); }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.open .faq-a { max-height: 300px; }
.faq-a-inner { padding: 0 18px 16px; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.faq-contact-cta {
  text-align: center; margin-top: 50px; padding: 32px; background: var(--bg-card);
  border: 1px solid var(--border-color); border-radius: 14px;
}

/* Documentation */
.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.docs-sidebar {
  position: sticky; top: 100px; background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 12px; padding: 16px;
}
.docs-sidebar a {
  display: block; padding: 8px 10px; font-size: 13px; color: var(--text-secondary);
  border-radius: 6px; margin-bottom: 2px;
}
.docs-sidebar a:hover, .docs-sidebar a.active { background: rgba(56,189,248,.08); color: var(--accent-blue); }
.docs-content h2 { font-size: 1.4rem; margin: 40px 0 14px; scroll-margin-top: 100px; }
.docs-content h2:first-child { margin-top: 0; }
.docs-content p { color: var(--text-secondary); line-height: 1.75; margin-bottom: 14px; font-size: 14.5px; }
.docs-content ol, .docs-content ul { color: var(--text-secondary); line-height: 1.9; margin: 0 0 16px 20px; font-size: 14.5px; }
.docs-content code {
  background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 4px;
  padding: 2px 7px; font-family: var(--font-mono); font-size: 13px; color: var(--accent-green);
}
.docs-content pre {
  background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 10px;
  padding: 16px; overflow-x: auto; margin-bottom: 16px;
}
.docs-content pre code { background: none; border: none; padding: 0; color: var(--text-secondary); }
.docs-note {
  background: rgba(56,189,248,.06); border-left: 3px solid var(--accent-blue);
  border-radius: 6px; padding: 12px 16px; font-size: 13.5px; color: var(--text-secondary); margin: 16px 0;
}
@media (max-width: 860px) { .docs-layout { grid-template-columns: 1fr; } .docs-sidebar { position: static; } }

/* System Status */
.status-banner {
  display: flex; align-items: center; gap: 14px; background: var(--bg-card);
  border: 1px solid rgba(52,211,153,.3); border-radius: 14px; padding: 22px 26px; margin-bottom: 36px;
}
.status-banner.degraded { border-color: rgba(251,191,36,.3); }
.status-banner.down { border-color: rgba(248,113,113,.3); }
.status-dot { width: 14px; height: 14px; border-radius: 50%; background: #34d399; flex-shrink: 0; box-shadow: 0 0 12px rgba(52,211,153,.5); animation: statusPulse 2s ease infinite; }
.status-dot.degraded { background: #fbbf24; box-shadow: 0 0 12px rgba(251,191,36,.5); }
.status-dot.down { background: #f87171; box-shadow: 0 0 12px rgba(248,113,113,.5); }
@keyframes statusPulse { 0%,100%{opacity:1;} 50%{opacity:.5;} }
.status-banner-text h3 { font-size: 1.1rem; margin-bottom: 2px; }
.status-banner-text p { color: var(--text-muted); font-size: 13px; font-family: var(--font-mono); }
.status-services { display: flex; flex-direction: column; gap: 10px; }
.status-row {
  display: flex; justify-content: space-between; align-items: center; background: var(--bg-card);
  border: 1px solid var(--border-color); border-radius: 10px; padding: 14px 18px;
}
.status-row-name { font-size: 14px; font-weight: 500; }
.status-row-badge { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-family: var(--font-mono); font-weight: 600; }
.status-row-badge.up { background: rgba(52,211,153,.12); color: #34d399; }
.status-row-badge.checking { background: rgba(148,163,184,.12); color: var(--text-muted); }
.status-uptime { text-align: center; margin-top: 36px; color: var(--text-muted); font-size: 13px; font-family: var(--font-mono); }

/* Privacy Policy */
.policy-content h2 { font-size: 1.2rem; margin: 32px 0 12px; }
.policy-content h2:first-child { margin-top: 0; }
.policy-content p, .policy-content li { color: var(--text-secondary); line-height: 1.75; font-size: 14.5px; margin-bottom: 10px; }
.policy-content ul { margin-left: 20px; margin-bottom: 16px; }
.policy-updated { color: var(--text-muted); font-size: 13px; font-family: var(--font-mono); margin-bottom: 32px; text-align: center; }
.policy-placeholder { background: rgba(251,191,36,.06); border-left: 3px solid #fbbf24; border-radius: 6px; padding: 10px 14px; font-size: 13px; color: #fbbf24; margin: 14px 0; }

/* ════════════════════════════════════════════════════════════════
   AUTH MODAL OVERLAY (Non-Dialog Version)
   ════════════════════════════════════════════════════════════════ */

.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.auth-modal-overlay[style*="display: none"] {
  display: none !important;
  pointer-events: none;
  opacity: 0;
}

.auth-modal-overlay[style*="display: flex"] {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-content {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a2f45 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 24px;
  padding: 32px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.3s ease-out;
  position: relative;
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ensure all buttons in modal work */
.auth-modal-content button {
  position: relative;
  z-index: 1;
}

.auth-modal-content .auth-tab {
  flex: 1;
  padding: 12px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 0;
  position: relative;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.auth-modal-content .auth-tab:hover {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
}

.auth-modal-content .auth-tab.active {
  background: transparent;
  color: #38bdf8;
  border-bottom: 2px solid #38bdf8;
}

.auth-modal-content .auth-input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  transition: all 0.2s;
}

.auth-modal-content .auth-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.auth-modal-content .auth-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.auth-modal-content .auth-error {
  display: none;
  padding: 12px;
  margin-bottom: 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 13px;
  animation: slideDown 0.2s ease-out;
}

.auth-modal-content .auth-error[style*="display: block"] {
  display: block !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-modal-content .auth-submit {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-modal-content .auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3);
}

.auth-modal-content .auth-submit:active {
  transform: translateY(0);
}

.auth-modal-content .auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-modal-content .auth-note {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 12px;
}

/* ════════════════════════════════════════════════════════════════
   TRUCK DETAILS MODAL
   ════════════════════════════════════════════════════════════════ */

.truck-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  animation: fadeIn 0.3s ease-out;
}

.truck-modal-content {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a2f45 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  padding: 32px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
  position: relative;
}

.truck-modal-content::-webkit-scrollbar {
  width: 6px;
}

.truck-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.truck-modal-content::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 3px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal-header {
  margin-bottom: 28px;
  border-bottom: 2px solid rgba(56, 189, 248, 0.2);
  padding-bottom: 16px;
}

.modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px 0;
}

.modal-id {
  color: #38bdf8;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.status-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 12px;
}

.status-item .label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.status-item .value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.location-info {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 16px;
}

.location-info p {
  margin: 0 0 10px 0;
  font-size: 13px;
  color: #cbd5e1;
}

.location-info p:last-child {
  margin: 0;
}

.location-info strong {
  color: #38bdf8;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.btn-primary, .btn-secondary {
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.btn-secondary:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

/* ============================================
   FLEET COMMAND CENTER - INTERACTIVE LAYOUT
   ============================================ */

.fleet-command-center {
  padding: 40px;
  background: var(--bg-primary);
}

/* HEADER */
.fcc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.fcc-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 4px 0;
  background: linear-gradient(135deg, #38bdf8 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fcc-header p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 14px;
}

.fcc-stats {
  display: flex;
  gap: 40px;
}

.fcc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fcc-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.fcc-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-blue);
}

.alert-badge {
  color: #ef4444 !important;
}

/* MAIN CONTAINER */
.fcc-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
}

/* FLEET GRID */
.fcc-fleet-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fcc-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.fleet-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

/* TRUCK CARD - ANIMATED */
.truck-card-animated {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(52, 211, 153, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.truck-card-animated:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.2);
  transform: translateY(-4px);
}

.truck-card-animated.selected {
  border-color: var(--accent-blue);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(52, 211, 153, 0.2));
  box-shadow: 0 12px 32px rgba(56, 189, 248, 0.25);
}

.tca-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.tca-id {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.tca-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.tca-location {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.tca-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-right: 8px;
}

.tca-fuel {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-blue);
}

.tca-fuel-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.tca-fuel-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
  width: 0%;
  transition: width 0.6s ease;
}

/* TRUCK DETAIL PANEL */
.truck-detail-panel {
  position: fixed;
  right: 0;
  top: 0;
  width: 380px;
  height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #070c18 100%);
  border-left: 1px solid var(--border-color);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 500;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

.truck-detail-panel.active {
  transform: translateX(0);
}

.tdp-content {
  padding: 24px;
  position: relative;
}

.tdp-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.tdp-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* TRUCK HEADER */
.tdp-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  margin-top: 16px;
}

.truck-icon {
  font-size: 48px;
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.tdp-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.tdp-header p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

/* STATUS */
.tdp-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: pulse 2s ease-in-out infinite;
}

.tdp-status.normal {
  background: rgba(52, 211, 153, 0.2);
  color: var(--accent-green);
}

.tdp-status.warning {
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent-yellow);
}

.tdp-status.critical {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-red);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* GAUGE */
.tdp-gauge {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.gauge-circle {
  position: relative;
  width: 140px;
  height: 140px;
}

.gauge-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 6;
}

.gauge-fill {
  fill: none;
  stroke: url(#gaugeGradient);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 282.7;
  stroke-dashoffset: 282.7;
  transition: stroke-dashoffset 0.8s ease;
}

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

.gauge-text span {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-blue);
}

.gauge-text small {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* TABS */
.tdp-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

/* TAB CONTENT */
.tdp-content-area {
  margin-bottom: 24px;
}

.tdp-tab {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tdp-tab.active {
  display: block;
}

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

/* DATA GRID */
.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.data-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 12px;
}

.data-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.data-value {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ALERTS LIST */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.alert-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.alert-item {
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid;
  border-radius: 4px;
  padding: 10px;
  font-size: 12px;
}

.alert-item.critical {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.alert-item.warning {
  border-left-color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

/* ACTIONS */
.tdp-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.action-btn {
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--accent-blue), #0ea5e9);
  color: #fff;
}

.action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(56, 189, 248, 0.3);
}

.action-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.action-btn.secondary:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-blue);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
  .fcc-container {
    grid-template-columns: 1fr;
  }
  
  .truck-detail-panel {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .fcc-header {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }
  
  .fcc-stats {
    width: 100%;
    justify-content: space-around;
  }
  
  .fleet-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* GPS TRACKING CARD LAYOUT */

.portal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  height: 100vh;
  background: var(--bg-primary);
}

/* LEFT SIDEBAR - TRUCK LIST */
.portal-sidebar {
  background: rgba(15, 23, 42, 0.8);
  border-right: 1px solid var(--border-color);
  padding: 20px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sidebar-header p {
  font-size: 12px;
  color: var(--text-muted);
}

.truck-list-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.loading-text {
  text-align: center;
  color: var(--text-muted);
  padding: 20px 10px;
}

.truck-list-item {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(52, 211, 153, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.truck-list-item:hover {
  border-color: var(--accent-blue);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(52, 211, 153, 0.15));
}

.truck-list-item.active {
  border-left-color: var(--accent-blue);
  border-color: var(--accent-blue);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(52, 211, 153, 0.2));
}

.tli-id {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 3px;
  letter-spacing: 0.5px;
}

.tli-model {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.tli-location {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tli-fuel {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
}

/* MAIN CONTENT AREA */
.portal-main {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* TRUCK DETAIL CARD (GPS Style) */
.truck-detail-card {
  width: 100%;
  max-width: 500px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  color: #333;
}

/* TRUCK IMAGE SECTION */
.truck-image-section {
  background: linear-gradient(135deg, #f0f9ff 0%, #f0fdf4 100%);
  padding: 32px 20px;
  text-align: center;
  border-bottom: 1px solid #e0e7ff;
}

.truck-illustration {
  font-size: 80px;
  animation: float 3s ease-in-out infinite;
}

/* TRUCK INFO CARD */
.truck-info-card {
  padding: 20px;
  border-bottom: 1px solid #e0e7ff;
}

.tic-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tic-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #111;
}

.tic-header p {
  font-size: 12px;
  color: #999;
  margin: 0;
}

.info-btn {
  background: #f0f4f8;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.info-btn:hover {
  background: #e0e7f1;
}

/* STATUS BADGE */
.status-badge {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-weight: 600;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-transform: capitalize;
}

.status-badge.stopped {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.warning {
  background: #fef3c7;
  color: #b45309;
}

/* TRIP INFO */
.trip-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e7ff;
}

.trip-item {
  flex: 1;
}

.trip-label {
  display: block;
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.trip-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.trip-separator {
  color: #ddd;
  font-size: 20px;
}

/* ODOMETER */
.odometer-section {
  background: #f0f4f8;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  text-align: center;
}

.odometer-display {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: #111;
  letter-spacing: 2px;
}

/* DETAILS ROW */
.details-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e7ff;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

/* MORE DETAILS LINK */
.more-details-link {
  text-align: center;
  color: #3b82f6;
  font-size: 13px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.more-details-link:hover {
  background: #f0f4f8;
}

/* LOCATION SECTION */
.location-section {
  padding: 20px;
  border-bottom: 1px solid #e0e7ff;
}

.location-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 600;
  color: #111;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  transition: all 0.2s;
}

.copy-btn:hover {
  opacity: 0.7;
}

.location-content {
  background: #f0f9ff;
  border-radius: 8px;
  padding: 12px;
}

.location-address {
  font-size: 13px;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.4;
}

.location-coords {
  font-size: 11px;
  color: #999;
  font-family: monospace;
}

/* ACTION BUTTONS */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e7ff;
}

.action-btn {
  background: #f0f4f8;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: #e0e7f1;
}

/* ACTIVITY SECTION */
.activity-section {
  padding: 20px;
  border-bottom: 1px solid #e0e7ff;
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 600;
  color: #111;
}

.activity-refresh {
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.3s;
}

.activity-refresh:hover {
  transform: rotate(180deg);
}

.activity-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.activity-distance,
.activity-time {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.activity-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.activity-value {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.activity-bar {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 1px;
}

/* FUEL SECTION */
.fuel-section {
  padding: 20px;
}

.fuel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 600;
  color: #111;
}

.fuel-percentage {
  font-size: 14px;
  color: #3b82f6;
  font-weight: 700;
}

.fuel-bar {
  width: 100%;
  height: 6px;
  background: #e0e7ff;
  border-radius: 3px;
  overflow: hidden;
}

.fuel-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  transition: width 0.6s ease;
  width: 0%;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .portal-layout {
    grid-template-columns: 220px 1fr;
  }
  
  .portal-sidebar {
    padding: 16px 12px;
  }
}

@media (max-width: 768px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }
  
  .portal-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    max-height: 300px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    z-index: 50;
  }
  
  .portal-main {
    margin-top: 320px;
  }
  
  .truck-detail-card {
    max-width: 100%;
  }
}

/* ════════════════════════════════════════
   PORTAL LAYOUT - LOGGED IN VIEW
   ════════════════════════════════════════ */

#portalContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  z-index: 200;
}

/* PORTAL NAVBAR */
.portal-navbar {
  background: rgba(7, 12, 24, 0.95);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 150;
}

.portal-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.portal-nav-menu {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.portal-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portal-nav-btn:hover {
  color: var(--text-primary);
}

.portal-nav-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.portal-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.portal-user-email {
  font-size: 12px;
  color: var(--text-secondary);
}

.portal-logout-btn {
  background: transparent;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.portal-logout-btn:hover {
  background: rgba(56, 189, 248, 0.1);
}

/* PORTAL CONTENT */
.portal-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.portal-tab {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.portal-tab.active {
  display: flex;
  flex-direction: column;
}

.tab-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.tab-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #38bdf8 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* FLEET TAB - Portal Layout */
#fleetTab.portal-tab {
  padding: 0;
  display: block;
}

#fleetTab .portal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  height: 100%;
}

/* PORTAL FOOTER */
.portal-footer {
  background: rgba(15, 23, 42, 0.8);
  border-top: 1px solid var(--border-color);
  padding: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .portal-navbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .portal-nav-menu {
    order: 3;
    width: 100%;
  }
  
  #fleetTab .portal-layout {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 768px) {
  .portal-navbar {
    padding: 8px 12px;
  }
  
  .portal-nav-menu {
    flex-wrap: wrap;
  }
  
  .portal-nav-btn {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  #fleetTab .portal-layout {
    grid-template-columns: 1fr;
  }
  
  .portal-sidebar {
    max-height: 250px !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-right: none !important;
  }
  
  .portal-main {
    padding: 16px !important;
  }
  
  .truck-detail-card {
    max-width: 100% !important;
  }
}

/* ALERTS TAB */
.alerts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.alert-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  border-left: 4px solid #ef4444;
}

.alert-card p {
  margin: 8px 0;
  font-size: 14px;
  color: var(--text-primary);
}

.alert-card small {
  font-size: 11px;
  color: var(--text-muted);
}

.alert-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.alert-badge.critical {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-left: 4px solid #ef4444;
}

.alert-badge.warning {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.alert-badge.info {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

/* PRICES GRID */
.prices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.price-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(52, 211, 153, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.price-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.price-card .price {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 4px;
}

.price-card small {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.loading-text {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 14px;
}

/* ═══════════════════════════════════════════
   ANALYTICS — "LIT" VISUALS
   ═══════════════════════════════════════════ */
@keyframes anGrowUp   { from { transform: scaleY(0); }      to { transform: scaleY(1); } }
@keyframes anGrowWide { from { width: 0 !important; }       to {} }
@keyframes anFadeUp   { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes anGlowPulse{ 0%,100%{ opacity:0.55; } 50%{ opacity:1; } }

.an-bar         { transform-origin: bottom; animation: anGrowUp 0.7s cubic-bezier(0.22,1,0.36,1) both; }
.an-wide        { animation: anGrowWide 0.9s cubic-bezier(0.22,1,0.36,1) both; }
.an-stat-card   { animation: anFadeUp 0.5s ease both; position:relative; overflow:hidden; transition: transform 0.22s ease, box-shadow 0.22s ease; }
.an-stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px -8px rgba(0,0,0,0.5); }
.an-stat-card::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; background:var(--an-accent,#38bdf8); box-shadow:0 0 14px var(--an-accent,#38bdf8); }
.an-stat-glow   { position:absolute; bottom:-40px; right:-30px; width:120px; height:120px; border-radius:50%; background:var(--an-accent,#38bdf8); filter:blur(48px); opacity:0.18; pointer-events:none; }
.an-num-grad    { background:linear-gradient(135deg,#fff 0%, var(--an-accent,#38bdf8) 130%); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.an-week-bar    { position:relative; transition: filter 0.2s; }
.an-week-bar:hover { filter:brightness(1.25); }
.an-week-bar:hover .an-week-val { opacity:1; transform:translateY(0); }
.an-week-val    { opacity:0; transform:translateY(4px); transition:all 0.2s; }
.an-spark-dot   { animation: anGlowPulse 2s ease-in-out infinite; }

/* ═══ LIVE-MAP HIGHLIGHTED TRUCK (spotlight) ═══ */
@keyframes fleetPulse {
  0%   { transform: scale(0.7); opacity: 0.9; }
  70%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}
.fleet-marker-pulse {
  position: relative;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
}
.fleet-marker-pulse::before {
  content: '';
  position: absolute;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--mk, #38bdf8);
  animation: fleetPulse 1.6s ease-out infinite;
}
.fleet-marker-core {
  position: relative;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 18px 4px var(--mk, #38bdf8);
  z-index: 2;
}

/* ═══ ANALYTICS ROW SPOTLIGHT (from "More Details") ═══ */
.an-truck-row.an-spotlight {
  background: linear-gradient(90deg, rgba(56,189,248,0.18), rgba(167,139,250,0.10));
  box-shadow: 0 0 0 1px rgba(56,189,248,0.5), 0 8px 24px -6px rgba(56,189,248,0.4);
  transform: scale(1.04);
}
.an-truck-row.an-dimmed { opacity: 0.4; filter: grayscale(0.3); }

/* ═══ LIVE MARKET GRAPH ═══ */
@keyframes mkPulse { 0%,100%{opacity:0.4;} 50%{opacity:1;} }
.mk-live-dot { width:8px; height:8px; border-radius:50%; background:#34d399; box-shadow:0 0 8px #34d399; animation: mkPulse 1.4s ease-in-out infinite; }

/* ═══════════════════════════════════════════════════════════
   DRIVER PORTAL (client side) — uses existing theme tokens
   ═══════════════════════════════════════════════════════════ */
#driverPortalSection { padding: 60px 0; }
.dp-head { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:26px; }
.dp-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; }
.dp-card { background:var(--bg-card); border:1px solid var(--border-color); border-radius:16px; padding:16px; cursor:pointer; transition:border-color .2s, transform .2s, box-shadow .2s; display:flex; gap:14px; align-items:center; }
.dp-card:hover { border-color:var(--accent-blue); transform:translateY(-2px); box-shadow:0 12px 30px -12px rgba(56,189,248,.4); }
.dp-avatar { width:56px; height:56px; border-radius:14px; flex-shrink:0; object-fit:cover; background:linear-gradient(135deg,#1e293b,#0f172a); border:1px solid var(--border-color); }
.dp-card-name { font-weight:700; font-size:15px; color:var(--text-primary); }
.dp-card-meta { font-size:12px; color:var(--text-muted); font-family:var(--font-mono); margin-top:2px; }
.dp-status { display:inline-block; font-size:10px; font-weight:700; padding:2px 9px; border-radius:20px; font-family:var(--font-mono); margin-top:6px; }
.dp-on_route, .dp-on-route { background:rgba(52,211,153,.14); color:#34d399; }
.dp-on_leave, .dp-on-leave { background:rgba(251,191,36,.14); color:#fbbf24; }
.dp-off_duty, .dp-off-duty { background:rgba(148,163,184,.14); color:#94a3b8; }

/* slide-in detail panel */
.dp-panel-backdrop { position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:450; opacity:0; visibility:hidden; transition:opacity .25s; }
.dp-panel-backdrop.open { opacity:1; visibility:visible; }
.dp-panel { position:fixed; top:0; right:0; height:100%; width:440px; max-width:92vw; background:var(--bg-primary); border-left:1px solid var(--border-color); z-index:451; transform:translateX(100%); transition:transform .3s cubic-bezier(.2,.8,.2,1); overflow-y:auto; box-shadow:-20px 0 60px rgba(0,0,0,.5); }
.dp-panel.open { transform:translateX(0); }
.dp-photo-wrap { position:relative; height:200px; background:linear-gradient(135deg,#1e293b,#0b1220); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.dp-photo-wrap img, .dp-photo-wrap svg { width:100%; height:100%; object-fit:cover; }
.dp-photo-edit { position:absolute; bottom:12px; right:12px; background:rgba(0,0,0,.6); border:1px solid var(--border-color); color:#fff; font-size:11px; padding:7px 12px; border-radius:8px; cursor:pointer; display:flex; align-items:center; gap:6px; backdrop-filter:blur(6px); }
.dp-photo-edit:hover { background:var(--accent-blue); border-color:var(--accent-blue); }
.dp-detail-row { display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px solid var(--border-color); }
.dp-detail-row .lbl { font-size:12px; color:var(--text-muted); }
.dp-detail-row .val { font-size:13px; color:var(--text-primary); font-weight:600; text-align:right; }
.dp-metric-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:14px 0; }
.dp-metric { background:var(--bg-card); border:1px solid var(--border-color); border-radius:12px; padding:12px; }
.dp-metric .m-lbl { font-size:10px; color:var(--text-muted); font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.5px; }
.dp-metric .m-val { font-size:20px; font-weight:800; margin-top:4px; }
.dp-pill { font-size:10px; font-weight:700; padding:2px 8px; border-radius:20px; font-family:var(--font-mono); }
.dp-ok { background:rgba(52,211,153,.14); color:#34d399; }
.dp-warn { background:rgba(251,191,36,.14); color:#fbbf24; }
.dp-bad { background:rgba(248,113,113,.14); color:#f87171; }
.dp-btn { width:100%; padding:12px; border-radius:11px; border:1px solid var(--border-color); background:var(--bg-card); color:var(--text-primary); font-size:13px; font-weight:600; cursor:pointer; margin-top:8px; display:flex; align-items:center; justify-content:center; gap:8px; transition:all .2s; font-family:var(--font-sans); }
.dp-btn:hover { border-color:var(--accent-blue); color:var(--accent-blue); }
.dp-btn-cam { background:linear-gradient(135deg,#dc2626,#b91c1c); border:none; color:#fff; }
.dp-btn-cam:hover { background:linear-gradient(135deg,#ef4444,#dc2626); color:#fff; }

/* dashcam viewer */
.cam-feed { position:relative; aspect-ratio:16/9; border-radius:12px; overflow:hidden; border:1px solid var(--border-color); background:#05070d; }
.cam-noise { position:absolute; inset:0; background:linear-gradient(135deg,#0b1220,#1e293b,#0b1220); background-size:200% 200%; animation:camLive 6s ease infinite; opacity:.9; }
@keyframes camLive { 0%{background-position:0% 0%;} 50%{background-position:100% 100%;} 100%{background-position:0% 0%;} }
.cam-rec { position:absolute; top:10px; left:10px; display:flex; align-items:center; gap:6px; font-family:var(--font-mono); font-size:11px; color:#f87171; font-weight:700; }
.cam-rec .dot { width:8px; height:8px; border-radius:50%; background:#ef4444; animation:camBlink 1.2s ease-in-out infinite; }
@keyframes camBlink { 0%,100%{opacity:1;} 50%{opacity:.25;} }
.cam-ts { position:absolute; bottom:10px; right:12px; font-family:var(--font-mono); font-size:11px; color:rgba(255,255,255,.8); }
.cam-label { position:absolute; bottom:10px; left:12px; font-family:var(--font-mono); font-size:11px; color:rgba(255,255,255,.8); text-transform:uppercase; letter-spacing:1px; }

/* ═══ NOTIFICATIONS & ALERTS ═══ */
.nb-badge { display:inline-block; min-width:16px; height:16px; line-height:16px; text-align:center; font-size:10px; font-weight:700; background:#ef4444; color:#fff; border-radius:9px; padding:0 4px; margin-left:5px; font-family:var(--font-mono); }
.notif-row { display:flex; gap:12px; padding:14px 16px; border-bottom:1px solid var(--border-color); align-items:flex-start; }
.notif-row:hover { background:rgba(255,255,255,.02); }
.notif-ico { width:34px; height:34px; border-radius:10px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:16px; }
.notif-title { font-size:14px; font-weight:700; color:var(--text-primary); }
.notif-msg { font-size:12px; color:var(--text-secondary); margin-top:3px; line-height:1.45; }
.notif-time { font-size:11px; color:var(--text-muted); font-family:var(--font-mono); white-space:nowrap; }
.notif-cat { font-size:9px; font-weight:700; font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.5px; padding:2px 7px; border-radius:20px; margin-top:6px; display:inline-block; }

/* editable status control in driver card */
.dp-terminated, .dp-status.dp-terminated { background:rgba(248,113,113,.16); color:#f87171; }
.dp-status-edit { position:relative; display:inline-flex; align-items:center; gap:4px; padding:3px 9px 3px 11px; border-radius:20px; font-family:var(--font-mono); font-size:11px; font-weight:700; cursor:pointer; transition:filter .15s; }
.dp-status-edit:hover { filter:brightness(1.2); }
.dp-status-edit select { appearance:none; -webkit-appearance:none; background:transparent; border:none; color:inherit; font:inherit; font-weight:700; cursor:pointer; padding-right:2px; outline:none; }
.dp-status-edit select option { background:#0f172a; color:#e2e8f0; }
.dp-status-edit svg { opacity:.7; pointer-events:none; }
