:root {
  --fm-blue: #0D47A1;
  --fm-blue-dark: #0a3a82;
  --fm-green: #22C55E;
  --fm-green-dark: #1ba750;
  --fm-white: #FFFFFF;
  --fm-gray: #E6EAF1;
  --fm-black: #121826;
  --fm-red: #DC2626;
  --fm-amber: #F59E0B;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--fm-black);
  color: var(--fm-black);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.3rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 700; margin-bottom: .5rem; }
p { line-height: 1.5; }

svg.icon, [data-feather] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: var(--fm-gray);
}

/* A tela em si nunca rola nem recebe safe-area: quem rola é o .content e a
   safe-area é aplicada uma única vez em quem toca a borda (topbar/bottom-nav).
   Assim o menu fica sempre cravado no rodapé, em qualquer resolução. */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--fm-gray);
  overflow: hidden;
}

.screen.active {
  display: flex;
  animation: screen-in .28s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes screen-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.screen-dark {
  background: var(--fm-black);
  color: var(--fm-white);
}

/* Em telas escuras, labels e textos de apoio ficam claros */
.screen-dark .field label { color: rgba(255,255,255,.85); }

/* Login: formulário centralizado verticalmente com a marca acima */
.login-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  margin-bottom: 2.2rem;
}
.login-brand .bolt { font-size: 2.2rem; color: var(--fm-green); }
.login-brand .logo {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--fm-white);
  letter-spacing: -.01em;
}
.login-brand .logo .accent { color: var(--fm-green); }

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: calc(var(--safe-top) + 1rem) 1.25rem .5rem;
  flex-shrink: 0;
}

.topbar h1 {
  font-size: 1.15rem;
  margin: 0;
  flex: 1;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--fm-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(18,24,38,.12);
  color: var(--fm-black);
  flex-shrink: 0;
  cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn-dark { background: rgba(255,255,255,.12); color: var(--fm-white); }

.content {
  flex: 1;
  min-height: 0;
  padding: 0 1.25rem calc(1.25rem + var(--safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Quando existe bottom-nav, a safe-area já é dele — sem padding extra aqui */
.content-with-nav { padding-bottom: 1.25rem; }

/* Brand / splash */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex: 1;
}

.brand .logo {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--fm-white);
}

.brand .logo .accent { color: var(--fm-green); }

.brand .tagline {
  color: rgba(255,255,255,.65);
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.brand .bolt {
  font-size: 3rem;
  color: var(--fm-green);
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .95rem 1rem;
  border-radius: 1rem;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}
.btn:active { transform: scale(.97); filter: brightness(.93); }

.btn-primary { background: var(--fm-blue); color: var(--fm-white); box-shadow: 0 6px 18px rgba(13,71,161,.28); }
.btn-success { background: var(--fm-green); color: var(--fm-white); box-shadow: 0 6px 18px rgba(34,197,94,.28); }
.btn-danger { background: var(--fm-red); color: var(--fm-white); }
.btn-outline { background: transparent; color: var(--fm-white); border: 1px solid rgba(255,255,255,.4); }
.btn-outline-dark { background: transparent; color: var(--fm-black); border: 1px solid rgba(18,24,38,.3); }
.btn-light { background: var(--fm-white); color: var(--fm-black); }
.btn-lg { padding: 1.1rem; font-size: 1.05rem; }
.btn-sm { padding: .55rem .8rem; font-size: .85rem; border-radius: .7rem; }
.btn:disabled { opacity: .5; }
.btn-block-group { display: flex; flex-direction: column; gap: .75rem; }
.btn svg, .btn [data-feather] { width: 18px; height: 18px; }
.btn-icon-only { width: 48px; padding: .8rem; flex: 0 0 auto; }

/* Cards */
.card {
  background: var(--fm-white);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(18,24,38,.06);
  margin-bottom: 1rem;
}

.card-dark {
  background: rgba(255,255,255,.06);
  color: var(--fm-white);
}

/* Forms */
.field { margin-bottom: .9rem; }
.field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: .3rem;
  color: #4b5563;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: .75rem .9rem;
  border-radius: .8rem;
  border: 1px solid #d5dbe6;
  font-size: .95rem;
  background: var(--fm-white);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--fm-blue);
  box-shadow: 0 0 0 3px rgba(13,71,161,.12);
}
.field-row { display: flex; gap: .6rem; }
.field-row .field { flex: 1; }

.file-field {
  border: 1.5px dashed #b9c1d1;
  border-radius: .9rem;
  padding: .8rem;
  text-align: center;
  font-size: .82rem;
  color: #5b6472;
  background: var(--fm-white);
  position: relative;
}
.file-field input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.file-field.has-file { border-color: var(--fm-green); color: var(--fm-green-dark); }

/* Bottom nav — sempre colado no rodapé da área visível */
.bottom-nav {
  display: flex;
  background: var(--fm-white);
  border-top: 1px solid #e2e6ee;
  flex-shrink: 0;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -2px 12px rgba(18,24,38,.06);
}
.bottom-nav button {
  flex: 1;
  border: none;
  background: none;
  min-height: 56px;
  padding: .45rem 0 .4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  font-size: .68rem;
  color: #8890a0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s ease;
}
.bottom-nav button.active { color: var(--fm-blue); }
.bottom-nav button svg { width: 22px; height: 22px; transition: transform .18s ease; }
.bottom-nav button.active svg { animation: nav-pop .28s cubic-bezier(.2, .8, .3, 1); transform: translateY(-1px); }
@keyframes nav-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.22); }
  100% { transform: translateY(-1px) scale(1); }
}
.bottom-nav button span { font-weight: 600; letter-spacing: .01em; }
.bottom-nav button.active span { font-weight: 700; }
.bottom-nav button.nav-logout:active { color: var(--fm-red); }

/* Modal de confirmação (logout) */
.confirm-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fde2e2;
  color: var(--fm-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto .8rem;
}
.confirm-icon svg { width: 24px; height: 24px; }
.confirm-text { font-size: .88rem; margin: 0 0 1.25rem; }
.confirm-actions { display: flex; gap: .7rem; }
.confirm-actions .btn { flex: 1; padding: .85rem; }

/* Map */
#map, .map-box {
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  background: #ccd3e0;
}

/* Mapa de fundo em tela cheia (estilo Uber) */
.screen-map-bg { padding: 0 !important; }
.map-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #ccd3e0;
}
.map-fill {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.map-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  padding: calc(var(--safe-top) + .9rem) 1rem .9rem;
  background: linear-gradient(180deg, rgba(18,24,38,.55) 0%, rgba(18,24,38,0) 100%);
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.map-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.map-greeting {
  color: var(--fm-white);
  font-weight: 800;
  font-size: 1.1rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.floating-select {
  border: none;
  border-radius: 999px;
  padding: .5rem .9rem;
  font-size: .8rem;
  font-weight: 700;
  background: var(--fm-white);
  color: var(--fm-black);
  box-shadow: 0 2px 8px rgba(18,24,38,.2);
  max-width: 52%;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--fm-white);
  border-radius: 1rem;
  padding: .9rem 1rem;
  box-shadow: 0 4px 16px rgba(18,24,38,.25);
}
.search-bar svg { width: 18px; height: 18px; color: #6b7280; flex-shrink: 0; }
.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  font-size: .95rem;
  font-weight: 600;
  color: var(--fm-black);
  background: transparent;
}

.search-suggestions {
  background: var(--fm-white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(18,24,38,.25);
  max-height: 45vh;
  overflow-y: auto;
}
.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid #eef1f6;
  cursor: pointer;
  font-size: .88rem;
}
.search-suggestion-item:last-child { border-bottom: none; }
.search-suggestion-item svg { width: 16px; height: 16px; color: var(--fm-blue); flex-shrink: 0; }

.map-hint {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 4;
  background: rgba(18,24,38,.75);
  color: var(--fm-white);
  padding: .55rem 1rem;
  border-radius: 999px;
  font-size: .8rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}
.map-hint svg { width: 15px; height: 15px; }

.sheet-hint { font-size: .78rem; color: #6b7280; margin: 0 0 .6rem; }

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 6;
  background: var(--fm-white);
  border-radius: 1.4rem 1.4rem 0 0;
  padding: .6rem 1.25rem calc(1.1rem + var(--safe-bottom));
  box-shadow: 0 -6px 24px rgba(18,24,38,.2);
  max-height: 78%;
  overflow-y: auto;
  animation: sheet-in .32s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes sheet-in {
  from { transform: translateY(40%); opacity: .4; }
  to   { transform: none; opacity: 1; }
}
.sheet-handle {
  width: 40px; height: 4px;
  border-radius: 999px;
  background: #d5dbe6;
  margin: 0 auto .9rem;
}

/* Sheet arrastável (ex.: escolha de veículo do passageiro) — pode ser
   minimizada arrastando/tocando na alça, sem cobrir o mapa. */
.sheet-draggable {
  transition: transform .28s cubic-bezier(.2, .8, .3, 1);
  touch-action: pan-y;
}
.sheet-draggable.dragging { transition: none; animation: none; }
.sheet-draggable .sheet-handle {
  padding: .7rem 2.5rem;
  margin: -.7rem auto .2rem;
  cursor: grab;
  touch-action: none;
}
.sheet-mini-summary {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: .2rem 2.6rem .4rem .1rem;
  font-weight: 700;
  font-size: .9rem;
}
.sheet-draggable.minimized {
  transform: translateY(calc(100% - 4.6rem - var(--safe-bottom)));
  overflow: hidden;
}
.sheet-draggable.minimized .sheet-mini-summary { display: flex; }
.sheet-draggable.minimized .destination-summary,
.sheet-draggable.minimized .sheet-hint,
.sheet-draggable.minimized .vehicle-card-list,
.sheet-draggable.minimized .pix-note,
.sheet-draggable.minimized #btn-request-ride {
  display: none;
}
.sheet-close {
  position: absolute;
  top: .8rem; right: .9rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--fm-gray);
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s ease;
}
.sheet-close:active { transform: scale(.9); }
.sheet-close svg { width: 14px; height: 14px; }
.destination-summary {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 1rem;
}
.destination-summary svg { width: 18px; height: 18px; color: var(--fm-red); flex-shrink: 0; }

.vehicle-card-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1rem;
  max-height: 42vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: .1rem .1rem .3rem;
}
.vehicle-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .8rem;
  padding: .7rem .6rem;
  border-radius: 1rem;
  border: 1.5px solid #d5dbe6;
  background: var(--fm-white);
  cursor: pointer;
}
.vehicle-card > svg { width: 30px; height: 30px; color: var(--fm-black); flex-shrink: 0; }
.vehicle-card > img { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }

.profit-badge {
  display: inline-block;
  margin-top: .5rem;
  padding: .35rem .9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .82rem;
}
.profit-badge.profit-verde { background: #dcfce7; color: #15803d; }
.profit-badge.profit-amarelo { background: #fef9c3; color: #a16207; }
.profit-badge.profit-vermelho { background: #fee2e2; color: #b91c1c; }
.vehicle-card-body { flex: 1; min-width: 0; text-align: left; }
.vehicle-card-title { font-weight: 700; font-size: .88rem; line-height: 1.2; }
.vehicle-card-sub { font-size: .72rem; color: #6b7280; margin-top: .1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vehicle-card-price { font-weight: 800; font-size: .9rem; flex-shrink: 0; }
.vehicle-card.active {
  border-color: var(--fm-blue);
  background: #eaf1fc;
}
.vehicle-card.active > svg { color: var(--fm-blue); }

/* Lista de pills com checkbox — preferência de categorias do motorista */
.chip-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.chip-check {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .9rem;
  border-radius: 999px;
  border: 1.5px solid #d5dbe6;
  background: var(--fm-white);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}
.chip-check input { accent-color: var(--fm-blue); }
.chip-check:has(input:checked) {
  border-color: var(--fm-blue);
  background: #eaf1fc;
  color: var(--fm-blue);
}

/* Barra de status flutuante sobre o mapa (tela de corrida do motorista) */
.map-status-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  padding: calc(var(--safe-top) + .9rem) 1.25rem .9rem;
  background: linear-gradient(180deg, rgba(18,24,38,.55) 0%, rgba(18,24,38,0) 100%);
}
.map-status-pill {
  display: inline-block;
  background: rgba(255,255,255,.95);
  color: var(--fm-black);
  font-weight: 800;
  font-size: .95rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(18,24,38,.25);
}

/* Badges / status */
.badge {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--fm-white);
}
.badge-blue { background: var(--fm-blue); }
.badge-green { background: var(--fm-green); }
.badge-amber { background: var(--fm-amber); }
.badge-red { background: var(--fm-red); }

.recording-badge {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--fm-red);
  color: var(--fm-white);
  font-weight: 700;
  font-size: .8rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  margin-bottom: .6rem;
  width: fit-content;
}
.recording-badge i { animation: recording-pulse 1.4s ease-in-out infinite; }
@keyframes recording-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: #6b7280; }
.text-white-muted { color: rgba(255,255,255,.65); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: .5rem; }
.fw-bold { font-weight: 700; }
.fs-lg { font-size: 1.25rem; }
.fs-xl { font-size: 1.8rem; }
.hidden { display: none !important; }

.alert {
  padding: .7rem .9rem;
  border-radius: .8rem;
  font-size: .85rem;
  margin-bottom: .8rem;
}
.alert-error { background: #fde2e2; color: #991b1b; }
.alert-success { background: #dcfce7; color: #166534; }

.spinner {
  width: 22px; height: 22px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: var(--fm-white);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.spinner-dark {
  border: 3px solid rgba(13,71,161,.2);
  border-top-color: var(--fm-blue);
}
@keyframes spin { to { transform: rotate(360deg); } }

.avatar-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--fm-blue);
  color: var(--fm-white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem;
  flex-shrink: 0;
}

.rating-stars { color: var(--fm-amber); font-size: 1.6rem; letter-spacing: .1rem; }
.rating-stars .star { cursor: pointer; }

.chip-select {
  display: inline-flex;
  align-items: center;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid #d5dbe6;
  font-weight: 700;
  font-size: .95rem;
  background: var(--fm-white);
  color: var(--fm-black);
  margin: .25rem;
  cursor: pointer;
}
.chip-select.active { background: var(--fm-blue); color: var(--fm-white); border-color: var(--fm-blue); }

.tag-check {
  display: inline-flex;
  align-items: center;
  padding: .5rem .9rem;
  border-radius: 999px;
  border: 1.5px solid #d5dbe6;
  font-size: .85rem;
  margin: .2rem;
  cursor: pointer;
  background: var(--fm-white);
}
.tag-check.active { background: var(--fm-green); color: var(--fm-white); border-color: var(--fm-green); }

/* Full screen incoming call */
#screen-driver-call {
  background: linear-gradient(180deg, var(--fm-blue) 0%, var(--fm-black) 100%);
  color: var(--fm-white);
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: calc(var(--safe-top) + 2rem) 1.5rem calc(var(--safe-bottom) + 1.5rem);
  overflow-y: auto;
  z-index: 500;
}
.call-timer {
  font-size: 3.2rem;
  font-weight: 800;
}
.call-actions {
  display: flex;
  gap: 1.5rem;
  width: 100%;
}
.call-actions .btn { padding: 1.3rem; border-radius: 1.4rem; font-size: 1.05rem; }

/* Avatares (imagem gerada a partir do nome) */
.avatar-img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(18,24,38,.15);
  cursor: pointer;
}
.avatar-img-sm { width: 40px; height: 40px; }
.avatar-img-lg { width: 84px; height: 84px; }

/* Nota (rating) */
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-weight: 700;
  font-size: .85rem;
  color: var(--fm-black);
}
.rating-badge svg { width: 15px; height: 15px; fill: var(--fm-amber); stroke: var(--fm-amber); }
.rating-badge.on-dark { color: var(--fm-white); }

/* Perfil */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  padding: 1.5rem 0 1rem;
}
.profile-header .name { font-size: 1.2rem; font-weight: 800; }

.list-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .9rem 0;
  border-bottom: 1px solid #eef1f6;
}
.list-item:last-child { border-bottom: none; }
.list-item .list-item-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--fm-gray);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.list-item .list-item-icon svg { color: var(--fm-blue); }
.list-item .list-item-body { flex: 1; min-width: 0; }
.list-item .list-item-title { font-weight: 700; font-size: .95rem; }
.list-item .list-item-sub { font-size: .8rem; color: #6b7280; margin-top: .1rem; }

.menu-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem;
  cursor: pointer;
}
.menu-item svg { color: var(--fm-blue); }
.menu-item .menu-item-label { flex: 1; font-weight: 700; }
.menu-item.danger svg, .menu-item.danger .menu-item-label { color: var(--fm-red); }

/* Cards do histórico de corridas */
.ride-card {
  background: var(--fm-white);
  border-radius: 1.1rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 2px 10px rgba(18,24,38,.06);
  margin-bottom: .8rem;
}
.ride-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .65rem;
}
.ride-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}
.ride-chip svg { width: 12px; height: 12px; }
.ride-chip.done { background: #dcfce7; color: #166534; }
.ride-chip.cancel { background: #fde2e2; color: #991b1b; }
.ride-chip.other { background: var(--fm-gray); color: #4b5563; }
.ride-card-date { font-size: .78rem; color: #8890a0; font-weight: 600; }
.ride-card-dest {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.35;
}
.ride-card-dest svg { width: 15px; height: 15px; color: var(--fm-red); flex-shrink: 0; margin-top: .15rem; }
.ride-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-top: .7rem;
  padding-top: .7rem;
  border-top: 1px solid #eef1f6;
}
.ride-card-person {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  color: #6b7280;
  font-weight: 600;
  min-width: 0;
}
.ride-card-person svg { width: 16px; height: 16px; color: #b0b7c3; flex-shrink: 0; }
.ride-card-price { font-weight: 800; font-size: 1rem; color: var(--fm-black); }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #8890a0;
}
.empty-state svg { width: 40px; height: 40px; margin-bottom: .75rem; opacity: .6; }

.section-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #8890a0;
  margin: 1rem 0 .4rem;
}

/* Aviso de pagamento via Pix */
.pix-note {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  background: #fff7e6;
  border: 1px solid #f5deac;
  border-radius: .9rem;
  padding: .8rem .9rem;
  margin-bottom: 1rem;
  font-size: .8rem;
  line-height: 1.4;
  color: #7a5b0a;
}
.pix-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: .1rem; color: #b8860b; }
.pix-note-dark {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
  color: rgba(255,255,255,.85);
  width: 100%;
}
.pix-note-dark svg { color: var(--fm-amber); }

.payment-gate { border: 1.5px solid var(--fm-amber); }
.payment-gate-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff3d6;
  color: #b8860b;
  display: flex; align-items: center; justify-content: center;
}

/* Modal de perfil (avatar ampliado + estatísticas) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(18,24,38,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fade-in .2s ease both;
}
.modal-overlay.hidden { display: none; }
.modal-overlay .modal-card {
  animation: modal-in .26s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.95); }
  to   { opacity: 1; transform: none; }
}
.modal-card {
  background: var(--fm-white);
  border-radius: 1.4rem;
  padding: 1.75rem 1.5rem 1.5rem;
  width: 100%;
  max-width: 340px;
  text-align: center;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.modal-close {
  position: absolute;
  top: .8rem; right: .8rem;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--fm-gray);
  color: var(--fm-black);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.modal-close svg { width: 16px; height: 16px; }
.modal-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto .9rem;
  box-shadow: 0 4px 16px rgba(18,24,38,.2);
  display: block;
  cursor: default;
}
.modal-name { font-size: 1.2rem; font-weight: 800; margin-bottom: .35rem; }
.modal-stats {
  display: flex;
  margin-top: 1.25rem;
  border-top: 1px solid #eef1f6;
  padding-top: 1.1rem;
}
.modal-stat { flex: 1; }
.modal-stat-value { font-size: 1.3rem; font-weight: 800; color: var(--fm-blue); }
.modal-stat-label {
  font-size: .72rem;
  color: #6b7280;
  margin-top: .2rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + var(--safe-bottom));
  transform: translateX(-50%);
  background: var(--fm-black);
  color: var(--fm-white);
  padding: .7rem 1.1rem;
  border-radius: .8rem;
  font-size: .85rem;
  z-index: 999;
  max-width: 85%;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  animation: toast-in .24s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* Feedback de toque nos elementos interativos */
.vehicle-card, .menu-item, .list-item, .chip-select, .tag-check,
.search-suggestion-item, .icon-btn {
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.vehicle-card:active, .menu-item:active, .chip-select:active,
.tag-check:active, .search-suggestion-item:active { transform: scale(.98); }
.icon-btn:active { transform: scale(.92); }

.search-suggestions { animation: fade-in .18s ease both; }

/* Acessibilidade: respeita quem desativou animações no sistema */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
