/* LavaPerto: petróleo profundo + areia + coral (identidade própria) */
:root {
  --petroleo: #0f5257; --petroleo-2: #16707a; --areia: #f6f4ef; --branco: #fff; --texto: #17262a; --muted: #62767a;
  --coral: #ef6f4c; --verde: #1d8a57; --ambar: #c7861a; --cinza: #a2acae; --vermelho: #c0392b; --borda: #e4e1d8;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texto);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--areia); font-size: 16px; }
[hidden] { display: none !important; }
h1 { font-size: 28px; line-height: 1.15; margin: 8px 0 10px; }
h2 { margin: 0; font-size: 22px; } h3 { margin: 18px 0 10px; font-size: 17px; }
.sub { color: var(--muted); margin: 0 0 8px; }
.erro { color: var(--vermelho); min-height: 1em; margin: 0; font-size: 14px; }
.pilha { display: grid; gap: 12px; }
.centro { text-align: center; justify-items: center; }

.tela { padding: 20px 18px; max-width: 560px; margin: 0 auto; }
.tela-clara { padding-top: calc(28px + env(safe-area-inset-top, 0px)); min-height: 100vh; }
.tela-app { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }

.marca-grande { display: flex; align-items: center; gap: 10px; margin: 14vh 0 26px; }
.gota { width: 44px; height: 44px; border-radius: 50% 50% 50% 8px; background: var(--petroleo); position: relative; transform: rotate(-45deg); }
.gota::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; border: 4px solid var(--coral); }
.app-nome { font-size: 34px; font-weight: 800; color: var(--petroleo); letter-spacing: -0.5px; }

label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
input { padding: 14px; border: 1px solid var(--borda); border-radius: 12px; font: inherit; background: var(--branco); width: 100%; }
input:focus { outline: 2px solid var(--petroleo-2); border-color: transparent; }
.senha { position: relative; display: block; }
.senha input { padding-right: 48px; }
.olho { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 18px; padding: 8px; cursor: pointer; }

.btn { background: var(--petroleo); color: #fff; border: 0; border-radius: 14px; padding: 16px; font: inherit; font-weight: 700; cursor: pointer; width: 100%; }
.btn:disabled { background: #b9c4c5; cursor: not-allowed; }
.btn.claro { background: var(--branco); color: var(--petroleo); border: 1px solid var(--borda); }
.btn.escuro { background: var(--texto); }
.btn.mini { width: auto; padding: 10px 14px; font-size: 14px; border-radius: 10px; }
.link { background: none; border: 0; color: var(--petroleo-2); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 8px; }
.voltar { background: none; border: 0; font-size: 26px; color: var(--petroleo); cursor: pointer; padding: 0 0 6px; }

.topo { background: var(--petroleo); color: #fff; padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 22px;
        border-radius: 0 0 22px 22px; position: sticky; top: 0; z-index: 10; }
.topo-linha { display: flex; justify-content: space-between; align-items: flex-end; max-width: 560px; margin: 0 auto; gap: 12px; }
.topo small { color: #b9dcdc; }
.saldo-chip { background: #fff; color: var(--petroleo); border: 0; border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; }

.unidade { width: 100%; display: flex; justify-content: space-between; align-items: center; background: var(--branco); border: 1px solid var(--borda);
           border-radius: 14px; padding: 14px 16px; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.unidade small { display: block; color: var(--muted); }
.alterar { color: var(--petroleo-2); font-weight: 700; }
.vazio { text-align: center; color: var(--muted); padding: 40px 10px; }
.info-unidade { color: var(--muted); font-size: 14px; margin: 12px 2px 0; }

.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.maq { background: var(--branco); border: 1px solid var(--borda); border-radius: 16px; padding: 14px; display: grid; gap: 6px; }
.maq strong { font-size: 16px; }
.maq .preco { color: var(--muted); }
.st { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: #fff; justify-self: start; }
.st-livre { background: var(--verde); } .st-ocupada { background: var(--ambar); } .st-reservada { background: var(--petroleo-2); } .st-offline { background: var(--cinza); }
.maq .btn { padding: 10px; font-size: 14px; border-radius: 10px; background: var(--coral); }
.maq.off { opacity: .6; }

.busca { display: flex; gap: 8px; }
.busca input { padding: 11px 14px; }
#mapa { height: 240px; border-radius: 16px; margin: 12px 0; border: 1px solid var(--borda); z-index: 1; }
.loja { background: var(--branco); border: 1px solid var(--borda); border-radius: 16px; padding: 14px; display: grid; gap: 6px; cursor: pointer; }
.loja.sel { outline: 2px solid var(--petroleo-2); }
.loja-topo { display: flex; gap: 12px; align-items: center; }
.loja-topo img { width: 46px; height: 46px; object-fit: contain; border-radius: 10px; background: #f0efea; }
.loja .dist { margin-left: auto; color: var(--petroleo-2); font-weight: 700; white-space: nowrap; }
.contagem { display: flex; gap: 14px; font-size: 14px; }
.contagem b { color: var(--verde); }
.loja small { color: var(--muted); }

.cartao { background: var(--branco); border: 1px solid var(--borda); border-radius: 18px; padding: 18px; display: grid; gap: 10px; margin-bottom: 14px; }
.saldo-grande { font-size: 36px; font-weight: 800; color: var(--petroleo); }
.valor { font-size: 34px; font-weight: 800; text-align: right; border: 0; border-bottom: 2px solid var(--borda); border-radius: 0; padding: 6px 2px; }
.atalhos { display: flex; gap: 8px; flex-wrap: wrap; }
.atalhos button { flex: 1; min-width: 64px; padding: 10px; border-radius: 10px; border: 1px solid var(--borda); background: var(--areia); font: inherit; font-weight: 700; color: var(--petroleo); cursor: pointer; }
.aceite { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.aceite input { width: 20px; height: 20px; margin: 0; flex: none; }
#pix-qr { width: min(240px, 70vw); aspect-ratio: 1; image-rendering: pixelated; }

.mov { background: var(--branco); border: 1px solid var(--borda); border-radius: 14px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 10px; }
.mov small { color: var(--muted); display: block; }
.mov .v { font-weight: 800; white-space: nowrap; }
.mov .v.pos { color: var(--verde); } .mov .v.neg { color: var(--texto); }

.item { text-align: left; background: var(--branco); border: 1px solid var(--borda); border-radius: 14px; padding: 16px; font: inherit; cursor: pointer; color: inherit; }
.item.perigo { color: var(--vermelho); }
.icone { font-size: 54px; }

#qr-video { width: 100%; border-radius: 16px; background: #0b1416; aspect-ratio: 1; object-fit: cover; margin-bottom: 10px; }

.barra { position: fixed; left: 0; right: 0; bottom: 0; background: var(--branco); border-top: 1px solid var(--borda);
         display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 20; }
.barra button { background: none; border: 0; font: inherit; font-size: 12px; color: var(--muted); display: grid; justify-items: center; gap: 2px; cursor: pointer; padding: 4px 0; }
.barra i { font-style: normal; font-size: 22px; line-height: 1; }
.barra button.ativa { color: var(--petroleo); font-weight: 700; }
.barra .qr { width: 62px; height: 62px; border-radius: 50%; background: var(--coral); color: #fff; justify-self: center; transform: translateY(-16px);
             box-shadow: 0 6px 16px rgba(239, 111, 76, .4); display: grid; place-items: center; }
.barra .qr i { font-size: 28px; }

dialog { border: 0; border-radius: 20px 20px 0 0; width: 100%; max-width: 560px; margin: auto auto 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px)); }
dialog::backdrop { background: rgba(10, 30, 32, .5); }
.linha { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--borda); }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); background: var(--texto);
         color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 30; max-width: 90vw; text-align: center; }
