:root {
  --green: #16a34a;
  --green-dark: #15803d;
  --green-light: #dcfce7;
  --green-tint: #f0fdf4;
  --dark: #0f172a;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }

/* Guard against the [hidden] attribute being overridden by component
   display rules (e.g. .form-group { display: flex }) elsewhere in this file. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.2; font-weight: 700; }
p { margin: 0 0 1em; color: var(--gray); }

.eyebrow {
  display: inline-block;
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.75em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.3);
}
.btn-primary:hover { background: var(--green-dark); box-shadow: 0 10px 26px rgba(22, 163, 74, 0.4); }

.btn-ghost {
  background: transparent;
  color: var(--dark);
  border-color: var(--gray-light);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green-dark); }

.btn-white {
  background: var(--white);
  color: var(--green-dark);
}
.btn-white:hover { background: var(--green-tint); }

.btn-lg { padding: 0.95rem 1.8rem; font-size: 1.02rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.logo-mark {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.08); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin: 0 auto;
}

.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--gray);
  font-size: 0.95rem;
  padding: 0.4rem 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-link:hover { color: var(--dark); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--dark); }
.nav-link.active::after { transform: scaleX(1); }

/* That sliding underline is designed for the horizontal desktop row --
   once .nav-link stretches to full width in a vertical dropdown list
   (mobile nav, or the staff-declutter panel), it turns into a redundant
   full-width line sitting right next to the row separator below. The
   plain text-color change on .nav-link.active/:hover is enough signal
   in a vertical list, so just drop the line there. */
.nav.open .nav-link::after { display: none; }

.header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* By default this wrapper is invisible to layout -- its links behave as
   plain direct children of .nav, exactly as before. It only becomes a
   real collapsible group in "staff" mode below. */
.nav-secondary-group { display: contents; }

/* Staff nav declutter: when an admin or driver is logged in, only their
   relevant link (Admin/Driver) stays inline in the header; everything
   else tucks into the hamburger menu -- even on desktop, where it would
   otherwise show inline. On narrow/mobile widths there's nothing extra to
   do here, since the existing mobile nav already collapses everything
   (including Admin/Driver) into one hamburger panel regardless of role. */
@media (min-width: 860px) {
  body.kg-staff-nav .nav-toggle { display: flex; }
  body.kg-staff-nav .header-cta { display: none; }

  body.kg-staff-nav .nav-secondary-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-light);
    padding: 1rem 20px 1.5rem;
    gap: 0.25rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    z-index: 45;
  }
  body.kg-staff-nav .nav.open .nav-secondary-group {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  body.kg-staff-nav .nav-secondary-group .nav-link {
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--bg);
  }
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--green-tint) 0%, var(--white) 100%);
  padding: 3.5rem 0 3rem;
}

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

.hero-copy { text-align: center; }

.hero-copy h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-style: italic;
  font-weight: 600;
  color: var(--green-dark);
  font-size: 1.05rem;
  margin: 0.5rem 0 0.75rem;
}

.hero-sub {
  font-size: 1.08rem;
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.5rem 0;
}

.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 1rem;
}

.stars { color: #f59e0b; letter-spacing: 2px; font-size: 0.95rem; }

.hero-art { max-width: 420px; margin: 0 auto; }

.hero-logo-img {
  display: block;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

/* Trust bar */
.trust-bar {
  background: var(--dark);
  padding: 1.75rem 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.trust-item { display: flex; flex-direction: column; gap: 0.2rem; }
.trust-item strong { color: var(--white); font-size: 1.2rem; }
.trust-item span { color: #94a3b8; font-size: 0.82rem; }

/* Section head */
.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

/* Services */
.services { padding: 4.5rem 0; }

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  margin-bottom: 1.1rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.service-card:hover .icon-badge,
.contact-info-card:hover .icon-badge { transform: scale(1.12) rotate(-6deg); }

/* Scroll-reveal: elements fade + rise into place as they enter the viewport. */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card h3 { font-size: 1.15rem; }
.service-card p { margin-bottom: 0; font-size: 0.95rem; }

/* Why us */
.why-us { background: var(--bg); padding: 4.5rem 0; }

.why-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

/* Why-us photo gallery */
.why-gallery {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  order: -1;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--gray-light);
}

.gallery-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }

.gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  height: 100%;
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.15s ease, transform 0.15s ease;
}
.gallery-arrow:hover { background: var(--white); transform: translateY(-50%) scale(1.06); }
.gallery-arrow svg { width: 18px; height: 18px; }
.gallery-arrow-prev { left: 10px; }
.gallery-arrow-next { right: 10px; }

.gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.gallery-dot.active { background: var(--white); transform: scale(1.35); }

.why-copy { text-align: center; }

.why-copy h2 { font-size: clamp(1.6rem, 5vw, 2.1rem); }

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 1.75rem;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}
.check-list li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--dark);
  font-size: 0.98rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 1.3em;
  height: 1.3em;
  border-radius: 50%;
  background: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60%;
}

/* Testimonials */
.testimonials { padding: 4.5rem 0; }

/* Testimonials carousel: auto-advances slowly, drag/swipe/arrows override. */
.testimonial-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.testimonial-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  padding: 0.35rem 0.1rem 1.1rem;
  user-select: none;
}
.testimonial-track::-webkit-scrollbar { display: none; }
.testimonial-track.is-dragging { cursor: grabbing; scroll-behavior: auto; }

.testimonial-arrow { position: static; flex: 0 0 auto; transform: none; }
.testimonial-arrow:hover { transform: scale(1.06); }

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  flex: 0 0 82%;
  scroll-snap-align: start;
}
@media (min-width: 640px) {
  .testimonial-card { flex: 0 0 calc(50% - 0.75rem); }
}
@media (min-width: 1000px) {
  .testimonial-card { flex: 0 0 calc(33.333% - 1rem); }
}

.testimonial-card p {
  color: var(--dark);
  font-size: 0.98rem;
  margin: 0.75rem 0 1.25rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.testimonial-author strong { display: block; font-size: 0.92rem; }
.testimonial-author span { font-size: 0.82rem; color: var(--gray); }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  padding: 3.5rem 0;
}
.cta-inner { text-align: center; }
.cta-inner h2 { color: var(--white); font-size: clamp(1.6rem, 5vw, 2.2rem); }
.cta-inner p { color: var(--green-light); margin-bottom: 1.75rem; }

/* Footer */
.site-footer { background: var(--dark); padding: 3.5rem 0 1.5rem; color: #cbd5e1; }

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #1e293b;
}

.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.footer-brand .logo-text { color: var(--white); font-weight: 800; }
.footer-brand p { flex-basis: 100%; margin-top: 0.75rem; font-size: 0.88rem; }

.footer-col { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.4rem; }
.footer-col a { font-size: 0.92rem; color: #cbd5e1; }
.footer-col a:hover { color: var(--green); }

/* "Download App" footer column -- hidden by default, js/install-app.js
   only reveals it when the browser can actually offer an install (Chrome/
   Edge/Android via beforeinstallprompt, or iOS Safari via manual steps). */
.footer-col .btn { align-self: flex-start; }
.install-ios-help { font-size: 0.85rem; color: #cbd5e1; margin: 0; max-width: 220px; }

.footer-bottom {
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: #64748b;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

/* Tablet+ */
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 860px) {
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; }
  .why-inner { grid-template-columns: 0.9fr 1.1fr; }
  .why-gallery { order: 0; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* Generic page hero (used by quote & contact pages) */
.page-hero {
  background: linear-gradient(180deg, var(--green-tint) 0%, var(--white) 100%);
  padding: 3rem 0 2.5rem;
  text-align: center;
}
.page-hero h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
.page-hero .hero-sub { margin: 0 auto; }

/* About page */
.about-section { padding: 3.5rem 0 4.5rem; }

.about-content {
  max-width: 680px;
  margin: 0 auto;
}
.about-content p {
  color: var(--dark);
  font-size: 1.05rem;
  margin-bottom: 1.4rem;
}

.about-quote {
  margin: 2rem 0 0;
  padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--green);
  background: var(--green-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green-dark);
  font-style: normal;
}

/* Quote tool layout */
.quote-tool { padding: 3rem 0 4.5rem; }

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

.quote-form {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.45rem; position: relative; }

.address-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
  margin-top: 0.35rem;
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
  padding: 0.4rem;
}
.address-suggestion-item {
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--dark);
  line-height: 1.4;
}
.address-suggestion-item:hover,
.address-suggestion-item.is-active {
  background: var(--green-tint);
  color: var(--green-dark);
}
.address-suggestions-empty,
.address-suggestions-loading {
  padding: 0.65rem 0.8rem;
  font-size: 0.88rem;
  color: var(--gray);
}

.form-group label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--dark);
}

.field-hint { font-size: 0.8rem; color: var(--gray); }

/* Soft, rounded form fields used everywhere on the site (quote form,
   booking form, contact form, account modal, admin forms, reviews). A
   tinted fill at rest reads much softer than a hard white box with a
   visible border -- the field only gets a border once it's focused. */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.8rem 1.05rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  background: var(--bg);
  color: var(--dark);
  width: 100%;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.pill-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.pill-group-2 { grid-template-columns: repeat(2, 1fr); }

.pill-span-2 { grid-column: 1 / -1; }

.split-links-list { display: flex; flex-direction: column; gap: 0.6rem; }
.split-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-light);
  border-radius: 12px;
  background: var(--green-tint);
}
.split-link-name { font-weight: 600; }
.split-link-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.pill {
  font-family: inherit;
  cursor: pointer;
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--dark);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pill span { font-weight: 400; font-size: 0.72rem; color: var(--gray); }
.pill:hover { border-color: var(--green); }
.pill.selected {
  border-color: var(--green);
  background: var(--green-tint);
  color: var(--green-dark);
}
.pill.selected span { color: var(--green-dark); }

.btn-block { width: 100%; }

.distance-status {
  font-size: 0.85rem;
  color: var(--gray);
  margin: 0.6rem 0 0;
  min-height: 1.2em;
}

.distance-loader {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--gray);
}
.distance-track {
  position: relative;
  flex: 1;
  max-width: 140px;
  height: 6px;
  background: var(--green-light);
  border-radius: 999px;
  overflow: visible;
}
.distance-truck {
  position: absolute;
  top: -9px;
  left: 0;
  font-size: 1.1rem;
  animation: drive-across 1.1s ease-in-out infinite;
}
@keyframes drive-across {
  0% { left: 0; transform: scaleX(1); }
  48% { transform: scaleX(1); }
  50% { left: calc(100% - 20px); transform: scaleX(-1); }
  98% { transform: scaleX(-1); }
  100% { left: 0; transform: scaleX(1); }
}
.distance-status.is-error { color: #dc2626; }

.distance-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--green-tint);
  border: 1px solid var(--green-light);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-top: 0.6rem;
  font-size: 0.9rem;
}
.distance-result span { color: var(--gray); }
.distance-result strong { color: var(--green-dark); font-size: 1rem; }

.manual-toggle {
  background: none;
  border: none;
  color: var(--gray);
  text-decoration: underline;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  margin-top: 0.7rem;
  font-family: inherit;
  text-align: left;
}
.manual-toggle:hover { color: var(--green-dark); }

.manual-distance { margin-top: 0.9rem; }

.form-error {
  color: #dc2626;
  font-size: 0.85rem;
  margin: 0;
  min-height: 1.2em;
}

/* Quote result */
.quote-result {
  background: var(--bg);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: sticky;
  top: 90px;
}

.result-empty { text-align: center; padding: 1.5rem 0.5rem; }
.result-empty .icon-badge { margin: 0 auto 1rem; }
.result-empty h3 { font-size: 1.05rem; }
.result-empty p { font-size: 0.9rem; margin-bottom: 0; }

.price-range {
  font-size: clamp(1.8rem, 6vw, 2.3rem);
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 0.4rem;
}

.price-note { font-size: 0.85rem; margin-bottom: 1.25rem; }

.breakdown-toggle {
  background: none;
  border: none;
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 0.75rem;
  font-family: inherit;
}

.breakdown-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-top: 1px solid var(--gray-light);
  padding-top: 0.9rem;
}
.breakdown-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--gray);
}
.breakdown-list li strong { color: var(--dark); flex-shrink: 0; }

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.result-actions .btn { width: 100%; }

/* Contact page */
.contact-section { padding: 3rem 0 4.5rem; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-info-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.contact-info-card h3 { font-size: 1.05rem; }
.contact-info-card p { font-size: 0.92rem; margin-bottom: 0.9rem; }

.contact-email {
  display: inline-block;
  font-weight: 700;
  color: var(--green-dark);
  font-size: 1.05rem;
  word-break: break-word;
}
.contact-email:hover { text-decoration: underline; }

.link-arrow {
  display: inline-block;
  font-weight: 600;
  color: var(--green-dark);
  font-size: 0.92rem;
}
.link-arrow:hover { text-decoration: underline; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.contact-form h3 { font-size: 1.15rem; margin-bottom: 0.2rem; }

/* Booking flow */
.booking-tool { padding: 0 0 4.5rem; }

.booking-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.booking-card h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); }

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  margin-bottom: 1.4rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--dark);
  margin: -0.4rem 0 1.4rem;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  cursor: pointer;
}

.optional-tag { color: var(--gray); font-weight: 400; font-size: 0.85rem; }

.booking-actions {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.5rem;
}

.photo-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.photo-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--gray-light);
  flex-shrink: 0;
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-thumb-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.75);
  color: var(--white);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-thumb-remove:hover { background: var(--dark); }

.form-success {
  background: var(--green-tint);
  border: 1px solid var(--green-light);
  color: var(--green-dark);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  margin: 0 0 1.4rem;
}

/* Account button + modal */
.account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  cursor: pointer;
  flex-shrink: 0;
  color: var(--dark);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.account-btn:hover { border-color: var(--green); background: var(--green-tint); }
.account-btn svg { width: 20px; height: 20px; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gray);
  cursor: pointer;
  padding: 0.2rem;
}
.modal-close:hover { color: var(--dark); }

.modal-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--bg);
  border-radius: 999px;
  padding: 0.3rem;
  margin-bottom: 1.5rem;
}
.modal-tab {
  flex: 1;
  border: none;
  background: none;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray);
  cursor: pointer;
  font-family: inherit;
}
.modal-tab.active { background: var(--white); color: var(--green-dark); box-shadow: var(--shadow); }

.modal-form { display: flex; flex-direction: column; gap: 1.1rem; }
.modal-form h3 { font-size: 1.2rem; margin-bottom: 0.2rem; }

.form-note {
  font-size: 0.85rem;
  color: var(--gray);
  margin: 0;
  min-height: 1.2em;
}
.form-note.is-info { color: var(--green-dark); }
.form-note.is-error { color: #dc2626; }

.account-email {
  font-weight: 600;
  color: var(--dark);
  background: var(--green-tint);
  border: 1px solid var(--green-light);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  word-break: break-word;
}

/* Auth gate: the quote/booking flow stays hidden until we positively confirm
   the visitor is logged in, so there's no flash of gated content while the
   session check is still in flight. */
.requires-auth { display: none; }
body.kg-logged-in .requires-auth { display: block; }

.auth-gate { padding: 3rem 0 4rem; }

.auth-gate-card {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
}

.auth-gate-icon { margin: 0 auto 1.1rem; }

.auth-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

/* WhatsApp floating CTA */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 90;
  transition: transform 0.15s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); }
.whatsapp-fab svg { width: 30px; height: 30px; }

@media (max-width: 480px) {
  .whatsapp-fab { width: 48px; height: 48px; bottom: 16px; right: 16px; }
  .whatsapp-fab svg { width: 25px; height: 25px; }
}

@media (min-width: 860px) {
  .quote-grid { grid-template-columns: 1.1fr 0.9fr; }
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; }
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
}

/* Mobile nav */
@media (max-width: 859px) {
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--white);
    border-bottom: 1px solid var(--gray-light);
    padding: 1rem 20px 1.5rem;
    gap: 0.25rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  }
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-link { width: 100%; padding: 0.75rem 0; border-bottom: 1px solid var(--bg); }
}

/* Progress stepper (quote → booking → payment) */
.progress-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 1.75rem 0 0.25rem;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  width: 92px;
}
.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--gray-light);
  background: var(--white);
  color: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.step-check { display: none; }
.step.active .step-circle {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
  transform: scale(1.15);
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.15);
}
.step.completed .step-circle {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}
.step.completed .step-number { display: none; }
.step.completed .step-check { display: inline; }
.step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray);
  text-align: center;
  transition: color 0.2s ease;
}
.step.active .step-label,
.step.completed .step-label { color: var(--dark); }

.step-line {
  flex: 1;
  height: 3px;
  background: var(--gray-light);
  border-radius: 2px;
  margin-top: 19px;
  overflow: hidden;
  max-width: 100px;
}
.step-line-fill {
  height: 100%;
  width: 0%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.5s ease;
}
.step-line.filled .step-line-fill { width: 100%; }

/* Driver trip timeline: vertical step tracker used on both the driver
   dashboard (interactive, with action buttons) and the customer's My
   Bookings page (read-only, updates live via Realtime). */
.trip-timeline { display: flex; flex-direction: column; margin: 1rem 0 0.5rem; }
.trip-timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  position: relative;
  padding-bottom: 1.4rem;
}
.trip-timeline-step:last-child { padding-bottom: 0; }
.trip-timeline-step::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--gray-light);
}
.trip-timeline-step:last-child::before { display: none; }
.trip-timeline-step.completed::before { background: var(--green); }

.trip-timeline-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--gray-light);
  background: var(--white);
  color: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
  z-index: 1;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.trip-timeline-step.active .trip-timeline-circle {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.15);
}
.trip-timeline-step.completed .trip-timeline-circle {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}
.trip-timeline-step.warning .trip-timeline-circle { border-color: #f59e0b; background: #fef3c7; color: #92400e; }

.trip-timeline-label { font-weight: 600; font-size: 0.9rem; padding-top: 0.4rem; color: var(--gray); }
.trip-timeline-step.active .trip-timeline-label,
.trip-timeline-step.completed .trip-timeline-label { color: var(--dark); }
.trip-timeline-step.warning .trip-timeline-label { color: #92400e; }

.trip-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.75rem; }

.payment-status-banner {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  text-align: center;
}
.payment-status-banner strong { font-weight: 700; }
.payment-status-banner.payment-status-paid { background: var(--green-light); color: var(--green-dark); }
.payment-status-banner.payment-status-due { background: #fef3c7; color: #92400e; }

/* Confetti burst */
.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 200;
  animation: confetti-fall ease-out forwards;
}
@keyframes confetti-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--drift), 160px) rotate(var(--rotate)); opacity: 0; }
}

/* Racing logo celebration */
.logo-racer {
  position: fixed;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  pointer-events: none;
  /* Position/rotation are driven per-frame by JS (logo-race.js) to trace the
     snake path — no CSS transition here, it would fight the rAF updates. */
}
.logo-racer.logo-racer-arrived {
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform: scale(1.5);
  opacity: 0;
}

/* Admin dashboard */
.admin-section { padding: 2rem 0 4.5rem; }

.admin-loading { text-align: center; padding: 3rem 0; color: var(--gray); }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.stat-card strong { display: block; font-size: 1.8rem; color: var(--dark); }
.stat-card span { font-size: 0.8rem; color: var(--gray); }

.admin-bookings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-empty { text-align: center; color: var(--gray); padding: 2rem 0; }

.bookings-list { display: flex; flex-direction: column; gap: 1rem; }

.booking-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.booking-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.booking-price { font-size: 1.3rem; font-weight: 800; color: var(--green-dark); }
.booking-date { font-size: 0.82rem; color: var(--gray); margin-top: 0.3rem; }

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.status-badge.status-pending { background: #fef3c7; color: #92400e; }
.status-badge.status-confirmed { background: var(--green-light); color: var(--green-dark); }
.status-badge.status-completed { background: #dbeafe; color: #1e40af; }
.status-badge.status-cancelled { background: #fee2e2; color: #991b1b; }
.status-badge.status-active { background: var(--green-light); color: var(--green-dark); }
.status-badge.status-inactive { background: var(--gray-light); color: var(--gray); }

.split-status { margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid var(--bg); }
.split-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
}
.split-status-badge.split-status-complete { background: var(--green-light); color: var(--green-dark); }
.split-status-list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; color: var(--gray); }

.review-block {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--bg);
}
.review-block h4 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.review-block p { margin: 0.5rem 0; font-style: italic; color: var(--dark); }
.star-picker { display: flex; gap: 0.25rem; margin-bottom: 0.6rem; }
.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--gray-light);
  padding: 0;
  transition: transform 0.15s ease;
}
.star-btn:hover { transform: scale(1.15); }
.star-btn.selected { color: #f59e0b; }
.review-comment {
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}
.review-error { margin-top: 0.5rem; }

.footer-legal-links { display: inline-flex; gap: 1rem; margin-top: 0.6rem; }
.footer-legal-links a { color: var(--gray); font-size: 0.85rem; }
.footer-legal-links a:hover { color: var(--white); }

.legal-section { padding: 1rem 0 4.5rem; }
.legal-content { max-width: 760px; }
.legal-content h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }
.legal-content h2:first-of-type { margin-top: 0.5rem; }
.legal-content p { color: var(--dark); line-height: 1.7; margin: 0 0 1rem; }
.legal-content ul { margin: 0 0 1rem; padding-left: 1.3rem; color: var(--dark); line-height: 1.7; }
.legal-content li { margin-bottom: 0.4rem; }
.legal-disclaimer { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--bg); font-size: 0.85rem; color: var(--gray); font-style: italic; }

/* Admin tabs (Bookings / Drivers) */
.admin-tabs {
  display: inline-flex;
  gap: 0.4rem;
  background: var(--bg);
  border-radius: 999px;
  padding: 0.3rem;
  margin-bottom: 2rem;
}
.admin-tab {
  border: none;
  background: none;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--gray);
  cursor: pointer;
  font-family: inherit;
}
.admin-tab.active { background: var(--white); color: var(--green-dark); box-shadow: var(--shadow); }

.driver-form-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.driver-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.booking-route {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  color: var(--dark);
}
.booking-route-line { display: flex; gap: 0.5rem; }
.booking-route-label { color: var(--gray); flex-shrink: 0; min-width: 72px; }

.booking-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--gray);
  margin-bottom: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-light);
}
.booking-meta strong { color: var(--dark); }

.booking-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.status-select {
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: var(--bg);
  color: var(--dark);
  width: auto;
}
.status-select:focus {
  outline: none;
  border-color: var(--green);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* Analytics */
.analytics-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.metric-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.metric-card .metric-label {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 0.4rem;
  display: block;
}
.metric-card .metric-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
  display: block;
  line-height: 1.2;
}
.metric-trend {
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.4rem;
  display: inline-block;
}
.metric-trend.trend-up { color: var(--green-dark); }
.metric-trend.trend-down { color: #dc2626; }
.metric-trend.trend-flat { color: var(--gray); }

.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.chart-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  min-width: 0;
}
.chart-card h3 {
  font-size: 1rem;
  margin-bottom: 1.1rem;
}

.suburb-list { display: flex; flex-direction: column; gap: 0.8rem; }
.suburb-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.88rem; }
.suburb-name {
  flex: 0 0 110px;
  color: var(--dark);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suburb-bar-track { flex: 1; height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.suburb-bar-fill { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width 0.4s ease; }
.suburb-count { flex: 0 0 26px; text-align: right; color: var(--gray); font-size: 0.85rem; }

@media (min-width: 640px) {
  .admin-stats { grid-template-columns: repeat(4, 1fr); }
  .booking-meta { grid-template-columns: 1fr 1fr; }
  .analytics-metrics { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .analytics-metrics { grid-template-columns: repeat(6, 1fr); }
  .chart-grid { grid-template-columns: 1fr 1fr; }
}

/* Delivery mini-game -- a bonus "dodge the traffic" game shown after a
   successful payment (js/delivery-game.js builds the inner markup). */
.delivery-game-section { margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px dashed var(--gray-light); }
.delivery-game-inner { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; text-align: center; }

.delivery-game-start { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; max-width: 320px; }
.delivery-game-intro { color: var(--gray); font-size: 0.95rem; margin: 0; }

.delivery-game-play { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; width: 100%; }
.delivery-game-hud { font-weight: 700; color: var(--dark); font-size: 0.95rem; }

.delivery-game-progress-track {
  width: 100%;
  max-width: 300px;
  height: 8px;
  background: var(--gray-light);
  border-radius: 999px;
  overflow: hidden;
}
.delivery-game-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.15s linear;
}

.delivery-game-play canvas {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 300 / 420;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  touch-action: pan-y;
}

.delivery-game-touch-controls { display: flex; gap: 1rem; }
.delivery-game-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  color: var(--dark);
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.delivery-game-btn:hover { border-color: var(--green); color: var(--green-dark); }
.delivery-game-btn:active { transform: scale(0.94); }

.delivery-game-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1.5px solid var(--gray-light);
  max-width: 320px;
}
.delivery-game-overlay.is-win { border-color: var(--green); background: var(--green-light); }
.delivery-game-overlay-title { font-size: 1.15rem; font-weight: 800; color: var(--dark); margin: 0; }
.delivery-game-overlay-sub { color: var(--gray); font-size: 0.9rem; margin: 0 0 0.4rem; }

@media (min-width: 540px) {
  .delivery-game-touch-controls { display: none; }
}
