/* =====================================================================
   Muvio — tela do passageiro
   ===================================================================== */
:root {
  --brand: #16a34a;
  --brand-600: #15803d;
  --brand-50: #ecfdf3;
  --brand-100: #d1fadf;
  --brand-rgb: 22,163,74;
  --on-brand: #ffffff;
  --ink: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --fill: #f1f5f9;
  --surface: #ffffff;
  --bg: #eef2f6;
  --red: #e11d48;
  --red-50: #fff1f2;
  --amber-50: #fffbeb;
  --pin: #0f172a;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 8px 24px rgba(15, 23, 42, .10);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, .18);
  --map-h: 40dvh;
  color-scheme: light;
}
.ride-mode { --map-h: 52dvh; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text); background: var(--bg);
  display: flex; flex-direction: column; overflow: hidden;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
.hidden { display: none !important; }
[hidden] { display: none !important; } /* o atributo hidden sempre vence o display das classes */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#map { flex: 0 0 var(--map-h); height: var(--map-h); width: 100%; z-index: 0; transition: height .25s, flex-basis .25s; background: #e5e9ef; }
.leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.8) !important; border-radius: 6px 0 0 0; }

/* ---------------------------------------------------------------------
   Pino de Partida/Destino. O ponto (0,0) do .mpin é o local exato.
   --------------------------------------------------------------------- */
.mpin { position: absolute; width: 0; height: 0; pointer-events: none; }
.center-pin { position: fixed; left: 50%; top: calc(var(--map-h) / 2); z-index: 500; }
.mpin-body {
  position: absolute; left: -13px; bottom: 0; width: 26px;
  display: flex; flex-direction: column; align-items: center;
  filter: drop-shadow(0 3px 3px rgba(15,23,42,.28));
  transition: transform .28s cubic-bezier(.34, 1.56, .64, 1);
}
.mpin-head { width: 26px; height: 26px; border-radius: 50%; background: var(--pin); position: relative; }
.mpin-head::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #fff; }
.mpin-stick { width: 3px; height: 14px; background: var(--pin); border-radius: 0 0 2px 2px; margin-top: -1px; }
.mpin-dot { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--pin); opacity: 0; transition: opacity .15s; }
.mpin-label {
  position: absolute; left: 0; bottom: 48px; transform: translateX(-50%);
  background: var(--pin); color: #fff; font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: .1px;
  padding: 9px 14px; border-radius: 10px; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(15,23,42,.25);
  transition: opacity .15s, transform .2s;
}
.mpin.moving .mpin-body { transform: translateY(-16px); transition: transform .15s ease-out; }
.mpin.moving .mpin-dot { opacity: 1; }
.mpin.moving .mpin-label { opacity: 0; transform: translateX(-50%) translateY(-14px) scale(.9); }
.mpin.static .mpin-label { font-size: 12px; padding: 7px 10px; border-radius: 8px; }
.mpin-icon { background: none; border: 0; }
.ride-mode .center-pin { display: none; }

/* caixa de tempo no pino ("4 MIN") */
.mpin-label.com-eta { background: var(--ink); padding: 7px 11px 6px; border-radius: 9px; text-align: center; line-height: 1; }
.mpin-label .eta { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mpin-label .eta b { font-size: 19px; font-weight: 800; letter-spacing: -.5px; }
.mpin-label .eta small { font-size: 9px; font-weight: 700; letter-spacing: 1.2px; opacity: .85; }
.mpin.static .mpin-label.com-eta { font-size: 12px; }

/* botão "minha localização" */
.fab {
  position: fixed; right: 14px; top: calc(var(--map-h) - 66px); z-index: 600;
  width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--surface); color: var(--brand);
  box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; transition: transform .15s;
}
.fab:hover { color: var(--brand-600); }
.fab:active { transform: scale(.94); }
.fab.busy { animation: pulse 1s infinite; }

/* aviso no topo */
.banner {
  position: fixed; left: 12px; right: 12px; top: max(12px, env(safe-area-inset-top)); z-index: 900;
  background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 16px; font-size: 14px; font-weight: 500; line-height: 1.35;
  box-shadow: var(--shadow-lg);
  animation: desce .25s ease-out;
}

/* ---------------------------------------------------------------------
   Painel (bottom sheet no celular, cartão flutuante no computador)
   --------------------------------------------------------------------- */
.sheet {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--surface); border-radius: 24px 24px 0 0; margin-top: -24px; z-index: 800; position: relative;
  padding: 8px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(15,23,42,.12);
}
.grab { width: 44px; height: 5px; border-radius: 3px; background: #cbd5e1; margin: 4px auto 12px; }

.brand { display: flex; align-items: center; gap: 12px; margin: 2px 0 16px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 4px 12px rgba(var(--brand-rgb),.35); flex: 0 0 auto; object-fit: contain; }
.app-title { font-size: 21px; font-weight: 800; letter-spacing: -.4px; margin: 0; color: var(--ink); line-height: 1.1; }
.brand-sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.group-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--faint); margin: 18px 2px 10px; }

/* campos */
.field { display: block; margin-bottom: 12px; position: relative; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px 2px; font-weight: 600; }
.field em { font-style: normal; color: var(--faint); font-weight: 500; }
input, select {
  width: 100%; font: inherit; font-size: 16px; /* 16px evita zoom no iOS */
  padding: 13px 14px; border: 1.5px solid transparent; border-radius: 12px; background: var(--fill); color: var(--ink);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input::placeholder { color: var(--faint); }
input:hover, select:hover { background: #eaeff5; }
input:focus, select:focus { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb),.14); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
input.invalid { border-color: var(--red); background: var(--red-50); }

/* ---- cartão de trajeto: embarque → destino ---- */
.trip { position: relative; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 4px; box-shadow: var(--shadow-sm); margin-bottom: 8px; }
.trip .field { margin: 0; }
.trip-sep { height: 1px; background: var(--line); margin: 0 12px 0 44px; }
.trip::before { /* linha ligando os dois pontos */
  content: ""; position: absolute; left: 22px; top: 36px; bottom: 34px; width: 2px;
  background: repeating-linear-gradient(to bottom, #cbd5e1 0 4px, transparent 4px 8px);
}
.loc { display: flex; gap: 14px; align-items: center; padding: 12px 12px 12px 16px; border-radius: 14px; }
.loc-text { min-width: 0; flex: 1; }
.loc small { display: block; color: var(--faint); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 2px; }
.loc strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0 4px 14px; line-height: 1.4; }

.dot { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; display: inline-block; position: relative; z-index: 1; }
.dot-green { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.dot-red { background: var(--ink); border-radius: 3px; box-shadow: 0 0 0 4px #e2e8f0; }

.dest-input { display: flex; align-items: center; gap: 12px; border: 1.5px solid transparent; border-radius: 14px; padding: 0 0 0 16px; background: transparent; transition: border-color .15s, box-shadow .15s, background .15s; }
.dest-input input { border: 0; padding: 15px 0; background: transparent; font-weight: 600; box-shadow: none; }
.dest-input input::placeholder { font-weight: 500; }
.dest-input input:hover, .dest-input input:focus { background: transparent; box-shadow: none; border: 0; }
.dest-input:focus-within { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb),.14); }
.dest-input.invalid { border-color: var(--red) !important; background: var(--red-50); box-shadow: 0 0 0 4px rgba(225,29,72,.12); }
.dest-input.invalid input { background: transparent; }
/* Endereço escolhido: texto completo, quebrando linha (nunca cortado) */
.dest-txt { display: none; flex: 1; min-width: 0; padding: 13px 0; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; cursor: text; }
.dest-input.escolhido input { display: none; }
.dest-input.escolhido .dest-txt { display: block; }
.dest-input .pin-btn, .dest-input .link { flex-shrink: 0; }
.pin-btn {
  flex: 0 0 auto; border: 0; background: var(--fill); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700;
  padding: 9px 12px; margin-right: 8px; border-radius: 10px; cursor: pointer; white-space: nowrap; transition: background .15s;
}
.pin-btn:hover { background: #e2e8f0; }
.pin-btn:active { transform: scale(.97); }
.link { background: none; border: 0; font-size: 16px; color: var(--faint); padding: 8px; cursor: pointer; border-radius: 8px; }
.link:hover { color: var(--ink); background: var(--fill); }

.suggest { list-style: none; margin: 4px 4px 6px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; }
.suggest li { padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; border-radius: 10px; }
.suggest li:hover, .suggest li:active { background: var(--fill); }
.suggest li small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.suggest li.suggest-map { color: var(--brand-600); }

.estimate {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-600);
  border-radius: 16px; padding: 12px 16px; margin: 4px 0 6px; font-size: 14px;
}
.estimate b { font-size: 20px; font-weight: 800; letter-spacing: -.3px; color: var(--ink); }

.nocover { display: flex; flex-direction: column; gap: 4px; background: var(--red-50); border: 1px solid #fecdd3; color: #881337; border-radius: 14px; padding: 12px 14px; margin: -4px 0 12px; font-size: 14px; }

/* botões */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  font: inherit; font-size: 16px; font-weight: 700; padding: 16px; border-radius: 14px; border: 0;
  cursor: pointer; text-decoration: none; text-align: center; transition: transform .1s, background .15s, box-shadow .15s;
}
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 8px 20px rgba(var(--brand-rgb),.32); }
.btn.primary:hover { background: var(--brand-600); }
.btn.primary:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.btn.danger { background: #fff; color: var(--red); border: 1.5px solid #fecdd3; margin-top: 10px; }
.btn.danger:hover { background: var(--red-50); }
.btn.ghost { background: var(--fill); color: var(--ink); }
.btn.ghost:hover { background: #e2e8f0; }
#btnChamar { margin-top: 18px; font-size: 17px; }

.error { color: #9f1239; background: var(--red-50); border: 1px solid #fecdd3; border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 500; margin: 6px 0 0; }
.mock { text-align: center; font-size: 12px; color: #b45309; margin: 12px 0 0; }

/* ---------------------------------------------------------------------
   Acompanhamento da corrida
   --------------------------------------------------------------------- */
.status { display: flex; gap: 14px; align-items: center; margin: 4px 0 16px; }
.status h2 { margin: 0 0 4px; font-size: 21px; font-weight: 800; letter-spacing: -.4px; line-height: 1.2; color: var(--ink); }
.status p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.4; }
.status-icon { flex: 0 0 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 27px; background: var(--fill); }
.status-icon.searching { border-radius: 50%; background: radial-gradient(circle, var(--brand) 28%, transparent 30%), var(--brand-100); animation: pulse 1.4s infinite; }
.status-icon.ok { background: var(--brand-50); }
.status-icon.fail { background: var(--red-50); }

.alert { background: var(--amber-50); border: 1px solid #fde68a; color: #78350f; border-radius: 16px; padding: 14px 16px; font-size: 15.5px; font-weight: 700; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; line-height: 1.35; }
.alert.go { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 8px 20px rgba(var(--brand-rgb),.3); }

.driver { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.avatar { flex: 0 0 52px; height: 52px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; font-size: 24px; overflow: hidden; box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--brand-100); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.driver-info { flex: 1; min-width: 0; }
.driver-info strong { display: block; font-size: 16px; font-weight: 700; color: var(--ink); }
.driver-info span { display: block; color: var(--muted); font-size: 14px; margin-top: 1px; }
.plate { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 800; font-size: 15px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-top-width: 7px; border-top-color: #1d4ed8; border-radius: 7px; padding: 3px 9px; letter-spacing: 1.5px; }

.code { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--brand-50); border: 2px dashed var(--brand-100); border-radius: 16px; padding: 12px 16px; margin-bottom: 12px; }
.code span { font-size: 13px; color: var(--brand-600); font-weight: 600; }
.code strong { font-size: 28px; font-weight: 800; letter-spacing: 6px; color: var(--brand-600); }

.actions { display: flex; gap: 10px; margin-bottom: 12px; }
.actions .btn { font-size: 15px; padding: 13px; }
.badge { background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 800; padding: 2px 7px; }

.ride-addr { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); padding: 12px 14px; background: var(--fill); border-radius: 14px; }

/* ---------------------------------------------------------------------
   Diálogos (cancelar, chat)
   --------------------------------------------------------------------- */
.dialog { border: 0; border-radius: 22px; padding: 22px; width: min(92vw, 420px); box-shadow: var(--shadow-lg); color: var(--text); }
.dialog::backdrop { background: rgba(15,23,42,.5); backdrop-filter: blur(2px); }
.dialog h3 { margin: 0 0 14px; font-size: 18px; font-weight: 800; color: var(--ink); }
.dialog-actions { display: flex; gap: 10px; margin-top: 16px; }
.dialog-actions .btn { margin: 0; font-size: 15px; padding: 14px; }

.chat { padding: 0; height: min(80dvh, 580px); overflow: hidden; }
.chat[open] { display: flex; flex-direction: column; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--line); }
.chat-head strong { font-size: 16px; color: var(--ink); }
.chat-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--fill); }
.msg { max-width: 80%; padding: 9px 13px; border-radius: 16px 16px 16px 6px; font-size: 15px; line-height: 1.4; background: #fff; align-self: flex-start; overflow-wrap: anywhere; box-shadow: var(--shadow-sm); }
.msg.me { background: var(--brand); color: var(--on-brand); align-self: flex-end; border-radius: 16px 16px 6px 16px; }
.msg small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.msg.me small { color: rgba(255,255,255,.8); }
.chat-empty { color: var(--muted); text-align: center; margin: auto; font-size: 14px; max-width: 260px; line-height: 1.45; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.chat-form input { border-radius: 999px; padding: 12px 16px; }
.chat-form .btn { width: auto; padding: 0 20px; font-size: 15px; border-radius: 999px; box-shadow: none; }

/* marcador do GPS */
.gps-dot { width: 16px; height: 16px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.22), 0 2px 6px rgba(0,0,0,.25); }

/* ---------------------------------------------------------------------
   Serviço indisponível
   --------------------------------------------------------------------- */
.blocker { position: fixed; inset: 0; z-index: 2000; background: linear-gradient(160deg, #f8fafc, var(--bg)); display: grid; place-items: center; padding: 24px; }
.blocker-card { background: #fff; border-radius: 24px; padding: 32px 24px; max-width: 380px; width: 100%; text-align: center; box-shadow: var(--shadow); }
.blocker-icon { font-size: 46px; margin-bottom: 10px; }
.blocker-card h2 { margin: 0 0 8px; font-size: 21px; font-weight: 800; color: var(--ink); }
.blocker-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.5; }

/* ---------------------------------------------------------------------
   Marcar destino no mapa
   --------------------------------------------------------------------- */
.dest-mode { --map-h: calc(100dvh - 260px); }
.dest-mode #btnLocate { display: none; }
.dest-title { font-size: 21px; font-weight: 800; letter-spacing: -.4px; color: var(--ink); margin: 0 0 4px; }
.dest-loc { margin-bottom: 14px; background: var(--fill); }
.dest-cancel { margin-top: 8px; }

/* ---------------------------------------------------------------------
   Veículos no mapa (vetorial ou folha 3D)
   --------------------------------------------------------------------- */
.veic-icon { background: none; border: 0; }
.veic { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; transition: opacity .4s ease;
  filter: drop-shadow(1.5px 2.5px 1.6px rgba(20, 22, 30, .3)); }
.veic-corpo { position: absolute; transition: transform .9s ease; }
.veic-corpo.vetor.carro { left: -11px; top: -22px; width: 22px; height: 44px; }
.veic-corpo.vetor.moto { left: -7px; top: -16px; width: 14px; height: 32px; }
.veic-corpo.vetor svg { width: 100%; height: 100%; display: block; }
.veic-corpo.folha { left: -24px; top: -24px; width: 48px; height: 48px; background-repeat: no-repeat; background-size: 288px 192px; transition: none; }
.veic.com-folha:not(.meu) { filter: none; }
.veic.entrando, .veic.saindo { opacity: 0; }
.veic.meu { filter: drop-shadow(0 0 1.5px rgba(var(--brand-rgb),.95)) drop-shadow(0 0 4px rgba(var(--brand-rgb),.5)) drop-shadow(1.5px 2.5px 1.6px rgba(20,22,30,.3)); }
.veic.meu .veic-corpo.vetor.carro { left: -14px; top: -28px; width: 28px; height: 56px; }
.veic.meu .veic-corpo.vetor.moto { left: -9px; top: -20px; width: 18px; height: 40px; }

.google-logo { margin: 0 0 4px 6px !important; line-height: 0; }
.google-logo img { display: block; }

@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb),.45); } 50% { box-shadow: 0 0 0 12px rgba(var(--brand-rgb),0); } }
@keyframes desce { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------------
   Computador: mapa em tela cheia e painel flutuante à esquerda
   --------------------------------------------------------------------- */
@media (min-width: 760px) {
  :root { --map-h: 100dvh; }
  body { display: block; }
  /* o mapa começa ao lado do painel: o centro dele (onde fica o pino de embarque) fica livre */
  #map { position: fixed; top: 0; bottom: 0; right: 0; left: 468px; width: auto; height: 100dvh; }
  .sheet { position: fixed; left: 24px; top: 24px; bottom: 24px; width: 420px; margin: 0; border-radius: 24px; padding: 22px 22px 24px; box-shadow: var(--shadow-lg); }
  .banner { left: 468px; right: 24px; top: 24px; width: fit-content; max-width: min(560px, calc(100vw - 492px)); margin: 0 auto; text-align: center; }
  .center-pin { left: calc(50% + 234px); }
  .fab { top: auto; bottom: 28px; right: 28px; }
  .grab { display: none; }
  .dest-mode { --map-h: 100dvh; }
}

/* ---------------------------------------------------------------------
   Personalização: marca, estilo da tela e veículo no mapa
   --------------------------------------------------------------------- */
.tem-logo .brand-mark { box-shadow: none; border-radius: 10px; background: transparent; }
.marca-nome .brand-mark { display: none; }
.marca-imagem .app-title { display: none; }
.marca-imagem-larga .app-title { display: none; }
.marca-imagem-larga .brand-mark { width: auto; height: 46px; max-width: 230px; border-radius: 8px; box-shadow: none; }
.marca-imagem .brand-mark { width: 52px; height: 52px; }

/* Marcante: cabeçalho na cor principal */
.estilo-marcante .sheet { padding-top: 0; }
.estilo-marcante .grab { position: absolute; left: 50%; top: 8px; margin: 0 0 0 -22px; background: rgba(255,255,255,.55); z-index: 1; }
.estilo-marcante .brand { margin: 0 -18px 18px; padding: 26px 18px 20px; background: var(--brand); border-radius: 24px 24px 0 0; }
.estilo-marcante .app-title { color: var(--on-brand); }
.estilo-marcante .brand-sub { color: var(--on-brand); opacity: .85; }
.estilo-marcante .brand-mark { box-shadow: 0 0 0 3px rgba(255,255,255,.35); background: #fff; }
.estilo-marcante.marca-imagem-larga .brand-mark { background: transparent; box-shadow: none; }

/* Flutuante (celular): o painel flutua sobre o mapa, com margens e cantos arredondados */
@media (max-width: 759px) {
  .estilo-flutuante #map { flex-basis: calc(var(--map-h) + 90px); height: calc(var(--map-h) + 90px); }
  .estilo-flutuante .center-pin { top: calc((var(--map-h) + 90px) / 2); }
  .estilo-flutuante .sheet { margin: -90px 12px calc(12px + env(safe-area-inset-bottom)); border-radius: 26px; box-shadow: var(--shadow-lg); padding-bottom: 18px; }
  .estilo-flutuante.estilo-marcante .brand, .estilo-flutuante .brand { border-radius: 26px 26px 0 0; }
}
@media (min-width: 760px) {
  .estilo-marcante .sheet { padding-top: 0; }
  .estilo-marcante .brand { margin: 0 -22px 18px; padding: 26px 22px 22px; }
  .estilo-neutro .sheet { box-shadow: 0 0 0 1px var(--line), var(--shadow); }
}

/* Veículo no mapa: Moderno (círculo) e Clássico (alfinete) — não giram */
.veic-corpo.marcador { transition: none; }
.veic-corpo.marcador svg { width: 100%; height: 100%; display: block; overflow: visible; }
.veic-corpo.marcador.moderno { left: -16px; top: -16px; width: 32px; height: 32px; }
.veic-corpo.marcador.classico { left: -15px; top: -38px; width: 30px; height: 38px; }
.veic.meu .veic-corpo.marcador.moderno { left: -20px; top: -20px; width: 40px; height: 40px; }
.veic.meu .veic-corpo.marcador.classico { left: -19px; top: -47px; width: 38px; height: 47px; }

.marca-imagem-larga .brand, .marca-imagem .brand { flex-direction: column; align-items: flex-start; gap: 8px; }
.estilo-marcante.marca-imagem-larga .brand, .estilo-marcante.marca-imagem .brand { align-items: center; text-align: center; }

/* ---------------------------------------------------------------------
   Paradas, endereços salvos, cupom, agendamento, recibo, instalar
   --------------------------------------------------------------------- */
.brand { position: relative; }
.instalar { margin-left: auto; border: 0; background: var(--fill); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 700; padding: 8px 11px; border-radius: 999px; cursor: pointer; }
.estilo-marcante .instalar { background: rgba(255,255,255,.2); color: var(--on-brand); }

.dot-parada { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--muted); color: var(--muted); font-size: 10px; font-weight: 800; display: grid; place-items: center; box-shadow: none; margin-left: -3px; }
.trip-acoes { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 10px 8px 44px; }
.trip-link { border: 0; background: none; color: var(--brand-600); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 0; cursor: pointer; }
.trip-link:hover { text-decoration: underline; }
.salvar-como { font-size: 12.5px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.salvar-como button { border: 1px solid var(--line); background: #fff; border-radius: 999px; font: inherit; font-size: 12px; font-weight: 600; padding: 4px 9px; cursor: pointer; }
.salvar-como button:hover { background: var(--fill); }

.preco-antes { color: var(--muted); font-size: 14px; font-weight: 500; }
.est-cupom { color: var(--brand-600); font-weight: 600; font-size: 13px; }
.est-dinamica { display: inline-flex; align-self: flex-start; margin-top: 4px; background: var(--amber-50); border: 1px solid #fde68a; color: #92400e; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 700; }
.cupom { margin: 2px 2px 4px; }
.cupom-box { display: flex; gap: 8px; margin-top: 6px; }
.cupom-box input { text-transform: uppercase; }
.cupom-box .btn { width: auto; padding: 0 18px; font-size: 15px; }
.cupom-msg { font-size: 13px; color: var(--muted); margin: 6px 2px 0; }
.cupom-msg.erro { color: #9f1239; }

.quando { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--fill); padding: 4px; border-radius: 14px; margin-bottom: 12px; }
.seg { border: 0; background: transparent; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--muted); padding: 11px; border-radius: 11px; cursor: pointer; transition: background .15s, color .15s; }
.seg.sel { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.agenda { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }

.agendadas { margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.ag-titulo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--faint); margin: 0 2px; }
.ag-card { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 16px; padding: 12px 14px; }
.ag-card.cancelada { background: var(--fill); border-color: var(--line); opacity: .8; }
.ag-info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ag-info b { font-size: 14.5px; color: var(--ink); }
.ag-info span { font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-info small { font-size: 12px; color: var(--brand-600); font-weight: 600; }
.ag-acoes .btn { width: auto; padding: 9px 14px; font-size: 13.5px; margin: 0; box-shadow: none; }

.nota { font-size: 13px; font-weight: 700; color: #b45309; white-space: nowrap; }

.recibo { background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.rec-titulo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--faint); }
.rec-valor { font-size: 30px; font-weight: 800; letter-spacing: -.6px; color: var(--ink); margin: 2px 0 10px; }
.rec-trajeto { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: var(--fill); border-radius: 12px; margin-bottom: 10px; }
.rec-ponto { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--text); }
.rec-itens { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 10px; font-size: 14px; }
.rec-itens dt { color: var(--muted); }
.rec-itens dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.rec-id { font-size: 12px; color: var(--faint); margin-bottom: 10px; }
.recibo .btn { font-size: 15px; padding: 13px; }

.quando.unico { grid-template-columns: 1fr; }
.quando.unico .seg { cursor: default; }

/* fim da corrida e recibo em tela própria */
.fim { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 20px; padding: 18px 16px 16px; margin-bottom: 12px; }
.fim-rotulo { font-size: 13px; font-weight: 700; color: var(--brand-600); text-transform: uppercase; letter-spacing: .6px; }
.fim-valor { font-size: 40px; font-weight: 800; letter-spacing: -1px; color: var(--ink); line-height: 1.1; }
.fim-pag { font-size: 14px; color: var(--muted); }
.fim .btn { margin-top: 10px; background: #fff; border: 1.5px solid var(--line); }
.recibo-dlg { padding: 0; width: min(94vw, 440px); max-height: 90dvh; overflow: hidden; }
.recibo-dlg[open] { display: flex; flex-direction: column; }
.recibo-corpo { padding: 18px; overflow-y: auto; }
.rec-marca { font-size: 13px; font-weight: 700; color: var(--brand-600); text-transform: uppercase; letter-spacing: .6px; }
.recibo-acoes { padding: 12px 18px 18px; border-top: 1px solid var(--line); }
.btn.whats { background: #25d366; color: #fff; box-shadow: 0 8px 20px rgba(37,211,102,.3); }
.btn.whats:hover { background: #1ebe5a; }

.fim-contagem { margin-top: 8px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Destino escolhido: embarque fixo (alfinete no mapa); o pino central só volta ao tocar em "Alterar" */
.alterar-embarque { display: none; flex-shrink: 0; }
body.embarque-fixo .alterar-embarque { display: inline-flex; }
body.embarque-fixo:not(.dest-mode) #centerPin { display: none; }
.dica-fixo { display: none; }
body.embarque-fixo .dica-fixo { display: block; }
body.embarque-fixo .dica-livre { display: none; }

/* Ajuda para liberar a localização */
.local-dlg { max-width: 440px; }
.local-intro { margin: 4px 0 10px; color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }
.local-passos { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 8px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.local-passos b { font-weight: 700; }

/* Painel recolhido (celular): só o topo "Para onde vamos?" no rodapé; o mapa ocupa o resto */
@media (max-width: 759px) {
  body.painel-recolhido:not(.ride-mode):not(.dest-mode) { --map-h: calc(100dvh + 24px - var(--sheet-topo, 120px) - env(safe-area-inset-bottom)); }
  body.painel-recolhido:not(.ride-mode):not(.dest-mode) #sheetForm { overflow: hidden; }
  body.painel-recolhido:not(.ride-mode):not(.dest-mode) #sheetForm .brand { cursor: pointer; }
  body.painel-recolhido:not(.ride-mode):not(.dest-mode) #sheetForm .grab { background: #94a3b8; }
  .estilo-flutuante.painel-recolhido:not(.ride-mode):not(.dest-mode) { --map-h: calc(100dvh - var(--sheet-topo, 120px) - 12px - env(safe-area-inset-bottom)); }
  #sheetForm .grab { cursor: pointer; position: relative; }
  #sheetForm .grab::after { content: ""; position: absolute; inset: -12px -40px; } /* área de toque maior */
}

/* Tempo até o carro mais próximo */
.proximo-txt { margin: -6px 0 14px; font-size: 13px; font-weight: 600; color: var(--brand); overflow-wrap: anywhere; }
.proximo-txt.sem-carro { color: var(--muted); font-weight: 500; }

/* Atalhos: repetir última corrida e Minhas corridas */
.atalhos { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.atalho { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; padding: 9px 12px; border-radius: 999px; cursor: pointer; }
.atalho span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.historico-dlg { max-width: 460px; width: calc(100vw - 24px); }
.hist-sub { margin: 0 0 10px; }
.hist-lista { display: grid; gap: 10px; max-height: 65dvh; overflow-y: auto; }
.hist-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 8px; }
.hist-topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.hist-data { color: var(--muted); }
.hist-status { font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--fill); }
.st-F .hist-status { background: #dcfce7; color: #166534; }
.st-C .hist-status, .st-N .hist-status { background: #fee2e2; color: #991b1b; }
.hist-valor { margin-left: auto; }
.hist-rota { display: grid; gap: 4px; font-size: 14px; }
.hist-ponto { display: flex; gap: 8px; align-items: flex-start; overflow-wrap: anywhere; }
.hist-ponto .dot { margin-top: 5px; flex-shrink: 0; }
.hist-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.small { padding: 8px 12px; font-size: 13px; border-radius: 10px; width: auto; }
