/* Lápis na Orelha · paleta Platina com Poppins (quadro aprovado em 22/10/2026) */
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(/fontes/poppins-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(/fontes/poppins-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(/fontes/poppins-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url(/fontes/poppins-latin-700-normal.woff2) format('woff2'); }

:root {
  --fundo: #0a0a0b; --sup: #161618; --linha: #26262a; --texto: #f4f4f5; --sec: #a1a1aa; --dica: #8b8b94;
  --dest: #e7e7ea; --t2: #a8a8b0; --t3: #6e6e76; --t4: #3f3f46;
  --aviso: #fbbf24; --ruim: #fca5a5; --bom: #86efac;
  --raio: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fundo); color: var(--texto); font-family: Poppins, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.45; }
button, input, select { font-family: inherit; color: inherit; }
a { color: var(--dest); }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--dest); outline-offset: 2px; }
.oculto-leitor { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.topo { padding: 24px 20px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topo h1 { margin: 0; font-size: 17px; font-weight: 600; }
.marca { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.chip { font-size: 12px; color: var(--sec); border: 1px solid var(--linha); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.conteudo { padding: 0 20px 140px; flex: 1; }
.conteudo.com-rodape { padding-bottom: 300px; }

.faixa-exemplo { margin: 14px 20px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--sup); border: 1px dashed var(--t4); border-radius: 14px; padding: 10px 14px; font-size: 13px; color: var(--sec); }
.faixa-exemplo button { white-space: nowrap; background: none; border: 0; color: var(--dest); font-size: 13px; font-weight: 600; text-decoration: underline; padding: 6px 0; min-height: 36px; cursor: pointer; }

.secao { margin: 22px 0 8px; font-size: 13px; font-weight: 600; color: var(--sec); letter-spacing: .04em; text-transform: uppercase; }
.dica { font-size: 12px; color: var(--dica); margin-top: 6px; }
.cartao { background: var(--sup); border: 1px solid var(--linha); border-radius: 18px; padding: 16px 18px; }
.cartao + .cartao { margin-top: 10px; }
.grande { font-size: 36px; font-weight: 600; line-height: 1.1; }
.ficticio { font-size: 12px; color: var(--sec); }
.lista { background: var(--sup); border: 1px solid var(--linha); border-radius: 18px; padding: 0 16px; }
.linha { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--linha); }
.linha:last-child { border-bottom: 0; }
.grade2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grade3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.caixa { background: var(--sup); border: 1px solid var(--linha); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.caixa label, .rotulo { font-size: 12px; color: var(--sec); }

/* campos */
.campo { width: 100%; min-width: 0; background: transparent; border: 0; border-bottom: 1px solid var(--t4); border-radius: 0; font-size: 16px; font-weight: 600; padding: 4px 0; }
.campo:focus { outline: none; border-bottom-color: var(--dest); }
.campo::placeholder, .entrada::placeholder { color: var(--t3); font-weight: 400; }
.entrada { width: 100%; height: 48px; border-radius: 14px; border: 1px solid var(--linha); background: var(--sup); font-size: 16px; padding: 0 14px; }
.entrada:focus { outline: none; border-color: var(--dest); }
.entrada.codigo { height: 56px; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; }
.entrada.codigo::placeholder { text-transform: none; letter-spacing: 0; }
select.entrada, select.campo { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--sec) 50%), linear-gradient(135deg, var(--sec) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
select.campo { font-weight: 500; }
select option { background: var(--sup); color: var(--texto); }
.linha .campo.nome { font-weight: 400; font-size: 15px; border-bottom-color: transparent; }
.linha .campo.nome:focus { border-bottom-color: var(--dest); }
.linha .campo.valor { width: 110px; text-align: right; }
.sufixo { display: flex; align-items: baseline; gap: 4px; }
.sufixo span { font-size: 13px; color: var(--sec); }

/* botões */
.botao { width: 100%; min-height: 54px; border-radius: 16px; border: 0; background: var(--dest); color: var(--fundo); font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer; }
.botao:hover { color: var(--fundo); background: #fff; }
.botao.sec { background: transparent; color: var(--texto); border: 1px solid var(--linha); font-weight: 500; font-size: 15px; }
.botao.sec:hover { border-color: var(--t3); }
.botao.perigo { background: transparent; color: var(--ruim); border: 1px solid #5b2a2a; font-weight: 500; font-size: 15px; }
.botao[disabled] { opacity: .5; cursor: default; }
.texto-botao { background: none; border: 0; color: var(--sec); font-size: 14px; padding: 10px 4px; min-height: 44px; cursor: pointer; }
.texto-botao:hover { color: var(--texto); }
.x { width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 12px; background: transparent; color: var(--sec); font-size: 22px; cursor: pointer; }
.x:hover { background: var(--linha); color: var(--texto); }
.mais { width: 100%; min-height: 48px; background: none; border: 0; color: var(--sec); font-size: 14px; text-align: left; cursor: pointer; }
.mais:hover { color: var(--texto); }
.voltar { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--sup); border: 0; cursor: pointer; }
.fab { position: fixed; right: max(20px, calc(50% - 220px)); bottom: 96px; width: 60px; height: 60px; border-radius: 20px; border: 0; background: var(--dest); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 24px rgba(0,0,0,.5); z-index: 5; }
.passo { display: flex; gap: 8px; }
.passo button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--linha); background: var(--fundo); font-size: 22px; cursor: pointer; }
.passo button.claro { background: var(--dest); color: var(--fundo); border: 0; }

/* abas internas (segmentado) */
.segmentos { margin-top: 12px; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; background: var(--sup); border: 1px solid var(--linha); border-radius: 14px; padding: 4px; }
.segmentos button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--sec); font-size: 13px; cursor: pointer; }
.segmentos button[aria-pressed="true"] { background: var(--dest); color: var(--fundo); font-weight: 600; }

/* itens de lista (insumos, receitas) */
.item { width: 100%; text-align: left; background: var(--sup); border: 1px solid var(--linha); border-radius: 16px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; cursor: pointer; text-decoration: none; color: var(--texto); }
.item:hover { border-color: var(--t4); color: var(--texto); }
.item + .item { margin-top: 8px; }
.item .nome { font-size: 15px; font-weight: 500; }
.item .sub { font-size: 12px; color: var(--sec); margin-top: 2px; }
.item .dir { text-align: right; flex-shrink: 0; }
.item .valor { font-size: 15px; font-weight: 600; }
.falta { color: var(--aviso) !important; }
.receita-card { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 16px; border-radius: 18px; }
.receita-card .cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.receita-card .cab span:first-child { font-size: 16px; font-weight: 600; }
.receita-card .pe { display: flex; justify-content: space-between; font-size: 13px; gap: 8px; }

/* barra de composição do custo */
.barra { height: 8px; border-radius: 5px; overflow: hidden; display: flex; background: var(--linha); }
.barra.alta { height: 10px; }
.barra i { display: block; height: 100%; }
.c1 { background: var(--dest); } .c2 { background: var(--t2); } .c3 { background: var(--t3); } .c4 { background: var(--t4); }
.legenda { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font-size: 13px; color: var(--sec); }
.legenda b { font-weight: 500; color: var(--texto); }
.legenda i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* canais (Preços) */
.canal { background: var(--sup); border: 1px solid var(--linha); border-radius: 16px; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.canal + .canal { margin-top: 10px; }
.canal.destaque { border-color: var(--dest); }
.canal .preco { font-size: 24px; font-weight: 600; white-space: nowrap; }
.canal .detalhe { font-size: 12px; color: var(--sec); margin-top: 2px; }
.status { margin-top: 12px; background: var(--sup); border: 1px solid var(--t4); border-radius: 14px; padding: 12px 14px; font-size: 13px; color: var(--sec); }
.status b { color: var(--texto); font-weight: 600; }
.st-NA_META { color: var(--bom) !important; } .st-ABAIXO_DA_META { color: var(--aviso) !important; } .st-ABAIXO_DO_CUSTO { color: var(--ruim) !important; }
.erro-msg { color: var(--aviso); font-size: 13px; }

/* ficha técnica */
.titulo-ficha { width: 100%; margin-top: 14px; font-size: 24px; font-weight: 600; background: transparent; border: 0; border-bottom: 1px solid transparent; padding: 2px 0; }
.titulo-ficha:focus { outline: none; border-bottom-color: var(--dest); }
.ingr { padding: 8px 0; border-bottom: 1px solid var(--linha); }
.ingr:last-child { border-bottom: 0; }
.ingr .l1 { display: flex; align-items: center; gap: 6px; }
.ingr .l1 select { flex: 1; min-width: 0; }
.ingr .l2 { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ingr .l2 .campo { width: 90px; }
.ingr .l2 select.campo { width: 74px; }
.ingr .l2 .custo { margin-left: auto; font-size: 14px; }
.ingr .problema { font-size: 12px; color: var(--aviso); margin-top: 4px; }
.tams { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin-top: 6px; }
.tams label { font-size: 11px; color: var(--sec); display: block; }

.rodape-ficha { position: fixed; left: 0; right: 0; bottom: 78px; z-index: 6; padding: 0 12px; pointer-events: none; }
.rodape-ficha > div { pointer-events: auto; max-width: 456px; margin: 0 auto; background: var(--sup); border: 1px solid var(--t4); border-radius: 20px; padding: 12px 16px; box-shadow: 0 -8px 30px rgba(0,0,0,.6); }
.rodape-ficha .topo-r { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rodape-ficha .topo-r span:last-child { font-size: 24px; font-weight: 600; }
.precos3 { margin-top: 10px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; text-align: center; }
.precos3 div { background: var(--fundo); border: 1px solid var(--linha); border-radius: 12px; padding: 8px 4px; }
.precos3 div:first-child { background: var(--dest); color: var(--fundo); border-color: var(--dest); }
.precos3 small { display: block; font-size: 11px; color: var(--sec); }
.precos3 div:first-child small { color: #3f3f46; font-weight: 500; }
.precos3 b { font-size: 16px; font-weight: 700; }
.tabela-tam { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.tabela-tam th { font-weight: 500; color: var(--sec); font-size: 11px; text-align: right; padding: 2px 4px; }
.tabela-tam td { text-align: right; padding: 4px; border-top: 1px solid var(--linha); white-space: nowrap; }
.tabela-tam th:first-child, .tabela-tam td:first-child { text-align: left; }

/* navegação de baixo */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; background: var(--fundo); border-top: 1px solid var(--linha); padding: 8px 6px calc(10px + env(safe-area-inset-bottom)); }
.nav div { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.nav button { min-height: 52px; border: 0; background: none; color: var(--sec); font-size: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; }
.nav button svg { width: 22px; height: 22px; }
.nav button[aria-current="page"] { color: var(--dest); font-weight: 600; }

/* folha (edição de insumo, avisos) */
.veu { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.folha { width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto; background: var(--fundo); border: 1px solid var(--linha); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); }
.folha h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.folha .acoes { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.form-linha { margin-top: 14px; }
.form-linha > label { display: block; font-size: 13px; color: var(--sec); margin-bottom: 6px; font-weight: 500; }

/* tela inteira (entrar, navegador interno) */
.tela-cheia { padding: 56px 24px 32px; display: flex; flex-direction: column; min-height: 100dvh; }
.tela-cheia h1 { margin: 28px 0 0; font-size: 30px; font-weight: 600; line-height: 1.15; }
.tela-cheia .sub { margin-top: 6px; font-size: 15px; color: var(--sec); }
.aviso-cartao { background: var(--sup); border: 1px solid var(--linha); border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 12px; color: var(--sec); line-height: 1.5; }
.msg { font-size: 13px; margin-top: 8px; }
.msg.ruim { color: var(--ruim); } .msg.bom { color: var(--bom); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 30; background: var(--dest); color: var(--fundo); font-weight: 500; font-size: 14px; border-radius: 12px; padding: 10px 16px; max-width: calc(100% - 32px); }
details.duvida { border-bottom: 1px solid var(--linha); }
details.duvida:last-child { border-bottom: 0; }
details.duvida summary { min-height: 52px; display: flex; align-items: center; font-size: 14px; cursor: pointer; list-style: none; }
details.duvida summary::-webkit-details-marker { display: none; }
details.duvida p { margin: 0 0 14px; font-size: 13px; color: var(--sec); }
.rodape-versao { margin-top: 24px; font-size: 12px; color: var(--dica); text-align: center; }
.vazio { text-align: center; color: var(--sec); font-size: 14px; padding: 28px 12px; }
[data-vivo="statusSync"] { display: flex; gap: 12px; align-items: center; }
.receita-card .cab .sub { white-space: nowrap; }
