:root {
  --fundo: #0b0a14;
  --fundo-2: #110e22;
  --superficie: #1a1230;
  --superficie-2: #240a42;
  --borda: rgba(255, 255, 255, .13);
  --texto: #eef1ff;
  --texto-2: #a3abd0;
  --texto-3: #7a82ad;
  --azul: #7a22e5;
  --violeta: #a66bff;
  --ciano: #00e5ff;
  --ok: #5fe0b0;
  --alerta: #ffc46b;
  --erro: #ff7b93;
  --raio: 16px;
  --sombra: 0 10px 30px rgba(0, 0, 0, .4);
  --baixo: env(safe-area-inset-bottom, 0px);
  --topo: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; color: var(--texto);
  background: radial-gradient(900px 500px at 10% -140px, rgba(122, 34, 229, .26), transparent 60%),
              radial-gradient(800px 480px at 100% 0, rgba(0, 229, 255, .10), transparent 60%) fixed, var(--fundo);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.4rem; } h2 { font-size: 1.12rem; } h3 { font-size: .95rem; color: var(--texto-2); font-weight: 600; }
.mudo { color: var(--texto-2); } .fraco { color: var(--texto-3); font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.carregando { min-height: 100dvh; display: grid; place-items: center; }
.carregando img { border-radius: 18px; animation: pulsa 1.4s ease-in-out infinite; }
@keyframes pulsa { 50% { opacity: .45; } }

.principal { padding: calc(var(--topo) + 14px) 16px calc(100px + var(--baixo)); max-width: 640px; margin: 0 auto; }
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.topo .marca { display: flex; align-items: center; gap: 10px; }
.topo .marca img { width: 40px; height: auto; }
.wordmark { font-family: "Outfit", -apple-system, sans-serif; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.wordmark b { font-weight: 600; font-size: 1.7rem; display: block; color: #fff; }
.wordmark small { display: block; font-size: .58rem; letter-spacing: .14em; color: var(--texto-3); margin-top: 3px; font-weight: 500; }
.wordmark .ponto-i { color: var(--ciano); }
.topo .usuario { font-size: .75rem; color: var(--texto-3); text-align: right; }

.abas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(11, 10, 20, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--borda); padding: 6px 4px calc(6px + var(--baixo));
}
.abas a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--texto-3); font-size: .72rem; padding: 6px 0; }
.abas a svg { width: 24px; height: 24px; }
.abas a.ativa { color: var(--azul); }

.cartao { background: rgba(255, 255, 255, .045); border: 1px solid var(--borda); border-radius: var(--raio); padding: 16px; margin-bottom: 14px; }
.cartao > h2, .cartao > h3 { margin-bottom: 10px; }
.linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grade-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 380px) { .grade-3 { grid-template-columns: 1fr 1fr; } }
.pilha > * + * { margin-top: 12px; }

.atalhos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.atalho {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 96px; padding: 14px;
  border-radius: 18px; border: 1px solid var(--borda); background: var(--superficie); cursor: pointer; text-align: left;
  -webkit-tap-highlight-color: transparent; transition: transform .08s;
}
.atalho:active { transform: scale(.97); }
.atalho svg { width: 28px; height: 28px; }
.atalho b { font-size: 1.02rem; }
.atalho small { color: var(--texto-3); font-size: .78rem; }
.atalho.c-azul svg { color: var(--azul); } .atalho.c-violeta svg { color: var(--violeta); }
.atalho.c-ciano svg { color: var(--ciano); } .atalho.c-amarelo svg { color: var(--alerta); }
.atalho.principal-a { background: linear-gradient(150deg, rgba(122, 34, 229, .28), rgba(0, 229, 255, .10)); border-color: rgba(122, 34, 229, .55); }

.metrica { background: var(--fundo-2); border: 1px solid var(--borda); border-radius: 14px; padding: 12px; }
.metrica .rotulo { font-size: .72rem; color: var(--texto-3); text-transform: uppercase; letter-spacing: .04em; }
.metrica .valor { font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }
.metrica .sub { font-size: .78rem; color: var(--texto-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 16px;
  border-radius: 12px; border: 1px solid var(--borda); background: var(--superficie-2); color: var(--texto);
  cursor: pointer; text-decoration: none; font-weight: 600; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn.primario { background: linear-gradient(135deg, #7a22e5, #5a3df0 60%, #1f8fff); border-color: #7a22e5; color: #fff; }
.btn.perigo { color: var(--erro); }
.btn.fantasma { background: transparent; }
.btn.pequeno { min-height: 34px; padding: 6px 12px; font-size: .85rem; border-radius: 10px; }
.btn.largo { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

label.campo { display: block; min-width: 0; }
label.campo > span { display: block; font-size: .8rem; color: var(--texto-2); margin-bottom: 4px; }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--borda);
  background: var(--fundo-2); outline: none; font-size: 16px;
}
input:focus, select:focus, textarea:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(122, 34, 229, .22); }
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; min-width: 0; }
input.calculado { color: var(--ciano); }
textarea { min-height: 70px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; width: 1px; min-height: 0; }
.chips span { display: inline-block; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--borda); background: var(--fundo-2); color: var(--texto-2); font-size: .88rem; }
.chips input:checked + span { background: rgba(122, 34, 229, .2); border-color: var(--azul); color: var(--texto); }
.chips input:focus-visible + span { box-shadow: 0 0 0 3px rgba(122, 34, 229, .3); }
.chave { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 12px; background: var(--fundo-2); }
.chave input { width: 22px; min-height: 22px; height: 22px; accent-color: var(--azul); }
.dica { font-size: .82rem; color: var(--ciano); min-height: 1.2em; }
details.mais summary { cursor: pointer; color: var(--texto-2); font-size: .9rem; padding: 4px 0; }
details.mais[open] summary { margin-bottom: 10px; }

.filtros { display: flex; gap: 8px; margin-bottom: 12px; }
.filtros select { flex: 1; min-width: 0; }
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--borda); cursor: pointer; }
.lista li:last-child { border-bottom: 0; }
.lista .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--fundo-2); border: 1px solid var(--borda); }
.lista .ic svg { width: 20px; height: 20px; }
.lista .ic.abast { color: var(--azul); } .lista .ic.corrida { color: var(--violeta); } .lista .ic.despesa { color: var(--alerta); }
.lista .det { min-width: 0; }
.lista .det .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista .det .o { font-size: .8rem; color: var(--texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista .tot { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.lista .tot small { display: block; font-weight: 400; font-size: .75rem; color: var(--texto-3); }
.dia-sep { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-3); padding: 14px 4px 2px; }
.vazio { text-align: center; color: var(--texto-3); padding: 24px 8px; }
.selo { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--borda); color: var(--texto-2); }
.selo.ok { color: var(--ok); border-color: rgba(95, 224, 176, .4); }
.faixa { border-radius: 12px; padding: 10px 12px; font-size: .875rem; margin-bottom: 14px; border: 1px solid rgba(255, 196, 107, .35); background: rgba(255, 196, 107, .08); color: #ffe0ad; }

.fab {
  position: fixed; right: 18px; bottom: calc(80px + var(--baixo)); z-index: 15; width: 60px; height: 60px; border-radius: 50%;
  border: 0; display: grid; place-items: center; color: #fff; cursor: pointer; box-shadow: var(--sombra);
  background: linear-gradient(140deg, #7a22e5, #00b8e6);
}
.fab svg { width: 30px; height: 30px; }

dialog {
  width: min(560px, calc(100vw - 16px)); max-height: calc(100dvh - 24px); overflow: auto; margin: auto;
  background: #150f28; color: var(--texto); border: 1px solid var(--borda); border-radius: 20px; padding: 18px; box-shadow: var(--sombra);
}
dialog::backdrop { background: rgba(4, 6, 16, .72); backdrop-filter: blur(3px); }
dialog h2 { margin-bottom: 14px; }
dialog .acoes { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; position: sticky; bottom: -18px; background: #150f28; padding: 10px 0 4px; }
dialog .acoes .esq { margin-right: auto; }

#aviso {
  position: fixed; left: 50%; bottom: calc(90px + var(--baixo)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 50;
  background: #2a0f4d; border: 1px solid var(--azul); color: var(--texto); padding: 10px 16px; border-radius: 12px; transition: .2s; max-width: calc(100vw - 32px);
}
#aviso.visivel { opacity: 1; transform: translate(-50%, 0); }
#aviso.erro { background: #4a1626; border-color: var(--erro); }

.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login .cartao { width: min(400px, 100%); }
.login img { width: 96px; height: auto; display: block; margin: 0 auto 8px; }
.login .wordmark { text-align: center; } .login .wordmark b { font-size: 2.4rem; } .login .wordmark small { font-size: .7rem; }

.com-botao { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.com-botao .btn { min-width: 46px; padding: 0 12px; color: var(--ciano); }
#sug-postos { margin-top: -4px; }
#sug-postos .btn { font-weight: 500; color: var(--texto-2); }
