/* Fit Stop — "Painel de Pit Stop": preto, verde-limão da marca, nível como marcador de combustível */
:root {
  --ground: #070807; --surface: #111311; --surface-2: #191c18; --line: #252922;
  --ink: #f1f4ec; --muted: #9ba494; --dim: #7d8577;
  --accent: #a8e21e; --accent-ink: #0b0e05; --accent-soft: rgb(168 226 30 / .12);
  --saida: #ff8a3d; --saida-soft: rgb(255 138 61 / .12);
  --contagem: #5cb8ff; --contagem-soft: rgb(92 184 255 / .12);
  --warn: #ffbf3c; --warn-soft: rgb(255 191 60 / .12);
  --danger: #ff5b4f; --danger-soft: rgb(255 91 79 / .12);

  --font-display: "Chakra Petch", "Arial Narrow", system-ui, sans-serif;
  --font-text: "Manrope", system-ui, -apple-system, sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r1: 8px; --r2: 14px; --r3: 22px; --pill: 999px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 68px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
button, a, label, input, summary { touch-action: manipulation; }
body {
  background: var(--ground); color: var(--ink);
  font: 500 16px/1.45 var(--font-text);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

main { max-width: 720px; margin: 0 auto; padding: 0 var(--s4); }
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; line-height: 1.05; }
h1.display { font-size: 2.25rem; margin: var(--s1) 0 var(--s5); }
h2 { font-size: 1rem; margin: 0; }
.sobre { margin: var(--s5) 0 0; color: var(--accent); font: 600 .8rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; }
.sub { color: var(--muted); margin: calc(-1 * var(--s3)) 0 var(--s5); }
.secao { margin: var(--s7) 0 var(--s3); font: 600 .8rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.secao-topo { display: flex; align-items: baseline; justify-content: space-between; margin: var(--s7) 0 var(--s3); }
.secao-topo h2 { font: 600 .8rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.link { background: none; border: 0; padding: var(--s2) 0; color: var(--accent); font-weight: 700; font-size: .9rem; }
.vazio { color: var(--dim); text-align: center; padding: var(--s6) var(--s4); border: 1px dashed var(--line); border-radius: var(--r2); }

/* Topo */
.topo {
  position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: calc(var(--s3) + env(safe-area-inset-top)) var(--s4) var(--s3);
  background: rgb(7 8 7 / .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.marca { display: flex; align-items: center; gap: var(--s3); font: 700 1.05rem/1 var(--font-display); letter-spacing: .12em; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2);
  font: 700 1rem/1 var(--font-display); color: var(--accent); display: grid; place-items: center;
}

.tela { display: none; }
.tela.ativa { display: block; animation: entra .28s var(--ease-out); }
@keyframes entra { from { opacity: .4; transform: translateY(6px); } }

/* Alerta de reposição */
.alerta {
  display: flex; align-items: flex-start; gap: var(--s3); width: 100%; margin: var(--s4) 0 var(--s5); text-align: left;
  padding: var(--s4); border-radius: var(--r2); border: 1px solid rgb(255 91 79 / .35); background: var(--danger-soft); color: var(--danger); font-size: .95rem;
}
.alerta > svg:last-child { align-self: center; opacity: .7; }
.alerta-txt { flex: 1; min-width: 0; display: grid; gap: var(--s2); }
.alerta-txt b { font-weight: 700; }
.alerta-lista { display: grid; gap: 2px; color: var(--ink); font-weight: 500; }
.alerta-lista em { font-style: normal; color: var(--danger); font-weight: 700; margin-left: 4px; }

/* Ações */
.acoes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.acao {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4);
  min-height: 132px; padding: var(--s4); text-align: left; border: 1px solid var(--line); border-radius: var(--r3);
  background: var(--surface); transition: transform .15s var(--ease-out), border-color .15s;
}
.acao:active { transform: scale(.98); }
.acao-icone { width: 44px; height: 44px; border-radius: var(--r2); display: grid; place-items: center; }
.acao-txt b { display: block; font: 700 1.35rem/1.1 var(--font-display); }
.acao-txt small { color: var(--muted); font-size: .9rem; }
.acao-saida { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 112px; background: var(--saida); border-color: var(--saida); color: #1a0c02; }
.acao-saida .acao-icone { width: 56px; height: 56px; background: rgb(0 0 0 / .14); }
.acao-saida .acao-icone svg { width: 28px; height: 28px; }
.acao-saida .acao-txt { flex: 1; }
.acao-saida .acao-txt b { font-size: 1.75rem; }
.acao-saida .acao-txt small { color: rgb(26 12 2 / .72); font-weight: 700; }
.acao-chev { opacity: .6; }
.acao-entrada .acao-icone { background: var(--accent-soft); color: var(--accent); }
.acao-contagem .acao-icone { background: var(--contagem-soft); color: var(--contagem); }
.acao-entrada:hover, .acao-contagem:hover { border-color: #3a4035; }

/* Marcador de combustível (assinatura) */
.gauges { display: grid; gap: var(--s2); }
.gauge { padding: var(--s4); border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line); }
.gauge-topo { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: var(--s3); }
.gauge-nome { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gauge-qtd { font: 700 1.6rem/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gauge-qtd small { font: 500 .8rem var(--font-text); color: var(--muted); margin-left: 4px; }
.barra { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; height: 14px; }
.barra i { border-radius: 2px; background: var(--surface-2); transform-origin: bottom; }
.barra i.on { background: var(--cor, var(--accent)); animation: acende .5s var(--ease-out) backwards; animation-delay: calc(var(--n) * 28ms); }
@keyframes acende { from { transform: scaleY(.3); opacity: .3; } }
.gauge-rodape { display: flex; justify-content: space-between; gap: var(--s3); margin-top: var(--s3); font-size: .82rem; color: var(--muted); }
.gauge.baixo { --cor: var(--danger); border-color: rgb(255 91 79 / .3); }
.gauge.zerado { --cor: var(--danger); border-color: rgb(255 91 79 / .3); }
.gauge.baixo .gauge-rodape .estado, .gauge.zerado .gauge-rodape .estado { color: var(--cor); font-weight: 700; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); width: 100%;
  min-height: 54px; padding: 0 var(--s5); border-radius: var(--r2); border: 1px solid transparent;
  font-weight: 700; font-size: 1rem; cursor: pointer; transition: transform .15s var(--ease-out), opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.btn-pri { background: var(--accent); color: var(--accent-ink); }
.btn-sec { background: var(--surface); border-color: var(--line); margin-top: var(--s3); }
.btn-ghost { background: none; color: var(--muted); min-height: 44px; }
.voltar { display: flex; align-items: center; gap: var(--s2); background: none; border: 0; color: var(--muted); padding: var(--s4) 0 var(--s2); }
.voltar svg { width: 18px; height: 18px; }
.chip-tipo { display: inline-block; margin-top: var(--s3); padding: 6px 12px; border-radius: var(--pill); font: 700 .75rem/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; }
.chip-tipo.saida { background: var(--saida-soft); color: var(--saida); }
.chip-tipo.entrada { background: var(--accent-soft); color: var(--accent); }
.chip-tipo.contagem { background: var(--contagem-soft); color: var(--contagem); }
.rodape-fixo {
  position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 5;
  margin: var(--s5) calc(-1 * var(--s4)) 0; padding: var(--s3) var(--s4) var(--s2);
  background: linear-gradient(to bottom, transparent, var(--ground) 30%);
}

/* Captura de foto */
.captura {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 210px; border-radius: var(--r3); cursor: pointer; text-align: center;
  border: 1.5px dashed #3a4035; background: var(--surface);
}
.captura-icone { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); margin-bottom: var(--s2); }
.captura-icone svg { width: 30px; height: 30px; }
.captura b { font: 700 1.3rem/1 var(--font-display); }
.captura small { color: var(--muted); }
.captura.com-foto { min-height: 92px; flex-direction: row; gap: var(--s3); }
.captura.com-foto .captura-icone { width: 44px; height: 44px; margin: 0; }
.captura.com-foto small { display: none; }
.previews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.previews:empty { display: none; }
.previews figure { margin: 0; position: relative; }
.previews img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r1); display: block; }
.previews button { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .7); color: #fff; display: grid; place-items: center; }
.previews button svg { width: 16px; height: 16px; }

/* Conferir */
.resumo { display: flex; gap: var(--s3); padding: var(--s4); margin-bottom: var(--s4); border-radius: var(--r2); background: var(--accent-soft); color: var(--ink); }
.resumo svg { color: var(--accent); margin-top: 1px; }
.lista { display: grid; gap: var(--s2); }
.item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s3); align-items: center;
  padding: var(--s3) var(--s3) var(--s3) var(--s4); border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line);
}
.item .nome { font-weight: 700; }
.item .obs { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); }
.item.duvida { border-color: rgb(255 191 60 / .45); }
.tag { display: inline-block; margin-left: var(--s2); padding: 2px 8px; border-radius: var(--pill); background: var(--warn-soft); color: var(--warn); font-size: .72rem; font-weight: 700; vertical-align: 2px; }
.passo { display: flex; align-items: center; gap: var(--s1); }
.passo button { width: 44px; height: 44px; border-radius: var(--r1); border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; }
.passo input { width: 56px; height: 44px; text-align: center; border: 0; background: none; font: 700 1.4rem var(--font-display); font-variant-numeric: tabular-nums; }
.adicionar { margin-top: var(--s4); }
.adicionar summary { display: inline-flex; align-items: center; gap: var(--s2); color: var(--accent); font-weight: 700; padding: var(--s2) 0; cursor: pointer; list-style: none; }
.adicionar summary::-webkit-details-marker { display: none; }
.adicionar summary svg { width: 18px; height: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); padding-top: var(--s2); }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: var(--pill); padding: 10px 14px; font-weight: 700; }

/* Linha do tempo */
.timeline { display: grid; gap: var(--s2); }
.dia { margin: var(--s4) 0 var(--s1); font: 600 .75rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.mov { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3); border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line); }
.mov-icone { width: 40px; height: 40px; border-radius: var(--r1); display: grid; place-items: center; flex: none; }
.mov-icone svg { width: 20px; height: 20px; }
.mov.entrada .mov-icone { background: var(--accent-soft); color: var(--accent); }
.mov.saida .mov-icone { background: var(--saida-soft); color: var(--saida); }
.mov.ajuste .mov-icone { background: var(--contagem-soft); color: var(--contagem); }
.mov-info { flex: 1; min-width: 0; }
.mov-linha { font-weight: 700; }
.mov-meta { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.mov-foto { width: 48px; height: 48px; object-fit: cover; border-radius: var(--r1); display: block; }
.mov-desfazer { background: none; border: 0; color: var(--dim); padding: var(--s1); display: grid; place-items: center; }
.mov-desfazer svg { width: 18px; height: 18px; }

/* Consumo */
.segmentado { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s1); padding: var(--s1); border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line); margin-bottom: var(--s4); }
.segmentado button { border: 0; background: none; border-radius: var(--r1); padding: var(--s3) 0; font-weight: 700; color: var(--muted); }
.segmentado .sel { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s2); }
.kpi { padding: var(--s4); border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line); }
.kpi b { display: block; font: 700 2.2rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.kpi span { display: block; margin-top: var(--s2); color: var(--muted); font-size: .85rem; }
.rendimentos { display: grid; gap: var(--s2); }
.rend { padding: var(--s4); border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line); }
.rend-nome { font-weight: 700; color: var(--muted); font-size: .92rem; }
.rend-hero { display: flex; align-items: baseline; gap: var(--s2); margin: var(--s2) 0 var(--s4); flex-wrap: wrap; }
.rend-hero b { font: 700 2.6rem/1 var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.rend-hero span { color: var(--ink); font-weight: 700; }
.segmentado.quatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.calendario { padding: var(--s3); }
.cal-topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s3); }
.cal-topo b { font: 700 1.1rem var(--font-display); }
.cal-topo .btn-icone:disabled { opacity: .3; }
.cal-semana, .cal-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px 0; }
.cal-semana span { text-align: center; font-size: .72rem; font-weight: 700; color: var(--dim); padding-bottom: var(--s2); }
.cal-dia {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  aspect-ratio: 1; min-height: 44px; border: 0; border-radius: var(--r1); background: none; padding: 0;
}
.cal-dia .n { font: 700 .95rem/1 var(--font-display); }
.cal-dia .c { font-size: .66rem; font-weight: 700; color: var(--accent); min-height: .8rem; font-variant-numeric: tabular-nums; }
.cal-dia .ponto-saida { position: absolute; top: 5px; right: 6px; }
.cal-dia.hoje .n { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cal-dia.futuro { opacity: .25; cursor: default; }
.cal-dia.no-periodo { background: var(--accent-soft); border-radius: 0; }
.cal-dia.ponta { background: var(--accent); color: var(--accent-ink); border-radius: var(--r1); }
.cal-dia.ponta .c, .cal-dia.ponta.hoje .n { color: var(--accent-ink); }
.ponto-saida, .ponto-carros { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--saida); }
.ponto-carros { background: var(--accent); }
.cal-legenda { display: flex; gap: var(--s4); justify-content: center; margin: var(--s3) 0 0; font-size: .75rem; color: var(--muted); }
.cal-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.periodo-titulo { font-size: 1.6rem; margin: var(--s6) 0 var(--s3); }
.kpi span svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 2px; }
.form-carros { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3); align-items: end; margin-top: var(--s2); }
.rend-conta { margin: calc(-1 * var(--s3)) 0 var(--s4); font-size: .82rem; color: var(--muted); }
.rend-espera { margin: var(--s2) 0 var(--s4); color: var(--dim); font-size: .92rem; }
.secao + .sub { margin-top: 0; }
.rend-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); border-top: 1px solid var(--line); padding-top: var(--s3); }
.rend-stats div { min-width: 0; }
.rend-stats dt { font-size: .75rem; color: var(--muted); }
.rend-stats dd { margin: 2px 0 0; font: 700 1.05rem var(--font-display); font-variant-numeric: tabular-nums; }
.nota { color: var(--dim); font-size: .85rem; margin: var(--s3) 0 0; }
.lista-carros { display: grid; gap: 2px; margin-top: var(--s3); border-radius: var(--r2); overflow: hidden; }
.lista-carros div { display: flex; justify-content: space-between; align-items: center; padding: var(--s3) var(--s4); background: var(--surface); }
.lista-carros b { font-family: var(--font-display); }

/* Formulários */
.campo { display: grid; gap: 6px; }
.campo span { font-size: .8rem; font-weight: 700; color: var(--muted); }
.campo input, .campo textarea {
  width: 100%; min-height: 50px; padding: var(--s3) var(--s4); border-radius: var(--r1);
  border: 1px solid var(--line); background: var(--surface-2); font-size: 1rem;
}
.campo input[type=file] { padding: var(--s3); font-size: 1rem; }
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--accent); }
.cartao { padding: var(--s4); border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); }
.form-produto { display: grid; gap: var(--s4); margin-top: var(--s5); }
.dois { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.dois .btn-sec { margin-top: 0; }
.item.produto { grid-template-columns: auto minmax(0, 1fr) auto; padding: var(--s3); }
.prod-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: var(--r1); background: var(--surface-2); display: grid; place-items: center; color: var(--dim); }
.prod-thumb svg { width: 20px; height: 20px; }
.item.produto .sub-item { font-size: .82rem; color: var(--muted); }
.btn-icone { width: 44px; height: 44px; border-radius: var(--r1); border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.btn-icone svg { width: 18px; height: 18px; }
.status-ia { margin: var(--s5) 0 var(--s6); color: var(--muted); font-size: .88rem; display: flex; gap: var(--s2); align-items: center; }
.status-ia .ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.status-ia.on .ponto { background: var(--accent); }

/* Navegação */
.abas {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgb(10 11 10 / .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.abas button { position: relative; background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--dim); }
.abas button span { font-size: .72rem; font-weight: 700; }
.abas .sel { color: var(--ink); }
.abas .sel svg { color: var(--accent); }
.abas .sel::before { content: ""; position: absolute; top: -1px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }

/* Scanner (momento assinatura) */
.scanner { position: fixed; inset: 0; z-index: 40; background: var(--ground); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); padding: var(--s5); text-align: center; }
.scanner-foto { position: relative; width: min(78vw, 340px); aspect-ratio: 3 / 4; border-radius: var(--r3); overflow: hidden; background: var(--surface); margin-bottom: var(--s5); box-shadow: 0 0 0 1px var(--line); }
.scanner-foto img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.7) brightness(.8); }
.scanner-linha { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); box-shadow: 0 0 18px 4px rgb(168 226 30 / .55); animation: varre 1.8s ease-in-out infinite alternate; }
.scanner-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(168 226 30 / .14), transparent 40%); animation: varre-luz 1.8s ease-in-out infinite alternate; }
@keyframes varre { to { top: calc(100% - 3px); } }
@keyframes varre-luz { from { transform: translateY(-60%); } to { transform: translateY(60%); } }
.scanner b { font: 700 1.4rem var(--font-display); }
.scanner small { color: var(--muted); }

/* Folha do nome */
.folha { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .7); display: flex; align-items: flex-end; justify-content: center; }
.folha-caixa {
  width: 100%; max-width: 520px; display: grid; gap: var(--s4); padding: var(--s6) var(--s5) calc(var(--s6) + env(safe-area-inset-bottom));
  border-radius: var(--r3) var(--r3) 0 0; background: var(--surface); border-top: 1px solid var(--line);
  animation: sobe .32s var(--ease-out);
}
.folha-caixa h2 { font-size: 1.8rem; }
.folha-caixa .sub { margin: calc(-1 * var(--s3)) 0 0; }
@keyframes sobe { from { transform: translateY(40px); opacity: .5; } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--s4) + env(safe-area-inset-bottom)); z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--s2); max-width: calc(100% - 32px); padding: var(--s3) var(--s5);
  border-radius: var(--pill); background: var(--ink); color: var(--ground); font-weight: 700; animation: sobe .25s var(--ease-out);
  width: max-content; text-align: center;
}
.toast svg { width: 18px; height: 18px; color: #3d6b00; }

/* Telas maiores */
@media (min-width: 768px) {
  h1.display { font-size: 2.75rem; }
  .acoes-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .acao-saida { grid-column: auto; flex-direction: column; align-items: flex-start; min-height: 168px; }
  .acao { min-height: 168px; }
  .acao-chev { display: none; }
  .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rendimentos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .folha { align-items: center; }
  .folha-caixa { border-radius: var(--r3); border: 1px solid var(--line); }
}
@media (min-width: 1100px) {
  main { max-width: 960px; }
  .gauges, .rendimentos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.form-carros .btn { width: auto; }

/* Financeiro */
.pos { color: var(--accent); }
.neg { color: var(--saida); }
.captura-pdf { min-height: 150px; }
.mes-nav { display: flex; align-items: center; gap: var(--s2); }
.mes-nav b { font: 700 .95rem var(--font-display); min-width: 84px; text-align: center; }
.mes-nav .btn-icone { width: 36px; height: 36px; }
.mes-nav .btn-icone:disabled { opacity: .3; }
.kpis.tres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis.tres .kpi b { font-size: 1.45rem; }
.kpi-largo { grid-column: 1 / -1; }
.custo { display: grid; gap: var(--s1); margin-bottom: var(--s2); border-color: rgb(168 226 30 / .3); }
.custo-rotulo { display: flex; align-items: center; gap: var(--s2); color: var(--muted); font-size: .85rem; font-weight: 700; }
.custo-rotulo svg { width: 18px; height: 18px; color: var(--accent); }
.custo b { font: 700 2.4rem/1.1 var(--font-display); color: var(--accent); }
.custo-conta { color: var(--muted); font-size: .85rem; }
.vazio-custo { border-color: var(--line); }
.categorias { display: grid; gap: var(--s4); }
.cat-topo { display: flex; justify-content: space-between; gap: var(--s3); font-size: .92rem; margin-bottom: 6px; }
.cat-topo b { font-family: var(--font-display); white-space: nowrap; }
.cat-barra { height: 8px; border-radius: var(--pill); background: var(--surface-2); overflow: hidden; }
.cat-barra i { display: block; height: 100%; border-radius: var(--pill); background: var(--saida); }
.dia-fin { display: grid; gap: var(--s3); width: 100%; text-align: left; padding: var(--s4); border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line); }
.dia-fin-topo { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.dia-fin-valores { display: grid; text-align: right; font: 700 .92rem var(--font-display); }
.selos { display: flex; flex-wrap: wrap; gap: 6px; }
.selo { padding: 4px 10px; border-radius: var(--pill); font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.selo.bom { background: var(--accent-soft); color: var(--accent); }
.selo.aviso { background: var(--warn-soft); color: var(--warn); }
.selo.ruim { background: var(--danger-soft); color: var(--danger); }
.duvida-card { grid-template-columns: minmax(0, 1fr); gap: var(--s3); padding: var(--s4); border-color: rgb(255 191 60 / .35); }
.duvida-topo { display: flex; align-items: center; gap: var(--s3); }
.duvida-quem { flex: 1; min-width: 0; display: grid; }
.duvida-quem b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duvida-quem span { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duvida-topo .valor { font: 700 1.05rem var(--font-display); white-space: nowrap; }
.mov-icone.entrada { background: var(--accent-soft); color: var(--accent); }
.mov-icone.saida { background: var(--saida-soft); color: var(--saida); }
.duvida-pergunta { display: flex; align-items: center; gap: var(--s2); margin: 0; color: var(--warn); font-weight: 700; font-size: .9rem; }
.duvida-pergunta svg { width: 18px; height: 18px; }
.duvida-card .chips { padding-top: 0; }
.lembrar { display: flex; align-items: center; gap: var(--s2); font-size: .85rem; color: var(--muted); }
.lembrar input { width: 18px; height: 18px; accent-color: var(--accent); }
.folha-dia { max-height: 92vh; overflow-y: auto; gap: var(--s3); padding-top: var(--s5); }
.folha-topo { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.folha-topo h2 { font-size: 1.4rem; }
.conta { display: grid; gap: var(--s2); padding: var(--s4); border-radius: var(--r2); background: var(--surface-2); }
.conta div { display: flex; justify-content: space-between; font-size: .95rem; }
.conta span { color: var(--muted); }
.conta b { font-family: var(--font-display); }
.conta-total { border-top: 1px solid var(--line); padding-top: var(--s2); }
.conta-aviso { display: flex; gap: var(--s2); margin: var(--s2) 0 0; color: var(--danger); font-size: .88rem; font-weight: 700; }
.sub-secao { margin: var(--s3) 0 0; font: 600 .75rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.linhas { display: grid; gap: 2px; border-radius: var(--r2); overflow: hidden; }
.linhas > div { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--surface-2); }
.linhas b { font-family: var(--font-display); white-space: nowrap; }
.despesa-quem { display: grid; gap: 4px; min-width: 0; }
.despesa-quem small { color: var(--muted); }
.despesa-quem select { max-width: 100%; padding: 6px 8px; border-radius: var(--r1); border: 1px solid var(--line); background: var(--surface); font-size: 1rem; }
.acoes-dia { display: grid; gap: var(--s2); margin-top: var(--s3); }
.acoes-dia .btn-sec { margin-top: 0; }
.scanner-foto img:not([src]) { visibility: hidden; }
@media (min-width: 768px) { .kpis.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpis.tres .kpi-largo { grid-column: auto; } }
.folha-caixa { grid-template-columns: minmax(0, 1fr); }
.folha-caixa > * { min-width: 0; }
.despesa-quem select { width: 100%; }
.resultado-extrato { display: grid; gap: var(--s3); margin-top: var(--s3); padding: var(--s4); border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); animation: sobe .25s var(--ease-out); }
.res-topo { display: flex; justify-content: space-between; align-items: center; }
.res-topo .btn-icone { width: 36px; height: 36px; }
.res-linha { display: flex; gap: var(--s3); padding: var(--s3); border-radius: var(--r2); }
.res-linha > svg { margin-top: 2px; }
.res-linha p { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--s2) 0 0; }
.res-linha.bom { background: var(--accent-soft); color: var(--accent); }
.res-linha.aviso { background: var(--warn-soft); color: var(--warn); }
.res-linha b { color: var(--ink); }
.dia-chip { display: inline-block; padding: 3px 10px; border-radius: var(--pill); background: var(--surface-2); color: var(--ink); font: 700 .85rem var(--font-display); }
.res-linha small { align-self: center; margin: 0 6px 0 -2px; color: var(--muted); font-size: .75rem; }
.folha-pin { z-index: 70; background: var(--ground); }
.folha-pin input { font: 700 1.6rem var(--font-display); letter-spacing: .3em; text-align: center; }
#pinMsg.erro { color: var(--danger); font-weight: 700; }
/* Foto opcional: dois botões compactos lado a lado */
.foto-opcoes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.foto-opcao {
  display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: var(--s3) var(--s4); cursor: pointer;
  border-radius: var(--r2); border: 1px solid var(--line); background: var(--surface); font-weight: 700;
}
.foto-opcao-icone { width: 36px; height: 36px; border-radius: var(--r1); display: grid; place-items: center; background: var(--surface-2); color: var(--accent); flex: none; }
.foto-opcao-icone svg { width: 20px; height: 20px; }
.foto-opcao b { font-size: .95rem; }
.foto-opcoes + .nota { margin-top: var(--s2); }

/* Faltas */
.abas button span { font-size: .66rem; }
@media (min-width: 420px) { .abas button span { font-size: .72rem; } }
#btnNovaFalta { margin-bottom: var(--s2); }
.falta-resumo { display: grid; gap: var(--s2); padding: var(--s4); border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line); }
.falta-resumo.zerado { opacity: .7; }
.falta-resumo-topo { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.falta-resumo-topo b { font-size: 1.05rem; }
.falta-total { font: 700 1.3rem var(--font-display); color: var(--ink); white-space: nowrap; }
.falta-total.ruim { color: var(--danger); }
.falta-resumo.zerado .falta-total { font: 500 .9rem var(--font-text); color: var(--muted); }
.falta-partes { margin: 0; color: var(--muted); font-size: .9rem; }
.falta-datas { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--s1) 0 0; }
.falta-datas .dia-chip { font-size: .78rem; border: 1px solid rgb(255 91 79 / .35); }
.falta-datas .dia-chip.just { border-color: var(--line); color: var(--muted); }
.mov.falta .mov-icone { background: var(--danger-soft); color: var(--danger); }
.mov.falta.atestado .mov-icone, .mov.falta.outro .mov-icone { background: var(--surface-2); color: var(--muted); }
.item.equipe { padding: var(--s2) var(--s2) var(--s2) var(--s4); }
.chips.escolha button.sel, .segmentado.escolha-periodo button.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.segmentado.escolha-periodo { margin-bottom: 0; }
