/* ═══════════════════════════════════════════════════════════════════
 * main.css — Estilos globais do sistema Saldante
 * Extraído de index.html na Fase 1A da modularização.
 * Carregado em todas as páginas via <link>.
 * ═══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --text: #1e293b;
  --muted: #64748b;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }

/* layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: var(--surface); border-right: 1px solid var(--border); padding: 24px 0; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.main { flex: 1; padding: 28px; overflow-x: hidden; overflow-y: auto; min-height: 100vh; }
.page { display: none; width: 100%; }
.page.active { display: block; width: 100%; }
.logo { padding: 0 20px 24px; font-size: 16px; font-weight: 700; color: var(--primary); border-bottom: 1px solid var(--border); }
.logo span { font-size: 11px; font-weight: 400; color: var(--muted); display: block; margin-top: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; cursor: pointer; color: var(--muted); transition: background .15s, color .15s; border-left: 3px solid transparent; }
.nav-item:hover { background: #f1f5ff; color: var(--primary); }
.nav-item.active { color: var(--primary); background: #eff6ff; border-left-color: var(--primary); font-weight: 500; }
.nav-section { font-size: 11px; font-weight: 700; color: var(--muted); padding: 16px 20px 6px; text-transform: uppercase; letter-spacing: .06em; }
/* Recolher/expandir a seção do menu (sinal +/−), montado por montarToggleSecoes() em common.js. */
.nav-section-toggle { display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
.nav-section-toggle:hover { color: var(--primary); }
.nav-sec-sinal { font-weight: 700; font-size: 14px; line-height: 1; opacity: .55; }
.sec-recolhida-item { display: none !important; }

/* page */
.page-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.page-sub { color: var(--muted); font-size: 13px; margin-bottom: 24px; }

/* cards */
.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
/* Início: colunas mais largas p/ os valores (R$ …) não quebrarem; auto-fit = responsivo. */
#home-cards { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.card-value { font-size: 22px; font-weight: 700; }
.card-value.green { color: var(--success); }
.card-value.red { color: var(--danger); }
.card-value.blue { color: var(--primary); }
/* Cards "Fôlego" e "Margem líquida" do Início — layout próprio (não afeta os demais). */
.fol-sub { font-size: 11px; color: var(--muted); line-height: 1.55; margin-top: 4px; }
.mliq-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mliq-row + .mliq-row { margin-top: 8px; }
.mliq-lbl { font-size: 12px; color: var(--muted); }
.mliq-val { font-size: 18px; font-weight: 700; white-space: nowrap; }
.mliq-val.blue { color: var(--primary); }
.mliq-val.red { color: var(--danger); }
/* Cobrança — subtotais em card + linhas "planilha" (valor no centro, ações à direita). */
.cob-tot { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cob-tot .card { padding: 12px 18px; min-width: 190px; }
.cob-tot .lbl { font-size: 12px; color: var(--muted); }
.cob-tot .val { font-size: 21px; font-weight: 700; line-height: 1.15; margin-top: 2px; }
.cob-tot .qtd { font-size: 11px; color: var(--muted); margin-top: 2px; }
.cob-row { display: flex; align-items: center; gap: 14px; padding: 9px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; }
.cob-row .info { flex: 1; min-width: 0; }
.cob-row .cli { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cob-row .cli .pc { font-size: 11px; color: var(--muted); font-weight: 400; }
.cob-row .desc { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cob-row .valor { flex: 0 0 170px; text-align: center; font-weight: 700; font-size: 15px; }
.cob-row .acoes { display: flex; gap: 4px; flex-shrink: 0; }
.cob-ico { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); cursor: pointer; font-size: 15px; color: var(--text); padding: 0; }
.cob-ico:hover { background: #f1f5ff; border-color: var(--primary); }
.cob-ico.fat { border-color: var(--primary); color: var(--primary); }
@media (max-width: 640px) { .cob-row { flex-wrap: wrap; } .cob-row .valor { flex-basis: auto; text-align: right; } }

/* table */
.table-wrap {   background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; overflow-y: visible;
  box-shadow: var(--shadow); 
}
table { width: 100%; border-collapse: collapse; }
th { background: #f8fafc; color: var(--muted); font-size: 12px; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge.receita { background: #dcfce7; color: #15803d; }
.badge.custo { background: #fee2e2; color: #b91c1c; }
.badge.despesa_operacional { background: #fef3c7; color: #b45309; }
.badge.despesa_financeira { background: #fce7f3; color: #9d174d; }
.badge.deducao { background: #f3e8ff; color: #7e22ce; }

/* form */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
input, select { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--surface); color: var(--text); outline: none; transition: border-color .2s; }
input:focus, select:focus { border-color: var(--primary); }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.checkbox-row input { width: auto; }
.btn { padding: 9px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: background .15s, opacity .15s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: white; font-size: 12px; padding: 4px 12px; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: #f1f5f9; }
.btn-success { background: var(--success); color: white; }
.actions-row { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.spacer { flex: 1; }
.filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.filter-row select, .filter-row input { min-width: 100px; }

/* DRE table */
.dre-table { width: 100%; border-collapse: collapse; }
.dre-table th, .dre-table td { padding: 9px 14px; border-bottom: 1px solid var(--border); text-align: right; }
.dre-table th:first-child, .dre-table td:first-child { text-align: left; }
.dre-table .total-row td { background: #eff6ff; font-weight: 700; color: var(--primary); }
.dre-table .section-header td { background: #f8fafc; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.dre-table .negative { color: var(--danger); }
.dre-table .positive { color: var(--success); }
.dre-table .indent { padding-left: 28px; color: var(--muted); }

/* ── DRE Mensal — densidade/hierarquia (ESCOPADO em #page-dre) ────────
 * Polimento só de apresentação (pedido do dono: "a tela ficou muito
 * grande, dados espalhados"). Aditivo: NADA foi removido/renomeado
 * acima; estas regras só reforçam a densidade dentro de #page-dre.
 * Especificidade (id `#page-dre` + classe[+classe/tipo]) já vence as
 * regras-base globais (.card/.card-value/.card-label/.dre-table td)
 * sem precisar de !important — por isso NÃO usar !important aqui.
 * Não reaproveitar fora de #page-dre (não é global). */

/* banda de KPI mais fina — só os 5 cards de #dre-cards */
#page-dre #dre-cards {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
#page-dre #dre-cards .card { padding: 10px 12px; }
#page-dre #dre-cards .card-label {
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: break-word; /* selos "✅ Plano definido"/período no 1º card quebram elegante */
}
#page-dre #dre-cards .card-value { font-size: 18px; }

/* controles do período — harmoniza a densidade, sem tocar em campos/botão */
#page-dre .period-card { padding: 12px 16px; margin-bottom: 14px; }

/* tabela mais densa, números colunados */
#page-dre .dre-table th,
#page-dre .dre-table td {
  padding: 5px 12px;
  font-variant-numeric: tabular-nums;
}
/* linhas de detalhe recuadas, mais discretas (mantém indent + cor muted) */
#page-dre .dre-table .indent {
  padding-left: 28px;
  font-size: 13px;
  color: var(--muted);
}
/* totais "saltam": filete de topo + leve realce de tamanho, mantendo o azul */
#page-dre .dre-table .total-row td {
  border-top: 2px solid var(--border);
  font-size: 14px;
}
/* cabeçalhos de seção (RECEITAS/CUSTOS/FOLHA/DESPESAS): respiro de grupo */
#page-dre .dre-table .section-header td {
  padding-top: 12px;
  background: #f1f5f9;
}

/* projeção */
.proj-table-wrap { overflow-x: auto; }
.proj-table { min-width: 900px; border-collapse: collapse; width: 100%; }
.proj-table th, .proj-table td { padding: 8px 10px; border: 1px solid var(--border); text-align: right; font-size: 12px; white-space: nowrap; }
.proj-table th:first-child, .proj-table td:first-child { text-align: left; min-width: 180px; background: #f8fafc; position: sticky; left: 0; }
.proj-table thead th { background: #1e40af; color: white; font-weight: 600; }
.proj-table thead th:first-child { background: #1e3a8a; }
.proj-table .total-row td { background: #dbeafe; font-weight: 700; }
.proj-table .positive { color: var(--success); }
.proj-table .negative { color: var(--danger); }

/* Faturamento por trimestre — agrupar cada ano + sua variação A/A (design sutil, parecer frontend) */
.tri-table th.tri-ano, .tri-table td.tri-ano { border-left: 1px solid var(--border); }
.tri-table th.tri-ano { color: var(--text); font-weight: 700; }
.tri-table th.tri-aa  { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: none; letter-spacing: 0; }
.tri-table th.tri-atual, .tri-table td.tri-atual { border-left: 2px solid color-mix(in srgb, var(--primary) 45%, var(--border)); }
.tri-table th.tri-atual { color: var(--primary); }

/* toast */
.variacao-ok { color:var(--success);font-weight:500; }
.variacao-mal { color:var(--danger);font-weight:500; }
.variacao-pend { color:var(--muted); }
.func-tipo-clt { background:#eff6ff;color:#1d4ed8; }
.func-tipo-terceiro { background:#fef9c3;color:#854d0e; }
.func-tipo-socio { background:#fdf4ff;color:#7e22ce; }

.toast { position: fixed; bottom: 28px; right: 28px; background: #1e293b; color: white; padding: 12px 20px; border-radius: var(--radius); font-size: 13px; opacity: 0; transform: translateY(10px); transition: all .3s; z-index: 999; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }

/* empty state */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg { margin-bottom: 12px; }

/* acessibilidade: rótulo só para leitores de tela */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Estoque (master-detail) ─────────────────────────────────────────── */
.est-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.est-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.est-detalhe { position: sticky; top: 16px; }
@media (max-width: 900px) {
  .est-grid { grid-template-columns: 1fr; }
  .est-detalhe { position: static; }
  .est-search input { width: 100% !important; }
}
/* linha selecionável da lista */
tr.est-row { cursor: pointer; }
tr.est-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
tr.est-row.est-sel td { background: #eff6ff; }
tr.est-row.est-sel td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
/* chips-resumo do detalhe */
.est-chips { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px 20px; }
.est-chip { flex: 1; min-width: 90px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.est-chip .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.est-chip .val { font-size: 16px; font-weight: 700; margin-top: 2px; }
/* ajuste manual recolhível */
.est-ajuste { padding: 0 20px 12px; }
.est-ajuste > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--primary); padding: 6px 0; list-style: none; }
.est-ajuste > summary::-webkit-details-marker { display: none; }
.est-ajuste > summary::before { content: '＋ '; font-weight: 700; }
.est-ajuste[open] > summary::before { content: '－ '; }

/* ── Títulos (Contas a Receber/Pagar) ────────────────────────────────── */
.tit-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tit-tab { background: transparent; border: none; border-bottom: 2px solid transparent; padding: 10px 16px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; }
.tit-tab:hover { color: var(--primary); }
.tit-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tit-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
/* cards de aging clicáveis */
.tit-card { text-align: left; cursor: pointer; font: inherit; transition: box-shadow .15s, border-color .15s; }
.tit-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(37,99,235,.12); }
.tit-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tit-card.tit-card-ativo { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: #eff6ff; }
.tit-card-total { border-color: var(--primary); background: linear-gradient(180deg, #eff6ff, var(--surface)); }
.tit-est { display: inline-block; font-size: 10px; color: var(--warning); background: #fef3c7; padding: 1px 6px; border-radius: 10px; white-space: nowrap; cursor: help; }
/* badge discreto do tipo de documento (não compete com o status colorido) */
.tit-tipo { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .02em; color: var(--muted); background: transparent; border: 1px solid var(--border); padding: 0 6px; border-radius: 6px; white-space: nowrap; vertical-align: middle; }
.tit-btn-sm { font-size: 12px; padding: 4px 8px; }
tr.tit-sel td { background: #eff6ff; }
/* barra de baixa em lote */
.tit-selbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #eff6ff; border: 1px solid var(--primary); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 12px; font-size: 13px; }
.tit-selbar > span { flex: 1; min-width: 200px; }
/* modal de baixa */
.tit-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; }
.tit-modal { background: var(--surface); border-radius: 12px; width: min(680px, 96vw); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.tit-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.tit-modal-body { padding: 16px 20px; overflow-y: auto; }
.tit-modal-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }

/* period selector */
.period-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; display: flex; gap: 16px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }

/* ── Conciliar (conciliação bancária) ─────────────────────────────────
 * Classes de apoio da tela "Conciliar": tornam a fila mais respirável e
 * reduzem estilo inline repetido. Cores de nível (ouro/prata/bronze/sem
 * match) vêm suaves via inline no JS; aqui ficam só forma e espaçamento. */
.conc-hint { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.conc-hint b { color: var(--text); font-weight: 600; }
.conc-selbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--bg); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 12px; }
.conc-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; letter-spacing: .01em; }
.conc-nivel { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 4px 11px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.conc-nivel-card { display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.conc-nivel-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.08); transform: translateY(-1px); }
.conc-nivel-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.conc-banco { border-radius: 10px; padding: 9px 12px; min-width: 190px; max-width: 340px; border: 1px solid transparent; }
.conc-actions { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; padding-top: 4px; }
.conc-act { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; font-size: 13px; line-height: 1; border-radius: 8px; }
.conc-act:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
#conc-tbody td { vertical-align: top; }

/* ── Fluxo de caixa (visão básica + fôlego) ───────────────────────────
 * Só forma/espaçamento; cores vêm das variáveis de tema (claro e escuro). */
.fx-topo { align-items: stretch; }
.fx-folego { flex: 2; min-width: 260px; display: flex; flex-direction: column; gap: 4px; border-left: 3px solid var(--primary); }
.fx-folego-neutro { border-left-color: var(--border); }
.fx-folego-num { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.2; }
.fx-folego-sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.fx-selo { align-self: flex-start; margin-top: 6px; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.fx-selo-ok { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.fx-saldo { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.fx-saldoini { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.fx-saldoini-lbl { font-size: 13px; font-weight: 500; color: var(--text); text-transform: none; letter-spacing: 0; }
.fx-saldoini input { min-width: 160px; }
.fx-saldoini-hint { flex: 1; min-width: 200px; font-size: 12px; color: var(--muted); }
.fx-detalhe { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 24px; }
.fx-detalhe > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--primary); padding: 14px 20px; list-style: none; user-select: none; }
.fx-detalhe > summary::-webkit-details-marker { display: none; }
.fx-detalhe > summary::before { content: '＋ '; font-weight: 700; }
.fx-detalhe[open] > summary::before { content: '－ '; }
.fx-detalhe > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: var(--radius); }
.fx-detalhe-body { padding: 0 16px 8px; }

/* ── Baixas recentes (cards humanos) ──────────────────────────────────── */
.bx-lista { display: flex; flex-direction: column; gap: 10px; padding: 8px 16px 16px; }
.bx-card { border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: var(--radius); padding: 12px 16px; background: var(--surface); }
.bx-card.bx-receb { border-left-color: var(--success); }
.bx-card.bx-pag { border-left-color: var(--warning); }
.bx-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bx-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bx-valor { font-size: 15px; font-weight: 700; color: var(--text); }
.bx-em { font-size: 12px; color: var(--muted); }
.bx-tipo { font-size: 10px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.bx-tipo-receb { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.bx-tipo-pag { color: var(--warning); background: color-mix(in srgb, var(--warning) 16%, transparent); }
.bx-origem { font-size: 10px; font-weight: 600; color: var(--muted); border: 1px solid var(--border); padding: 1px 7px; border-radius: 6px; }
.bx-parceiro { font-size: 13px; font-weight: 500; color: var(--text); margin: 6px 0 8px; }
.bx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bx-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.bx-chip-nf { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
/* selo "🧾 NF …" clicável (abre o modal de estorno por-nota) — mesma cara do chip,
   sem herdar o reset padrão de <button> (fonte/cursor/hover). */
.bx-chip-btn { font: inherit; cursor: pointer; color: inherit; }
.bx-chip-btn:hover { border-color: var(--primary); color: var(--primary); }
.bx-chip-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.bx-chip-banco { color: var(--muted); }
.bx-chip-vazio { color: var(--muted); font-style: italic; }
.bx-chip-boleto { color: var(--text); }
.bx-mais { font-weight: 600; color: var(--primary); }
.bx-boleto-pdf { color: var(--primary); text-decoration: none; font-weight: 600; }
.bx-boleto-pdf:hover { text-decoration: underline; }
.bx-obs { margin-top: 8px; font-size: 12px; color: var(--muted); }
.bx-estornar { flex-shrink: 0; }
