/* ==========================================================
   Bowtt — shared mobile-first design system
   Used across the passenger and captain apps. Keep the admin
   panel's own inline styles as-is; this file targets the
   customer-facing / captain-facing mobile experience.
   ========================================================== */

:root {
  --bowt-primary: #0077b6;
  --bowt-primary-dark: #005f92;
  --bowt-primary-light: #e3f2fd;
  --bowt-accent: #00b4d8;
  --bowt-success: #16a34a;
  --bowt-warning: #d97706;
  --bowt-danger: #dc2626;
  --bowt-dark: #0f172a;
  --bowt-surface: #ffffff;
  --bowt-bg: #f4f7fb;
  --bowt-text: #111827;
  --bowt-muted: #6b7280;
  --bowt-border: #e5e7eb;
  --bowt-radius-sm: 10px;
  --bowt-radius: 16px;
  --bowt-radius-lg: 22px;
  --bowt-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  --bowt-shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);
  --bowt-safe-bottom: env(safe-area-inset-bottom, 0px);
  --bowt-safe-top: env(safe-area-inset-top, 0px);
}

* { -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bowt-bg);
  color: var(--bowt-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overscroll-behavior-y: contain;
}

body.bowt-app {
  padding-bottom: calc(84px + var(--bowt-safe-bottom));
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

/* ---------- Top bar ---------- */
.bowt-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bowt-surface);
  border-bottom: 1px solid var(--bowt-border);
  padding: calc(14px + var(--bowt-safe-top)) 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bowt-topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--bowt-primary);
  font-size: 18px;
  text-decoration: none;
}

.bowt-topbar .brand img { height: 28px; width: 28px; object-fit: contain; }

.bowt-topbar .user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--bowt-muted);
  text-decoration: none;
}

.bowt-topbar .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bowt-primary-light);
  color: var(--bowt-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

/* ---------- Passenger topbar: desktop-only bell + name ----------
   On phone/tablet the topbar stays exactly as it always has (logo,
   avatar) — a notification bell already lives in the bottom nav (and,
   on the booking page, as a floating map button), and there's no room
   for a name next to the avatar. At desktop width there's room to
   spare, so both appear on the far right, next to the avatar. */
.passenger-topbar-actions { display: flex; align-items: center; gap: 8px; }
.passenger-topbar-notif {
  display: none;
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}
.passenger-topbar-notif-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--bowt-danger);
  color: #fff;
  font-size: 9px;
  line-height: 15px;
  font-weight: 700;
  text-align: center;
}
.passenger-topbar-name { display: none; color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; }
.passenger-topbar .captain-profile-link { gap: 9px; }

/* Signed-out visitor browsing the request/Sail pages before they have an
   account: the bell + avatar are replaced with a single "Log in" pill. */
.passenger-topbar-login {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.32);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
}
.passenger-topbar-login:hover { background: rgba(255,255,255,.26); color: #fff; }

.bowt-page {
  padding: 16px;
}

.bowt-page h1.page-title {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 2px;
}

.bowt-page p.page-subtitle {
  color: var(--bowt-muted);
  font-size: 14px;
  margin-bottom: 18px;
}

/* ---------- Cards ---------- */
.bowt-card {
  background: var(--bowt-surface);
  border-radius: var(--bowt-radius);
  box-shadow: var(--bowt-shadow);
  border: 1px solid var(--bowt-border);
  padding: 16px;
}

.bowt-card + .bowt-card { margin-top: 12px; }

/* Trip card on the passenger browse screen */
.trip-card {
  background: var(--bowt-surface);
  border-radius: var(--bowt-radius);
  box-shadow: var(--bowt-shadow);
  border: 1px solid var(--bowt-border);
  padding: 16px;
  margin-bottom: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.trip-card:active { transform: scale(0.98); }

/* Captain My Trips status borders: terminal trip states are visually obvious. */
.trip-card.trip-card-completed { border: 2px solid #16a34a; }
.trip-card.trip-card-cancelled { border: 2px solid #dc2626; }
.trip-card-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.trip-passenger-label { display: block; color: var(--bowt-muted); font-size: 12px; }
.trip-passenger-value { color: var(--bowt-dark); font-size: 15px; }
.trip-card-revenue { margin-left: auto; min-width: 105px; }
.trip-card-revenue .text-primary-bowtt { font-size: 16px; }

.trip-card .route-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  color: var(--bowt-dark);
}

.trip-card .route-line i { color: var(--bowt-primary); font-size: 13px; }

.trip-card .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.trip-card .price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--bowt-border);
}

.trip-card .price-row .price {
  font-size: 20px;
  font-weight: 800;
  color: var(--bowt-primary);
}

.trip-card .price-row .price small {
  font-size: 12px;
  font-weight: 600;
  color: var(--bowt-muted);
}

/* ---------- Captain date-grouped lists ---------- */
.captain-date-group {
  margin-bottom: 12px;
}

.captain-date-toggle {
  width: 100%;
  border: 1px solid var(--bowt-border);
  border-radius: var(--bowt-radius);
  background: var(--bowt-surface);
  color: var(--bowt-dark);
  box-shadow: var(--bowt-shadow);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  font-weight: 800;
  transition: border-radius .15s ease, box-shadow .15s ease;
}

.captain-date-group.is-open .captain-date-toggle {
  border-radius: var(--bowt-radius) var(--bowt-radius) 10px 10px;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.06);
}

.captain-date-toggle:active { transform: scale(.995); }
.captain-date-toggle:focus-visible { outline: 2px solid var(--bowt-primary); outline-offset: 2px; }

.captain-date-title,
.captain-date-meta {
  display: flex;
  align-items: center;
}

.captain-date-title { gap: 9px; min-width: 0; }
.captain-date-title > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.captain-date-title > i { color: var(--bowt-primary); }
.captain-date-meta { gap: 10px; flex: 0 0 auto; }
.captain-date-count {
  min-width: 27px;
  height: 27px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--bowt-primary-light);
  color: var(--bowt-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.captain-date-today {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bowt-primary-light);
  color: var(--bowt-primary-dark);
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.captain-date-chevron { transition: transform .2s ease; color: var(--bowt-muted); }
.captain-date-group.is-open .captain-date-chevron { transform: rotate(180deg); }
.captain-date-content { padding-top: 0; }

/* Smooth collapse: animate the row height from 0fr to 1fr. */
.bx-collapse {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows .32s cubic-bezier(.4,0,.2,1), opacity .25s ease, visibility 0s linear .32s;
}
.bx-collapse > .bx-collapse-inner { min-height: 0; overflow: hidden; }
.captain-date-group.is-open > .bx-collapse,
.trip-fold.is-open > .bx-collapse {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition: grid-template-rows .32s cubic-bezier(.4,0,.2,1), opacity .3s ease .05s, visibility 0s;
}
.captain-date-group.is-open > .captain-date-content > .bx-collapse-inner { padding-top: 10px; }

/* Completed trip: one-line summary that unfolds into the full card. */
.trip-fold { margin-bottom: 10px; }
.trip-mini {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--bowt-surface);
  border: 1px solid var(--bowt-border);
  border-left: 4px solid #16a34a;
  border-radius: 12px;
  box-shadow: var(--bowt-shadow);
  color: var(--bowt-dark);
  font-size: 14px;
  text-align: left;
  transition: box-shadow .2s ease, border-radius .2s ease;
}
.trip-mini:active { transform: scale(.995); }
.trip-mini:focus-visible { outline: 2px solid var(--bowt-primary); outline-offset: 2px; }
.trip-mini-ok { color: #16a34a; font-size: 15px; flex: 0 0 auto; }
.trip-mini-route { flex: 1 1 auto; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-mini-route i { font-size: 11px; color: var(--bowt-primary); margin: 0 2px; }
.trip-mini-pax { flex: 0 0 auto; color: var(--bowt-muted); font-size: 12.5px; white-space: nowrap; }
.trip-mini-price { flex: 0 0 auto; font-weight: 800; color: var(--bowt-primary-dark, #0369a1); white-space: nowrap; }
.trip-mini-chevron { flex: 0 0 auto; color: var(--bowt-muted); font-size: 12px; transition: transform .3s ease; }
.trip-fold.is-open .trip-mini-chevron { transform: rotate(180deg); }
.trip-fold.is-open .trip-mini { border-radius: 12px 12px 6px 6px; }
.trip-fold .trip-card { margin: 8px 0 2px; }
@media (max-width: 380px) { .trip-mini { gap: 7px; padding: 11px 10px; font-size: 13px; } .trip-mini-pax { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .bx-collapse, .captain-date-group.is-open > .bx-collapse, .trip-fold.is-open > .bx-collapse { transition: none; }
  .trip-mini-chevron, .captain-date-chevron { transition: none; }
}
.captain-date-content .trip-card:last-child { margin-bottom: 0; }

/* ---------- Chips / badges ---------- */
.bowt-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.bowt-chip.chip-public { background: #dcfce7; color: #15803d; }
.bowt-chip.chip-private { background: #dbeafe; color: #1d4ed8; }
.bowt-chip.chip-both { background: #fef3c7; color: #b45309; }
.bowt-chip.chip-muted { background: #f1f5f9; color: #64748b; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
}
.status-pill.s-open, .status-pill.s-online, .status-pill.s-accepted { background: #dcfce7; color: #15803d; }
.status-pill.s-boarding, .status-pill.s-on-the-way { background: #fef3c7; color: #b45309; }
.status-pill.s-in-progress, .status-pill.s-onboard { background: #dbeafe; color: #1d4ed8; }
.status-pill.s-completed { background: #e2e8f0; color: #334155; }
.status-pill.s-cancelled, .status-pill.s-offline { background: #fee2e2; color: #b91c1c; }
.status-pill.s-searching { background: #f1f5f9; color: #475569; }

/* ---------- Buttons ---------- */
.btn-bowtt {
  background: var(--bowt-primary);
  border-color: var(--bowt-primary);
  color: #fff;
  font-weight: 700;
  border-radius: var(--bowt-radius-sm);
  padding: 13px 18px;
}
.btn-bowtt:hover, .btn-bowtt:focus { background: var(--bowt-primary-dark); border-color: var(--bowt-primary-dark); color: #fff; }
.btn-bowtt:disabled { opacity: .55; }

.offer-arrival.active, #offer-arrival-current.active { background: var(--bowt-primary); border-color: var(--bowt-primary); color: #fff; }
.offer-arrival.active:hover, #offer-arrival-current.active:hover { background: var(--bowt-primary-dark); border-color: var(--bowt-primary-dark); color: #fff; }

.btn-bowt-outline {
  background: #fff;
  border: 2px solid var(--bowt-primary);
  color: var(--bowt-primary);
  font-weight: 700;
  border-radius: var(--bowt-radius-sm);
  padding: 11px 18px;
}

.btn-bowt-danger-outline {
  background: #fff;
  border: 2px solid var(--bowt-danger);
  color: var(--bowt-danger);
  font-weight: 700;
  border-radius: var(--bowt-radius-sm);
  padding: 11px 18px;
}

.type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.type-toggle input { display: none; }

.type-toggle-box {
  border: 2px solid var(--bowt-border);
  border-radius: var(--bowt-radius-sm);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: .15s;
}

.type-toggle input:checked + .type-toggle-box {
  border-color: var(--bowt-primary);
  background: var(--bowt-primary-light);
}

.type-toggle-box i { font-size: 20px; color: var(--bowt-primary); margin-bottom: 4px; display: block; }

/* ---------- Bottom nav ---------- */
.bowt-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  max-width: 560px;
  margin: 0 auto;
  background: var(--bowt-surface);
  border-top: 1px solid var(--bowt-border);
  display: flex;
  padding: 8px 6px calc(8px + var(--bowt-safe-bottom));
  box-shadow: 0 -6px 18px rgba(15,23,42,0.06);
}

.bowt-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--bowt-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 0;
  border-radius: 12px;
}

.bowt-bottom-nav a i { font-size: 18px; }

.bowt-bottom-nav a.active {
  color: var(--bowt-primary);
  background: var(--bowt-primary-light);
}

/* ---------- Desktop passenger chrome (≥900px) ----------
   The bottom tab bar moves up to become a centred set of links in the
   header band, and the header itself gains the notification bell +
   name (see .passenger-topbar-actions above). Phone/tablet are
   untouched — everything below this breakpoint keeps the normal
   bottom-tab-bar app layout. Scoped to .passenger-topbar /
   .bowt-bottom-nav only, so the captain app is unaffected. */
@media (min-width: 900px) {
  /* Guards against the sub-scrollbar-width overflow that full-bleed
     breakouts (like the topbar below) can introduce on a page that's
     tall enough to have its own vertical scrollbar. No page here needs
     horizontal scrolling, so this is a safe, purely defensive rule. */
  body.bowt-app { overflow-x: hidden; }

  .passenger-topbar {
    /* body.bowt-app caps out at 560px, centred, on every passenger page
       (see above) — the topbar needs to actually reach the real screen
       edges here, not just the edges of that narrow centred column, or
       its logo lands near the middle of a wide screen while the fixed,
       viewport-centred nav overlay below expects the logo to be out of
       its way on the true left edge. This is the standard "full-bleed"
       breakout: stretch via margins rather than an explicit width, so
       it doesn't fight the parent's own width/scrollbar math. */
    width: auto;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: calc(17px + var(--bowt-safe-top)) 32px 17px;
  }
  .passenger-topbar-notif,
  .passenger-topbar-name {
    display: flex;
  }

  .bowt-bottom-nav {
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
    max-width: none;
    margin: 0;
    height: calc(84px + var(--bowt-safe-top));
    background: transparent;
    border-top: 0;
    box-shadow: none;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 0;
    z-index: 41;
    pointer-events: none;
  }
  .bowt-bottom-nav a {
    pointer-events: auto;
    flex: 0 0 auto;
    flex-direction: row;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 14px;
  }
  .bowt-bottom-nav a i { font-size: 15px; }
  /* Only pages carrying the passenger bottom nav lose the bottom
     padding reserved for it — captain pages (.captain-bottom-nav)
     keep their own, unrelated bottom-tab-bar layout untouched. */
  body.bowt-app:has(.bowt-bottom-nav) { padding-bottom: 0; }
}

/* ---------- Plain footer ---------- */
.bowtt-footer {
  padding: 18px 16px calc(18px + var(--bowt-safe-bottom));
  text-align: center;
  color: var(--bowt-muted);
  font-size: 12px;
}

/* ---------- Sheet / modal ---------- */
.bowt-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 60;
  display: none;
}

.bowt-sheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: min(100%, 560px);
  max-width: 560px;
  z-index: 61;
  margin: 0;
  background: var(--bowt-surface);
  border-radius: 22px 0 0 22px;
  padding: 18px 18px calc(20px + var(--bowt-safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform .28s ease;
  box-shadow: -10px 0 30px rgba(15,23,42,0.18);
}

.bowt-sheet.open { transform: translateX(0); }
.bowt-sheet-backdrop.open { display: block; }

/* Captain trip details: full mobile app area, while the top navbar remains visible. */
#trip-detail-sheet {
  padding-top: calc(18px + var(--captain-topbar-height, 62px));
  z-index: 61;
}

/* Passenger manifest uses the same full mobile sheet treatment and keeps the top bar visible. */
#manifest-sheet {
  padding-top: calc(18px + var(--captain-topbar-height, 62px));
  z-index: 61;
}

body.manifest-open .captain-topbar {
  z-index: 70;
}

body.trip-detail-open .captain-topbar {
  z-index: 70;
}

body.trip-detail-open .captain-bottom-nav {
  display: none !important;
}


.sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 99px;
  background: var(--bowt-border);
  margin: 8px auto 14px;
}

/* ---------- My Trips filter tabs ---------- */
/* The row scrolls sideways, so it needs room at both ends and must not be
   clipped by the page's own padding — the last filter was cut in half. */
.my-trips-filters { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  margin-left: -16px; margin-right: -16px; padding: 2px 16px; }
.my-trips-filters > * { flex: 0 0 auto; }
/* 'Book a boat for someone else' was the first and loudest button on My Trips,
   above the trips themselves. It is a quiet link now. */
.my-trips-other-link { display:inline-flex; align-items:center; font-size:13px; font-weight:600;
  color:#056793; text-decoration:underline; text-underline-offset:2px; }
/* Trip card: 'Book again' sits under the fare, clear of the card's own link. */
.trip-card-again { display: flex; justify-content: flex-end; margin-top: 10px; }
.trip-card-again .btn { border-radius: 10px; font-weight: 700; }
.my-trips-filters::-webkit-scrollbar { display: none; }
.my-trips-filter {
  flex: 0 0 auto;
  border: 1px solid var(--bowt-border, #e2e8f0);
  background: #fff;
  color: var(--bowt-muted, #64748b);
  font-weight: 700;
  font-size: 13px;
  border-radius: 999px;
  padding: 7px 16px;
  white-space: nowrap;
}
.my-trips-filter.active {
  background: var(--bowt-primary, #0077b6);
  border-color: var(--bowt-primary, #0077b6);
  color: #fff;
}

/* ---------- Empty state ---------- */
.bowt-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--bowt-muted);
}
.bowt-empty i { font-size: 40px; color: var(--bowt-border); margin-bottom: 14px; }

/* ---------- Skeleton loading ---------- */
.bowt-skeleton {
  background: linear-gradient(90deg, #eef1f5 25%, #f7f9fb 37%, #eef1f5 63%);
  background-size: 400% 100%;
  animation: bowt-shimmer 1.4s ease infinite;
  border-radius: 10px;
}
@keyframes bowt-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---------- Auth / splash ---------- */
.bowt-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.bowt-auth-card {
  width: 100%;
  max-width: 400px;
  border: none;
  border-radius: var(--bowt-radius-lg);
  box-shadow: var(--bowt-shadow-lg);
  background: #fff;
  padding: 28px 24px;
}

/* ---------- Captain Material theme ---------- */
.captain-topbar {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 55%, #38bdf8 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(14, 165, 233, .22);
}
.captain-topbar .brand { color: #fff; }
.captain-topbar .user-chip { color: rgba(255,255,255,.9); }

/* ---------- Utility ---------- */
.text-primary-bowtt { color: var(--bowt-primary) !important; }
.bg-primary-bowtt { background: var(--bowt-primary) !important; }
.fw-800 { font-weight: 800; }

@media (min-width: 560px) {
  body.bowt-app { border-left: 1px solid var(--bowt-border); border-right: 1px solid var(--bowt-border); box-shadow: var(--bowt-shadow); }
}

/* Captain navigation */
.captain-bottom-nav{position:fixed;left:50%;right:auto;bottom:0;transform:translateX(-50%);width:100%;max-width:560px;z-index:1050;height:72px;background:rgba(255,255,255,.97);border-top:1px solid var(--bowt-border);display:grid;grid-template-columns:1fr 1fr 1.05fr 1fr 1fr 1fr;align-items:end;padding:7px 8px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -8px 25px rgba(15,23,42,.08)}
.captain-bottom-nav a{color:#64748b;text-decoration:none;text-align:center;font-size:10px;font-weight:700;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;height:54px;border-radius:12px}
.captain-bottom-nav a i{font-size:18px}.captain-bottom-nav a.active{color:var(--bowt-primary)}
.captain-bottom-nav .captain-new-trip{height:66px;margin-top:-25px;background:var(--bowt-primary);color:#fff;border-radius:18px;box-shadow:0 8px 20px rgba(14,165,233,.3);font-size:10px;min-width:0}
.captain-bottom-nav .captain-new-trip i{font-size:23px}
body.bowt-app{padding-bottom:82px}
.captain-dashboard-card{cursor:pointer;transition:transform .2s ease,box-shadow .2s ease}.captain-dashboard-card:hover{transform:translateY(-2px);box-shadow:0 10px 25px rgba(15,23,42,.08)}
.boat-photo{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:14px;background:#e2e8f0}.boat-photo-placeholder{width:100%;aspect-ratio:16/9;border-radius:14px;background:linear-gradient(135deg,#e0f2fe,#f1f5f9);display:flex;align-items:center;justify-content:center;color:#0284c7;font-size:42px}
.profile-avatar-lg{width:86px;height:86px;border-radius:50%;object-fit:cover;background:#e0f2fe;display:flex;align-items:center;justify-content:center;color:#0284c7;font-size:30px;font-weight:800}

/* Captain account */
.captain-account-page { padding-bottom: 105px; }
.captain-profile-avatar { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; }
.captain-profile-avatar .profile-avatar-lg { width: 92px; height: 92px; margin: 0; }
.profile-avatar-image { width: 92px; height: 92px; object-fit: cover; display: block; border-radius: 50%; }
.account-boats-link { color: inherit; }
.account-boats-link:hover { color: inherit; background: rgba(15, 23, 42, .025); }
.account-action { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 0; color:inherit; text-decoration:none; }
.account-action + .account-action { border-top:1px solid #e2e8f0; }
.whatsapp-action { color:#15803d; font-weight:600; }
.captain-login-help .captain-help-card { padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }

/* Captain trip cards open a dedicated right-side trip interface. */
.btn-trip-details { cursor: pointer; }
.btn-trip-details:focus-visible { outline: 2px solid var(--bowt-primary); outline-offset: 2px; }

/* ---------- Captain premium shell ---------- */
.captain-topbar{height:62px;min-height:62px;display:flex;align-items:center;justify-content:space-between;padding:10px 16px;position:sticky;top:0;z-index:70;}
.captain-brand{display:flex;align-items:center;gap:9px;color:#fff;text-decoration:none;font-weight:800;font-size:15px;min-width:0}
.captain-brand-logo{width:30px;height:30px;object-fit:contain;border-radius:8px;background:#fff;padding:2px}
.passenger-brand-complete-logo{width:100px;height:50px;object-fit:contain;display:block} .passenger-topbar .captain-brand{gap:0}
.captain-profile-link{display:flex;align-items:center;text-decoration:none;color:#fff}
.captain-header-avatar{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#e2e8f0;color:#0f172a;font-weight:800;border:2px solid rgba(255,255,255,.75)}
.captain-header-avatar img{width:100%;height:100%;object-fit:cover}
.captain-welcome-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.captain-online-toggle{border:0;border-radius:999px;padding:9px 13px;display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:800;letter-spacing:.02em;white-space:nowrap;box-shadow:0 5px 16px rgba(15,23,42,.08)}
.captain-online-toggle.online{background:#dcfce7;color:#166534}.captain-online-toggle.offline{background:#f1f5f9;color:#475569}.availability-dot{width:8px;height:8px;border-radius:50%;background:#94a3b8;display:inline-block}.availability-dot.online{background:#16a34a}
.captain-current-trip-card{border-left:4px solid var(--bowt-primary)}
.captain-quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.quick-action{min-height:92px;border:1px solid var(--bowt-border);border-radius:16px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:#0f172a;text-decoration:none;font-size:11px;font-weight:800;text-align:center;padding:10px;box-shadow:0 4px 14px rgba(15,23,42,.04)}
.quick-action i{font-size:20px;color:var(--bowt-primary)}
.boat-availability-toggle{border:0;border-radius:999px;padding:7px 10px;display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:800;white-space:nowrap}
.boat-availability-toggle.is-available{background:#dcfce7;color:#166534}.boat-availability-toggle.is-unavailable{background:#f1f5f9;color:#475569}.boat-availability-toggle:disabled{opacity:.6}
.captain-bottom-nav{position:fixed;left:50%;right:auto;bottom:0;transform:translateX(-50%);width:100%;max-width:560px;z-index:1050;height:72px;background:rgba(255,255,255,.98);border-top:1px solid var(--bowt-border);display:grid;grid-template-columns:1fr 1fr 1.08fr 1fr 1fr;align-items:end;padding:7px 8px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -8px 25px rgba(15,23,42,.08)}
.captain-bottom-nav a{color:#64748b;text-decoration:none;text-align:center;font-size:10px;font-weight:700;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;height:54px;border-radius:12px}.captain-bottom-nav a i{font-size:18px}.captain-bottom-nav a.active{color:var(--bowt-primary);background:transparent}
.captain-bottom-nav .captain-dashboard-home{height:62px;margin-top:-18px;background:#fff;color:#64748b;border:1px solid var(--bowt-border);box-shadow:0 7px 20px rgba(15,23,42,.10);border-radius:18px}.captain-bottom-nav .captain-dashboard-home.active{background:var(--bowt-primary);color:#fff;border-color:var(--bowt-primary)}
.captain-bottom-nav .captain-new-trip{height:58px;margin-top:-8px;background:#fff;color:var(--bowt-primary);border:1px solid rgba(14,165,233,.25);font-size:10px}.captain-bottom-nav .captain-new-trip i{font-size:22px}
body.bowt-app{padding-bottom:82px}
@media (min-width:560px){body.bowt-app{width:560px;max-width:560px;margin:0 auto;border-left:1px solid var(--bowt-border);border-right:1px solid var(--bowt-border);box-shadow:var(--bowt-shadow)}}
@media (max-width:380px){.captain-quick-actions{gap:6px}.quick-action{font-size:10px;padding:8px 4px}.captain-online-toggle{padding:8px 10px}.captain-brand{font-size:14px}}

/* Captain operational home — Phase 1 */
.captain-work-hero{background:linear-gradient(135deg,#f8fbff 0%,#ffffff 100%);border:1px solid var(--bowt-border);border-radius:20px;padding:16px;margin-bottom:12px;box-shadow:0 5px 18px rgba(15,23,42,.04)}
.captain-eyebrow,.captain-card-kicker{font-size:10px;font-weight:900;letter-spacing:.08em;color:#64748b;text-transform:uppercase}
.captain-online-state{display:flex;align-items:center;gap:12px;border-radius:16px;padding:12px;background:#f8fafc;border:1px solid #e2e8f0}
.captain-online-state.online{background:#f0fdf4;border-color:#bbf7d0}
.captain-state-icon{width:42px;height:42px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:#e2e8f0;color:#475569;font-size:18px}
.captain-online-state.online .captain-state-icon{background:#dcfce7;color:#15803d}
.captain-current-trip-card{padding:15px;border-left:4px solid var(--bowt-primary)}
.captain-current-route{font-size:18px;line-height:1.25}
.captain-next-work-card{padding:15px}
.captain-today-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.captain-today-strip a{background:#fff;border:1px solid var(--bowt-border);border-radius:14px;padding:11px 6px;text-align:center;text-decoration:none;color:#0f172a;display:flex;flex-direction:column;gap:2px}
.captain-today-strip strong{font-size:20px;color:var(--bowt-primary)}
.captain-today-strip span{font-size:10px;color:#64748b;font-weight:700}
.captain-work-links{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding-bottom:8px}
.captain-work-links .quick-action{min-height:92px;padding:10px 5px}
.captain-work-links .quick-action small{font-size:9px;color:#94a3b8;font-weight:600}
.captain-primary-action{min-height:48px;font-weight:800}
@media(max-width:380px){.captain-work-hero{padding:13px}.captain-work-links{gap:6px}.captain-work-links .quick-action{font-size:10px;min-height:86px}}


/* Captain operational navigation and publishing — Phase 1.1 */
.captain-bottom-nav{grid-template-columns:repeat(4,1fr)}
.captain-publish-card{padding:15px;border:1px solid #bae6fd;background:linear-gradient(135deg,#f0f9ff 0%,#ffffff 100%)}
.captain-publish-btn{white-space:nowrap;font-weight:800;box-shadow:0 5px 14px rgba(0,119,182,.16)}
@media(max-width:430px){.captain-publish-card .d-flex{align-items:stretch!important;flex-direction:column}.captain-publish-btn{width:100%}}

/* Captain operational navigation: four evenly distributed work areas. */
.captain-bottom-nav { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.captain-bottom-nav a { width:100%; min-width:0; }
.captain-published-trips-card { padding:15px; }
.captain-published-trip { display:block; padding:12px 0; color:inherit; text-decoration:none; border-bottom:1px solid var(--bowt-border); }
.captain-published-trip:last-child { border-bottom:0; padding-bottom:0; }

/* Passenger count analogue dial */
.passenger-dial { display:flex; align-items:center; justify-content:center; gap:18px; }
.passenger-dial-value { position:relative; min-width:64px; height:58px; overflow:hidden; display:flex; align-items:center; justify-content:center; font-size:42px; line-height:1; font-weight:800; color:#0f172a; user-select:none; -webkit-user-select:none; touch-action:pan-y; cursor:ew-resize; }
.passenger-dial-value:focus-visible { border-radius:10px; box-shadow:0 0 0 3px rgba(14,165,233,.18); outline:none; }
.passenger-dial-value > span { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; will-change:transform,opacity; }
.passenger-dial-value .dial-out-left { animation:dialOutLeft .18s ease-in forwards; }
.passenger-dial-value .dial-out-right { animation:dialOutRight .18s ease-in forwards; }
.passenger-dial-value .dial-in-from-right { animation:dialInFromRight .22s ease-out both; }
.passenger-dial-value .dial-in-from-left { animation:dialInFromLeft .22s ease-out both; }
@keyframes dialOutLeft { from { transform:translateX(0); opacity:1; } to { transform:translateX(-115%); opacity:0; } }
@keyframes dialOutRight { from { transform:translateX(0); opacity:1; } to { transform:translateX(115%); opacity:0; } }
@keyframes dialInFromRight { from { transform:translateX(115%); opacity:0; } to { transform:translateX(0); opacity:1; } }
@keyframes dialInFromLeft { from { transform:translateX(-115%); opacity:0; } to { transform:translateX(0); opacity:1; } }
.passenger-dial .passenger-step-btn { flex:0 0 auto; }


/* Passenger notification center */
.nav-icon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center;}
.nav-notification-badge{position:absolute;top:-7px;right:-10px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:#dc2626;color:#fff;font-size:10px;line-height:17px;font-weight:700;text-align:center;}
.passenger-notification-card{cursor:pointer;transition:transform .15s ease,box-shadow .15s ease;}
.passenger-notification-card:hover{transform:translateY(-1px);}
.notification-unread{box-shadow:0 8px 24px rgba(14,165,233,.10);}
.notification-icon{width:38px;height:38px;flex:0 0 38px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#f0f9ff;color:#0284c7;}

.captain-online-toggle.is-locked{opacity:.6;cursor:not-allowed}.captain-publish-btn.disabled{opacity:.5;pointer-events:auto;cursor:not-allowed}

/* Captain bottom nav v2: Trips | Requests | HOME (centre) | Boats | Account */
.captain-bottom-nav{grid-template-columns:1fr 1fr 1.25fr 1fr 1fr!important;height:74px;border-radius:22px 22px 0 0;box-shadow:0 -10px 30px rgba(15,23,42,.08)}
.captain-bottom-nav a{transition:color .15s ease,transform .15s ease}
.captain-bottom-nav a:active{transform:scale(.94)}
.captain-bottom-nav a.active:not(.captain-dashboard-home){color:var(--bowt-primary);position:relative}
.captain-bottom-nav a.active:not(.captain-dashboard-home)::after{content:"";position:absolute;bottom:0;width:18px;height:3px;border-radius:3px;background:var(--bowt-primary)}
.captain-bottom-nav .captain-dashboard-home{width:66px!important;height:66px;margin:-28px auto 0;border-radius:50%;background:linear-gradient(145deg,#0ea5e9,#0077b6);color:#fff;border:4px solid #fff;box-shadow:0 10px 22px rgba(0,119,182,.35);gap:2px}
.captain-bottom-nav .captain-dashboard-home i{font-size:22px}
.captain-bottom-nav .captain-dashboard-home span{font-size:9.5px}
.captain-bottom-nav .captain-dashboard-home.active{background:linear-gradient(145deg,#0284c7,#005f92);color:#fff;border-color:#fff}
.captain-bottom-nav .nav-icon-wrap{position:relative;display:inline-flex}
.captain-missed-nav-badge{position:absolute;top:-6px;right:-10px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#ef4444;color:#fff;font-size:9px;font-weight:800;line-height:16px;text-align:center}

/* Captain account */
.acct-hero{text-align:center;padding:22px 16px;background:linear-gradient(180deg,#f0f9ff 0%,#fff 70%)}
.acct-badge{display:inline-flex;align-items:center;font-size:11px;font-weight:800;padding:5px 11px;border-radius:999px;background:#fef3c7;color:#92400e}
.acct-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.acct-stat{background:#fff;border:1px solid var(--bowt-border);border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:2px;text-decoration:none;color:inherit;box-shadow:0 3px 10px rgba(15,23,42,.04)}
.acct-stat i{color:var(--bowt-primary);font-size:15px;margin-bottom:4px}.acct-stat strong{font-size:22px;line-height:1.1;color:#0f172a}.acct-stat span{font-size:11px;color:#64748b;font-weight:600}
.acct-earn{display:flex;justify-content:space-between;gap:12px;background:linear-gradient(135deg,#0077b6,#0ea5e9);color:#fff;border:0}
.acct-earn small{display:block;font-size:9.5px;letter-spacing:.09em;font-weight:800;opacity:.85}.acct-earn strong{font-size:20px}
.acct-link{display:flex;align-items:center;gap:12px;padding:12px 0;text-decoration:none;color:inherit;border-bottom:1px solid var(--bowt-border)}.acct-link:last-child{border-bottom:0;padding-bottom:2px}
.acct-link b{display:block;font-size:14px}.acct-link small{display:block;color:#64748b;font-size:12px;margin-top:1px}
.acct-ic{width:38px;height:38px;border-radius:12px;background:#eaf7fc;color:var(--bowt-primary);display:flex;align-items:center;justify-content:center;flex:0 0 38px}.acct-ic.wa{background:#dcfce7;color:#16a34a}

/* ---------- Compact passenger header on phones/tablets ---------- */
@media (max-width: 899px) {
  .bowt-topbar.passenger-topbar { padding: calc(7px + var(--bowt-safe-top)) 14px 7px; }
  .passenger-topbar .passenger-brand-complete-logo { width: 88px; height: 26px; }
  .passenger-topbar .captain-header-avatar { width: 32px; height: 32px; font-size: 13px; border-width: 1.5px; }
}

/* ---------- One-line route card: text centred, jetty dots on the edges ---------- */
.ride-route-card.ride-route-oneline { position: relative; justify-content: center; padding: 13px 34px; }
.ride-route-card.ride-route-oneline .ride-route-from,
.ride-route-card.ride-route-oneline .ride-route-to { flex: 0 1 auto; text-align: center; }
.ride-route-card.ride-route-oneline .route-dot { position: absolute; top: 50%; margin-top: -5.5px; }
.ride-route-card.ride-route-oneline .route-dot.pickup { left: 14px; }
.ride-route-card.ride-route-oneline .route-dot.destination { right: 14px; }
