/* TREND Estoque · branco de fundo, azul nos detalhes.
   Verde, laranja e vermelho só onde pede atenção (situação, alerta, erro). */
:root {
  --fundo: #ffffff;
  --fundo-2: #f5f7fa;
  --linha: #e4e8ef;
  --linha-forte: #cfd6e1;
  --texto: #0f172a;
  --texto-2: #475569;
  --texto-3: #8792a6;

  --azul: #1d4ed8;
  --azul-escuro: #1e3a8a;
  --azul-claro: #eef3fe;
  --azul-linha: #c9d8fb;

  --verde: #15803d;   --verde-claro: #eaf7ef;   --verde-linha: #b7e3c6;
  --laranja: #c2410c; --laranja-claro: #fff4ec; --laranja-linha: #fbd2b4;
  --vermelho: #b91c1c; --vermelho-claro: #fdeeee; --vermelho-linha: #f5c2c2;

  --raio: 14px;
  --raio-p: 10px;
  --sombra: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 1px rgba(15, 23, 42, .03);
  --sombra-alta: 0 12px 32px rgba(15, 23, 42, .14);
  --fonte: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --barra-inferior: 64px;
  --topo: 60px;
  --lateral: 232px;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { font-family: var(--fonte); background: var(--fundo-2); color: var(--texto); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--azul); text-decoration: none; }
.ic { flex-shrink: 0; display: block; }
.mono { font-family: var(--mono); letter-spacing: -.01em; }
.mut { color: var(--texto-2); }
.fraco { color: var(--texto-3); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Estrutura ───────────────────────────────────────────────── */
.app { min-height: 100%; display: flex; flex-direction: column; }
.topo {
  position: sticky; top: 0; z-index: 20; height: var(--topo); background: var(--fundo);
  border-bottom: 1px solid var(--linha); display: flex; align-items: center; gap: 12px; padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  height: calc(var(--topo) + env(safe-area-inset-top));
}
.topo-titulo { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marca { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.marca-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--azul); color: #fff; display: grid; place-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--azul-claro); color: var(--azul); font-weight: 800; font-size: .82rem; display: grid; place-items: center; border: 1px solid var(--azul-linha); }
.conteudo { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px 16px calc(var(--barra-inferior) + 24px + env(safe-area-inset-bottom)); }

.nav-inferior {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--fundo); border-top: 1px solid var(--linha);
  display: flex; height: calc(var(--barra-inferior) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
}
.nav-inferior a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--texto-3); font-size: .72rem; font-weight: 600; }
.nav-inferior a.on { color: var(--azul); }
.nav-inferior a.bipar-central .bola { width: 50px; height: 50px; margin-top: -22px; border-radius: 16px; background: var(--azul); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(29, 78, 216, .35); border: 4px solid var(--fundo); }
.nav-lateral { display: none; }

@media (min-width: 900px) {
  .app { flex-direction: row; }
  .nav-inferior { display: none; }
  .nav-lateral {
    display: flex; flex-direction: column; gap: 4px; width: var(--lateral); flex-shrink: 0; height: 100vh; position: sticky; top: 0;
    background: var(--fundo); border-right: 1px solid var(--linha); padding: 16px 12px;
  }
  .nav-lateral .marca { padding: 4px 8px 18px; }
  .nav-lateral a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--raio-p); color: var(--texto-2); font-weight: 600; font-size: .92rem; }
  .nav-lateral a:hover { background: var(--fundo-2); color: var(--texto); }
  .nav-lateral a.on { background: var(--azul-claro); color: var(--azul); }
  .nav-lateral .rodape { margin-top: auto; border-top: 1px solid var(--linha); padding-top: 12px; display: flex; align-items: center; gap: 10px; }
  .principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .conteudo { padding: 24px 28px 40px; }
  .topo { padding: 0 28px; }
  .so-celular { display: none !important; }
}
@media (max-width: 899px) { .so-desktop { display: none !important; } .principal { display: contents; } }

/* ── Componentes ─────────────────────────────────────────────── */
.cartao { background: var(--fundo); border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra); }
.cartao-p { padding: 16px; }
.titulo-sec { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.titulo-sec h2 { font-size: .8rem; font-weight: 700; color: var(--texto-2); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; }
.titulo-pag { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.sub-pag { color: var(--texto-2); margin-top: 2px; font-size: .92rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: var(--raio-p); font-weight: 650; font-size: .92rem; border: 1px solid transparent; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn-prim { background: var(--azul); color: #fff; }
.btn-prim:hover { background: var(--azul-escuro); }
.btn-sec { background: var(--fundo); border-color: var(--linha-forte); color: var(--texto); }
.btn-sec:hover { border-color: var(--azul-linha); background: var(--azul-claro); }
.btn-azul-claro { background: var(--azul-claro); color: var(--azul); }
.btn-perigo { background: var(--fundo); border-color: var(--vermelho-linha); color: var(--vermelho); }
.btn-p { height: 36px; padding: 0 12px; font-size: .85rem; }
.btn-bloco { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-icone { width: 40px; height: 40px; border-radius: var(--raio-p); display: grid; place-items: center; color: var(--texto-2); }
.btn-icone:hover { background: var(--fundo-2); color: var(--texto); }
.btn-redondo { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 23, 42, .55); color: #fff; }

.campo { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; background: var(--fundo); border: 1px solid var(--linha-forte); border-radius: var(--raio-p); color: var(--texto-3); }
.campo:focus-within { border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-claro); color: var(--azul); }
.campo input, .campo select { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: var(--texto); height: 100%; }
.campo input::placeholder { color: var(--texto-3); }
label.rot { display: block; font-size: .8rem; font-weight: 650; color: var(--texto-2); margin: 0 0 6px 2px; }
select.sel { height: 44px; border: 1px solid var(--linha-forte); border-radius: var(--raio-p); background: var(--fundo); padding: 0 12px; width: 100%; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--linha-forte); background: var(--fundo); font-weight: 600; font-size: .85rem; color: var(--texto-2); display: inline-flex; align-items: center; gap: 6px; }
.chip b { font-weight: 700; color: var(--texto-3); font-size: .78rem; }
.chip.on { background: var(--azul); border-color: var(--azul); color: #fff; }
.chip.on b { color: #c7d6fb; }

/* situações (só aqui entram as cores de atenção) */
.selo { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.selo .ic { width: 13px; height: 13px; }
.s-a_caminho { background: var(--azul-claro); color: var(--azul); }
.s-conferindo { background: var(--fundo); color: var(--azul); border-color: var(--azul-linha); }
.s-recebida, .s-paga { background: var(--verde-claro); color: var(--verde); }
.s-divergente, .s-vencida { background: var(--vermelho-claro); color: var(--vermelho); }
.s-atrasada, .s-vence_logo { background: var(--laranja-claro); color: var(--laranja); }
.s-cancelada, .s-neutro, .s-sem_duplicata, .s-desconhecido, .s-aberta, .s-antes { background: var(--fundo-2); color: var(--texto-2); }
.s-cancelada { text-decoration: line-through; }

.vazio { text-align: center; padding: 36px 16px; color: var(--texto-3); }
.vazio .ic { margin: 0 auto 10px; color: var(--linha-forte); }
.carregando { display: grid; place-items: center; padding: 40px; color: var(--texto-3); }
.giro { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--azul-claro); border-top-color: var(--azul); animation: giro .8s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }
.aviso-faixa { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--raio-p); font-size: .86rem; font-weight: 550; }
.aviso-faixa.azul { background: var(--azul-claro); color: var(--azul-escuro); }
.aviso-faixa.laranja { background: var(--laranja-claro); color: var(--laranja); }
.aviso-faixa.vermelho { background: var(--vermelho-claro); color: var(--vermelho); }

/* ── Login ───────────────────────────────────────────────────── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--fundo); }
.login-caixa { width: 100%; max-width: 380px; }
.login-caixa .marca { font-size: 1.35rem; margin-bottom: 6px; }
.login-caixa .marca-ic { width: 44px; height: 44px; border-radius: 12px; }
.login-caixa form { display: grid; gap: 14px; margin-top: 28px; }
.login-erro { color: var(--vermelho); font-size: .88rem; font-weight: 600; min-height: 20px; }
.demo-dica { margin-top: 24px; padding: 12px 14px; border-radius: var(--raio-p); background: var(--azul-claro); color: var(--azul-escuro); font-size: .84rem; }

/* ── Bipar ───────────────────────────────────────────────────── */
.local-atual { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; }
.local-atual .ic-caixa { width: 40px; height: 40px; border-radius: 11px; background: var(--azul-claro); color: var(--azul); display: grid; place-items: center; }
.local-atual small { display: block; font-size: .74rem; color: var(--texto-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.local-atual b { font-size: 1rem; }

.leitura { margin-top: 12px; padding: 18px; border-radius: var(--raio); background: var(--fundo); border: 1px solid var(--linha); box-shadow: var(--sombra); min-height: 120px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.leitura::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--linha); }
.leitura.ok::before, .leitura.fim::before { background: var(--verde); }
.leitura.atencao::before { background: var(--laranja); }
.leitura.erro::before { background: var(--vermelho); }
.leitura.fim { background: var(--verde-claro); border-color: var(--verde-linha); }
.leitura.atencao { background: var(--laranja-claro); border-color: var(--laranja-linha); }
.leitura.erro { background: var(--vermelho-claro); border-color: var(--vermelho-linha); }
.leitura.pulso { animation: pulso .28s ease-out; }
@keyframes pulso { from { transform: scale(.985); } to { transform: scale(1); } }
.leitura-topo { display: flex; align-items: center; gap: 12px; }
.leitura-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--fundo-2); color: var(--texto-3); flex-shrink: 0; }
.ok .leitura-ic, .fim .leitura-ic { background: var(--verde); color: #fff; }
.atencao .leitura-ic { background: var(--laranja); color: #fff; }
.erro .leitura-ic { background: var(--vermelho); color: #fff; }
.leitura-titulo { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.leitura-sub { color: var(--texto-2); font-size: .9rem; margin-top: 2px; }
.leitura-loja { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--raio-p); background: var(--fundo); border: 1px solid var(--linha); }
.leitura-loja .ic { color: var(--azul); }
.leitura-loja b { font-size: 1.15rem; letter-spacing: -.01em; }
.leitura-loja .caixa-num { margin-left: auto; text-align: right; }
.leitura-loja .caixa-num strong { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; display: block; }
.leitura-loja .caixa-num small { font-size: .7rem; color: var(--texto-3); font-weight: 700; text-transform: uppercase; }
.pontos { display: flex; gap: 6px; flex-wrap: wrap; }
.ponto { min-width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: var(--fundo-2); color: var(--texto-3); border: 1px solid var(--linha); }
.ponto.on { background: var(--verde); border-color: var(--verde); color: #fff; }
.ponto.novo { box-shadow: 0 0 0 3px var(--verde-linha); }
.barra { height: 8px; border-radius: 99px; background: var(--fundo-2); overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--azul); border-radius: 99px; transition: width .3s; }
.barra.verde i { background: var(--verde); }

.acoes-bipar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.btn-camera { height: 56px; font-size: 1rem; border-radius: var(--raio); }
.leitor-status { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: .8rem; color: var(--texto-3); margin-top: 10px; }
.leitor-status .luz { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 3px var(--verde-claro); }
.fila-offline { margin-top: 10px; }

.lista { display: flex; flex-direction: column; }
.lista > * + * { border-top: 1px solid var(--linha); }
.item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; width: 100%; text-align: left; background: var(--fundo); }
.item:hover { background: #fafbfd; }
.item-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--azul-claro); color: var(--azul); display: grid; place-items: center; flex-shrink: 0; }
.item-ic.verde { background: var(--verde-claro); color: var(--verde); }
.item-ic.laranja { background: var(--laranja-claro); color: var(--laranja); }
.item-ic.vermelho { background: var(--vermelho-claro); color: var(--vermelho); }
.item-ic.cinza { background: var(--fundo-2); color: var(--texto-3); }
.item-meio { flex: 1; min-width: 0; }
.item-l1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-l1 b { font-weight: 700; }
.item-l2 { color: var(--texto-2); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-l3 { color: var(--texto-3); font-size: .78rem; margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.item-l3 span { display: inline-flex; align-items: center; gap: 4px; }
.item-dir { padding-top: 1px; text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.item-dir b { font-weight: 700; }
.item .chev { color: var(--linha-forte); align-self: center; }
.item-ic { margin-top: 1px; }

/* ── Notas ───────────────────────────────────────────────────── */
.barra-filtros { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.barra-filtros > .campo { grid-column: 1 / -1; }
.filtros-linha { display: flex; gap: 8px; flex-wrap: wrap; }
.filtros-linha select { width: auto; flex: 1; min-width: 150px; }
@media (min-width: 900px) { .barra-filtros { grid-template-columns: 1fr auto auto; align-items: center; } .barra-filtros > .campo { grid-column: auto; } }
.resumo-lista { display: flex; gap: 14px; color: var(--texto-2); font-size: .84rem; margin: 4px 2px 10px; flex-wrap: wrap; }
.resumo-lista b { color: var(--texto); }

/* ── Detalhe ─────────────────────────────────────────────────── */
.det-cab { display: flex; align-items: flex-start; gap: 12px; }
.det-cab h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.det-cab .mut { font-size: .88rem; }
.grade-dados { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--linha); border-radius: var(--raio); overflow: hidden; border: 1px solid var(--linha); margin-top: 14px; }
.grade-dados > div { background: var(--fundo); padding: 12px 14px; min-width: 0; }
.grade-dados small { display: block; font-size: .72rem; color: var(--texto-3); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.grade-dados b { font-weight: 650; overflow-wrap: anywhere; }
@media (min-width: 900px) { .grade-dados { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.linha-tempo { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; padding: 16px; gap: 8px; }
.etapa { position: relative; text-align: center; font-size: .8rem; color: var(--texto-3); }
.etapa .bola { width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; background: var(--fundo-2); color: var(--texto-3); border: 2px solid var(--linha); position: relative; z-index: 1; }
.etapa::before { content: ''; position: absolute; top: 17px; left: -50%; right: 50%; height: 2px; background: var(--linha); }
.etapa:first-child::before { display: none; }
.etapa.feita .bola { background: var(--azul); border-color: var(--azul); color: #fff; }
.etapa.feita::before, .etapa.feita + .etapa.feita::before { background: var(--azul); }
.etapa.verde .bola { background: var(--verde); border-color: var(--verde); }
.etapa.laranja .bola { background: var(--laranja); border-color: var(--laranja); color: #fff; }
.etapa.vermelho .bola { background: var(--vermelho); border-color: var(--vermelho); color: #fff; }
.etapa b { display: block; color: var(--texto); font-size: .85rem; }

.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--linha); margin: 20px 0 14px; overflow-x: auto; scrollbar-width: none; }
.aba { height: 42px; padding: 0 14px; font-weight: 650; color: var(--texto-2); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.aba.on { color: var(--azul); border-bottom-color: var(--azul); }
.aba b { font-size: .75rem; background: var(--fundo-2); color: var(--texto-2); border-radius: 99px; padding: 1px 7px; }

.tabela-wrap { overflow-x: auto; }
table.tab { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tab th { text-align: left; font-size: .72rem; font-weight: 700; color: var(--texto-3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--linha); background: #fafbfd; white-space: nowrap; }
.tab td { padding: 11px 14px; border-bottom: 1px solid var(--linha); vertical-align: middle; }
.tab tr:last-child td { border-bottom: none; }
.tab .d { text-align: right; }
.tab.grade th:not(:first-child), .tab.grade td:not(:first-child) { text-align: center; }
.tab.grade td.zero { color: var(--linha-forte); }
.tab tfoot td { font-weight: 800; background: #fafbfd; }
.tam { border-bottom: 1px dashed var(--texto-3); cursor: help; }

.caixas-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.caixa-cartao { padding: 12px; border-radius: var(--raio-p); border: 1px dashed var(--linha-forte); background: var(--fundo); }
.caixa-cartao.on { border: 1px solid var(--verde-linha); background: var(--verde-claro); }
.caixa-cartao b { font-size: 1.05rem; display: flex; align-items: center; gap: 6px; }
.caixa-cartao small { display: block; color: var(--texto-2); font-size: .78rem; margin-top: 4px; }

.dup { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.dup-valor { font-weight: 800; font-size: 1.05rem; }

.tempo-lista { position: relative; padding-left: 26px; }
.tempo-lista::before { content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: var(--linha); }
.tempo-item { position: relative; padding: 8px 0 12px; }
.tempo-item .ic-t { position: absolute; left: -26px; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--fundo); border: 2px solid var(--azul); display: grid; place-items: center; color: var(--azul); }
.tempo-item b { font-weight: 650; }
.tempo-item small { display: block; color: var(--texto-3); font-size: .78rem; }

/* ── Painel ──────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { padding: 16px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.kpi-topo { display: flex; align-items: center; justify-content: space-between; color: var(--texto-2); font-size: .8rem; font-weight: 650; }
.kpi-topo .ic { color: var(--azul); }
.kpi-valor { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi-sub { font-size: .8rem; color: var(--texto-3); }
.kpi.atencao .kpi-valor { color: var(--laranja); }
.kpi.alerta .kpi-valor { color: var(--vermelho); }
.duas-col { display: grid; gap: 16px; }
@media (min-width: 900px) { .duas-col { grid-template-columns: 1fr 1fr; } }

/* ── Folhas (bottom sheet) e diálogos ────────────────────────── */
.veu { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: surge .15s; }
.folha { background: var(--fundo); width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); animation: sobe .2s ease-out; }
.folha::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--linha-forte); margin: 4px auto 12px; }
.folha h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
@media (min-width: 900px) { .veu { align-items: center; } .folha { border-radius: 18px; } .folha::before { display: none; } .folha { padding-top: 20px; } }
@keyframes sobe { from { transform: translateY(40px); opacity: .5; } }
@keyframes surge { from { opacity: 0; } }
.opcao { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 10px; border-radius: var(--raio-p); text-align: left; font-weight: 600; }
.opcao:hover { background: var(--fundo-2); }
.opcao.on { background: var(--azul-claro); color: var(--azul); }
.opcao .ic { color: var(--texto-3); }
.opcao.on .ic { color: var(--azul); }

.avisos { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--barra-inferior) + 16px + env(safe-area-inset-bottom)); z-index: 60; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 900px) { .avisos { bottom: 24px; } }
.aviso-t { background: var(--texto); color: #fff; padding: 12px 14px; border-radius: 12px; font-size: .88rem; font-weight: 550; display: flex; gap: 10px; align-items: center; box-shadow: var(--sombra-alta); animation: sobe .2s; }
.aviso-t.verde .ic { color: #86efac; } .aviso-t.vermelho .ic { color: #fca5a5; } .aviso-t.laranja .ic { color: #fdba74; }

/* ── Câmera ──────────────────────────────────────────────────── */
.camera { position: fixed; inset: 0; z-index: 70; background: #000; }
.camera video { width: 100%; height: 100%; object-fit: cover; }
.camera-mira { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.camera-mira span { width: min(78vw, 420px); height: 150px; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45); border: 3px solid #fff; position: relative; }
.camera-mira span::after { content: ''; position: absolute; left: 12px; right: 12px; top: 50%; height: 2px; background: #60a5fa; box-shadow: 0 0 10px #60a5fa; animation: varre 1.6s ease-in-out infinite alternate; }
@keyframes varre { from { transform: translateY(-50px); } to { transform: translateY(50px); } }
.camera.lido .camera-mira span { border-color: #4ade80; }
.camera-topo { position: absolute; top: 0; left: 0; right: 0; padding: calc(14px + env(safe-area-inset-top)) 14px 14px; display: flex; align-items: center; gap: 12px; }
.camera-dica { flex: 1; text-align: center; color: #fff; font-weight: 600; font-size: .92rem; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.camera-retorno { position: absolute; left: 14px; right: 14px; bottom: calc(24px + env(safe-area-inset-bottom)); background: #fff; border-radius: 16px; padding: 14px 16px; min-height: 64px; display: none; }
.camera-retorno.ok, .camera-retorno.fim, .camera-retorno.atencao, .camera-retorno.erro { display: block; }
.camera-retorno.fim, .camera-retorno.ok { border-left: 6px solid var(--verde); }
.camera-retorno.atencao { border-left: 6px solid var(--laranja); }
.camera-retorno.erro { border-left: 6px solid var(--vermelho); }

.modo-demo { background: var(--azul); color: #fff; text-align: center; font-size: .78rem; font-weight: 600; padding: 5px 10px; }
.modo-demo a { color: #fff; text-decoration: underline; }

@media print {
  .nav-lateral, .nav-inferior, .topo, .nao-imprimir, .modo-demo, .avisos { display: none !important; }
  body { background: #fff; } .conteudo { padding: 0; max-width: none; } .cartao { box-shadow: none; }
}

/* Cartão da câmera: o que foi lido, com a ação a um toque */
.camera.pausada .camera-mira span { border-color: #4ade80; }
.camera.pausada .camera-mira span::after { animation: none; opacity: 0; }
.camera-cartao { position: absolute; left: 10px; right: 10px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; max-height: 72vh; overflow: auto;
  background: var(--fundo); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--sombra-alta); animation: sobe .18s ease-out; border-top: 6px solid var(--azul); }
.camera-cartao[hidden] { display: none; }
.camera-cartao.ok, .camera-cartao.fim { border-top-color: var(--verde); }
.camera-cartao.atencao { border-top-color: var(--laranja); }
.camera-cartao.erro { border-top-color: var(--vermelho); }
.cc-topo { display: flex; align-items: center; gap: 12px; }
.cc-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--azul-claro); color: var(--azul); }
.ok .cc-ic, .fim .cc-ic { background: var(--verde); color: #fff; }
.atencao .cc-ic { background: var(--laranja); color: #fff; }
.erro .cc-ic { background: var(--vermelho); color: #fff; }
.cc-ic .ic-loader { animation: giro .8s linear infinite; }
.cc-titulo { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.cc-sub { color: var(--texto-2); font-size: .88rem; margin-top: 2px; }
.cc-topo .btn-redondo.claro { margin-left: auto; background: var(--fundo-2); color: var(--texto-2); }
.cc-nota { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--raio-p); background: var(--fundo-2); color: var(--azul); }
.cc-nota b { color: var(--texto); font-size: 1.1rem; }
.cc-botoes { display: flex; flex-direction: column; gap: 8px; }
.btn-ok { background: var(--verde); color: #fff; }
.btn-ok:hover { background: #166534; }
.btn-grande { height: auto; min-height: 64px; padding: 10px 16px; border-radius: var(--raio); font-size: 1.08rem; justify-content: flex-start; gap: 12px; }
.btn-grande span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.btn-grande small { font-weight: 500; font-size: .8rem; opacity: .9; }
.ponto.lida { background: var(--azul-claro); border-color: var(--azul); color: var(--azul); box-shadow: 0 0 0 3px var(--azul-linha); }
.ponto.on.lida { background: var(--verde); border-color: var(--verde); color: #fff; box-shadow: 0 0 0 3px var(--verde-linha); }
.cc-tempo { height: 3px; border-radius: 3px; background: var(--fundo-2); overflow: hidden; }
.cc-tempo i { display: block; height: 100%; background: var(--azul); animation: encolhe 3.5s linear forwards; }
@keyframes encolhe { from { width: 100%; } to { width: 0; } }
