:root {
  --blue: #2f3541;
  --blue-dark: #1f232b;
  --blue-light: #eef1f5;
  --text: #1f2937;
  --muted: #6b7280;
  --bg: #f6f8fb;
  --white: #ffffff;
  --border: #e5e7eb;
  --gold: #f7b731;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  background: var(--blue-dark);
  color: var(--white);
  font-size: 12px;
  padding: 8px 0;
}

.topbar .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar .left,
.topbar .right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header {
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--blue);
}

.logo img {
  height: 38px;
  width: auto;
}

.menu {
  display: flex;
  gap: 18px;
  font-weight: 500;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--white);
  color: #1e2f4f;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.menu a:hover {
  color: var(--blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.carousel {
  position: relative;
  overflow: hidden;
  object-fit: contain;
  background: #000;
}

.carousel-track {
  display: flex;
  width: 100%;
  animation: slide 12s infinite;
}

.carousel-slide {
  width: 100%;
  flex: 0 0 100%;
}

.carousel-slide img {
  width: 100%;
  height: 400px;
  max-height: 80vh;
  object-fit: cover;
  background: transparent;
  display: block;
}

@keyframes slide {
  0%, 30% { transform: translateX(0%); }
  33%, 63% { transform: translateX(-100%); }
  66%, 96% { transform: translateX(-200%); }
  100% { transform: translateX(0%); }
}

@media (max-width: 980px) {
  .carousel-slide img {
    height: 260px;
  }
}

.hero {
  background: linear-gradient(120deg, rgba(249, 251, 255, 0.88) 0%, rgba(238, 244, 255, 0.9) 100%), url("images/banner1.png");
  background-size: cover;
  background-position: center;
  padding: 50px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  align-items: center;
}

.hero h1 {
  font-size: 38px;
  line-height: 1.2;
  margin-bottom: 12px;
  color: #0a67c8;
}

.hero p {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 15px;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  background: #dc2626;
  color: var(--white);
  padding: 12px 22px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.secondary {
  background: var(--white);
  border: 1px solid #dc2626;
  color: #dc2626;
}

.slider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.slider-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 8px;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.1);
}

.slider-card h4 {
  font-size: 16px;
}

.slider-card span {
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 36px;
}

.section-title h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #0a67c8;
}

.section-title p {
  color: var(--muted);
  font-size: 14px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.product-card .info {
  padding: 16px;
}

.product-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #0a67c8;
}

.product-card p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: grid;
  gap: 8px;
}

.feature-card h4 {
  font-size: 16px;
  color: #0a67c8;
}

.feature-card p {
  color: var(--muted);
  font-size: 13px;
}

.faq-title h2 {
  color: #e11d2e;
  font-weight: 700;
  letter-spacing: 1px;
}

.faq-list {
  display: grid;
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border: 1.5px solid #1b3c7a;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 18px 30px rgba(16, 32, 70, 0.06);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 26px;
  font-size: 18px;
  font-weight: 600;
  color: #0f2d66;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] summary {
  color: #e11d2e;
}

.faq-icon {
  font-size: 18px;
  color: #0f2d66;
  transition: transform 0.2s ease, color 0.2s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  color: #0f2d66;
}

.faq-body {
  padding: 0 26px 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.cta-strip {
  background: var(--blue);
  color: var(--white);
  border-radius: 14px;
  padding: 30px;
  display: grid;
  gap: 12px;
}

.cta-strip p {
  opacity: 0.9;
  font-size: 14px;
}

.login-section {
  padding-top: 40px;
}

.login-container {
  display: flex;
  justify-content: center;
}

.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 18px 30px rgba(16, 32, 70, 0.08);
  border: 1px solid var(--border);
}

.login-card h2 {
  margin-bottom: 8px;
  color: #0a67c8;
}

.login-card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.login-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.login-form input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
}

.login-form input:focus {
  outline: none;
  border-color: #0a67c8;
  box-shadow: 0 0 0 3px rgba(10, 103, 200, 0.12);
}

.dashboard {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: calc(100vh - 140px);
  background: #f5f7fb;
}

.dashboard-sidebar {
  padding: 24px 22px;
  background: #f4f6fb;
  border-right: 1px solid var(--border);
  display: grid;
  gap: 18px;
}

.dashboard-profile {
  background: var(--white);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
}

.dashboard-profile h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.dashboard-profile span {
  font-size: 12px;
  color: var(--muted);
}

.status-pill {
  background: #e6f9ee;
  color: #168a4c;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  font-size: 18px;
  color: #1e2f4f;
}

.vehicle-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 16px 18px;
  display: grid;
  gap: 12px;
}

.vehicle-head h4 {
  margin-bottom: 4px;
}

.vehicle-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
}

.vehicle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #1e2f4f;
}

.tag {
  background: #e7f0ff;
  color: #1d4ed8;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
}

.timeline-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 16px 18px;
  display: grid;
  gap: 14px;
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

.timeline-head h4 {
  color: #0a67c8;
  font-size: 15px;
}

.event-list {
  display: grid;
  gap: 14px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.event {
  display: flex;
  gap: 12px;
}

.trip-item {
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.trip-item:hover {
  background: #f6f9ff;
  border-color: #d8e4ff;
}

.trip-item:focus {
  outline: none;
  border-color: #6ea8ff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.trip-item.active-trip {
  background: #edf4ff;
  border-color: #93c5fd;
  box-shadow: 0 8px 18px rgba(42, 75, 255, 0.08);
}

.event h5 {
  font-size: 14px;
  margin-bottom: 4px;
  color: #1c2f4f;
}

.event p {
  font-size: 12px;
  color: var(--muted);
}

.event .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex: 0 0 10px;
}

.dot.blue {
  background: #2a4bff;
}

.pill-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.pill {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
}

.pill.green {
  background: #22c55e;
}

.pill.blue {
  background: #2a4bff;
}

.empty-state {
  color: var(--muted);
  font-size: 13px;
}

.trip-details {
  border-top: 1px dashed #d6deea;
  margin-top: 4px;
  padding-top: 12px;
  display: grid;
  gap: 8px;
}

.trip-details h5 {
  font-size: 14px;
  color: #0a67c8;
}

.trip-detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.trip-detail-row span {
  color: var(--muted);
}

.trip-detail-row strong {
  color: #1e2f4f;
  font-weight: 600;
  text-align: right;
}

.dashboard-map {
  position: relative;
  min-height: 600px;
}

#fleet-map {
  width: 100%;
  height: 100%;
  min-height: 600px;
}

.map-fallback {
  width: 100%;
  height: 100%;
  min-height: 600px;
  background: url("images/banner1.png") center/cover no-repeat;
  border-radius: 0;
  position: relative;
}

.map-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 19, 42, 0.12);
}

.map-fallback-badge {
  position: absolute;
  right: 20px;
  top: 20px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #1e2f4f;
  border-radius: 10px;
  font-size: 12px;
  z-index: 1;
}

.map-controls {
  position: absolute;
  right: 20px;
  top: 20px;
  display: grid;
  gap: 8px;
}

.control-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: var(--white);
  box-shadow: 0 10px 20px rgba(16, 32, 70, 0.12);
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 980px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-map {
    min-height: 420px;
  }

  #fleet-map {
    min-height: 420px;
  }

  .map-fallback {
    min-height: 420px;
  }
}

.footer {
  background: #0b1f3a;
  color: var(--white);
  padding: 40px 0 20px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.footer h4 {
  font-size: 15px;
  margin-bottom: 12px;
}

.footer ul {
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: #cbd5f1;
}

.footer .bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
  font-size: 12px;
  color: #cbd5f1;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 980px) {
  .hero-grid,
  .feature-row,
  .product-grid {
    grid-template-columns: 1fr;
  }
  .slider-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    display: none;
  }
  .header .nav {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
  }
  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
  }
  .nav.menu-open .menu {
    display: flex;
  }
  .menu a {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
  }
  .header-actions {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
