/* =====================================================
   style.css — Hortifruti Rápido (base do Comanda Rápida)
   Feito para usar com uma mão, em pé, no sol:
   alvos grandes, contraste alto, números tabulares.
   Fonte do sistema: abre na hora, mesmo sem internet.
   ===================================================== */

:root,
[data-theme="claro"] {
  --bg: #F3F4F1;
  --sup: #FFFFFF;
  --sup2: #ECEEEA;
  --tinta: #1B2529;
  --texto2: #5E6A6F;
  --texto3: #8A9498;
  --borda: #D5DAD5;
  --linha: #E3E6E1;
  --amarelo: #F5BA0A;
  --amarelo-claro: #FFF4CF;
  --sobre-amarelo: #1B2529;
  --verde: #18794A;
  --verde-claro: #E3F3EA;
  --vermelho: #C2362B;
  --vermelho-claro: #FBE6E3;
  --laranja: #B95C00;
  --laranja-claro: #FFEBD6;
  --azul: #13808F;
  --azul-claro: #DDF3F5;
  --indigo: #4353C9;
  --indigo-claro: #E6E9FB;
  --primario: #1B2529;
  --sobre-primario: #FFFFFF;
  --fab-bg: #1B2529;
  --fab-tx: #FFFFFF;
  --sombra: 0 1px 2px rgba(27, 37, 41, .06), 0 2px 8px rgba(27, 37, 41, .05);
  --icone-fundo: #F4EEE2;
  color-scheme: light;
}

[data-theme="escuro"] {
  --bg: #111719;
  --sup: #1A2226;
  --sup2: #243035;
  --tinta: #ECF0EE;
  --texto2: #A3AFB3;
  --texto3: #7C888C;
  --borda: #36433F;
  --linha: #2A3539;
  --amarelo: #F5BA0A;
  --amarelo-claro: #3A3214;
  --sobre-amarelo: #1B2529;
  --verde: #34A86A;
  --verde-claro: #16302A;
  --vermelho: #EF6A61;
  --vermelho-claro: #3A1E1C;
  --laranja: #F08C2E;
  --laranja-claro: #3A2814;
  --azul: #4FC0CF;
  --azul-claro: #15333A;
  --indigo: #8D9BFF;
  --indigo-claro: #23284A;
  --primario: #E3E8E6;
  --sobre-primario: #111719;
  --fab-bg: #F5BA0A;
  --fab-tx: #1B2529;
  --sombra: none;
  --icone-fundo: #2E383C;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.4;
  color: var(--tinta);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  overscroll-behavior-y: none;
}
body.travado { overflow: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }
[hidden] { display: none !important; }

svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Carregando e login ---------- */
.carregando {
  min-height: 100vh; display: grid; place-items: center;
  color: var(--texto2);
}

.tela-login {
  min-height: 100vh; display: grid; place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
}
.cartao-login { width: 100%; max-width: 380px; }
.cartao-login h1 { font-size: 30px; margin: 12px 0 24px; letter-spacing: -.01em; }
.login-logo { border-radius: 18px; display: block; }
.erro-texto { color: var(--vermelho); min-height: 1.4em; margin: 4px 0 12px; font-size: 15px; }

/* ---------- Estrutura ---------- */
.topo {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--bg);
}
.topo h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--texto2); text-align: right; }
.status i { width: 10px; height: 10px; border-radius: 50%; background: var(--verde); flex: none; }
.status[data-estado="sync"] i { background: var(--amarelo); }
.status[data-estado="off"] i { background: var(--vermelho); }
.status[data-estado="off"] { color: var(--tinta); font-weight: 600; }

main { padding: 4px 14px calc(96px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--sup);
  border-top: 1px solid var(--borda);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  min-height: 64px; border: 0; background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 12px; color: var(--texto2);
}
.nav-item.ativo { color: var(--tinta); font-weight: 700; }
.nav-item.ativo svg { stroke-width: 2.6; }

/* ---------- Botões ---------- */
.btn {
  min-height: 50px; padding: 0 18px;
  border: 0; border-radius: 12px;
  font-weight: 650;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-grande { min-height: 58px; font-size: 18px; }
.btn-bloco { display: flex; width: 100%; margin: 10px 0; }
.btn-primario { background: var(--primario); color: var(--sobre-primario); }
.btn-secundario { background: var(--sup2); color: var(--tinta); }
.btn-sucesso { background: var(--verde); color: #fff; }
.btn-texto-perigo { background: none; color: var(--vermelho); min-height: 50px; }
.btn:active:not(:disabled) { transform: scale(.98); }

.btn-icone {
  width: 48px; height: 48px; flex: none;
  border: 0; border-radius: 12px; background: none;
  display: grid; place-items: center; font-size: 20px;
}
.btn-icone:active { background: var(--sup2); }

/* ---------- Campos ---------- */
.rotulo { display: block; margin: 12px 0; font-size: 15px; font-weight: 600; }
.rotulo small { display: block; font-weight: 400; color: var(--texto2); }
.campo {
  display: block; width: 100%; margin-top: 6px;
  min-height: 52px; padding: 12px 14px;
  border: 2px solid var(--borda); border-radius: 12px;
  background: var(--sup); font-size: 18px;
}
.campo:focus { border-color: var(--tinta); outline: none; }
textarea.campo { min-height: 90px; resize: vertical; line-height: 1.5; }
select.campo { appearance: auto; }
.check { display: flex; align-items: center; gap: 12px; min-height: 52px; font-weight: 600; }
.check input { width: 24px; height: 24px; accent-color: var(--verde); }

.linha-campo { display: flex; gap: 10px; align-items: flex-end; margin: 10px 0; }
.linha-campo > .campo, .linha-campo > .rotulo { flex: 1; margin-top: 0; margin-bottom: 0; }
.linha-campo > .btn { min-height: 52px; }

/* ---------- Textos de apoio ---------- */
.vazio { color: var(--texto2); text-align: center; padding: 18px 8px; margin: 0; }
.dica { color: var(--texto2); font-size: 14px; margin: 8px 2px 14px; }
.secao { font-size: 15px; color: var(--texto2); margin: 22px 2px 8px; font-weight: 650; }
.rotulo-grupo { font-weight: 700; margin: 18px 0 8px; }

/* ---------- Mesas ---------- */
.painel-aberto {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 4px 2px 12px; color: var(--texto2);
}
.painel-aberto strong { color: var(--tinta); font-size: 22px; }

.grade-mesas {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 6px;
}
@media (min-width: 520px) { .grade-mesas { grid-template-columns: repeat(4, 1fr); } }

.mesa {
  min-height: 104px; padding: 10px 8px;
  border: 2px dashed var(--borda); border-radius: 16px;
  background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.mesa-num { font-size: 38px; font-weight: 800; line-height: 1; color: var(--texto2); letter-spacing: -.02em; }
.mesa-info { font-size: 13px; color: var(--texto2); }
.mesa-valor { font-size: 17px; font-weight: 750; }
.mesa.ocupada {
  border: 2px solid var(--amarelo);
  background: var(--amarelo);
  color: var(--sobre-amarelo);
  box-shadow: var(--sombra);
}
.mesa.ocupada .mesa-num,
.mesa.ocupada .mesa-info { color: var(--sobre-amarelo); }
.mesa:active { transform: scale(.97); }

.lista-balcao { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.chip-comanda {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  min-height: 56px; padding: 0 16px;
  border: 0; border-radius: 14px;
  background: var(--amarelo); color: var(--sobre-amarelo); font-weight: 650;
  text-align: left;
}
.chip-comanda small { font-weight: 400; opacity: .8; margin-left: 6px; }

/* ---------- Tela da comanda ---------- */
.tela-comanda {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.barra-comanda {
  display: flex; align-items: center; gap: 4px;
  padding: calc(6px + env(safe-area-inset-top)) max(6px, calc((100% - 972px) / 2)) 6px;
  background: var(--sup);
  border-bottom: 1px solid var(--borda);
}
.titulo-comanda {
  flex: 1; min-width: 0; min-height: 52px;
  border: 0; background: none; text-align: left; padding: 4px 6px;
  display: flex; flex-direction: column; justify-content: center;
}
.titulo-comanda strong { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titulo-comanda small { color: var(--texto2); font-size: 13px; }

.comanda-corpo { flex: 1; overflow-y: auto; padding: 12px 12px 20px; -webkit-overflow-scrolling: touch; }

.comanda-conteudo { max-width: 960px; margin: 0 auto; }

.secao-cat { font-size: 15px; font-weight: 700; color: var(--texto2); margin: 14px 2px 8px; }
.secao-cat:first-child { margin-top: 2px; }

.grade-produtos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (min-width: 700px) { .grade-produtos { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }

.produto {
  position: relative;
  min-height: 112px; padding: 10px 12px 12px;
  border: 0; border-radius: 14px;
  background: var(--sup); box-shadow: var(--sombra);
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  text-align: left;
}
.produto:active { background: var(--sup2); transform: scale(.98); }
.produto .ilustra { width: 52px; height: 52px; }
.produto-texto { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.produto-nome { font-weight: 700; font-size: 17px; line-height: 1.2; }
.produto-preco { font-size: 14px; color: var(--texto2); }
.produto .badge { top: 10px; right: 10px; min-width: 32px; height: 32px; border-radius: 16px; font-size: 17px; }

/* Desenhos dos produtos */
svg.ilustra { flex: none; fill: none; stroke: none; }
.ilustra-fundo { fill: var(--icone-fundo); }
.badge {
  position: absolute; top: 8px; right: 8px;
  min-width: 28px; height: 28px; padding: 0 6px;
  border-radius: 14px; background: var(--tinta); color: var(--bg);
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
}

.lista-itens { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--sup);
}
.item-desc { min-width: 0; display: flex; flex-direction: column; }
.item-nome { font-weight: 650; }
.item-nome em { font-style: normal; color: var(--texto2); font-weight: 400; }
.item-desc small { color: var(--texto2); font-size: 14px; }
.item-desc b { color: var(--tinta); }

.stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.stepper button {
  width: 48px; height: 48px; border: 0; border-radius: 12px;
  background: var(--sup2); font-size: 24px; font-weight: 700;
  display: grid; place-items: center;
}
.stepper button svg { width: 20px; height: 20px; color: var(--vermelho); }
.stepper span { min-width: 30px; text-align: center; font-weight: 800; font-size: 19px; }
.stepper.grande span { min-width: 44px; font-size: 22px; }

.barra-total {
  display: flex; align-items: center; gap: 12px;
  padding: 10px max(12px, calc((100% - 960px) / 2)) calc(10px + env(safe-area-inset-bottom));
  background: var(--sup); border-top: 1px solid var(--borda);
}
.barra-total-valor { flex: 1; display: flex; flex-direction: column; }
.barra-total-valor small { color: var(--texto2); font-size: 13px; }
.barra-total-valor strong { font-size: 28px; line-height: 1.1; letter-spacing: -.01em; }
.barra-total .btn { flex: 1.3; }

/* ---------- Janela de baixo (sheet) ---------- */
.sheet-fundo {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(10, 15, 18, .5);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .18s ease;
}
.sheet-fundo.aberto { opacity: 1; }
.sheet {
  width: 100%; max-width: 640px; max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  transform: translateY(24px); transition: transform .18s ease;
}
.sheet-fundo.aberto .sheet { transform: none; }
.sheet-alta { max-height: 95vh; }
.sheet-topo {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 8px 4px 18px;
}
.sheet-topo h2 { font-size: 20px; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-corpo { overflow-y: auto; padding: 4px 16px calc(18px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }

.opcao {
  width: 100%; min-height: 60px; margin: 0 0 8px; padding: 8px 16px;
  border: 0; border-radius: 14px; background: var(--sup);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-align: left; font-weight: 600;
}
.opcao small { display: block; font-weight: 400; color: var(--texto2); font-size: 14px; }
.opcao span small { display: inline; margin-left: 6px; }
.opcao-perigo { color: var(--vermelho); }
.opcao:active { background: var(--sup2); }

.grade-opcoes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.opcao-grande {
  min-height: 70px; padding: 8px 12px;
  border: 2px solid transparent; border-radius: 14px; background: var(--sup);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
}
.opcao-grande small { font-weight: 400; color: var(--texto2); font-size: 14px; }
.opcao-grande.marcado { border-color: var(--tinta); background: var(--sup2); }

.grade-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mesa-mini {
  min-height: 58px; border: 2px dashed var(--borda); border-radius: 12px; background: transparent;
  font-size: 20px; font-weight: 800;
}
.mesa-mini:first-child { grid-column: span 4; font-size: 17px; }
.mesa-mini.ocupada { background: var(--amarelo); color: var(--sobre-amarelo); border: 2px solid var(--amarelo); }
.mesa-mini.marcado { outline: 3px solid var(--tinta); outline-offset: 1px; }

/* ---------- Fechamento ---------- */
.linha-valor {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 2px; color: var(--texto2);
}
.linha-valor strong, .linha-valor span:last-child { color: var(--tinta); }
.linha-valor.troco { font-size: 20px; padding-top: 12px; }
.linha-valor.troco strong { font-size: 28px; }
.linha-valor.caixa { margin-top: 14px; border-top: 1px solid var(--borda); font-weight: 600; }
.linha-valor.caixa strong { font-size: 22px; }

.total-grande {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 2px; border-top: 1px solid var(--borda); margin-top: 4px;
}
.total-grande span { font-weight: 600; }
.total-grande strong { font-size: 34px; letter-spacing: -.02em; }
.neg { color: var(--vermelho) !important; }

.ajuste { margin: 4px 0 8px; }
.ajuste summary { min-height: 44px; display: flex; align-items: center; color: var(--texto2); font-weight: 600; }

.seg { display: flex; gap: 6px; margin: 8px 0; padding: 4px; border-radius: 14px; background: var(--sup2); }
.seg button {
  flex: 1; min-height: 46px; border: 0; border-radius: 10px; background: transparent; font-weight: 650;
}
.seg button.marcado { background: var(--sup); box-shadow: var(--sombra); }
.seg-curto { flex: none; margin: 0; }
.seg-curto button { min-width: 56px; }

.grade-formas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.grade-formas.tres { grid-template-columns: repeat(3, 1fr); margin-bottom: 8px; }
.forma {
  min-height: 62px; border: 0; border-radius: 14px;
  background: var(--primario); color: var(--sobre-primario);
  font-size: 18px; font-weight: 700;
}
.forma:active { transform: scale(.97); }

.pag { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.pag-nome { flex: 1; font-weight: 700; }
.campo-valor { flex: 0 0 140px; margin: 0; text-align: right; }

.grade-notas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 8px; }
.grade-notas button {
  min-height: 54px; border: 2px solid var(--borda); border-radius: 12px; background: var(--sup);
  font-weight: 750; font-size: 17px;
}
.grade-notas button:active { background: var(--sup2); }

.falta { min-height: 1.4em; margin: 10px 2px 0; color: var(--vermelho); font-weight: 600; }

/* ---------- Avisos de preço ---------- */
.sem-preco { color: var(--vermelho) !important; font-weight: 650; }
.aviso {
  margin: 10px 0 0; padding: 10px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--vermelho) 12%, var(--sup)); color: var(--tinta); font-size: 15px;
}
.linha-modelo { cursor: pointer; }
.linha-modelo input { width: 26px; height: 26px; flex: none; accent-color: var(--verde); }

/* ---------- Listas (clientes, produtos, resumo) ---------- */
.lista { display: flex; flex-direction: column; gap: 6px; }
.linha-lista {
  width: 100%; min-height: 58px; padding: 8px 14px;
  border: 0; border-radius: 12px; background: var(--sup);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-align: left;
}
.linha-lista > span { min-width: 0; display: flex; flex-direction: column; }
.linha-lista > .linha-texto { flex: 1; }
.linha-lista .ilustra-p { width: 42px; height: 42px; margin-left: -4px; }

.grade-desenhos { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-bottom: 6px; }
.desenho-op {
  min-height: 92px; padding: 6px 4px;
  border: 2px solid transparent; border-radius: 14px; background: var(--sup);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.desenho-op .ilustra { width: 48px; height: 48px; }
.desenho-op small { font-size: 12px; line-height: 1.15; color: var(--texto2); text-align: center; }
.desenho-op.marcado { border-color: var(--tinta); background: var(--sup2); }
.desenho-op.marcado small { color: var(--tinta); font-weight: 650; }
.linha-lista small { color: var(--texto2); font-size: 14px; }
.linha-lista b { flex: none; }
.linha-lista.estatica { min-height: 50px; }
.deve { color: var(--vermelho); }
.pagou { color: var(--verde); }

.linha-produto { display: flex; gap: 8px; align-items: center; }
.linha-produto .linha-lista { flex: 1; }
.linha-produto.inativo .linha-lista { opacity: .5; }

.interruptor {
  flex: none; width: 60px; height: 36px; border: 0; border-radius: 18px;
  background: var(--borda); position: relative;
}
.interruptor i {
  position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%;
  background: #fff; transition: transform .15s ease;
}
.interruptor.ligado { background: var(--verde); }
.interruptor.ligado i { transform: translateX(24px); }

.linha-ajuste { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 2px; }

/* ---------- Relatórios ---------- */
.seg-periodo { margin: 0 0 12px; }
.seg-periodo button { font-size: 15px; padding: 0 4px; }

.destaque {
  padding: 16px 18px; border-radius: 16px; background: var(--primario); color: var(--sobre-primario);
  display: flex; flex-direction: column; gap: 2px;
}
.destaque span { font-weight: 600; opacity: .85; }
.destaque strong { font-size: 40px; letter-spacing: -.02em; line-height: 1.1; }
.destaque small { opacity: .85; font-size: 14px; }

.numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.numeros div { background: var(--sup); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; min-width: 0; }
.numeros small { color: var(--texto2); font-size: 13px; }
.numeros strong { font-size: 16px; white-space: nowrap; }

.grafico { position: relative; height: 220px; padding: 10px 8px 6px; border-radius: 14px; background: var(--sup); }
.dica-grafico { margin-top: -4px; }
.detalhe { margin-top: 10px; }
.detalhe summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--texto2); }

.pagamentos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--sup); }
.grafico-pizza { position: relative; width: 150px; height: 150px; flex: none; }
.lista-formas { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lista-formas div { display: flex; align-items: center; gap: 8px; }
.lista-formas i { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.lista-formas span { flex: 1; }
.lista-formas small { width: 38px; text-align: right; color: var(--texto2); }
.lista-formas .desconto { padding-top: 6px; border-top: 1px solid var(--borda); color: var(--texto2); }
.lista-formas .desconto b { margin-right: 46px; color: var(--tinta); }

/* ---------- Aviso rápido ---------- */
.toast {
  position: fixed; left: 0; right: 0; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 60;
  width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; text-align: center;
  padding: 12px 18px; border-radius: 12px;
  background: var(--tinta); color: var(--bg); font-weight: 600;
  transform: translateY(12px); opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.mostrar { opacity: 1; transform: none; }
.toast.erro { background: var(--vermelho); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Conta, plano e cobrança ---------- */
.btn-texto { background: none; color: var(--texto2); min-height: 48px; font-weight: 600; }
.ok-texto { color: var(--verde) !important; }
.centro { text-align: center; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; }

.faixa-plano {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: calc(100% - 28px); max-width: 692px; margin: 0 auto 6px; padding: 10px 14px;
  border: 0; border-radius: 12px; text-align: left; font-size: 15px; font-weight: 600;
}
.faixa-plano b { flex: none; font-size: 14px; white-space: nowrap; }
.faixa-plano.amarela { background: var(--amarelo); color: var(--sobre-amarelo); }
.faixa-plano.vermelha { background: var(--vermelho); color: #fff; }

.status-plano { margin: 0 0 10px; padding: 12px 14px; border-radius: 12px; background: var(--sup); font-weight: 650; }
.status-plano.fase-vencendo { background: var(--amarelo); color: var(--sobre-amarelo); }
.status-plano.fase-carencia,
.status-plano.fase-bloqueado { background: var(--vermelho); color: #fff; }
.cartao-plano { margin-top: 6px; }

.planos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.planos-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .planos-4 { grid-template-columns: repeat(4, 1fr); } }
.planos button {
  min-height: 78px; padding: 8px 4px; border: 2px solid transparent; border-radius: 14px; background: var(--sup);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.planos button strong { font-size: 15px; }
.planos button span { font-weight: 750; }
.planos button small { font-size: 12px; color: var(--texto2); }
.planos button.marcado { border-color: var(--tinta); background: var(--sup2); }

.pix { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--sup); text-align: center; }
.qr-pix { width: 200px; max-width: 100%; height: auto; image-rendering: pixelated; background: #fff; padding: 6px; border-radius: 10px; }
.pix-valor { font-size: 22px; font-weight: 800; margin: 8px 0; }
.pix-valor small { font-size: 15px; font-weight: 600; color: var(--texto2); }
.pix-codigo { font-size: 13px; font-family: ui-monospace, Menlo, Consolas, monospace; min-height: 70px; word-break: break-all; text-align: left; }
.pix .dica { margin-bottom: 0; }

.btn-whats { background: #1FA855; color: #fff; text-decoration: none; }
.campo-codigo { text-transform: uppercase; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; font-size: 22px; text-align: center; }

/* ---------- Painel do administrador ---------- */
.pagina-admin main { padding-bottom: 40px; }
.pagina-admin .topo .btn { min-height: 44px; text-decoration: none; white-space: nowrap; }
.seg-filtro button { font-size: 14px; }
.selo {
  flex: none; display: flex; flex-direction: column; align-items: flex-end;
  padding: 4px 10px; border-radius: 10px; font-size: 13px; font-weight: 700; background: var(--sup2);
}
.selo small { font-weight: 400; font-size: 12px; color: inherit; opacity: .85; }
.selo-teste { background: color-mix(in srgb, #2A9DB0 20%, var(--sup)); }
.selo-ativo { background: color-mix(in srgb, var(--verde) 20%, var(--sup)); }
.selo-vencendo { background: var(--amarelo); color: var(--sobre-amarelo); }
.selo-carencia, .selo-bloqueado { background: var(--vermelho); color: #fff; }
.codigo-gerado {
  margin: 12px 0; padding: 16px; border-radius: 14px; background: var(--primario); color: var(--sobre-primario);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.codigo-gerado strong { font-size: 34px; }

/* =====================================================
   VISUAL 7 — acabamento, mesas, comanda, fechamento, ajustes
   (regras abaixo substituem as anteriores de mesmo nome)
   ===================================================== */
body { letter-spacing: -.005em; }

/* Cabeçalho */
.topo { align-items: flex-start; padding-top: calc(12px + env(safe-area-inset-top)); }
.topo h1 { font-size: 26px; letter-spacing: -.02em; line-height: 1.1; }
.topo-neg { margin: 0 0 1px; font-size: 13px; font-weight: 600; color: var(--texto2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62vw; }
.topo-neg:empty { display: none; }
.status {
  margin-top: 4px; padding: 6px 10px; border-radius: 99px;
  background: var(--verde-claro); color: var(--verde); font-weight: 700; font-size: 12.5px;
}
.status i { width: 8px; height: 8px; background: currentColor; }
.status[data-estado="sync"] { background: var(--amarelo-claro); color: var(--tinta); }
.status[data-estado="sync"] i { background: var(--amarelo); }
.status[data-estado="off"] { background: var(--vermelho-claro); color: var(--vermelho); }
.status[data-estado="off"] i { background: currentColor; }

/* Títulos de seção */
.secao {
  font-size: 12.5px; font-weight: 800; color: var(--texto2);
  text-transform: uppercase; letter-spacing: .05em; margin: 20px 4px 8px;
}

/* Navegação de baixo */
.nav { border-top: 1px solid var(--linha); }
.nav-item { font-size: 11.5px; font-weight: 600; color: var(--texto3); }
.nav-item svg { box-sizing: content-box; padding: 3px 16px; border-radius: 99px; }
.nav-item.ativo { color: var(--tinta); }
.nav-item.ativo svg { background: var(--amarelo-claro); }

/* Superfícies */
.linha-lista, .item, .opcao, .numeros div, .grafico, .pagamentos, .pix, .status-plano { box-shadow: var(--sombra); }
.campo { border-color: var(--borda); }

/* ---------- Mesas ---------- */
.resumo-dia { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.resumo-dia div {
  background: var(--sup); border-radius: 14px; padding: 10px 12px; box-shadow: var(--sombra);
  display: flex; flex-direction: column; min-width: 0;
}
.resumo-dia small { font-size: 12.5px; font-weight: 650; color: var(--texto2); }
.resumo-dia strong { font-size: 21px; letter-spacing: -.01em; white-space: nowrap; }
.resumo-dia span { font-size: 12.5px; color: var(--texto3); }

.lista-balcao { flex-direction: row; flex-wrap: wrap; gap: 8px; margin: 0; }
.chip-comanda {
  min-height: 56px; padding: 8px 14px; gap: 14px;
  background: var(--amarelo-claro); color: var(--tinta);
  border: 1.5px solid var(--amarelo); border-radius: 14px;
}
.chip-comanda span { display: flex; flex-direction: column; }
.chip-comanda small { margin: 0; font-size: 12.5px; color: var(--texto2); opacity: 1; font-weight: 500; }

.grade-mesas { gap: 10px; margin: 0 0 84px; }
.mesa {
  min-height: 98px; padding: 10px 11px;
  border: 1.5px solid var(--linha); border-radius: 16px; background: transparent;
  align-items: stretch; justify-content: space-between; gap: 0; text-align: left;
}
.mesa-num { font-size: 26px; font-weight: 800; color: var(--texto3); letter-spacing: -.03em; }
.mesa-livre { font-size: 12.5px; font-weight: 600; color: var(--texto3); }
.mesa.ocupada {
  border: 1.5px solid var(--amarelo); background: var(--amarelo); color: var(--sobre-amarelo);
  box-shadow: 0 1px 2px rgba(27, 37, 41, .08), 0 3px 10px rgba(245, 186, 10, .25);
}
.mesa.ocupada .mesa-num { font-size: 30px; color: var(--sobre-amarelo); }
.mesa-valor { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.mesa-info { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.mesa-quem { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tempo {
  display: inline-flex; align-items: center; gap: 3px; flex: none;
  padding: 2px 6px; border-radius: 99px; background: rgba(27, 37, 41, .1);
  font-size: 11.5px; font-weight: 800;
}
.tempo svg { width: 12px; height: 12px; stroke-width: 2.6; }
.tempo.atento { background: #B95C00; color: #fff; }
.tempo.alerta { background: #C2362B; color: #fff; }

.fab {
  position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 9;
  height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 99px;
  display: flex; align-items: center; gap: 8px;
  background: var(--fab-bg); color: var(--fab-tx); font-weight: 750; font-size: 16px;
  box-shadow: 0 6px 18px rgba(27, 37, 41, .28);
}
.fab svg { width: 22px; height: 22px; color: var(--amarelo); stroke-width: 2.4; }
[data-theme="escuro"] .fab svg { color: var(--fab-tx); }
.fab:active { transform: scale(.97); }
@media (min-width: 760px) { .fab { right: calc(50% - 360px + 16px); } }

/* ---------- Comanda ---------- */
.barra-comanda { border-bottom: 1px solid var(--linha); }
.titulo-comanda strong { font-size: 19px; }
.chips-cat {
  display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; scrollbar-width: none;
  background: var(--bg); border-bottom: 1px solid var(--linha);
}
.chips-cat::-webkit-scrollbar { display: none; }
.chips-cat button {
  flex: none; min-height: 38px; padding: 0 15px; border: 0; border-radius: 99px;
  background: var(--sup); color: var(--texto2); font-weight: 700; font-size: 14px; box-shadow: var(--sombra);
}
.chips-cat button.ativo { background: var(--tinta); color: var(--bg); }
.comanda-corpo { position: relative; padding: 4px 12px 24px; }
.secao-cat { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin: 12px 4px 8px; }
.secao-cat:first-child { margin-top: 8px; }
.grade-produtos { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
@media (min-width: 700px) { .grade-produtos { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }
.produto {
  min-height: 72px; padding: 8px 10px; flex-direction: row; align-items: center; gap: 9px;
  overflow: visible;
}
.produto .ilustra { width: 46px; height: 46px; }
.produto-nome { font-size: 15.5px; line-height: 1.15; }
.produto-preco { font-size: 13px; }
.produto .badge {
  top: -6px; right: -4px; min-width: 26px; height: 26px; border-radius: 13px; font-size: 14px;
  border: 2px solid var(--bg);
}
@media (max-width: 360px) { .produto .ilustra { width: 40px; height: 40px; } .produto-nome { font-size: 14.5px; } }

.bandeja-fundo { position: absolute; inset: 0; z-index: 1; background: rgba(10, 15, 18, .35); }
.bandeja {
  position: relative; z-index: 2;
  background: var(--sup); border-radius: 20px 20px 0 0;
  box-shadow: 0 -6px 24px rgba(27, 37, 41, .12);
  padding-bottom: env(safe-area-inset-bottom);
}
.bandeja-topo {
  width: 100%; border: 0; background: none; padding: 8px 16px 2px;
  display: flex; flex-direction: column; align-items: stretch; text-align: left;
}
.bandeja-topo:disabled { opacity: 1; }
.alca { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--linha); margin: 0 auto 8px; }
.bandeja-linha { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; }
.bandeja-resumo { font-size: 14px; color: var(--texto2); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bandeja-resumo b { color: var(--tinta); }
.bandeja-ver { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; color: var(--texto2); }
.bandeja-ver svg { width: 18px; height: 18px; }
.bandeja-lista { max-height: 52vh; overflow-y: auto; padding: 6px 12px 4px; gap: 6px; }
.bandeja-lista .item { background: var(--bg); box-shadow: none; }
.bandeja .barra-total { background: transparent; border: 0; padding-top: 8px; }

body.em-comanda .toast { top: calc(66px + env(safe-area-inset-top)); bottom: auto; }
.toast { display: flex; align-items: center; gap: 14px; border-radius: 99px; padding: 10px 18px; }
.toast.erro { border-radius: 14px; }
.toast.com-acao { pointer-events: auto; padding-right: 8px; }
.toast-acao {
  border: 0; background: none; color: var(--amarelo); font-weight: 800; font-size: 15px;
  min-height: 36px; padding: 0 10px; border-radius: 99px;
}
[data-theme="escuro"] .toast-acao { color: #9A6B00; }

/* ---------- Fechar conta (tela cheia) ---------- */
.sheet.sheet-cheia { max-width: none; height: 100%; max-height: 100%; border-radius: 0; background: var(--bg); }
.sheet-fundo:has(.sheet-cheia) { background: var(--bg); }
.sheet-cheia .sheet-topo { padding-top: calc(10px + env(safe-area-inset-top)); border-bottom: 1px solid var(--linha); background: var(--sup); }
.sheet-cheia .sheet-corpo { flex: 1; padding-bottom: 0; display: flex; flex-direction: column; }
.sheet-cheia .sheet-corpo > * { width: 100%; max-width: 640px; margin-left: auto; margin-right: auto; }
.total-fechar { text-align: center; padding: 16px 0 4px; }
.total-fechar > small { font-size: 14px; font-weight: 650; color: var(--texto2); }
.total-fechar > strong { display: block; font-size: 46px; letter-spacing: -.03em; line-height: 1.1; }
.subtotal-fechar { display: block; min-height: 1.2em; font-size: 13px; color: var(--texto2); }
.total-fechar .ajuste { margin: 6px auto 0; text-align: left; }
.total-fechar .ajuste summary {
  justify-content: center; width: fit-content; margin: 0 auto; min-height: 36px; padding: 0 14px;
  border-radius: 99px; background: var(--sup2); font-size: 14px; list-style: none; cursor: pointer;
}
.total-fechar .ajuste summary::-webkit-details-marker { display: none; }
.total-fechar .ajuste summary::before { content: "+ "; }
.total-fechar .ajuste[open] summary::before { content: "− "; }

.forma {
  min-height: 64px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: var(--sup); color: var(--tinta); border: 2px solid transparent; box-shadow: var(--sombra);
  font-size: 16px; text-align: left;
}
.forma i { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.forma i svg { width: 21px; height: 21px; }
.forma-dinheiro i { background: var(--verde-claro); color: var(--verde); }
.forma-pix i { background: var(--azul-claro); color: var(--azul); }
.forma-cartao i { background: var(--indigo-claro); color: var(--indigo); }
.forma-fiado i { background: var(--vermelho-claro); color: var(--vermelho); }
.forma.marcado { border-color: var(--tinta); }
.grade-formas.tres .forma { justify-content: center; padding: 0 8px; }

.grade-notas button { border: 0; box-shadow: var(--sombra); }
.grade-notas button.marcado { background: var(--tinta); color: var(--bg); }
.troco-card {
  margin-top: 10px; padding: 14px 16px; border-radius: 16px;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--verde-claro); color: var(--verde);
}
.troco-card span { font-weight: 700; font-size: 15px; }
.troco-card strong { font-size: 32px; letter-spacing: -.02em; }
.troco-card.falta-receber { background: var(--vermelho-claro); color: var(--vermelho); }
.rodape-fechar {
  position: sticky; bottom: 0; margin-top: auto !important;
  padding: 10px 0 calc(16px + env(safe-area-inset-bottom)); background: var(--bg);
}
.rodape-fechar .btn { margin: 0; }

/* ---------- Ajustes ---------- */
.perfil { margin-top: 4px; padding: 14px; border-radius: 18px; background: #1B2529; color: #fff; }
[data-theme="escuro"] .perfil { background: var(--sup2); }
.perfil-l1 { display: flex; align-items: center; gap: 12px; }
.perfil-av {
  width: 52px; height: 52px; border-radius: 15px; flex: none;
  display: grid; place-items: center; background: var(--amarelo); color: #1B2529; font-weight: 800; font-size: 19px;
}
.perfil-txt { min-width: 0; display: flex; flex-direction: column; }
.perfil-txt b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perfil-txt small { font-size: 13px; color: #C9D1D3; }
.perfil-plano {
  margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .08);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.perfil-plano > span { font-size: 14px; font-weight: 700; min-width: 0; }
.perfil-plano em { display: block; font-style: normal; font-weight: 500; font-size: 12.5px; color: #C9D1D3; }
.perfil-plano em.fase-vencendo { color: var(--amarelo); }
.perfil-plano em.fase-carencia, .perfil-plano em.fase-bloqueado { color: #FF8A80; }
.perfil-bt {
  flex: none; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px;
  background: var(--amarelo); color: #1B2529; font-weight: 800; font-size: 13.5px;
}
.grupo-aj { background: var(--sup); border-radius: 16px; box-shadow: var(--sombra); overflow: hidden; }
.lin-aj {
  width: 100%; min-height: 60px; padding: 8px 14px; border: 0; border-bottom: 1px solid var(--linha);
  background: none; display: flex; align-items: center; gap: 12px; text-align: left;
  color: var(--tinta); text-decoration: none;
}
.lin-aj:last-child { border-bottom: 0; }
button.lin-aj:active, a.lin-aj:active { background: var(--sup2); }
.lin-tx { flex: 1; min-width: 0; font-weight: 650; font-size: 15.5px; display: flex; flex-direction: column; }
.lin-tx small { font-weight: 500; font-size: 12.5px; color: var(--texto2); }
.lin-tx.perigo { color: var(--vermelho); }
.lin-vl { color: var(--texto2); font-size: 14.5px; font-weight: 600; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.lin-seta { color: var(--texto3); font-size: 22px; font-weight: 700; line-height: 1; }
.lin-aj .stepper button { width: 40px; height: 40px; }
.aj-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.aj-ic svg { width: 19px; height: 19px; }
.ic-amarelo { background: var(--amarelo-claro); color: #8A6400; }
[data-theme="escuro"] .ic-amarelo { color: var(--amarelo); }
.ic-indigo { background: var(--indigo-claro); color: var(--indigo); }
.ic-azul { background: var(--azul-claro); color: var(--azul); }
.ic-verde { background: var(--verde-claro); color: var(--verde); }
.ic-vermelho { background: var(--vermelho-claro); color: var(--vermelho); }
.ic-neutro { background: var(--sup2); color: var(--tinta); }
.ic-escuro { background: #1B2529; color: var(--amarelo); }
.temas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
.temas button {
  border: 2px solid var(--linha); border-radius: 12px; background: none; padding: 8px;
  font-size: 13px; font-weight: 700; color: var(--texto2); display: flex; flex-direction: column; gap: 6px;
}
.temas button.marcado { border-color: var(--tinta); color: var(--tinta); }
.tm { display: block; height: 44px; border-radius: 8px; border: 1px solid var(--linha); }
.tm-auto { background: linear-gradient(135deg, #F3F4F1 50%, #1B2529 50%); }
.tm-claro { background: #F3F4F1; }
.tm-escuro { background: #1B2529; }
.rodape-aj { text-align: center; color: var(--texto3); font-size: 12.5px; margin: 18px 0 8px; }
.bandeja .barra-total { padding-bottom: 12px; }

/* ---------- Painel do administrador (visual 7) ---------- */
.pagina-admin main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.nav-3 { grid-template-columns: repeat(3, 1fr); }
.voltar-app { background: var(--sup2); color: var(--tinta); text-decoration: none; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.kpi { background: var(--sup); border-radius: 14px; padding: 10px 12px; box-shadow: var(--sombra); display: flex; flex-direction: column; min-width: 0; }
.kpi small { font-size: 12.5px; font-weight: 650; color: var(--texto2); }
.kpi strong { font-size: 21px; letter-spacing: -.01em; white-space: nowrap; }
.kpi span { font-size: 12.5px; color: var(--texto3); }
.kpi.escuro { background: #1B2529; color: #fff; }
.kpi.escuro small, .kpi.escuro span { color: #C9D1D3; }
[data-theme="escuro"] .kpi.escuro { background: var(--sup2); }
.busca-adm {
  display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; padding: 0 12px;
  background: var(--sup); border: 1.5px solid var(--linha); border-radius: 12px; color: var(--texto3);
}
.busca-adm svg { width: 18px; height: 18px; flex: none; }
.busca-adm input { flex: 1; min-height: 46px; border: 0; background: none; outline: none; font-size: 16px; }
.chips-adm { padding: 8px 0 0; border: 0; background: none; }
.contador {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 5px; padding: 0 5px;
  border-radius: 10px; background: var(--vermelho); color: #fff; font-size: 11.5px;
}
.emp {
  display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px;
  background: var(--sup); border-radius: 14px; box-shadow: var(--sombra); cursor: pointer;
}
.emp:active { background: var(--sup2); }
.emp-av {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; color: var(--tinta);
}
.emp-av.grande { width: 48px; height: 48px; border-radius: 14px; font-size: 18px; }
.av-bloq { background: var(--vermelho-claro); }
.av-car { background: var(--laranja-claro); }
.av-venc { background: var(--amarelo-claro); }
.av-teste { background: var(--azul-claro); }
.av-ok { background: var(--verde-claro); }
.emp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.emp-txt b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-txt small { font-size: 12.5px; color: var(--texto2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { display: inline-block; padding: 1px 7px; margin-right: 5px; border-radius: 6px; font-size: 11.5px; font-weight: 800; }
.tag-bloq { background: var(--vermelho-claro); color: var(--vermelho); }
.tag-car { background: var(--laranja-claro); color: var(--laranja); }
.tag-venc { background: var(--amarelo); color: #1B2529; }
.tag-teste { background: var(--azul-claro); color: var(--azul); }
.tag-ok { background: var(--verde-claro); color: var(--verde); }
.emp-whats {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: #E3F6EA; color: #1A8F4A;
}
[data-theme="escuro"] .emp-whats { background: var(--verde-claro); color: var(--verde); }
.emp-whats svg { width: 21px; height: 21px; }

.cab-emp { background: var(--sup); border-radius: 16px; padding: 14px; box-shadow: var(--sombra); }
.cab-l1 { display: flex; align-items: center; gap: 12px; }
.cab-txt { min-width: 0; display: flex; flex-direction: column; }
.cab-txt b { font-size: 18px; }
.cab-txt small { font-size: 13px; color: var(--texto2); }
.cab-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.cab-grade div { background: var(--bg); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; min-width: 0; }
.cab-grade small { font-size: 11.5px; font-weight: 700; color: var(--texto2); }
.cab-grade strong { font-size: 14.5px; white-space: nowrap; }
.cab-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.cab-acoes .btn { min-height: 46px; text-decoration: none; }
.btn-whats-claro { background: #E3F6EA; color: #1A8F4A; }
[data-theme="escuro"] .btn-whats-claro { background: var(--verde-claro); color: var(--verde); }
.btn-whats-claro svg, .btn-whats svg { width: 20px; height: 20px; }
.cab-mais { margin-top: 10px; padding-top: 4px; border-top: 1px solid var(--linha); }
.cab-mais .linha-campo { margin: 6px 0 0; }
.passo { margin-top: 10px; background: var(--sup); border-radius: 16px; padding: 12px 14px; box-shadow: var(--sombra); }
.passo-h { margin: 0 0 8px; font-size: 12.5px; font-weight: 800; color: var(--texto2); text-transform: uppercase; letter-spacing: .05em; }
.passo .planos button { background: var(--bg); }
.passo .planos button.marcado { background: var(--sup); }
.passo .dica { margin: 8px 2px 0; }
.codigo-gerado { margin-top: 0; }
.codigo-gerado strong { font-size: 32px; letter-spacing: .08em; }
.codigo-gerado small { color: inherit; opacity: .8; text-align: center; }
.hist { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--linha); }
.hist:last-child { border-bottom: 0; }
.hist-ponto { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.hist-ponto.ok { background: var(--verde); }
.hist-ponto.pend { background: var(--amarelo); }
.hist-ponto.teste { background: var(--texto3); }
.hist-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14.5px; }
.hist-txt small { font-size: 12.5px; color: var(--texto2); }
.cartao-form { background: var(--sup); border-radius: 16px; padding: 4px 14px 12px; box-shadow: var(--sombra); }
.cartao-form .linha-campo { margin-top: 4px; }

/* ---------- Termos, privacidade e backup ---------- */
.aceite { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 4px; font-size: 14.5px; line-height: 1.4; color: var(--texto2); cursor: pointer; }
.aceite input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--verde); }
.aceite a, .links-legais a { color: var(--tinta); font-weight: 650; }
.links-legais { text-align: center; font-size: 13px; color: var(--texto3); margin: 4px 0 0; }
.links-legais a { color: var(--texto2); font-weight: 600; }

.doc-legal { max-width: 720px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 20px calc(48px + env(safe-area-inset-bottom)); line-height: 1.6; font-size: 16px; }
.doc-legal h1 { font-size: 30px; letter-spacing: -.02em; line-height: 1.15; margin: 2px 0 4px; }
.doc-legal h2 { font-size: 18px; margin: 28px 0 6px; letter-spacing: -.01em; }
.doc-legal p, .doc-legal li { color: var(--tinta); }
.doc-legal ul { padding-left: 20px; margin: 6px 0; }
.doc-legal li { margin: 6px 0; }
.doc-legal a { color: var(--azul); font-weight: 600; }
.doc-marca { margin: 18px 0 0; font-size: 13px; font-weight: 700; color: var(--texto2); text-transform: uppercase; letter-spacing: .05em; }
.doc-data { margin: 0 0 18px; font-size: 14px; color: var(--texto2); }
.doc-voltar {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 99px;
  background: var(--sup2); color: var(--tinta) !important; text-decoration: none; font-weight: 700 !important; font-size: 14px;
}
.doc-fim { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--linha); }

.bk-ultimo { margin: 6px 0 2px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 650; }
.bk-ultimo.ok { background: var(--verde-claro); color: var(--verde); }
.bk-ultimo.alerta { background: var(--amarelo-claro); color: var(--tinta); }

/* ---------- Equipe ---------- */
.link-modo {
  display: block; width: 100%; margin: 6px 0 2px; padding: 10px 12px; border: 1.5px dashed var(--borda); border-radius: 12px;
  background: none; color: var(--texto2); font-size: 14.5px; text-align: center;
}
.link-modo b { color: var(--tinta); }
.selo-atendente {
  display: inline-flex; align-items: center; margin-top: 4px; padding: 4px 10px; border-radius: 99px;
  background: var(--azul-claro); color: var(--azul); font-size: 12.5px; font-weight: 800;
}
.resumo-dia.um { grid-template-columns: 1fr; }
.tog { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; border-bottom: 1px solid var(--linha); }
.tog:last-child { border-bottom: 0; }
.perm-lista .interruptor { flex: none; }
.perm-lista .interruptor:disabled { opacity: .5; }
.btn-convidar { margin-top: 16px; }
.btn-convidar svg { width: 22px; height: 22px; color: var(--amarelo); }
[data-theme="escuro"] .btn-convidar svg { color: var(--sobre-primario); }
.infobox {
  margin-top: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--azul-claro); color: var(--tinta); font-size: 14px; line-height: 1.5;
}
.lin-aj .tag { flex: none; }
.lin-aj:disabled { opacity: 1; cursor: default; }

/* ---------- Vendas por atendente ---------- */
.lista-pessoas { margin-top: 8px; }
.pessoa {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0;
  background: var(--sup); border-radius: 14px; box-shadow: var(--sombra); text-align: left; color: var(--tinta);
}
.pessoa:active { background: var(--sup2); }
.pessoa-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pessoa-txt b { font-size: 15.5px; }
.pessoa-txt small { font-size: 12.5px; color: var(--texto2); }
.pessoa-alertas { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.pessoa-alertas .tag { margin: 0; }
.pessoa-valor { font-size: 16px; white-space: nowrap; }
.numeros-4 { grid-template-columns: repeat(2, 1fr); }

/* ---------- Fechar conta: cabe na tela do celular (v13) ---------- */
.sheet.sheet-cheia { height: 100%; height: 100dvh; max-height: 100dvh; }
.sheet-cheia .sheet-corpo { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet-cheia .sheet-topo { padding-bottom: 6px; }
.total-fechar { padding: 10px 0 0; }
.total-fechar > strong { font-size: 40px; }
.subtotal-fechar:empty { display: none; }
.total-fechar .ajuste { margin-top: 4px; }
.sheet-cheia .rotulo-grupo { margin: 12px 0 6px; }
.forma { min-height: 54px; }
.forma i { width: 32px; height: 32px; }
.pag { margin-top: 8px; }
.pag .campo-valor { min-height: 46px; padding: 8px 12px; }
.grade-notas button { min-height: 48px; }
#f-recebido { min-height: 46px; padding: 8px 14px; }
.troco-card { margin-top: 8px; padding: 10px 16px; }
.troco-card strong { font-size: 30px; }
.falta:empty { display: none; }
.rodape-fechar { padding-top: 8px; }
.troco-card, #f-dinheiro { scroll-margin-bottom: 96px; }

/* ---------- Aviso para instalar na tela inicial ---------- */
.inst-card {
  display: flex; align-items: center; gap: 12px; margin: 2px 0 10px; padding: 12px 8px 12px 14px;
  background: var(--sup); border: 1.5px solid var(--amarelo); border-radius: 16px; box-shadow: var(--sombra);
}
.inst-ic { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--amarelo-claro); }
.inst-ic svg { width: 22px; height: 22px; }
.inst-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.inst-txt b { font-size: 15px; }
.inst-txt small { font-size: 12.5px; color: var(--texto2); line-height: 1.35; }
.inst-bt { min-height: 40px; padding: 0 12px; font-size: 14px; flex: none; }
.inst-x { flex: none; width: 32px; height: 40px; border: 0; background: none; color: var(--texto3); font-size: 18px; }
.inst-passos { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.inst-passo { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--sup); box-shadow: var(--sombra); font-size: 15px; line-height: 1.4; }
.inst-passo > b { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--amarelo); color: #1B2529; }
.inst-passo svg { width: 18px; height: 18px; vertical-align: -3px; }

/* ---------- QR Code do Pix no fechamento ---------- */
.btn-qr-pix { margin-top: 8px; background: var(--azul-claro); color: var(--azul); }
.btn-qr-pix svg { width: 22px; height: 22px; }
.qr-cliente { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 0 8px; }
.qr-chamada { font-size: 15px; font-weight: 700; color: var(--texto2); }
.qr-caixa { margin-top: 12px; padding: 14px; border-radius: 22px; background: #fff; box-shadow: var(--sombra); }
.qr-caixa .qr-pix { width: min(280px, 72vw); padding: 0; border-radius: 0; display: block; }
.qr-valor { margin-top: 14px; font-size: 40px; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.qr-para { margin: 2px 0 12px; font-size: 15px; color: var(--texto2); }
.qr-botoes { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
.qr-botoes .btn { margin: 0; }

/* ---------- Acompanhamento do teste (painel) ---------- */
.tag-acomp { background: var(--azul-claro); color: var(--azul); }
.contador-azul { background: var(--azul); }
.emp-whats.pulsar { background: #1FA855; color: #fff; box-shadow: 0 0 0 0 rgba(31,168,85,.45); animation: pulsar 2s infinite; }
@keyframes pulsar { 0% { box-shadow: 0 0 0 0 rgba(31,168,85,.45); } 70% { box-shadow: 0 0 0 10px rgba(31,168,85,0); } 100% { box-shadow: 0 0 0 0 rgba(31,168,85,0); } }
.btn-acomp { min-height: 38px; padding: 0 14px; font-size: 14px; text-decoration: none; flex: none; }
@media (prefers-reduced-motion: reduce) { .emp-whats.pulsar { animation: none; } }
.passo-apagar { border: 1.5px solid var(--vermelho-claro); }
.passo-repetido { border: 1.5px solid var(--laranja-claro); }

/* ---------- Planos Comanda e Gestão (pagamento) ---------- */
.modulos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modulo-op {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: 14px 12px 12px; border: 2px solid transparent; border-radius: 16px; background: var(--sup); box-shadow: var(--sombra);
}
.modulo-op.marcado { border-color: var(--tinta); }
.modulo-op .tag { position: absolute; top: -10px; right: 8px; margin: 0; }
.modulo-op b { font-size: 17px; }
.modulo-preco { font-size: 22px; font-weight: 900; letter-spacing: -.01em; }
.modulo-preco small { font-size: 13px; font-weight: 600; color: var(--texto2); }
.modulo-op > small { font-size: 12.5px; color: var(--texto2); line-height: 1.4; }

/* ---------- Finanças ---------- */
.seg-fin { margin-bottom: 10px; }
.mes-nav { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; padding: 2px; border-radius: 14px; background: var(--sup); box-shadow: var(--sombra); }
.mes-nav b { font-size: 16px; }
.mes-nav .btn-icone:disabled { opacity: .25; }
.destaque-lucro { background: #18794A; color: #fff; }
.destaque-prejuizo { background: #C2362B; color: #fff; }
.dre { margin-top: 10px; }
.dre .neg { color: var(--vermelho); }
.dre-sub { background: var(--sup2) !important; }
.dre-total { border: 2px solid var(--verde); }
.dre-total b { color: var(--verde); font-size: 18px; }
.dre-total.prejuizo { border-color: var(--vermelho); }
.dre-total.prejuizo b { color: var(--vermelho); }
.aviso-botao { display: flex; flex-direction: column; gap: 2px; width: 100%; border: 0; text-align: left; margin-top: 10px; cursor: pointer; }
.aviso-botao span { font-size: 13.5px; color: var(--texto2); }
.grafico-meses { height: auto; padding: 14px; }
.grafico-meses svg { width: 100%; height: auto; display: block; }
.barras-cat { display: block; }
.barra-cat { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 14px; }
.barra-cat > span:first-child { width: 104px; font-weight: 600; flex: none; }
.barra-cat .trilho { flex: 1; height: 12px; border-radius: 6px; background: var(--sup2); overflow: hidden; }
.barra-cat .trilho i { display: block; height: 100%; border-radius: 6px; }
.barra-cat b { width: 92px; text-align: right; flex: none; }
.desp-txt { flex: 1; min-width: 0; cursor: pointer; }
.chips-desp { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-cat { min-height: 40px; padding: 0 14px; border: 0; border-radius: 99px; background: var(--sup); box-shadow: var(--sombra); font-weight: 700; font-size: 14px; color: var(--texto2); }
.chip-cat.marcado { background: var(--tinta); color: var(--bg); }
.campo-grande { font-size: 30px; font-weight: 800; min-height: 60px; }
.campo-custo { border-color: var(--verde); }
.margem { display: block; font-weight: 500; font-size: 13px; }
.convite-gestao { text-align: center; padding: 18px 10px 6px; }
.convite-gestao h2 { font-size: 24px; letter-spacing: -.02em; margin-top: 14px; }
.convite-ic { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto; display: grid; place-items: center; background: var(--amarelo-claro); }
.convite-ic svg { width: 36px; height: 36px; }
.grafico-meses svg { stroke: none; } .grafico-meses svg line { stroke: var(--linha); stroke-width: 1; }
.cab-grade strong { white-space: normal; line-height: 1.2; }

/* ---------- Tamanhos e sabores em linhas ---------- */
.bloco-var { margin-top: 6px; }
.bloco-var .rotulo-grupo small.dica-inline { display: block; font-weight: 500; font-size: 12.5px; color: var(--texto2); margin-top: 2px; }
.var-cab, .var-linha { display: grid; grid-template-columns: 1.6fr 1fr 40px; gap: 6px; align-items: center; }
.var-cab.com-custo, .var-linha.com-custo { grid-template-columns: 1.7fr .95fr .95fr 36px; }
.var-cab { font-size: 12.5px; font-weight: 700; color: var(--texto2); padding: 0 4px 4px; }
.var-linha { margin-bottom: 6px; }
.var-linha .campo { margin: 0; min-height: 46px; padding: 8px 10px; font-size: 16px; }
.var-linha .var-preco, .var-linha .var-custo { text-align: right; }
.var-linha .var-custo { border-color: var(--verde); }
.var-x { width: 40px; height: 40px; color: var(--texto3); font-size: 16px; }
.btn-add-var { min-height: 42px; font-size: 14.5px; margin-top: 2px; }

/* ---------- Campos de data no celular (o iPhone dá largura própria ao campo) ---------- */
input[type="date"].campo, input[type="time"].campo {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%;
  text-align: left; background: var(--sup); color: var(--tinta);
}
input[type="date"].campo::-webkit-date-and-time-value, input[type="time"].campo::-webkit-date-and-time-value { text-align: left; margin: 0; }
.linha-campo > .rotulo { min-width: 0; }
.sheet-topo { position: sticky; top: 0; z-index: 2; background: var(--bg); }
.sheet-topo .btn-icone[data-fechar] { width: 44px; height: 44px; border-radius: 50%; background: var(--sup2); font-size: 18px; }

/* ---------- Contas fixas e custo do combo ---------- */
.check-repetir { align-items: flex-start; margin-top: 6px; }
.check-repetir span { display: flex; flex-direction: column; }
.check-repetir small { font-weight: 500; font-size: 12.5px; color: var(--texto2); }
.linha-lista.pausada { opacity: .55; }
.combo-custo { margin: 6px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--sup); box-shadow: var(--sombra); border: 1.5px solid var(--verde-claro); }
.combo-custo.baixa { border-color: var(--amarelo); }
.combo-tit { font-weight: 800; font-size: 13px; color: var(--texto2); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px; }
.combo-lin { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14.5px; }
.combo-lin em { font-style: normal; color: var(--vermelho); font-weight: 600; font-size: 13px; }
.combo-total { border-top: 1px solid var(--linha); margin-top: 4px; padding-top: 8px; font-weight: 800; }
.combo-margem { margin: 6px 0; font-weight: 700; font-size: 14px; }
.combo-custo.baixa .combo-margem { color: #8A6400; }
[data-theme="escuro"] .combo-custo.baixa .combo-margem { color: var(--amarelo); }

/* ---------- Comparação e metas ---------- */
.delta { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 12px; font-weight: 800; margin-top: 3px; width: fit-content; }
.delta.sobe { background: var(--verde-claro); color: var(--verde); }
.delta.desce { background: var(--vermelho-claro); color: var(--vermelho); }
.delta.igual { background: var(--sup2); color: var(--texto2); }
.delta-txt { font-size: 12.5px; opacity: .85; }
.destaque .delta.sobe { background: rgba(255,255,255,.16); color: #7FE0A8; }
.destaque .delta.desce { background: rgba(255,255,255,.16); color: #FF9C8F; }
.destaque-delta { margin-top: 4px; }
.meta-card, .meta-vazia {
  display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 10px; padding: 12px 14px;
  border: 0; border-radius: 14px; background: var(--sup); box-shadow: var(--sombra); text-align: left; color: var(--tinta);
}
.meta-vazia { align-items: center; font-weight: 700; color: var(--texto2); border: 1.5px dashed var(--borda); box-shadow: none; background: none; }
.meta-topo { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.meta-topo span { color: var(--texto2); font-weight: 600; }
.meta-barra { position: relative; display: block; height: 12px; border-radius: 6px; background: var(--sup2); overflow: visible; }
.meta-barra i { display: block; height: 100%; border-radius: 6px; background: var(--amarelo); }
.meta-barra em { position: absolute; top: -3px; width: 2px; height: 18px; background: var(--tinta); opacity: .35; }
.meta-card.batida .meta-barra i { background: var(--verde); }
.meta-card small { font-size: 13px; color: var(--texto2); }
.meta-mini { display: block; height: 6px; margin: 4px 0 2px; border-radius: 3px; background: var(--sup2); overflow: hidden; }
.meta-mini i { display: block; height: 100%; background: var(--amarelo); border-radius: 3px; }
.meta-mini i.ok { background: var(--verde); }

/* ---------- Erros no painel ---------- */
.secao small { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--texto3); margin-left: 6px; }
.aviso-erro { margin-bottom: 10px; }
.erro-item { border-radius: 12px; background: var(--bg); margin-bottom: 8px; padding: 10px 12px; }
.erro-item summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.erro-item summary::-webkit-details-marker { display: none; }
.erro-item summary b { font-size: 14px; color: var(--vermelho); word-break: break-word; }
.erro-item summary small { font-size: 12.5px; color: var(--texto2); }
.erro-det { margin-top: 8px; font-size: 13px; }
.erro-det p { margin: 4px 0; word-break: break-word; }
.erro-det pre { white-space: pre-wrap; word-break: break-all; font-size: 11.5px; background: var(--sup2); padding: 8px; border-radius: 8px; max-height: 180px; overflow: auto; }

/* ---------- Observação do item ---------- */
.item-obs { align-self: flex-start; margin-top: 3px; padding: 2px 0; border: 0; background: none; font-size: 13px; font-weight: 700; color: var(--texto3); text-align: left; }
.item-obs.tem { color: #B95C00; font-weight: 700; }
[data-theme="escuro"] .item-obs.tem { color: var(--amarelo); }
.obs-txt { color: #B95C00; font-weight: 600; }

/* ---------- Cozinha ---------- */
.cz-selo { display: block; width: fit-content; margin-top: 4px; padding: 2px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 800; }
.cz-selo.fazendo { background: #1B2529; color: #F5BA0A; }
.cz-selo.pronto { background: #18794A; color: #fff; }
.cz-item { display: inline-block; margin-top: 3px; font-size: 12.5px; font-weight: 700; color: var(--texto3); }
.cz-item.fazendo { color: #8A6400; }
.cz-item.pronto { color: var(--verde); }
[data-theme="escuro"] .cz-item.fazendo { color: var(--amarelo); }
.cz-aviso {
  position: fixed; left: 12px; right: 12px; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); z-index: 6;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px;
  border: 0; border-radius: 14px; background: #18794A; color: #fff; font-weight: 700; font-size: 15px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.cz-aviso b { padding: 6px 10px; border-radius: 9px; background: rgba(255,255,255,.18); font-size: 13.5px; white-space: nowrap; }

.kds { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: #12181B; color: #fff;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.kds[hidden] { display: none; }
.kds-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid #26323A; }
.kds-topo h1 { flex: 1; margin: 0; font-size: 21px; min-width: 160px; }
.kds-topo h1 small { font-size: 14px; font-weight: 600; color: #9AA7AD; margin-left: 6px; }
.kds-pill { padding: 8px 12px; border: 0; border-radius: 99px; background: #26323A; color: #fff; font-weight: 700; font-size: 14px; }
.kds-pill.am { background: #F5BA0A; color: #1B2529; }
.kds-grade { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 14px; align-content: start; }
.kds-vazio { grid-column: 1 / -1; text-align: center; margin-top: 18vh; font-size: 22px; font-weight: 800; color: #9AA7AD; }
.kds-vazio small { font-size: 15px; font-weight: 500; }
.kc { display: flex; flex-direction: column; overflow: hidden; border: 2px solid transparent; border-radius: 16px; background: #1E2A2F; }
.kc.medio { border-color: #F5BA0A; }
.kc.atraso { border-color: #E5534B; animation: piscar 1.6s ease-in-out infinite; }
@keyframes piscar { 50% { border-color: #7a2b26; } }
.kc-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; background: #26323A; }
.kc-cab b { font-size: 20px; }
.kc-cab span { font-size: 15px; font-weight: 800; white-space: nowrap; }
.kc.medio .kc-cab span { color: #F5BA0A; }
.kc.atraso .kc-cab span { color: #FF8A80; }
.kc-sub { margin: 0; padding: 6px 14px 2px; font-size: 13px; color: #9AA7AD; }
.kc-it { display: flex; gap: 10px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid #26323A; background: none; color: #fff; text-align: left; font-size: 18px; font-weight: 700; }
.kc-it i { min-width: 32px; font-style: normal; color: #F5BA0A; }
.kc-it small { display: block; margin-top: 2px; font-size: 14px; color: #FFB86B; }
.kc-it small.kc-ja { color: #7FE0A8; }
.kc-it.feito { opacity: .35; text-decoration: line-through; }
.kc-bt { margin: 12px; min-height: 54px; border: 0; border-radius: 12px; background: #2E9E5B; color: #fff; font-size: 18px; font-weight: 800; }
.kds-pronto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid #26323A; }
.kds-pronto p { margin: 0; color: #9AA7AD; font-weight: 700; font-size: 14px; }
.kds-pronto span { padding: 8px 12px; border-radius: 10px; background: #163F2A; color: #7FE0A8; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .kc.atraso { animation: none; } }

/* ---------- Caixa do dia ---------- */
.cx-faixa { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 10px; padding: 12px 14px; border: 0; border-radius: 14px; text-align: left; font-weight: 700; color: var(--tinta); }
.cx-faixa.fechado { background: var(--amarelo-claro); border: 1.5px dashed var(--amarelo); }
.cx-faixa.aberto { background: var(--sup); box-shadow: var(--sombra); }
.cx-faixa.antigo { border: 1.5px solid var(--vermelho); }
.cx-faixa > span:nth-child(2) { flex: 1; min-width: 0; }
.cx-faixa small { display: block; font-weight: 500; font-size: 13px; color: var(--texto2); }
.cx-faixa b { padding: 8px 12px; border-radius: 10px; background: var(--tinta); color: var(--bg); font-size: 13.5px; white-space: nowrap; }
.cx-ic { font-size: 24px; }
.cx-linha { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--linha); font-size: 15px; }
.cx-linha small { color: var(--texto2); font-size: 12.5px; }
.cx-linha b { white-space: nowrap; }
.cx-linha .neg, .lista .neg { color: var(--vermelho); }
.lista .pos { color: var(--verde); }
.cx-esp { display: flex; justify-content: space-between; align-items: center; margin: 10px 0; padding: 14px; border-radius: 14px; background: var(--tinta); color: var(--bg); }
.cx-esp strong { font-size: 26px; }
.cx-dif { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 12px 14px; border-radius: 14px; font-weight: 800; }
.cx-dif strong { font-size: 24px; }
.cx-dif.falta { background: var(--vermelho-claro); color: var(--vermelho); }
.cx-dif.sobra { background: var(--amarelo-claro); color: #8A6400; }
.cx-dif.ok { background: var(--verde-claro); color: var(--verde); }
.cx-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.cx-acoes .btn { margin: 0; }


/* =====================================================
   Hortifruti Rápido — cores da marca e telas novas
   ===================================================== */
:root, [data-theme="claro"] {
  --primario: #1F4732;
  --fab-bg: #1F4732;
  --marca: #1F4732;
}
[data-theme="escuro"] {
  --marca: #1D3328;
  /* correção v9: no escuro, o botão principal ficava com texto escuro sobre verde escuro */
  --primario: #2F6B4A; --sobre-primario: #FFFFFF;
  --fab-bg: #2F6B4A; --fab-tx: #FFFFFF;
}
.perfil, .kpi.escuro, .ic-escuro { background: var(--marca); }
[data-theme="escuro"] .kpi.escuro { background: var(--sup2); }
.tm-auto { background: linear-gradient(135deg, #F3F4F1 50%, #1F4732 50%); }

/* Topo com o botão de ajustes */
.topo-tx { min-width: 0; }
.topo-dir { display: flex; align-items: center; gap: 4px; flex: none; }
.topo-dir .status span { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-ajustes { color: var(--texto2); }
.btn-ajustes.ativo { background: var(--sup2); color: var(--tinta); }

/* Janela com rodapé fixo (total + salvar) */
.sheet-rodape { flex: none; padding: 0 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--linha); }
.sheet-rodape .btn-bloco { margin: 10px 0 0; }
.sheet-cheia .sheet-rodape { padding: 0; background: var(--sup); }
.sheet-cheia .sheet-rodape .barra-total { border-top: 0; max-width: 640px; margin: 0 auto; }
.espaco-rodape { height: 18px; }
.busca-linha { margin-top: 2px; }
.busca-linha .btn { flex: none; }

/* Cliente / fornecedor no topo da venda e da compra */
.cli-escolher {
  width: 100%; min-height: 64px; margin: 12px 0 0; padding: 8px 12px; border: 2px solid var(--borda); border-radius: 14px;
  background: var(--sup); display: flex; align-items: center; gap: 12px; text-align: left; color: var(--tinta);
}
.cli-escolher .lin-tx { font-size: 17px; }
.cli-escolher .lin-tx small:first-child { font-size: 12px; font-weight: 650; text-transform: none; }
.linha-avulsa { margin-bottom: 6px; border: 2px dashed var(--borda); background: transparent; box-shadow: none !important; }

/* Itens da venda/compra */
.lista-itens .item b { flex: none; font-size: 17px; }
.btn-tirar { width: 40px; height: 40px; font-size: 16px; color: var(--texto3); }
.preco-mudou { font-style: normal; color: var(--laranja); font-size: 12.5px; }
.chips-forma { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chips-forma button {
  min-height: 44px; padding: 0 16px; border: 2px solid var(--borda); border-radius: 99px; background: var(--sup);
  font-weight: 700; font-size: 15px; color: var(--texto2);
}
.chips-forma button.marcado { border-color: var(--marca); background: var(--verde-claro); color: var(--tinta); }

/* Seletor de produto: fração, quantidade e preço */
.seg-fracao button { font-size: 15px; padding: 0 4px; }
.qtd-linha { display: flex; align-items: center; gap: 8px; }
.btn-qtd { width: 58px; height: 58px; flex: none; border: 0; border-radius: 14px; background: var(--sup2); font-size: 28px; font-weight: 700; color: var(--tinta); }
.btn-qtd:active { transform: scale(.96); }
.campo-qtd { margin: 0; text-align: center; font-size: 26px; font-weight: 800; min-height: 58px; }
.sp-resumo { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 6px 2px 0; color: var(--texto2); font-size: 14.5px; }
.sp-resumo strong { color: var(--tinta); font-size: 22px; }
.aviso-leve { background: var(--amarelo-claro); }

/* Listas de vendas e compras */
.venda-lin .linha-texto { min-width: 0; }
.corta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.venda-vl { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.venda-vl .tag { margin: 0; }
.venda-lin.cancelada strong, .venda-lin.cancelada .venda-vl b { text-decoration: line-through; color: var(--texto3); }
.tags-venda { margin: 0 0 10px; }
.forma-conta { background: var(--sup2); color: var(--tinta); }
.kpis + .lista, .kpis + h3 { margin-top: 4px; }
button.kpi { border: 0; text-align: left; color: var(--tinta); }

/* Margens */
.mg-ok { color: var(--verde); }
.mg-baixa { color: var(--vermelho); }
.mg-txt { min-width: 44px; text-align: right; font-size: 15px; }
.es-dir { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.es-dir b { font-size: 17px; }
.linha-lista.inativo { opacity: .6; }
.linha-lista em { font-style: normal; font-weight: 500; color: var(--texto3); font-size: 13px; }
small.zerado { color: var(--laranja) !important; }
.acoes-estoque { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 4px; }
.vazio-grande { padding: 18px 4px; text-align: center; color: var(--texto2); }
.vazio-grande p { margin: 0 0 8px; }

/* Preços por fração no cadastro do produto e na revisão de preços */
.preco-lin { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--linha); }
.preco-lin:last-child { border-bottom: 0; }
.campo-preco { width: 116px; flex: none; margin: 0; min-height: 48px; text-align: right; font-size: 18px; }
.dica-inline { font-weight: 500; color: var(--texto2); font-size: 13px; }
.usado { font-style: normal; font-size: 11.5px; font-weight: 800; color: var(--verde); margin-left: 4px; }
.reaj-lin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--linha); }
.reaj-lin:last-child { border-bottom: 0; }
.reaj-lin .lin-tx { flex: 1 1 150px; }
.btn-sug { flex-basis: 100%; min-height: 36px; border: 0; border-radius: 10px; background: var(--verde-claro); color: var(--verde); font-weight: 750; font-size: 14px; }
.alerta-margem { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--amarelo-claro); font-size: 14.5px; }
.alerta-margem p { margin: 0 0 6px; }
.alerta-margem small { color: var(--texto2); }

/* Ajustes de custo */
.opcoes-custo { display: flex; flex-direction: column; gap: 8px; }
.opcoes-custo button {
  padding: 12px 14px; border: 2px solid var(--borda); border-radius: 14px; background: var(--sup);
  text-align: left; display: flex; flex-direction: column; gap: 3px; color: var(--tinta);
}
.opcoes-custo button small { color: var(--texto2); font-size: 13.5px; }
.opcoes-custo button.marcado { border-color: var(--marca); background: var(--verde-claro); }
.sufixo { font-size: 20px; align-self: center; }
.linha-campo .sufixo + * { flex: none; }

/* Finanças */
.dre > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--sup); margin-bottom: 6px; }
.dre > div span { display: flex; flex-direction: column; }
.dre > div small { color: var(--texto2); font-size: 12.5px; }
.dre > div b { flex: none; }
.mg-dupla { flex: none; display: flex; gap: 12px; }
.mg-dupla > span { display: flex; flex-direction: column; align-items: flex-end; }
.mg-dupla small { font-size: 11.5px; }
.prod-mg .linha-texto { min-width: 0; }

/* Extrato */
.extrato-txt { font-size: 14px; font-family: ui-monospace, Menlo, Consolas, monospace; line-height: 1.45; }
.contagem .campo-preco { width: 110px; }
.linha-lista > .mg-dupla { flex-direction: row; }
#view-vendas, #view-compras, #view-estoque { padding-bottom: 72px; }

/* Nova venda em grade (v2) */
.cli-escolher.cli-curto { min-height: 52px; padding: 6px 10px; }
.cli-escolher.cli-curto .emp-av { width: 32px; height: 32px; font-size: 13px; }
.cat-fixo { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 10px 0 2px; }
.campo-busca { margin: 0; min-height: 46px; font-size: 16px; }
.cat-fixo .chips-cat { padding: 8px 0 6px; border: 0; background: transparent; }
.grade-prod { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.cartao-prod { background: var(--sup); border-radius: 14px; padding: 9px 9px 10px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 6px; }
.cp-cab { display: flex; flex-direction: column; min-width: 0; padding: 0 2px; }
.cp-cab b { font-size: 16px; line-height: 1.2; }
.cp-cab small { font-size: 12.5px; color: var(--texto2); }
.cp-fr { display: flex; gap: 5px; }
.cp-fr button {
  position: relative; flex: 1; min-width: 0; min-height: 54px; padding: 4px 2px; border: 1.5px solid var(--borda); border-radius: 10px;
  background: var(--bg); font-weight: 750; font-size: 14px; color: var(--tinta); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15;
}
.cp-fr button small { font-weight: 600; font-size: 12px; color: var(--texto2); }
.cp-fr button.tem { border-color: var(--verde); background: var(--verde-claro); }
.cp-fr button:active { transform: scale(.95); }
.cp-fr button i {
  position: absolute; top: -8px; right: -5px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px;
  background: var(--verde); color: #fff; font-style: normal; font-size: 12px; font-weight: 800; display: grid; place-items: center;
}
.cp-sem { min-height: 54px; border: 1.5px dashed var(--borda); border-radius: 10px; background: none; color: var(--vermelho); font-weight: 650; font-size: 13px; }
.lista-pedido { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.ped-lin { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: var(--sup); box-shadow: var(--sombra); }
.ped-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.ped-tx b { font-size: 16px; }
.ped-tx small { font-size: 12.5px; }
.ped-preco { border: 0; background: none; padding: 2px 0; font-size: 13.5px; color: var(--texto2); text-align: left; }
.ped-preco:disabled { opacity: 1; }
.ti-lapis { font-style: normal; color: var(--azul); }
.ped-qtd { display: flex; align-items: center; gap: 4px; flex: none; }
.ped-qtd button { width: 40px; height: 44px; border: 0; border-radius: 10px; background: var(--sup2); font-size: 22px; font-weight: 700; color: var(--tinta); }
.ped-qtd .campo { width: 56px; min-height: 44px; margin: 0; padding: 4px; text-align: center; font-size: 17px; font-weight: 800; }
.ped-sub { flex: none; min-width: 72px; text-align: right; font-size: 15px; }
@media (max-width: 380px) { .ped-sub { min-width: 60px; font-size: 14px; } .ped-qtd .campo { width: 48px; } }

/* Nova compra em grade (v3) */
.compra-lin { flex-direction: column; align-items: stretch; gap: 6px; }
.cl-l1 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cl-l1 b:first-child { font-size: 16px; }
.cl-l2 { display: flex; align-items: center; gap: 6px; }
.cl-x { flex: none; color: var(--texto2); font-weight: 650; font-size: 14px; }
.cl-preco { flex: 1; min-width: 0; margin: 0; min-height: 44px; text-align: right; font-size: 17px; font-weight: 700; }
.cl-dica { color: var(--texto2); font-size: 12.5px; }
.falta-preco { box-shadow: inset 0 0 0 2px var(--vermelho); }
.falta-preco .cl-preco { border-color: var(--vermelho); }

/* Desenhos dos produtos (v3) */
.prod-ic { flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--icone-fundo); }
.prod-ic svg, .desenho-op svg { fill: none; stroke: none; }
.prod-ini { font-weight: 800; letter-spacing: .02em; color: var(--tinta); }
.prod-ini.cat-fruta { background: var(--amarelo-claro); color: #8A6400; }
.prod-ini.cat-verdura { background: var(--verde-claro); color: var(--verde); }
.prod-ini.cat-legume { background: var(--laranja-claro); color: var(--laranja); }
.prod-ini.cat-outros { background: var(--sup2); color: var(--texto2); }
[data-theme="escuro"] .prod-ini.cat-fruta { color: var(--amarelo); }
.cp-cab { flex-direction: row; align-items: center; gap: 8px; padding: 0; }
.cp-tx { min-width: 0; display: flex; flex-direction: column; }
.cp-tx b { font-size: 15.5px; line-height: 1.2; overflow-wrap: anywhere; }
.cp-tx small { font-size: 12px; color: var(--texto2); }
.linha-lista > .prod-ic { margin-left: -4px; }
.desenho-atual { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; padding: 8px 12px; border-radius: 14px; background: var(--sup); }
.grade-desenhos .desenho-op svg { width: 44px; height: 44px; }

/* Lista para o CEASA (v6) */
.btn-lista { margin-top: 12px; }
.btn-lista svg { color: var(--amarelo); }
.lembrete-lista {
  width: 100%; display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 10px 14px; border: 0; border-radius: 14px;
  background: var(--amarelo-claro); color: var(--tinta); text-align: left;
}
.lembrete-lista > span:first-child { width: 36px; height: 36px; border-radius: 10px; background: var(--marca); color: var(--amarelo); display: grid; place-items: center; flex: none; }
.lc-cfg { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.lc-rot { width: 96px; font-weight: 650; font-size: 14.5px; }
.lc-cfg .seg { flex: 1; min-width: 200px; }
.lc-cfg .seg button { min-height: 40px; font-size: 14px; }
.lc-folga { width: 92px; flex: none; margin: 0; min-height: 44px; font-size: 15px; text-align: center; }
.lc-grupo { margin-top: 14px; }
.lc-gcab { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 2px 6px; }
.lc-gcab > span { display: flex; flex-direction: column; }
.lc-gcab b { font-size: 15.5px; }
.lc-gcab small { color: var(--texto2); font-size: 13px; }
.lc-lancar { min-height: 40px; padding: 0 12px; font-size: 14px; }
.lc-lin { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 6px; border-radius: 14px; background: var(--sup); box-shadow: var(--sombra); }
.lc-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lc-tx b { font-size: 15.5px; }
.lc-tx small { font-size: 12px; color: var(--texto2); line-height: 1.3; }
.lc-chk { width: 30px; height: 30px; flex: none; border: 2px solid var(--borda); border-radius: 9px; background: var(--bg); font-weight: 800; color: #fff; }
.lc-chk.on { background: var(--verde); border-color: var(--verde); }
.lc-lin.ok { opacity: .6; }
.lc-lin.ok .lc-tx b { text-decoration: line-through; }
.lc-qtd b { min-width: 52px; text-align: center; font-size: 16px; }
.lc-qtd b small { font-size: 12px; font-weight: 600; color: var(--texto2); }
.lc-qtd button { width: 36px; height: 40px; }
.lc-sufic { margin: 14px 2px 4px; color: var(--texto2); font-size: 14px; }

/* Pedido pelo link (v7) */
.cartao-pedidos {
  width: 100%; display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 10px 14px; border: 0; border-radius: 14px;
  background: var(--verde); color: #fff; text-align: left;
}
.cartao-pedidos .lin-tx small { color: rgba(255,255,255,.85); }
.cartao-pedidos .lin-seta { color: #fff; }
.cp-num { width: 36px; height: 36px; border-radius: 99px; background: #fff; color: var(--verde); display: grid; place-items: center; font-weight: 800; font-size: 17px; flex: none; }
.pl-ped { background: var(--sup); border-radius: 16px; padding: 12px; margin-bottom: 12px; box-shadow: var(--sombra); }
.pl-ped .linha-lista { box-shadow: none; background: var(--bg); }
.pl-cab { display: flex; flex-direction: column; margin-bottom: 8px; }
.pl-cab b { font-size: 17px; }
.pl-cab small { color: var(--texto2); font-size: 13px; }
.pl-cab small b { font-size: 13px; color: var(--tinta); }
.pl-obs { margin: 8px 2px 0; color: var(--texto2); font-style: italic; }
.pl-bts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.link-pedido { margin: 12px 0 4px; padding: 12px; border-radius: 14px; background: var(--verde-claro); }
.link-pedido .btn-bloco { margin: 10px 0 0; }

/* Página do cliente (pedido.html) */
.pagina-pedido .topo { position: static; }
.pagina-pedido main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.pp-rodape { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--sup); border-top: 1px solid var(--borda); }
.pp-rodape .barra-total { max-width: 720px; margin: 0 auto; border-top: 0; }
.pp-fixo { padding-top: calc(10px + env(safe-area-inset-top)); }
.pp-aviso { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: var(--amarelo-claro); font-weight: 600; font-size: 15px; }
.pp-repetir {
  width: 100%; display: flex; flex-direction: column; gap: 2px; margin: 0 0 6px; padding: 12px 14px; border: 2px dashed var(--verde); border-radius: 14px;
  background: var(--verde-claro); color: var(--tinta); text-align: left; font-weight: 750; font-size: 16px;
}
.pp-repetir small { font-weight: 500; font-size: 13px; color: var(--texto2); }
.pp-tit { font-size: 20px; margin: 6px 2px 0; }
.pp-erro { padding: 40px 10px; text-align: center; color: var(--texto2); font-size: 17px; }
.pp-ok { text-align: center; padding-top: 10px; }
.pp-ok-ic { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 99px; background: var(--verde); color: #fff; font-size: 34px; font-weight: 800; display: grid; place-items: center; }
.pp-ok h2 { margin: 0 0 6px; }
.pp-ok > p { color: var(--texto2); margin: 0 0 14px; }
.pp-ok .lista, .pp-ok .total-grande { text-align: left; }

/* =====================================================
   Visual premium (v9): efeito nos botões, sombras em
   camadas e alça nas janelas. Só estilo, nada de lógica.
   - Mouse: sobe 1 px e a sombra cresce (só em aparelho com mouse,
     para o efeito não "grudar" no celular depois do toque).
   - Toque/clique: "afunda" um pouco.
   - Quem ativou "reduzir movimento" fica sem animação.
   ===================================================== */
:root, [data-theme="claro"] {
  --sombra: 0 1px 2px rgba(27, 37, 41, .06), 0 2px 6px rgba(27, 37, 41, .05);
  --sombra-alta: 0 2px 4px rgba(27, 37, 41, .06), 0 12px 24px rgba(27, 37, 41, .10);
  --sombra-btn: 0 1px 2px rgba(27, 37, 41, .12), 0 4px 12px rgba(31, 71, 50, .22);
  --sombra-btn-alta: 0 2px 4px rgba(27, 37, 41, .12), 0 10px 22px rgba(31, 71, 50, .30);
  --sombra-verde: 0 1px 2px rgba(27, 37, 41, .12), 0 4px 12px rgba(24, 121, 74, .28);
  --sombra-verde-alta: 0 2px 4px rgba(27, 37, 41, .12), 0 10px 22px rgba(24, 121, 74, .36);
  --sombra-janela: 0 -2px 6px rgba(27, 37, 41, .06), 0 -16px 40px rgba(27, 37, 41, .20);
  --anel-foco: 0 0 0 3px rgba(31, 71, 50, .35);
}
[data-theme="escuro"] {
  --sombra: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .22);
  --sombra-alta: 0 2px 4px rgba(0, 0, 0, .40), 0 12px 26px rgba(0, 0, 0, .40);
  --sombra-btn: 0 1px 2px rgba(0, 0, 0, .40), 0 4px 12px rgba(0, 0, 0, .30);
  --sombra-btn-alta: 0 2px 4px rgba(0, 0, 0, .45), 0 10px 22px rgba(0, 0, 0, .45);
  --sombra-verde: 0 1px 2px rgba(0, 0, 0, .40), 0 4px 14px rgba(52, 168, 106, .22);
  --sombra-verde-alta: 0 2px 4px rgba(0, 0, 0, .45), 0 10px 24px rgba(52, 168, 106, .32);
  --sombra-janela: 0 -2px 8px rgba(0, 0, 0, .35), 0 -18px 44px rgba(0, 0, 0, .55);
  --anel-foco: 0 0 0 3px rgba(245, 186, 10, .45);
}

/* ---------- Transição comum ---------- */
.btn, .btn-icone, .btn-qtd, .forma, .fab, .opcao, .produto, .cartao-prod,
.stepper button, .ped-qtd button, .lc-qtd button, .cp-fr button, .cp-sem, .lc-chk,
.chips-cat button, .chip-cat, .chips-forma button, .seg button, .grade-notas button,
.planos button, .temas button, .modulo-op, .opcoes-custo button, .desenho-op,
button.linha-lista, button.kpi, .lin-aj, .emp, .pessoa, .cx-faixa, .nav-item svg,
.btn-sug, .toast-acao, .interruptor {
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease,
              border-color .2s ease, filter .2s ease, opacity .2s ease;
}

/* ---------- Botões principais ---------- */
.btn-primario, .forma:not(.forma-conta) { box-shadow: var(--sombra-btn); }
.btn-sucesso, .btn-whats { box-shadow: var(--sombra-verde); }
.btn-secundario, .voltar-app, .btn-whats-claro, .btn-qr-pix { box-shadow: var(--sombra); }
.fab { box-shadow: 0 2px 4px rgba(0, 0, 0, .14), 0 8px 22px rgba(31, 71, 50, .34); }
[data-theme="escuro"] .fab { box-shadow: 0 2px 4px rgba(0, 0, 0, .4), 0 8px 22px rgba(0, 0, 0, .45); }

/* Toque e clique: afunda um pouco */
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); filter: brightness(.96); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.btn-texto:active:not(:disabled), .btn-texto-perigo:active:not(:disabled) { box-shadow: none; filter: none; opacity: .7; }
.forma:active, .fab:active { transform: translateY(1px) scale(.97); filter: brightness(.96); }
.btn-icone:active, .btn-qtd:active, .stepper button:active, .ped-qtd button:active,
.lc-qtd button:active { transform: scale(.92); }
.chips-cat button:active, .chip-cat:active, .chips-forma button:active, .seg button:active,
.grade-notas button:active, .planos button:active, .temas button:active, .modulo-op:active,
.opcoes-custo button:active, .desenho-op:active, .btn-sug:active { transform: scale(.96); }
.lc-chk:active { transform: scale(.88); }
.interruptor:active { transform: scale(.95); }

/* Frações (cx, meia, kg): "pulo" rápido para confirmar que somou */
.cp-fr button:active { transform: scale(.92); background: var(--verde-claro); border-color: var(--verde); }
.cp-fr button.tem { box-shadow: 0 2px 8px rgba(24, 121, 74, .18); }
.cp-fr button i { box-shadow: 0 2px 6px rgba(24, 121, 74, .35); animation: pulo-num .22s ease; }
@keyframes pulo-num { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ---------- Cartões e linhas ---------- */
.produto, .cartao-prod, .opcao, button.linha-lista:not(.estatica), button.kpi, .emp, .pessoa {
  box-shadow: var(--sombra);
}
.linha-lista.estatica { box-shadow: var(--sombra); }
.produto:active, .opcao:active, button.linha-lista:not(.estatica):not(:disabled):active,
button.kpi:active, .emp:active, .pessoa:active, .cx-faixa:active {
  transform: scale(.985); box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.lin-aj:active:not(:disabled) { background: var(--sup2); }

/* ---------- Efeitos de mouse (computador) ---------- */
@media (hover: hover) and (pointer: fine) {
  .btn, .btn-icone, .forma, .fab, .opcao, .produto, .cp-fr button, .chips-cat button,
  .chip-cat, .seg button, .grade-notas button, .planos button, .temas button, .modulo-op,
  .opcoes-custo button, .desenho-op, button.linha-lista, button.kpi, .lin-aj, .emp,
  .pessoa, .cx-faixa, .lc-chk, .btn-qtd, .stepper button, .ped-qtd button, .nav-item { cursor: pointer; }

  .btn-primario:hover:not(:disabled), .forma:not(.forma-conta):hover {
    transform: translateY(-1px); box-shadow: var(--sombra-btn-alta); filter: brightness(1.08);
  }
  .btn-sucesso:hover:not(:disabled), .btn-whats:hover {
    transform: translateY(-1px); box-shadow: var(--sombra-verde-alta); filter: brightness(1.06);
  }
  .btn-secundario:hover:not(:disabled), .voltar-app:hover, .btn-whats-claro:hover,
  .btn-qr-pix:hover, .forma-conta:hover {
    transform: translateY(-1px); box-shadow: var(--sombra-alta);
  }
  .fab:hover { transform: translateY(-2px); filter: brightness(1.08); }
  .btn-texto:hover:not(:disabled) { color: var(--tinta); }
  .btn-texto-perigo:hover:not(:disabled) { background: var(--vermelho-claro); }
  .btn-icone:hover:not(:disabled) { background: var(--sup2); }
  .btn-qtd:hover, .stepper button:hover, .ped-qtd button:hover, .lc-qtd button:hover {
    box-shadow: var(--sombra-alta); filter: brightness(.98);
  }

  .produto:hover, .opcao:hover, button.linha-lista:not(.estatica):not(:disabled):hover,
  button.kpi:hover, .emp:hover, .pessoa:hover, .cx-faixa.aberto:hover {
    transform: translateY(-2px); box-shadow: var(--sombra-alta);
  }
  .cartao-prod:hover { box-shadow: var(--sombra-alta); }
  .lin-aj:hover:not(:disabled) { background: color-mix(in srgb, var(--sup2) 60%, var(--sup)); }

  .cp-fr button:hover { border-color: var(--verde); box-shadow: 0 4px 10px rgba(27, 37, 41, .10); }
  .chips-cat button:hover:not(.ativo), .chip-cat:hover:not(.marcado),
  .chips-forma button:hover:not(.marcado), .grade-notas button:hover:not(.marcado) {
    box-shadow: var(--sombra-alta); transform: translateY(-1px);
  }
  .seg button:hover:not(.marcado) { color: var(--tinta); }
  .planos button:hover:not(.marcado), .temas button:hover:not(.marcado), .modulo-op:hover:not(.marcado),
  .opcoes-custo button:hover:not(.marcado), .desenho-op:hover:not(.marcado) {
    border-color: var(--texto3); box-shadow: var(--sombra-alta);
  }
  .lc-chk:hover:not(.on) { border-color: var(--verde); }
  .nav-item:hover:not(.ativo) { color: var(--tinta); }
  .nav-item:hover:not(.ativo) svg { background: var(--sup2); }
}

/* ---------- Teclado: anel de foco visível ---------- */
.btn:focus-visible, .btn-icone:focus-visible, .forma:focus-visible, .fab:focus-visible,
.opcao:focus-visible, .produto:focus-visible, .cp-fr button:focus-visible, .seg button:focus-visible,
button.linha-lista:focus-visible, .lin-aj:focus-visible, .chips-cat button:focus-visible,
.nav-item:focus-visible, .lc-chk:focus-visible, .btn-qtd:focus-visible {
  outline: none; box-shadow: var(--anel-foco);
}
.campo:focus-visible, .campo:focus { box-shadow: var(--anel-foco); }

/* ---------- Janelas ---------- */
.sheet { box-shadow: var(--sombra-janela); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.sheet:not(.sheet-cheia)::before {
  content: ""; flex: none; display: block;
  width: 40px; height: 4px; margin: 8px auto 0; border-radius: 99px;
  background: var(--borda);
}
.sheet:not(.sheet-cheia) .sheet-topo { padding-top: 4px; }
.sheet-cheia { box-shadow: none; }
.sheet-rodape { box-shadow: 0 -6px 16px rgba(27, 37, 41, .06); position: relative; }
[data-theme="escuro"] .sheet-rodape { box-shadow: 0 -6px 16px rgba(0, 0, 0, .3); }
.sheet-cheia .sheet-rodape { box-shadow: 0 -4px 14px rgba(27, 37, 41, .08); }
.bandeja { box-shadow: var(--sombra-janela); }

/* Barras fixas e avisos */
.nav { box-shadow: 0 -4px 16px rgba(27, 37, 41, .06); }
[data-theme="escuro"] .nav { box-shadow: 0 -4px 16px rgba(0, 0, 0, .35); }
.toast { box-shadow: 0 4px 10px rgba(0, 0, 0, .16), 0 14px 32px rgba(0, 0, 0, .18); }
.grupo-aj, .cab-emp, .passo, .cartao-form, .pl-ped, .meta-card { box-shadow: var(--sombra); }
.perfil { box-shadow: 0 2px 4px rgba(0, 0, 0, .10), 0 10px 26px rgba(31, 71, 50, .28); }
[data-theme="escuro"] .perfil { box-shadow: var(--sombra-alta); }

/* ---------- Reduzir movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .btn:active, .forma:active, .fab:active, .produto:active, .opcao:active, .cp-fr button:active,
  button.linha-lista:active, .btn-icone:active, .btn-qtd:active, .stepper button:active { transform: none !important; }
  @media (hover: hover) { *:hover { transform: none !important; } }
}

/* =====================================================
   Gráficos de Finanças (v10)
   ===================================================== */
:root, [data-theme="claro"] {
  --g-lucro: #1D9E75; --g-perda: #E24B4A; --g-desp: #EF9F27; --g-custo: #9A9C95; --g-cli: #378ADD;
}
[data-theme="escuro"] {
  --g-lucro: #2FB585; --g-perda: #EE6B68; --g-desp: #F2AA3F; --g-custo: #6E7370; --g-cli: #5A9FE6;
}
.graf { margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: var(--sup); box-shadow: var(--sombra); }
.graf-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.graf-cab b { font-size: 15.5px; }
.graf-cab small { font-size: 12.5px; color: var(--texto2); font-weight: 600; white-space: nowrap; }
.graf-info { margin: 6px 0 0; font-size: 13px; color: var(--texto2); }
.graf-info b { color: var(--tinta); }
.graf-info.neg { color: var(--vermelho); font-weight: 650; }

/* Vendas por dia */
.graf-dias { display: block; width: 100%; height: auto; overflow: visible; fill: none; stroke: none; stroke-width: 0; }
.graf-dias rect, .graf-dias text { stroke: none; }
.graf-dias .gd-alvo { fill: transparent; cursor: pointer; }
.graf-dias .gd-barra { fill: var(--g-lucro); transition: opacity .15s ease; }
.graf-dias .gd-hoje .gd-barra { fill: var(--amarelo); }
.graf-dias:has(.gd.marcado) .gd-barra { opacity: .45; }
.graf-dias .gd.marcado .gd-barra { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .graf-dias .gd:hover .gd-barra { opacity: .75; } }
.graf-media { stroke: var(--texto3); stroke-width: 1; stroke-dasharray: 3 3; }
.graf-base { stroke: var(--borda); stroke-width: 1; }
.graf-rot text { font-size: 11px; fill: var(--texto3); font-family: inherit; }
.graf-rot .graf-rot-hoje { fill: var(--tinta); font-weight: 700; }

/* De cada R$ 100 */
.graf-pilha { display: flex; gap: 2px; height: 28px; border-radius: 9px; overflow: hidden; background: var(--sup2); }
.graf-pilha span { min-width: 3px; }
.gp-custo { background: var(--g-custo); }
.gp-perda { background: var(--g-perda); }
.gp-desp { background: var(--g-desp); }
.gp-lucro { background: var(--g-lucro); }
.gp-cli { background: var(--g-cli); }
.graf-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--texto2); font-weight: 600; }
.graf-leg span { display: inline-flex; align-items: center; gap: 5px; }
.graf-leg span.forte { color: var(--tinta); font-weight: 750; }
.graf-leg i { width: 11px; height: 11px; border-radius: 3px; flex: none; }

/* Barras deitadas (produtos e clientes) */
.graf-lin { display: flex; align-items: center; gap: 10px; margin: 9px 0; font-size: 14px; }
.graf-nome { width: 104px; flex: none; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.graf-trilho { flex: 1; min-width: 0; height: 14px; border-radius: 7px; background: var(--sup2); display: flex; gap: 2px; overflow: hidden; }
.graf-trilho i { display: block; height: 100%; }
.graf-trilho i:first-child { border-radius: 7px 0 0 7px; }
.graf-trilho i:last-child { border-radius: 0 7px 7px 0; }
.graf-trilho i:only-child { border-radius: 7px; }
.graf-lin > b { flex: none; min-width: 76px; text-align: right; font-size: 14.5px; }
.graf + .dica { margin-top: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .graf-trilho i, .graf-pilha span { animation: graf-cresce .45s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
  .graf-dias .gd-barra { animation: graf-sobe .4s cubic-bezier(.2, .8, .2, 1) both; transform-box: fill-box; transform-origin: bottom; }
}
@keyframes graf-cresce { from { transform: scaleX(0); } }
@keyframes graf-sobe { from { transform: scaleY(0); } }
