/* Caddy Club — Old Town Caddie Club — Sandstone & Forest Green Brand Identity Kit
 * Warm desert limestone cream palette with gold bronze accents and deep forest green ink.
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,400&family=Sacramento&family=Yellowtail&family=Rye&family=Sancreek&display=swap');

:root {
  /* Type roles: Refined quiet luxury typography (Cormorant Garamond + Inter/DM Sans) */
  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-ui: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Cream rope wordmark on night canvas (shared with rider nav; otcc-rope-wordmark.png). */
  --otcc-rope-wordmark-cream-filter: brightness(0) saturate(100%) invert(93%) sepia(12%) saturate(800%) hue-rotate(358deg) brightness(104%) contrast(98%);
  --font-script: 'Cormorant Garamond', Georgia, serif;
  --font-accent: 'Cormorant Garamond', Georgia, serif;

  /* Restrained Quiet Luxury Caddy Club Palette:
     - Warm near-black canvas (#0B120E)
     - Ivory text (#F8EFDE)
     - One muted sand/bronze accent (#C5A880)
     - Crisp white headings (#FFFFFF)
     - Subtle dark forest night tone (#121E17) */
  --brand-primary: #121E17;          /* Quiet dark night green */
  --brand-primary-dark: #070D0A;     /* Deep near-black */
  --brand-primary-light: #1C2D24;
  --brand-accent: #C5A880;           /* Muted Sand / Bronze Gold Accent */
  --brand-gold: #C5A880;             /* Muted Sand / Bronze */
  --brand-gold-dark: #9E825D;
  
  /* Quiet Luxury Surfaces: NO CONTAINERS. Content sits directly on background */
  --brand-surface: #0B120E;          /* Warm near-black canvas */
  --brand-surface-card: transparent; /* No card wrappers */
  --brand-surface-lifted: rgba(248, 239, 222, 0.05); /* Shaped input/button wells only */
  --brand-border: rgba(197, 168, 128, 0.28); /* Thin aged bronze border */
  --brand-border-strong: rgba(197, 168, 128, 0.55);
  --brand-divider: rgba(197, 168, 128, 0.16);

  /* Inks & Text - Tested for WCAG AA (4.5:1+) */
  --brand-text: #F8EFDE;             /* Warm Ivory Cream primary text */
  --brand-ink: #FFFFFF;              /* Crisp white headings */
  --brand-muted: #B8A58E;            /* Warm bronze taupe muted copy - WCAG AA compliant on #0B120E */
  --brand-muted-light: #D4BE9E;

  /* Floating surfaces over live map (Book venue rows, rider/driver PiP) — ride PiP night green */
  --cc-floating-surface-base: #0b100e;
  --cc-floating-surface: rgba(11, 16, 14, 0.96);

  /* Field Wells (Shaped Elements) */
  --field-bg: rgba(248, 239, 222, 0.06);
  --field-bg-hover: rgba(248, 239, 222, 0.09);
  --field-bg-focus: rgba(248, 239, 222, 0.04);

  /* Radii */
  --brand-radius-sm: 8px;
  --brand-radius-md: 14px;
  --brand-radius-lg: 20px;
  --brand-radius-pill: 999px;

  /* MCC Style: NO shadows, NO gradients, flat cards with thin borders */
  --shadow-card: none;
  --shadow-elevated: none;

  /* Motion */
  --ease-spring: cubic-bezier(0.34, 1.42, 0.5, 1);
  --dur-base: 220ms;

  /* Warm cream-gold neon edge on floating Book sheet + ride PiP (owner-approved exception) */
  --edge-glow-line: rgba(248, 239, 222, 0.75);
  --edge-glow-outer: rgba(248, 239, 222, 0.25);
  --edge-glow: inset 0 1px 0 var(--edge-glow-line), 0 0 14px var(--edge-glow-outer);
}

.cc-floating-edge-glow {
  box-shadow: var(--edge-glow);
}

/* Accessibility Utility: Screen-reader only */
.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

* { box-sizing: border-box; }

h1, h2, h3, h4, h5, h6, .brand-font, .card-title, .tagline {
  font-family: var(--font-display);
  text-wrap: balance;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  background-color: var(--brand-surface);
  color: var(--brand-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wordmark-high-contrast {
  filter: var(--otcc-rope-wordmark-cream-filter);
}

.shell-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.shell-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--brand-border);
  margin-bottom: 28px;
  z-index: 50;
}

.shell-header .logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #F8EFDE;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.shell-header .logo-group img {
  height: 40px;
  width: auto;
  border-radius: 4px;
  box-shadow: none;
}

[data-tenant-logo],
.auth-crest,
.landing-crest {
  box-shadow: none;
}

/* Hamburger button & accessible menu */
/* Default for dark canvas screens: cream fill + dark ink (WCAG AA 4.5:1 on #0B120E) */
.hamburger-btn {
  background: #F8EFDE;
  border: 1px solid rgba(248, 239, 222, 0.92);
  border-radius: var(--brand-radius-pill);
  color: #0B120E;
  min-height: 40px;
  min-width: 40px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: none !important;
  background-image: none !important;
  transition: background var(--dur-base) ease, border-color var(--dur-base) ease, transform var(--dur-base) ease;
}

.hamburger-btn .hamburger-icon {
  stroke: #0B120E;
}

.hamburger-btn:hover {
  background: #FFF8EB;
  border-color: #F8EFDE;
  color: #0B120E;
}

.hamburger-btn:focus-visible {
  outline: 2px solid #F8EFDE;
  outline-offset: 2px;
  background: #FFF8EB;
  color: #0B120E;
}

.hamburger-btn[aria-expanded="true"] {
  background: #FFF8EB;
  color: #0B120E;
  border-color: rgba(197, 168, 128, 0.85);
  outline: none;
}

.hamburger-btn[aria-expanded="true"] .hamburger-icon {
  stroke: #0B120E;
}

/* On landing hero over sunset sky: blended frosted button */
body.landing-view .shell-header .hamburger-btn {
  background: rgba(255, 250, 240, 0.22);
  border: 1px solid rgba(255, 250, 240, 0.35);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  color: #F8EFDE;
  font-weight: 500;
  font-size: 0.82rem;
}

body.landing-view .shell-header .hamburger-btn .hamburger-icon {
  stroke: #F8EFDE;
}

body.landing-view .shell-header .hamburger-btn:hover,
body.landing-view .shell-header .hamburger-btn:focus-visible,
body.landing-view .shell-header .hamburger-btn[aria-expanded="true"] {
  background: rgba(255, 250, 240, 0.35);
  color: #FFFFFF;
  border-color: rgba(255, 250, 240, 0.5);
}

body.landing-view .shell-header .hamburger-btn[aria-expanded="true"] .hamburger-icon {
  stroke: #FFFFFF;
}

.hamburger-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.header-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  max-width: calc(100vw - 32px);
  background: rgba(255, 250, 240, 0.22);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 250, 240, 0.28);
  border-radius: var(--brand-radius-md);
  padding: 8px 10px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: none !important;
  background-image: none !important;
  z-index: 1000;
}

.header-menu-dropdown.is-open {
  display: flex;
}

.header-menu-dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--brand-radius-sm);
  text-decoration: none;
  color: #F8EFDE !important;
  font-size: 0.85rem;
  font-weight: 500;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.header-menu-dropdown a:hover,
.header-menu-dropdown a:focus-visible {
  background: rgba(248, 239, 222, 0.12);
  color: #FFFFFF !important;
  outline: none;
}

.header-menu-dropdown a.active {
  background: transparent !important;
  color: #F8EFDE !important;
  font-weight: 700 !important;
  border: none !important;
  border-bottom: 2px solid var(--brand-accent) !important;
  border-radius: 0 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.header-menu-dropdown .menu-divider {
  height: 1px;
  background: rgba(248, 239, 222, 0.22);
  margin: 4px 0;
}

.header-menu-dropdown .sign-in-cart-pill {
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  margin-top: 4px;
  background: #0B120E !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  border: 1.5px solid var(--brand-accent) !important;
  padding: 8px 14px !important;
  border-radius: var(--brand-radius-pill) !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.header-menu-dropdown .sign-in-cart-pill:hover,
.header-menu-dropdown .sign-in-cart-pill:focus-visible {
  background: #1F3A2E !important;
  color: #FFFFFF !important;
  border-color: #FFFFFF !important;
}

.shell-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.shell-nav a {
  padding: 6px 14px;
  border-radius: var(--brand-radius-pill);
  text-decoration: none;
  color: var(--brand-muted);
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--brand-border);
  transition: all var(--dur-base) ease;
}

.shell-nav a:hover, .shell-nav a.active {
  background: var(--brand-primary);
  color: #F8EFDE;
  border-color: var(--brand-accent);
}

/* Sign in / Sign out button (zero emojis, quiet luxury) */
.sign-in-cart-pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--brand-radius-pill);
  background: var(--brand-primary);
  color: #F8EFDE !important;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid var(--brand-accent) !important;
  box-shadow: none !important;
  background-image: none !important;
}

/* OTP Verify fallback — night tokens, true #F8EFDE (never .btn disabled opacity) */
.auth-btn-primary,
#btn-verify-otp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 14px 24px;
  margin-top: 4px;
  border-radius: var(--brand-radius-pill);
  background: #121E17;
  color: #F8EFDE;
  font-size: 1.05rem;
  font-weight: 700;
  border: 1.5px solid var(--brand-border-strong);
  box-shadow: none;
  cursor: pointer;
  font-family: var(--font-ui);
  letter-spacing: 0.02em;
  opacity: 1;
  filter: none;
}

#btn-verify-otp .otp-verify-label {
  color: #F8EFDE;
  opacity: 1;
  font-weight: 700;
}

.auth-btn-primary:hover:not(:disabled),
#btn-verify-otp:hover:not(:disabled) {
  border-color: var(--brand-border-strong);
  background: var(--brand-primary-light);
}

#btn-verify-otp:disabled {
  opacity: 1 !important;
  cursor: not-allowed;
  pointer-events: none;
  background: #121E17;
  filter: none;
}

#btn-verify-otp:disabled:not(.is-verifying):not(.is-ready) .otp-verify-label {
  color: #B8A58E;
}

#btn-verify-otp.is-ready:not(:disabled) {
  border-color: var(--brand-border-strong);
}

#btn-verify-otp.is-ready:not(:disabled) .otp-verify-label,
#btn-verify-otp.is-verifying:disabled .otp-verify-label {
  color: #F8EFDE !important;
  opacity: 1 !important;
}

#btn-verify-otp.is-verifying:disabled {
  opacity: 1 !important;
  border-color: var(--brand-border-strong);
  cursor: wait;
  pointer-events: none;
}

.otp-rope-wordmark {
  display: block;
  max-width: 220px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  background: transparent;
}

.otp-subcopy,
.otp-muted-link,
.otp-resend-line {
  color: #D4BE9E;
}

.otp-demo-hint {
  font-size: 0.875rem;
  color: #B8A58E;
  margin: -8px 0 20px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.otp-status-slot {
  min-height: 1.45rem;
  margin: 12px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.otp-status-line {
  font-size: 1rem;
  color: #D4BE9E;
  text-align: center;
  margin: 0;
  line-height: 1.45;
  font-weight: 500;
  min-height: 1.45rem;
}

.otp-status-line:empty {
  visibility: hidden;
}

#otp-modal .otp-subcopy,
#otp-modal .otp-resend-line,
#otp-modal .otp-muted-link,
#otp-modal .otp-demo-hint,
#otp-modal .otp-status-line {
  font-size: 1rem;
  font-weight: 400;
}

#otp-modal .otp-back-link {
  font-size: 1rem;
  font-weight: 500;
}

#otp-modal .otp-headline {
  text-wrap: balance;
  overflow: hidden;
  padding-bottom: 2px;
}

#otp-modal .otp-headline::after {
  content: none;
}

/* OTP code field — solid #D4BE9E resting border (beats input[type="text"] brand-border) */
#otp-modal #otp-code-input.otp-input-field {
  border-style: solid !important;
  border-width: 2px !important;
  border-color: #D4BE9E !important;
  border-top-color: #D4BE9E !important;
  border-right-color: #D4BE9E !important;
  border-bottom-color: #D4BE9E !important;
  border-left-color: #D4BE9E !important;
  outline: none !important;
  box-shadow: none !important;
}

#otp-modal #otp-code-input.otp-input-field:focus {
  border-color: #D4BE9E !important;
  border-top-color: #D4BE9E !important;
  border-right-color: #D4BE9E !important;
  border-bottom-color: #D4BE9E !important;
  border-left-color: #D4BE9E !important;
  background: rgba(248, 239, 222, 0.08);
}

/* HARD RULE (Patrick): NO CONTAINERS.
   No boxed cards, bordered panels, white sheet wrappers, or nested boxes.
   Content sits directly on the background, separated by spacing and type hierarchy.
   Big buttons, chips and input fields are the only shaped elements. */
.card,
.where-to-card,
.otp-card,
.rider-map-card,
.metric-card,
.fleet-stat-card,
.onboard-box,
.callout-box,
.quiz-question,
.role-card,
.ride-status-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 24px;
}

.pill-badge {
  display: inline-block;
  padding: 0;
  background: transparent !important;
  color: var(--brand-accent);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none !important;
}

/* Buttons: Quiet Luxury refined pills, understated confidence */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 12px 24px;
  border-radius: var(--brand-radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  box-shadow: none !important;
  background-image: none !important;
  transition: all var(--dur-base) ease;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* OTP verify is not a .btn — keep full-opacity cream label if combined elsewhere */
#btn-verify-otp.btn:disabled,
#btn-verify-otp.btn[disabled] {
  opacity: 1 !important;
  pointer-events: none;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #F8EFDE;
  border-color: var(--brand-accent);
}

.btn-primary:hover {
  background-color: var(--brand-primary-dark);
  border-color: #FFFFFF;
}

.btn-secondary {
  background-color: rgba(248, 239, 222, 0.05);
  color: #F8EFDE;
  border-color: var(--brand-border);
}

.btn-secondary:hover {
  background-color: rgba(248, 239, 222, 0.1);
  border-color: var(--brand-accent);
}

/* Form inputs & fields (Shaped elements) */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
  background: rgba(248, 239, 222, 0.05);
  color: #FFFFFF;
  border: 1.5px solid var(--brand-border);
  border-radius: var(--brand-radius-md);
  outline: none;
  font-family: var(--font-ui);
  transition: border-color var(--dur-base) ease, background var(--dur-base) ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-accent);
  background: rgba(248, 239, 222, 0.08);
}

/* Tables in dark quiet luxury style */
.table-styled th,
.data-table th {
  background: transparent !important;
  color: var(--brand-accent) !important;
  border-bottom: 1.5px solid var(--brand-divider) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.table-styled td,
.data-table td {
  border-bottom: 1px solid var(--brand-divider) !important;
  color: #F8EFDE !important;
}

.badge-tag {
  display: inline-block;
  padding: 0;
  background: transparent !important;
  color: var(--brand-accent) !important;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-tag.active, .badge-tag.approved, .badge-tag.pass {
  color: var(--brand-accent) !important;
}

.badge-tag.screening, .badge-tag.pending {
  color: #D97706 !important;
}

.badge-tag.expiring {
  color: #DC2626 !important;
}

/* Footer */
.shell-footer {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid var(--brand-border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--brand-muted);
}

.shell-footer a {
  color: #D4BE9E;
  text-decoration: none;
}

.shell-footer a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

::placeholder {
  color: #B8A58E !important;
  opacity: 1;
}

/* Global balanced text wrapping: Patrick's rule across headings, taglines, buttons */
h1, h2, h3, h4, h5, h6,
.hero-headline,
.auth-title,
.where-to-title,
.route-title,
.pill-badge,
.btn,
.tagline,
[data-tenant-tagline] {
  text-wrap: balance;
}

/* Generic Rideshare Landing Hero */
.hero-landing-wrap {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

/* ==============================================================
   MOBILE (<600px): Clean vertical flex column filling 100dvh
   (a) Top sky area holding the stacked rope wordmark
   (b) Photo middle area feathered into sky above and dark below
   (c) Dark bottom block (#0E1814) pinned with safe-area padding
   ============================================================== */
@media (max-width: 599px) {
  .hero-landing-wrap {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #0B120E;
    overflow: visible;
    position: relative;
  }

  /* (a) Rope wordmark overlays hero photo under safe area (no empty band above photo) */
  .hero-top-sky {
    position: absolute;
    top: calc(24px + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    width: 100%;
    background: transparent;
    padding: 8px 16px 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 12;
    pointer-events: none;
  }

  .hero-top-sky .hero-wordmark-container {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: min(88vw, 400px);
    max-width: 88vw;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-wordmark-desktop {
    display: none;
  }

  .hero-wordmark-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
  }

  .hero-wordmark-part-oldtown {
    width: min(48vw, 210px);
    height: auto;
    display: block;
    margin: 4px auto 0;
    filter: drop-shadow(0 2px 4px rgba(46, 28, 14, 0.5));
  }

  .hero-wordmark-part-caddieclub {
    width: min(76vw, 330px);
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 2px 4px rgba(46, 28, 14, 0.5));
  }

  /* (b) Photo full-bleed from top of viewport (under safe area), behind wordmark + bottom block */
  .hero-photo-middle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    background: transparent;
  }

  .hero-photo-middle .hero-bg-img {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    display: block;
    -webkit-mask-image: linear-gradient(to bottom,
      black 0%,
      black 65%,
      rgba(0, 0, 0, 0.7) 80%,
      rgba(0, 0, 0, 0.2) 92%,
      transparent 100%);
    mask-image: linear-gradient(to bottom,
      black 0%,
      black 65%,
      rgba(0, 0, 0, 0.7) 80%,
      rgba(0, 0, 0, 0.2) 92%,
      transparent 100%);
  }

  /* (c) Dark bottom block (#0B120E) pinned to bottom with safe-area padding */
  .hero-bottom-block {
    flex: 0 0 auto;
    width: 100%;
    background-color: #0B120E;
    padding: 12px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    position: relative;
    z-index: 10;
    text-align: left;
    box-shadow: 0 -24px 48px #0B120E;
  }

  .hero-bottom-block .hero-headline {
    font-family: var(--font-ui);
    font-size: clamp(1.05rem, 3.4vw, 2.05rem);
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.12;
    margin: 0 0 10px;
    letter-spacing: -0.042em;
    white-space: normal;
    text-wrap: balance;
    max-width: 100%;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }

  .hero-bottom-block .hero-fore-form {
    margin-top: 6px;
    width: 100%;
    box-sizing: border-box;
  }
}

/* ==============================================================
   DESKTOP & TABLET (>=600px): Preserves wide cover hero layout
   ============================================================== */
@media (min-width: 600px) {
  .hero-landing-wrap {
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: #12241C;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
  }

  .hero-top-sky {
    position: static;
  }

  .hero-wordmark-container {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: min(88vw, 700px);
    max-width: 88vw;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }

  .hero-wordmark-desktop {
    display: block;
    width: 100%;
    max-width: min(88vw, 700px);
    height: auto;
    filter: drop-shadow(0 1px 2px rgba(46, 28, 14, 0.4));
  }

  .hero-wordmark-mobile {
    display: none;
  }

  .hero-photo-middle {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }

  .hero-photo-middle .hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 65%;
  }

  .hero-bottom-block {
    position: relative;
    z-index: 10;
    padding: 120px 24px 36px;
    background: linear-gradient(to top, rgba(14, 24, 20, 0.98) 0%, rgba(14, 24, 20, 0.85) 45%, rgba(14, 24, 20, 0.25) 75%, transparent 100%);
    text-align: left;
    box-sizing: border-box;
    width: 100%;
  }

  .hero-bottom-block .hero-headline {
    font-family: var(--font-ui);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.12;
    margin: 0 0 14px;
    max-width: 540px;
    letter-spacing: -0.03em;
    white-space: nowrap;
    text-wrap: nowrap;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  }

  .hero-bottom-block .hero-fore-form {
    margin-top: 14px;
    max-width: 440px;
    width: 100%;
    box-sizing: border-box;
  }
}

@media (min-width: 960px) {
  .hero-landing-wrap {
    min-height: 85vh;
    border-radius: var(--brand-radius-lg);
    margin: 0 auto 28px;
    max-width: 960px;
  }
}

.hero-fore-form {
  margin-top: 10px;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .hero-fore-form {
    margin-top: 14px;
    max-width: 440px;
  }
}

.hero-input-row {
  display: flex;
  align-items: center;
  background: rgba(248, 239, 222, 0.08);
  border: none;
  border-radius: var(--brand-radius-pill);
  padding: 4px 6px;
  box-shadow: none !important;
  width: 100%;
  box-sizing: border-box;
}

input[type="tel"].hero-phone-input,
.hero-phone-input {
  flex: 1 1 0%;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 12px 14px;
  font-size: 16px;
  font-family: var(--font-ui);
  color: #F8EFDE !important;
  font-weight: 600;
  outline: none;
  box-sizing: border-box;
  caret-color: #F8EFDE !important;
}

input[type="tel"].hero-phone-input:focus,
.hero-phone-input:focus {
  background: transparent !important;
  outline: none !important;
  color: #F8EFDE !important;
}

.hero-phone-input::selection {
  background: rgba(197, 168, 128, 0.45) !important;
  color: #0B120E !important;
}

.hero-phone-input::-moz-selection {
  background: rgba(197, 168, 128, 0.45) !important;
  color: #0B120E !important;
}

.hero-phone-input::placeholder {
  color: #F8EFDE;
  font-weight: 500;
  font-size: 16px;
  opacity: 0.78;
}

.hero-phone-input:-webkit-autofill,
.hero-phone-input:-webkit-autofill:hover, 
.hero-phone-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #F8EFDE !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(248, 239, 222, 0.08) inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

.hero-btn-fore {
  flex-shrink: 0;
  padding: 13px 28px;
  background-color: #F8EFDE;
  color: #0B120E;
  border: none;
  border-radius: var(--brand-radius-pill);
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: normal;
  cursor: pointer;
  box-shadow: none !important;
  transition: background var(--dur-base) ease;
  white-space: nowrap;
  line-height: 1.2;
}

.hero-btn-fore:hover {
  background-color: #FFF8EE;
  color: #0B120E;
  border: none;
}

.hero-footnote {
  font-size: 16px;
  line-height: 1.5;
  color: #F8EFDE;
  font-weight: 500;
  margin-top: 14px;
  letter-spacing: normal;
  text-wrap: balance;
  border: none;
  border-top: none;
  box-shadow: none;
}

body.landing-view .hero-fore-form {
  border: none;
  box-shadow: none;
}

/* Cart Selector & Map Cards */
.rider-map-card {
  background: var(--brand-surface-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--brand-radius-md);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: none !important;
}

.rider-map-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--brand-border);
  background: var(--brand-surface-lifted);
  flex-wrap: wrap;
  gap: 8px;
}

.rider-map-container {
  width: 100%;
  height: 280px;
  position: relative;
  background: #1A231F;
}

@media (max-width: 480px) {
  .rider-map-container {
    height: 240px;
  }
}

.map-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-accent);
}

.map-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-accent);
}

.cart-size-card {
  background: var(--brand-surface-card);
  border: 1.5px solid var(--brand-border);
  border-radius: var(--brand-radius-md);
  padding: 16px 18px;
  cursor: pointer;
  transition: all var(--dur-base) ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.cart-size-card:hover {
  border-color: var(--brand-accent);
  background: #FFFFFF;
}

.cart-size-card.selected {
  border-color: var(--brand-primary);
  background: #FFFFFF;
  border-width: 2px;
}

.cart-size-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--brand-surface);
}

/* Stripe Payment Element Box */
.stripe-pay-bar {
  background: var(--brand-surface-lifted);
  border: 1px solid var(--brand-border);
  border-radius: var(--brand-radius-md);
  padding: 14px 16px;
  margin: 18px 0;
}

.stripe-pay-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #1F3A2E;
}

/* Driver & Fleet Portal Styling */
.driver-request-banner {
  background: var(--brand-surface-card);
  border: 2px solid var(--brand-accent);
  border-radius: var(--brand-radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  animation: pulse-border 2s infinite ease-in-out;
}

@keyframes pulse-border {
  0% { border-color: var(--brand-accent); }
  50% { border-color: var(--brand-primary); }
  100% { border-color: var(--brand-accent); }
}

.driver-trip-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.driver-step-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--brand-surface-lifted);
  border-radius: var(--brand-radius-sm);
  border: 1px solid var(--brand-border);
}

.step-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--brand-primary);
  color: #FFF;
}

.step-indicator.done {
  background: var(--brand-accent);
}

.fleet-stat-card {
  background: var(--brand-surface-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--brand-radius-md);
  padding: 18px;
  box-shadow: none !important;
}

.fleet-stat-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand-text);
  font-family: var(--font-display);
  margin: 4px 0 2px;
}

/* Driver portal: headings and figures on night canvas (WCAG AA on #0B120E) */
body.driver-portal h1,
body.driver-portal h2,
body.driver-portal h3,
body.driver-portal .driver-page-heading {
  color: var(--brand-text);
}

body.driver-portal .fleet-stat-val,
body.driver-portal .driver-stat-figure {
  color: var(--brand-text);
}

body.driver-portal .driver-portal-status {
  color: var(--brand-text);
  font-weight: 600;
  font-size: 1rem;
  text-wrap: balance;
}

body.driver-portal .driver-portal-status--strong {
  font-weight: 700;
}

body.driver-portal .driver-status-positive,
body.driver-portal .driver-accent-positive {
  color: var(--brand-text);
  font-weight: 600;
  font-size: 1rem;
}

body.driver-portal .portal-rope-wordmark,
body.fleet-portal .portal-rope-wordmark {
  height: 22px;
  width: auto;
  max-width: min(168px, 48vw);
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) saturate(100%) invert(93%) sepia(12%) saturate(800%) hue-rotate(358deg) brightness(104%) contrast(98%);
}

body.driver-portal .driver-portal-header,
body.fleet-portal .shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Driver + fleet: plain cream Menu control (no filled pill), aligned with rider chrome */
body.driver-portal .shell-header .hamburger-btn,
body.fleet-portal .shell-header .hamburger-btn {
  background: transparent;
  border: none;
  border-radius: 0;
  color: #F8EFDE;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: normal;
  min-height: 44px;
  padding: 10px 4px;
  box-shadow: none !important;
}

body.driver-portal .shell-header .hamburger-btn .hamburger-icon,
body.fleet-portal .shell-header .hamburger-btn .hamburger-icon {
  stroke: #F8EFDE;
}

body.driver-portal .shell-header .hamburger-btn:hover,
body.driver-portal .shell-header .hamburger-btn:focus-visible,
body.driver-portal .shell-header .hamburger-btn[aria-expanded="true"],
body.fleet-portal .shell-header .hamburger-btn:hover,
body.fleet-portal .shell-header .hamburger-btn:focus-visible,
body.fleet-portal .shell-header .hamburger-btn[aria-expanded="true"] {
  background: transparent;
  border: none;
  color: #FFFFFF;
  outline: 2px solid #F8EFDE;
  outline-offset: 2px;
}

body.driver-portal .shell-header .hamburger-btn[aria-expanded="true"] .hamburger-icon,
body.fleet-portal .shell-header .hamburger-btn[aria-expanded="true"] .hamburger-icon {
  stroke: #FFFFFF;
}

body.driver-portal .driver-portal-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 12px;
}

body.driver-portal .compliance-label {
  color: var(--brand-text);
  font-size: 1rem;
}

body.driver-portal .compliance-detail {
  font-size: 1rem;
  color: var(--brand-muted-light);
  margin-top: 2px;
}

body.driver-portal .driver-secondary-text {
  font-size: 1rem;
  color: var(--brand-muted-light);
}

body.driver-portal .driver-shift-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 18px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-ui);
  border: none !important;
  box-shadow: none !important;
  background: transparent;
  color: var(--brand-muted-light);
  cursor: pointer;
  border-radius: var(--brand-radius-pill);
}

body.driver-portal .driver-shift-toggle--active {
  background: #F8EFDE !important;
  color: #0B120E !important;
}

body.driver-portal .driver-shift-toggle:hover:not(.driver-shift-toggle--active) {
  color: var(--brand-text);
}

body.driver-portal.driver-off-duty-home {
  background-color: #0B120E !important;
  color: #F8EFDE !important;
}

body.driver-portal.driver-off-duty-home a {
  color: #F8EFDE;
}

body.driver-portal.driver-off-duty-home a.driver-go-on-duty.caddie-portal-primary {
  color: #0B120E !important;
}

body.driver-portal.driver-off-duty-home .shell-container {
  background-color: transparent !important;
  padding-left: 18px;
  padding-right: 18px;
}

body.driver-portal.driver-off-duty-home .shell-header {
  border-bottom: none;
  margin-bottom: 16px;
}

body.driver-portal.driver-off-duty-home .driver-off-duty-main {
  padding-top: 12px;
}

body.driver-portal .driver-off-duty-kicker {
  margin: 0 0 8px;
  font-size: 1rem;
}

body.driver-portal.driver-off-duty-home .driver-off-duty-kicker,
body.driver-portal.driver-off-duty-home .portal-secondary {
  color: #B8A58E;
}

body.driver-portal.driver-off-duty-home .driver-secondary-text,
body.driver-portal.driver-off-duty-home .driver-off-duty-lede {
  color: #D4BE9E;
  font-size: 1rem;
}

body.driver-portal.driver-off-duty-home .driver-off-duty-title {
  color: #F8EFDE;
}

body.driver-portal.driver-off-duty-home a.driver-go-on-duty.caddie-portal-primary {
  text-decoration: none !important;
  background: #F8EFDE !important;
  color: #0B120E !important;
  font-weight: 700;
  box-shadow: none !important;
  border: none !important;
}

body.driver-portal .driver-off-duty-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 12px;
}

body.driver-portal .driver-off-duty-lede {
  margin: 0 0 28px;
  max-width: 32ch;
  font-size: 1rem;
  line-height: 1.45;
}

body.driver-portal .driver-off-duty-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

body.driver-portal .driver-go-on-duty {
  text-align: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
}

body.driver-portal.driver-off-duty-home #driver-account-link.caddie-portal-text-action {
  color: #F8EFDE !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  align-self: center;
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* Fleet owner home: same night canvas as driver account / off-duty */
body.fleet-portal.fleet-home-screen {
  background-color: #0B120E !important;
  color: #F8EFDE !important;
}

body.fleet-portal.fleet-home-screen .shell-container {
  background-color: transparent !important;
  padding-left: 18px;
  padding-right: 18px;
}

body.fleet-portal.fleet-home-screen .shell-header {
  border-bottom: none;
  margin-bottom: 16px;
}

body.fleet-portal.fleet-home-screen .fleet-page-title,
body.fleet-portal.fleet-home-screen .driver-page-heading,
body.fleet-portal.fleet-home-screen h2 {
  color: #F8EFDE !important;
}

body.fleet-portal.fleet-home-screen .portal-secondary,
body.fleet-portal.fleet-home-screen .fleet-stat-label,
body.fleet-portal.fleet-home-screen .portal-stat-note,
body.fleet-portal.fleet-home-screen .fleet-owner-hours {
  color: #D4BE9E !important;
  font-size: 1rem !important;
}

body.fleet-portal.fleet-home-screen .fleet-stat-val,
body.fleet-portal.fleet-home-screen .table-styled td,
body.fleet-portal.fleet-home-screen .table-styled td strong,
body.fleet-portal.fleet-home-screen .driver-portal-status,
body.fleet-portal.fleet-home-screen .driver-secondary-text {
  color: #F8EFDE !important;
  font-family: var(--font-ui) !important;
  font-size: 1rem !important;
  font-weight: 600;
  line-height: 1.45;
}

body.fleet-portal.fleet-home-screen .fleet-stat-val.fleet-stat-val--empty {
  color: #D4BE9E !important;
  font-weight: 500;
}

body.fleet-portal.fleet-home-screen .table-styled th {
  color: #B8A58E !important;
  font-size: 1rem !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  background: transparent !important;
  border-bottom-color: rgba(197, 168, 128, 0.16) !important;
}

body.fleet-portal.fleet-home-screen .table-styled td {
  border-bottom-color: rgba(197, 168, 128, 0.16) !important;
}

body.fleet-portal.fleet-home-screen .fleet-stat-card,
body.fleet-portal.fleet-home-screen .fleet-table-block {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.fleet-portal.fleet-home-screen .fleet-ops-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

body.fleet-portal.fleet-home-screen .fleet-ops-actions .caddie-portal-primary,
body.fleet-portal.fleet-home-screen .fleet-ops-actions .btn-primary {
  width: 100%;
  box-sizing: border-box;
}

body.fleet-portal.fleet-home-screen .fleet-ops-actions .caddie-portal-text-action,
body.fleet-portal.fleet-home-screen .fleet-ops-actions .btn-secondary {
  width: 100%;
  justify-content: center;
  color: #F8EFDE !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  padding: 10px 0;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.fleet-portal.fleet-home-screen .btn {
  border-radius: var(--brand-radius-pill);
}

body.fleet-portal.fleet-home-screen .fleet-invite-caddie-btn.btn {
  border-radius: 0;
}

body.fleet-portal.fleet-home-screen .badge-tag,
body.fleet-portal.fleet-home-screen .badge-tag.pass {
  background: transparent !important;
  color: #F8EFDE !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-size: 1rem !important;
  padding: 0 !important;
  border: none !important;
}

body.fleet-portal.fleet-home-screen .fleet-empty-cell {
  color: #D4BE9E;
  font-size: 1rem;
  line-height: 1.45;
  margin: 0;
  padding: 12px 0 !important;
  display: block;
  width: 100%;
  text-indent: 0;
  text-wrap: balance;
}

body.fleet-portal.fleet-home-screen .fleet-section-heading {
  margin: 0 0 12px;
  font-size: 1.125rem;
}

body.fleet-portal.fleet-home-screen .fleet-table-block--carts {
  margin-bottom: 20px;
}

body.fleet-portal.fleet-home-screen .fleet-staff-mvr-note {
  margin: 0 0 12px;
  padding: 0;
  text-align: left;
  font-size: 1rem !important;
  line-height: 1.35;
  width: 100%;
}

body.fleet-portal.fleet-home-screen .fleet-disclosure-list {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
}

body.fleet-portal.fleet-home-screen .fleet-disclosure-item {
  border-bottom: 1px solid rgba(197, 168, 128, 0.16);
}

body.fleet-portal.fleet-home-screen .fleet-disclosure-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 0;
  margin: 0;
  background: transparent;
  border: none;
  color: #F8EFDE;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

body.fleet-portal.fleet-home-screen .fleet-disclosure-trigger:focus-visible {
  outline: 2px solid #F8EFDE;
  outline-offset: 2px;
}

body.fleet-portal.fleet-home-screen .fleet-disclosure-summary {
  font-weight: 600;
  flex: 1;
  text-wrap: balance;
}

body.fleet-portal.fleet-home-screen .fleet-disclosure-hint {
  flex-shrink: 0;
  color: #D4BE9E;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.fleet-portal.fleet-home-screen .fleet-disclosure-panel {
  padding: 0 0 12px;
}

body.fleet-portal.fleet-home-screen .fleet-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  font-size: 1rem;
}

body.fleet-portal.fleet-home-screen .fleet-detail-label {
  color: #B8A58E;
  font-weight: 600;
  flex-shrink: 0;
}

body.fleet-portal.fleet-home-screen .fleet-detail-value {
  color: #F8EFDE;
  text-align: right;
  text-wrap: balance;
}

body.driver-portal.driver-account-screen .driver-account-main {
  padding-top: 8px;
}

body.driver-portal .driver-account-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 16px;
}

body.driver-portal .driver-account-shift-summary {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-wrap: balance;
}

body.driver-portal .driver-shift-summary-line {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

body.driver-portal .driver-shift-summary-nowrap {
  white-space: nowrap;
}

body.driver-portal .driver-account-earnings[hidden],
body.driver-portal .driver-account-earnings-row[hidden],
body.driver-portal .driver-refer-home-row[hidden],
body.driver-portal #drv-stat-fares-note[hidden],
body.driver-portal #drv-stat-trips-region[hidden] {
  display: none !important;
}

body.driver-portal .driver-account-compliance {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
  font-size: 1rem;
}

body.driver-portal .driver-account-earnings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

body.driver-portal .driver-account-earnings-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

body.driver-portal .driver-account-earnings-row .driver-stat-figure {
  text-align: right;
  flex-shrink: 0;
  margin-left: auto;
}

body.driver-portal .driver-refer-home-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: transparent;
}

body.driver-portal .driver-refer-home-row .caddie-portal-text-action {
  flex-shrink: 0;
}

body.driver-portal.driver-referral-screen .shell-container {
  min-height: 100dvh;
}

body.driver-portal .driver-referral-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.driver-portal .driver-referral-back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

body.driver-portal .driver-referral-screen-main {
  padding-top: 8px;
}

body.driver-portal .driver-referral-screen-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 24px;
}

body.driver-portal .driver-referral-screen-qr {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 0 24px;
  object-fit: contain;
}

body.driver-portal .driver-referral-screen-earnings {
  margin-bottom: 20px;
}

body.driver-portal .driver-referral-screen-earnings .driver-stat-figure {
  font-size: 1.25rem;
  font-weight: 800;
  margin-top: 4px;
}

body.driver-portal .driver-referral-screen-terms {
  margin: 20px 0 0;
  max-width: 36ch;
  font-size: 1rem;
  line-height: 1.45;
}

body.driver-portal .shell-footer,
body.fleet-portal .shell-footer {
  display: none;
}

body.driver-portal.demo-profile-switcher-mounted .shell-footer.driver-portal-footer-reserve {
  display: block;
  min-height: 48px;
  visibility: hidden;
  pointer-events: none;
}

body.driver-portal.demo-profile-switcher-mounted .shell-container {
  min-height: calc(100dvh + 120px);
  padding-bottom: calc(12px + 44px + 24px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

@media (max-width: 480px) {
  body.driver-portal.demo-profile-switcher-mounted .shell-container {
    min-height: calc(100dvh + 200px);
    padding-bottom: calc(20px + var(--demo-switcher-reserve, 60px) + 48px + env(safe-area-inset-bottom, 0px));
  }

  body.fleet-portal.demo-profile-switcher-mounted .shell-container {
    min-height: calc(100dvh + 200px);
    padding-bottom: calc(24px + var(--demo-switcher-reserve, 60px) + 56px + env(safe-area-inset-bottom, 0px));
  }
}

body.fleet-portal.demo-profile-switcher-mounted .shell-footer.fleet-portal-footer-reserve {
  display: block;
  min-height: 48px;
  visibility: hidden;
  pointer-events: none;
}

body.fleet-portal.demo-profile-switcher-mounted .shell-container {
  min-height: calc(100dvh + 120px);
  padding-bottom: calc(20px + var(--demo-switcher-reserve, 60px) + 32px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

body.fleet-portal.demo-profile-switcher-mounted #fleet-main {
  padding-bottom: calc(var(--demo-switcher-reserve, 60px) + 16px);
}

body.driver-portal .driver-referral-section {
  margin-top: 28px;
  padding: 0;
  background: transparent;
  border: none;
}

body.driver-portal .driver-referral-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

body.driver-portal .driver-referral-title {
  font-size: 1.125rem;
  display: block;
  margin: 8px 0 4px;
}

body.driver-portal .driver-referral-lede {
  margin: 0;
  max-width: 36ch;
}

body.driver-portal .driver-referral-earned {
  text-align: right;
}

body.driver-portal .driver-referral-earned-val {
  font-size: 1.25rem;
  font-weight: 800;
}

body.driver-portal .driver-referral-grid {
  display: grid;
  grid-template-columns: minmax(100px, 120px) 1fr;
  gap: 16px;
  align-items: start;
  max-width: 100%;
}

body.driver-portal .driver-referral-qr-wrap {
  text-align: center;
  max-width: 120px;
  background: transparent;
  border: none;
  padding: 0;
}

body.driver-portal .driver-referral-qr-img {
  width: 100px;
  height: 100px;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: var(--brand-radius-sm);
}

body.driver-portal .driver-referral-code {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-text);
  margin-top: 6px;
}

body.driver-portal .driver-referral-body {
  font-size: 1rem;
  color: var(--brand-muted-light);
  margin-bottom: 8px;
}

body.driver-portal .driver-referral-body strong {
  color: var(--brand-text);
  font-weight: 700;
}

body.driver-portal .driver-referral-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

body.driver-portal .driver-referral-link-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 1rem;
  border: none;
  border-radius: var(--brand-radius-sm);
  background: var(--field-bg);
  color: var(--brand-text);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

body.driver-portal .driver-copy-link-btn {
  flex-shrink: 0;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 16px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-ui);
  border: none !important;
  background: transparent;
  color: var(--brand-accent);
  cursor: pointer;
  border-radius: var(--brand-radius-pill);
}

body.driver-portal .driver-copy-link-btn:hover {
  color: var(--brand-text);
}

body.driver-portal .driver-referral-progress {
  margin-top: 20px;
  padding-top: 0;
  border: none;
}

body.driver-portal .driver-referral-progress-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-text);
  margin-bottom: 10px;
}

body.driver-portal .driver-referral-progress-row {
  margin-top: 10px;
}

body.driver-portal .driver-referral-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.driver-portal .driver-referral-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(248, 239, 222, 0.12);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}

body.driver-portal .driver-referral-progress-fill {
  height: 100%;
  background: var(--brand-accent);
}

body.driver-portal .shell-footer {
  font-size: 1rem;
  color: var(--brand-muted-light);
}

body.driver-portal .pill-badge.driver-solid-badge {
  background: #0B120E !important;
  color: #F8EFDE !important;
  border: 1px solid var(--brand-accent);
  font-size: 1rem;
  padding: 4px 10px;
  border-radius: var(--brand-radius-pill);
}

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

.table-styled th {
  text-align: left;
  padding: 10px 12px;
  background: var(--brand-surface-lifted);
  color: var(--brand-muted);
  font-weight: 700;
  border-bottom: 1.5px solid var(--brand-border);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.table-styled td {
  padding: 12px;
  border-bottom: 1px solid var(--brand-border);
}

.badge-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-tag.active, .badge-tag.approved, .badge-tag.pass {
  background: #DEF7EC;
  color: #03543F;
}

.badge-tag.screening, .badge-tag.pending {
  background: #FEF08A;
  color: #854D0E;
}

.badge-tag.expiring {
  background: #FEE2E2;
  color: #991B1B;
}

/* On-palette checkboxes and radios (Quiet Luxury, no native blue) */
input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border: 1.5px solid var(--brand-accent);
  background: rgba(248, 239, 222, 0.05);
  margin: 0;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: all var(--dur-base) ease;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"] {
  border-radius: 6px;
}

input[type="checkbox"]:checked {
  background: var(--brand-accent);
}

input[type="checkbox"]:checked::before {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 2.5px solid #0B120E;
  border-bottom: 2.5px solid #0B120E;
  transform: rotate(-45deg) translate(1px, -1px);
}

input[type="radio"]:checked {
  background: transparent;
  border-color: var(--brand-accent);
}

input[type="radio"]:checked::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-accent);
}

/* Stepper labels without orphan wraps */
.onboard-step-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
  position: relative;
  gap: 8px;
}

.onboard-step-node {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--brand-muted);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand-divider);
  font-weight: 600;
  white-space: nowrap;
}

.onboard-step-node.active {
  color: #FFFFFF;
  border-bottom-color: var(--brand-accent);
  font-weight: 700;
}

.onboard-step-node.done {
  color: var(--brand-accent);
  border-bottom-color: var(--brand-accent);
}

/* Caddie Club live portals (driver, fleet, onboard): rider night tokens, no containers */
body.driver-portal,
body.fleet-portal,
body.onboard-portal {
  background-color: var(--brand-surface);
  color: var(--brand-text);
  font-family: var(--font-ui);
  font-size: 1rem;
}

body.driver-portal .shell-header,
body.fleet-portal .shell-header,
body.onboard-portal .shell-header {
  border-bottom: none;
  color: var(--brand-text);
}

body.driver-portal .shell-footer,
body.fleet-portal .shell-footer,
body.onboard-portal .shell-footer {
  border-top: none;
  font-size: 1rem;
  color: var(--brand-muted-light);
}

body.driver-portal h1,
body.driver-portal h2,
body.driver-portal h3,
body.fleet-portal h1,
body.fleet-portal h2,
body.fleet-portal h3,
body.fleet-portal h4,
body.onboard-portal h1,
body.onboard-portal h2,
body.onboard-portal h3,
body.onboard-portal h4,
body.fleet-portal .driver-page-heading,
body.onboard-portal .driver-page-heading {
  color: var(--brand-text);
  font-family: var(--font-display);
}

body.fleet-portal .driver-page-heading {
  font-size: 1.125rem;
}

body.fleet-portal .fleet-page-title {
  font-size: 1.25rem;
  margin: 0 0 16px;
}

body.fleet-portal .fleet-owner-meta {
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.fleet-portal .fleet-owner-meta-line {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  text-wrap: balance;
}

body.fleet-portal .fleet-owner-hours {
  color: var(--brand-muted-light);
}

body.fleet-portal .fleet-ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

body.fleet-portal .fleet-stat-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-muted-light);
  text-transform: none !important;
  letter-spacing: normal;
}

body.fleet-portal .fleet-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

body.driver-portal .driver-request-banner {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 0 28px !important;
  margin: 0 0 28px !important;
  width: 100%;
  animation: none !important;
  box-shadow: none !important;
}

body.driver-portal .driver-offer-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  width: 100%;
}

body.driver-portal .caddie-portal-primary,
body.fleet-portal .caddie-portal-primary,
body.onboard-portal .caddie-portal-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  width: 100%;
  padding: 12px 20px;
  background: #F8EFDE !important;
  color: #0B120E !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: var(--brand-radius-pill);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

body.driver-portal .caddie-portal-text-action,
body.fleet-portal .caddie-portal-text-action,
body.onboard-portal .caddie-portal-text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 16px;
  background: transparent !important;
  color: var(--brand-muted-light) !important;
  border: none !important;
  box-shadow: none !important;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

body.driver-portal .caddie-portal-text-action:hover,
body.fleet-portal .caddie-portal-text-action:hover,
body.onboard-portal .caddie-portal-text-action:hover {
  color: var(--brand-text) !important;
}

body.driver-portal .btn-primary,
body.fleet-portal .btn-primary,
body.onboard-portal .btn-primary {
  background: #F8EFDE !important;
  color: #0B120E !important;
  border: none !important;
}

body.driver-portal .btn-secondary,
body.fleet-portal .btn-secondary,
body.onboard-portal .btn-secondary {
  background: transparent !important;
  color: var(--brand-muted-light) !important;
  border: none !important;
}

body.driver-portal .badge-tag,
body.fleet-portal .badge-tag,
body.onboard-portal .badge-tag,
body.driver-portal .badge-tag.pass,
body.fleet-portal .badge-tag.pass,
body.onboard-portal .badge-tag.pass,
body.driver-portal .badge-tag.active,
body.fleet-portal .badge-tag.active,
body.onboard-portal .badge-tag.active {
  background: transparent !important;
  color: var(--brand-accent) !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 1rem !important;
  letter-spacing: 0.06em;
}

body.driver-portal .driver-step-row,
body.fleet-portal .driver-step-row {
  background: transparent !important;
  border: none !important;
  padding: 12px 0 !important;
}

body.driver-portal .fleet-stat-card,
body.fleet-portal .fleet-stat-card,
body.onboard-portal .fleet-stat-card,
body.driver-portal .card,
body.fleet-portal .card,
body.onboard-portal .card,
body.fleet-portal .rider-map-card,
body.fleet-portal .brand-preview-box {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.fleet-portal.fleet-home-screen .fleet-stat-val {
  font-family: var(--font-ui);
}

body.fleet-portal:not(.fleet-home-screen) .fleet-stat-val,
body.onboard-portal .fleet-stat-val {
  color: var(--brand-text);
  font-family: var(--font-display);
}

body.fleet-portal .tab-nav {
  border-bottom: none;
  gap: 8px;
}

body.fleet-portal .tab-btn {
  border-bottom: none !important;
  color: var(--brand-muted-light);
  font-size: 1rem;
  min-height: 44px;
}

body.fleet-portal .tab-btn.active {
  background: #F8EFDE;
  color: #0B120E !important;
  border-radius: var(--brand-radius-pill);
  padding: 10px 18px;
}

body.fleet-portal .table-styled th,
body.fleet-portal .table-styled td {
  border-bottom-color: var(--brand-divider) !important;
  font-size: 1rem;
}

body.fleet-portal .table-styled th {
  color: var(--brand-muted-light);
  background: transparent !important;
}

body.driver-portal #driver-status-badge,
body.fleet-portal .portal-status-line {
  background: transparent !important;
  color: var(--brand-accent) !important;
  font-size: 1rem;
  font-weight: 700;
  padding: 0;
}

body.fleet-portal .portal-secondary,
body.onboard-portal .portal-secondary,
body.driver-portal .portal-secondary {
  font-size: 1rem;
  color: var(--brand-muted-light);
}

body.fleet-portal .portal-stat-note {
  font-size: 1rem;
  color: var(--brand-muted-light);
}

body.fleet-portal .portal-stat-note.positive {
  color: var(--brand-muted-light);
}

body.fleet-portal .driver-portal-status,
body.fleet-portal .driver-status-positive {
  color: var(--brand-text);
  font-weight: 600;
}

body.fleet-portal .badge-tag.pass {
  color: var(--brand-text) !important;
  background: transparent !important;
  border: none !important;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  padding: 0;
}
