/* Outlet Grupo Casa Modelo — PDV (mobile-first) */
:root {
  --azul: #303889;
  --azul-escuro: #232a6b;
  --laranja: #BD5022;
  --laranja-claro: #fbe9e0;
  --fundo: #F3F4FA;
  --branco: #fff;
  --texto: #1f2233;
  --texto-suave: #6b6f85;
  --borda: #dfe1ee;
  --verde: #2e8b57;
  --vermelho: #c0272d;
  --amarelo: #e3a81b;
  --raio: 14px;
  --sombra: 0 2px 10px rgba(48, 56, 137, .08);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--fundo); color: var(--texto);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.35; }
body { overscroll-behavior-y: contain; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0 0 8px; color: var(--azul); }
h1 { font-size: 1.35rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 8px; }
.suave { color: var(--texto-suave); }
.pequeno { font-size: .85rem; }
.centro { text-align: center; }
.direita { text-align: right; }
.laranja { color: var(--laranja); }
.verde { color: var(--verde); }
.vermelho { color: var(--vermelho); }
.negrito { font-weight: 700; }
.riscado { text-decoration: line-through; }
.mt { margin-top: 12px; } .mb { margin-bottom: 12px; }
.linha { display: flex; align-items: center; gap: 8px; }
.entre { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
[hidden] { display: none !important; }

.carregando { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }

/* ---------- topo / nav ---------- */
.topo { position: sticky; top: 0; z-index: 20; background: var(--branco); border-bottom: 1px solid var(--borda);
  padding: 8px 14px; display: flex; align-items: center; gap: 10px; min-height: 56px; }
.topo .topo-tag { height: 30px; width: 30px; object-fit: contain; }
.topo .topo-marca { font-weight: 800; color: var(--azul); font-size: 1rem; line-height: 1; letter-spacing: .3px; white-space: nowrap; }
.topo .topo-marca small { display: block; font-size: .62rem; font-weight: 700; color: var(--laranja); letter-spacing: 1px; text-transform: uppercase; }
.topo .titulo { font-weight: 600; color: var(--texto-suave); flex: 1; font-size: .95rem; padding-left: 8px; border-left: 1px solid var(--borda); margin-left: 4px; }

/* banner "Baixar app" (PWA) */
.instalar { background: var(--azul); color: #fff; border-radius: var(--raio); padding: 10px 12px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.instalar img { width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; background: #fff; padding: 3px; object-fit: contain; margin: 0; }
.instalar .txt { flex: 1; font-size: .85rem; line-height: 1.3; }
.instalar .txt b { display: block; font-size: .95rem; }
.instalar .btn { min-height: 40px; padding: 6px 12px; background: var(--laranja); }
.instalar .fechar { background: none; border: 0; color: #fff; font-size: 1.2rem; padding: 4px 6px; opacity: .8; }
.selo { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.selo-teste { background: #fff3cd; color: #8a6100; }
.selo-off { background: #fde2e2; color: var(--vermelho); }
.selo-fila { background: var(--laranja-claro); color: var(--laranja); }
.selo-ok { background: #e3f5ea; color: var(--verde); }
.selo-azul { background: #e6e8f7; color: var(--azul); }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--branco);
  border-top: 1px solid var(--borda); display: flex; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); }
.nav button { flex: 1; border: 0; background: none; color: var(--texto-suave); font-size: .72rem; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.nav button .ico { font-size: 1.35rem; line-height: 1; }
.nav button.ativo { color: var(--azul); }

.conteudo { padding: 14px 14px calc(var(--nav-h) + var(--safe-b) + 14px); max-width: 640px; margin: 0 auto; }
.conteudo.com-rodape { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 190px); }

/* ---------- cards ---------- */
.card { background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra); padding: 14px; margin-bottom: 12px; }
.card.destaque { border: 2px solid var(--laranja); background: #fffaf7; }
.card.aviso { background: #fff8e6; border: 1px solid #f3d98b; }
.card.erro { background: #fdecec; border: 1px solid #f1b5b5; color: var(--vermelho); }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 16px;
  border-radius: 12px; border: 2px solid transparent; font-weight: 700; font-size: 1rem; background: var(--azul); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-laranja { background: var(--laranja); }
.btn-verde { background: var(--verde); }
.btn-vermelho { background: var(--vermelho); }
.btn-claro { background: var(--branco); color: var(--azul); border-color: var(--borda); }
.btn-claro.sel { border-color: var(--laranja); background: var(--laranja-claro); color: var(--laranja); }
.btn-texto { background: none; color: var(--azul); border: 0; min-height: 40px; padding: 6px 10px; font-weight: 600; }
.btn-texto.vermelho { color: var(--vermelho); }
.btn-bloco { width: 100%; }
.btn-grande { min-height: 58px; font-size: 1.15rem; }
.btn-pq { min-height: 38px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }

/* ---------- formulários ---------- */
label.campo { display: block; margin-bottom: 12px; }
label.campo span { display: block; font-size: .85rem; font-weight: 600; color: var(--texto-suave); margin-bottom: 4px; }
.input { width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--borda); border-radius: 12px; background: #fff; font-size: 1.05rem; }
.input:focus { outline: none; border-color: var(--azul); }
.input-dinheiro { font-size: 1.5rem; font-weight: 700; text-align: right; }
.input-erro { border-color: var(--vermelho); }
select.input { appearance: none; -webkit-appearance: none; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { width: 22px; height: 22px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 18px; }
.login > img { width: min(300px, 80vw); margin-bottom: 4px; }
.login .sub { color: var(--texto-suave); font-weight: 700; letter-spacing: 1.5px; font-size: .8rem; margin-bottom: 20px; }
.login form { width: 100%; max-width: 360px; }
.login .instalar { width: 100%; max-width: 360px; margin-top: 18px; }
.logo-carregando { width: min(280px, 80vw); }

/* ---------- venda ---------- */
.produto { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--branco);
  border-radius: var(--raio); box-shadow: var(--sombra); margin-bottom: 10px; }
.produto.tem { border: 2px solid var(--azul); }
.etq { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12); background: #fff; }
.etq-cor { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .7rem; text-align: center; line-height: 1.1; }
.produto .info { flex: 1; min-width: 0; }
.produto .nome { font-weight: 700; color: var(--azul); font-size: .98rem; }
.produto .precos { font-size: .82rem; color: var(--texto-suave); }
.produto .precos b { color: var(--laranja); font-size: .95rem; }
.produto .precos .p1 { margin-right: 8px; }
.produto .precos .p1.riscado { color: #a0a3b5; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 48px; height: 48px; border-radius: 12px; border: 0; font-size: 1.5rem; font-weight: 700;
  background: #e9ebf6; color: var(--azul); }
.stepper button.mais { background: var(--azul); color: #fff; }
.stepper .qtd { min-width: 34px; text-align: center; font-size: 1.35rem; font-weight: 800; }

.rodape { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 19;
  background: var(--branco); border-top: 1px solid var(--borda); box-shadow: 0 -4px 14px rgba(0,0,0,.08); }
.rodape .dentro { max-width: 640px; margin: 0 auto; padding: 10px 14px; }
.rodape .totais { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.rodape .pecas { font-size: .85rem; color: var(--texto-suave); }
.rodape .cheio { font-size: .9rem; color: #a0a3b5; }
.rodape .pagar { font-size: 1.7rem; font-weight: 800; color: var(--laranja); line-height: 1.1; }
.rodape .economia { font-size: .8rem; color: var(--verde); font-weight: 700; }
.dica { background: #fff8e6; border: 1px dashed #e0b84a; color: #7a5a00; border-radius: 10px; padding: 8px 10px; font-size: .88rem; font-weight: 600; margin-bottom: 8px; }

/* ---------- bottom sheet ---------- */
.sheet-fundo { position: fixed; inset: 0; background: rgba(20, 24, 60, .55); z-index: 40; display: flex; align-items: flex-end; }
.sheet { background: var(--fundo); width: 100%; max-width: 640px; margin: 0 auto; border-radius: 20px 20px 0 0;
  max-height: 94vh; overflow-y: auto; padding: 8px 14px calc(16px + var(--safe-b)); }
.sheet .alca { width: 44px; height: 5px; border-radius: 3px; background: #c9cbe0; margin: 4px auto 10px; }
.sheet .cabeca { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.formas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.forma { min-height: 62px; border-radius: 12px; border: 2px solid var(--borda); background: #fff; color: var(--azul);
  font-weight: 700; font-size: 1.05rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.forma .ico { font-size: 1.4rem; }
.forma.sel { border-color: var(--laranja); background: var(--laranja-claro); color: var(--laranja); }
.opcoes-credito { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opc { border: 2px solid var(--borda); border-radius: 12px; background: #fff; padding: 10px 6px; text-align: center; min-height: 84px; }
.opc.sel { border-color: var(--laranja); background: var(--laranja-claro); }
.opc .n { font-weight: 800; color: var(--azul); font-size: 1.05rem; }
.opc .v { font-weight: 800; color: var(--laranja); font-size: 1.05rem; }
.opc .t { font-size: .72rem; color: var(--texto-suave); }
.rapidos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.troco { font-size: 2rem; font-weight: 800; color: var(--verde); text-align: center; }
.troco.neg { color: var(--vermelho); font-size: 1.1rem; }
.resumo-total { background: var(--azul); color: #fff; border-radius: 12px; padding: 12px 14px; }
.resumo-total .v { font-size: 1.8rem; font-weight: 800; }
.resumo-total small { opacity: .85; }
.itens-resumo { font-size: .9rem; }
.itens-resumo div { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed var(--borda); }
.div-pag { border: 2px solid var(--borda); border-radius: 12px; padding: 10px; background: #fff; margin-bottom: 8px; }
.div-pag .cab { font-weight: 700; color: var(--azul); margin-bottom: 6px; }

/* ---------- confirmação ---------- */
.confirma { text-align: center; padding: 30px 10px; }
.confirma .ok { width: 84px; height: 84px; border-radius: 50%; background: var(--verde); color: #fff; font-size: 2.6rem;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.confirma .ok.pend { background: var(--amarelo); }
.confirma .num { font-size: 1.6rem; font-weight: 800; color: var(--azul); }
.confirma .tot { font-size: 2rem; font-weight: 800; color: var(--laranja); }

/* ---------- listas / tabelas ---------- */
.venda-item { background: #fff; border-radius: 12px; box-shadow: var(--sombra); padding: 10px 12px; margin-bottom: 8px; }
.venda-item.cancelada { opacity: .6; }
.venda-item.cancelada .num, .venda-item.cancelada .tot { text-decoration: line-through; }
.venda-item .num { font-weight: 800; color: var(--azul); }
.venda-item .tot { font-weight: 800; color: var(--laranja); font-size: 1.1rem; }
.tabela { width: 100%; border-collapse: collapse; font-size: .88rem; background: #fff; border-radius: 10px; overflow: hidden; }
.tabela th, .tabela td { padding: 7px 8px; border-bottom: 1px solid var(--borda); text-align: left; white-space: nowrap; }
.tabela th { background: #e9ebf6; color: var(--azul); font-size: .78rem; text-transform: uppercase; letter-spacing: .3px; }
.tabela td.num, .tabela th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tabela tr.total td { font-weight: 800; background: #fff6f0; color: var(--laranja); }
.rolagem { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { background: #fff; border-radius: 12px; padding: 10px 12px; box-shadow: var(--sombra); }
.kpi .l { font-size: .75rem; color: var(--texto-suave); text-transform: uppercase; letter-spacing: .3px; }
.kpi .v { font-size: 1.3rem; font-weight: 800; color: var(--azul); }
.kpi.laranja .v { color: var(--laranja); }
.abas { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; }
.abas button { flex-shrink: 0; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--borda); background: #fff; color: var(--azul); font-weight: 700; }
.abas button.ativo { background: var(--azul); color: #fff; border-color: var(--azul); }
.grafico { width: 100%; height: auto; background: #fff; border-radius: 12px; }
.barra-h { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: .85rem; }
.barra-h .b { height: 18px; background: var(--azul); border-radius: 4px; min-width: 2px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 20px); transform: translateX(-50%);
  background: #1f2233; color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 100; max-width: 90vw; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast.erro { background: var(--vermelho); }
.toast.ok { background: var(--verde); }

@media (min-width: 640px) {
  .formas { grid-template-columns: repeat(4, 1fr); }
}
