/* ═══════════════════════════════════════════════════════════════
   AP3X INTELLIGENT AI ECOSYSTEM — SHOWCASE STYLESHEET
   Dark glassmorphism · Futuristic enterprise SaaS
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cyan:    #00d4ff;
  --blue:    #0066ff;
  --purple:  #7c3aed;
  --green:   #00ff88;
  --amber:   #f59e0b;
  --red:     #ef4444;
  --bg:      #030712;
  --bg2:     #060d1f;
  --bg3:     #0a1628;
  --card:    rgba(10,20,40,0.7);
  --border:  rgba(0,212,255,0.12);
  --border2: rgba(0,212,255,0.25);
  --text:    #e2e8f0;
  --muted:   #64748b;
  --mono:    'JetBrains Mono', monospace;
  --sans:    'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.3); border-radius: 3px; }

/* ── CONTAINER ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }

/* ═══════════════════════════════════════════════════════ NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(3,7,18,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}
.nav.scrolled {
  background: rgba(3,7,18,0.97);
  border-bottom-color: var(--border2);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 2rem;
  height: 64px; display: flex; align-items: center; gap: 2rem;
}
.nav-logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-hex { font-size: 1.4rem; color: var(--cyan); }
.logo-hex.large { font-size: 2rem; }
.logo-text { font-weight: 900; font-size: 1.1rem; letter-spacing: 0.1em; color: #fff; }
.logo-sub { font-size: 0.6rem; letter-spacing: 0.2em; color: var(--cyan); opacity: 0.8; align-self: flex-end; margin-bottom: 2px; }
.nav-links { display: flex; gap: 1.5rem; margin-left: auto; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.85rem;
  font-weight: 500; letter-spacing: 0.03em; transition: color 0.2s;
}
.nav-links a:hover { color: var(--cyan); }
.nav-cta { display: flex; gap: 0.5rem; }
.btn-outline-sm {
  padding: 0.4rem 1rem; border: 1px solid var(--border2);
  background: transparent; color: var(--cyan); border-radius: 6px;
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s; font-family: var(--sans);
}
.btn-outline-sm:hover { background: rgba(0,212,255,0.1); }
.btn-primary-sm {
  padding: 0.4rem 1rem; border: 1px solid var(--cyan);
  background: var(--cyan); color: var(--bg); border-radius: 6px;
  font-size: 0.8rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s; font-family: var(--sans);
}
.btn-primary-sm:hover { background: #00b8d9; }

@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* ═══════════════════════════════════════════════════════ HERO */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding-top: 64px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
#networkCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-glow-1 {
  position: absolute; top: -20%; left: -10%; width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(0,102,255,0.15) 0%, transparent 70%);
  animation: pulse-glow 4s ease-in-out infinite;
}
.hero-glow-2 {
  position: absolute; bottom: -20%; right: -10%; width: 50%; height: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.1) 0%, transparent 70%);
  animation: pulse-glow 4s ease-in-out infinite reverse;
}
.hero-scanline {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.6), transparent);
  animation: scanline 8s linear infinite;
}
@keyframes scanline {
  0% { top: 0; opacity: 1; }
  90% { opacity: 0.5; }
  100% { top: 100%; opacity: 0; }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 900px; text-align: center;
  padding: 4rem 2rem; margin: 0 auto;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1rem; border: 1px solid rgba(0,212,255,0.3);
  background: rgba(0,212,255,0.08); border-radius: 20px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em;
  color: var(--cyan); margin-bottom: 2rem;
  font-family: var(--mono);
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900; line-height: 1.1;
  letter-spacing: -0.02em; margin-bottom: 1.5rem;
  color: #fff;
}
.title-gradient {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem; color: #94a3b8; max-width: 680px;
  margin: 0 auto 2.5rem; line-height: 1.7;
}
.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 2rem; margin-bottom: 2.5rem; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.stat-num {
  display: block; font-size: 2.2rem; font-weight: 900;
  color: var(--cyan); line-height: 1;
  font-family: var(--mono);
}
.stat-pct { font-size: 1.5rem; font-weight: 900; color: var(--cyan); }
.stat-label { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.1em; font-weight: 500; }
.hero-stat-divider { width: 1px; height: 40px; background: var(--border); }

.hero-ctas {
  display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap;
}
.cta-primary, .cta-secondary, .cta-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: 8px;
  font-size: 0.85rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s; font-family: var(--sans); letter-spacing: 0.02em;
  text-decoration: none; border: none;
}
.cta-primary svg, .cta-secondary svg, .cta-ghost svg { width: 16px; height: 16px; }
.cta-primary {
  background: var(--cyan); color: var(--bg);
  box-shadow: 0 0 20px rgba(0,212,255,0.3);
}
.cta-primary:hover { background: #00b8d9; box-shadow: 0 0 30px rgba(0,212,255,0.5); transform: translateY(-1px); }
.cta-secondary {
  background: rgba(0,102,255,0.15); color: var(--cyan);
  border: 1px solid rgba(0,102,255,0.4);
}
.cta-secondary:hover { background: rgba(0,102,255,0.25); transform: translateY(-1px); }
.cta-ghost {
  background: rgba(255,255,255,0.05); color: var(--text);
  border: 1px solid var(--border);
}
.cta-ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--border2); transform: translateY(-1px); }

/* HUD cards */
.hero-hud {
  position: absolute; right: 2rem; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 0.75rem;
  z-index: 2;
}
.hud-card {
  background: rgba(0,10,30,0.8); border: 1px solid var(--border2);
  border-radius: 8px; padding: 0.75rem 1rem; width: 160px;
  backdrop-filter: blur(12px);
  animation: slideInRight 0.8s ease backwards;
}
.hud-card-1 { animation-delay: 0.3s; }
.hud-card-2 { animation-delay: 0.5s; }
.hud-card-3 { animation-delay: 0.7s; }
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
.hud-label { font-size: 0.6rem; letter-spacing: 0.15em; color: var(--cyan); opacity: 0.7; margin-bottom: 4px; font-family: var(--mono); }
.hud-value { font-size: 1.5rem; font-weight: 900; color: #fff; font-family: var(--mono); }
.hud-mono { font-size: 0.9rem; color: var(--green); }
.hud-bar { height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 6px; }
.hud-bar-fill { height: 100%; background: var(--cyan); border-radius: 2px; }
.hud-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  margin-top: 4px; box-shadow: 0 0 10px var(--green);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform:scale(1); opacity:1; } 50% { transform:scale(1.3); opacity:0.6; } }
.hud-dot-row { display: flex; gap: 4px; margin-top: 6px; }
.hud-dot { width: 8px; height: 8px; border-radius: 50%; }
.hud-dot.green { background: var(--green); }
.hud-dot.amber { background: var(--amber); }

.scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  z-index: 2; opacity: 0.5;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  animation: scroll-anim 2s ease-in-out infinite;
}
@keyframes scroll-anim { 0%,100% { opacity:1; height:40px; } 50% { opacity:0.3; height:20px; } }
.scroll-indicator span { font-size: 0.6rem; letter-spacing: 0.2em; color: var(--muted); font-family: var(--mono); }

@media (max-width: 1024px) { .hero-hud { display: none; } }

/* ═══════════════════════════════════════════════════ SECTIONS COMMON */
section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
  display: inline-block; padding: 0.3rem 0.75rem;
  border: 1px solid rgba(0,212,255,0.25); border-radius: 20px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.2em;
  color: var(--cyan); margin-bottom: 1rem; font-family: var(--mono);
  background: rgba(0,212,255,0.06);
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800;
  letter-spacing: -0.02em; color: #fff; margin-bottom: 0.75rem;
}
.section-header p { color: var(--muted); font-size: 1rem; max-width: 560px; margin: 0 auto; }

/* ═══════════════════════════════════════════════════ ECOSYSTEM */
.ecosystem { background: var(--bg2); }
.ecosystem-diagram { display: flex; flex-direction: column; gap: 0; align-items: center; }

.layer {
  width: 100%; max-width: 800px;
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 16px; padding: 2rem;
  cursor: pointer; transition: all 0.3s ease;
  position: relative; overflow: hidden;
}
.layer::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,212,255,0.03), transparent);
  pointer-events: none;
}
.layer:hover { border-color: var(--cyan); transform: scale(1.01); box-shadow: 0 0 40px rgba(0,212,255,0.1); }
.layer-1 { border-top: 2px solid var(--cyan); }
.layer-2 { border-top: 2px solid var(--blue); }
.layer-3 { border-top: 2px solid var(--purple); }

.layer-badge {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em;
  color: var(--cyan); font-family: var(--mono); margin-bottom: 1rem; opacity: 0.8;
}
.layer-2 .layer-badge { color: #6699ff; }
.layer-3 .layer-badge { color: #a78bfa; }

.layer-icon { width: 40px; height: 40px; margin-bottom: 1rem; color: var(--cyan); }
.layer-2 .layer-icon { color: #6699ff; }
.layer-3 .layer-icon { color: #a78bfa; }
.layer-icon svg { width: 100%; height: 100%; }

.layer h3 { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 0.75rem; }
.layer p { color: #94a3b8; font-size: 0.9rem; line-height: 1.6; margin-bottom: 1rem; }
.layer-features {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem;
}
.layer-features span {
  padding: 0.2rem 0.6rem; background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.15); border-radius: 12px;
  font-size: 0.75rem; color: var(--cyan); font-weight: 500;
}
.layer-2 .layer-features span { background: rgba(0,102,255,0.08); border-color: rgba(0,102,255,0.2); color: #6699ff; }
.layer-3 .layer-features span { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.2); color: #a78bfa; }
.layer-stack { font-size: 0.75rem; color: var(--muted); font-family: var(--mono); margin-bottom: 0.75rem; }
.layer-cta { font-size: 0.8rem; font-weight: 700; color: var(--cyan); }
.layer-2 .layer-cta { color: #6699ff; }
.layer-3 .layer-cta { color: #a78bfa; }

.layer-connector {
  width: 100%; max-width: 800px;
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; padding: 1rem 0;
}
.connector-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border2), transparent); }
.connector-nodes { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.c-node {
  padding: 0.25rem 0.75rem; background: rgba(0,212,255,0.06);
  border: 1px solid var(--border2); border-radius: 12px;
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em;
  color: var(--muted); font-family: var(--mono);
}

/* ═══════════════════════════════════════════════════ DEMOS */
.demos { background: var(--bg3); }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 1.5rem; }

.demo-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; cursor: pointer;
  transition: all 0.3s ease;
}
.demo-card:hover { border-color: var(--border2); transform: translateY(-4px); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.demo-card-control:hover { box-shadow: 0 20px 60px rgba(0,212,255,0.15); }
.demo-card-fleet:hover { box-shadow: 0 20px 60px rgba(0,102,255,0.15); }
.demo-card-driver:hover { box-shadow: 0 20px 60px rgba(124,58,237,0.15); }

.demo-card-header {
  padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.demo-live-badge {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em;
  color: var(--green); font-family: var(--mono);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  animation: blink 1.5s ease-in-out infinite;
}
.live-dot.small { width: 5px; height: 5px; }
.demo-platform { font-size: 0.8rem; font-weight: 700; color: #fff; }
.demo-screen { padding: 1rem; background: rgba(0,0,0,0.3); }
.demo-card-footer {
  padding: 0.75rem 1.25rem; display: flex; justify-content: space-between; align-items: center;
}
.demo-card-footer span:first-child { font-size: 0.8rem; color: var(--muted); }
.demo-launch { font-size: 0.8rem; font-weight: 700; color: var(--cyan); }

/* Mock screens */
.mock-screen {
  border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(0,212,255,0.15);
  font-family: var(--mono); font-size: 0.7rem;
  background: #020912;
}
.ms-topbar {
  padding: 0.5rem 0.75rem; background: rgba(0,20,50,0.9);
  border-bottom: 1px solid rgba(0,212,255,0.12);
  display: flex; justify-content: space-between; align-items: center;
}
.ms-logo { color: var(--cyan); font-weight: 700; font-size: 0.65rem; letter-spacing: 0.1em; }
.ms-statusrow { display: flex; align-items: center; gap: 0.3rem; }
.ms-dot { width: 6px; height: 6px; border-radius: 50%; }
.ms-dot.green { background: var(--green); }
.ms-dot.amber { background: var(--amber); }
.ms-status { font-size: 0.6rem; color: var(--muted); letter-spacing: 0.05em; }
.ms-body { display: flex; height: 200px; }
.ms-sidebar {
  width: 110px; background: rgba(0,10,25,0.8);
  border-right: 1px solid rgba(0,212,255,0.1);
  padding: 0.5rem 0;
}
.ms-nav-item {
  padding: 0.35rem 0.6rem; font-size: 0.6rem; color: #4a5568;
  cursor: default; transition: all 0.1s;
}
.ms-nav-item.active { color: var(--cyan); background: rgba(0,212,255,0.08); }
.ms-main { flex: 1; padding: 0.5rem; overflow: hidden; }
.ms-metric-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.25rem; margin-bottom: 0.5rem; }
.ms-metric { background: rgba(0,20,40,0.8); border: 1px solid rgba(0,212,255,0.08); border-radius: 4px; padding: 0.25rem; text-align: center; }
.ms-m-val { font-size: 0.75rem; font-weight: 700; color: #fff; }
.ms-m-val.green { color: var(--green); }
.ms-m-val.amber { color: var(--amber); }
.ms-m-label { font-size: 0.5rem; color: #4a5568; }
.ms-chart-area { background: rgba(0,10,20,0.6); border: 1px solid rgba(0,212,255,0.08); border-radius: 4px; padding: 0.4rem; margin-bottom: 0.4rem; }
.ms-chart-label { font-size: 0.55rem; color: var(--cyan); opacity: 0.6; margin-bottom: 4px; letter-spacing: 0.1em; }
.ms-telemetry-stream { height: 30px; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.telemetry-line { font-size: 0.5rem; color: rgba(0,212,255,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-fleet-nodes { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.ms-node { font-size: 0.55rem; padding: 0.15rem 0.4rem; border-radius: 3px; }
.ms-node.online { background: rgba(0,255,136,0.1); color: var(--green); border: 1px solid rgba(0,255,136,0.2); }
.ms-node.degraded { background: rgba(245,158,11,0.1); color: var(--amber); border: 1px solid rgba(245,158,11,0.2); }

/* Fleet map sim */
.fleet-map-sim {
  height: 200px; background: #030b1a; position: relative;
  overflow: hidden; border-radius: 0;
}
.map-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 30px 30px;
}
.map-vehicle {
  position: absolute; font-size: 1rem; z-index: 2;
  transition: all 0.5s ease;
}
.v1 { top: 30%; left: 20%; }
.v2 { top: 50%; left: 50%; }
.v3 { top: 70%; left: 35%; }
.v4 { top: 20%; left: 65%; }
.map-route {
  position: absolute; background: rgba(0,212,255,0.3); height: 1px;
  transform-origin: left;
}
.r1 { top: 38%; left: 20%; width: 35%; transform: rotate(12deg); }
.r2 { top: 55%; left: 50%; width: 25%; transform: rotate(-8deg); }
.ai-alert-badge {
  position: absolute; bottom: 0.5rem; left: 0.5rem;
  background: rgba(0,255,136,0.12); border: 1px solid rgba(0,255,136,0.3);
  color: var(--green); font-size: 0.55rem; padding: 0.25rem 0.5rem;
  border-radius: 4px; font-weight: 600; letter-spacing: 0.05em;
  font-family: var(--mono);
}
.dispatch-panel-mini {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: rgba(0,10,30,0.9); border: 1px solid var(--border2);
  border-radius: 6px; padding: 0.4rem 0.6rem;
  font-size: 0.55rem;
}
.dp-title { color: var(--cyan); font-weight: 700; letter-spacing: 0.1em; margin-bottom: 3px; }
.dp-job { color: #fff; }
.dp-score { color: var(--green); }
.dp-driver { color: var(--muted); }

/* Phone / PWA */
.phone-frame {
  width: 160px; height: 290px; margin: 0 auto;
  background: #0a0a14; border: 2px solid rgba(124,58,237,0.3);
  border-radius: 20px; overflow: hidden; position: relative;
}
.phone-notch {
  width: 60px; height: 8px; background: #000;
  border-radius: 0 0 8px 8px;
  margin: 0 auto 4px;
}
.phone-content { padding: 0 6px 6px; }
.pwa-header { display: flex; justify-content: space-between; align-items: center; padding: 0.25rem 0; }
.pwa-logo { font-size: 0.55rem; font-weight: 800; color: var(--cyan); font-family: var(--mono); }
.pwa-status { display: flex; align-items: center; gap: 3px; font-size: 0.5rem; color: var(--green); font-family: var(--mono); }
.pwa-nav-sim { background: #05101e; border-radius: 6px; height: 120px; position: relative; overflow: hidden; margin-bottom: 6px; }
.pwa-map { position: absolute; inset: 0; }
.pwa-route-line {
  position: absolute; top: 50%; left: 10%; right: 20%;
  height: 2px; background: linear-gradient(90deg, rgba(0,212,255,0.3), var(--cyan));
  transform: translateY(-50%);
}
.pwa-car { position: absolute; top: 42%; left: 25%; font-size: 0.9rem; }
.pwa-dest { position: absolute; top: 38%; right: 15%; font-size: 0.8rem; }
.pwa-instruction {
  position: absolute; bottom: 4px; left: 4px; right: 4px;
  background: rgba(0,10,30,0.9); border-radius: 4px; padding: 3px 5px;
}
.pwa-direction { font-size: 0.55rem; color: #fff; font-weight: 600; }
.pwa-distance { font-size: 0.5rem; color: var(--cyan); }
.pwa-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; margin-bottom: 6px; }
.pwa-metric { background: rgba(0,20,40,0.8); border: 1px solid rgba(0,212,255,0.1); border-radius: 4px; padding: 3px; text-align: center; }
.pwa-m-val { font-size: 0.8rem; font-weight: 700; color: #fff; font-family: var(--mono); line-height: 1; }
.pwa-m-val.green { color: var(--green); }
.pwa-m-label { font-size: 0.45rem; color: var(--muted); }
.pwa-sentinel {
  background: rgba(0,255,136,0.06); border: 1px solid rgba(0,255,136,0.15);
  border-radius: 4px; padding: 3px 6px; display: flex; align-items: center; gap: 4px;
  font-size: 0.5rem; color: var(--green); font-family: var(--mono);
}

/* ═══════════════════════════════════════════════════ AI SYSTEMS */
.ai-systems { background: var(--bg2); }
.ai-orchestrator { margin-bottom: 3rem; }
.ai-master {
  position: relative; background: rgba(0,20,60,0.6);
  border: 1px solid rgba(0,212,255,0.3); border-radius: 16px;
  padding: 2rem; text-align: center; margin-bottom: 1.5rem;
  overflow: hidden;
}
.ai-master-glow {
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(0,212,255,0.08) 0%, transparent 70%);
  animation: pulse-glow 3s ease-in-out infinite;
}
.ai-master-icon { font-size: 2.5rem; margin-bottom: 0.5rem; position: relative; z-index: 1; }
.ai-master-label { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.2em; color: var(--cyan); margin-bottom: 0.25rem; font-family: var(--mono); position: relative; z-index: 1; }
.ai-master-sub { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.75rem; position: relative; z-index: 1; }
.ai-master-flow { font-size: 0.7rem; color: rgba(0,212,255,0.6); font-family: var(--mono); line-height: 1.8; position: relative; z-index: 1; }

.ai-modules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.ai-module {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem;
  transition: all 0.3s ease; cursor: default;
}
.ai-module:hover { border-color: var(--border2); transform: translateY(-2px); }
.ai-module.dispatch-engine { border-color: rgba(0,255,136,0.2); }
.aim-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.aim-name { font-size: 0.95rem; font-weight: 800; color: #fff; margin-bottom: 0.15rem; }
.aim-role { font-size: 0.7rem; color: var(--cyan); font-weight: 600; letter-spacing: 0.05em; margin-bottom: 0.5rem; font-family: var(--mono); }
.aim-desc { font-size: 0.8rem; color: #94a3b8; line-height: 1.55; margin-bottom: 0.75rem; }
.aim-metrics { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.aim-metrics span {
  padding: 0.15rem 0.5rem; background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.12); border-radius: 10px;
  font-size: 0.65rem; color: var(--muted);
}

.ai-feed-section { background: rgba(0,10,25,0.8); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.ai-feed-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.feed-title { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; color: var(--cyan); font-family: var(--mono); }
.feed-counter { font-size: 0.7rem; color: var(--muted); font-family: var(--mono); }
.ai-feed { display: flex; flex-direction: column; gap: 0.4rem; max-height: 200px; overflow: hidden; }
.feed-entry {
  display: flex; gap: 0.75rem; align-items: baseline;
  font-size: 0.72rem; font-family: var(--mono);
  animation: feedIn 0.3s ease;
}
@keyframes feedIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
.feed-time { color: var(--muted); min-width: 60px; }
.feed-module { min-width: 90px; font-weight: 600; }
.feed-module.sentinel { color: #00ff88; }
.feed-module.routemind { color: var(--cyan); }
.feed-module.predict { color: #a78bfa; }
.feed-module.dispatch { color: var(--amber); }
.feed-module.compliance { color: #f87171; }
.feed-module.efficiency { color: #60a5fa; }
.feed-msg { color: #94a3b8; }

/* ═══════════════════════════════════════════════════ ARCHITECTURE */
.architecture { background: var(--bg3); }
.arch-diagram { max-width: 900px; margin: 0 auto 3rem; }
.arch-layer { margin-bottom: 0; }
.arch-layer-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.2em; color: var(--muted); font-family: var(--mono); margin-bottom: 0.75rem; text-align: center; }
.arch-boxes { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.arch-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem; text-align: center; min-width: 160px;
  flex: 1; max-width: 250px;
}
.arch-box.ai-box { border-color: rgba(0,212,255,0.2); background: rgba(0,20,60,0.5); }
.arch-box.data-box { border-color: rgba(124,58,237,0.2); background: rgba(30,0,60,0.3); }
.ab-icon { font-size: 1.5rem; margin-bottom: 0.4rem; }
.ab-name { font-size: 0.85rem; font-weight: 700; color: #fff; margin-bottom: 0.25rem; }
.ab-tech { font-size: 0.65rem; color: var(--muted); font-family: var(--mono); }

.arch-arrows { text-align: center; padding: 1rem 0; }
.arch-arrow {
  width: 2px; height: 30px; background: linear-gradient(to bottom, var(--border2), transparent);
  margin: 0 auto 0.4rem;
}
.arch-arrow-label { font-size: 0.65rem; color: var(--muted); font-family: var(--mono); letter-spacing: 0.05em; }

.tech-stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.ts-category { }
.ts-cat-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; color: var(--cyan); margin-bottom: 0.75rem; font-family: var(--mono); }
.ts-items { display: flex; flex-direction: column; gap: 0.35rem; }
.ts-item {
  padding: 0.3rem 0.6rem; background: rgba(0,212,255,0.05);
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.78rem; color: #94a3b8; transition: all 0.2s;
}
.ts-item:hover { border-color: var(--border2); color: var(--text); }

/* ═══════════════════════════════════════════════════ WORKFLOW */
.workflow { background: var(--bg2); }
.workflow-flow {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  justify-content: center; align-items: flex-start;
}
.wf-step {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem; flex: 1; min-width: 150px; max-width: 200px;
  text-align: center;
}
.wf-num { font-size: 0.65rem; font-weight: 700; color: var(--cyan); font-family: var(--mono); letter-spacing: 0.15em; margin-bottom: 0.5rem; }
.wf-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.wf-title { font-size: 0.85rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.wf-desc { font-size: 0.72rem; color: #64748b; line-height: 1.5; }
.wf-arrow { font-size: 1.5rem; color: var(--border2); align-self: center; margin-top: -1rem; }
@media (max-width: 768px) { .wf-arrow { display: none; } }

/* ═══════════════════════════════════════════════════ SECURITY */
.security { background: var(--bg3); }
.security-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.sec-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem;
  transition: all 0.3s;
}
.sec-card:hover { border-color: var(--border2); }
.sec-icon { font-size: 1.8rem; margin-bottom: 0.75rem; }
.sec-card h4 { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.sec-card p { font-size: 0.82rem; color: #64748b; line-height: 1.6; }

/* ═══════════════════════════════════════════════════ MODULAR */
.modular { background: var(--bg2); }
.vertical-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.vertical-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem;
  transition: all 0.3s; cursor: default;
}
.vertical-card:hover { transform: translateY(-3px); }
.vertical-card[data-color="cyan"]:hover { border-color: var(--cyan); box-shadow: 0 8px 30px rgba(0,212,255,0.1); }
.vertical-card[data-color="blue"]:hover { border-color: var(--blue); box-shadow: 0 8px 30px rgba(0,102,255,0.1); }
.vertical-card[data-color="purple"]:hover { border-color: var(--purple); box-shadow: 0 8px 30px rgba(124,58,237,0.1); }
.vertical-card[data-color="green"]:hover { border-color: var(--green); box-shadow: 0 8px 30px rgba(0,255,136,0.1); }
.vertical-card[data-color="orange"]:hover { border-color: var(--amber); box-shadow: 0 8px 30px rgba(245,158,11,0.1); }
.vertical-card[data-color="red"]:hover { border-color: var(--red); box-shadow: 0 8px 30px rgba(239,68,68,0.1); }
.vc-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.vc-name { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 0.4rem; }
.vc-desc { font-size: 0.78rem; color: #64748b; line-height: 1.5; }

/* ═══════════════════════════════════════════════════ ROADMAP */
.roadmap { background: var(--bg3); }
.roadmap-timeline { display: flex; gap: 0; flex-wrap: wrap; justify-content: center; }
.rm-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem; flex: 1; min-width: 200px; max-width: 280px;
}
.rm-item.rm-current { border-color: rgba(0,212,255,0.3); background: rgba(0,20,60,0.4); }
.rm-connector { width: 30px; height: 2px; background: var(--border); align-self: center; flex-shrink: 0; }
@media (max-width: 768px) { .rm-connector { display: none; } .roadmap-timeline { gap: 1rem; } }
.rm-phase { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em; color: var(--cyan); font-family: var(--mono); margin-bottom: 0.5rem; }
.rm-current .rm-phase { color: var(--green); }
.rm-title { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 0.75rem; }
.rm-items { display: flex; flex-direction: column; gap: 0.4rem; }
.rm-items span { font-size: 0.78rem; color: #64748b; }
.rm-current .rm-items span { color: #94a3b8; }

/* ═══════════════════════════════════════════════════ ENTERPRISE */
.enterprise { background: var(--bg2); }
.enterprise-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; }
.ent-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.75rem; transition: all 0.3s;
}
.ent-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.ent-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.ent-card h4 { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.ent-card p { font-size: 0.82rem; color: #64748b; line-height: 1.6; margin-bottom: 1rem; }
.ent-metric { display: inline-block; padding: 0.25rem 0.75rem; background: rgba(0,212,255,0.08); border: 1px solid rgba(0,212,255,0.2); border-radius: 20px; font-size: 0.75rem; font-weight: 700; color: var(--cyan); font-family: var(--mono); }

/* ═══════════════════════════════════════════════════ FOOTER */
.footer { background: var(--bg); border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 2rem; margin-bottom: 2rem; }
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-logo { font-size: 1rem; font-weight: 900; color: #fff; letter-spacing: 0.1em; }
.footer-tagline { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.footer-systems { display: flex; flex-direction: column; gap: 0.5rem; }
.fs-item { font-size: 0.8rem; color: var(--muted); cursor: pointer; transition: color 0.2s; }
.fs-item:hover { color: var(--cyan); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom span { font-size: 0.75rem; color: var(--muted); }
.footer-status { display: flex; align-items: center; gap: 0.4rem; }

/* ═══════════════════════════════════════════════════ MODAL */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 16px; width: 100%; max-width: 960px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-close {
  position: sticky; top: 1rem; float: right; margin: 1rem;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: none;
  color: #fff; cursor: pointer; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; z-index: 10;
}
.modal-close:hover { background: rgba(255,255,255,0.2); }

/* ═══════════════════════════════════════════════════ MODAL CONTENT */
.modal-inner { padding: 2rem; }
.modal-header { margin-bottom: 2rem; }
.modal-badge {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em;
  color: var(--cyan); font-family: var(--mono); margin-bottom: 0.5rem;
}
.modal-title { font-size: 1.8rem; font-weight: 900; color: #fff; margin-bottom: 0.5rem; }
.modal-sub { font-size: 0.9rem; color: var(--muted); }
.modal-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.modal-tab {
  padding: 0.5rem 1rem; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--muted); font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s; font-family: var(--sans);
}
.modal-tab.active { background: rgba(0,212,255,0.1); border-color: var(--border2); color: var(--cyan); }
.modal-tab-content { display: none; }
.modal-tab-content.active { display: block; }

/* Dashboard sim */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.dash-metric {
  background: rgba(0,10,30,0.8); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem; text-align: center;
}
.dm-icon { font-size: 1.2rem; margin-bottom: 0.25rem; }
.dm-val { font-size: 1.5rem; font-weight: 900; color: var(--cyan); font-family: var(--mono); line-height: 1; }
.dm-val.green { color: var(--green); }
.dm-val.amber { color: var(--amber); }
.dm-val.red { color: var(--red); }
.dm-label { font-size: 0.65rem; color: var(--muted); margin-top: 4px; letter-spacing: 0.05em; }

.sim-section { background: rgba(0,8,20,0.6); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; margin-bottom: 1rem; }
.sim-section-title { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em; color: var(--cyan); font-family: var(--mono); margin-bottom: 1rem; }
.sim-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.sim-table th { text-align: left; padding: 0.4rem 0.6rem; color: var(--muted); font-weight: 600; font-size: 0.65rem; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.sim-table td { padding: 0.5rem 0.6rem; border-bottom: 1px solid rgba(255,255,255,0.03); color: #94a3b8; }
.sim-table tr:last-child td { border-bottom: none; }
.status-badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 10px;
  font-size: 0.65rem; font-weight: 700;
}
.status-badge.active, .status-badge.online, .status-badge.completed { background: rgba(0,255,136,0.1); color: var(--green); }
.status-badge.pending { background: rgba(245,158,11,0.1); color: var(--amber); }
.status-badge.assigned { background: rgba(0,102,255,0.1); color: #6699ff; }
.status-badge.in-progress { background: rgba(0,212,255,0.1); color: var(--cyan); }
.status-badge.maintenance { background: rgba(239,68,68,0.1); color: var(--red); }
.status-badge.degraded { background: rgba(245,158,11,0.1); color: var(--amber); }
.status-badge.idle { background: rgba(100,116,139,0.15); color: var(--muted); }

.ai-decision-panel {
  background: rgba(0,30,60,0.5); border: 1px solid rgba(0,212,255,0.2);
  border-radius: 10px; padding: 1.25rem;
}
.adp-title { font-size: 0.7rem; font-weight: 700; color: var(--cyan); font-family: var(--mono); letter-spacing: 0.15em; margin-bottom: 1rem; }
.suggestion-card {
  background: rgba(0,10,30,0.6); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.75rem; margin-bottom: 0.5rem;
  display: flex; justify-content: space-between; align-items: center;
}
.sc-rank { font-size: 0.65rem; color: var(--muted); font-family: var(--mono); width: 20px; }
.sc-driver { font-size: 0.85rem; font-weight: 600; color: #fff; }
.sc-details { font-size: 0.7rem; color: var(--muted); }
.sc-score {
  font-size: 1rem; font-weight: 900; font-family: var(--mono);
}
.score-high { color: var(--green); }
.score-mid { color: var(--cyan); }
.sc-btn {
  padding: 0.35rem 0.75rem; border-radius: 6px;
  font-size: 0.72rem; font-weight: 700; cursor: pointer;
  border: none; font-family: var(--sans);
  transition: all 0.2s;
}
.sc-btn.confirm { background: var(--green); color: #000; }
.sc-btn.confirm:hover { background: #00e07a; }
.sc-btn.override { background: rgba(255,255,255,0.08); color: var(--muted); border: 1px solid var(--border); }

/* Telemetry chart */
.tele-chart { height: 120px; position: relative; overflow: hidden; }
.tele-canvas { width: 100%; height: 100%; }

/* Federation cards */
.fed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.fed-node {
  background: rgba(0,10,30,0.8); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.75rem;
}
.fn-name { font-size: 0.85rem; font-weight: 700; color: #fff; margin-bottom: 0.25rem; }
.fn-region { font-size: 0.65rem; color: var(--muted); font-family: var(--mono); margin-bottom: 0.5rem; }
.fn-metrics { display: flex; gap: 0.75rem; }
.fn-m { font-size: 0.65rem; color: var(--muted); font-family: var(--mono); }
.fn-m span { color: var(--cyan); font-weight: 700; }

/* PWA mobile frame */
.pwa-full-demo { max-width: 380px; margin: 0 auto; }
.pwa-demo-screen {
  background: #050d1a; border: 2px solid rgba(124,58,237,0.3);
  border-radius: 20px; overflow: hidden;
}
.pwa-demo-header {
  background: rgba(0,10,25,0.9); padding: 1rem 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid rgba(124,58,237,0.2);
}
.pwa-demo-nav {
  display: flex; gap: 0; border-bottom: 1px solid rgba(124,58,237,0.1);
}
.pwa-nav-btn {
  flex: 1; padding: 0.5rem; text-align: center; font-size: 0.7rem;
  font-weight: 600; cursor: pointer; color: var(--muted);
  transition: all 0.2s; background: none; border: none; font-family: var(--sans);
  border-bottom: 2px solid transparent;
}
.pwa-nav-btn.active { color: #a78bfa; border-bottom-color: #a78bfa; }
.pwa-demo-body { padding: 1rem; min-height: 400px; }
.pwa-tab-content { display: none; }
.pwa-tab-content.active { display: block; }

.pwa-job-card {
  background: rgba(124,58,237,0.08); border: 1px solid rgba(124,58,237,0.25);
  border-radius: 10px; padding: 1rem; margin-bottom: 0.75rem;
}
.pjc-id { font-size: 0.65rem; color: #a78bfa; font-family: var(--mono); font-weight: 700; margin-bottom: 0.25rem; }
.pjc-title { font-size: 0.9rem; font-weight: 700; color: #fff; margin-bottom: 0.25rem; }
.pjc-loc { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.5rem; }
.pjc-actions { display: flex; gap: 0.5rem; }
.pjc-btn {
  flex: 1; padding: 0.4rem; border-radius: 6px; font-size: 0.75rem;
  font-weight: 600; cursor: pointer; text-align: center; border: none;
  font-family: var(--sans); transition: all 0.2s;
}
.pjc-btn.accept { background: #a78bfa; color: #fff; }
.pjc-btn.view { background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid var(--border); }

.inspection-list { display: flex; flex-direction: column; gap: 0.5rem; }
.insp-item {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,10,25,0.6); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.6rem 0.75rem; font-size: 0.8rem;
}
.insp-name { color: var(--text); }
.insp-check { font-size: 1rem; }
.insp-check.ok { color: var(--green); }
.insp-check.warn { color: var(--amber); }

.fatigue-meter {
  background: rgba(0,10,25,0.6); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem; margin-bottom: 0.75rem;
}
.fm-label { font-size: 0.65rem; color: var(--muted); font-family: var(--mono); letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.fm-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; margin-bottom: 0.25rem; }
.fm-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.fm-fill.safe { background: var(--green); }
.fm-fill.caution { background: var(--amber); }
.fm-fill.warning { background: var(--red); }
.fm-value { font-size: 0.75rem; color: var(--text); font-family: var(--mono); font-weight: 700; }

/* Animated vehicle on fleet map */
.animated { animation: drive 6s ease-in-out infinite alternate; }
.v1.animated { animation-delay: 0s; }
.v2.animated { animation-delay: -2s; }
.v4.animated { animation-delay: -4s; }
@keyframes drive {
  0% { transform: translateX(0) translateY(0); }
  33% { transform: translateX(15px) translateY(-5px); }
  66% { transform: translateX(8px) translateY(10px); }
  100% { transform: translateX(20px) translateY(3px); }
}
