/* MotoJá — estilos (mobile primeiro) */
:root {
  --acc: #F5B301; --acc-forte: #D99A00; --acc-suave: #FFF4D1;
  --tinta: #14161A; --texto: #1F2329; --mutado: #6B7280;
  --fundo: #F3F4F6; --cartao: #FFFFFF; --linha: #E5E7EB; --campo: #F9FAFB;
  --ok: #15803D; --ok-suave: #DCFCE7; --erro: #DC2626; --erro-suave: #FEE2E2; --info: #2563EB; --info-suave: #DBEAFE;
  --sombra: 0 8px 30px rgba(17, 24, 39, .10); --raio: 16px;
  --nav-h: 64px; --topo-h: 56px;
  --fonte: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --acc-suave: #3A2F0B; --texto: #E5E7EB; --mutado: #9CA3AF;
    --fundo: #0E1013; --cartao: #181B20; --linha: #2A2F37; --campo: #1F232A;
    --ok-suave: #12321F; --erro-suave: #3B1515; --info-suave: #142445;
    --sombra: 0 8px 30px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --acc-suave: #3A2F0B; --texto: #E5E7EB; --mutado: #9CA3AF;
  --fundo: #0E1013; --cartao: #181B20; --linha: #2A2F37; --campo: #1F232A;
  --ok-suave: #12321F; --erro-suave: #3B1515; --info-suave: #142445;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--fonte); color: var(--texto); background: var(--fundo); font-size: 15px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
a { color: var(--acc-forte); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h3 { font-size: 1rem; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.mutado { color: var(--mutado); }
.peq { font-size: .85rem; }
[hidden] { display: none !important; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: 46px; padding: .6em 1.1em; border-radius: 12px; border: 1px solid var(--linha); background: var(--cartao); cursor: pointer; font-weight: 600; text-decoration: none; color: var(--texto); transition: transform .08s, background .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primario { background: var(--acc); border-color: var(--acc); color: #1a1400; }
.btn-primario:hover { background: var(--acc-forte); border-color: var(--acc-forte); }
.btn-escuro { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.btn-perigo { background: var(--erro); border-color: var(--erro); color: #fff; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-texto { background: none; border-color: transparent; color: var(--mutado); }
.btn-bloco { width: 100%; }
.btn-p { min-height: 36px; padding: .35em .8em; font-size: .88rem; border-radius: 10px; }
.btn-whats { background: #25D366; border-color: #25D366; color: #fff; }
.botoes { display: flex; gap: .5rem; flex-wrap: wrap; }
.botoes > .btn { flex: 1 1 auto; }

/* ---------- Formulários ---------- */
.form { display: grid; gap: .85rem; }
.form h3 { margin-top: .6rem; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .88rem; }
input, select, textarea { width: 100%; min-height: 46px; padding: .65em .85em; border: 1px solid var(--linha); border-radius: 12px; background: var(--campo); font-weight: 500; outline: none; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 30%, transparent); }
input[type=file] { padding: .5em; min-height: auto; }
.check { display: flex; align-items: flex-start; gap: .55rem; font-weight: 500; }
.check input { width: 20px; min-height: 20px; height: 20px; margin-top: 2px; accent-color: var(--acc-forte); flex: none; }
.linha2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .7rem; }
.linha2 > * { min-width: 0; }
.local-campo input, .num-casa small { min-width: 0; }
.chip { display: inline-flex; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { padding: .55em 1em; border-radius: 999px; border: 1.5px solid var(--linha); background: var(--campo); font-weight: 600; }
.chip input:checked + span { border-color: var(--acc); background: var(--acc-suave); }
.escolha-veiculo { display: flex; gap: .5rem; flex-wrap: wrap; }
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 600; padding: .55rem 0; }
.interruptor input { appearance: none; width: 48px; min-height: 28px; height: 28px; border-radius: 99px; background: var(--linha); position: relative; cursor: pointer; padding: 0; border: 0; flex: none; transition: background .2s; }
.interruptor input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.interruptor input:checked { background: var(--ok); }
.interruptor input:checked::after { left: 23px; }

/* ---------- Avisos ---------- */
.aviso { padding: .8em 1em; border-radius: 12px; background: var(--acc-suave); font-size: .9rem; }
.aviso-ok { background: var(--ok-suave); }
.aviso-erro { background: var(--erro-suave); }
.selo { display: inline-flex; align-items: center; gap: .3em; padding: .2em .65em; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--linha); white-space: nowrap; }
.selo-ok { background: var(--ok-suave); color: var(--ok); }
.selo-erro { background: var(--erro-suave); color: var(--erro); }
.selo-alerta { background: var(--acc-suave); color: #8a6100; }
.selo-info { background: var(--info-suave); color: var(--info); }
@media (prefers-color-scheme: dark) { .selo-alerta { color: var(--acc); } }

/* ---------- Marca / acesso ---------- */
.marca-icone { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--acc); font-size: 18px; }
.marca-grande { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.45rem; margin-bottom: 1.2rem; }
.pagina-acesso { min-height: 100%; background: var(--fundo); }
.acesso-grid { min-height: 100vh; display: grid; }
.acesso-hero { background: var(--tinta); color: #fff; padding: 2rem 1.4rem 2.6rem; }
.acesso-hero h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.acesso-hero p { color: #C9CDD3; margin: 0 0 1rem; }
.hero-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; color: #E5E7EB; font-weight: 500; }
.acesso-caixa { background: var(--cartao); padding: 1.6rem 1.4rem 2rem; margin: -1.2rem auto 0; border-radius: 22px 22px 0 0; width: 100%; max-width: 460px; position: relative; }
.acesso-caixa.cadastro { margin-top: 0; border-radius: 0; min-height: 100vh; }
.voltar { display: inline-block; margin-bottom: 1rem; text-decoration: none; color: var(--mutado); font-weight: 600; }
.divisor { text-align: center; margin: 1.4rem 0 1rem; color: var(--mutado); font-size: .88rem; }
.acesso-opcoes { display: grid; gap: .7rem; }
.opcao { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: .8rem; align-items: center; padding: .9rem 1rem; border: 1.5px solid var(--linha); border-radius: 14px; text-decoration: none; color: var(--texto); }
.opcao:hover { border-color: var(--acc); }
.opcao-ic { grid-row: span 2; font-size: 26px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--acc-suave); }
.opcao small { color: var(--mutado); }
.abas-tipo { display: grid; grid-template-columns: 1fr 1fr; background: var(--campo); border-radius: 12px; padding: 4px; margin-bottom: 1.2rem; border: 1px solid var(--linha); }
.abas-tipo a { text-align: center; padding: .6rem; border-radius: 9px; text-decoration: none; color: var(--mutado); font-weight: 700; }
.abas-tipo a.ativa { background: var(--cartao); color: var(--texto); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.foto-escolher { display: grid; justify-items: center; gap: .3rem; }
@media (min-width: 900px) {
  .acesso-grid { grid-template-columns: 1.1fr 1fr; }
  .acesso-hero { display: flex; flex-direction: column; justify-content: center; padding: 4rem; }
  .acesso-hero h1 { font-size: 2.8rem; }
  .acesso-caixa { margin: auto; border-radius: 22px; box-shadow: var(--sombra); align-self: center; }
  .acesso-caixa.cadastro { margin: 2rem auto; min-height: auto; border-radius: 22px; box-shadow: var(--sombra); }
}

/* ---------- Avatar ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--acc-suave); font-weight: 800; overflow: hidden; flex: none; color: var(--texto); cursor: default; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-p { width: 34px; height: 34px; font-size: .9rem; }
.avatar-m { width: 52px; height: 52px; font-size: 1.2rem; }
.avatar-g { width: 92px; height: 92px; font-size: 2rem; cursor: pointer; border: 2px dashed var(--linha); }

/* ---------- Casca do app ---------- */
.app { overscroll-behavior: none; }
.casca { min-height: 100%; }
.topo { position: fixed; top: 0; left: 0; right: 0; height: calc(var(--topo-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 1rem 0; display: flex; align-items: center; justify-content: space-between; background: var(--tinta); color: #fff; z-index: 900; }
.topo-marca { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.1rem; }
.topo-marca .marca-icone { width: 30px; height: 30px; font-size: 16px; }
.topo-usuario { display: flex; align-items: center; gap: .55rem; font-weight: 600; }
.conteudo { padding: calc(var(--topo-h) + env(safe-area-inset-top)) 0 calc(var(--nav-h) + env(safe-area-inset-bottom)); min-height: 100vh; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--cartao); border-top: 1px solid var(--linha); display: flex; z-index: 900; box-shadow: 0 -4px 20px rgba(0,0,0,.05); }
.nav-marca, .nav-sair { display: none; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--mutado); font-size: .7rem; font-weight: 700; cursor: pointer; position: relative; padding: 0; }
.nav-item.ativo { color: var(--texto); }
.nav-item.ativo::before { content: ''; position: absolute; top: 0; width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--acc); }
.nav-item .bolinha { position: absolute; top: 9px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--erro); color: #fff; font-size: .65rem; display: grid; place-items: center; }
.aba { display: none; padding: 1rem; max-width: 1100px; margin: 0 auto; }
.aba.ativa { display: block; }
.aba.aba-mapa { padding: 0; max-width: none; position: relative; height: calc(100vh - var(--topo-h) - var(--nav-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom)); height: calc(100dvh - var(--topo-h) - var(--nav-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.titulo-aba { font-size: 1.35rem; font-weight: 800; margin: .2rem 0 1rem; }

@media (min-width: 900px) {
  .topo { display: none; }
  .nav { top: 0; right: auto; width: 240px; height: 100vh; flex-direction: column; padding: 1.2rem .8rem; gap: .25rem; border-top: 0; border-right: 1px solid var(--linha); box-shadow: none; }
  .nav-marca { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; padding: .2rem .6rem 1.2rem; }
  .nav-item { flex: none; flex-direction: row; justify-content: flex-start; gap: .75rem; padding: .7rem .8rem; border-radius: 11px; font-size: .95rem; }
  .nav-item:hover { background: var(--campo); }
  .nav-item.ativo { background: var(--acc-suave); }
  .nav-item.ativo::before { display: none; }
  .nav-item .bolinha { position: static; margin-left: auto; }
  .nav-sair { display: flex; margin-top: auto; }
  .conteudo { padding: 0 0 0 240px; }
  .aba { padding: 2rem; }
  .aba.aba-mapa { height: 100vh; padding: 0; }
}

/* ---------- Mapa e painel ---------- */
.mapa { position: absolute; inset: 0; z-index: 1; background: #dfe3e8; }
.painel { position: absolute; left: 0; right: 0; bottom: 0; z-index: 500; background: var(--cartao); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.15); padding: 0 1rem 1rem; max-height: 62%; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; transition: max-height .25s ease; }
.painel-alca { display: block; width: 100%; height: 26px; border: 0; background: none; cursor: pointer; padding: 0; position: sticky; top: 0; z-index: 2; background: var(--cartao); }
.painel-alca span { display: block; width: 44px; height: 5px; border-radius: 5px; background: var(--linha); margin: 0 auto; }
.painel.recolhido { max-height: 96px; overflow: hidden; }
.painel.recolhido .painel-alca span { background: var(--acc); }
.painel-topo { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.painel-topo h3 { margin: 0; }
.btn-limpar { border: 0; background: var(--campo); color: var(--texto); border-radius: 99px; padding: .35em .85em; font-weight: 700; font-size: .82rem; cursor: pointer; }
.btn-limpar:hover { background: var(--erro-suave); color: var(--erro); }
.local-campo .limpar-campo { position: absolute; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--linha); color: var(--texto); cursor: pointer; font-size: 1rem; line-height: 1; }
.local-campo .limpar-campo + .btn-icone { margin-left: 0; }
.local-campo input.com-x { padding-right: 42px; }
.painel h3 { font-size: 1.05rem; }
@media (min-width: 900px) {
  .painel { left: 1.2rem; right: auto; top: 1.2rem; bottom: auto; width: 390px; border-radius: 18px; max-height: calc(100vh - 2.4rem); box-shadow: var(--sombra); padding-top: 1.1rem; }
  .painel-alca { display: none; }
  .painel { padding-top: 1.1rem; }
}
.btn-mapa { position: absolute; z-index: 450; right: 12px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--cartao); box-shadow: var(--sombra); display: grid; place-items: center; cursor: pointer; font-size: 20px; }
.local-campos { position: relative; display: grid; gap: .5rem; margin-bottom: .7rem; }
.local-campo { position: relative; display: flex; align-items: center; gap: .5rem; }
.local-campo .ponto { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.ponto-origem { background: var(--ok); }
.ponto-destino { background: var(--tinta); border-radius: 3px !important; }
@media (prefers-color-scheme: dark) { .ponto-destino { background: #fff; } }
.local-campo input { flex: 1; }
.local-campo .btn-icone { width: 46px; flex: none; padding: 0; min-height: 46px; border-radius: 12px; border: 1px solid var(--linha); background: var(--campo); cursor: pointer; font-size: 18px; }
.sugestoes { position: absolute; top: calc(100% + 4px); left: 20px; right: 0; background: var(--cartao); border: 1px solid var(--linha); border-radius: 12px; box-shadow: var(--sombra); z-index: 20; max-height: 260px; overflow: auto; }
.sugestoes button { display: block; width: 100%; text-align: left; padding: .7rem .9rem; border: 0; background: none; border-bottom: 1px solid var(--linha); cursor: pointer; }
.sugestoes button:hover { background: var(--campo); }
.sugestoes b { display: block; font-size: .9rem; }
.sugestoes small { color: var(--mutado); }
.dica-mapa { font-size: .82rem; color: var(--mutado); margin: -.2rem 0 .7rem; }
.dica-mapa button { border: 0; background: none; color: var(--acc-forte); font-weight: 700; cursor: pointer; padding: 0; }
.opcoes-veiculo { display: grid; gap: .5rem; margin-bottom: .7rem; }
.op-veiculo { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: 14px; border: 1.5px solid var(--linha); cursor: pointer; }
.op-veiculo input { position: absolute; opacity: 0; }
.op-veiculo:has(input:checked) { border-color: var(--acc); background: var(--acc-suave); }
.op-veiculo .ic { font-size: 26px; }
.op-veiculo b { display: block; }
.op-veiculo .preco { margin-left: auto; font-weight: 800; font-size: 1.05rem; }
.resumo-rota { display: flex; gap: 1rem; font-size: .88rem; color: var(--mutado); margin-bottom: .6rem; }

.pin { width: 22px; height: 22px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.pin-origem { background: var(--ok); }
.pin-destino { background: #14161A; border-radius: 6px; }
.pin-eu { background: var(--info); width: 18px; height: 18px; border-width: 3px; box-shadow: 0 0 0 7px rgba(37,99,235,.2); }
.pin-veiculo { width: 40px; height: 40px; border-radius: 50%; background: var(--acc); border: 3px solid #fff; display: grid; place-items: center; font-size: 20px; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.pin-veiculo.livre { background: #fff; border-color: var(--acc); width: 32px; height: 32px; font-size: 16px; }

/* Estado da corrida */
.status-corrida { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.status-corrida .titulo { font-weight: 800; font-size: 1.1rem; }
.radar { width: 54px; height: 54px; border-radius: 50%; background: var(--acc); position: relative; display: grid; place-items: center; font-size: 24px; flex: none; }
.radar::before, .radar::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--acc); animation: radar 1.8s infinite ease-out; }
.radar::after { animation-delay: .9s; }
@keyframes radar { from { transform: scale(1); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.cartao-pessoa { display: flex; align-items: center; gap: .8rem; padding: .8rem; border-radius: 14px; background: var(--campo); margin-bottom: .8rem; }
.cartao-pessoa .info { flex: 1; min-width: 0; }
.cartao-pessoa b { display: block; }
.placa { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-weight: 800; letter-spacing: .08em; background: #fff; color: #111; border: 2px solid #111; border-top-width: 6px; border-top-color: #1d4ed8; border-radius: 5px; padding: 0 .4em; font-size: .9rem; }
.trajeto { display: grid; gap: .45rem; margin-bottom: .8rem; font-size: .9rem; }
.trajeto div { display: flex; gap: .55rem; align-items: flex-start; }
.trajeto .ponto { margin-top: 5px; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.valor-grande { font-size: 1.5rem; font-weight: 800; }
.etapas { display: flex; gap: 4px; margin-bottom: .9rem; }
.etapas span { flex: 1; height: 4px; border-radius: 4px; background: var(--linha); }
.etapas span.feita { background: var(--acc); }

/* Motorista */
.online-cartao { display: flex; align-items: center; gap: .8rem; justify-content: space-between; margin-bottom: .8rem; }
.online-status { font-weight: 800; font-size: 1.05rem; }
.btn-online { min-width: 130px; }
.oferta { border: 1.5px solid var(--acc); border-radius: 16px; padding: .9rem; margin-bottom: .7rem; background: var(--cartao); animation: chegar .3s ease-out; }
@keyframes chegar { from { transform: translateY(8px); opacity: 0; } }
.oferta-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.oferta .valor-grande { font-size: 1.35rem; }

/* ---------- Cartões, listas, tabelas ---------- */
.cartao { background: var(--cartao); border-radius: var(--raio); padding: 1rem 1.1rem; border: 1px solid var(--linha); margin-bottom: 1rem; }
.cartao h3 { margin-bottom: .8rem; }
.grade-num { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-bottom: 1rem; }
@media (min-width: 700px) { .grade-num { grid-template-columns: repeat(4, 1fr); } }
.num { background: var(--cartao); border: 1px solid var(--linha); border-radius: var(--raio); padding: .9rem 1rem; }
.num small { color: var(--mutado); font-weight: 600; font-size: .8rem; display: block; }
.num b { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; display: block; }
.num.destaque { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.num.destaque small { color: #C9CDD3; }
.grade2 { display: grid; gap: 1rem; }
@media (min-width: 900px) { .grade2 { grid-template-columns: 1fr 1fr; } }
.item-lista { display: flex; gap: .8rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--linha); }
.item-lista:last-child { border-bottom: 0; }
.item-lista .info { flex: 1; min-width: 0; }
.item-lista .info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-lista .info small { color: var(--mutado); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-lista .direita { text-align: right; flex: none; }
.clicavel { cursor: pointer; }
.clicavel:hover { background: var(--campo); }
.vazio { text-align: center; padding: 2.5rem 1rem; color: var(--mutado); }
.vazio .ic { font-size: 2.4rem; display: block; margin-bottom: .4rem; }
.filtros { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filtros input, .filtros select { flex: 1 1 150px; width: auto; min-height: 42px; }
.segmentos { display: inline-flex; background: var(--campo); border: 1px solid var(--linha); border-radius: 12px; padding: 3px; margin-bottom: 1rem; }
.segmentos button { border: 0; background: none; padding: .5rem 1rem; border-radius: 9px; font-weight: 700; color: var(--mutado); cursor: pointer; }
.segmentos button.ativo { background: var(--cartao); color: var(--texto); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.tabela-rolagem { overflow-x: auto; margin: 0 -1.1rem; padding: 0 1.1rem; }
table.tabela { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabela th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mutado); padding: .55rem .6rem; border-bottom: 1px solid var(--linha); white-space: nowrap; }
.tabela td { padding: .65rem .6rem; border-bottom: 1px solid var(--linha); vertical-align: middle; }
.tabela tr.clicavel:hover td { background: var(--campo); }
.tabela .num-col { text-align: right; font-variant-numeric: tabular-nums; }
/* No celular, tabelas viram cartões */
@media (max-width: 700px) {
  .tabela-cartoes thead { display: none; }
  .tabela-cartoes, .tabela-cartoes tbody, .tabela-cartoes tr, .tabela-cartoes td { display: block; width: 100%; }
  .tabela-cartoes tr { border: 1px solid var(--linha); border-radius: 14px; padding: .55rem .8rem; margin-bottom: .6rem; background: var(--cartao); }
  .tabela-cartoes td { border: 0; padding: .2rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .tabela-cartoes td::before { content: attr(data-r); color: var(--mutado); font-weight: 600; font-size: .8rem; text-align: left; }
  .tabela-cartoes td.td-principal { display: block; text-align: left; font-weight: 700; padding-bottom: .4rem; }
  .tabela-cartoes td.td-principal::before { display: none; }
  .tabela-rolagem { margin: 0; padding: 0; overflow: visible; }
}
.estrelas { color: var(--acc); letter-spacing: 1px; white-space: nowrap; }
.estrelas-escolha { display: flex; justify-content: center; gap: .3rem; margin: .6rem 0 1rem; }
.estrelas-escolha button { font-size: 2.3rem; border: 0; background: none; cursor: pointer; color: var(--linha); padding: 0 .1rem; transition: transform .1s; }
.estrelas-escolha button.on { color: var(--acc); }
.estrelas-escolha button:active { transform: scale(1.2); }
.barras { display: flex; align-items: flex-end; gap: .5rem; height: 140px; padding-top: .5rem; }
.barras .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.barras .pilha { width: 100%; max-width: 38px; display: flex; flex-direction: column-reverse; border-radius: 6px 6px 0 0; overflow: hidden; }
.barras .b-fin { background: var(--acc); }
.barras .b-canc { background: var(--erro); opacity: .7; }
.barras small { font-size: .72rem; color: var(--mutado); }
.legenda { display: flex; gap: 1rem; font-size: .8rem; color: var(--mutado); margin-top: .6rem; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }
.mais-carregar { display: block; margin: 1rem auto 0; }
.menu-mais { display: grid; gap: .6rem; }
.menu-mais .btn { justify-content: flex-start; min-height: 56px; }
.docs { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.docs a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--linha); aspect-ratio: 4/3; background: var(--campo); }
.docs img { width: 100%; height: 100%; object-fit: cover; }
.config-grupo { display: grid; gap: .7rem; }
.config-grupo .linha2 label, .config-grupo .linha3 label { font-size: .82rem; }
.linha3 { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
@media (min-width: 700px) { .linha3 { grid-template-columns: repeat(4, 1fr); } }
.mapa-adm { position: relative; height: 60vh; min-height: 360px; border-radius: var(--raio); overflow: hidden; border: 1px solid var(--linha); margin-bottom: 1rem; }

/* ---------- Modal e toasts ---------- */
.modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-end; justify-content: center; }
.modal-fundo { position: absolute; inset: 0; background: rgba(10, 12, 15, .55); animation: aparecer .2s; }
.modal-caixa { position: relative; background: var(--cartao); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 1.4rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom)); animation: subir .25s ease-out; }
.modal-x { position: absolute; top: .6rem; right: .7rem; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--campo); font-size: 1.4rem; cursor: pointer; line-height: 1; }
@media (min-width: 700px) { .modal { align-items: center; } .modal-caixa { border-radius: 20px; } }
@keyframes aparecer { from { opacity: 0; } }
@keyframes subir { from { transform: translateY(40px); opacity: 0; } }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--topo-h) + 10px + env(safe-area-inset-top)); z-index: 3000; display: grid; gap: .5rem; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--tinta); color: #fff; padding: .8rem 1rem; border-radius: 12px; box-shadow: var(--sombra); font-weight: 600; font-size: .9rem; animation: subir .2s ease-out; pointer-events: auto; }
.toast.erro { background: var(--erro); }
.toast.ok { background: var(--ok); }
@media (min-width: 900px) { .toasts { top: 18px; } }
.carregando { display: inline-block; width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: girar .7s linear infinite; vertical-align: -3px; }
@keyframes girar { to { transform: rotate(360deg); } }
.leaflet-control-attribution { font-size: 10px !important; }

/* ---------- Número da casa ---------- */
.num-casa { display: flex; align-items: center; gap: .6rem; margin: -.15rem 0 .1rem 20px; padding: .45rem .6rem; border-radius: 10px; background: var(--acc-suave); }
.num-casa label { display: flex; align-items: center; gap: .4rem; font-size: .85rem; flex: none; }
.num-casa input { width: 84px; min-height: 38px; padding: .35em .6em; background: var(--cartao); font-weight: 700; }
.num-casa small { font-size: .76rem; line-height: 1.25; color: var(--mutado); }

/* ---------- Proposta de valor ---------- */
.proposta-valores { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .8rem 1rem; border-radius: 14px; border: 1.5px solid var(--acc); background: var(--acc-suave); margin-bottom: .8rem; }
.proposta-valores small { display: block; color: var(--mutado); font-size: .76rem; font-weight: 600; }
.proposta-valores s { color: var(--mutado); font-weight: 600; }
.proposta-valores .seta { font-size: 1.3rem; color: var(--mutado); }
.proposta-valores > div:last-child { text-align: right; }
.ajuste-valor { display: grid; grid-template-columns: 56px 1fr 56px; gap: .5rem; margin: .8rem 0 .6rem; }
.ajuste-valor .btn { font-size: 1.5rem; padding: 0; }
.ajuste-valor input { text-align: center; font-size: 1.6rem; font-weight: 800; }
.chips-valor { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.chip-v { border: 1.5px solid var(--linha); background: var(--campo); border-radius: 99px; padding: .4em .9em; font-weight: 700; cursor: pointer; }
.chip-v:hover { border-color: var(--acc); }
.oferta .botoes .btn { padding-left: .6em; padding-right: .6em; }

/* ---------- Simulador de tarifas (admin) ---------- */
.simulador { display: grid; gap: .6rem; padding: .9rem; border-radius: 14px; background: var(--campo); border: 1px dashed var(--linha); }
.simulador .resultado { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .95rem; }
.simulador .resultado b { font-size: 1.2rem; }

/* ---------- Reset ---------- */
.opcao-reset { padding: .7rem .8rem; border: 1.5px solid var(--linha); border-radius: 12px; }
.opcao-reset:has(input:checked) { border-color: var(--erro); background: var(--erro-suave); }
.opcao-reset small { display: block; font-weight: 500; }

/* ---------- Modo de trabalho / particular ---------- */
.modos { display: grid; gap: .5rem; }
.modos .op-veiculo small { display: block; }
.part-item { border: 1px solid var(--linha); border-radius: 14px; padding: .8rem .9rem; margin-bottom: .6rem; background: var(--cartao); }
.part-item.andamento { border-color: var(--acc); background: var(--acc-suave); }
.part-topo { display: flex; justify-content: space-between; gap: .6rem; align-items: flex-start; margin-bottom: .4rem; }
.part-topo b { font-size: 1rem; }
.part-acoes { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }
.part-acoes .btn { flex: 1 1 auto; }
.preco-det { font-size: .8rem; color: var(--mutado); }
.form-corrida .local-campo input { padding-right: .85em; }
.calc-linha { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.calc-linha > * { min-width: 0; }
.campo-valor input { font-size: 1.3rem; font-weight: 800; }
.cartao-modo .op-veiculo { margin-bottom: .5rem; }

/* ---------- Câmera / reconhecimento facial ---------- */
.camera-face { position: relative; width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 3/4; border-radius: 22px; overflow: hidden; background: #0b0c0f; }
.camera-face video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camera-oval { position: absolute; inset: 12% 18% 16%; border-radius: 50%; border: 4px dashed rgba(255,255,255,.75); box-shadow: 0 0 0 999px rgba(10,12,15,.45); transition: border-color .2s; }
.camera-oval.ok { border-style: solid; border-color: var(--acc); }
.fc-instrucao { text-align: center; font-weight: 800; font-size: 1.05rem; min-height: 2.6em; margin: .6rem 0 .3rem; }

/* ---------- Tela inicial (estilo Uber, sem mapa) ---------- */
.aba-mapa .p-mapa, .aba-mapa .m-mapa { position: absolute; inset: 0; }
.p-home, .m-home { max-width: 1120px; margin: 0 auto; padding: 1.2rem 1rem 2rem; }
.home-grid { display: grid; gap: 1.6rem; }
@media (min-width: 900px) { .p-home, .m-home { padding: 2.6rem 2.4rem; } .home-grid { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 4rem; align-items: start; } }
.home-cidade { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .92rem; margin-bottom: .9rem; }
.home-titulo { font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin: 0 0 1.4rem; }
.home-sub { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .9rem; }
.home-sep { margin-top: 2.4rem; }
.home-campos { position: relative; display: grid; gap: .6rem; margin-bottom: 1rem; }
.home-campos::before { content: ''; position: absolute; left: 21px; top: 28px; bottom: 28px; width: 2px; background: var(--texto); opacity: .8; z-index: 1; pointer-events: none; }
.hc { position: relative; display: flex; align-items: center; background: var(--campo); border: 1px solid var(--linha); border-radius: 14px; min-height: 56px; }
.hc:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 30%, transparent); }
.hc .ponto { position: relative; z-index: 2; margin-left: 16px; width: 12px; height: 12px; flex: none; border: 2px solid var(--cartao); box-sizing: content-box; }
.hc input { border: 0; background: transparent; box-shadow: none !important; min-height: 54px; font-size: 1rem; padding-left: .8rem; min-width: 0; }
.hc .hc-icone { flex: none; width: 44px; height: 44px; margin-right: 6px; border: 0; border-radius: 10px; background: none; color: var(--texto); font-size: 1.1rem; cursor: pointer; }
.hc .hc-icone:hover { background: var(--linha); }
.hc .sugestoes { left: 0; }
.home-campos .num-casa { margin-left: 0; }
.home-acoes { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.home-acoes .btn-primario { min-width: 150px; min-height: 52px; font-size: 1.02rem; }
@media (max-width: 899px) { .home-acoes .btn-primario { flex: 1; } }
.sug-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.sug-card { display: grid; justify-items: center; gap: .15rem; padding: 1.1rem .8rem 1rem; border-radius: 16px; border: 1.5px solid transparent; background: var(--campo); cursor: pointer; color: var(--texto); text-align: center; transition: transform .1s, border-color .15s; }
.sug-card:hover { transform: translateY(-2px); border-color: var(--linha); }
.sug-card.ativo { border-color: var(--acc); background: var(--acc-suave); }
.sug-card .sug-ic { font-size: 2.6rem; line-height: 1.1; }
.sug-card small { color: var(--mutado); font-size: .78rem; }
.home-atividade { display: grid; gap: 1rem; }
@media (min-width: 900px) { .home-atividade { grid-template-columns: 1fr 1fr; } }
.home-atividade .cartao { margin: 0; }
.hist-ic { width: 38px; height: 38px; border-radius: 50%; background: var(--campo); display: grid; place-items: center; flex: none; }
.btn-voltar { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--campo); color: var(--texto); font-size: 1.2rem; cursor: pointer; flex: none; }
.painel-topo .btn-voltar + h3 { flex: 1; }
.trajeto-caixa { background: var(--campo); border-radius: 12px; padding: .7rem .8rem; }

/* ---------- Motorista: tela inicial offline ---------- */
.m-saudacao { color: var(--mutado); font-weight: 600; margin: 0 0 .2rem; }
.m-online-cartao { background: var(--tinta); color: #fff; border-radius: 22px; padding: 1.4rem; display: grid; gap: 1rem; }
.m-online-cartao p { margin: 0; color: #C9CDD3; }
.m-online-cartao .btn-online-grande { min-height: 60px; font-size: 1.15rem; border-radius: 16px; }
.m-status { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; }
.m-status i { width: 12px; height: 12px; border-radius: 50%; background: #9CA3AF; display: inline-block; }
.m-veiculo { display: flex; align-items: center; gap: .8rem; }
.hc .ponto-origem { border-radius: 50%; }
.nav .nav-sair { display: none; }
@media (min-width: 900px) { .nav .nav-sair { display: flex; } }

.nav-versao { display: none; }
@media (min-width: 900px) { .nav-versao { display: block; color: var(--mutado); font-size: .72rem; padding: .2rem .8rem 0; } }

/* ---------- Entregas ---------- */
.seg-servico { margin-bottom: 1rem; }
.cartao-entrega { border: 1.5px solid var(--acc); background: var(--acc-suave); border-radius: 14px; padding: .8rem .9rem; margin-bottom: .8rem; display: grid; gap: .6rem; }
.ce-linha { display: flex; gap: .6rem; align-items: center; }
.ce-linha > span { font-size: 1.4rem; flex: none; }
.ce-linha > div { flex: 1; min-width: 0; }
.ce-linha small { display: block; color: var(--mutado); font-size: .76rem; }
.ce-codigo { text-align: center; background: var(--tinta); color: #fff; border-radius: 14px; padding: .8rem; }
.ce-codigo small { display: block; color: #C9CDD3; font-size: .78rem; }
.ce-codigo b { display: block; font-size: 2.2rem; letter-spacing: .4em; font-weight: 800; padding-left: .4em; }
.oferta-entrega { border-color: var(--info); }
.rastreio { max-width: 560px; margin: 0 auto; padding: 1.4rem 1rem 2rem; }
.rastreio .mapa-adm { height: 320px; min-height: 0; margin-top: 1rem; }
