:root {
  color-scheme: dark;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;

  /* Core palette (dark default) */
  --bg: #0f1828;
  --bg-elev: #152238;
  --card: rgba(255, 255, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.14);
  --text: #f8fafc;
  --muted: #a8b4c9;
  --accent: #42f0c8;
  --accent-2: #6b9dff;
  --accent-mid: #8cf5d0;
  --warm: #ffb86b;
  --danger: #ff6b6b;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --on-accent: #041014;

  /* Page atmosphere */
  --body-glow-1: rgba(107, 157, 255, 0.34);
  --body-glow-2: rgba(66, 240, 200, 0.26);
  --body-glow-3: rgba(255, 184, 107, 0.1);
  --body-glow-4: rgba(94, 129, 172, 0.14);

  /* Chrome / header */
  --header-bg-start: rgba(7, 11, 16, 0.92);
  --header-bg-end: rgba(7, 11, 16, 0.65);
  --nav-divider: rgba(255, 255, 255, 0.08);
  --theme-toggle-bg: rgba(255, 255, 255, 0.06);
  --theme-toggle-bg-hover: rgba(255, 255, 255, 0.1);

  /* Surfaces */
  --fill-input: rgba(0, 0, 0, 0.35);
  --fill-input-admin: rgba(0, 0, 0, 0.35);
  --fill-soft: rgba(0, 0, 0, 0.25);
  --fill-softer: rgba(0, 0, 0, 0.2);
  --fill-cal: rgba(0, 0, 0, 0.2);
  --fill-code: rgba(0, 0, 0, 0.25);

  /* Site gate (bootstrap banner) */
  --site-gate-text: #f8fafc;
  --site-gate-bg: linear-gradient(120deg, #1e3a5f, #1a4d4a);
  --site-gate-border: rgba(255, 255, 255, 0.2);
  --site-gate-error-bg: linear-gradient(120deg, #5c2a2a, #3d2438);

  /* Toast & modal */
  --toast-bg: #101826;
  --modal-scrim: rgba(0, 0, 0, 0.65);
  --modal-card-bg: #0b1018;

  /* Admin shell */
  --admin-shell-bg: radial-gradient(900px 480px at 0% 0%, rgba(107, 157, 255, 0.14), transparent 55%),
    radial-gradient(700px 400px at 100% 10%, rgba(66, 240, 200, 0.1), transparent 50%),
    linear-gradient(165deg, #070b12 0%, #0c1420 45%, #0a1018 100%);
  --admin-bar-border: rgba(107, 157, 255, 0.18);
  --admin-bar-bg: rgba(10, 15, 24, 0.88);
  --admin-tabs-border: rgba(255, 255, 255, 0.08);
  --admin-tabs-bg: rgba(0, 0, 0, 0.22);
  --tab-btn-bg: rgba(255, 255, 255, 0.03);
  --tab-btn-hover-border: rgba(255, 255, 255, 0.12);
  --tab-active-shadow: 0 4px 20px rgba(66, 240, 200, 0.2);
  --admin-card-border: rgba(255, 255, 255, 0.1);
  --admin-card-bg: rgba(255, 255, 255, 0.035);
  --admin-card-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);

  /* Fleet cards */
  --fleet-card-bg: linear-gradient(165deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  --fleet-media-bg: linear-gradient(145deg, rgba(66, 240, 200, 0.15), rgba(107, 157, 255, 0.12));
  --fleet-ph-text: rgba(248, 250, 252, 0.35);
  --fleet-ph-bg: linear-gradient(160deg, rgba(66, 240, 200, 0.12), rgba(107, 157, 255, 0.08));

  /* Route card hover */
  --route-hover-border: rgba(62, 230, 176, 0.45);
  --route-hover-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);

  /* Calendar */
  --cal-hover-border: rgba(66, 240, 200, 0.35);
  --cal-hover-bg: rgba(66, 240, 200, 0.08);
  --cal-has-border: rgba(107, 157, 255, 0.35);
  --cal-sel-bg: linear-gradient(135deg, rgba(66, 240, 200, 0.35), rgba(107, 157, 255, 0.2));
  --cal-sel-text: #041014;

  /* Muted sections — optional admin wash */
  --section-muted-wash: transparent;
  --section-muted-border: rgba(255, 255, 255, 0.06);
  --status-open-border: #fbbf24;
  --status-done-border: #34d399;
  --status-current-border: #60a5fa;
  --status-next-border: #a78bfa;
  --status-upcoming-border: #22d3ee;
  --status-overdue-border: #fb7185;
  --status-neutral-border: rgba(255, 255, 255, 0.45);
}

/* Light theme — production-ready contrast (WCAG-minded) */
html[data-theme='light'] {
  color-scheme: light;

  --bg: #f5f7fb;
  --bg-elev: #ffffff;
  --card: rgba(255, 255, 255, 0.97);
  --stroke: rgba(15, 23, 42, 0.12);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0d9488;
  --accent-2: #2563eb;
  --accent-mid: #5eead4;
  --warm: #c2410c;
  --danger: #dc2626;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  --on-accent: #042f2e;

  --body-glow-1: rgba(37, 99, 235, 0.12);
  --body-glow-2: rgba(13, 148, 136, 0.1);
  --body-glow-3: rgba(251, 146, 60, 0.08);
  --body-glow-4: rgba(100, 116, 139, 0.1);

  --header-bg-start: rgba(255, 255, 255, 0.94);
  --header-bg-end: rgba(248, 250, 252, 0.88);
  --nav-divider: rgba(15, 23, 42, 0.08);
  --theme-toggle-bg: rgba(15, 23, 42, 0.05);
  --theme-toggle-bg-hover: rgba(15, 23, 42, 0.09);

  --fill-input: rgba(241, 245, 249, 0.95);
  --fill-input-admin: #f8fafc;
  --fill-soft: rgba(241, 245, 249, 0.9);
  --fill-softer: rgba(226, 232, 240, 0.85);
  --fill-cal: rgba(241, 245, 249, 0.95);
  --fill-code: rgba(226, 232, 240, 0.95);

  --site-gate-text: #0f172a;
  --site-gate-bg: linear-gradient(120deg, #e0e7ff, #ccfbf1);
  --site-gate-border: rgba(15, 23, 42, 0.1);
  --site-gate-error-bg: linear-gradient(120deg, #fecaca, #fde68a);

  --toast-bg: #ffffff;
  --modal-scrim: rgba(15, 23, 42, 0.45);
  --modal-card-bg: #ffffff;

  --admin-shell-bg: radial-gradient(900px 480px at 0% 0%, rgba(37, 99, 235, 0.08), transparent 55%),
    radial-gradient(700px 400px at 100% 10%, rgba(13, 148, 136, 0.06), transparent 50%),
    linear-gradient(165deg, #eef2f6 0%, #f8fafc 50%, #f1f5f9 100%);
  --admin-bar-border: rgba(15, 23, 42, 0.08);
  --admin-bar-bg: rgba(255, 255, 255, 0.92);
  --admin-tabs-border: rgba(15, 23, 42, 0.08);
  --admin-tabs-bg: rgba(241, 245, 249, 0.9);
  --tab-btn-bg: rgba(255, 255, 255, 0.8);
  --tab-btn-hover-border: rgba(15, 23, 42, 0.12);
  --tab-active-shadow: 0 4px 16px rgba(13, 148, 136, 0.22);
  --admin-card-border: rgba(15, 23, 42, 0.1);
  --admin-card-bg: #ffffff;
  --admin-card-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);

  --fleet-card-bg: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
  --fleet-media-bg: linear-gradient(145deg, rgba(13, 148, 136, 0.12), rgba(37, 99, 235, 0.1));
  --fleet-ph-text: rgba(100, 116, 139, 0.55);
  --fleet-ph-bg: linear-gradient(160deg, rgba(13, 148, 136, 0.08), rgba(37, 99, 235, 0.06));

  --route-hover-border: rgba(13, 148, 136, 0.45);
  --route-hover-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);

  --cal-hover-border: rgba(13, 148, 136, 0.45);
  --cal-hover-bg: rgba(13, 148, 136, 0.1);
  --cal-has-border: rgba(37, 99, 235, 0.35);
  --cal-sel-bg: linear-gradient(135deg, rgba(45, 212, 191, 0.45), rgba(96, 165, 250, 0.28));
  --cal-sel-text: #042f2e;

  --section-muted-border: rgba(15, 23, 42, 0.08);
  --status-open-border: #d97706;
  --status-done-border: #059669;
  --status-current-border: #2563eb;
  --status-next-border: #7c3aed;
  --status-upcoming-border: #0891b2;
  --status-overdue-border: #e11d48;
  --status-neutral-border: rgba(15, 23, 42, 0.35);
}

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

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    radial-gradient(1000px 520px at 12% -8%, var(--body-glow-1), transparent 52%),
    radial-gradient(820px 480px at 88% 4%, var(--body-glow-2), transparent 48%),
    radial-gradient(720px 420px at 50% 100%, var(--body-glow-3), transparent 55%),
    radial-gradient(700px 400px at 50% 100%, var(--body-glow-4), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* Hide visible scrollbars globally while preserving scroll behavior. */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

main {
  min-height: 65vh;
  padding-top: clamp(0.75rem, 2.2vw, 1.5rem);
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.site-gate {
  position: relative;
  z-index: 25;
  padding: 0.9rem min(1.25rem, 4vw) 1rem;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--site-gate-text);
  background: var(--site-gate-bg);
  border-bottom: 1px solid var(--site-gate-border);
}

.site-gate-msg {
  margin: 0 0 0.35rem;
}

.site-gate-hint {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.92;
}

.site-gate code {
  font-size: 0.8em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--fill-code);
}

.site-gate--error {
  background: var(--site-gate-error-bg);
}

.test-gateway-banner {
  position: relative;
  z-index: 24;
  padding: 0.45rem min(1.25rem, 4vw);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #ffd9df;
  background: linear-gradient(90deg, #8a1f37, #b3324f, #8a1f37);
  border-bottom: 1px solid color-mix(in srgb, #ff6f8f 48%, transparent);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem 0.8rem;
  padding: 0.75rem min(4vw, 1.5rem) 0.75rem min(4vw, 1.5rem);
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, var(--header-bg-start), color-mix(in srgb, var(--header-bg-end) 88%, transparent));
  border-bottom: 1px solid color-mix(in srgb, var(--stroke) 75%, transparent);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
}

.site-header-tools {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-self: end;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--stroke) 75%, transparent);
  background: color-mix(in srgb, var(--theme-toggle-bg) 62%, transparent);
  color: var(--muted);
  opacity: 0.82;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.theme-toggle:hover {
  opacity: 1;
  color: var(--text);
  background: color-mix(in srgb, var(--theme-toggle-bg-hover) 72%, transparent);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle__icons {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.theme-toggle__graphic {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Dark UI: show sun (switch to day). Light UI: show moon (switch to night). */
.theme-toggle__graphic--sun {
  opacity: 1;
  transform: scale(1);
}

.theme-toggle__graphic--moon {
  opacity: 0;
  transform: scale(0.88);
}

html[data-theme='light'] .theme-toggle__graphic--sun {
  opacity: 0;
  transform: scale(0.88);
}

html[data-theme='light'] .theme-toggle__graphic--moon {
  opacity: 1;
  transform: scale(1);
}

.brand {
  display: flex;
  gap: 0.62rem;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  background: color-mix(in srgb, var(--fill-soft) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--stroke) 90%, transparent);
  color: var(--text);
}

.brand-title {
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  font-size: 0.98rem;
}

.brand-sub {
  font-size: 0.74rem;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 0.24rem;
  font-size: 0.86rem;
  color: var(--text);
  width: max-content;
  max-width: 100%;
  padding: 0.16rem;
  border: 1px solid color-mix(in srgb, var(--stroke) 85%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--fill-soft) 70%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stroke) 28%, transparent);
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.34rem 0.66rem;
  border-radius: 999px;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.nav a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--fill-input) 65%, transparent);
}

.nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.nav a[href='#book'] {
  color: var(--on-accent);
  font-weight: 500;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 86%, #5b7cff), var(--accent-mid));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 20%, transparent);
}

.nav a[href='#book']:hover {
  transform: translateY(-1px);
}

.ghost-hit {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: default;
}

.ghost-hit--dock {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 40;
  width: 44px;
  height: 44px;
  opacity: 0.06;
  pointer-events: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(min(280px, 100%), 0.55fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.5rem, 3.5vw, 2.5rem) min(4vw, 1.5rem) clamp(2rem, 5vw, 3.25rem);
  max-width: 1120px;
  margin: 0 auto;
}

.hero-inner h1 {
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  line-height: 1.1;
  margin: 0.4rem 0 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
  margin: 0;
}

.lede {
  color: var(--muted);
  max-width: 560px;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.hero-stats strong {
  display: block;
  font-size: 1.1rem;
}

.hero-stats span {
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-card {
  align-self: start;
  padding: 1.25rem 1.25rem 1rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.hero-card-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.hero-routes-note {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.mini-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding: clamp(2.25rem, 5vw, 3.5rem) min(5vw, 1.75rem) clamp(2.5rem, 6vw, 4rem);
  max-width: 1120px;
  margin: 0 auto;
  position: relative;
}

/* Muted sections: no boxed panel or sharp corners; optional soft wash from admin theme */
.section.muted {
  margin-top: 0;
  margin-bottom: 0;
  padding: clamp(2.25rem, 5vw, 3.5rem) min(5vw, 1.75rem) clamp(2.5rem, 6vw, 4rem);
  border-radius: 0;
  border: none;
  background: var(--section-muted-wash, transparent);
  box-shadow: none;
}

.section.muted + .section.muted {
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--section-muted-border, rgba(255, 255, 255, 0.06));
}

/* Unified separators between top-level sections for cleaner rhythm. */
main > .section + .section::before {
  content: '';
  position: absolute;
  left: min(5vw, 1.75rem);
  right: min(5vw, 1.75rem);
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--stroke) 86%, transparent) 12%,
    color-mix(in srgb, var(--stroke) 86%, transparent) 88%,
    transparent 100%
  );
  opacity: 0.65;
}

/* Intro titles: centered block with clear space before grids / forms */
.section-head {
  text-align: center;
  max-width: 38rem;
  margin-inline: auto;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.section-head h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.45rem, 2.8vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0 auto;
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.02rem;
}

.section-head--booking-launch {
  cursor: pointer;
  border-radius: var(--radius);
  padding: 0.65rem 1rem 0.85rem;
  margin: 0 auto;
  max-width: 38rem;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.section-head--booking-launch:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px var(--stroke);
}

.section-head--booking-launch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.route-card {
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

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

.route-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-grid {
  margin-top: clamp(0.35rem, 1vw, 0.7rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
}

.card {
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--stroke);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.route-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.route-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.price-row span {
  color: var(--muted);
  font-size: 0.85rem;
}

.price-row strong {
  font-size: 1.1rem;
}

.fleet-grid {
  margin-top: 0;
  display: flex;
  flex-flow: row nowrap;
  gap: 1.15rem;
}

.fleet-carousel {
  margin-top: clamp(0.35rem, 1vw, 0.7rem);
}

.fleet-carousel__btn {
  display: none;
}

.fleet-carousel__viewport {
  min-width: 0;
  overflow: hidden;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.fleet-carousel__viewport::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.fleet-carousel__viewport .fleet-grid {
  --fleet-gap: 1.15rem;
  margin: 0;
  width: max-content;
  gap: var(--fleet-gap);
}

.fleet-carousel__viewport .fleet-card {
  /* One full card per view on small screens (no clipped cards). */
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

@media (min-width: 700px) {
  .fleet-carousel__viewport .fleet-card {
    /* Two full cards per view on medium screens. */
    flex-basis: calc((100% - var(--fleet-gap)) / 2);
  }
}

@media (min-width: 901px) {
  .fleet-carousel {
    display: block;
  }

  .fleet-carousel__btn {
    display: none !important;
  }

  .fleet-carousel__viewport {
    overscroll-behavior-x: contain;
  }

  .fleet-carousel__viewport .fleet-grid {
    --fleet-gap: 1rem;
  }

  .fleet-carousel__viewport .fleet-card {
    /* Three full cards per view on desktop widths. */
    flex-basis: calc((100% - (2 * var(--fleet-gap))) / 3);
    max-width: none;
  }
}

.fleet-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--fleet-card-bg);
  box-shadow: var(--shadow);
}

.fleet-card--tone-0 {
  border-top: 3px solid var(--accent);
}

.fleet-card--tone-1 {
  border-top: 3px solid var(--accent-2);
}

.fleet-card--tone-2 {
  border-top: 3px solid var(--warm);
}

.fleet-card-media {
  position: relative;
  height: 148px;
  background: var(--fleet-media-bg);
}

.fleet-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fleet-card-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--fleet-ph-text);
  background: var(--fleet-ph-bg);
}

.fleet-card-body {
  padding: 1rem 1.15rem 1.15rem;
}

.fleet-card-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.fleet-card-body p {
  margin: 0.15rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.fleet-admin-table .fleet-photo-cell {
  min-width: 200px;
  max-width: 260px;
}

.fleet-admin-table thead th:nth-child(3),
.fleet-admin-table tbody td:nth-child(3) {
  min-width: 220px;
}

.fleet-driver-input {
  min-width: 210px;
}

.fleet-admin-table td:nth-child(7) {
  white-space: normal;
  vertical-align: middle;
}

.fleet-adm-preview {
  width: 72px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  margin-bottom: 0.35rem;
  background: var(--fill-soft);
  display: grid;
  place-items: center;
}

.fleet-adm-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fleet-photo-cell input[data-f='image_url'] {
  width: 100%;
  margin-bottom: 0.35rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: var(--fill-input-admin);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
}

.booking-layout {
  margin-top: clamp(0.35rem, 1vw, 0.8rem);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(min(100%, 260px), 0.5fr);
  gap: 1.25rem;
}

.booking-layout > .form-card,
.booking-layout > .aside-card {
  min-width: 0;
}

.form-card label {
  display: block;
  margin: 0.65rem 0 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--card) 96%, var(--bg));
  color: var(--text);
  font: inherit;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 62%, var(--stroke));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
  background: color-mix(in srgb, var(--card) 98%, var(--bg));
}

.form-card select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(180deg, color-mix(in srgb, var(--card) 96%, var(--bg)), color-mix(in srgb, var(--card) 96%, var(--bg))),
    linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--muted) 88%, transparent) 50%),
    linear-gradient(135deg, color-mix(in srgb, var(--muted) 88%, transparent) 50%, transparent 50%);
  background-position:
    0 0,
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size:
    100% 100%,
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.form-card select option {
  color: var(--text);
  background: color-mix(in srgb, var(--card) 96%, var(--bg));
}

#bf-slot {
  min-height: 48px;
  padding: 0.72rem 0.9rem;
  border-radius: 12px;
  background-image:
    linear-gradient(180deg, color-mix(in srgb, var(--card) 96%, var(--bg)), color-mix(in srgb, var(--card) 96%, var(--bg))),
    linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--muted) 88%, transparent) 50%),
    linear-gradient(135deg, color-mix(in srgb, var(--muted) 88%, transparent) 50%, transparent 50%);
  background-position:
    0 0,
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size:
    100% 100%,
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

#bf-date {
  min-height: 54px;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stroke) 72%, transparent);
}

#bf-date::-webkit-calendar-picker-indicator {
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 10px;
  opacity: 0.9;
  background: color-mix(in srgb, var(--fill-soft) 72%, transparent);
}

#bf-date:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
  background: color-mix(in srgb, var(--fill-soft) 88%, transparent);
}

#bf-date:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 62%, var(--stroke));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
}

html[data-theme='light'] #bf-date::-webkit-calendar-picker-indicator {
  background: color-mix(in srgb, var(--fill-soft) 90%, #ffffff);
}

html:not([data-theme='light']) #bf-date {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stroke) 56%, transparent);
}

html:not([data-theme='light']) #bf-date::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.15);
  background: color-mix(in srgb, var(--bg) 55%, #000000 45%);
}

html:not([data-theme='light']) .form-card input,
html:not([data-theme='light']) .form-card select,
html:not([data-theme='light']) .form-card textarea {
  background: color-mix(in srgb, var(--bg) 70%, #000000 30%);
  border-color: color-mix(in srgb, var(--stroke) 88%, transparent);
}

html:not([data-theme='light']) .form-card input:focus,
html:not([data-theme='light']) .form-card select:focus,
html:not([data-theme='light']) .form-card textarea:focus {
  background: color-mix(in srgb, var(--bg) 62%, #000000 38%);
}

html:not([data-theme='light']) .form-card select {
  background-image:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, #000000 30%), color-mix(in srgb, var(--bg) 70%, #000000 30%)),
    linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--muted) 90%, transparent) 50%),
    linear-gradient(135deg, color-mix(in srgb, var(--muted) 90%, transparent) 50%, transparent 50%);
}

html:not([data-theme='light']) .form-card select option {
  background: color-mix(in srgb, var(--bg) 86%, #000000 14%);
  color: var(--text);
}

html:not([data-theme='light']) #bf-slot {
  background-image:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, #000000 30%), color-mix(in srgb, var(--bg) 70%, #000000 30%)),
    linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--muted) 90%, transparent) 50%),
    linear-gradient(135deg, color-mix(in srgb, var(--muted) 90%, transparent) 50%, transparent 50%);
}

#bf-slot-help {
  margin-top: 0.32rem;
  color: var(--muted);
}

.booking-date-inline {
  margin: 0.75rem 0 0.72rem;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--stroke) 88%, transparent);
  background: color-mix(in srgb, var(--card) 96%, var(--bg));
  font-size: 0.94rem;
  line-height: 1.3;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.booking-date-inline:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--stroke));
}

.booking-date-inline:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 62%, var(--stroke));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.booking-date-inline strong {
  color: color-mix(in srgb, var(--text) 92%, var(--muted));
  font-weight: 600;
}

.booking-calendar-title {
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

#booking-side {
  display: grid;
  gap: 0.8rem;
}

.booking-calendar-panel {
  border: 0;
  border-radius: 0;
  margin-top: 1.8rem;
  padding: 0;
  background: transparent;
}

.booking-calendar-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
  padding: 0;
}

.booking-calendar-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: center;
  width: 100%;
}

.booking-calendar-inline {
  width: 100%;
  margin-bottom: 0.65rem;
}

.booking-calendar-inline .cal-grid {
  gap: 0.22rem;
}

.booking-calendar-inline .cal-cell {
  min-height: 2.05rem;
}

#booking-calendar-panel #bf-date {
  width: 100%;
  max-width: none;
  min-height: 40px;
  padding: 0.42rem 0;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--stroke) 88%, transparent);
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: none;
}

#booking-calendar-panel #bf-date:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--stroke));
  box-shadow: none;
}

#booking-calendar-panel #bf-date::-webkit-calendar-picker-indicator {
  background: transparent;
  border-radius: 0;
  padding: 0.05rem;
}

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

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

.aside-card {
  font-size: 0.95rem;
  color: var(--muted);
}

.aside-card strong {
  color: var(--text);
}

#booking-summary .booking-summary__route {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

#booking-summary .booking-summary__list {
  margin: 0.65rem 0 0;
  padding: 0.65rem 0 0;
  border-top: 1px solid var(--stroke);
}

#booking-summary .booking-summary__row {
  display: grid;
  grid-template-columns: 6.75rem minmax(0, 1fr);
  gap: 0.25rem 0.6rem;
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
}

#booking-summary .booking-summary__row:last-child {
  margin-bottom: 0;
}

#booking-summary .booking-summary__row dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

#booking-summary .booking-summary__row dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

#booking-summary .booking-summary__pricing {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--stroke);
}

.booking-pricing-inline {
  display: none;
}

@media (max-width: 480px) {
  #booking-summary .booking-summary__row {
    grid-template-columns: 1fr;
    gap: 0.08rem 0;
  }

  #booking-summary .booking-summary__row dt {
    font-size: 0.72rem;
  }

  #booking-summary .booking-summary__row dd {
    font-size: 0.86rem;
  }
}

.btn {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.65rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  font: inherit;
  text-align: center;
  vertical-align: middle;
  transition:
    transform 0.14s ease,
    box-shadow 0.2s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-mid));
  color: var(--on-accent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 24%, transparent);
}

.btn.ghost {
  background: transparent;
  border-color: var(--stroke);
  color: var(--text);
}

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

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

.btn.primary:hover {
  box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 32%, transparent);
}

.btn.ghost:hover {
  background: color-mix(in srgb, var(--fill-soft) 70%, transparent);
  border-color: color-mix(in srgb, var(--stroke) 92%, transparent);
}

.btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 75%, white);
  outline-offset: 2px;
}

.btn.full {
  display: block;
  width: 100%;
  margin-top: 0.65rem;
  box-sizing: border-box;
}

#pay-balance-form > .btn.full[type='submit'] {
  margin-top: calc(0.65rem + 2px);
}

/* Pay remaining fare — form card centered (headings use global .section-head) */
#pay-balance .form-card.narrow {
  margin-inline: auto;
  margin-top: clamp(0.35rem, 1vw, 0.7rem);
}

#pay-balance .fineprint.pb-qr-hint,
#pay-balance #pb-status {
  text-align: center;
  max-width: 40rem;
  margin-inline: auto;
}

/* Contact — minimal, centered strip (no heavy card) */
#contact.contact-section {
  padding-block: clamp(2rem, 5vw, 3.25rem);
}

#contact.contact-section .section-head {
  max-width: 44rem;
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

#contact.contact-section .section-head h2 {
  font-size: clamp(0.82rem, 1.8vw, 0.92rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

#contact.contact-section .contact-section__lede {
  margin: 0 auto;
  max-width: 34rem;
  font-size: 0.9rem !important;
  line-height: 1.45;
  color: var(--muted);
  opacity: 0.95;
}

#contact.contact-section .contact-section__phone {
  margin: 0.7rem auto 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  background: color-mix(in srgb, var(--fill-soft) 55%, transparent);
}

#contact.contact-section .contact-section__phone span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

#contact.contact-section .contact-section__phone a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

#contact.contact-section .contact-section__company {
  margin: 0.75rem auto 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

#contact.contact-section .contact-section__form {
  width: min(100%, 46rem);
  max-width: 46rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--stroke) 80%, transparent);
  backdrop-filter: blur(8px);
}

#contact.contact-section .contact-section__label {
  display: block;
  margin: 0.85rem 0 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

#contact.contact-section .contact-section__label:first-of-type {
  margin-top: 0;
}

#contact.contact-section .contact-section__input,
#contact.contact-section .contact-section__textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--fill-input);
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
}

#contact.contact-section .contact-section__textarea {
  resize: vertical;
  min-height: 5.5rem;
  line-height: 1.45;
}

#contact.contact-section .contact-section__submit {
  margin-top: 1.1rem;
  align-self: center;
  min-width: 9rem;
  padding: 0.55rem 1.5rem;
}

#contact.contact-section .contact-section__status {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 1.2rem;
}

.btn.compact {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.fineprint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.footer {
  padding: 2rem 1.5rem 3rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  max-width: calc(100vw - 2rem);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--toast-bg);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  z-index: 50;
}

.modal {
  position: fixed;
  inset: 0;
  background: var(--modal-scrim);
  display: grid;
  place-items: center;
  z-index: 90;
  padding: 1rem;
}

.modal-card {
  width: min(420px, calc(100vw - 2rem));
  max-height: min(560px, 90dvh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.5rem;
  border-radius: 18px;
  background: var(--modal-card-bg);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.modal-card h3 {
  margin-top: 0;
}

.paid-modal-card {
  width: min(520px, calc(100vw - 2rem));
  padding: 1.35rem 1.35rem 1.1rem;
}

#paid-title {
  margin-bottom: 0.4rem;
}

#paid-text {
  margin: 0 0 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

#paid-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

#paid-actions .btn.compact {
  margin-top: 0;
}

.paid-close-btn {
  margin-top: 0.8rem;
  margin-left: auto;
  display: inline-flex;
}

.error {
  color: var(--danger);
  min-height: 1.25rem;
  font-size: 0.85rem;
}

.admin-shell {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--admin-shell-bg);
  backdrop-filter: blur(10px);
}

.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--admin-bar-border);
  backdrop-filter: blur(16px);
  background: var(--admin-bar-bg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.admin-title {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.admin-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.test-gateway-inline {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #ff6f8f 55%, transparent);
  background: color-mix(in srgb, #ff6f8f 18%, transparent);
  color: #ffb7c6;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.test-mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.46rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #ffb24a 52%, transparent);
  background: color-mix(in srgb, #ffb24a 18%, transparent);
  color: #ffd7a0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.test-mode-inline {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #ffb24a 52%, transparent);
  background: color-mix(in srgb, #ffb24a 16%, transparent);
  color: #ffd7a0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0.4rem;
  padding: 0.65rem 1rem 0.6rem;
  border-bottom: 1px solid var(--admin-tabs-border);
  background: var(--admin-tabs-bg);
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--stroke) 80%, transparent);
  padding: 0.45rem 0.95rem;
  background: var(--tab-btn-bg);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.tab-btn:hover {
  color: var(--text);
  border-color: var(--tab-btn-hover-border);
  transform: translateY(-1px);
}

.tab-btn.active {
  color: var(--on-accent);
  font-weight: 600;
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent), var(--accent-mid));
  box-shadow: var(--tab-active-shadow);
}

.admin-body {
  flex: 1;
  overflow: auto;
  padding: 1.1rem 1.2rem 1.6rem;
  background:
    radial-gradient(720px 360px at 0% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 55%),
    radial-gradient(720px 360px at 100% 0%, color-mix(in srgb, var(--accent-2) 7%, transparent), transparent 58%);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.admin-body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.admin-table-scroll,
.fleet-chip-list,
.nav,
.fleet-carousel__viewport {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.admin-table-scroll::-webkit-scrollbar,
.fleet-chip-list::-webkit-scrollbar,
.nav::-webkit-scrollbar,
.fleet-carousel__viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.admin-panel {
  max-width: 1140px;
  margin: 0 auto;
}

.admin-panel h3 {
  margin: 1.2rem 0 0.5rem;
}

.admin-panel h3:first-child {
  margin-top: 0.1rem;
}

.admin-settings-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.72rem;
  margin-bottom: 0.35rem;
}

.admin-settings-actions .btn {
  min-width: 170px;
}

.admin-settings-actions--toggle {
  justify-content: flex-start;
}

.admin-settings-actions--toggle .btn {
  min-width: 160px;
}

.admin-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-row-actions .btn {
  min-width: 88px;
  margin-top: 0;
}

.fleet-admin-table .admin-row-actions .btn {
  min-width: 92px;
}

.admin-settings-actions {
  margin-top: 0.85rem;
  margin-bottom: 0.55rem;
}

.admin-panel h3 {
  margin: 1.35rem 0 0.55rem;
}

.admin-panel > h3:not(:first-of-type) {
  padding-top: 0.95rem;
  border-top: 1px solid color-mix(in srgb, var(--stroke) 78%, transparent);
}

.admin-row-dirty {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.admin-row-dirty td {
  border-bottom-color: color-mix(in srgb, var(--accent) 35%, var(--stroke));
}

.btn-attn {
  border-color: color-mix(in srgb, #f7b500 62%, var(--stroke));
  background: color-mix(in srgb, #f7b500 20%, var(--panel));
  color: color-mix(in srgb, var(--text) 90%, #6b4a00);
  box-shadow: 0 0 0 3px color-mix(in srgb, #f7b500 22%, transparent), 0 8px 20px color-mix(in srgb, #f7b500 22%, transparent);
}

.btn-attn:hover {
  border-color: color-mix(in srgb, #f7b500 80%, var(--stroke));
  background: color-mix(in srgb, #f7b500 30%, var(--panel));
}

.ops-sent-indicator {
  margin-top: 0.18rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #3fb950 45%, var(--stroke));
  background: color-mix(in srgb, #3fb950 14%, transparent);
  color: color-mix(in srgb, #3fb950 75%, var(--text));
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.stripe-mode {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--stroke) 90%, transparent);
  background: color-mix(in srgb, var(--fill-soft) 70%, transparent);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.stripe-mode--test {
  color: var(--text);
  border-color: var(--status-overdue-border);
  background: transparent;
}

.stripe-mode--live {
  color: var(--text);
  border-color: var(--status-done-border);
  background: transparent;
}

.admin-kpis {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-bottom: 0.8rem;
}

.admin-kpi {
  border: 1px solid color-mix(in srgb, var(--stroke) 88%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--fill-softer) 80%, transparent);
  padding: 0.62rem 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
}

.admin-kpi strong {
  font-size: 1.03rem;
}

.admin-kpi span {
  color: var(--muted);
  font-size: 0.75rem;
}

.route-fare-json {
  width: 100%;
  min-width: 280px;
  max-width: 540px;
  resize: vertical;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  line-height: 1.35;
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: var(--fill-input-admin);
  color: var(--text);
}

.route-main-input {
  min-width: 210px;
}

.routes-admin-table thead th:nth-child(1),
.routes-admin-table tbody td:nth-child(1) {
  min-width: 180px;
}

.routes-admin-table thead th:nth-child(2),
.routes-admin-table tbody td:nth-child(2),
.routes-admin-table thead th:nth-child(3),
.routes-admin-table tbody td:nth-child(3) {
  min-width: 170px;
}

.routes-admin-table thead th:nth-child(5),
.routes-admin-table tbody td:nth-child(5) {
  min-width: 110px;
}

.routes-admin-table thead th:nth-child(6),
.routes-admin-table tbody td:nth-child(6),
.routes-admin-table thead th:nth-child(7),
.routes-admin-table tbody td:nth-child(7) {
  min-width: 130px;
}

.routes-admin-table thead th:nth-child(8),
.routes-admin-table tbody td:nth-child(8) {
  min-width: 140px;
}

.routes-admin-table thead th:nth-child(9),
.routes-admin-table tbody td:nth-child(9) {
  min-width: 420px;
}

.routes-admin-table input[data-f='estimated_duration_minutes'] {
  min-width: 95px;
}

.routes-admin-table input[data-f='max_bookings_per_slot'] {
  min-width: 120px;
}

.routes-admin-table input[data-f='full_price_cents'],
.routes-admin-table input[data-f='deposit_cents'] {
  min-width: 110px;
}

.route-deposit-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.route-deposit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
}

.admin-card {
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--admin-card-border) 88%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--admin-card-bg) 94%, transparent), color-mix(in srgb, var(--admin-card-bg) 86%, transparent));
  padding: 1.02rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--admin-card-shadow);
}

.admin-card-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.admin-inl-label {
  display: block;
  margin: 0.58rem 0 0.22rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-shell input,
.admin-shell select,
.admin-shell textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--stroke) 88%, transparent);
  background: color-mix(in srgb, var(--fill-input-admin) 92%, transparent);
  color: var(--text);
  font: inherit;
  padding: 0.5rem 0.58rem;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

/* Keep numeric inputs, but hide browser spinner arrows in admin. */
.admin-shell input[type='number'] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.admin-shell input[type='number']::-webkit-outer-spin-button,
.admin-shell input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.admin-shell textarea {
  min-height: 2.8rem;
}

.admin-input-wide {
  min-width: 260px;
}

.admin-shell input:focus,
.admin-shell select:focus,
.admin-shell textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 72%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.admin-shell .admin-required-empty {
  border-color: color-mix(in srgb, #f97316 72%, var(--stroke));
  background: color-mix(in srgb, #f97316 15%, var(--fill-input-admin));
}

.admin-shell .btn {
  border-radius: 11px;
  min-height: 34px;
}

.admin-shell .btn.primary {
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 92%, #6f8bff), var(--accent-mid));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 24%, transparent);
}

.admin-shell .btn.ghost {
  border-color: color-mix(in srgb, var(--stroke) 88%, transparent);
  background: color-mix(in srgb, var(--fill-softer) 42%, transparent);
}

.admin-rec-card input[type='date'],
.admin-rec-card input[type='time'],
.admin-rec-card input[type='number'],
.admin-rec-card input[type='text'] {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--fill-input-admin);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
}

.admin-slots-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.admin-slots-side {
  position: sticky;
  top: 0.5rem;
}

.cal-wrap {
  padding-bottom: 0.75rem;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.cal-title {
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  flex: 1;
}

.cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-cell {
  aspect-ratio: 1;
  max-height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--fill-cal);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.cal-cell--pad {
  visibility: hidden;
  pointer-events: none;
}

.cal-cell:hover {
  border-color: var(--cal-hover-border);
  background: var(--cal-hover-bg);
}

.cal-cell--has {
  border-color: color-mix(in srgb, var(--cal-has-border) 92%, transparent);
  background: color-mix(in srgb, var(--cal-hover-bg) 78%, transparent);
  font-weight: 600;
}

.cal-cell--sel {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 45%, transparent), color-mix(in srgb, var(--accent-2) 36%, transparent));
  border-color: color-mix(in srgb, var(--accent) 90%, #ffffff);
  font-weight: 700;
  color: var(--cal-sel-text);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 26%, transparent);
}

.fleet-chip-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.5rem 0 0.65rem;
  max-height: 220px;
  overflow: auto;
}

.fleet-chip {
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--fill-softer);
  font-size: 0.85rem;
}

.fleet-chip--off {
  opacity: 0.55;
}

.fleet-chip__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem 0.5rem;
}

.fleet-chip__title {
  min-width: 0;
  flex: 1 1 auto;
}

.fleet-chip__site {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fleet-chip__site:hover {
  color: var(--accent-mid);
}

.fleet-chip-note {
  margin-top: 0.25rem;
  line-height: 1.35;
}

.rec-dow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin: 0.65rem 0 0.75rem;
}

.dow-check {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
}

.fleet-av-status {
  margin-top: 0.2rem;
  padding: 0.32rem 0.45rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--stroke) 88%, transparent);
  background: color-mix(in srgb, var(--fill-softer) 66%, transparent);
  color: var(--text);
  font-size: 0.75rem;
  line-height: 1.35;
}

.fleet-av-status--open {
  border-color: color-mix(in srgb, #22c55e 58%, var(--stroke));
}

.fleet-av-status--blocked {
  border-color: color-mix(in srgb, #f59e0b 62%, var(--stroke));
}

.fleet-av-editor {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin-top: 0;
}

.fleet-av-editor--collapsed .fleet-av-fields {
  display: none;
}

.fleet-av-fields {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
  flex: 1 1 12rem;
  min-width: 0;
}

.fleet-av-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.fleet-av-label {
  color: var(--muted);
  font-size: 0.72rem;
  min-width: 0;
  flex: 0 0 auto;
}

.fleet-av-label--inline {
  margin-left: 0.35rem;
  padding-left: 0.35rem;
  border-left: 1px solid color-mix(in srgb, var(--stroke) 75%, transparent);
}

.fleet-av-sep {
  color: var(--muted);
  font-size: 0.72rem;
}

.fleet-av-editor input[type='time'] {
  min-width: 5.5rem;
  padding: 0.28rem 0.42rem;
  font-size: 0.76rem;
}

.fleet-av-editor input[type='datetime-local'] {
  min-width: 9.5rem;
  padding: 0.28rem 0.42rem;
  font-size: 0.76rem;
}

.fleet-av-editor input[data-av-dates] {
  flex: 1 1 9rem;
  min-width: 7rem;
  max-width: 18rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.76rem;
}

.fleet-av-days {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.4rem;
  margin: 0;
}

.fleet-av-days .dow-check {
  gap: 0.2rem;
  font-size: 0.72rem;
}

.fleet-av-editor .fleet-av-status {
  margin-top: 0;
  padding: 0.24rem 0.42rem;
  font-size: 0.72rem;
  line-height: 1.25;
  flex: 1 1 10rem;
  min-width: min(100%, 11rem);
}

.slots-main-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.slots-pick-label {
  color: var(--accent);
}

.admin-table-scroll {
  overflow-x: auto;
  margin-top: 0.5rem;
}

.admin-table-tight th,
.admin-table-tight td {
  white-space: nowrap;
}

.admin-table-tight input[type='date'],
.admin-table-tight input[type='time'] {
  min-width: 9.5rem;
}

.avail {
  font-size: 0.82rem;
  color: var(--muted);
}

.avail strong {
  color: var(--accent);
}

.avail--low strong {
  color: var(--warm);
}

.avail--full strong {
  color: var(--danger);
}

@media (max-width: 960px) {
  .admin-slots-shell {
    grid-template-columns: 1fr;
  }

  .admin-slots-side {
    position: static;
  }

  .fleet-av-label {
    min-width: auto;
  }

  .fleet-av-editor input[type='datetime-local'] {
    min-width: 9.8rem;
  }
}

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

.table th,
.table td {
  border-bottom: 1px solid color-mix(in srgb, var(--stroke) 84%, transparent);
  padding: 0.52rem 0.4rem;
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.79rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  font-size: 0.75rem;
  color: var(--muted);
}

.pill--green {
  color: var(--muted);
  border-color: var(--stroke);
  background: transparent;
}

.dispatcher-live-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.4rem 0 0.7rem;
}

.live-slot-note {
  margin-top: 0.25rem;
  display: grid;
  gap: 0.18rem;
}

.live-row--current {
  background: color-mix(in srgb, #22c55e 8%, transparent);
}

.live-row--overdue {
  background: transparent;
  animation: none;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.12rem 0.52rem;
  font-size: 0.74rem;
  border: 1px solid var(--stroke);
}

.live-pill--current {
  color: var(--text);
  border-color: var(--status-current-border);
  background: transparent;
  box-shadow: none;
}

.live-pill--next {
  color: var(--text);
  border-color: var(--status-next-border);
  background: transparent;
}

.live-pill--upcoming {
  color: var(--text);
  border-color: var(--status-upcoming-border);
  background: transparent;
}

.live-pill--overdue {
  color: var(--text);
  border-color: var(--status-overdue-border);
  background: transparent;
  animation: none;
}

.live-pill--past,
.live-pill--unknown {
  color: var(--text);
  border-color: var(--status-neutral-border);
  background: transparent;
}

.history-row--completed {
  background: color-mix(in srgb, #22c55e 6%, transparent);
}

.history-row--cancelled {
  background: transparent;
}

.assign-modal-card {
  max-width: 560px;
}

.contact-reply-modal-card {
  width: min(1180px, calc(100vw - 1.25rem));
  max-width: 1180px;
  max-height: min(760px, 92dvh);
  display: grid;
  gap: 0.55rem;
}

.contact-reply-modal-card label {
  display: block;
  margin-top: 0.3rem;
  margin-bottom: 0.15rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.contact-reply-modal-card textarea {
  min-height: 360px;
  width: 100%;
  display: block;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--stroke) 55%, transparent);
  background: color-mix(in srgb, var(--fill-input-admin) 99%, transparent);
  box-shadow: none;
  padding: 0.95rem 1rem;
  line-height: 1.45;
}

.contact-reply-modal-card input {
  width: 100%;
  display: block;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--stroke) 60%, transparent);
  background: color-mix(in srgb, var(--fill-input-admin) 99%, transparent);
  padding: 0.7rem 0.85rem;
}

.contact-reply-modal-card textarea:focus,
.contact-reply-modal-card input:focus {
  border-color: color-mix(in srgb, var(--accent) 58%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent);
}

.eta-adjust-group {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid color-mix(in srgb, var(--stroke) 90%, transparent);
  border-radius: 999px;
  padding: 0.14rem 0.25rem;
  background: color-mix(in srgb, var(--fill-soft) 72%, transparent);
}

.eta-adjust-group .btn {
  min-width: 46px;
}

.eta-adjust-value {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.contact-query-row--done {
  opacity: 0.66;
}

.contact-state-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.08rem 0.5rem;
  font-size: 0.74rem;
  border: 1px solid var(--stroke);
  color: var(--muted);
}

.contact-state-pill--open {
  opacity: 1;
  color: var(--text);
  border-color: var(--status-open-border);
  background: transparent;
}

.contact-state-pill--done {
  opacity: 1;
  color: var(--text);
  border-color: var(--status-done-border);
  background: transparent;
}

@keyframes live-overdue-pill-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 color-mix(in srgb, #ef4444 0%, transparent);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px color-mix(in srgb, #ef4444 24%, transparent);
  }
}

@keyframes live-overdue-row-pulse {
  0%,
  100% {
    background: transparent;
  }
  50% {
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-row--overdue,
  .live-pill--overdue {
    animation: none;
  }
}

.narrow {
  max-width: 560px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

  .hero-inner .lede {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .booking-layout {
    grid-template-columns: 1fr;
  }

  .booking-pricing-inline {
    display: block;
    margin-top: 0.8rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--stroke);
  }

  .booking-pricing-inline .booking-summary__pricing {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'brand tools'
      'nav nav';
    padding-top: 0.68rem;
    padding-bottom: 0.68rem;
    row-gap: 0.5rem;
  }
  .brand {
    grid-area: brand;
  }
  .site-header-tools {
    grid-area: tools;
  }
  .nav {
    grid-area: nav;
    justify-self: stretch;
    justify-content: flex-end;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    font-size: 0.86rem;
    gap: 0.3rem;
    padding: 0.24rem;
    margin-top: 0;
    border-top: 0;
  }
  .nav::-webkit-scrollbar {
    display: none;
  }
  .nav a {
    white-space: nowrap;
    min-height: 36px;
    padding-inline: 0.64rem;
  }

  .admin-settings-actions {
    justify-content: stretch;
  }

  .admin-settings-actions .btn {
    width: 100%;
    min-width: 0;
  }

}

@media (max-width: 640px) {
  .form-card .row {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .card-grid,
  .fleet-grid {
    grid-template-columns: 1fr;
  }
  .toast {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    text-align: center;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .site-header {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* Must be last: `.admin-shell` / `.modal` set `display` and would otherwise override the
   HTML `[hidden]` attribute (same specificity, later rule wins). */
[hidden] {
  display: none !important;
}
