/* ==========================================================================
   CarHub Kenya — Modern Mobile-First SaaS Design System
   ========================================================================== */

:root {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-dark: #0f172a;
  --bg-dark-elevated: #1e293b;
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --accent: #0284c7;
  --accent-light: #e0f2fe;
  --amber: #d97706;
  --amber-light: #fef3c7;
  --rose: #e11d48;
  --rose-light: #ffe4e6;
  --border: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 35px -8px rgba(15, 23, 42, 0.14);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 clamp(1.5rem, 3.2vw, 3.5rem);
  }
}

.section {
  padding: 3.25rem 0;
}

.section-sm {
  padding: 2rem 0;
}

.bg-white { background-color: var(--bg-surface); }
.bg-slate { background-color: #f1f5f9; }
.bg-dark { background-color: var(--bg-dark); color: #f8fafc; }

/* Typography */
h1, h2, h3, h4, h5 {
  margin-top: 0;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.display-title {
  font-size: clamp(1.85rem, 4vw, 3.1rem);
  font-weight: 800;
}

.section-title {
  font-size: clamp(1.45rem, 2.8vw, 2.15rem);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.02rem;
  max-width: 680px;
  margin-bottom: 2rem;
}

/* Top Emergency & Trust Bar */
.top-bar {
  background: #090d16;
  color: #cbd5e1;
  font-size: 0.82rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.top-bar-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.top-bar a:hover {
  color: #34d399;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--bg-dark);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #059669, #0284c7);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.35rem;
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--text-secondary);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.65rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-user-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.nav-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #0284c7);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
}

.nav-role-badge {
  font-size: 0.68rem;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}

.mobile-drawer {
  display: none;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 1rem;
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer a {
  display: block;
  padding: 0.65rem 0.5rem;
  font-weight: 600;
  border-bottom: 1px solid #f1f5f9;
}

@media (min-width: 960px) {
  .nav-links {
    display: flex;
  }
  .mobile-menu-btn {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  line-height: 1.25;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.9rem 1.65rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.22);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-whatsapp {
  background: #16a34a;
  color: #ffffff;
}

.btn-whatsapp:hover {
  background: #15803d;
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--bg-dark);
  color: #ffffff;
}

.btn-dark:hover {
  background: var(--bg-dark-elevated);
}

.btn-outline {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-danger {
  background: var(--rose);
  color: #ffffff;
}

/* Hero Section & Animated Car Showcase Background */
.hero-section,
.page-hero {
  background: #060a12;
  color: #ffffff;
  padding: 3.25rem 0 4rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.page-hero {
  padding: 2.85rem 0 3.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-section > .container,
.page-hero > .container {
  position: relative;
  z-index: 2;
}

.hero-bg-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  background: #060a12;
}

.hero-bg-slides {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.5s cubic-bezier(0.22, 1, 0.36, 1), visibility 1.5s;
  will-change: opacity, transform;
}

.hero-bg-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  filter: saturate(1.12) contrast(1.06) brightness(0.88);
  transform: scale(1.02) translate3d(0, 0, 0);
  will-change: transform;
}

.hero-bg-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-bg-slide.active:nth-child(odd) img {
  animation: heroKenBurnsOdd 7.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-bg-slide.active:nth-child(even) img {
  animation: heroKenBurnsEven 7.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes heroKenBurnsOdd {
  0% {
    transform: scale(1.02) translate3d(0%, 0%, 0);
  }
  100% {
    transform: scale(1.13) translate3d(-1.8%, -1.2%, 0);
  }
}

@keyframes heroKenBurnsEven {
  0% {
    transform: scale(1.12) translate3d(-1.5%, 1%, 0);
  }
  100% {
    transform: scale(1.03) translate3d(1.2%, -0.8%, 0);
  }
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      102deg,
      rgba(6, 10, 18, 0.92) 0%,
      rgba(9, 14, 26, 0.82) 42%,
      rgba(15, 23, 42, 0.56) 74%,
      rgba(6, 10, 18, 0.72) 100%
    ),
    linear-gradient(
      180deg,
      rgba(6, 10, 18, 0.55) 0%,
      rgba(6, 10, 18, 0.12) 45%,
      rgba(6, 10, 18, 0.84) 100%
    );
}

.hero-bg-glow {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 82% 28%, rgba(16, 185, 129, 0.24), transparent 48%),
    radial-gradient(circle at 18% 80%, rgba(14, 165, 233, 0.16), transparent 45%);
  mix-blend-mode: screen;
}

.hero-bg-hud {
  position: absolute;
  bottom: 0.75rem;
  right: clamp(1rem, 3.2vw, 3.5rem);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: rgba(9, 13, 22, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.72rem;
  color: #e2e8f0;
  pointer-events: auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.hero-hud-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: heroHudPulse 2s infinite;
}

@keyframes heroHudPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.25); }
}

.hero-hud-label {
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.hero-hud-tag {
  color: #34d399;
  font-weight: 600;
  padding-left: 0.45rem;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-hud-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 0.25rem;
}

.hero-hud-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-hud-dot:hover {
  background: rgba(255, 255, 255, 0.85);
}

.hero-hud-dot.active {
  width: 18px;
  background: #10b981;
}

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

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-bottom: 1rem;
}

.search-panel {
  background: #ffffff;
  color: var(--text-main);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

/* Grid Systems */
.grid-2, .grid-3, .grid-4, .vehicle-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .vehicle-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3, .vehicle-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1600px) {
  .vehicle-grid { grid-template-columns: repeat(4, 1fr); }
}

.sidebar-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: start;
}

@media (min-width: 992px) {
  .sidebar-layout {
    grid-template-columns: 300px 1fr;
  }
  .detail-layout {
    grid-template-columns: 1.45fr 1fr;
  }
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 992px) {
  .detail-layout {
    grid-template-columns: 1.4fr 1fr;
  }
}

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-body {
  padding: 1.35rem;
}

.vehicle-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.vehicle-card-media {
  position: relative;
  background: linear-gradient(145deg, #090d16, #0f172a);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vehicle-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}

/* ==========================================================================
   Vehicle Multi-Image Auto-Scroll Carousel Engine
   ========================================================================== */
.vehicle-media-carousel {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at center, #1e293b 0%, #090d16 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-track-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
}

.carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.45s ease;
  pointer-events: none;
}

.vehicle-card:hover .carousel-slide.active img,
.vehicle-showroom-card:hover .carousel-slide.active img {
  transform: scale(1.04);
}

/* Dots navigation indicator */
.carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 5;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: auto;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.2);
}

.carousel-dot.active {
  width: 18px;
  border-radius: 4px;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Mini side controls on hover */
.carousel-prev-btn,
.carousel-next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease, transform 0.2s ease;
  padding: 0;
  font-size: 0.8rem;
}

.carousel-prev-btn { left: 8px; }
.carousel-next-btn { right: 8px; }

.vehicle-card:hover .carousel-prev-btn,
.vehicle-card:hover .carousel-next-btn,
.vehicle-showroom-card:hover .carousel-prev-btn,
.vehicle-showroom-card:hover .carousel-next-btn {
  opacity: 1;
}

.carousel-prev-btn:hover,
.carousel-next-btn:hover {
  background: #059669;
  transform: translateY(-50%) scale(1.1);
}

.category-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -6px rgba(0, 0, 0, 0.12) !important;
  border-color: var(--primary) !important;
}

.category-card:hover .category-card-media img {
  transform: scale(1.06);
}

.category-card:hover .cat-arrow {
  transform: translateX(4px);
}


/* ==========================================================================
   Semantic Breadcrumb Navigation (SEO & UX)
   ========================================================================== */
.breadcrumb-nav {
  background: #0b1120;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.65rem 0;
  font-size: 0.82rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.breadcrumb .separator {
  color: #64748b;
  font-size: 0.85rem;
  user-select: none;
}

.breadcrumb .active {
  color: #f1f5f9;
  font-weight: 600;
}

.vehicle-card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.vehicle-card-badges .badge {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.spec-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.85rem 0;
}

.spec-pill {
  background: #f1f5f9;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
}

.price-tag {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--bg-dark);
}

.price-tag small {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.68rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge-emerald { background: #d1fae5; color: #065f46; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-blue { background: #e0f2fe; color: #075985; }
.badge-rose { background: #ffe4e6; color: #9f1239; }
.badge-purple { background: #ede9fe; color: #6b21a8; }
.badge-slate { background: #e2e8f0; color: #334155; }

/* Forms & Inputs */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.93rem;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .form-row-2 { grid-template-columns: repeat(2, 1fr); }
  .form-row-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.89rem;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tr:hover td {
  background-color: #f8fafc;
}

/* Dashboard Shell */
.dashboard-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 68px);
}

@media (min-width: 1024px) {
  .dashboard-shell {
    grid-template-columns: 250px 1fr;
  }
}

.dashboard-sidebar {
  background: var(--bg-dark);
  color: #cbd5e1;
  padding: 1.25rem 0.85rem;
}

.dashboard-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.89rem;
  margin-bottom: 0.25rem;
}

.dashboard-nav-link:hover,
.dashboard-nav-link.active {
  background: rgba(16, 185, 129, 0.18);
  color: #ffffff;
}

.dashboard-main {
  padding: 1.5rem 1rem 3rem;
  max-width: 100%;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .dashboard-main {
    padding: 2rem;
  }
}

/* KPI Metric Cards */
.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.kpi-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--bg-dark);
  margin: 0.35rem 0;
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.kanban-column {
  min-width: 265px;
  max-width: 285px;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  padding: 0.85rem;
  flex-shrink: 0;
}

.kanban-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 0.65rem;
  box-shadow: var(--shadow-sm);
}

/* Alerts & Messages */
.alert {
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
}

.alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert-error, .alert-danger { background: #ffe4e6; color: #9f1239; border-color: #fecdd3; }
.alert-warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.alert-info { background: #e0f2fe; color: #075985; border-color: #bae6fd; }

/* Floating WhatsApp Button */
.floating-whatsapp {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #16a34a;
  color: #ffffff;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 10px 25px rgba(22, 163, 74, 0.38);
}

.floating-whatsapp:hover {
  background: #15803d;
  transform: translateY(-2px);
}

/* Footer */
.site-footer {
  background: #090d16;
  color: #94a3b8;
  padding: 3.5rem 0 2rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

.footer-title {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a:hover {
  color: #34d399;
}

/* Utilities */
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; gap: 0.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }

/* Form validation messages */
.field-error { display: block; color: #be123c; font-size: 0.8rem; font-weight: 600; margin-top: 0.3rem; }
.form-control.is-invalid { border-color: #e11d48; background: #fff1f2; }
.form-hint { display: block; color: var(--text-muted); font-size: 0.74rem; margin-top: 0.25rem; }
.alert-error ul { margin: 0.4rem 0 0 1.1rem; padding: 0; }

/* ==========================================================================
   3-Second Animated Car Loading Splash Screen & CTA Experience
   ========================================================================== */
body.ch-loader-active {
  overflow: hidden !important;
}

.ch-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 30%, #0f172a 0%, #060a12 65%, #020409 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 1.5rem;
}

.ch-loader-overlay.ch-loader-exit {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

.ch-loader-bg-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ch-loader-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 60%;
  opacity: 0;
  filter: saturate(1.15) contrast(1.08) brightness(0.42);
  transform: scale(1.06);
}

.ch-loader-bg-slide.s1 {
  animation: chSplashSlide1 3.2s ease-in-out forwards;
}

.ch-loader-bg-slide.s2 {
  animation: chSplashSlide2 3.2s ease-in-out forwards;
}

.ch-loader-bg-slide.s3 {
  animation: chSplashSlide3 3.2s ease-in-out forwards;
}

@keyframes chSplashSlide1 {
  0% { opacity: 0.75; transform: scale(1.02); }
  38% { opacity: 0.75; transform: scale(1.08); }
  52% { opacity: 0; transform: scale(1.1); }
  100% { opacity: 0; }
}

@keyframes chSplashSlide2 {
  0%, 30% { opacity: 0; transform: scale(1.02); }
  45%, 72% { opacity: 0.75; transform: scale(1.08); }
  85%, 100% { opacity: 0; transform: scale(1.1); }
}

@keyframes chSplashSlide3 {
  0%, 64% { opacity: 0; transform: scale(1.02); }
  78%, 100% { opacity: 0.8; transform: scale(1.09); }
}

.ch-loader-bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(16, 185, 129, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(4, 8, 17, 0.85) 0%, rgba(4, 8, 17, 0.52) 45%, rgba(4, 8, 17, 0.94) 100%);
}

.ch-loader-grid-floor {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -15%;
  height: 52%;
  background-image:
    linear-gradient(to right, rgba(56, 189, 248, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 185, 129, 0.14) 1px, transparent 1px);
  background-size: 56px 38px;
  transform: perspective(360px) rotateX(68deg);
  animation: chGridDrive 0.45s linear infinite;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 85%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 85%);
}

@keyframes chGridDrive {
  from { background-position: 0 0; }
  to { background-position: -56px 0; }
}

.ch-loader-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.15rem;
}

.ch-loader-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ch-loader-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-align: left;
}

.ch-loader-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981, #0284c7);
  color: #ffffff;
  font-weight: 900;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.ch-loader-brand-name {
  display: block;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.ch-loader-brand-sub {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #34d399;
}

.ch-loader-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #cbd5e1;
}

.ch-loader-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: heroHudPulse 1.4s infinite;
}

/* Animated Car & Highway Stage */
.ch-loader-stage {
  position: relative;
  width: 100%;
  max-width: 680px;
  height: 195px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ch-speed-lines {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ch-streak {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.85), rgba(16, 185, 129, 0.95), transparent);
  animation: chSpeedStreak 0.75s linear infinite;
}

.ch-streak.st-1 { top: 18%; width: 180px; animation-duration: 0.65s; }
.ch-streak.st-2 { top: 38%; width: 240px; animation-duration: 0.85s; animation-delay: 0.15s; }
.ch-streak.st-3 { top: 58%; width: 150px; animation-duration: 0.55s; animation-delay: 0.3s; }
.ch-streak.st-4 { top: 75%; width: 280px; animation-duration: 0.7s; animation-delay: 0.1s; }
.ch-streak.st-5 { top: 88%; width: 210px; animation-duration: 0.5s; animation-delay: 0.25s; }

@keyframes chSpeedStreak {
  0% { right: -30%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { right: 110%; opacity: 0; }
}

.ch-car-rig {
  position: relative;
  width: 100%;
  max-width: 560px;
  animation: chCarSurge 3s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes chCarSurge {
  0% { transform: translateX(-18px) translateY(0); }
  50% { transform: translateX(14px) translateY(-2px); }
  100% { transform: translateX(-18px) translateY(0); }
}

.ch-car-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.ch-car-chassis {
  animation: chSuspensionBounce 0.36s ease-in-out infinite alternate;
}

@keyframes chSuspensionBounce {
  from { transform: translateY(-1.5px); }
  to { transform: translateY(1.8px); }
}

.ch-wheel-spin {
  animation: chWheelRotate 0.28s linear infinite;
}

@keyframes chWheelRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ch-aero-path {
  animation: chAeroStream 0.65s linear infinite;
}

.ch-aero-delay {
  animation-delay: 0.25s;
}

@keyframes chAeroStream {
  from { stroke-dashoffset: 48; }
  to { stroke-dashoffset: 0; }
}

.ch-headlight-beam {
  position: absolute;
  right: -75px;
  top: 44%;
  width: 165px;
  height: 54px;
  background: linear-gradient(90deg, rgba(186, 230, 253, 0.68) 0%, rgba(56, 189, 248, 0.22) 55%, transparent 100%);
  clip-path: polygon(0 35%, 100% 0, 100% 100%, 0 65%);
  filter: blur(4px);
  animation: chBeamFlicker 1.2s ease-in-out infinite alternate;
  pointer-events: none;
}

.ch-taillight-trail {
  position: absolute;
  left: -55px;
  top: 38%;
  width: 130px;
  height: 16px;
  background: linear-gradient(270deg, rgba(244, 63, 94, 0.82), rgba(244, 63, 94, 0.18), transparent);
  filter: blur(3px);
  border-radius: 999px;
  pointer-events: none;
}

@keyframes chBeamFlicker {
  from { opacity: 0.78; transform: scaleX(0.96); }
  to { opacity: 1; transform: scaleX(1.06); }
}

.ch-road-track {
  width: 100%;
  height: 6px;
  margin-top: -6px;
  overflow: hidden;
  position: relative;
}

.ch-road-dashes {
  width: 200%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    rgba(16, 185, 129, 0.85) 0px,
    rgba(16, 185, 129, 0.85) 36px,
    transparent 36px,
    transparent 76px
  );
  animation: chRoadDashMove 0.26s linear infinite;
}

@keyframes chRoadDashMove {
  from { transform: translateX(0); }
  to { transform: translateX(-76px); }
}

/* CTA & Telemetry Card */
.ch-loader-cta-box {
  width: 100%;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}

.ch-loader-eyebrow {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.ch-loader-headline {
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 0.45rem;
  color: #ffffff;
}

.ch-text-gradient {
  background: linear-gradient(90deg, #34d399, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ch-loader-subtext {
  font-size: 0.92rem;
  color: #cbd5e1;
  max-width: 640px;
  margin: 0 auto 1.1rem;
  line-height: 1.5;
}

.ch-loader-telemetry {
  margin-bottom: 1.2rem;
  text-align: left;
}

.ch-telemetry-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
}

.ch-telemetry-status {
  color: #94a3b8;
  font-weight: 600;
}

.ch-telemetry-metrics {
  font-family: monospace;
  font-size: 0.85rem;
  color: #38bdf8;
}

.ch-telemetry-metrics strong {
  color: #34d399;
  font-size: 0.95rem;
}

.ch-telemetry-sep {
  margin: 0 0.25rem;
  color: #475569;
}

.ch-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.ch-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #059669 0%, #10b981 55%, #38bdf8 100%);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.75);
  position: relative;
}

.ch-loader-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.ch-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.82rem 1.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #059669 0%, #10b981 55%, #0284c7 100%);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ch-cta-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.62);
}

.ch-cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.78rem 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #e2e8f0;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ch-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #38bdf8;
  color: #ffffff;
}

/* Print: only the document itself. margin:0 on @page suppresses the browser's
   header/footer (page URL, date, title); spacing is supplied via body padding. */
@page { size: A4; margin: 0; }
@media print {
  .ch-loader-overlay { display: none !important; }
  html, body { background: #fff !important; }
  body { padding: 14mm 16mm !important; color: #000; }
  .top-bar, .site-header, .site-footer, .floating-whatsapp, .dashboard-sidebar,
  .alert, .no-print, button, .btn, form, nav { display: none !important; }
  .dashboard-shell { display: block !important; }
  .card { box-shadow: none !important; border: none !important; }
  .card-body { padding: 0 !important; }
  .section, .section-sm { padding: 0 !important; }
  .container { max-width: 100% !important; padding: 0 !important; }
  a[href]::after { content: none !important; }
  pre { border: 1px solid #ccc !important; background: #fff !important; page-break-inside: auto; }
  .grid-2 { page-break-inside: avoid; }
}
