:root {
  --azul: #0a4fa8;
  --azul-escuro: #073a7d;
  --vermelho: #d7191f;
  --fundo: #ffffff;
  --cinza: #eef0f4;
  --texto: #1d2433;
  --suave: #6b7383;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fundo); color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
[hidden] { display: none !important; }

.topo { background: linear-gradient(180deg, var(--azul) 0%, var(--azul-escuro) 100%);
  color: #fff; text-align: center; padding: 14px 16px 12px; border-radius: 0 0 18px 18px; }
.topo img { max-height: 64px; max-width: 80%; display: block; margin: 0 auto; }
.marca { font-weight: 900; font-style: italic; font-size: 30px; letter-spacing: 1px; line-height: 1.05; }
.marca span { display: block; font-size: 15px; background: var(--vermelho); border-radius: 10px;
  padding: 2px 10px; width: max-content; margin: 2px auto 0; }
.subtitulo { font-size: 13px; margin-top: 4px; opacity: .95; }

.conteudo { max-width: 520px; margin: 0 auto; padding: 16px; }
.painel { background: var(--cinza); border-radius: 16px; min-height: 300px; display: flex;
  align-items: stretch; justify-content: center; padding: 18px; }
.estado { display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; width: 100%; color: var(--suave); }
.estado p { margin: 10px 0 0; max-width: 260px; }
.icone-barras { width: 52px; height: 52px; color: #8a93a3; }

.produto .descricao { color: var(--texto); font-size: 22px; font-weight: 700; line-height: 1.25; }
.produto .preco { color: var(--azul); font-size: 56px; font-weight: 900; margin: 14px 0 6px; line-height: 1; }
.produto .preco small { font-size: 26px; font-weight: 800; margin-right: 4px; }
.produto .preco.zerado { color: var(--vermelho); font-size: 34px; }
.produto .codigo { font-size: 14px; color: var(--suave); letter-spacing: 1px; }
.nao-encontrado .titulo { color: var(--vermelho); font-weight: 800; font-size: 20px; }

.resultados { width: 100%; align-self: flex-start; max-height: 60vh; overflow-y: auto; }
.lista { width: 100%; list-style: none; margin: 0; padding: 0; }
.lista li button { width: 100%; display: flex; justify-content: space-between; gap: 12px; align-items: center;
  background: #fff; border: 0; border-radius: 10px; padding: 12px; margin-bottom: 8px; text-align: left;
  font: inherit; color: var(--texto); cursor: pointer; }
.lista li button:active { background: #dfe6f3; }
.lista .nome { font-size: 15px; }
.lista .valor { font-weight: 800; color: var(--azul); white-space: nowrap; }
.lista .valor.zerado { color: var(--vermelho); font-size: 13px; }
.lista-info { font-size: 13px; color: var(--suave); margin: 0 0 8px; }

.busca { margin: 14px 0 10px; }
.busca input { width: 100%; font-size: 18px; padding: 14px 18px; border-radius: 30px;
  border: 1.5px solid #d3d8e1; outline: none; background: #fff; }
.busca input:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(10,79,168,.15); }
.botao { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--azul); color: #fff; border: 0; border-radius: 30px; padding: 15px; font-size: 17px;
  font-weight: 700; cursor: pointer; }
.botao svg { width: 22px; height: 22px; }
.botao:active { background: var(--azul-escuro); }
.botao.secundario { background: #fff; color: var(--azul); border: 1.5px solid var(--azul); margin-top: 12px; }
.rodape { text-align: center; color: var(--suave); font-size: 12px; margin: 12px 0 0; }
.rodape.alerta { color: var(--vermelho); }

.carregando::after { content: ""; width: 34px; height: 34px; border-radius: 50%;
  border: 4px solid #cfd6e3; border-top-color: var(--azul); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

.camera { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center;
  justify-content: center; padding: 16px; z-index: 10; }
.camera-caixa { width: 100%; max-width: 480px; }
#leitor { width: 100%; border-radius: 12px; overflow: hidden; background: #000; }
.camera-dica { color: #fff; text-align: center; margin: 12px 0 0; }
