/* Atifix Representante Comercial — estilo desktop (menu lateral, tabelas, teclado) */
:root {
  --azul: #0f2544; --azul-claro: #1c3a66; --laranja: #f5821f;
  --fundo: #f2f4f8; --branco: #fff; --texto: #1c2733; --cinza: #6b7a8c; --borda: #dde3ec;
  --verde: #1d9e55; --vermelho: #d13c3c; --amarelo: #d99a00;
  --menu-largura: 236px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: var(--fundo); color: var(--texto); font-size: 14px; }
.oculto { display: none !important; }
a { color: var(--azul-claro); }
small { color: var(--cinza); }
kbd { font: 600 10px/1 monospace; background: rgba(255,255,255,.12); color: #c9d3e2; border-radius: 4px; padding: 2px 4px; margin-left: 5px; }

/* ---- login ---- */
.tela-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--azul), var(--azul-claro)); padding: 24px; }
.login-caixa { width: 100%; max-width: 360px; text-align: center; }
.logo { width: 44px; height: 44px; border-radius: 11px; background: var(--laranja); color: #fff; font-size: 26px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.login-caixa .logo { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 18px; font-size: 44px; }
.login-caixa h1 { color: #fff; font-size: 26px; line-height: 1.15; margin-bottom: 22px; }
.login-caixa h1 span { color: var(--laranja); font-size: 17px; font-weight: 600; }
.login-caixa input { width: 100%; padding: 13px 14px; margin-bottom: 10px; border: none; border-radius: 10px; font-size: 15px; background: rgba(255,255,255,.95); }
.dica { color: rgba(255,255,255,.75); font-size: 12.5px; margin-top: 14px; line-height: 1.5; }
.login-caixa .erro { color: #ffb3b3; }

/* ---- estrutura ---- */
#app { display: grid; grid-template-columns: var(--menu-largura) 1fr; height: 100vh; }
#menu { background: var(--azul); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.marca { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; }
.marca b { font-size: 17px; display: block; }
.marca small { color: #9fb0c8; font-size: 12px; }
.usuario { padding: 6px 16px 12px; border-bottom: 1px solid rgba(255,255,255,.1); }
.usuario b { display: block; font-size: 13.5px; }
.usuario small { color: #9fb0c8; font-size: 11.5px; text-transform: capitalize; }
#navMenu { flex: 1; overflow-y: auto; padding: 8px 0; }
#navMenu button { display: flex; align-items: center; gap: 9px; width: 100%; border: none; background: none; color: #d6deea; text-align: left; padding: 9px 16px; font-size: 13.5px; cursor: pointer; position: relative; }
#navMenu button i { font-style: normal; width: 20px; text-align: center; }
#navMenu button:hover { background: rgba(255,255,255,.07); }
#navMenu button.ativo { background: rgba(245,130,31,.18); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--laranja); }
#navMenu .grupo { margin-top: 10px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 8px; }
#navMenu .grupo > span { display: block; padding: 4px 16px 6px; font-size: 11px; font-weight: 700; color: #9fb0c8; text-transform: uppercase; letter-spacing: .5px; }
.badge { position: absolute; right: 14px; top: 9px; background: var(--laranja); color: #fff; font-size: 10.5px; font-style: normal; min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; padding: 0 5px; text-align: center; font-weight: 700; }
.rodape-menu { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 6px; }
.linha-status { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #c9d3e2; min-height: 14px; }
.linha-status small { color: #c9d3e2; }
.chip { font-size: 11px; padding: 2px 9px; border-radius: 20px; background: rgba(255,255,255,.12); font-weight: 700; }
.chip.on { color: #7dffb0; } .chip.off { color: #ffb3b3; }
.rodape-menu .btn { width: 100%; margin: 0; }
.rodape-menu .btn.fantasma { background: transparent; border-color: rgba(255,255,255,.25); color: #d6deea; }

#principal { display: flex; flex-direction: column; min-width: 0; height: 100vh; overflow: auto; }   /* a coluna de conteúdo é quem rola: a barra horizontal fica sempre visível no pé da janela */
/* telas menores (notebook, monitor pequeno): a tela mantém a largura de trabalho e ganha rolagem horizontal em vez de espremer campos e colunas */
@media (min-width: 700px) { #conteudo > .view { min-width: 960px; } }
@media print { #app { height: auto; } #principal { height: auto; overflow: visible; } #conteudo > .view { min-width: 0; } }
#topo { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--branco); border-bottom: 1px solid var(--borda); padding: 12px 22px; }
#topo h1 { font-size: 18px; white-space: nowrap; }
/* botões do topo ocupam a largura que sobra ao lado do título (antes espremiam e o topo crescia para baixo — conferência, 22/10/2026) */
#topoAcoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1 1 0; min-width: 0; justify-content: flex-end; }
.sino { position: relative; background: none; border: 1px solid var(--borda); border-radius: 50%; width: 38px; height: 38px; font-size: 18px; cursor: pointer; }
.sino .badge { right: -6px; top: -6px; }
.sino.tem { border-color: var(--laranja); }
.aviso-item { padding: 8px 0; border-bottom: 1px dashed var(--borda); font-size: 13px; }
.aviso-item small { color: var(--cinza); }
.aviso-item.novo { font-weight: 600; }
#conteudo { padding: 18px 22px 40px; flex: 1; }
@media print { #conteudo { overflow: visible; } }
.tabela-caixa { max-width: 100%; }

/* ---- componentes ---- */
.cartao { background: var(--branco); border: 1px solid var(--borda); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.cartao h2 { font-size: 17px; margin-bottom: 10px; }
.cartao h3 { font-size: 14.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.cartao h3 small { font-weight: 400; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 15px; border: 1px solid var(--borda); border-radius: 9px; background: var(--branco); color: var(--texto); font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #b9c4d4; }
.btn.primario { background: var(--laranja); border-color: var(--laranja); color: #fff; }
.btn.primario:hover { background: #e2741a; }
.btn.secundario { background: var(--azul); border-color: var(--azul); color: #fff; }
.btn.perigo { color: var(--vermelho); border-color: #f0c4c4; }
.btn.mini { padding: 5px 10px; font-size: 12.5px; }
.btn.largo { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.botoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.erro { color: var(--vermelho); font-size: 13px; margin-top: 6px; min-height: 1em; }
.aviso { background: #fff8ec; border: 1px solid #f3ddb2; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 10px; }
.aviso.vermelho { background: #fdeeee; border-color: #f0c4c4; }
.aviso.azul { background: #e6eefb; border-color: #c5d5f2; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.tag.verde { background: #e2f6ea; color: var(--verde); }
.tag.vermelho { background: #fde8e8; color: var(--vermelho); }
.tag.amarelo { background: #fdf3d7; color: var(--amarelo); }
.tag.laranja { background: #ffe9dc; color: #c2410c; }   /* Shopee na lista de pedidos */
.tag.azul { background: #e6eefb; color: var(--azul-claro); }
.tag.cinza { background: #edf0f4; color: var(--cinza); }
.vazio { color: var(--cinza); padding: 18px; text-align: center; }

/* formulários */
.linha-form { margin-bottom: 10px; min-width: 0; }
.linha-form label { display: block; font-size: 12px; font-weight: 700; color: var(--cinza); margin-bottom: 4px; }
input, select, textarea { font-family: inherit; }
.linha-form input, .linha-form select, .linha-form textarea, .campo { width: 100%; padding: 8px 10px; border: 1px solid var(--borda); border-radius: 8px; font-size: 13.5px; background: var(--branco); }
.linha-form input:focus, .linha-form select:focus, .linha-form textarea:focus, .campo:focus { outline: 2px solid rgba(245,130,31,.35); border-color: var(--laranja); }
.grade2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grade3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grade4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
/* barra de filtros: painel próprio, separando a busca dos refinamentos */
.filtros { display: flex; gap: 10px 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px;
  background: var(--branco); border: 1px solid var(--borda); border-radius: 12px; padding: 12px 14px; }
.filtros .linha-form { margin: 0; }
.filtros .linha-form label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.filtros .busca { min-width: 300px; flex: 1 1 320px; }
.filtros input.busca, .filtros select, .filtros input[type="date"] { height: 38px; }   /* só o campo: no contêiner .linha-form.busca empurrava o campo para baixo dos outros */
.filtros .campo.busca { font-size: 14px; }
/* resumo do que está sendo mostrado */
.resumo-lista { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 0 2px 8px; font-size: 12.5px; color: var(--cinza); flex-wrap: wrap; }
.resumo-lista b { color: var(--texto); font-size: 14px; }
/* barra de filtros em grade: sem buraco à direita e sem campo gigante */
.filtros-grade { display: grid; align-items: end;
  grid-template-columns: minmax(230px, 2.4fr) repeat(2, minmax(125px, .75fr)) repeat(3, minmax(135px, 1fr)); }
.filtros-grade .f-busca { grid-column: span 1; }
.filtros-grade .f-atalhos { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--borda); margin-top: 2px; padding-top: 10px; }
@media (max-width: 1100px) { .filtros-grade { grid-template-columns: repeat(3, 1fr); }
  .filtros-grade .f-busca { grid-column: 1 / -1; }
  .filtros-grade .linha-form:nth-last-of-type(2) { grid-column: span 2; } }
@media (max-width: 700px) { .filtros-grade { grid-template-columns: repeat(2, 1fr); }
  .filtros-grade .linha-form:nth-last-of-type(2) { grid-column: 1 / -1; } }
/* resumo do que a lista está mostrando */
.resumo-lista { margin-top: -6px; }
.periodos { display: inline-flex; gap: 6px; }
.chip-periodo { padding: 6px 12px; border: 1px solid var(--borda); border-radius: 20px; background: var(--branco); color: var(--cinza); font-weight: 700; font-size: 12.5px; cursor: pointer; transition: background .12s, color .12s; }
.chip-periodo:hover { border-color: var(--azul); color: var(--azul); }
.chip-periodo.ativo { background: var(--azul); border-color: var(--azul); color: #fff; }

/* tabelas */
.tabela-caixa { overflow: auto; border: 1px solid var(--borda); border-radius: 10px; background: var(--branco); }
.tabela-caixa.tabela-auto { border: 0; border-radius: 0; background: transparent; max-width: 100%; }   /* envoltório automático (app.js): só a rolagem, sem moldura */
.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
/* listas largas: a caixa rola no horizontal em vez de espremer as colunas */
.tabela.lista { min-width: 940px; }
.tabela.lista td:first-child { white-space: nowrap; }
.tabela.lista .cel-prim { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabela.lista .cel-sec { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabela th { position: sticky; top: 0; z-index: 2; background: #f7f9fc; color: var(--cinza); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--borda); white-space: nowrap; }
.tabela th.ord { cursor: pointer; }
.tabela th.ord:hover { color: var(--azul); }
.tabela td { padding: 10px 12px; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
/* nome em destaque, dados secundários abaixo em cinza */
.cel-prim { display: block; font-weight: 700; color: var(--texto); line-height: 1.25; }
.cel-sec { display: block; font-size: 11.5px; color: var(--cinza); margin-top: 1px; }
.cel-val { font-weight: 800; font-size: 13.5px; }
.tabela tr:last-child td { border-bottom: none; }
.tabela tbody tr { transition: background .12s; }
.tabela tbody tr:hover { background: #f6f9ff; }
.tabela tr.clicavel { cursor: pointer; }
.tabela tr.sel { background: #fff4e8; box-shadow: inset 3px 0 0 var(--laranja); }
/* preço do catálogo: valor em evidência, preço cheio riscado acima */
.preco-cel { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.preco-cel s { font-size: 11px; color: var(--cinza); }
.preco-cel b { font-size: 14px; }
.preco-cel small { color: var(--cinza); font-weight: 600; font-size: 10.5px; }
.tabela .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabela .centro { text-align: center; }
.tabela input.celula { width: 74px; padding: 5px 7px; border: 1px solid var(--borda); border-radius: 7px; font-size: 13px; text-align: right; }
.tabela tfoot td { font-weight: 800; background: #f7f9fc; }
.acoes-linha { display: flex; gap: 4px; flex-wrap: nowrap; justify-content: flex-start; }
/* lista de pedidos: os botões quebram linha dentro da célula em vez de alargar a tabela além da tela */
#pdsTabela .acoes-linha { flex-wrap: wrap; max-width: 230px; row-gap: 3px; }
#pdsTabela td { vertical-align: middle; }
/* erro do Sankhya é longo: 2 linhas na lista, texto inteiro no título e no detalhe do pedido.
   Sem isto a coluna Situação crescia e empurrava os botões de Ações para fora da tela. */
#pdsTabela th:nth-child(7), #pdsTabela td:nth-child(7) { min-width: 215px; max-width: 340px; }
#pdsTabela .pds-erro { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-top: 3px; font-size: 12px; line-height: 1.35; color: var(--vermelho); cursor: help; }
/* etiqueta 100x30 sem preço (1 coluna): nome à esquerda, código de barras à direita */
.ep-linha100 { justify-content: flex-start; }
.ep-etq.ep-etq100 { width: 100mm; flex-direction: row; align-items: stretch; gap: 2mm; padding: 1.4mm 2.2mm; }
.ep100-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: .8mm; }
.ep100-nome { font-size: 9pt; line-height: 1.14; font-weight: 700; max-height: 3.42em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ep100-ident { display: flex; flex-wrap: wrap; gap: 0 2.5mm; font-size: 7.4pt; color: #000; font-weight: 700; }
.ep100-ident b { font-size: 8.4pt; font-weight: 900; }
.ep100-bar { flex: 0 0 40mm; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6mm; }
.ep100-bar svg { width: 40mm; height: 11mm; }
.ep100-cb { font-size: 6.8pt; color: #000; font-weight: 700; letter-spacing: .04em; }
/* etiqueta 100x60 sem preço (1 coluna, 19/10/2026): nome grande, identificação, barras largas, quantidade da embalagem */
.ep-linha.ep-linha10060 { width: 100mm; height: 60mm; justify-content: flex-start; }
.ep-etq.ep-etq10060 { width: 100mm; height: 60mm; padding: 2.5mm 3.5mm; gap: 1.5mm; }
.ep-palco10060 { overflow: hidden; }
.ep-palco10060 .ep-etq { zoom: .62; }
.ep6-nome { font-size: 15pt; line-height: 1.12; font-weight: 800; text-transform: uppercase; max-height: 3.36em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ep6-ident { display: flex; flex-wrap: wrap; gap: 0 4mm; font-size: 10pt; color: #000; font-weight: 800; }
.ep6-ident b { font-size: 12pt; font-weight: 900; }
.ep6-bar { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.ep6-bar svg { width: 84mm; height: 17mm; }
.ep6-rod { display: flex; align-items: center; justify-content: space-between; gap: 2mm; }
.ep6-cb { font-size: 10pt; color: #000; font-weight: 800; letter-spacing: .06em; }
.ep6-un { font-size: 15pt; font-weight: 900; color: #000; line-height: 1; border: .5mm solid #000; border-radius: 1mm; padding: .6mm 2mm; white-space: nowrap; }
@media print {
  .ep-linha.ep-linha10060 { width: 100mm; height: 59.6mm; }
  .ep-etq.ep-etq10060 { height: 59.6mm; }
}
/* etiqueta 50x30 dos itens do pedido (2 colunas) */
/* nota fiscal do pedido (modal) */
.nf-bloco { border: 1px solid var(--borda); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.nf-dados { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px 12px; margin: 8px 0; }
.nf-dados > div { display: flex; flex-direction: column; }
.nf-dados span { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--cinza); }
.nf-chave { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--fundo); border-radius: 8px; padding: 8px 10px; }
.nf-chave span { font-size: 11px; text-transform: uppercase; color: var(--cinza); }
.nf-chave code { font-size: 12.5px; letter-spacing: .04em; word-break: break-all; }
/* etiqueta de volume tirada da nota, sem conferência montada */
.cf-et-semitens { border: .4mm dashed #000; border-radius: 1.5mm; padding: 3mm; text-align: center; font-size: 8pt; font-weight: 700; margin: 2mm 0; }
/* tudo em negrito: na impressora térmica o traço fino sai falhado */
.pi-etq { justify-content: space-between; padding: 1.2mm 1.6mm; font-weight: 800; color: #000; }
.pi-etq * { font-weight: 800; }
.pi-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 1mm; border-bottom: .25mm solid #000; padding-bottom: .4mm; }
.pi-cli { font-size: 7pt; font-weight: 800; text-transform: uppercase; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pi-ped { font-size: 7pt; font-weight: 800; white-space: nowrap; }
/* descrição pode usar até 3 linhas quando o nome é longo (a medida do produto costuma estar no fim);
   a faixa do código de barras cede a altura e a barra encolhe junto, sem estourar a etiqueta */
.pi-desc { font-size: 7pt; line-height: 1.14; margin-top: .5mm; max-height: 3.42em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.pi-bar { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 0; overflow: hidden; }
.pi-bar svg { width: 40mm; height: 100%; max-height: 7.5mm; }
.pi-pe { display: flex; justify-content: space-between; align-items: baseline; gap: 1mm; }
.pi-pe span { font-size: 6.6pt; }
.pi-qtd { font-size: 10pt !important; white-space: nowrap; }
/* barras mais grossas e altas: lê melhor e não some quando a cabeça está fraca */
.pi-bar svg { shape-rendering: crispEdges; }
/* observação por item: no carrinho e no documento impresso */
.pd-obs-lin td { padding-top: 0 !important; border-top: 0 !important; }
.pd-obs { width: 100%; font-size: 13px; color: var(--cinza); background: #fbfcfe; min-height: 44px; line-height: 1.4; resize: vertical; font-family: inherit; text-align: left; padding: 6px 8px; border: 1px solid var(--borda); border-radius: 7px; box-sizing: border-box; display: block; }
.pd-obs:focus { color: var(--texto); background: var(--branco); }
.dc-obs-item { font-size: 8.4pt; font-style: italic; color: #333; }
/* pedido travado na liberação: o botão continua à vista, mas apagado e sem reagir ao cursor */
#pdsTabela .acoes-linha .btn:disabled { opacity: .3; cursor: not-allowed; }
#pdsTabela tr:hover .acoes-linha .btn:disabled { border-color: transparent; background: transparent; color: var(--cinza); }
/* a coluna de ações fica grudada na direita: rolando a tabela no horizontal os botões continuam à vista */
#pdsTabela th:last-child, #pdsTabela td:last-child { position: sticky; right: 0; z-index: 1;
  width: 244px; min-width: 244px; background: var(--branco); box-shadow: -7px 0 7px -7px rgba(28, 39, 51, .25); }
#pdsTabela tbody tr:hover td:last-child { background: #f6f9ff; }
#pdsTabela thead th:last-child { z-index: 2; }
#pdsTabela .pds-mais { text-align: center; padding: 12px; color: var(--cinza); background: #f7f9fc; }
#pdsTabela .pds-mais .btn { margin-left: 4px; }
.acoes-linha .btn { padding: 4px 9px; font-size: 12px; line-height: 1.4; }
/* ações discretas: ganham contorno quando a linha está sob o cursor */
.tabela .acoes-linha .btn { border-color: transparent; background: transparent; color: var(--cinza); }
.tabela tr:hover .acoes-linha .btn { border-color: var(--borda); background: var(--branco); color: var(--texto); }
.tabela tr:hover .acoes-linha .btn.secundario { background: var(--azul); border-color: var(--azul); color: #fff; }
.tabela tr:hover .acoes-linha .btn.perigo { color: var(--vermelho); }
.tabela .acoes-linha .btn:hover { border-color: var(--azul); color: var(--azul); }
/* estado vazio com orientação */
.vazio-caixa { padding: 34px 20px; text-align: center; color: var(--cinza); }
.vazio-caixa b { display: block; color: var(--texto); font-size: 14.5px; margin-bottom: 4px; }
.vazio-caixa small { display: block; margin-top: 4px; }

/* master-detail */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 14px; align-items: start; }
.split.larga { grid-template-columns: minmax(0, 1fr) 460px; }
.painel-lateral { position: sticky; top: 66px; max-height: calc(100vh - 90px); overflow-y: auto; }
.det-titulo { font-size: 17px; font-weight: 800; margin-bottom: 3px; }
.det-sub { color: var(--cinza); font-size: 12.5px; margin-bottom: 8px; }
.det-preco { font-size: 22px; font-weight: 800; color: var(--azul); margin: 6px 0; }
.det-preco small { font-size: 12px; color: var(--cinza); font-weight: 600; }
.caract { white-space: pre-wrap; font-size: 12.5px; background: var(--fundo); border-radius: 8px; padding: 10px; margin-top: 10px; }
.det-foto { display: block; max-width: 100%; max-height: 180px; margin: 0 auto 10px; border-radius: 8px; }
.lista-simples > div { padding: 7px 0; border-bottom: 1px dashed var(--borda); font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.lista-simples > div:last-child { border-bottom: none; }
.sugestao { background: #fff8ec; border: 1px solid #f3ddb2; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; }
.sugestao b { display: block; margin-bottom: 4px; }

/* autocomplete */
.ac { position: relative; }
.ac-lista { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--branco); border: 1px solid var(--borda); border-radius: 8px; box-shadow: 0 8px 24px rgba(15,37,68,.15); max-height: 320px; overflow-y: auto; }
.ac-item { padding: 8px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font-size: 13px; border-bottom: 1px solid #f0f3f7; }
.ac-item:last-child { border-bottom: none; }
.ac-item.ativo, .ac-item:hover { background: #fff4e8; }
.ac-item small { white-space: nowrap; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
/* ---- painel inicial ---- */
.dash-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-cab h2 { font-size: 21px; color: var(--azul); }
.dash-cab small { color: var(--cinza); font-size: 12.5px; }
.dash-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.dash-kpis .kpi span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.dash-kpis .kpi b { font-size: 22px; line-height: 1.15; }
.dash-kpis .kpi.hero { grid-column: span 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: linear-gradient(135deg, #ffffff, #f3f6fb); border-color: #cfd9e8; }
.dash-kpis .kpi.hero b { font-size: 30px; color: var(--azul); }
.delta { display: block; font-size: 11.5px; color: var(--cinza); margin-top: 4px; font-weight: 600; }
.delta.sobe { color: #1f8f4e; }
.delta.desce { color: #c43c3c; }
.anel { width: 74px; height: 74px; flex: none; }
.grafico { width: 100%; height: auto; display: block; }
.grafico .gb rect:first-child { transition: opacity .15s; }
.grafico .gb:hover rect:first-child { opacity: .8; }
.dash-graficos .cartao h3 small, .cartao h3 small { color: var(--cinza); font-weight: 600; font-size: 12px; margin-left: 6px; }
.stack { display: flex; height: 16px; border-radius: 8px; overflow: hidden; gap: 2px; background: var(--fundo); margin: 10px 0 8px; }
.stack div { min-width: 6px; }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--cinza); margin-top: 6px; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legenda b { color: var(--texto); margin-left: 2px; }
.ranking { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.rk { display: grid; grid-template-columns: minmax(140px, 1.2fr) 2fr auto; gap: 10px; align-items: center; font-size: 13px; }
.rk-nome small { display: block; color: var(--cinza); font-size: 11.5px; }
.rk-barra { height: 10px; background: var(--fundo); border-radius: 5px; overflow: hidden; }
.rk-barra i { display: block; height: 100%; background: #2d64b5; border-radius: 5px; }
.rk-valor { font-weight: 700; white-space: nowrap; }
/* Conferência: barra de bipagem em destaque, porque é onde o conferente fica */
.lista-busca { max-height: 210px; overflow-y: auto; margin: 4px 0; }
/* grade da entrega anterior na conferência do resíduo */
.cf-ant-bloco { padding: 10px 16px; margin-top: 10px; border-left: 4px solid var(--azul, #1f4e78); }
.cf-ant-bloco > summary { cursor: pointer; line-height: 1.5; }
.cf-ant-bloco > summary .btn { margin-left: 8px; }
.cf-ant-bloco .tabela-caixa { margin-top: 8px; }
.cf-ant tfoot td { background: #f4f6f9; }
.cf-ant-corte td { background: #fdf0e6; }
.cf-bipe { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0 6px;
  background: #f3f6fb; border: 1px solid var(--borda); border-radius: 10px; padding: 12px; }
.cf-bipe #cfCodigo { font-size: 17px; font-weight: 700; height: 44px; }
.cf-bipe #cfQtd:not(:disabled) { font-size: 17px; font-weight: 700; height: 44px; border-color: var(--azul); background: #fffdf3; }
#cfAviso { min-height: 18px; margin: 2px 0 8px; }
/* item bipado esperando a quantidade: precisa saltar aos olhos do conferente */
.cf-atual { background: #fff8ec; border: 1px solid #f3ddb2; border-left: 4px solid var(--laranja);
  border-radius: 8px; padding: 8px 12px; margin: 6px 0 4px; font-size: 13.5px; line-height: 1.45; }
.tabela tr.linha-ok td { background: #f4fbf8; }
.tabela tr.linha-corte td { background: #fdf4f4; }
/* volumes lado a lado */
.cf-vols { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; margin-top: 8px; }
.cf-vol { border: 1px solid var(--borda); border-radius: 10px; padding: 10px; background: var(--branco); }
/* a caixa aberta é onde o bipe cai: precisa ser óbvia de longe */
.cf-vol.ativo { border-color: var(--laranja); border-width: 2px; box-shadow: 0 0 0 3px rgba(245,130,31,.12); }
.cf-vol-cab { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.cf-vol-cab b { flex: 1; min-width: 0; }
.cf-vol-aberta { background: var(--laranja); color: #fff; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; border-radius: 20px; padding: 3px 9px; }
.cf-vol .campo { margin-bottom: 8px; }
.cf-vol-itens { display: flex; flex-direction: column; gap: 4px; }
.cf-vol-item { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 12.5px; border-bottom: 1px solid #eef1f6; padding-bottom: 4px; }
.cf-vol-item span { flex: 1; min-width: 0; line-height: 1.25; }
.cf-vol-item small { display: block; color: var(--cinza); font-size: 11px; }
/* etiqueta do volume: uma por página na impressão */
/* Etiqueta de volume no padrão 100 x 150 mm (mesma bobina térmica da Shopee e do Mercado Livre).
   As medidas são em mm para sair no tamanho certo na impressora, sem depender do zoom da tela. */
.cf-etiqueta { box-sizing: border-box; width: 100mm; height: 150mm; overflow: hidden;
  border: 1.2mm solid #000; padding: 2.5mm 3mm; margin: 0 auto 6mm; background: #fff;
  color: #000; font-size: 8.6pt; line-height: 1.18; display: flex; flex-direction: column; }
.cf-et-topo { display: flex; justify-content: space-between; align-items: stretch;
  border-bottom: .8mm solid #000; padding-bottom: 1.5mm; }
.cf-et-marca b { font-size: 16pt; font-weight: 800; letter-spacing: .06em; display: block; line-height: 1; }
.cf-et-marca small { font-size: 7.4pt; display: block; margin-top: .8mm; line-height: 1.2; }
.cf-et-res { display: block; font-size: 11px; font-weight: 800; letter-spacing: 1px; background: #000; color: #fff; padding: 1px 4px; border-radius: 3px; margin-top: 2px; }
.cf-et-vol { text-align: center; border: .6mm solid #000; border-radius: 2mm; padding: .6mm 2.2mm;
  font-size: 7pt; font-weight: 700; letter-spacing: .1em; align-self: flex-start; }
.cf-et-vol b { display: block; font-size: 18pt; line-height: 1.05; letter-spacing: 0; }
/* nota fiscal: é o número que a transportadora e o cliente procuram primeiro na caixa */
.cf-et-nf { display: flex; align-items: center; gap: 2.5mm; padding: .9mm 0 .7mm; border-bottom: .5mm solid #000; }
.cf-et-nf span { font-size: 7.4pt; font-weight: 800; letter-spacing: .1em; line-height: 1.05; }
.cf-et-nf b { font-size: 30pt; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.cf-et-nf b.sem { font-size: 11pt; letter-spacing: 0; }
.cf-et-nf i { font-style: normal; font-size: 7pt; line-height: 1.15; margin-left: auto; text-align: right; font-weight: 700; }
/* número do pedido: referência interna, abaixo da nota */
.cf-et-pedido { display: flex; align-items: baseline; gap: 2.5mm; padding: .5mm 0 .5mm; }
.cf-et-pedido span { font-size: 7.2pt; font-weight: 700; letter-spacing: .12em; }
.cf-et-pedido b { font-size: 14pt; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.cf-et-pedido i { font-style: normal; font-size: 6.6pt; line-height: 1.1; margin-left: auto; text-align: right; }
/* tipo de entrega: quem leva a caixa. Moldura em vez de fundo preto — área sólida
   desgasta a cabeça da impressora térmica e depende do print-color-adjust do navegador. */
.cf-et-entrega { border: .6mm solid #000; border-radius: 1mm; font-size: 10pt; font-weight: 800;
  text-transform: uppercase; letter-spacing: .03em; text-align: center;
  padding: .9mm 1.5mm; margin-bottom: .4mm; }
.cf-et-cli { padding: 1.3mm 0; border-bottom: .3mm solid #000; }
.cf-et-cli b { font-size: 10.5pt; display: block; line-height: 1.12; }
.cf-et-cli small { font-size: 7.2pt; display: block; margin-top: .4mm; line-height: 1.18; }
/* endereço de entrega (etiqueta de transporte) e chave da NF-e: só aparecem quando o Sankhya já tem os dados */
.cf-et-end { font-size: 8pt; font-weight: 700; line-height: 1.2; margin-top: .8mm; }
/* a chave desce para o pé da etiqueta: é o que a transportadora bipa, e assim o vão não fica logo
   acima do rodapé. Com tabela de itens ela simplesmente encosta no fim da tabela — e volta ao tamanho
   antigo, porque ali o espaço é dos itens. */
.cf-et-chave { margin-top: auto; padding-top: 1.2mm; text-align: center; }
.cf-et-chave svg { width: 92mm; height: 13mm; display: block; margin: 0 auto; }
.cf-etiqueta:has(table) .cf-et-chave svg { height: 9mm; }
.cf-et-marca small b { color: #000; font-size: 10pt; }
.cf-et-chave i { font-style: normal; font-size: 5.6pt; letter-spacing: .02em; display: block; }
.cf-etiqueta table { width: 100%; border-collapse: collapse; margin-top: 1.5mm; table-layout: fixed; }
.cf-etiqueta th, .cf-etiqueta td { border-bottom: .25mm solid #000; padding: .5mm .8mm;
  text-align: left; vertical-align: top; font-size: 8pt; }
.cf-etiqueta th { font-size: 6.6pt; text-transform: uppercase; letter-spacing: .04em; border-bottom-width: .5mm; }
.cf-etiqueta th.q, .cf-etiqueta td.q { text-align: right; white-space: nowrap; }
.cf-etiqueta td.q b { font-size: 10pt; }
/* larguras fixas (descrição · referência · qtd · un): a descrição usa o que sobra e para em duas linhas */
/* referência em 7pt: com 7,6pt um código de 14 dígitos quebrava em duas linhas e a linha do item
   crescia à toa — eram 2 itens a menos por etiqueta */
.cf-etiqueta tr > *:nth-child(2) { width: 21mm; font-size: 7pt; word-break: break-all; }
.cf-etiqueta tr > *:nth-child(3) { width: 15mm; }
.cf-etiqueta tr > *:nth-child(4) { width: 9mm; }
/* o clamp precisa de um elemento próprio: em <td> o display:-webkit-box não pega */
/* uma linha por item: a altura da linha fica previsível e a folha não estoura com nome comprido */
.cf-et-d { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.16; }
/* o rodapé desce para o pé da etiqueta; o espaço que sobra fica em branco, não esticando as linhas */
.cf-et-pe { border-top: .5mm solid #000; margin-top: auto; padding-top: 1.5mm; font-size: 7.2pt; display: flex; justify-content: space-between; align-items: flex-end; gap: 2mm; }
.cf-et-bar { display: flex; flex-direction: column; align-items: center; }
.cf-et-bar svg { width: 28mm; height: 5mm; }
.cf-et-bar i { font-style: normal; font-size: 6pt; letter-spacing: .06em; }
.cf-et-folha { display: block; font-size: 6.4pt; font-weight: 700; letter-spacing: 0; margin-top: .4mm; }
/* Volume sem lista de itens ("Conteúdo conforme a nota fiscal"): sobravam 42 mm em branco no meio da
   etiqueta. O espaço vai para o destinatário, que é o que o entregador procura. Só sem tabela: com a
   lista de itens é ela que ocupa o miolo, e aí nada cresce. */
.cf-etiqueta:not(:has(table)) .cf-et-cli { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.cf-etiqueta:not(:has(table)) .cf-et-cli b { font-size: 13pt; }
.cf-etiqueta:not(:has(table)) .cf-et-end { font-size: 9.6pt; line-height: 1.35; }
.cf-etiqueta:not(:has(table)) .cf-et-semitens { margin: 3mm 0; }
/* na tela a etiqueta aparece do tamanho real, uma embaixo da outra */
.via-etiqueta .via-doc { background: #e7eaf0; padding: 6mm 0; }
.via-etiqueta .via-doc h2 { text-align: center; margin: 0 0 5mm; }
.via-nota { flex-basis: 100%; font-size: 12px; color: var(--cinza); }
.via-ajuste { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: 12px; color: var(--txt-fraco); }
.via-ajuste b { min-width: 52px; text-align: center; color: inherit; }
@media print {
  .cf-etiqueta { page-break-after: always; border-width: 0; margin: 0; padding: 4mm; }
  .cf-etiqueta:last-child { page-break-after: auto; }
  /* na etiqueta o papel é a etiqueta: nada de título, moldura ou fundo da tela */
  .via-etiqueta .via-doc { background: none; padding: 0; }
  .via-etiqueta .via-doc h2 { display: none; }
}

/* Resíduos: cabeçalho do pedido com o valor e a ação à direita */
.res-pedido { border-left: 4px solid var(--laranja); }
.res-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.res-cab small { color: var(--cinza); }
.res-acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.res-acoes b { font-size: 15px; }
/* folha de separação: uma por página na impressão */
.res-folha { margin-bottom: 26px; }
.res-folha + .res-folha { border-top: 1px dashed #999; padding-top: 18px; }
.res-assin { margin-top: 18px; font-size: 11px; color: #444; }
.via-doc table.via-cab-dados td { border: none; vertical-align: top; width: 50%; padding: 2px 4px 8px; }
.via-doc table.via-cab-dados { border-bottom: 1px solid #dde3ec; margin-bottom: 4px; }
@media print { .res-folha { page-break-after: always; } .res-folha:last-child { page-break-after: auto; } }

/* "Meu dia": lista de trabalho — texto à esquerda, ação à direita */
.md-lista { display: flex; flex-direction: column; }
.md-item { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap;
  padding: 10px 8px; border-bottom: 1px solid #eef1f6; border-radius: 8px; }
.md-item:last-child { border-bottom: none; }
.md-item:hover { background: #f8fafd; }
.md-txt { flex: 1 1 320px; min-width: 0; line-height: 1.35; }
.md-txt b { font-size: 14px; }
.md-txt small { display: block; color: var(--cinza); font-size: 12px; margin-top: 2px; }
.md-acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.dash-empresa { border-left: 4px solid #2d64b5; }
.metas { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 12px; }
.meta-linha { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(120px, 2fr) minmax(120px, .9fr) 78px; gap: 14px; align-items: center; font-size: 13px; padding: 7px 8px; border-bottom: 1px solid #eef1f6; border-radius: 8px; }
.meta-linha:hover { background: #f8fafd; }
/* total da empresa: fora da lista, com peso maior */
.meta-linha.meta-total { background: #f3f6fb; border: 1px solid #dbe4f0; border-bottom: 1px solid #dbe4f0; margin-bottom: 6px; padding: 10px 8px; }
.meta-linha.meta-total .meta-nome b { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.meta-linha.meta-total .meta-valor b, .meta-linha.meta-total .meta-pct { font-size: 16px; }
.meta-nome { min-width: 0; }
.meta-nome b { display: block; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-nome small { display: block; color: var(--cinza); font-size: 11.5px; margin-top: 1px; }
.meta-valor { text-align: right; line-height: 1.2; }
.meta-valor b { font-size: 14px; font-weight: 800; }
.meta-valor small { display: block; color: var(--cinza); font-size: 11px; }
.etapas { display: flex; gap: 2px; margin: 10px 0 4px; }
.etapa { flex: 1; text-align: center; padding: 7px 4px; background: var(--fundo); border-radius: 8px; color: var(--cinza); }
.etapa b { display: block; font-size: 16px; filter: grayscale(1); opacity: .45; }
.etapa span { display: block; font-size: 11.5px; font-weight: 700; }
.etapa small { display: block; font-size: 10.5px; }
.etapa.feita { background: #e2f6ea; color: #1f8f4e; }
.etapa.feita b, .etapa.atual b { filter: none; opacity: 1; }
.etapa.atual { background: #e6eefb; color: var(--azul); box-shadow: inset 0 0 0 2px #2d64b5; }
.meta-barra2 { position: relative; display: flex; gap: 2px; height: 14px; background: #eef1f6; border-radius: 7px; align-items: center; }
.meta-barra2.vazia { background: none; }
/* marca do ritmo esperado até hoje */
.meta-barra2 s { position: absolute; top: -2px; width: 2px; height: 18px; background: var(--texto); opacity: .45; border-radius: 1px; }
.legenda i.marca-ritmo { width: 2px; height: 12px; background: var(--texto); opacity: .45; border-radius: 1px; }
.meta-barra2 i, .meta-barra2 u { display: block; height: 100%; border-radius: 7px; }
.meta-barra2 i { background: #2d64b5; }
.meta-barra2 u { background: #9db9e0; }
.meta-pct small { display: block; font-size: 10.5px; font-weight: 600; color: var(--cinza); }
.meta-pct { font-weight: 800; text-align: right; font-size: 15px; }
/* linha de total dentro das tabelas do painel */
.tabela tr.linha-total { background: #f3f6fb; }
.tabela tr.linha-total td { font-weight: 700; border-bottom: 2px solid #dbe4f0; }
.dash-empresa h4 { font-size: 12px; color: var(--cinza); margin: 14px 0 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.dash-empresa h4:first-of-type { margin-top: 4px; }
/* resumo do mês em uma frase, antes dos blocos */
.empresa-resumo { margin: 2px 0 12px; font-size: 14px; color: var(--texto); }
.empresa-resumo b { font-weight: 800; }
.empresa-detalhe { border-top: 1px solid var(--borda); padding-top: 10px; margin-top: 14px; }
.dash-empresa .kpis { margin-bottom: 10px; }
.tabela-mini { font-size: 12.5px; }
td.tab-ativa { background: #eef3fb; }
.det-tabelas { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--cinza); margin: 4px 0 8px; }
.det-tabelas span.ativa { color: var(--azul); }
.det-tabelas span.ativa b { color: var(--azul); }
.tabela-mini td, .tabela-mini th { padding: 5px 8px; }
td.sobe { color: #1f8f4e; font-weight: 700; }
td.desce { color: #c43c3c; font-weight: 700; }
@media (max-width: 900px) { .dash-kpis .kpi.hero { grid-column: span 1; } .colunas2 { grid-template-columns: 1fr; } }
.kpi { background: var(--branco); border: 1px solid var(--borda); border-radius: 12px; padding: 13px 14px; }
.kpi b { display: block; font-size: 20px; color: var(--azul); }
.kpi span { font-size: 11.5px; color: var(--cinza); font-weight: 600; }
.kpi.aviso b { color: var(--amarelo); }
.kpi.alerta b { color: var(--vermelho); }
.meta-barra { height: 7px; background: var(--borda); border-radius: 4px; overflow: hidden; margin: 6px 0 3px; }
.meta-barra div { height: 100%; border-radius: 4px; }
.colunas2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* editor de pedido */
.pedido-topo { padding: 14px 16px 12px; }
.pedido-linha1 { display: flex; gap: 14px; align-items: flex-end; }
.pedido-cliente { flex: 1; margin: 0; }
.pedido-cliente input { font-size: 16px; padding: 11px 13px; font-weight: 600; }
.rotulo { display: block; font-size: 12px; font-weight: 700; color: var(--cinza); margin-bottom: 4px; }
.seg { display: inline-flex; border: 1px solid var(--borda); border-radius: 9px; overflow: hidden; }
.seg button { border: none; background: var(--branco); padding: 11px 16px; font-weight: 700; cursor: pointer; color: var(--cinza); font-size: 13.5px; }
.seg button.ativo { background: var(--azul); color: #fff; }
.pedido-cliente-info { display: flex; gap: 6px; flex-wrap: wrap; margin: 9px 0 0; min-height: 22px; }
.pedido-linha2 { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 12px;
  border-top: 1px solid var(--borda); padding-top: 12px; }
.pedido-linha2 .linha-form { margin: 0; flex: 1 1 150px; min-width: 0; max-width: 320px; }
.pedido-linha2 .pd-transp { flex: 1.6 1 210px; max-width: 420px; }
.pedido-linha2 .pd-curto { flex: 0 1 132px; }
.lista-marcar { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; max-height: 260px; overflow: auto; padding: 6px 0; }
.tag.vinc { box-shadow: inset 0 0 0 2px #2d64b5; font-weight: 800; }
.tabs-usuario { display: flex; flex-direction: column; gap: 1px; padding: 4px 0; border: 1px solid var(--borda); border-radius: 9px; }
/* colunas fixas: nome | informação | marca da padrão — alinhadas em todas as linhas */
.tab-lin { display: grid; grid-template-columns: 1fr auto 96px; gap: 10px; align-items: center; font-size: 13px; padding: 6px 10px; }
.tab-lin + .tab-lin { border-top: 1px dashed var(--borda); }
.tab-lin:hover { background: var(--fundo); }
.tab-lin label { font-weight: normal; display: flex; align-items: center; gap: 7px; margin: 0; cursor: pointer; min-width: 0; }
.tab-lin label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-info { color: var(--cinza); font-size: 11.5px; white-space: nowrap; }
/* dentro de .linha-form os inputs são 100% de largura — caixinhas e rádios voltam ao tamanho natural */
.tab-lin input[type="checkbox"], .tab-lin input[type="radio"],
.lista-marcar input[type="checkbox"], .lista-marcar input[type="radio"] {
  width: auto; min-width: 0; flex: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none;
}
.tab-pad { color: var(--cinza); font-size: 12px; white-space: nowrap; }
.lista-marcar label { font-weight: normal; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.pedido-linha3 { margin-top: 10px; }
.pd-entrega { margin-top: 10px; }
.pd-entrega label small { font-weight: 400; color: var(--cinza); }
.pedido-linha3 .linha-form { margin: 0; }
.pedido-linha3 textarea { resize: vertical; min-height: 46px; line-height: 1.4; }
.dobra { background: var(--branco); border: 1px solid var(--borda); border-radius: 12px; padding: 0 14px; margin-bottom: 10px; }
.dobra summary { cursor: pointer; list-style: none; padding: 11px 0; font-size: 13.5px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.dobra summary::-webkit-details-marker { display: none; }
.dobra summary::after { content: '▾'; color: var(--cinza); font-weight: 400; margin-left: 8px; }
.dobra[open] summary::after { content: '▴'; }
.dobra[open] summary { border-bottom: 1px solid var(--borda); }
.dobra .lista-simples { padding: 4px 0 8px; }
.dobra.alerta { border-color: #f0c4c4; background: #fff7f7; }
.sug-wrap { position: relative; display: inline-block; }
.sug-btn { background: #fff8ec; color: #b36b00; cursor: pointer; border: 1px solid #f3ddb2; }
.sug-wrap.aberto .sug-btn { background: var(--laranja); color: #fff; border-color: var(--laranja); }
.sug-painel { display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 35; width: 420px; max-height: 360px; overflow-y: auto; background: var(--branco); border: 1px solid var(--borda); border-radius: 10px; box-shadow: 0 10px 28px rgba(15,37,68,.18); padding: 6px 8px 8px; }
.sug-wrap:hover .sug-painel, .sug-wrap.aberto .sug-painel { display: block; }
.sug-titulo { font-size: 11.5px; font-weight: 700; color: var(--cinza); text-transform: uppercase; letter-spacing: .3px; padding: 6px 6px 4px; }
.sug-linha { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 6px; border-top: 1px dashed var(--borda); font-size: 13px; }
.sug-rodape { padding: 8px 6px 2px; text-align: right; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 2px 12px; font-size: 13px; }
.chip-sug { display: inline-flex; align-items: center; gap: 6px; background: #fff8ec; border: 1px solid #f3ddb2; border-radius: 20px; padding: 4px 5px 4px 12px; font-size: 12.5px; }
.chip-sug button { border: none; background: var(--laranja); color: #fff; border-radius: 12px; padding: 3px 9px; font-weight: 700; cursor: pointer; font-size: 12px; }
.pedido-itens { padding: 12px 14px 14px; }
.pedido-entrada { display: grid; grid-template-columns: 1fr 120px 110px auto; gap: 10px; align-items: end; background: #f7f9fc; border: 1px dashed var(--borda); border-radius: 10px; padding: 10px; margin: 0 0 10px; }
.pedido-entrada .linha-form { margin: 0; }
.pedido-entrada input { font-size: 15px; padding: 10px 12px; }
.pedido-itens .tabela td { padding: 7px 8px; font-size: 13.5px; }
.pedido-itens .tabela th { padding: 8px 8px; }
.pedido-itens .tabela input.celula { width: 70px; font-size: 13.5px; padding: 5px 6px; }
.pedido-itens .tabela input[data-unit] { width: 94px; }   /* preço com 4 casas (1234,5678) cabe inteiro */
/* a tabela de itens cabe na largura da tela: a descrição quebra linha e a caixa não rola de lado
   (numa lista longa a barra horizontal ficava lá no fim da tabela) */
.pedido-itens .tabela-caixa { overflow: visible; }
.pedido-itens .tabela { table-layout: auto; }
.pedido-itens .tabela td:nth-child(3) { min-width: 150px; word-break: normal; overflow-wrap: anywhere; }
.pedido-itens .tabela td:nth-child(3) b { font-weight: 600; }
.pedido-itens .tabela .pd-marg { white-space: nowrap; }
@media (max-width: 1240px) {   /* janela estreita (ou zoom alto): some o nº da linha e a unidade, que são só informativos */
  .pedido-itens .tabela th:nth-child(1), .pedido-itens .tabela td:nth-child(1),
  .pedido-itens .tabela th:nth-child(4), .pedido-itens .tabela td:nth-child(4) { display: none; }
  .pedido-itens .tabela input.celula { width: 62px; }
  .pedido-itens .tabela input[data-unit] { width: 86px; }
}
.pedido-rodape { position: sticky; bottom: 12px; z-index: 15; display: flex; flex-direction: column; align-items: stretch; gap: 10px; background: var(--azul); color: #fff; border-radius: 12px; padding: 12px 20px; margin-top: 14px; box-shadow: 0 8px 24px rgba(15,37,68,.3); }
.pedido-rodape .tot { display: flex; flex-direction: column; min-width: 90px; }
.pedido-rodape .tot span { font-size: 10.5px; color: #9fb0c8; text-transform: uppercase; letter-spacing: .4px; }
.pedido-rodape .tot b { font-size: 15px; }
.pedido-rodape .tot small { color: #9fb0c8; font-weight: 400; }
.pedido-rodape .tot.grande b { font-size: 24px; color: #ffd39a; }
.pedido-rodape .acoes { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.pedido-rodape .btn { border-color: rgba(255,255,255,.35); background: transparent; color: #fff; }
.pedido-rodape .btn:hover { background: rgba(255,255,255,.08); }
.pedido-rodape .btn.primario { background: var(--laranja); border-color: var(--laranja); }
.pedido-rodape .btn.perigo { color: #ffb3b3; border-color: rgba(255,179,179,.5); }
.pedido-rodape .btn:disabled { opacity: .35; }
.pedido-rodape kbd { background: rgba(255,255,255,.18); color: #fff; }
.total-caixa { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; padding: 6px 0; border-top: 1px solid var(--borda); }
.total-caixa.grande { font-size: 20px; font-weight: 800; color: var(--azul); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(15,37,68,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-caixa { background: var(--branco); border-radius: 14px; width: 100%; max-width: 720px; max-height: 92vh; overflow-y: auto; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-caixa h3 { font-size: 16px; margin-bottom: 12px; }
.modal-caixa.larga { max-width: 980px; }
.modal-caixa.extra-larga { max-width: min(1500px, 96vw); }

#toast { position: fixed; bottom: 26px; left: calc(var(--menu-largura) + 24px); z-index: 70; background: var(--azul); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13.5px; max-width: 520px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
#toast.vermelho { background: var(--vermelho); }
#toast.verde { background: var(--verde); }

/* via / documentos imprimíveis */
.via-overlay { position: fixed; inset: 0; z-index: 80; background: var(--fundo); overflow-y: auto; padding: 16px; }
.via-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; max-width: 820px; margin: 0 auto 10px; }
.via-doc { background: #fff; color: #1c2733; max-width: 820px; margin: 0 auto; border: 1px solid var(--borda); border-radius: 12px; padding: 26px; font-size: 13px; }
.via-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.via-doc h2 { font-size: 16px; margin: 8px 0; border-bottom: 2px solid var(--azul); padding-bottom: 6px; }
.via-doc table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.via-doc th, .via-doc td { border-bottom: 1px solid #dde3ec; padding: 6px 4px; text-align: left; font-size: 12.5px; }
.via-doc .num { text-align: right; }
.via-total { text-align: right; font-size: 18px; font-weight: 800; color: var(--azul); }

@media print {
  html, body.via-aberta { margin: 0 !important; padding: 0 !important; height: auto !important; min-height: 0 !important; }
  body.via-aberta > *:not(.via-overlay) { display: none !important; }
  .via-overlay { position: static; background: #fff; padding: 0; }
  .via-toolbar { display: none !important; }
  .via-doc { border: none; border-radius: 0; max-width: none; padding: 0; }
  #menu, #topo, #toast, .modal { display: none !important; }
}
@media (max-width: 1100px) {
  .split, .split.larga { grid-template-columns: 1fr; }
  .painel-lateral { position: static; max-height: none; }
  .pedido-linha1 { flex-wrap: wrap; }
}

/* ---- WMS: endereçamento ---- */
.wm-abas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.wm-locais { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.wm-cod { font-family: ui-monospace, Consolas, monospace; font-size: 14px; letter-spacing: .04em; }
.wm-cod.grande { font-size: 22px; }
.wm-sel { padding: 4px 6px; border: 1px solid var(--borda); border-radius: 6px; font-size: 12.5px; background: var(--branco); }
.wm-item { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 9px 6px; border-bottom: 1px solid #eef1f6; }
.wm-item:last-child { border-bottom: none; }
.kpis .kpi span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--cinza); margin-bottom: 4px; }
.kpis .kpi b { font-size: 22px; line-height: 1.15; }
/* etiqueta de prateleira 100 × 60 mm: código grande para ler de longe + Code 128 para o coletor */
.wl-etiqueta { box-sizing: border-box; overflow: hidden; background: #fff; color: #000; margin: 0 auto 5mm; padding: 3mm 4mm;
  display: flex; flex-direction: column; border: 1px dashed #aab; page-break-inside: avoid; }
.wl-topo { display: flex; justify-content: space-between; font-size: 7.5pt; font-weight: 700; letter-spacing: .1em; }
.wl-cod { font-family: Arial, Helvetica, sans-serif; font-size: 30pt; font-weight: 900; text-align: center; line-height: 1.05; margin: 1mm 0; letter-spacing: .02em; }
.wl-barras { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.wl-barras svg { width: 88mm; height: 19mm; }
/* etiqueta só com endereço + barras: código maior e barras mais altas, centrados na etiqueta */
.wl-limpa { justify-content: center; }
.wl-limpa .wl-cod { font-size: 38pt; margin: 0 0 2mm; }
.wl-limpa .wl-barras { flex: 0 0 auto; }
.wl-limpa .wl-barras svg { width: 90mm; height: 22mm; }
.wl-pe { font-size: 8pt; text-align: center; margin-top: 1mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media print { .wl-etiqueta { page-break-after: always; border: none; margin: 0; } .wl-etiqueta:last-child { page-break-after: auto; } }

/* ---- WMS: recebimento ---- */
.rc-pend td { background: #fffdf5; }
.rc-pc { margin-top: 12px; }
.cmp-res { border-color: #bfe3c6; }
/* financeiro / fiscal */
.fn-aging { margin: 6px 0; }
.fn-barra { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #eef1f6; margin: 4px 0; }
.fn-barra i { display: block; height: 100%; }
.fn-barra .a1 { background: #f5c04a; } .fn-barra .a2 { background: #f08a2c; } .fn-barra .a3 { background: #e0552a; } .fn-barra .a4 { background: #9c1f1f; }
.fn-venc td { background: #fff8f7; }
.fn-fluxo { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px; align-items: end; }
.fn-sem { text-align: center; font-size: 11px; }
.fn-sem .fn-bars { display: flex; gap: 3px; align-items: flex-end; justify-content: center; height: 90px; }
.fn-sem .fn-bars i { display: block; width: 14px; min-height: 2px; border-radius: 3px 3px 0 0; }
.fn-sem .fn-bars .rec { background: var(--verde); } .fn-sem .fn-bars .pag { background: var(--vermelho); }
.fn-sem b { display: block; font-size: 11px; } .fn-sem b.neg { color: var(--vermelho); }
.cmp-win { background: #eefaf0; }
.cmp-tot td, .cmp-nota td { font-size: 14px; }
.dc-tab td.dc-cota { min-width: 22mm; border-bottom: .5pt solid #999; }   /* coluna para o fornecedor preencher à mão */
.cp-res { border-color: #f3c1bd; background: #fff8f7; margin-bottom: 12px; }
/* galvanização */
.gv-card.gv-atrasada { border-color: #f3c1bd; }
.gv-pend td { background: #fffdf5; }
.gv-rets { margin-top: 8px; font-size: 13px; }
.gv-rets summary { cursor: pointer; color: var(--cinza); font-weight: 700; }
.rc-pc-falta { border-color: #f3ddb2; background: #fffaf0; }
.rc-pc-dif td { background: #fff3f2; }
.rc-extra td { background: #fff4e8; }
.rc-qtd { width: 80px; padding: 5px 7px; border: 1px solid var(--borda); border-radius: 6px; font-size: 13px; text-align: right; }
/* etiqueta de gôndola: rolo de 2 colunas de 50 × 30 mm (página = 102 × 30) */
.wg-linha { display: flex; gap: 2mm; width: 102mm; height: 30mm; margin: 0 auto 3mm; page-break-inside: avoid; }
.wg-etq { box-sizing: border-box; width: 50mm; height: 30mm; padding: 1.5mm 2mm; background: #fff; color: #000; border: 1px dashed #aab; display: flex; flex-direction: column; overflow: hidden; }
.wg-etq.vazia { border-color: transparent; }
.wg-nome { font-size: 6.8pt; line-height: 1.15; font-weight: 700; height: 2.3em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wg-bar { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; margin: .5mm 0; }
.wg-bar svg { width: 42mm; height: 8mm; }
.wg-pe { display: flex; justify-content: space-between; align-items: flex-end; gap: 1mm; }
.wg-cod { font-size: 5.5pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-preco { font-size: 13pt; font-weight: 900; white-space: nowrap; line-height: 1; }
.wg-preco s { font-size: 6.5pt; font-weight: 400; margin-right: 1mm; }
/* etiqueta de caixa 100 × 60 mm */
.wc-etq { box-sizing: border-box; width: 100mm; height: 60mm; padding: 3mm 4mm; background: #fff; color: #000; margin: 0 auto 5mm; border: 1px dashed #aab; display: flex; flex-direction: column; overflow: hidden; page-break-inside: avoid; }
.wc-linha { display: flex; gap: 2.5mm; align-items: flex-start; margin: 1mm 0; }
.wc-codprod { font-size: 18pt; font-weight: 900; line-height: 1; white-space: nowrap; }
.wc-nome { font-size: 9.5pt; font-weight: 700; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wc-meio { flex: 1; display: flex; gap: 3mm; align-items: center; min-height: 0; }
.wc-bar { flex: 1; display: flex; align-items: center; justify-content: center; }
.wc-bar svg { width: 44mm; height: 16mm; }
.wc-end { font-family: Arial, Helvetica, sans-serif; font-size: 22pt; font-weight: 900; letter-spacing: .02em; border: .6mm solid #000; border-radius: 2mm; padding: 1.5mm 2.5mm; white-space: nowrap; line-height: 1; }
.wc-end.sem { font-size: 11pt; border-style: dashed; }
/* mesma etiqueta em 100 × 30 mm: código + descrição em cima; barras e endereço embaixo */
.wc-30 { height: 30mm; padding: 1.5mm 3mm; }
.wc-30 .wc-linha { margin: 0 0 .8mm; gap: 2mm; align-items: center; }
.wc-30 .wc-codprod { font-size: 13pt; }
.wc-30 .wc-nome { font-size: 7.5pt; line-height: 1.12; }
.wc-30 .wc-meio { gap: 2.5mm; }
.wc-30 .wc-bar { flex-direction: column; min-width: 0; }
.wc-30 .wc-bar svg { width: 54mm; height: 12.5mm; }
.wc-30 .wc-bar small { font-size: 6.5pt; color: #000; line-height: 1; margin-top: .6mm; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-30 .wc-end { font-size: 17pt; padding: 1mm 2mm; border-width: .5mm; border-radius: 1.5mm; }
.wc-30 .wc-end.sem { font-size: 8pt; }
@media print {
  /* 28,5 mm numa folha de 30, com meio milímetro de folga em cima e embaixo; o resto do acerto é feito
     pelos botões de posição na barra da impressão, que variam de impressora para impressora */
  .wg-linha { page-break-after: always; margin: 0; width: 101.6mm; height: 29.6mm; overflow: hidden; gap: 1.6mm; } .wg-linha:last-child { page-break-after: auto; } .wg-etq { border: none; height: 29.6mm; }
  .wc-etq { page-break-after: always; border: none; margin: 0; } .wc-etq:last-child { page-break-after: auto; }
}

/* ---- WMS: separação ---- */
.sp-folha { margin-bottom: 18px; page-break-inside: avoid; }
.sp-folha h3 { margin-bottom: 4px; }
@media print { .sp-folha { page-break-after: always; } .sp-folha:last-child { page-break-after: auto; } }

/* ---- Compras ---- */
.cp-tab td, .cp-tab th { padding: 7px 8px; font-size: 12.5px; }
.cp-qtd { width: 78px; padding: 4px 6px; border: 1px solid var(--borda); border-radius: 6px; font-size: 13px; text-align: right; }
.cp-graf { display: flex; align-items: flex-end; gap: 4px; height: 110px; padding: 6px 0; border-bottom: 1px solid var(--borda); }
.cp-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.cp-bar i { display: block; width: 100%; background: var(--azul-claro); border-radius: 3px 3px 0 0; min-height: 2px; }
.cp-bar small { font-size: 9px; color: var(--cinza); margin-top: 2px; }

/* precificação */
.pc-foco { background: rgba(242, 128, 30, .07); }
.pc-novo { width: 84px; text-align: right; padding: 3px 5px; border: 1px solid var(--borda); border-radius: 6px; font-size: 12.5px; margin-top: 2px; }
.pc-tab td, .pc-tab th { white-space: nowrap; }
/* produtos & estoque — um cartão por produto: cabeçalho (nome, códigos, estoque, endereços) e duas tabelas alinhadas */
.ep-card { border: 1px solid var(--borda); border-radius: 12px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.ep-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 14px; background: #f6f7fa; border-bottom: 1px solid var(--borda); }
.ep-titulo { flex: 1 1 320px; min-width: 240px; }
.ep-titulo b { display: block; font-size: 14.5px; }
.ep-titulo small { color: #667; }
.ep-ids, .ep-est, .ep-ends { display: flex; flex-wrap: wrap; gap: 6px; }
.ep-chip { display: inline-flex; flex-direction: column; padding: 3px 9px; border-radius: 8px; background: #fff; border: 1px solid var(--borda); line-height: 1.15; min-width: 64px; }
.ep-chip small { font-size: 10px; color: #778; text-transform: uppercase; letter-spacing: .04em; }
.ep-chip b { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; }
.ep-chip.cod { border-color: var(--laranja); }
.ep-chip.cod b { color: var(--laranja); }
.ep-chip.principal { border-color: var(--verde); }
.ep-chip.vazio { border-style: dashed; color: #99a; }
.ep-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(380px, 1.5fr); gap: 0; }
.ep-pane { padding: 8px 14px 10px; }
.ep-pane + .ep-pane { border-left: 1px solid var(--borda); }
.ep-pane h5 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #667; }
.ep-sub { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ep-sub th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #889; padding: 3px 6px; border-bottom: 1px solid var(--borda); white-space: nowrap; }
.ep-sub td { padding: 5px 6px; border-bottom: 1px dashed #e6e9ef; vertical-align: top; }
.ep-sub tr:last-child td { border-bottom: 0; }
.ep-sub td.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; white-space: nowrap; }
.ep-sub th.num, .ep-sub td.num { text-align: right; white-space: nowrap; }
.ep-sub td.vazio { color: #99a; font-style: italic; }
.ep-emb { display: inline-block; background: #fff3e6; color: #b45309; border: 1px solid #f5d0a9; border-radius: 4px; padding: 0 6px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.ep-sem { color: #99a; font-style: italic; font-family: inherit; }
@media (max-width: 1100px) { .ep-grid { grid-template-columns: 1fr; } .ep-pane + .ep-pane { border-left: 0; border-top: 1px solid var(--borda); } }
.ep-acoes { white-space: nowrap; text-align: right; }
.ep-acoes .btn.mini { padding: 1px 7px; font-size: 12px; margin-left: 3px; }

/* fotos tiradas no coletor (separação / volumes) */
.cf-fotos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 10px; }
.cf-fotos a { display: inline-flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--cinza); text-decoration: none; }
.cf-fotos img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--borda); }
/* etiqueta QR 50×30: QR à esquerda, nome e código à direita */
.wq-etq { flex-direction: row; gap: 2mm; align-items: center; }
.wq-qr { flex: 0 0 24mm; height: 24mm; }
.wq-qr svg { width: 24mm; height: 24mm; display: block; }
.wq-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.wq-txt .wg-nome { font-size: 7pt; line-height: 1.15; height: 3.45em; max-height: 3.45em; -webkit-line-clamp: 3; overflow: hidden; word-break: break-word; overflow-wrap: anywhere; white-space: normal; }
.wq-cod { font-family: ui-monospace, Consolas, monospace; font-size: 11pt; font-weight: 800; margin-top: 1mm; line-height: 1.1; }
.wq-cod small { font-size: 6.5pt; font-weight: 600; }
/* etiqueta 50×30 só com código de barras (Code128 do código Atifix) */
.wb-etq { padding: 1.5mm 2.5mm; }
.wb-nome { font-size: 7.5pt; line-height: 1.15; height: 2.3em; max-height: 2.3em; -webkit-line-clamp: 2; overflow: hidden; word-break: break-word; overflow-wrap: anywhere; white-space: normal; }
.wb-bar { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; margin: .8mm 0 .5mm; }
.wb-bar svg { width: 44mm; height: 12mm; }
.wb-pe { display: flex; justify-content: space-between; align-items: baseline; gap: 2mm; }
.wb-cod { font-family: ui-monospace, Consolas, monospace; font-size: 13pt; font-weight: 900; line-height: 1; }
.wb-ref { font-family: ui-monospace, Consolas, monospace; font-size: 6.5pt; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ---- plano de preços ---- */
.pp-barra { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff8ee; border: 1px solid #f2c48a; border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.pp-barra-botoes { display: flex; gap: 8px; }
.pp-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.pp-campo { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--cinza); font-weight: 600; }
.pp-campo select, .pp-in input { padding: 8px 10px; border: 1px solid var(--borda); border-radius: 8px; font-size: 15px; font-weight: 700; color: var(--texto); background: var(--branco); width: 100%; }
.pp-in { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--texto); }
.pp-in input { width: 110px; }
.pp-eq { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.pp-eq > div { background: #f3f6fb; border: 1px solid var(--borda); border-radius: 12px; padding: 10px 12px; }
.pp-eq small { display: block; color: var(--cinza); font-size: 11.5px; }
.pp-eq b { display: block; font-size: 24px; color: var(--azul); margin: 2px 0; }
.pp-curvas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.pp-curva { border: 1px solid var(--borda); border-radius: 12px; padding: 10px 12px; text-align: center; }
.pp-curva b { display: block; font-size: 26px; line-height: 1; }
.pp-curva span { display: block; font-weight: 700; margin-top: 4px; }
.pp-curva small { color: var(--cinza); }
.pp-A b { color: var(--verde); } .pp-B b { color: var(--azul); } .pp-C b { color: var(--cinza); }
.pp-tab td, .pp-tab th { vertical-align: middle; }
.pp-num { width: 70px; padding: 6px 8px; border: 1px solid var(--borda); border-radius: 8px; font-size: 15px; font-weight: 800; text-align: right; }
.pp-num.pp-baixo { border-color: var(--laranja); background: #fff3e0; color: #7a3d00; }
.pp-conv { display: inline-block; font-size: 11px; color: var(--cinza); white-space: nowrap; margin-top: 3px; }
.pp-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 12px 0; }
.pp-kpi b { font-size: 17px; } .pp-kpi small { display: block; color: var(--cinza); margin-top: 3px; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; max-height: 230px; overflow: auto; padding: 2px; }
.pp-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--borda); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; background: var(--branco); }
.pp-chip.on { border-color: var(--laranja); background: #fff3e0; font-weight: 700; }
.pp-chip small { color: var(--cinza); }
.pp-faixas { display: flex; flex-wrap: wrap; gap: 4px 8px; white-space: nowrap; }
.pp-faixas span b { color: var(--cinza); font-weight: 600; }
.pp-faixas span i { font-style: normal; font-weight: 700; }
/* ---- simulador de produto novo ---- */
.nv-card { padding: 16px 18px; }
.nv-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--borda); padding-bottom: 12px; margin-bottom: 14px; }
.nv-topo h3 { margin: 0 0 4px; }
.nv-topo p { margin: 0; max-width: 640px; }
.nv-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.nv-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: start; }
.nv-bloco { display: flex; flex-direction: column; gap: 10px; }
.nv-cad { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 14px; margin-bottom: 14px; padding: 12px; border: 1px dashed var(--borda); border-radius: 10px; background: #f9fbfd; }
.nv-cad h4 { grid-column: 1 / -1; }
.nv-bloco h4 { margin: 0 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--cinza); border-bottom: 1px solid var(--borda); padding-bottom: 6px; }
.nv-campo { display: grid; grid-template-rows: auto auto; gap: 4px; }
.nv-campo > span:first-child { font-size: 12.5px; color: var(--cinza); font-weight: 600; }
.nv-campo select, .nv-campo input { width: 100%; padding: 9px 10px; border: 1px solid var(--borda); border-radius: 8px; font-size: 14.5px; font-weight: 600; color: var(--texto); background: var(--branco); height: 38px; box-sizing: border-box; }
.nv-campo input[type=number] { font-variant-numeric: tabular-nums; }
.nv-in { position: relative; display: block; }
.nv-in i { position: absolute; top: 0; height: 38px; display: flex; align-items: center; font-style: normal; font-size: 13px; color: var(--cinza); font-weight: 700; pointer-events: none; }
.nv-in i:first-child { left: 10px; }
.nv-in i:last-child { right: 10px; }
.nv-in.com-pre input { padding-left: 32px; }
.nv-in.com-pos input { padding-right: 28px; }
.nv-ajuda { margin: 2px 0 0; font-size: 11.5px; }
.nv-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.nv-kpi { background: #f6f8fc; border: 1px solid var(--borda); border-radius: 12px; padding: 11px 13px; }
.nv-kpi b { display: block; font-size: 23px; line-height: 1.2; margin: 3px 0; color: var(--texto); }
.nv-kpi small { display: block; color: var(--cinza); font-size: 11.5px; }
.nv-kpi.destaque { background: linear-gradient(135deg, #fff6ec, #fff); border-color: #f2c48a; }
.nv-kpi.destaque b { color: var(--laranja); }
.nv-det { margin: 14px 0 0; border: 1px solid var(--borda); border-radius: 10px; padding: 8px 12px; background: #fbfcfe; }
.nv-det summary { cursor: pointer; font-size: 12.5px; color: var(--cinza); font-weight: 600; }
.nv-tab-custo { max-width: 520px; margin-top: 8px; }
.nv-tab-custo td { padding: 5px 4px; font-size: 12.5px; }
.nv-tab-custo .nv-total td { border-top: 2px solid var(--borda); border-bottom: none; font-size: 13.5px; }
.nv-h4 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--cinza); }
.nv-rol { overflow-x: auto; border: 1px solid var(--borda); border-radius: 10px; }
.nv-tab { margin: 0; }
.nv-tab th { background: #f6f8fc; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--cinza); padding: 8px 10px; white-space: nowrap; }
.nv-tab td { padding: 9px 10px; vertical-align: middle; }
.nv-tab tbody tr:last-child td { border-bottom: none; }
.nv-preco { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nv-sub { font-size: 11.5px; color: var(--cinza); font-weight: 600; margin-top: 2px; }
.nv-fraco { color: var(--cinza); font-size: 12.5px; }
/* ---- plano de preços: seções, manual e regras por grupo ---- */
.pp-sec { padding: 0; }
.pp-sec > summary { cursor: pointer; padding: 14px 18px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pp-sec[open] > summary { border-bottom: 1px solid var(--borda); }
.pp-sec-tit { font-size: 15px; font-weight: 800; color: var(--texto); }
.pp-sec-corpo { padding: 14px 18px 18px; }
.pp-h3 { margin: 0 0 10px; font-size: 15px; }
.pp-h4 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--cinza); }
.pp-lbl { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--cinza); font-weight: 700; margin: 12px 0 6px; }
.pp-rol { overflow-x: auto; border: 1px solid var(--borda); border-radius: 10px; }
.pp-tab { margin: 0; }
.pp-tab th { background: #f6f8fc; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--cinza); padding: 8px 10px; white-space: nowrap; }
.pp-tab td { padding: 8px 10px; vertical-align: middle; }
.pp-sub { font-size: 11.5px; color: var(--cinza); margin-top: 2px; }
.pp-in { position: relative; display: inline-flex; align-items: center; }
.pp-in i.dir { position: absolute; right: 10px; font-style: normal; font-size: 12.5px; color: var(--cinza); font-weight: 700; pointer-events: none; }
.pp-in input { padding-right: 30px; }
.pp-manual { background: #fbfcfe; }
.pp-manual > summary { cursor: pointer; padding: 12px 16px; }
.pp-man { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; padding: 0 16px 16px; }
.pp-man h5 { margin: 0 0 4px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--azul); }
.pp-man p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; color: var(--texto); }
.pp-ex { background: #f3f6fb; border-radius: 8px; padding: 6px 9px; font-size: 12.5px !important; color: var(--cinza) !important; }
.pp-regra { border: 1px solid var(--borda); border-left: 4px solid var(--laranja); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: #fffdfa; }
.pp-regra-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pp-regra-nome { flex: 1 1 260px; padding: 8px 10px; border: 1px solid var(--borda); border-radius: 8px; font-size: 14.5px; font-weight: 700; }
.pp-regra-busca { max-width: 320px; margin-bottom: 6px; }
.pp-regra-atac { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; margin-top: 10px; }
.pp-regra-faixas { flex: 1 1 320px; }
.pp-faixas-linha { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pp-faixa-mini { display: inline-flex; align-items: center; gap: 3px; background: var(--branco); border: 1px solid var(--borda); border-radius: 8px; padding: 3px 6px; }
.pp-faixa-mini input { width: 62px; border: none; font-size: 13px; font-weight: 700; text-align: right; background: transparent; }
.pp-faixa-mini i { font-style: normal; font-size: 11px; color: var(--cinza); }
.pp-faixa-mini.emb { background: var(--azul-claro, #eef4ff); border-color: var(--azul, #2b6cb0); }
.pp-faixa-mini.emb b { font-size: 12px; color: var(--azul, #2b6cb0); padding-right: 4px; }
.pp-porcusto { margin: 6px 0 4px; font-size: 12px; color: var(--cinza); display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.pp-porcusto input { width: 78px; }
.oculto { display: none; }

/* ---------------- Assistente de margem ---------------- */
.an-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.an-perg .an-botoes { display: flex; gap: 8px; margin-top: 8px; }
.an-resp { background: var(--branco); border: 1px solid var(--borda); border-left: 3px solid var(--azul, #2b6cb0); border-radius: 8px; padding: 10px 12px; margin-top: 10px; line-height: 1.5; }
.an-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 10px 0; }
.an-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.an-alerta { background: #fff4e5; border: 1px solid #f0b27a; border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.an-obs { background: var(--fundo, #f7f7f7); border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.an-sug { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; margin: 12px 0; }
.an-card { background: var(--branco); border: 1px solid var(--borda); border-radius: 10px; padding: 10px 12px; }
.an-card p { margin: 6px 0 0; font-size: 13px; line-height: 1.45; }
.an-lista { margin-top: 10px; }
.an-lista summary { cursor: pointer; padding: 6px 0; }
.an-conc { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.an-conc .campo { width: auto; min-width: 130px; flex: 1 1 130px; }

/* ---------------- Catálogo: abas e planilha de preços ---------------- */
.cat-abas { display: flex; gap: 4px; margin-bottom: 10px; border-bottom: 2px solid var(--borda); }
.cat-aba { background: none; border: none; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 9px 16px; font-size: 14px; font-weight: 600; color: var(--cinza); cursor: pointer; border-radius: 8px 8px 0 0; }
.cat-aba:hover { background: var(--fundo, #f4f4f5); }
.cat-aba.on { color: var(--texto, #18181b); border-bottom-color: var(--laranja, #e8590c); background: var(--branco); }

.cp-barra { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.cp-barra .busca { flex: 1 1 280px; min-width: 220px; }
.cp-info { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--cinza); padding: 8px 12px; background: var(--fundo, #f7f7f8); border: 1px solid var(--borda); border-radius: 10px 10px 0 0; border-bottom: none; }
.cp-info .cp-fonte { margin-left: auto; }
.cp-rol { overflow: auto; max-height: calc(100vh - 250px); border: 1px solid var(--borda); border-radius: 0 0 10px 10px; background: var(--branco); }
.cp-tab { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.cp-tab thead th { position: sticky; top: 0; z-index: 2; background: var(--branco); border-bottom: 2px solid var(--borda); padding: 9px 10px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--cinza); white-space: nowrap; }
.cp-tab tbody td { padding: 7px 10px; border-bottom: 1px solid var(--borda-clara, #f0f0f1); vertical-align: middle; }
.cp-tab tbody tr:nth-child(even) { background: #fafafa; }
.cp-tab tbody tr:hover { background: #fff7ed; }
.cp-tab .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-tab .centro { text-align: center; }
.cp-ord { cursor: pointer; user-select: none; }
.cp-ord:hover { color: var(--texto, #18181b); }
.cp-ord.on { color: var(--laranja, #e8590c); }
.cp-cod { font-variant-numeric: tabular-nums; color: var(--cinza); white-space: nowrap; }
.cp-nome { display: block; font-weight: 600; line-height: 1.25; }
.cp-ref { display: block; font-size: 11px; color: var(--cinza); }
.cp-est { font-variant-numeric: tabular-nums; }
.cp-est.zero { color: var(--vermelho); }
.cp-tab th.cp-base, .cp-tab td.cp-base { background: #fff7ed; font-weight: 700; }
.cp-tab tbody tr:nth-child(even) td.cp-base { background: #fff2e0; }
.cp-tab th.cp-faixa, .cp-tab td.cp-faixa { background: #f6f9ff; color: #1e3a8a; }
.cp-tab tbody tr:nth-child(even) td.cp-faixa { background: #eef4ff; }
.cp-mais { text-align: center; padding: 12px; }
@media print {
  .menu, .cat-abas, .cp-barra, .cp-mais, .rodape-menu, nav, header { display: none !important; }
  .cp-rol { max-height: none; overflow: visible; border: none; }
  .cp-tab { font-size: 10px; }
  .cp-tab thead th { position: static; }
  .cp-tab tbody tr { page-break-inside: avoid; }
}
.pp-resto { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-size: 13px; flex-wrap: wrap; }
.pp-resto small { flex: 1 1 100%; margin-left: 22px; }
.pp-resto-aviso { background: #eef4ff; border: 1px solid #c7d7f5; border-radius: 8px; padding: 7px 10px; margin: 6px 0; }
.pd-marg { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pd-liq { font-size: 11px; font-weight: 700; }
.pd-lucro { font-size: 11px; font-weight: 700; opacity: .85; }

/* rodape do pedido em duas linhas: numeros em cima com o total a direita, botoes embaixo a direita */
.pedido-rodape .pd-numeros { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; row-gap: 8px; }
.pedido-rodape .pd-numeros .tot.grande { margin-left: auto; text-align: right; }
.pedido-rodape .pd-margem-bloco { min-width: 160px; }
.pedido-rodape .pd-margem-bloco b { white-space: nowrap; }
.pedido-rodape .acoes .btn { white-space: nowrap; }
@media (max-width: 1180px) {
  .pedido-rodape { padding: 10px 14px; }
  .pedido-rodape .pd-numeros { gap: 18px; }
  .pedido-rodape .tot { min-width: 76px; }
  .pedido-rodape .tot.grande b { font-size: 21px; }
}

/* ---------------- Promoções ---------------- */
.pr-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pr-form { border-left: 3px solid var(--laranja); }
.pr-busca { margin: 6px 0; }
.pr-itens { margin: 6px 0 2px; }
.pr-acoes { display: flex; gap: 8px; margin-top: 12px; }
.pr-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pr-tab td, .pr-tab th { white-space: nowrap; }
.pr-tab input.pp-num { width: 92px; }
.pr-tab select { padding: 2px 4px; font-size: 12px; }
tr.pr-prejuizo { background: #fff1f1; }
.pr-resumo { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; background: var(--fundo, #f7f7f8); border: 1px solid var(--borda); border-radius: 10px; padding: 9px 12px; margin: 10px 0; font-size: 13px; }
.pr-resumo .pr-alerta { color: var(--vermelho); font-weight: 700; }

/* ---------------- Etiquetas de preço 50×30 ---------------- */
.ep-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ep-acoes { display: flex; gap: 8px; }
.ep-busca { margin: 10px 0 6px; }
/* modo "bipar e informar a quantidade": caixa logo abaixo do bipe */
.ep-qtd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; padding: 8px 10px; border-radius: 8px;
  background: var(--fundo-destaque, #fff7d6); border: 1px solid #e8c95a; }
.ep-qtd input { width: 110px; font-size: 18px; font-weight: 700; text-align: center; }
.ep-qtd small { color: var(--texto-suave, #666); }
/* varejo do Sankhya embaixo do preço do plano (só na tela); diferença de 20% ou mais em destaque */
.ep-sk { white-space: nowrap; }
.ep-sk.alto { color: var(--vermelho); font-weight: 700; }
/* bipe sem cadastro: o campo pisca vermelho junto com o som */
.ep-busca input.ep-erro { border-color: var(--vermelho); box-shadow: 0 0 0 3px rgba(220, 38, 38, .35); background: #fde8e8; }
.ep-lote { display: flex; gap: 8px; align-items: center; }
.ep-lote .campo { flex: 1; }
.ep-cab { display: flex; align-items: baseline; justify-content: space-between; }
.split-etq { display: grid; grid-template-columns: 1fr 260px; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .split-etq { grid-template-columns: 1fr; } }
.ep-palco { display: flex; justify-content: center; padding: 10px 0; }

/* a etiqueta: 50 × 30 mm reais, iguais na prévia e na impressão */
.ep-linha { display: flex; gap: 1.6mm; width: 101.6mm; height: 30mm; margin: 0 auto 3mm; page-break-inside: avoid; }
.ep-etq { box-sizing: border-box; width: 50mm; height: 30mm; padding: 1.2mm 1.8mm; background: #fff; color: #000;
  border: 1px dashed #aab; display: flex; flex-direction: column; overflow: hidden; }
.ep-etq.vazia { border-color: transparent; }
.ep-nome { font-size: 7pt; line-height: 1.12; font-weight: 700; height: 2.24em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-transform: uppercase; }
/* código e ref.: preto puro e negrito — a térmica não imprime cinza (o #333 saía pontilhado e claro, 12/10/2026) */
.ep-ident { font-size: 6.4pt; color: #000; font-weight: 800; letter-spacing: .03em; line-height: 1.15; margin-top: .3mm; }
.ep-bar { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; margin: .4mm 0; }
.ep-bar svg { width: 44mm; height: 7.5mm; }
.ep-pe { display: flex; justify-content: space-between; align-items: flex-end; gap: 1mm; }
.ep-escada { font-size: 5.8pt; font-weight: 800; line-height: 1.1; max-width: 26mm; text-transform: uppercase;
  border: .3mm solid #000; border-radius: .8mm; padding: .5mm .8mm; }
.ep-escada:empty { border: none; padding: 0; }
.ep-preco { font-size: 14pt; font-weight: 900; line-height: 1; white-space: nowrap; }
/* 50×30 sem preço: o espaço do valor vai para o nome (3 linhas) e para o código de barras */
.ep-etq-sem .ep-nome { height: 3.36em; font-size: 7.4pt; }
.ep-etq-sem .ep-bar svg { width: 44mm; height: 9mm; }
/* 50×30 sem preço: referência grande (28/10/2026) — uma linha só; ref. comprida diminui para não cortar */
.ep-etq-sem .ep-ident { white-space: nowrap; overflow: hidden; line-height: 1.1; }
.ep-etq-sem .ep-ref { font-size: 10pt; font-weight: 900; letter-spacing: 0; }
.ep-etq-sem .ep-ref.longa { font-size: 8pt; }
.ep-cb { font-size: 6.4pt; color: #000; font-weight: 700; letter-spacing: .04em; text-align: center; }
/* 50 × 30 sem preço com a quantidade da embalagem: número das barras à esquerda, quantidade em destaque à direita */
.ep-rod { display: flex; align-items: center; justify-content: space-between; gap: 1mm; }
.ep-rod .ep-cb { text-align: left; }
.ep-un { font-size: 9pt; font-weight: 900; color: #000; line-height: 1; border: .35mm solid #000; border-radius: .6mm; padding: .2mm 1mm; white-space: nowrap; }
@media print {
  .ep-linha { page-break-after: always; margin: 0; width: 101.6mm; height: 29.6mm; overflow: hidden; }
  .ep-linha:last-child { page-break-after: auto; }
  .ep-etq { border: none; height: 29.6mm; }
}

/* Custos digitados: filtro em cima, tabela larga embaixo. A linha mexida fica marcada até gravar. */
.cd-topo { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 12px 0; }
.cd-topo .pp-campo { min-width: 180px; flex: 0 1 240px; }
.cd-topo .pp-campo input { padding: 8px 10px; border: 1px solid var(--borda); border-radius: 8px; font-size: 15px; font-weight: 700; color: var(--texto); background: var(--branco); width: 100%; }
.cd-kpis { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.cd-tb input.pp-num { width: 110px; text-align: right; }
.cd-tb tr.cd-mudou td { background: #fdf3d7; }
@media (max-width: 700px) { .cd-topo .pp-campo { flex: 1 1 100%; } .cd-kpis { margin-left: 0; } }

/* ---------------- Metas e comissão ----------------
   A leitura é o gráfico: 12 colunas por vendedor, coloridas pela faixa que o mês pagou,
   com as linhas de Meta 1/2/3 atravessando. As cores das faixas são as mesmas em toda a tela. */
.mt-cab { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.mt-cab-tit { display: flex; align-items: center; gap: 14px; }
.mt-cab-tit h2 { font-size: 20px; }
.mt-ano { display: inline-flex; align-items: center; gap: 2px; background: var(--branco); border: 1px solid var(--borda); border-radius: 10px; padding: 2px; }
.mt-ano b { padding: 0 12px; font-size: 15px; font-variant-numeric: tabular-nums; }
.mt-seta { border: 0; background: none; font-size: 18px; line-height: 1; padding: 5px 9px; border-radius: 8px; cursor: pointer; color: var(--cinza); }
.mt-seta:hover { background: var(--fundo); color: var(--texto); }
.mt-cab-acoes { display: flex; flex-wrap: wrap; gap: 8px; }

.mt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.mt-kpi { background: var(--branco); border: 1px solid var(--borda); border-radius: 12px; padding: 13px 15px; display: flex; flex-direction: column; gap: 2px; }
.mt-kpi.destaque { background: linear-gradient(135deg, var(--azul), var(--azul-claro)); border-color: var(--azul); }
.mt-kpi.destaque .mt-kpi-rot, .mt-kpi.destaque small { color: #b9c9e0; }
.mt-kpi.destaque .mt-kpi-val { color: #fff; }
.mt-kpi-rot { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--cinza); font-weight: 700; }
.mt-kpi-val { font-size: 21px; font-variant-numeric: tabular-nums; }
.mt-kpi small { color: var(--cinza); font-size: 11.5px; }

.mt-regua { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--branco); border: 1px solid var(--borda); border-radius: 10px; padding: 9px 14px; margin-bottom: 14px; font-size: 12.5px; }
.mt-regua-faixas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; }
.mt-regua-faixas small { font-weight: 400; margin-right: 10px; }
.mt-leg { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.mt-leg.f0 { background: #f2c14e; } .mt-leg.f1 { background: #34a853; }
.mt-leg.f2 { background: #2a6fdb; } .mt-leg.f3 { background: #7b4fc4; }
.mt-leg.l1 { background: #34a853; } .mt-leg.l2 { background: #2a6fdb; } .mt-leg.l3 { background: #7b4fc4; }
.mt-link { border: 0; background: none; color: var(--azul-claro); font-weight: 700; font-size: 12.5px; cursor: pointer; padding: 4px 2px; }
.mt-link:hover { text-decoration: underline; }
.mt-regua .mt-link { margin-left: auto; }
.mt-explica { background: var(--branco); border: 1px solid var(--borda); border-left: 3px solid var(--azul-claro); border-radius: 10px; padding: 12px 15px; margin: -6px 0 14px; font-size: 13px; }
.mt-explica p { margin: 4px 0; color: var(--cinza); }
.mt-explica b { color: var(--texto); }

.mt-lista { display: grid; gap: 14px; }
.mt-card { background: var(--branco); border: 1px solid var(--borda); border-radius: 14px; overflow: hidden; }
.mt-card.aberto { border-color: var(--azul-claro); }
.mt-card-topo { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--borda); }
.mt-quem { display: flex; align-items: center; gap: 12px; }
.mt-quem b { font-size: 16px; }
.mt-pos { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--fundo); color: var(--cinza); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.mt-card:first-child .mt-pos { background: var(--azul); color: #fff; }
.mt-sub { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.mt-bonus { text-align: right; display: flex; flex-direction: column; }
.mt-bonus span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--cinza); font-weight: 700; }
.mt-bonus b { font-size: 22px; color: var(--verde); font-variant-numeric: tabular-nums; line-height: 1.1; }
.mt-bonus small { color: var(--cinza); font-size: 11.5px; }

.mt-card-meio { display: grid; grid-template-columns: 1fr 260px; gap: 18px; padding: 16px; }
.mt-graf { position: relative; height: 168px; padding-bottom: 20px; }
.mt-barras { display: flex; align-items: flex-end; gap: 6px; height: 100%; }
.mt-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.mt-barra { width: 100%; border-radius: 4px 4px 0 0; background: #e3e8f0; transition: height .2s; }
.mt-barra.f0 { background: #f2c14e; } .mt-barra.f1 { background: #34a853; }
.mt-barra.f2 { background: #2a6fdb; } .mt-barra.f3 { background: #7b4fc4; }
.mt-col-mes { position: absolute; bottom: -17px; font-size: 10.5px; color: var(--cinza); text-transform: uppercase; letter-spacing: .02em; }
.mt-col { position: relative; }
.mt-col-mes.dig { color: var(--azul-claro); font-weight: 700; }
.mt-linha { position: absolute; left: 0; right: 0; border-top: 1px dashed; height: 0; z-index: 1; }
.mt-linha span { position: absolute; top: -8px; font-size: 10px; font-weight: 700; background: var(--branco); padding: 0 5px; white-space: nowrap; }
.mt-linha.esq span { left: 0; padding-left: 0; }
.mt-linha.meio span { left: 50%; transform: translateX(-50%); }
.mt-linha.dir span { right: 0; padding-right: 0; }
.mt-linha.l1 { border-color: #34a853; } .mt-linha.l1 span { color: #34a853; }
.mt-linha.l2 { border-color: #2a6fdb; } .mt-linha.l2 span { color: #2a6fdb; }
.mt-linha.l3 { border-color: #7b4fc4; } .mt-linha.l3 span { color: #7b4fc4; }

.mt-metas { display: flex; flex-direction: column; gap: 7px; }
.mt-meta { display: grid; grid-template-columns: 12px 54px 1fr; gap: 8px; align-items: center; font-size: 13px; }
.mt-meta b { font-variant-numeric: tabular-nums; }
.mt-meta-rot { color: var(--cinza); font-weight: 700; font-size: 12px; }
.mt-meta small { grid-column: 3; color: var(--cinza); font-size: 11px; }
.mt-m1 { display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: center; font-size: 12px; color: var(--cinza); font-weight: 700; }
.mt-m1 input, .mt-m1 select { padding: 6px 8px; border: 1px solid var(--borda); border-radius: 8px; font-size: 13px; width: 100%; color: var(--texto); font-weight: 700; background: var(--branco); }
.mt-m1 input { text-align: right; }

.mt-card-pe { padding: 0 16px 12px; }
.mt-meses { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 0 16px 16px; border-top: 1px dashed var(--borda); padding-top: 14px; }
.mt-mes { display: grid; gap: 4px; border: 1px solid var(--borda); border-radius: 10px; padding: 8px 10px; border-left-width: 3px; border-left-color: var(--borda); }
.mt-mes.f0 { border-left-color: #f2c14e; } .mt-mes.f1 { border-left-color: #34a853; }
.mt-mes.f2 { border-left-color: #2a6fdb; } .mt-mes.f3 { border-left-color: #7b4fc4; }
.mt-mes.mudou { background: #fdf3d7; }
.mt-mes-nome { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; text-transform: uppercase; font-size: 12px; }
.mt-mes-nome small { font-weight: 400; text-transform: none; font-size: 10.5px; }
.mt-mes input { width: 100%; text-align: right; padding: 6px 8px; border: 1px solid var(--borda); border-radius: 8px; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mt-mes-pe { font-size: 11px; color: var(--cinza); min-height: 15px; }
.mt-mes-pe b { color: var(--verde); }
.mt-vazio p { margin-top: 6px; }

@media (max-width: 900px) {
  .mt-card-meio { grid-template-columns: 1fr; }
  .mt-bonus { text-align: left; }
  .mt-cab-acoes { width: 100%; }
}

/* Freio de aumento no plano: bloco discreto, só aparece quando existe lista. */
.pp-freio { background: #fdf3d7; border: 1px solid #f0dca8; border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.pp-freio b { font-size: 14px; }
.pp-freio .det-sub { margin: 4px 0 8px; }
.pp-freio-linha { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.pp-freio-linha .pp-campo { max-width: 170px; }

/* ---------------- Documentos A4 no padrão Atifix (orçamento, pedido, separação) ----------------
   Uma página por <article class="dc-page">; a folha desenha as próprias margens, por isso o
   @page do documento vem com margin 0. Vermelho da marca nos títulos, preto nas réguas. */
.via-a4 .via-doc { max-width: 210mm; padding: 0; border: none; background: none; }
.dc-page { position: relative; width: 210mm; min-height: 297mm; box-sizing: border-box; padding: 12mm 12mm 22mm; margin: 0 auto 14px;
  background: #fff; color: #1c1c1c; font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; font-size: 10.5pt; line-height: 1.3;
  border: 1px solid var(--borda); box-shadow: 0 2px 10px rgba(0,0,0,.08); page-break-after: always; }
.dc-page:last-child { page-break-after: auto; }
.dc-page .dc-rot, .dc-tab th { font-size: 7.5pt; letter-spacing: .08em; text-transform: uppercase; color: #6b6b6b; font-weight: 700; }

.dc-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10mm; padding-bottom: 2mm; border-bottom: 2.2pt solid #111; }
.dc-logo { width: 38mm; height: auto; display: block; }
.dc-logo-pb { display: none; }
@media print { .dc-logo-cor { display: none; } .dc-logo-pb { display: block; } }
.dc-cab-dir { text-align: right; }
.dc-titulo { font-size: 20pt; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; line-height: 1.1; }
.dc-numero { font-size: 15pt; font-weight: 800; color: #e0332a; margin-top: 1mm; }
.dc-via { text-align: right; font-size: 8.5pt; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #555; margin: 1.5mm 0 3mm; }
.dc-tab td.dc-ent { font-weight: 800; }
.dc-carimbo { display: inline-block; margin-top: 2mm; padding: 1mm 3mm; border: 1.6pt solid #e0332a; border-radius: 1.5mm; color: #e0332a; font-size: 12pt; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; transform: rotate(-3deg); }
.dc-tab tr.dc-res td { background: #fff3f2; }
.dc-tab td.dc-res-q { color: #e0332a; font-weight: 800; }
.dc-res-aviso { margin: 2mm 0 3mm; padding: 1.5mm 3mm; border-left: 3pt solid #e0332a; background: #fff3f2; color: #b3261e; font-size: 9pt; }
.dc-compacto .dc-tab td { padding: 1mm 2mm; }
.dc-compacto .dc-duplo { margin-bottom: 3mm; }
.dc-compacto .dc-faixa { margin-bottom: 3mm; }
.dc-barcode { display: inline-flex; flex-direction: column; align-items: center; margin-bottom: 3mm; }
.dc-barcode svg { width: 62mm; height: 14mm; }
.dc-barcode span { font-size: 8pt; letter-spacing: .3em; font-weight: 700; margin-top: 1mm; }
.dc-cab-sep { border-bottom: 0; padding-bottom: 0; }
.dc-tit-sep { padding: 3mm 0 4mm; border-bottom: 2.2pt solid #111; }
.dc-tit-sep .dc-titulo { font-size: 20pt; }
.dc-sep .dc-nome { font-size: 10.5pt; }   /* 'Itens em ordem de localização · Corredor A → D' numa linha só */

.dc-faixa { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: .6pt solid #999; margin-bottom: 2.5mm; }
.dc-faixa-item { padding: 1.2mm 3mm; border-right: .6pt solid #bbb; display: flex; flex-direction: column; gap: .6mm; }
.dc-faixa-item:last-child { border-right: 0; }
.dc-faixa-item:first-child { padding-left: 0; }
.dc-faixa-item b { font-size: 10.5pt; }

.dc-duplo { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; margin-bottom: 2.5mm; }
.dc-bloco h4 { font-size: 7.5pt; letter-spacing: .08em; text-transform: uppercase; color: #e0332a; border-bottom: .6pt solid #bbb; padding-bottom: .8mm; margin: 0 0 1.2mm; }
.dc-nome { font-weight: 800; font-size: 11pt; margin-bottom: .6mm; }
.dc-linha { font-size: 9.5pt; color: #2a2a2a; }

.dc-tab { width: 100%; border-collapse: collapse; margin: 1mm 0 2mm; }
.dc-tab thead { display: table-header-group; }
.dc-tab th { text-align: left; padding: 1mm 2mm 1.2mm; border-bottom: 1.2pt solid #111; }
.dc-tab td { padding: 1mm 2mm; border-bottom: .5pt solid #d6d6d6; vertical-align: middle; font-size: 9.5pt; }
.dc-tab tr { page-break-inside: avoid; }
.dc-tab .num { text-align: right; }
.dc-tab .dc-n { color: #8a8a8a; width: 6mm; }
.dc-tab .dc-bar { font-variant-numeric: tabular-nums; color: #333; white-space: nowrap; }
.dc-tab .dc-desc { font-weight: 600; }
.dc-tab .dc-desc small { font-weight: 400; color: #666; }
.dc-tab .dc-tot { font-weight: 800; }
.dc-tab-sep td { padding: 3.6mm 2mm; }
.dc-tab-sep .dc-loc { font-weight: 800; font-size: 12pt; width: 28mm; }
.dc-tab-sep .dc-qtd { font-weight: 800; font-size: 13pt; width: 16mm; }

.dc-pe-tab { display: flex; justify-content: space-between; align-items: flex-end; gap: 8mm; margin-bottom: 2mm; }
.dc-resumo { font-size: 8.5pt; color: #666; }
.dc-totais { border: 0.6pt solid #cfcfcf; border-radius: 1.5mm; padding: 1mm 3mm .8mm; min-width: 112mm; }
.dc-totais-tit { font-size: 7.5pt; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #666; margin-bottom: 0.5mm; }
.dc-totais table { border-collapse: collapse; width: 100%; }
.dc-totais td { padding: 0.3mm 2mm; font-size: 8.5pt; color: #444; white-space: nowrap; }
.dc-totais td.num { text-align: right; color: #1c1c1c; font-variant-numeric: tabular-nums; min-width: 24mm; }
.dc-totais td small { font-size: 7pt; color: #888; }
.dc-totais .dc-total td { border-top: 1.4pt solid #111; padding-top: 1mm; font-weight: 800; font-size: 11pt; color: #1c1c1c; }
.dc-totais .dc-total td.num { color: #e0332a; font-size: 13.5pt; }
.dc-totais-obs { font-size: 7pt; color: #777; margin-top: 0.6mm; }

.dc-cond { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1.6pt solid #111; margin-top: auto; }
.dc-cond-col { padding: 1.5mm 4mm 1.5mm 0; border-right: .6pt solid #bbb; display: flex; flex-direction: column; gap: .8mm; }
.dc-cond-col + .dc-cond-col { padding-left: 4mm; }
.dc-cond-col:last-child { border-right: 0; }
.dc-cond-col p { margin: 0; font-size: 9.5pt; }
.dc-cond-vazia { padding-top: 0; }
.dc-obs { border-top: .6pt solid #bbb; padding: 1.2mm 0; display: flex; flex-direction: column; gap: .8mm; }
.dc-obs p { margin: 0; font-size: 9.5pt; }

.dc-assin { display: grid; grid-template-columns: 1fr 1fr; gap: 12mm; margin-top: 4mm; }
.dc-assin-l { border-top: .8pt solid #333; padding-top: 1.5mm; font-size: 8pt; color: #555; }
.dc-sep .dc-assin { grid-template-columns: 1fr 1fr 1fr; gap: 8mm; }

.dc-rodape { display: flex; justify-content: space-between; border-top: 2pt solid #e0332a; padding-top: 2mm; font-size: 7.5pt; letter-spacing: .06em;
  color: #555; position: absolute; left: 12mm; right: 12mm; bottom: 8mm; }
/* folha = tabela: topo vazio, corpo (a .dc-page) e rodapé no tfoot, que o navegador repete em cada página impressa */
.dc-folha { width: 210mm; margin: 0 auto 14px; border-collapse: collapse; background: #fff; border: 1px solid var(--borda); box-shadow: 0 2px 10px rgba(0,0,0,.08); page-break-after: always; }
.dc-folha:last-child { page-break-after: auto; }
.dc-folha > thead > tr > td, .dc-folha > tbody > tr > td, .dc-folha > tfoot > tr > td { padding: 0; vertical-align: top; }   /* só as células da folha; as tabelas de dentro mantêm o próprio espaçamento */
.dc-folha .dc-folha-topo { height: 6mm; }   /* repete no topo de cada página impressa: a 2ª folha não começa colada na borda */
.dc-folha .dc-folha-pe { height: 10mm; padding: 0 12mm 3mm; vertical-align: bottom; }
.dc-folha .dc-page { min-height: 266mm; padding: 1mm 12mm 2mm; margin: 0; border: 0; box-shadow: none; page-break-after: auto; }
.dc-folha .dc-rodape { position: static; }

/* a folha ocupa toda a altura: condições vão para o pé; o conteúdo cresce para outra página quando não cabe */
.dc-page { display: flex; flex-direction: column; }
.dc-page > .dc-tab, .dc-page > .dc-pe-tab, .dc-page > .dc-duplo, .dc-page > .dc-faixa, .dc-page > .dc-cab, .dc-page > .dc-resumo { flex: 0 0 auto; }

@media print {
  .via-a4 .via-doc { max-width: none; }
  .dc-page { width: 210mm; min-height: 297mm; margin: 0; border: none; box-shadow: none; }
  .dc-rodape { position: fixed; }
  .dc-folha { margin: 0; border: none; box-shadow: none; }
  .dc-folha thead { display: table-header-group; }
  .dc-folha tfoot { display: table-footer-group; }
  /* 250 mm (não 266): a margem física da impressora / da janela de impressão empurrava o rodapé para uma 2ª folha.
     Folha compacta (pedido conferido, comprovantes) termina onde o conteúdo termina: 2 itens saíam em 3 folhas (02/10/2026) */
  .dc-folha .dc-page { min-height: 250mm; }
  .dc-folha .dc-page.dc-compacto { min-height: 0; }
  .dc-folha .dc-rodape { position: static; }
  .dc-tab tr, .dc-folha .dc-totais, .dc-folha .dc-assin, .dc-folha .dc-cond { page-break-inside: avoid; }
  /* impressora/driver que descarta cor deixava sumir o nº do pedido, os títulos dos blocos e o total: no papel, tudo em preto */
  .dc-numero, .dc-bloco h4, .dc-totais .dc-total td.num, .dc-tab td.dc-res-q, .dc-res-aviso, .dc-carimbo { color: #111 !important; }
  .dc-carimbo { border-color: #111 !important; }
  .dc-rodape { border-top-color: #111 !important; }
  .dc-res-aviso { border-left-color: #111 !important; background: #f2f2f2 !important; }
  .dc-tab tr.dc-res td { background: #f2f2f2 !important; }
}

/* Notas fiscais (27/10/2026): botões da linha quebram em duas fileiras — o ✕ Cancelar não some à direita em tela menor */
.nf-lista td, .nf-lista th { padding: 8px 8px; }
.nf-acoes { display: flex; flex-wrap: wrap; gap: 4px; min-width: 150px; max-width: 200px; }
.nf-acoes .btn { white-space: nowrap; }
