/* =====================================================================
   NOVA ALIANÇA PERFUMARIA — Design System
   Mobile-first. Alvos de toque grandes. Alto contraste.
   ===================================================================== */

:root {
  --primaria: #7c3aed;
  --primaria-escura: #6d28d9;
  --primaria-clara: #ede9fe;
  --secundaria: #c026d3;
  --gradiente: linear-gradient(135deg, var(--primaria) 0%, var(--secundaria) 100%);

  --texto: #18181b;
  --texto-suave: #52525b;
  --texto-fraco: #a1a1aa;
  --fundo: #f4f4f5;
  --superficie: #ffffff;
  --borda: #e4e4e7;

  --ok: #16a34a;
  --ok-fundo: #dcfce7;
  --alerta: #ea580c;
  --alerta-fundo: #ffedd5;
  --erro: #dc2626;
  --erro-fundo: #fee2e2;
  --info: #0284c7;
  --info-fundo: #e0f2fe;

  --r: 14px;
  --r-p: 10px;
  --sombra: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --sombra-m: 0 4px 16px rgba(0,0,0,.10);
  --sombra-g: 0 12px 32px rgba(0,0,0,.16);

  --barra-inferior: 68px;
  --seguro-inferior: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  font-size: 16px;
  line-height: 1.5;
  overscroll-behavior-y: none;
}

img { max-width: 100%; display: block; }
a { color: var(--primaria); text-decoration: none; }

/* ---------------------------------------------------------------------
   LAYOUT
   --------------------------------------------------------------------- */
.app {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--fundo);
  padding-bottom: calc(var(--barra-inferior) + var(--seguro-inferior) + 16px);
}

.conteudo { padding: 16px; }
.conteudo-flush { padding: 0 0 16px; }

/* Cabeçalho fixo */
.topo {
  position: sticky; top: 0; z-index: 50;
  background: var(--gradiente);
  color: #fff;
  padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--sombra-m);
}
.topo h1 { font-size: 18px; font-weight: 700; flex: 1; letter-spacing: -.2px; }
.topo .sub { font-size: 12px; opacity: .85; font-weight: 400; display: block; }
.topo a, .topo button { color: #fff; }
.topo-btn {
  background: rgba(255,255,255,.18); border: 0; color: #fff;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
}
.topo-btn:active { background: rgba(255,255,255,.32); }

/* Barra inferior de navegação */
.nav-inferior {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--superficie);
  border-top: 1px solid var(--borda);
  display: flex;
  padding-bottom: var(--seguro-inferior);
  max-width: 720px; margin: 0 auto;
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}
.nav-inferior a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 10px 4px; color: var(--texto-fraco);
  font-size: 10.5px; font-weight: 600; min-height: var(--barra-inferior);
}
.nav-inferior a.ativo { color: var(--primaria); }
.nav-inferior a svg { width: 23px; height: 23px; }
.nav-inferior .destaque {
  position: relative;
}
.nav-inferior .destaque svg {
  background: var(--gradiente); color: #fff; width: 46px; height: 46px;
  border-radius: 50%; padding: 11px; margin-top: -18px;
  box-shadow: var(--sombra-m);
}

/* ---------------------------------------------------------------------
   CARTÕES E BLOCOS
   --------------------------------------------------------------------- */
.cartao {
  background: var(--superficie);
  border-radius: var(--r);
  box-shadow: var(--sombra);
  padding: 16px;
  margin-bottom: 12px;
}
.cartao-titulo {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--texto-suave); margin-bottom: 12px;
}

.grade { display: grid; gap: 12px; }
.grade-2 { grid-template-columns: repeat(2, 1fr); }
.grade-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 380px) { .grade-3 { grid-template-columns: repeat(2, 1fr); } }

/* Cartões de métrica do painel */
.metrica {
  background: var(--superficie); border-radius: var(--r);
  padding: 14px; box-shadow: var(--sombra);
  display: flex; flex-direction: column; gap: 2px;
}
.metrica .rotulo { font-size: 11.5px; color: var(--texto-suave); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.metrica .valor { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.metrica .nota { font-size: 12px; color: var(--texto-fraco); }
.metrica.destaque { background: var(--gradiente); color: #fff; }
.metrica.destaque .rotulo, .metrica.destaque .nota { color: rgba(255,255,255,.85); }

/* ---------------------------------------------------------------------
   BOTÕES
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--r-p); cursor: pointer;
  font-size: 15px; font-weight: 600; font-family: inherit;
  padding: 13px 18px; min-height: 48px;
  background: var(--primaria); color: #fff;
  transition: transform .08s ease, filter .15s ease;
  text-align: center;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 19px; height: 19px; flex-shrink: 0; }

.btn-bloco { width: 100%; }
.btn-grande { min-height: 56px; font-size: 17px; font-weight: 700; }
.btn-pequeno { min-height: 38px; padding: 8px 12px; font-size: 13.5px; }

.btn-contorno { background: var(--superficie); color: var(--primaria); box-shadow: inset 0 0 0 1.5px var(--primaria); }
.btn-neutro { background: var(--superficie); color: var(--texto); box-shadow: inset 0 0 0 1px var(--borda); }
.btn-verde { background: var(--ok); }
.btn-vermelho { background: var(--erro); }
.btn-laranja { background: var(--alerta); }
.btn-escuro { background: #27272a; }
.btn-gradiente { background: var(--gradiente); }

.acoes { display: flex; gap: 10px; }
.acoes .btn { flex: 1; }

/* Botão flutuante */
.fab {
  position: fixed; right: 16px;
  bottom: calc(var(--barra-inferior) + var(--seguro-inferior) + 16px);
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--gradiente); color: #fff; border: 0;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--sombra-g); z-index: 55;
}
.fab svg { width: 26px; height: 26px; }
@media (min-width: 752px) { .fab { right: calc(50% - 360px + 16px); } }

/* ---------------------------------------------------------------------
   FORMULÁRIOS
   --------------------------------------------------------------------- */
.campo { margin-bottom: 14px; }
.campo label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--texto-suave); margin-bottom: 6px;
}
.campo .dica { font-size: 12px; color: var(--texto-fraco); margin-top: 4px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], input[type="date"], input[type="search"], input[type="url"],
select, textarea {
  width: 100%; font-family: inherit; font-size: 16px; /* 16px evita zoom no iOS */
  padding: 13px 14px; min-height: 48px;
  border: 1.5px solid var(--borda); border-radius: var(--r-p);
  background: var(--superficie); color: var(--texto);
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2352525b' stroke-width='2.5' stroke-linecap='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  padding-right: 40px;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }

input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--primaria);
  box-shadow: 0 0 0 3px var(--primaria-clara);
}

.campo-linha { display: flex; gap: 10px; }
.campo-linha .campo { flex: 1; }

/* Campo com prefixo R$ */
.campo-moeda { position: relative; }
.campo-moeda span {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--texto-fraco); font-weight: 600; font-size: 15px; pointer-events: none;
}
.campo-moeda input { padding-left: 42px; font-weight: 700; }

/* Interruptor */
.switch { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.switch input { display: none; }
.switch .trilho {
  width: 50px; height: 30px; border-radius: 15px; background: #d4d4d8;
  position: relative; transition: background .2s ease; flex-shrink: 0;
}
.switch .trilho::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%; background: #fff;
  transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .trilho { background: var(--ok); }
.switch input:checked + .trilho::after { transform: translateX(20px); }
.switch .rotulo { font-size: 15px; font-weight: 500; }

/* Busca */
.busca { position: relative; margin-bottom: 12px; }
.busca input { padding-left: 44px; }
.busca svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--texto-fraco); pointer-events: none;
}
.busca .limpar {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: 8px; color: var(--texto-fraco); cursor: pointer;
}

/* ---------------------------------------------------------------------
   LISTAS DE PRODUTOS
   --------------------------------------------------------------------- */
.lista { display: flex; flex-direction: column; gap: 10px; }

.item {
  background: var(--superficie); border-radius: var(--r);
  box-shadow: var(--sombra); padding: 12px;
  display: flex; gap: 12px; align-items: center;
}
.item .foto {
  width: 62px; height: 62px; border-radius: var(--r-p);
  object-fit: cover; background: var(--fundo); flex-shrink: 0;
}
.item .info { flex: 1; min-width: 0; }
.item .nome {
  font-size: 15px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.item .meta { font-size: 12.5px; color: var(--texto-fraco); margin-top: 3px; }
.item .preco { font-size: 17px; font-weight: 800; color: var(--primaria); margin-top: 4px; }
.item .preco small { font-size: 12px; color: var(--texto-fraco); font-weight: 500; text-decoration: line-through; margin-left: 6px; }
.item .lado { text-align: right; flex-shrink: 0; }

/* Etiquetas */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: .3px;
}
.tag-ok { background: var(--ok-fundo); color: #15803d; }
.tag-baixo { background: var(--alerta-fundo); color: #c2410c; }
.tag-esgotado { background: var(--erro-fundo); color: #b91c1c; }
.tag-livre { background: var(--info-fundo); color: #0369a1; }
.tag-cinza { background: var(--fundo); color: var(--texto-suave); }
.tag-roxa { background: var(--primaria-clara); color: var(--primaria-escura); }

/* ---------------------------------------------------------------------
   EDIÇÃO RÁPIDA DE PREÇOS
   --------------------------------------------------------------------- */
.preco-linha {
  background: var(--superficie); border-radius: var(--r);
  box-shadow: var(--sombra); padding: 12px; margin-bottom: 10px;
}
.preco-linha .cabeca { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.preco-linha .cabeca img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--fundo); }
.preco-linha .cabeca .nome { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.25; }
.preco-linha .campos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preco-linha .campos label { font-size: 11px; font-weight: 700; color: var(--texto-fraco); text-transform: uppercase; }
.preco-linha input { min-height: 44px; font-weight: 700; font-size: 15px; text-align: right; }
.preco-linha input.alterado { border-color: var(--alerta); background: #fffbeb; }
.preco-linha .margem { font-size: 12px; color: var(--texto-suave); margin-top: 8px; text-align: right; }

/* Barra de salvar fixa */
.barra-salvar {
  position: fixed; left: 0; right: 0;
  bottom: calc(var(--barra-inferior) + var(--seguro-inferior));
  max-width: 720px; margin: 0 auto; padding: 10px 16px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--borda); z-index: 58;
  display: flex; gap: 10px; align-items: center;
  transform: translateY(130%); transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.barra-salvar.visivel { transform: translateY(0); }
.barra-salvar .contagem { font-size: 13px; font-weight: 700; color: var(--alerta); white-space: nowrap; }
.barra-salvar .btn { flex: 1; }

/* ---------------------------------------------------------------------
   PDV
   --------------------------------------------------------------------- */
.pdv-carrinho { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }

.pdv-item {
  background: var(--superficie); border-radius: var(--r-p);
  box-shadow: var(--sombra); padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
}
.pdv-item .nome { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.3; min-width: 0; }
.pdv-item .nome small { display: block; font-weight: 500; color: var(--texto-fraco); font-size: 12px; }
.pdv-item .total { font-weight: 800; font-size: 15px; white-space: nowrap; }

.qtd { display: flex; align-items: center; gap: 2px; background: var(--fundo); border-radius: 8px; padding: 2px; }
.qtd button {
  width: 34px; height: 34px; border: 0; background: var(--superficie);
  border-radius: 6px; font-size: 19px; font-weight: 700; color: var(--primaria);
  cursor: pointer; display: grid; place-items: center; box-shadow: var(--sombra);
}
.qtd button:active { background: var(--primaria-clara); }
.qtd .n { min-width: 34px; text-align: center; font-weight: 700; font-size: 15px; }

/* Resumo do total */
.pdv-total {
  background: var(--gradiente); color: #fff;
  border-radius: var(--r); padding: 16px; margin-bottom: 12px;
  box-shadow: var(--sombra-m);
}
.pdv-total .linha { display: flex; justify-content: space-between; font-size: 14px; opacity: .9; margin-bottom: 4px; }
.pdv-total .grande { font-size: 30px; font-weight: 800; letter-spacing: -1px; display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.pdv-total .grande span:first-child { font-size: 14px; opacity: .9; font-weight: 600; }

/* Scanner */
#leitor { width: 100%; border-radius: var(--r); overflow: hidden; background: #000; }
#leitor video { width: 100% !important; height: auto !important; display: block; }
.scanner-caixa {
  position: relative; border-radius: var(--r); overflow: hidden;
  background: #000; margin-bottom: 12px;
}
.scanner-mira {
  position: absolute; inset: 22% 12%; border: 3px solid rgba(255,255,255,.9);
  border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.35);
}
.scanner-mira::after {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px;
  background: #22d3ee; box-shadow: 0 0 12px #22d3ee;
  animation: varre 2s ease-in-out infinite;
}
@keyframes varre { 0%,100% { top: 8%; } 50% { top: 92%; } }

/* Grade de formas de pagamento */
.pagamentos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pagamentos button {
  background: var(--superficie); border: 1.5px solid var(--borda);
  border-radius: var(--r-p); padding: 12px 6px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: var(--texto-suave);
  font-family: inherit; min-height: 74px;
}
.pagamentos button svg { width: 22px; height: 22px; }
.pagamentos button.ativo {
  border-color: var(--primaria); background: var(--primaria-clara); color: var(--primaria-escura);
}

/* Teclado numérico */
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.teclado button {
  background: var(--superficie); border: 0; border-radius: var(--r-p);
  padding: 16px; font-size: 22px; font-weight: 700; font-family: inherit;
  box-shadow: var(--sombra); cursor: pointer; color: var(--texto);
}
.teclado button:active { background: var(--primaria-clara); }
.teclado button.acao { background: var(--fundo); font-size: 15px; color: var(--texto-suave); }

/* ---------------------------------------------------------------------
   MODAL / FOLHA INFERIOR
   --------------------------------------------------------------------- */
.folha-fundo {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 90; opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.folha-fundo.aberta { opacity: 1; pointer-events: auto; }

.folha {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  max-width: 720px; margin: 0 auto;
  background: var(--superficie);
  border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(20px + var(--seguro-inferior));
  max-height: 92vh; overflow-y: auto;
  transform: translateY(100%); transition: transform .28s cubic-bezier(.32,.72,0,1);
  box-shadow: var(--sombra-g);
}
.folha.aberta { transform: translateY(0); }
.folha .puxador {
  width: 40px; height: 4px; background: var(--borda); border-radius: 2px;
  margin: 6px auto 14px;
}
.folha h2 { font-size: 19px; font-weight: 700; margin-bottom: 14px; }

/* ---------------------------------------------------------------------
   AVISOS
   --------------------------------------------------------------------- */
.aviso {
  padding: 12px 14px; border-radius: var(--r-p); margin-bottom: 12px;
  font-size: 14px; font-weight: 500; display: flex; gap: 10px; align-items: flex-start;
  line-height: 1.4;
}
.aviso svg { width: 19px; height: 19px; flex-shrink: 0; margin-top: 1px; }
.aviso-ok { background: var(--ok-fundo); color: #15803d; }
.aviso-erro { background: var(--erro-fundo); color: #b91c1c; }
.aviso-alerta { background: var(--alerta-fundo); color: #c2410c; }
.aviso-info { background: var(--info-fundo); color: #0369a1; }

/* Estado vazio */
.vazio { text-align: center; padding: 48px 24px; color: var(--texto-fraco); }
.vazio svg { width: 56px; height: 56px; margin: 0 auto 14px; opacity: .35; }
.vazio p { font-size: 15px; margin-bottom: 18px; }

/* Notificação flutuante */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(-24px);
  top: calc(16px + env(safe-area-inset-top, 0px)); z-index: 200;
  background: #18181b; color: #fff; padding: 12px 20px; border-radius: 30px;
  font-size: 14px; font-weight: 600; box-shadow: var(--sombra-g);
  opacity: 0; pointer-events: none; transition: all .25s ease;
  max-width: 88vw; text-align: center;
}
.toast.visivel { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: var(--ok); }
.toast.erro { background: var(--erro); }

/* ---------------------------------------------------------------------
   ABAS
   --------------------------------------------------------------------- */
.abas {
  display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.abas::-webkit-scrollbar { display: none; }
.abas a, .abas button {
  white-space: nowrap; padding: 9px 15px; border-radius: 30px;
  background: var(--superficie); color: var(--texto-suave);
  font-size: 13.5px; font-weight: 600; border: 1px solid var(--borda);
  cursor: pointer; font-family: inherit;
}
.abas a.ativo, .abas button.ativo {
  background: var(--primaria); color: #fff; border-color: var(--primaria);
}

/* ---------------------------------------------------------------------
   TABELA (relatórios)
   --------------------------------------------------------------------- */
.tabela-rolagem { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tabela th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--texto-fraco); padding: 8px 10px; border-bottom: 1.5px solid var(--borda);
  white-space: nowrap;
}
table.tabela td { padding: 11px 10px; border-bottom: 1px solid var(--borda); }
table.tabela tr:last-child td { border-bottom: 0; }
table.tabela .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Barra de progresso simples */
.barra { height: 7px; background: var(--fundo); border-radius: 4px; overflow: hidden; }
.barra > div { height: 100%; background: var(--gradiente); border-radius: 4px; }

/* ---------------------------------------------------------------------
   LOJA PÚBLICA
   --------------------------------------------------------------------- */
.vitrine { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .vitrine { grid-template-columns: repeat(3, 1fr); } }

.produto-card {
  background: var(--superficie); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--sombra); display: flex; flex-direction: column;
}
.produto-card .capa { aspect-ratio: 1; object-fit: cover; width: 100%; background: var(--fundo); }
.produto-card .corpo { padding: 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.produto-card .marca { font-size: 10.5px; font-weight: 700; color: var(--texto-fraco); text-transform: uppercase; letter-spacing: .4px; }
.produto-card .nome {
  font-size: 13.5px; font-weight: 600; line-height: 1.3; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.produto-card .preco { font-size: 17px; font-weight: 800; color: var(--primaria); }
.produto-card .antigo { font-size: 12px; color: var(--texto-fraco); text-decoration: line-through; }
.produto-card .selo {
  position: absolute; top: 8px; left: 8px; background: var(--erro); color: #fff;
  font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 20px;
}
.produto-card .capa-area { position: relative; }

/* Galeria do produto */
.galeria { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; background: #fff; }
.galeria img { width: 100%; flex-shrink: 0; scroll-snap-align: center; aspect-ratio: 1; object-fit: contain; }
.galeria-pontos { display: flex; justify-content: center; gap: 6px; padding: 10px; }
.galeria-pontos span { width: 7px; height: 7px; border-radius: 50%; background: var(--borda); }
.galeria-pontos span.ativo { background: var(--primaria); width: 20px; border-radius: 4px; }

/* Conteúdo rico vindo da importação */
.conteudo-rico { font-size: 15px; line-height: 1.65; color: var(--texto-suave); }
.conteudo-rico p { margin-bottom: 12px; }
.conteudo-rico ul, .conteudo-rico ol { margin: 0 0 12px 20px; }
.conteudo-rico li { margin-bottom: 6px; }
.conteudo-rico h2, .conteudo-rico h3 { font-size: 16px; font-weight: 700; color: var(--texto); margin: 16px 0 8px; }
.conteudo-rico strong { color: var(--texto); }
.conteudo-rico img { border-radius: var(--r-p); margin: 12px 0; }

/* Ficha técnica */
.ficha { display: flex; flex-direction: column; gap: 0; }
.ficha .linha { display: flex; padding: 11px 0; border-bottom: 1px solid var(--borda); font-size: 14px; gap: 12px; }
.ficha .linha:last-child { border-bottom: 0; }
.ficha .rotulo { color: var(--texto-fraco); min-width: 118px; font-weight: 500; }
.ficha .valor { font-weight: 600; flex: 1; }

/* Barra fixa de compra */
.barra-compra {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-width: 720px; margin: 0 auto;
  background: var(--superficie); border-top: 1px solid var(--borda);
  padding: 12px 16px calc(12px + var(--seguro-inferior));
  display: flex; gap: 12px; align-items: center;
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
}
.barra-compra .valor { flex-shrink: 0; }
.barra-compra .valor .p { font-size: 20px; font-weight: 800; color: var(--primaria); line-height: 1.1; }
.barra-compra .valor .l { font-size: 11px; color: var(--texto-fraco); }
.barra-compra .btn { flex: 1; }

/* ---------------------------------------------------------------------
   IMPRESSÃO — recibo térmico 58mm/80mm
   --------------------------------------------------------------------- */
@media print {
  body { background: #fff; }
  .nao-imprime, .topo, .nav-inferior, .fab, .barra-salvar, .barra-compra { display: none !important; }
  .app { padding: 0; max-width: 100%; }
  .recibo { width: 100%; max-width: 80mm; margin: 0 auto; font-family: "Courier New", monospace; font-size: 12px; }
  .cartao { box-shadow: none; border: 0; padding: 0; }
}

.recibo { font-family: "Courier New", Courier, monospace; font-size: 13px; line-height: 1.45; }
.recibo .centro { text-align: center; }
.recibo .div { border-top: 1px dashed #999; margin: 8px 0; }
.recibo .linha { display: flex; justify-content: space-between; gap: 8px; }
.recibo .grande { font-size: 16px; font-weight: 700; }

/* ---------------------------------------------------------------------
   UTILITÁRIOS
   --------------------------------------------------------------------- */
.centro { text-align: center; }
.direita { text-align: right; }
.flex { display: flex; }
.flex-entre { display: flex; justify-content: space-between; align-items: center; }
.flex-centro { display: flex; align-items: center; gap: 8px; }
.flex-1 { flex: 1; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.pequeno { font-size: 13px; }
.mini { font-size: 11.5px; }
.suave { color: var(--texto-suave); }
.fraco { color: var(--texto-fraco); }
.forte { font-weight: 700; }
.negrito { font-weight: 800; }
.verde { color: var(--ok); }
.vermelho { color: var(--erro); }
.laranja { color: var(--alerta); }
.roxo { color: var(--primaria); }
.esconde { display: none !important; }
.rolagem-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.truncar { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Carregando */
.girando { animation: gira 1s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

.esqueleto {
  background: linear-gradient(90deg, #e4e4e7 25%, #f4f4f5 50%, #e4e4e7 75%);
  background-size: 200% 100%; animation: brilho 1.4s ease infinite; border-radius: var(--r-p);
}
@keyframes brilho { to { background-position: -200% 0; } }
