:root {
  --bg: #0c0f14;
  --bg-elevated: #141a24;
  --surface: #1a2230;
  --surface-subtle: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --muted: #9aa5b8;
  --accent: #22d3a6;
  --accent-dim: #14967a;
  --on-accent: #05251c;
  --danger: #f87171;
  --danger-fg: #fecaca;
  --success-fg: #a7f3d0;
  --warning-fg: #fde68a;
  --warning: #fbbf24;
  --topbar-bg: rgba(12, 15, 20, 0.85);
  --topbar-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  --drawer-bg: rgba(12, 15, 20, 0.98);
  --drawer-link-bg: rgba(255, 255, 255, 0.04);
  --drawer-link-text: #d8e1f0;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  font-family: "DM Sans", system-ui, sans-serif;
}

body.app-body[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-subtle: rgba(15, 23, 42, 0.05);
  --border: rgba(15, 23, 42, 0.14);
  --text: #0f172a;
  --muted: #475569;
  --accent: #0d9488;
  --accent-dim: #0f766e;
  --on-accent: #ffffff;
  --danger: #dc2626;
  --danger-fg: #991b1b;
  --success-fg: #047857;
  --warning-fg: #92400e;
  --warning: #d97706;
  --topbar-bg: rgba(255, 255, 255, 0.9);
  --topbar-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --drawer-bg: rgba(255, 255, 255, 0.98);
  --drawer-link-bg: rgba(15, 23, 42, 0.06);
  --drawer-link-text: #0f172a;
  --shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body.app-body {
  background: radial-gradient(1200px 600px at 10% -10%, rgba(34, 211, 166, 0.12), transparent),
    radial-gradient(900px 500px at 90% 0%, rgba(59, 130, 246, 0.1), transparent), var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* Landing (Home) */
.landing-hero {
  padding: 2rem 0 1.25rem;
}

.landing-hero__inner {
  max-width: 980px;
  margin: 0 auto;
}

.landing-hero__title {
  margin: 0.75rem 0 0.55rem;
  font-size: clamp(1.85rem, 4.2vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.landing-hero__sub {
  margin: 0 0 1rem;
  max-width: 70ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.landing-hero__cta {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

/* Landing marketing (home) */
.main-wrap:has(> .landing-page) {
  max-width: none;
  margin: 0;
  padding: 0 0 2.5rem;
}
.landing-page {
  overflow-x: hidden;
}
.landing-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.landing-section-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}
.landing-section-title--center {
  text-align: center;
}
.landing-hero--modern {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 2.25rem 0 2.5rem;
  background:
    radial-gradient(900px 420px at 85% 20%, rgba(34, 211, 166, 0.14), transparent),
    radial-gradient(700px 400px at 10% 80%, rgba(59, 130, 246, 0.1), transparent),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
body.app-body[data-theme="light"] .landing-hero--modern {
  background:
    radial-gradient(900px 420px at 85% 20%, rgba(13, 148, 136, 0.12), transparent),
    radial-gradient(700px 400px at 10% 80%, rgba(59, 130, 246, 0.08), transparent),
    var(--bg);
}
.landing-hero__grid {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}
@media (min-width: 900px) {
  .landing-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1.05fr);
    gap: 2.25rem;
  }
}
.landing-hero__figure {
  margin: 0;
  position: relative;
}
.landing-hero__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}
body.app-body[data-theme="light"] .landing-hero__img {
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
}
.landing-hero__caption {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
}
.landing-trust {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}
.landing-trust__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) {
  .landing-trust__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.landing-trust__item {
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.landing-trust__value {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-dim);
  margin-bottom: 0.2rem;
}
body.app-body[data-theme="light"] .landing-trust__value {
  color: var(--accent-dim);
}
.landing-trust__label {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}
.landing-about {
  margin-top: 0;
}
.landing-about__card {
  margin-top: 1.25rem;
}
.landing-about__inner {
  padding: 1.25rem 1.15rem;
}
@media (min-width: 640px) {
  .landing-about__inner {
    padding: 1.5rem 1.75rem;
  }
}
.landing-about__text {
  margin: 0 0 0.9rem;
  line-height: 1.6;
  font-size: 0.95rem;
}
.landing-about__text:last-child {
  margin-bottom: 0;
}
.landing-split-duo {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.landing-feature-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
}
@media (min-width: 860px) {
  .landing-feature-card {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .landing-feature-card--reverse .landing-feature-card__media {
    order: 2;
  }
  .landing-feature-card--reverse .landing-feature-card__body {
    order: 1;
  }
}
.landing-feature-card__media img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}
.landing-feature-card__body {
  padding: 1.15rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}
@media (min-width: 860px) {
  .landing-feature-card__body {
    padding: 1.5rem 1.4rem;
    justify-content: center;
  }
}
.landing-feature-card__title {
  margin: 0;
  font-size: 1.2rem;
}
.landing-feature-card__text {
  margin: 0;
  line-height: 1.55;
}
.landing-how {
  margin-top: 1.75rem;
}
.landing-how__intro {
  text-align: center;
  max-width: 52ch;
  margin: 0 auto 1.25rem;
  line-height: 1.5;
}
.landing-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 800px) {
  .landing-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}
.landing-steps__item {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}
.landing-steps__num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: var(--on-accent);
}
.landing-steps__title {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.landing-steps__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}
.landing-security {
  padding: 1.15rem 1.1rem 1.25rem;
  margin-top: 1.25rem;
}
@media (min-width: 720px) {
  .landing-security {
    padding: 1.35rem 1.35rem 1.45rem;
  }
}
.landing-security__header {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (min-width: 720px) {
  .landing-security__header {
    grid-template-columns: 280px 1fr;
    align-items: center;
  }
}
.landing-security__thumb {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: cover;
}
.landing-security__lead {
  margin: 0;
  line-height: 1.55;
}
.landing-check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.landing-check-list li {
  position: relative;
  padding-left: 1.65rem;
  margin: 0.5rem 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}
.landing-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 0.5rem;
  height: 0.85rem;
  border: solid var(--accent);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  opacity: 0.9;
}
.landing-bento {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}
@media (min-width: 880px) {
  .landing-bento {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}
.landing-bento__card {
  padding: 1.15rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.landing-bento__card--accent {
  background: linear-gradient(160deg, rgba(34, 211, 166, 0.12), var(--bg-elevated));
  border-color: rgba(34, 211, 166, 0.25);
}
body.app-body[data-theme="light"] .landing-bento__card--accent {
  background: linear-gradient(160deg, rgba(13, 148, 136, 0.1), var(--bg-elevated));
  border-color: rgba(13, 148, 136, 0.22);
}
.landing-bento__title {
  margin: 0;
  font-size: 1.12rem;
}
.landing-bento__text {
  margin: 0;
  line-height: 1.55;
  flex: 1;
}
.landing-bento__img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-top: 0.25rem;
}
.landing-app {
  margin-top: 1.25rem;
  padding: 1.35rem 1.1rem;
  overflow: hidden;
}
@media (min-width: 720px) {
  .landing-app {
    padding: 1.75rem 1.65rem;
  }
}
.landing-app__grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 860px) {
  .landing-app__grid {
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
  }
}
.landing-app__mock {
  display: flex;
  justify-content: center;
}
.landing-app__phone {
  width: 220px;
  border-radius: 28px;
  padding: 10px;
  background: linear-gradient(145deg, #2a3444, #121820);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
body.app-body[data-theme="light"] .landing-app__phone {
  background: linear-gradient(145deg, #e2e8f0, #cbd5e1);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  border-color: rgba(15, 23, 42, 0.12);
}
.landing-app__phone-notch {
  height: 22px;
  border-radius: 0 0 14px 14px;
  background: #0a0e12;
  width: 42%;
  margin: 0 auto 8px;
}
body.app-body[data-theme="light"] .landing-app__phone-notch {
  background: #0f172a;
}
.landing-app__phone-screen {
  border-radius: 18px;
  min-height: 200px;
  background: linear-gradient(180deg, rgba(34, 211, 166, 0.15), var(--bg)),
    var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--border);
}
.landing-app__logo {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--accent-dim);
}
.landing-app__tagline {
  font-size: 0.78rem;
}
.landing-app__note {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
}
.landing-cta-final__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
}
.landing-band {
  margin-top: 1.75rem;
  padding: 1.15rem 0;
  background: var(--surface-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.landing-band__inner {
  text-align: center;
}
.landing-band__text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.landing-tabs {
  margin-top: 0.5rem;
}

.landing-tabs__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.landing-section {
  margin-top: 1rem;
}

.ride-service-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0.2rem 0 0.15rem;
}

.ride-passenger-envios-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

.track-delivery-codes {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.09);
}

.track-delivery-codes__title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 0.45rem;
}

.track-delivery-codes__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.75rem;
}

@media (max-width: 420px) {
  .track-delivery-codes__grid {
    grid-template-columns: 1fr;
  }
}

.track-delivery-codes__cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.track-delivery-codes__cell .muted {
  font-size: 0.78rem;
}

.track-delivery-codes__code {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  word-break: break-all;
}

.track-delivery-codes__note {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.track-delivery-codes__meus {
  margin-top: 0.55rem;
}

.passenger-track-dock__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  max-width: min(520px, 100%);
}

.passenger-track-dock__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  align-items: center;
}

.passenger-track-dock-codes {
  margin: 0;
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: rgba(18, 24, 34, 0.72);
}

.ride-delivery-extra-fields {
  margin-top: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem;
  background: rgba(59, 130, 246, 0.07);
}

.landing-list ul {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--text);
}

.landing-list li {
  margin: 0.35rem 0;
  color: var(--muted);
}

@media (max-width: 860px) {
  .landing-tabs__grid {
    grid-template-columns: 1fr;
  }
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  box-shadow: var(--topbar-shadow);
  position: sticky;
  top: 0;
  z-index: 2147483647;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
  color: var(--accent);
}
.brand__logo {
  font-size: 1.35rem;
  color: var(--accent);
}
.brand__text {
  font-size: 1.1rem;
}

.topnav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.topnav a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.topnav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
body.app-body[data-theme="light"] .topnav a:hover {
  background: rgba(15, 23, 42, 0.07);
}
.topnav a.is-active {
  color: var(--on-accent);
  background: var(--accent);
}

.topbar__user,
.topbar__guest {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.topbar__menu {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.topbar__drawer-profile {
  display: none;
}
.topbar__drawer-links {
  display: none;
}
.topbar__avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #06150f;
  background: linear-gradient(135deg, var(--accent), #34d399);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.topbar__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.peer-mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  overflow: hidden;
}
.peer-mini-avatar--fallback {
  font-size: 0.9rem;
}

/* Detalhes da corrida (motorista) — passageiro + rota */
.ride-detail-passenger {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  margin: 0.55rem 0 0.7rem;
  padding: 0.58rem 0.66rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.ride-detail-passenger__main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.ride-detail-passenger .peer-mini-avatar,
.ride-detail-passenger .peer-mini-avatar--fallback {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  font-size: 1rem;
}
.ride-detail-passenger__name {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
}
.ride-detail-passenger__chev {
  opacity: 0.45;
  font-weight: 400;
}
.ride-detail-passenger__meta {
  font-size: 0.78rem;
  margin-top: 0.1rem;
}
.ride-detail-passenger__call {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-left: auto;
}

.ride-detail-passenger__text {
  min-width: 0;
}

.ride-detail-passenger__call--green {
  background: rgba(34, 197, 94, 0.9);
  border-color: rgba(34, 197, 94, 0.9);
  color: #052e16;
}

.ride-detail-passenger__call--green:hover {
  background: rgba(34, 197, 94, 1);
  border-color: rgba(34, 197, 94, 1);
  text-decoration: none;
}

.ride-detail-route {
  margin: 0 0 1rem;
}
.ride-detail-route__row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  position: relative;
  padding-bottom: 0.65rem;
}
.ride-detail-route__row:last-child {
  padding-bottom: 0;
}
.ride-detail-route__row:first-child::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 1px;
}
.ride-detail-route__dot {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}
.ride-detail-route__dot--pick {
  background: rgba(34, 197, 94, 0.25);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.45);
}
.ride-detail-route__dot--dest {
  background: rgba(249, 115, 22, 0.22);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.45);
}
.ride-detail-route__addr {
  font-size: 0.92rem;
  line-height: 1.35;
  padding-top: 1px;
}

.ride-detail-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.35rem;
  justify-content: flex-end;
}
@media (max-width: 640px) {
  .ride-detail-footer-actions {
    justify-content: stretch;
  }
  .ride-detail-footer-actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 120px;
  }
}

.topbar__drawer-name {
  font-weight: 700;
  line-height: 1.1;
}
.topbar__overlay {
  display: none;
}
.topbar__menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}
.topbar__menu-btn span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.main-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

.hero {
  display: grid;
  gap: 1.25rem;
  padding: 2rem 0 1rem;
}
.hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
}
.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}

.grid-2 {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 880px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}
.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.card p {
  margin: 0.2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex: 0 0 auto;
  opacity: 0.95;
}
.btn:active {
  transform: translateY(1px);
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: var(--on-accent);
}
.btn--primary:hover {
  filter: brightness(1.06);
  text-decoration: none;
}
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--surface-subtle);
  text-decoration: none;
}
body.app-body[data-theme="light"] .btn--ghost:hover {
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(15, 23, 42, 0.05);
}
.btn--danger {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--danger-fg);
}
body.app-body[data-theme="light"] .btn--danger {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.32);
}
.btn--sm {
  padding: 0.36rem 0.62rem;
  font-size: 0.8rem;
}
.btn--block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-grid {
  display: grid;
  gap: 0.6rem;
}
label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
input,
select,
textarea {
  width: 100%;
  padding: 0.52rem 0.62rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(34, 211, 166, 0.35);
  border-color: rgba(34, 211, 166, 0.5);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.alert--error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--danger-fg);
}
.alert--ok {
  background: rgba(34, 211, 166, 0.12);
  border: 1px solid rgba(34, 211, 166, 0.35);
  color: var(--success-fg);
}
body.app-body[data-theme="light"] .alert--error {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.32);
}
body.app-body[data-theme="light"] .alert--ok {
  background: rgba(13, 148, 136, 0.12);
  border-color: rgba(13, 148, 136, 0.32);
}

.map-shell {
  height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.map-shell--tall {
  height: min(70vh, 560px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
.pill--live {
  background: rgba(34, 211, 166, 0.15);
  color: var(--success-fg);
}
body.app-body[data-theme="light"] .pill {
  background: rgba(15, 23, 42, 0.07);
}
body.app-body[data-theme="light"] .pill--live {
  background: rgba(13, 148, 136, 0.16);
}

/* Acima do Leaflet (panes ~400–800) e do header */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}
.modal-backdrop.is-open {
  display: flex;
}

/* Motorista: camada global (ofertas + chat + banner de permissão) — acima do Leaflet e dos modais locais */
.motora-global-host {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
}
.motora-global-host > * {
  pointer-events: auto;
}
.motora-global-perm-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(12, 14, 20, 0.97), rgba(12, 14, 20, 0.92));
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
}
.motora-global-perm-banner__inner {
  max-width: 560px;
  margin: 0 auto;
}
.motora-global-chat-fab {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  right: calc(1rem + env(safe-area-inset-right, 0px));
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10051;
}
.motora-global-chat-fab__badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.motora-global-chat-panel {
  position: fixed;
  bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  right: calc(1rem + env(safe-area-inset-right, 0px));
  width: min(380px, calc(100vw - 2rem));
  max-height: min(420px, 52vh);
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 10051;
  overflow: hidden;
}
.motora-global-chat-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
}
.motora-global-chat-panel__msgs {
  flex: 1;
  overflow: auto;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}
.motora-global-chat-panel__inputrow {
  display: flex;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
}
.motora-global-ride-modal.modal-backdrop {
  z-index: 10052;
}

.modal {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow: auto;
}
.modal h3 {
  margin: 0 0 0.5rem;
}
.modal .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}
.stat {
  padding: 0.62rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.stat strong {
  display: block;
  font-size: 1.08rem;
}
.stat span {
  font-size: 0.76rem;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data th,
table.data td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.data tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge--pending {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning-fg);
}
.badge--ok {
  background: rgba(34, 211, 166, 0.15);
  color: var(--success-fg);
}
.badge--muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
body.app-body[data-theme="light"] .badge--pending {
  background: rgba(217, 119, 6, 0.14);
}
body.app-body[data-theme="light"] .badge--ok {
  background: rgba(13, 148, 136, 0.14);
}
body.app-body[data-theme="light"] .badge--muted {
  background: rgba(15, 23, 42, 0.08);
  color: var(--muted);
}

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

kbd {
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.map-shell .leaflet-container,
#map-driver.leaflet-container {
  width: 100%;
  height: 100%;
  background: var(--surface);
  border-radius: inherit;
}

.suggest-list {
  margin-top: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  max-height: min(52vh, 320px);
  overflow-y: auto;
  background: var(--surface);
}

.suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}

.suggest-item:hover {
  background: var(--surface-subtle);
}
body.app-body[data-theme="light"] .suggest-list {
  background: var(--surface);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.suggest-item:last-child {
  border-bottom: none;
}

.suggest-item__main {
  display: block;
  font-weight: 700;
  line-height: 1.25;
}

.suggest-item__sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  line-height: 1.25;
  opacity: 0.75;
  white-space: normal;
}

.row-origin {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.row-origin input,
.row-origin textarea.pac-address-field {
  flex: 1;
  min-width: 140px;
}

.address-split {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  flex: 1;
  min-width: 140px;
}

.address-split textarea.pac-address-field {
  flex: 1;
  min-width: 160px;
}

.pac-address-num {
  width: 92px;
  flex: 0 0 92px;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

@media (max-width: 420px) {
  .address-split {
    flex-wrap: wrap;
  }
  .pac-address-num {
    flex: 1 1 120px;
    width: 100%;
  }
}

textarea.pac-address-field {
  width: 100%;
  min-height: 2.85rem;
  resize: vertical;
  font: inherit;
  line-height: 1.35;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

#booking-fields .form-grid > div textarea.pac-address-field {
  width: 100%;
  box-sizing: border-box;
}

.suggest-badge {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.08rem 0.35rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.suggest-badge--local {
  background: rgba(34, 211, 166, 0.2);
  color: var(--success-fg);
}
body.app-body[data-theme="light"] .suggest-badge--out {
  background: rgba(15, 23, 42, 0.06);
}

.suggest-badge--out {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.motora-car-marker-wrap {
  background: transparent !important;
  border: none !important;
}

.motora-car-marker {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  transform: translate(-50%, -50%);
  position: relative;
  left: 50%;
  top: 50%;
}

.motora-driver-car-wrap {
  background: transparent !important;
  border: none !important;
}

.motora-driver-car {
  width: 46px;
  height: 46px;
  transform-origin: 50% 50%;
  transition: transform 220ms linear;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.motora-driver-car svg {
  width: 100%;
  height: 100%;
  display: block;
}

.motora-driver-car.is-searching {
  animation: motora-car-sway 700ms ease-in-out infinite alternate;
}

@keyframes motora-car-sway {
  from { transform: rotate(-12deg); }
  to { transform: rotate(12deg); }
}

.map-shell--track {
  min-height: min(72vh, 620px);
}

.passenger-home-map {
  height: min(420px, 55vh);
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(15, 18, 28, 0.35);
}

.motora-passenger-self-wrap {
  background: transparent !important;
  border: none !important;
}

.motora-car-marker--nearby {
  line-height: 0;
}

.motora-car-marker--nearby svg {
  display: block;
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.38));
}

.motora-passenger-loc {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.motora-passenger-loc__dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3b82f6;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.driver-map-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* Próximo de esquina: visão mais “de cima” (zoom alto no JS); entre trechos: zoom mais aberto */
.driver-map-bg--corner-near .driver-map-bg__veil {
  opacity: 0.35;
}

.driver-map-bg__map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Google Maps (passageiro — acompanhamento) */
.driver-map-bg__map--google {
  background: #e5e3df;
}

/* Fundo claro enquanto os tiles carregam (estilo Carto light). */
.driver-map-bg__map.leaflet-container,
#map.leaflet-container,
.passenger-home-map.leaflet-container {
  background: #ececec !important;
}

.driver-map-bg__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(12, 15, 20, 0.22) 0%,
    rgba(12, 15, 20, 0.38) 48%,
    rgba(12, 15, 20, 0.52) 100%
  );
  pointer-events: none;
}

/* Seta do motorista no mapa (DivIcon Leaflet) — sem HUD duplicado na tela */
.driver-nav-marker-leaflet {
  background: transparent !important;
  border: none !important;
}

.driver-nav-flecha {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.45));
  transform-origin: 50% 50%;
}

.driver-nav-flecha svg {
  display: block;
}

.driver-speedo {
  position: fixed;
  left: 1rem;
  bottom: 5.2rem;
  z-index: 2200;
  min-width: 56px;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 15, 20, 0.82);
  backdrop-filter: blur(10px);
  color: #f1f5f9;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-align: center;
  pointer-events: none;
  user-select: none;
}
.driver-speedo::after {
  content: "km/h";
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0.72;
  margin-top: 0.1rem;
}
.driver-speedo.is-over {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fff;
}

.driver-content-stack {
  position: relative;
  z-index: 2200;
}

.driver-hero-head {
  padding: 0.6rem 0.72rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 15, 20, 0.72);
  backdrop-filter: blur(8px);
}

.driver-hero-head h1,
.driver-hero-head .muted {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.driver-top-online {
  position: fixed;
  top: calc(92px + env(safe-area-inset-top, 0px));
  right: 0.9rem;
  z-index: 2200;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.34rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(20, 26, 36, 0.9);
  backdrop-filter: blur(10px);
}

.driver-top-earnings {
  position: fixed;
  top: calc(160px + env(safe-area-inset-top, 0px));
  right: 0.9rem;
  z-index: 2200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

@media (max-width: 640px) {
  .driver-top-online {
    top: calc(104px + env(safe-area-inset-top, 0px));
    right: 0.75rem;
  }

  .driver-top-earnings {
    top: calc(196px + env(safe-area-inset-top, 0px));
    right: 0.75rem;
    gap: 0.85rem;
  }
}

/* Card de detalhes (corrida ativa) abaixo do saldo, sem sobrepor */
#driver-active-ride-card {
  position: fixed;
  left: 0.9rem;
  right: 0.9rem;
  /* top(earnings) + padding/pill aprox + gap + 2px */
  top: calc(160px + 46px + 14px + env(safe-area-inset-top, 0px));
  z-index: 2200;
  /* Limita a altura em telas mais baixas para não “engolir” a tela inteira. */
  max-height: min(52vh, 560px);
  overflow: auto;
  margin: 0;
  backdrop-filter: blur(10px);
  background: rgba(20, 26, 36, 0.9);
}

@media (max-width: 640px) {
  #driver-active-ride-card {
    top: calc(196px + 46px + 18px + env(safe-area-inset-top, 0px));
  }
}

.driver-earnings-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.54rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 15, 20, 0.82);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.driver-earnings-pill__value {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.driver-earnings-pill__chev {
  opacity: 0.85;
}

.driver-earnings-card {
  width: min(92vw, 420px);
  padding: 0.62rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(20, 26, 36, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.driver-footer-history {
  position: fixed;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 3.9rem;
  z-index: 2200;
  max-height: 48vh;
  overflow: auto;
  margin: 0;
  backdrop-filter: blur(10px);
  background: rgba(20, 26, 36, 0.9);
}

.driver-dock {
  position: fixed;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.75rem;
  z-index: 2200;
  display: flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
}

.driver-dock__actions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0.28rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(20, 26, 36, 0.9);
  backdrop-filter: blur(10px);
}

.ride-page-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.ride-page-card__head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.passenger-booking-card-reopen {
  position: fixed;
  top: 5.25rem;
  left: 0.9rem;
  z-index: 2100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.passenger-track-dock {
  position: fixed;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.75rem;
  z-index: 2200;
  display: flex;
  justify-content: center;
}

.ride-active-actions {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.ride-active-actions__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.driver-arrival-notice {
  margin: 0.7rem 0 0.85rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 166, 0.35);
  background: rgba(34, 211, 166, 0.08);
  text-align: center;
  /* Garante que o card do contador fique acima de tudo. */
  position: sticky;
  top: 0.85rem;
  z-index: 2147483000;
  backdrop-filter: blur(10px);
}

.ride-active-timerbar {
  margin-top: 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(18, 24, 34, 0.6);
  backdrop-filter: blur(10px);
}

.ride-active-timerbar__label {
  font-size: 0.82rem;
  color: var(--muted);
}

.ride-active-timerbar__time {
  margin-top: 0.25rem;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  color: var(--warning-fg);
}

.ride-active-timerbar__status {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.ride-active-timerbar__status.is-ready {
  color: var(--success-fg);
  font-weight: 700;
}

.ride-active-start-options {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.driver-arrival-notice__title {
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--success-fg);
}

.driver-arrival-notice__subtitle {
  margin-top: 0.25rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.driver-arrival-notice__timer {
  margin-top: 0.45rem;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.driver-arrival-notice__status {
  margin-top: 0.28rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.driver-arrival-notice__status.is-ready {
  color: #86efac;
  font-weight: 700;
}

.driver-arrival-notice__actions {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.driver-arrival-notice__actions form {
  display: flex;
}

.driver-arrival-notice__actions form .btn {
  width: 100%;
}

.driver-arrival-notice__actions #btn-cancel-after-wait:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.driver-arrival-notice__actions #btn-cancel-after-wait.btn--danger:disabled {
  opacity: 0.45;
}

.ride-active-actions__row form {
  display: flex;
}

.ride-active-actions__row form .btn {
  width: 100%;
}

.ride-active-summary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .driver-arrival-notice__actions .btn,
  .driver-arrival-notice__actions form {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 140px;
  }
  .ride-active-actions .btn,
  .ride-active-actions__row form,
  .ride-active-actions__row details {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 140px;
  }
  .ride-active-actions__row details {
    width: 100%;
  }
  .ride-active-actions__row details > summary.ride-active-summary-btn {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .topbar {
    flex-wrap: wrap;
    align-items: center;
    padding: 0.7rem 0.9rem;
  }
  .topbar__menu-btn {
    display: inline-flex;
    margin-left: auto;
  }
  .topbar__menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 340px);
    height: 100dvh;
    max-height: 100dvh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 0;
    padding: 1rem 0.9rem 1.2rem;
    border-right: 1px solid var(--border);
    border-top: none;
    background: var(--drawer-bg);
    transform: translateX(-110%);
    transition: transform 220ms ease;
    z-index: 2147483646;
    overflow-y: auto;
  }
  .topbar__menu.is-open {
    transform: translateX(0);
  }
  body.menu-open .topbar__menu {
    transform: translateX(0);
  }
  .topbar__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    z-index: 2147483645;
  }
  body.menu-open .topbar__overlay {
    display: block;
  }
  .topbar__drawer-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.3rem 0.2rem 0.85rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.45rem;
  }
  .topbar__drawer-links {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.6rem;
  }
  .topbar__drawer-links .btn {
    width: 100%;
    justify-content: flex-start;
  }
  .topnav {
    width: 100%;
    flex-direction: column;
    gap: 0.25rem;
  }
  .topnav a {
    width: 100%;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    color: var(--drawer-link-text);
    background: var(--drawer-link-bg);
  }
  .topnav a:hover {
    background: rgba(34, 211, 166, 0.18);
  }
  .topbar__menu .btn--ghost {
    border-color: rgba(148, 163, 184, 0.45);
    background: var(--drawer-link-bg);
    color: var(--drawer-link-text);
  }
  .topbar__user,
  .topbar__guest {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .driver-map-bg__veil {
    background: linear-gradient(
      180deg,
      rgba(12, 15, 20, 0.18) 0%,
      rgba(12, 15, 20, 0.34) 46%,
      rgba(12, 15, 20, 0.48) 100%
    );
  }
  .driver-footer-history {
    left: 0.6rem;
    right: 0.6rem;
    bottom: 3.6rem;
    max-height: 52vh;
  }
  .driver-top-online {
    top: 4.05rem;
    right: 0.6rem;
    left: 0.6rem;
    justify-content: space-between;
    border-radius: 12px;
  }
  .driver-top-earnings {
    top: 7.2rem;
    right: 0.6rem;
    left: 0.6rem;
    align-items: stretch;
  }
  .driver-earnings-pill {
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
  }
  .driver-earnings-card {
    width: 100%;
  }
  #driver-active-ride-card {
    top: calc(7.2rem + 2.2rem + 0.45rem + 2px);
    left: 0.6rem;
    right: 0.6rem;
    /* No modo vertical, não “prenda” o card em uma altura fixa. */
    max-height: none !important;
    padding: 0.7rem 0.7rem;
    overflow: visible !important;
  }

  #driver-active-ride-card h2 {
    font-size: 0.98rem;
    margin-bottom: 0.35rem;
    line-height: 1.15;
  }

  /* Compactação visual dentro do card (principalmente "valor" e stats). */
  #driver-active-ride-card .stat {
    padding: 0.6rem !important;
  }
  #driver-active-ride-card .stat strong {
    font-size: 1.02rem !important;
  }
  #driver-active-ride-card .stat span {
    font-size: 0.72rem !important;
  }

  /* Compacta o bloco do "valor" (tem font-size inline) e textos internos. */
  #driver-active-ride-card [style*="font-size:1.65rem"] {
    font-size: 1.05rem !important;
    line-height: 1.05 !important;
  }
  #driver-active-ride-card p {
    font-size: 0.82rem !important;
    margin: 0.25rem 0 !important;
  }
  #driver-active-ride-card .muted {
    font-size: 0.8rem !important;
  }
  .driver-dock {
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.55rem;
  }
  .passenger-track-dock {
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.55rem;
  }
  .passenger-booking-card-reopen {
    top: 4.75rem;
    left: 0.6rem;
  }
  .driver-hero-head {
    padding: 0.65rem 0.75rem;
  }
}

/* Se a tela for baixa em altura, garante um teto ainda menor. */
@media (max-height: 720px) {
  #driver-active-ride-card {
    max-height: none !important;
    overflow: visible !important;
  }
}

/* Passageiro home mobile (mapa + card inferior) */
.passenger-mobile-home {
  position: relative;
  min-height: calc(100vh - 64px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0e1520;
}
.passenger-mobile-home__map {
  height: 46vh;
  min-height: 280px;
}
.passenger-mobile-home__sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.97);
  color: #1f2937;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 0.7rem 0.9rem 0.95rem;
  box-shadow: 0 -12px 32px rgba(2, 6, 23, 0.22);
}
.passenger-mobile-home__grabber {
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: #d1d5db;
  margin: 0.1rem auto 0.55rem;
}
.passenger-mobile-home__greeting {
  margin: 0;
  text-align: center;
  font-size: 1.15rem;
  color: #1f2937;
}
.passenger-mobile-home__local-pill {
  margin: 0.45rem auto 0.7rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  font-size: 0.84rem;
  background: #eef2f7;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.passenger-mobile-home__search-wrap {
  position: relative;
}
.passenger-mobile-home__search-wrap input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 0.72rem 0.9rem;
  font-size: 0.98rem;
  background: #f9fafb;
  color: #111827;
}
.passenger-mobile-home__suggest {
  position: relative;
  z-index: 12;
}
.passenger-mobile-home__campaign {
  margin-top: 0.8rem;
  padding: 0.58rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #14213d, #0b1325);
  color: #e5e7eb;
}
.passenger-mobile-home__campaign h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}
.passenger-mobile-home__campaign p {
  margin: 0 0 0.55rem;
  font-size: 0.83rem;
  color: #cbd5e1;
}
.passenger-mobile-home__quick-actions {
  margin-top: 0.65rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

@media (max-width: 920px) {
  .passenger-mobile-home {
    margin: -0.6rem -0.8rem 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}

/* ==============================
   Global responsive polish pack
   ============================== */
img,
svg,
video {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  vertical-align: top;
  word-break: break-word;
}

.btn,
button,
input,
select,
textarea {
  min-height: 42px;
}

label {
  font-weight: 600;
  letter-spacing: 0.01em;
}

@media (max-width: 980px) {
  .main-wrap {
    max-width: 100%;
    padding: 1rem 0.85rem 2rem;
  }

  .card {
    padding: 0.8rem 0.78rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  }

  .grid-2 {
    gap: 0.85rem;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0.7rem 0.8rem;
    gap: 0.55rem;
  }

  .brand__text {
    font-size: 1rem;
  }

  .main-wrap {
    padding: 0.8rem 0.65rem 1.5rem;
  }

  .site-footer {
    padding: 1rem 0.75rem;
    font-size: 0.8rem;
  }

  .card {
    padding: 0.68rem 0.64rem;
    border-radius: 12px;
  }

  .card h2 {
    font-size: 1.03rem;
    margin-bottom: 0.55rem;
  }

  .btn {
    width: 100%;
    min-height: 36px;
    border-radius: 10px;
    font-size: 0.86rem;
  }

  .btn--sm {
    min-height: 32px;
    font-size: 0.76rem;
  }

  .row-actions,
  .ride-active-actions__row {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .row-actions .btn,
  .ride-active-actions__row .btn {
    width: 100%;
  }

  .modal {
    width: min(560px, 100%);
    border-radius: 12px;
    padding: 0.95rem;
  }

  .modal h3 {
    font-size: 1rem;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .driver-top-online,
  .driver-top-earnings {
    right: 0.55rem;
  }

  #driver-active-ride-card,
  .driver-footer-history {
    left: 0.55rem;
    right: 0.55rem;
  }

  .passenger-track-dock {
    left: 0.55rem;
    right: 0.55rem;
    bottom: 0.55rem;
  }
}

/* Passenger pages polish */
.passenger-page-alert {
  margin-bottom: 1rem;
}

.passenger-ride-list {
  display: grid;
  gap: 0.7rem;
}

.passenger-ride-card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 0.7rem;
}

.passenger-ride-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.passenger-ride-card__route {
  display: grid;
  gap: 0.42rem;
}

.passenger-ride-card__route p {
  margin: 0.14rem 0 0;
  font-size: 0.92rem;
  line-height: 1.3;
}

.passenger-ride-card__meta {
  margin-top: 0.62rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.86rem;
}

.passenger-ride-card__actions {
  margin-top: 0.6rem;
  display: flex;
  justify-content: flex-end;
}

.passenger-home-hint {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
}

.passenger-mobile-home--polished .passenger-mobile-home__sheet {
  box-shadow: 0 -16px 36px rgba(2, 6, 23, 0.22);
}

.passenger-mobile-home__search-wrap--elevated input {
  background: #ffffff;
  border-color: #d7dde7;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.passenger-mobile-home__campaign--polished {
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.ride-page-grid {
  gap: 1rem;
}

.ride-page-card {
  max-width: 680px;
  border-radius: 14px;
}

.ride-booking-fields {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
}

/* Rota (passageiro): campos mais organizados e limpos */
#passenger-left-card #booking-fields .form-grid > div {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.015);
}

#passenger-left-card #booking-fields label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.32rem;
}

.row-origin {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: start;
}

.ride-origin-summary {
  margin-top: 0.3rem;
  border: 1px dashed rgba(34, 211, 166, 0.45);
  border-radius: 10px;
  padding: 0.5rem 0.58rem;
  font-size: 0.9rem;
  color: #e8fef8;
  background: rgba(34, 211, 166, 0.1);
}

.ride-origin-actions {
  margin-top: 0.35rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.ride-origin-editor {
  margin-top: 0.45rem;
}

.address-split {
  display: grid;
  grid-template-columns: 1fr 98px;
  gap: 0.42rem;
  align-items: start;
}

.address-split textarea.pac-address-field,
.pac-address-num {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.11);
  border-radius: 10px;
}

/* Mobile: rua+numero na mesma linha (aparência de uma única caixa) */
.address-split {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.08rem;
}

.address-split textarea.pac-address-field,
.address-split .pac-address-num {
  border: none;
  background: transparent;
  border-radius: 10px;
  color: var(--text);
}
.address-split textarea.pac-address-field::placeholder,
.address-split .pac-address-num::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.address-split .pac-address-num {
  width: 92px;
}

#btn-meu-local,
#btn-edit-origin,
#btn-edit-dest {
  white-space: nowrap;
}

.ride-edit-btn {
  border-color: rgba(34, 211, 166, 0.6);
  background: rgba(34, 211, 166, 0.14);
  color: #e8fff8;
  font-weight: 700;
}

.ride-edit-btn:hover {
  background: rgba(34, 211, 166, 0.24);
  border-color: rgba(34, 211, 166, 0.85);
  text-decoration: none;
}

body.app-body[data-theme="light"] .ride-edit-btn {
  color: #065f5b;
  background: rgba(14, 165, 163, 0.14);
  border-color: rgba(14, 165, 163, 0.55);
}

body.app-body[data-theme="light"] .ride-origin-summary {
  color: #0f172a;
  background: rgba(14, 165, 163, 0.12);
  border-color: rgba(14, 165, 163, 0.45);
}

#suggest-origin,
#suggest-dest {
  margin-top: 0.32rem;
}

.ride-track-actions {
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 0.25rem 0 0.75rem;
}

.ride-os-metrics {
  margin-top: 0.2rem;
}

.ride-track-note {
  margin: 0;
  font-size: 0.8rem;
}

.ride-route-stats {
  margin-top: 1rem;
}

.ride-category-estimates {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.ride-category-estimates__title {
  margin-top: 0.9rem;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text);
}

.ride-category-estimates__card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem 0.55rem;
  background: rgba(255, 255, 255, 0.03);
}

.ride-category-estimates__card h4 {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ride-category-estimates__card p {
  margin: 0.15rem 0 0.05rem;
  font-weight: 800;
  font-size: 1rem;
}

.ride-category-estimates__card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.ride-payment-wrap {
  margin-top: 0.9rem;
}

.ride-category-picker {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.32rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.ride-category-picker .btn {
  flex: 1 1 120px;
}

.ride-select-clean {
  width: 100%;
  padding: 0.62rem 0.68rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.ride-payment-hint {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.ride-request-btn {
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .ride-page-card {
    max-width: 100%;
  }

  .ride-booking-fields {
    padding: 0.42rem;
  }

  #passenger-left-card #booking-fields .form-grid > div {
    padding: 0.42rem;
  }

  .row-origin {
    grid-template-columns: 1fr;
  }

  .address-split {
    grid-template-columns: 1fr 92px;
    gap: 0.28rem;
  }

  .pac-address-num {
    width: 100%;
    min-width: 0;
  }

  #btn-meu-local,
  #btn-edit-origin,
  #btn-edit-dest {
    width: 100%;
  }

  .ride-track-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ride-category-estimates {
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }

  .ride-category-estimates__card {
    padding: 0.42rem 0.45rem;
  }

  .ride-category-estimates__card p {
    font-size: 0.92rem;
  }

  .ride-category-picker {
    gap: 0.35rem;
    padding: 0.26rem;
  }

  .ride-category-picker .btn {
    flex: 1 1 calc(50% - 0.35rem);
  }
}

/* Driver pages polish */
.driver-page-alert {
  margin-bottom: 1rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin: 0.3rem 0;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  user-select: none;
}

.toggle-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.toggle-switch__dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.95);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.toggle-switch__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--danger-fg);
}

.toggle-switch.is-on {
  border-color: rgba(34, 211, 166, 0.45);
  background: rgba(34, 211, 166, 0.14);
}

.toggle-switch.is-on .toggle-switch__dot {
  background: rgba(34, 211, 166, 0.95);
}

.toggle-switch.is-on .toggle-switch__label {
  color: var(--success-fg);
}

.chat-sub {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.chat-messages-box {
  height: 320px;
  overflow: auto;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.chat-input-row .chat-input {
  flex: 1;
}

.chat-row-actions-end {
  justify-content: flex-end;
  margin-top: 1rem;
}

.driver-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
}

.driver-history-summary__hint {
  font-size: 0.85rem;
}

.driver-history-content {
  margin-top: 0.85rem;
}

.driver-history-head {
  margin-bottom: 0.75rem;
}

.driver-history-head__hint {
  font-size: 0.9rem;
}

.driver-history-empty {
  margin: 0;
}

.driver-active-card {
  max-width: 720px;
  margin: 0 auto;
}

.driver-active-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.driver-active-status-line {
  margin-top: 0.75rem;
}

.driver-active-metrics-wrap {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.58rem;
  margin: 0.5rem 0;
}
body.app-body[data-theme="light"] .driver-active-metrics-wrap {
  background: rgba(15, 23, 42, 0.04);
}

.driver-active-metrics-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.driver-active-trip-label {
  font-weight: 800;
  color: var(--success-fg);
  letter-spacing: 0.01em;
}
body.app-body[data-theme="light"] .driver-active-trip-label {
  color: var(--accent-dim);
}

.driver-active-trip-sub {
  font-size: 0.86rem;
  margin-top: 0.25rem;
}

.driver-active-price-box {
  text-align: right;
}

.driver-active-price {
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.1;
}

.driver-active-price-sub {
  font-size: 0.82rem;
  margin-top: 0.1rem;
}

.driver-active-stat-grid {
  margin-top: 0.9rem;
}

@media (max-width: 640px) {
  .chat-input-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .driver-active-price-box {
    text-align: left;
    width: 100%;
  }
}

/* ---------- Ajustes de contraste (tema claro + leitura) ---------- */
body.app-body[data-theme="light"] .passenger-ride-card {
  background: var(--surface-subtle);
  border-color: var(--border);
}
body.app-body[data-theme="light"] .ride-booking-fields {
  background: var(--surface-subtle);
  border-color: var(--border);
}
body.app-body[data-theme="light"] #passenger-left-card #booking-fields .form-grid > div {
  background: #ffffff;
  border-color: var(--border);
}
body.app-body[data-theme="light"] .address-split {
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.03);
}
body.app-body[data-theme="light"] kbd {
  background: rgba(15, 23, 42, 0.07);
  color: var(--text);
}
body.app-body[data-theme="light"] .chat-messages-box {
  background: var(--surface-subtle);
}
body.app-body[data-theme="light"] .ride-category-estimates__card {
  background: var(--surface-subtle);
}
body.app-body[data-theme="light"] .ride-category-picker {
  background: var(--surface-subtle);
}
body.app-body[data-theme="light"] .ride-select-clean {
  background: var(--surface-subtle);
}
body.app-body[data-theme="light"] .toggle-switch {
  background: rgba(15, 23, 42, 0.05);
}
body.app-body[data-theme="light"] .driver-active-price,
body.app-body[data-theme="light"] .driver-active-trip-sub {
  color: var(--text);
}
body.app-body[data-theme="light"] .driver-active-price-sub {
  color: var(--muted);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

/* ---------- Meus envios (mini cards) ---------- */
.envios-page-back {
  margin-bottom: 0.65rem;
}
.envios-page-card .envios-page-head {
  margin-bottom: 1rem;
}
.envios-page-title {
  margin: 0;
}
.envios-page-lead {
  margin: 0.35rem 0 0;
  max-width: 68ch;
  font-size: 0.95rem;
}
.envios-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.envio-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-subtle);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.envio-card:hover {
  border-color: rgba(34, 211, 166, 0.22);
}
body.app-body[data-theme="light"] .envio-card:hover {
  border-color: rgba(13, 148, 136, 0.35);
}
.envio-card[open] {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  border-color: rgba(34, 211, 166, 0.28);
}
body.app-body[data-theme="light"] .envio-card[open] {
  box-shadow: var(--shadow);
  border-color: rgba(13, 148, 136, 0.4);
}
.envio-card > summary.envio-card__summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}
.envio-card > summary.envio-card__summary::-webkit-details-marker {
  display: none;
}
.envio-card__chev {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
  flex-shrink: 0;
  margin-top: 2px;
}
.envio-card[open] .envio-card__chev {
  transform: rotate(45deg);
  margin-top: -2px;
}
.envio-card__summary-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}
.envio-card__id {
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.envio-card__when {
  font-size: 0.82rem;
}
.envio-card__badge {
  flex-shrink: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.envio-card__body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}
.envio-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  padding-top: 0.95rem;
}
@media (max-width: 640px) {
  .envio-card__grid {
    grid-template-columns: 1fr;
  }
}
.envio-block__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.envio-block__text {
  font-size: 0.92rem;
  line-height: 1.45;
  word-break: break-word;
}
.envio-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.envio-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.envio-code-pill--note {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}
body.app-body[data-theme="light"] .envio-code-pill--note {
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.28);
}
.envio-code-pill__k {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.envio-code-pill__v {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--accent-dim);
  background: none;
  padding: 0;
}
body.app-body[data-theme="light"] .envio-code-pill__v {
  color: var(--accent-dim);
}
.envio-actions,
.finance-ticket-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
}
.envio-actions .btn--primary,
.finance-ticket-card__actions .btn--primary {
  margin-left: auto;
}
@media (max-width: 640px) {
  .envio-actions .btn--primary,
  .finance-ticket-card__actions .btn--primary {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
  .envio-actions .btn--ghost,
  .finance-ticket-card__actions .btn--ghost {
    flex: 1 1 auto;
    min-width: calc(50% - 0.25rem);
    justify-content: center;
  }
}
.envio-actions__off {
  font-size: 0.88rem;
  width: 100%;
  margin-top: 0.15rem;
}
.envios-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: min(92vw, 420px);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
body.app-body[data-theme="light"] .envios-toast {
  background: var(--bg-elevated);
}

/* Linha do tempo (eventos) — mini cartões */
.timeline-driver-page-card {
  margin-top: 0.5rem;
}
.timeline-event-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
  word-break: break-word;
}
.timeline-event-card__ride {
  flex-shrink: 0;
}
.timeline-event-card__transition {
  padding-top: 0.95rem;
}
.timeline-event-card__transition .envio-block__label {
  margin-bottom: 0.25rem;
}
.timeline-event-card__status {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}
.timeline-event-card__route-grid {
  padding-top: 0.85rem;
}
.timeline-event-card__actions {
  margin-top: 0.85rem;
}
.timeline-event-passenger {
  margin-top: 0.75rem;
}
.timeline-event-passenger__name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.timeline-event-card__details {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}

/* Financeiro — mini cartões */
.finance-page-card-wrap__title {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
}
.finance-ticket-card__amount {
  letter-spacing: -0.02em;
}
.finance-ticket-card__badges {
  white-space: normal;
  text-align: right;
  line-height: 1.25;
  max-width: min(100%, 200px);
}
@media (max-width: 640px) {
  .finance-ticket-card__badges {
    max-width: 100%;
    text-align: left;
  }
}
.finance-ticket-card__proof {
  margin-top: 0.75rem;
}
.finance-ticket-card__proof-note {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}
.finance-ticket-card__updated {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
}
.finance-ticket-card__desc {
  margin: 0.35rem 0 0;
}
.finance-page-card-wrap--follow {
  margin-top: 1rem;
}

/* Driver index (painéis fixos) — tema claro legível em mobile */
body.app-body[data-theme="light"] .driver-speedo {
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--border);
  color: var(--text);
}
body.app-body[data-theme="light"] .driver-hero-head {
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--border);
}
body.app-body[data-theme="light"] .driver-top-online {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--border);
  color: var(--text);
}
body.app-body[data-theme="light"] #driver-active-ride-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--border);
  color: var(--text);
}
body.app-body[data-theme="light"] .driver-earnings-pill {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--border);
  color: var(--text);
}
body.app-body[data-theme="light"] .driver-earnings-card {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
}
body.app-body[data-theme="light"] .driver-footer-history {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
}
body.app-body[data-theme="light"] .driver-dock__actions {
  background: rgba(255, 255, 255, 0.95);
}

/* Swipe control (driver critical actions) */
.swipe-control {
  width: 100%;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.swipe-control__track {
  position: relative;
  height: 56px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
body.app-body[data-theme="light"] .swipe-control__track {
  background: rgba(15, 23, 42, 0.04);
}
.swipe-control__hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  pointer-events: none;
  white-space: nowrap;
}
.swipe-control__hint--left {
  left: 14px;
}
.swipe-control__hint--right {
  right: 14px;
}
.swipe-control__knob {
  position: absolute;
  top: 5px;
  left: 0;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  touch-action: none;
  cursor: grab;
}
body.app-body[data-theme="light"] .swipe-control__knob {
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.18);
}
.swipe-control__knob:active {
  cursor: grabbing;
}
.swipe-control.is-left .swipe-control__track {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.08);
}
.swipe-control.is-right .swipe-control__track {
  border-color: rgba(34, 211, 166, 0.45);
  background: rgba(34, 211, 166, 0.08);
}
.swipe-control.is-committing .swipe-control__hint {
  opacity: 0.55;
}
.swipe-control--left-disabled .swipe-control__hint--left {
  opacity: 0.25;
}

/* Tourism guides */
.tourism-guide-grid,
.tourism-packages-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tourism-guide-card__cover {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.tourism-package-card {
  overflow: hidden;
}

.tourism-carousel {
  position: relative;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 0.65rem;
}

.tourism-carousel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.tourism-carousel__img.is-active {
  opacity: 1;
}

.tourism-ads {
  position: relative;
  min-height: 240px;
}

.tourism-ads__item {
  display: none;
  gap: 0.8rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.02);
}

.tourism-ads__item.is-active {
  display: grid;
  grid-template-columns: minmax(130px, 210px) 1fr;
}

.tourism-ads__img {
  width: 100%;
  max-width: 210px;
  height: 145px;
  object-fit: cover;
  border-radius: 10px;
}

@media (max-width: 760px) {
  .tourism-ads__item.is-active {
    grid-template-columns: 1fr;
  }
  .tourism-ads__img {
    max-width: none;
    height: 160px;
  }
}

.tourism-type-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.tourism-type-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  user-select: none;
}

.tourism-type-check input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: 0 0 18px;
}

.tourism-type-check span {
  font-size: 0.92rem;
  line-height: 1.25;
}

@media (max-width: 760px) {
  .tourism-type-checklist {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
  .tourism-type-check {
    padding: 0.6rem 0.65rem;
  }
}
