.report-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  margin-bottom: 0;
}
.recebido-tabs {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}
.recebido-tab-panel.hidden { display: none; }

.sales-report-tabs {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}
.sales-report-panel.hidden { display: none; }

.sales-report-tab {
  min-height: 58px;
  border: 1px solid var(--line);
  border-bottom: 0;
  color: #344054;
  background: #fff;
  font-weight: 800;
  text-transform: uppercase;
}

.sales-report-tab.active {
  color: #3b16a3;
  border-top: 3px solid #3b16a3;
  box-shadow: var(--shadow);
}

.report-tab {
  min-height: 58px;
  border: 1px solid var(--line);
  border-bottom: 0;
  color: #344054;
  background: #fff;
  font-weight: 800;
  text-transform: uppercase;
}

.report-tab.active {
  color: #3b16a3;
  border-top: 3px solid #3b16a3;
  box-shadow: var(--shadow);
}

.report-panel {
  margin-bottom: 18px;
}

.report-filters {
  margin-bottom: 18px;
}

.reports-table {
  min-width: 1660px;
}

.reports-table.receivable-risk-table {
  min-width: 1180px;
}

.reports-table.receivable-summary-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.reports-table.receivable-summary-table td:first-child {
  width: 40%;
}

.receivable-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.receivable-risk-table td,
.receivable-risk-table th {
  white-space: nowrap;
}

.receivable-client-title td {
  padding-top: 18px;
  color: var(--navy);
  background: #fff;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.receivable-client-header td {
  color: #fff;
  background: var(--navy);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.risk-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.risk-pill.low {
  color: var(--green);
  background: var(--soft-green);
}

.risk-pill.medium {
  color: #a16207;
  background: #fff6df;
}

.risk-pill.high {
  color: var(--orange);
  background: #fff4e8;
}

.risk-pill.critical {
  color: var(--red);
  background: var(--soft-red);
}

.reports-table:not(.receivable-risk-table) td:first-child,
.reports-table:not(.receivable-risk-table) th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  font-weight: 800;
  background: inherit;
}

/* Fundo explícito para as variações de linha */
.reports-table:not(.receivable-risk-table) tr td:first-child { background: #fff; }
.reports-table:not(.receivable-risk-table) tr.report-row-negative td:first-child { background: var(--soft-red); }
.reports-table:not(.receivable-risk-table) tr.report-row-synthetic td:first-child { background: #f7f9fc; }
.reports-table:not(.receivable-risk-table) tr.report-row-calculation td:first-child { background: #fff8e6; }

.reports-table:not(.receivable-risk-table) th:first-child {
  z-index: 3;
}

/* Sombra para indicar que há conteúdo à esquerda */
.reports-table:not(.receivable-risk-table) td:first-child::after,
.reports-table:not(.receivable-risk-table) th:first-child::after {
  content: "";
  position: absolute;
  top: 0; right: -6px; bottom: 0;
  width: 6px;
  background: linear-gradient(to right, rgba(0,0,0,0.06), transparent);
  pointer-events: none;
}

/* Barra de rolagem no topo */
.dre-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  height: 12px;
  margin-bottom: 2px;
}

.dre-scroll-top-inner {
  height: 1px;
}

.reports-table tr.report-row-negative td {
  background: var(--soft-red);
}

.reports-table tr.report-row-synthetic td {
  background: #f7f9fc;
  font-weight: 900;
}

.reports-table tr.report-row-synthetic td.report-positive {
  color: var(--navy);
  background: #f7f9fc;
}

.reports-table tr.report-row-calculation td {
  background: #fff8e6;
  color: #8a5b00;
  font-weight: 900;
}

.reports-table .report-indent-1 {
  padding-left: 26px;
}

.reports-table .report-indent-2 {
  padding-left: 42px;
}

.reports-table .report-indent-3 {
  padding-left: 58px;
}

.report-positive {
  color: var(--green);
  background: var(--soft-green);
  font-weight: 800;
}

.report-negative {
  color: var(--red);
  background: var(--soft-red);
  font-weight: 800;
}

.account-group {
  display: inline-flex;
  border-radius: 6px;
  padding: 5px 9px;
  color: var(--blue);
  background: var(--soft-blue);
  font-size: 12px;
  font-weight: 800;
}

.account-nature,
.account-status {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 6px;
  padding: 5px 9px;
  color: var(--green);
  background: var(--soft-green);
  font-size: 12px;
  font-weight: 800;
}

.account-nature.expense {
  color: var(--red);
  background: var(--soft-red);
}

.account-nature.synthetic {
  color: #1d2b3a;
  background: #eef2f7;
}

.fixed-account-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 6px;
  padding: 5px 10px;
  color: #9a6a00;
  background: #fff8df;
  font-size: 12px;
  font-weight: 800;
}

.accounts-table tr.synthetic-row td {
  background: #f7f9fc;
  font-weight: 800;
}

.accounts-table tr.analytic-row td:first-child {
  padding-left: 28px;
}

.account-status.inactive {
  color: var(--red);
  background: var(--soft-red);
}

.action-buttons {
  display: flex;
  gap: 8px;
}

/* ── Modal de ações ── */
/* ── Toggle colapso DRE ── */
.dre-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 4px;
  border: none;
  border-radius: 4px;
  background: rgba(255,255,255,0.15);
  color: inherit;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.15s;
}

.dre-toggle:hover {
  background: rgba(255,255,255,0.3);
}

.dre-toggle .material-icons {
  transition: transform 0.2s;
}

tr.dre-collapsed .dre-toggle .material-icons {
  transform: rotate(-90deg);
}

tr.dre-hidden {
  display: none;
}

.action-dropdown {
  display: inline-block;
}

.action-dropdown-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
}

.action-dropdown.open .action-dropdown-menu {
  display: flex;
}

.action-dropdown-menu-inner {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.22);
  min-width: 220px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.action-dropdown-menu-title {
  padding: 14px 20px 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}

.action-dropdown-menu button {
  display: block;
  width: 100%;
  padding: 13px 20px;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}

.action-dropdown-menu button:last-child {
  border-bottom: none;
}

.action-dropdown-menu button:hover {
  background: var(--accent-light, #eaf3ff);
}

.small-action {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: #fff;
  font-weight: 800;
}

.save-row-btn {
  background: #16a34a;
  color: #fff;
  border-color: #15803d;
}

.save-row-btn:hover {
  background: #15803d;
}

.save-row-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

tr.row-dirty {
  outline: 2px solid #16a34a;
  outline-offset: -1px;
}

.other-panel {
  display: none;
}

.other-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.other-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.other-card-header {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 42px;
  color: #fff;
  background: #6d36b4;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.other-card-header input {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.other-card-header input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.other-list {
  display: grid;
}

.other-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  text-align: center;
}

.other-actions {
  justify-content: center;
}

.other-row strong {
  font-size: 13px;
  padding: 0 10px;
}

.other-row span {
  color: #344054;
}

.inline-add-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
}


.bank-card {
  min-height: 98px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bank-card small,
.bank-card span {
  display: block;
}

.bank-card small {
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.bank-card strong {
  color: var(--navy-2);
  font-size: 18px;
}

/* Padrão único de barra de filtros do sistema (mesmo formato da tela de
   Contas a Pagar) — campos com largura natural, alinhados pela base, quebrando
   linha quando não cabem, em vez do grid de colunas iguais que ficava largo
   e desalinhado com os botões de ação. */
.filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}

.filters label {
  flex: 0 0 auto;
  min-width: 150px;
}

.filters .form-actions,
.filters > button {
  flex: 0 0 auto;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
}

.table-heading {
  align-items: flex-end;
}

.legend {
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 999px;
}

.income-dot {
  background: var(--green);
}

.expense-dot {
  background: var(--red);
}

.table-wrap {
  overflow-x: auto;
}

#entryTableWrap {
  max-height: calc(100vh - 320px);
  overflow-y: auto;
}

#entryTableWrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--navy, #04101b);
}

#statementTableWrap {
  max-height: calc(100vh - 320px);
  overflow-y: auto;
}

#statementTableWrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--navy, #04101b);
}


/* Scrollbar espelhada no topo da tabela */
.table-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  height: 12px;
  margin-bottom: 2px;
}

.table-scroll-top > div {
  height: 1px;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px 0 0;
}

.table-pagination.hidden {
  display: none;
}

.table-pagination span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table-pagination button {
  min-height: 38px;
}

.table-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

table {
  width: 100%;
  min-width: 1800px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #fff;
  background: var(--navy);
  font-size: 12px;
  text-transform: uppercase;
}

td.number,
th.number {
  text-align: right;
}

.tag,
.status {
  display: inline-flex;
  align-items: center;
  min-width: 78px;
  justify-content: center;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

/* ── Tabelas fiscais emitidas ─────────────────────────────────────────────── */

/* Scroll vertical + header fixo na tabela NFS-e */
#invoiceTableWrap {
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  overflow-x: auto;
}

/* Impede o browser de espremer as colunas */
#invoiceTableWrap .invoice-table {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}

#invoiceTableWrap .invoice-table th,
#invoiceTableWrap .invoice-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#invoiceTableWrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--navy, #04101b);
}

/* Bordas verticais só nas linhas de dados */
.invoice-table tbody td {
  border-right: 1px solid var(--line);
}

.invoice-table tbody td:last-child {
  border-right: none;
}

/* Larguras das colunas da tabela NFS-e (15 colunas) */
.invoice-table th:nth-child(1),
.invoice-table td:nth-child(1)  { width: 40px;  min-width: 40px; }   /* checkbox */
.invoice-table th:nth-child(2),
.invoice-table td:nth-child(2)  { min-width: 130px; }                 /* cadastro personalizado */
.invoice-table th:nth-child(3),
.invoice-table td:nth-child(3)  { min-width: 110px; }                 /* emissão */
.invoice-table th:nth-child(4),
.invoice-table td:nth-child(4)  { min-width: 90px;  }                 /* número */
.invoice-table th:nth-child(5),
.invoice-table td:nth-child(5)  { min-width: 220px; }                 /* tomador */
.invoice-table th:nth-child(6),
.invoice-table td:nth-child(6)  { min-width: 100px; }                 /* serviço */
.invoice-table th:nth-child(7),
.invoice-table td:nth-child(7)  { min-width: 70px;  }                 /* ISS */
.invoice-table th:nth-child(8),
.invoice-table td:nth-child(8)  { min-width: 80px;  }                 /* retido */
.invoice-table th:nth-child(9),
.invoice-table td:nth-child(9)  { min-width: 130px; }                 /* valor */
.invoice-table th:nth-child(10),
.invoice-table td:nth-child(10) { min-width: 110px; }                 /* dedução */
.invoice-table th:nth-child(11),
.invoice-table td:nth-child(11) { min-width: 110px; }                 /* ISSQN */
.invoice-table th:nth-child(12),
.invoice-table td:nth-child(12) { min-width: 150px; }                 /* situação */
.invoice-table th:nth-child(13),
.invoice-table td:nth-child(13) { min-width: 150px; }                 /* empresa */
.invoice-table th:nth-child(14),
.invoice-table td:nth-child(14) { min-width: 160px; }                 /* centro de custo */
.invoice-table th:nth-child(15),
.invoice-table td:nth-child(15) { min-width: 120px; }                 /* ações */

/* ── CT-e (16 colunas) ────────────────────────────────────────────── */
/* Scroll vertical + header fixo na tabela CT-e */
#cteTableWrap {
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  overflow-x: auto;
}

#cteTableWrap .invoice-table {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}

#cteTableWrap .invoice-table th,
#cteTableWrap .invoice-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#cteTableWrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--navy, #04101b);
}

#cteTableWrap .invoice-table th:nth-child(1),
#cteTableWrap .invoice-table td:nth-child(1)  { width: 40px;  min-width: 40px; }   /* checkbox */
#cteTableWrap .invoice-table th:nth-child(2),
#cteTableWrap .invoice-table td:nth-child(2)  { min-width: 110px; }                 /* emissão */
#cteTableWrap .invoice-table th:nth-child(3),
#cteTableWrap .invoice-table td:nth-child(3)  { min-width: 100px; }                 /* número */
#cteTableWrap .invoice-table th:nth-child(4),
#cteTableWrap .invoice-table td:nth-child(4)  { min-width: 70px;  }                 /* CFOP */
#cteTableWrap .invoice-table th:nth-child(5),
#cteTableWrap .invoice-table td:nth-child(5)  { min-width: 110px; }                 /* modal */
#cteTableWrap .invoice-table th:nth-child(6),
#cteTableWrap .invoice-table td:nth-child(6)  { min-width: 180px; }                 /* remetente */
#cteTableWrap .invoice-table th:nth-child(7),
#cteTableWrap .invoice-table td:nth-child(7)  { min-width: 180px; }                 /* destinatário */
#cteTableWrap .invoice-table th:nth-child(8),
#cteTableWrap .invoice-table td:nth-child(8)  { min-width: 80px;  }                 /* UF orig. */
#cteTableWrap .invoice-table th:nth-child(9),
#cteTableWrap .invoice-table td:nth-child(9)  { min-width: 80px;  }                 /* UF dest. */
#cteTableWrap .invoice-table th:nth-child(10),
#cteTableWrap .invoice-table td:nth-child(10) { min-width: 90px;  }                 /* ICMS (%) */
#cteTableWrap .invoice-table th:nth-child(11),
#cteTableWrap .invoice-table td:nth-child(11) { min-width: 130px; }                 /* valor frete */
#cteTableWrap .invoice-table th:nth-child(12),
#cteTableWrap .invoice-table td:nth-child(12) { min-width: 110px; }                 /* ICMS R$ */
#cteTableWrap .invoice-table th:nth-child(13),
#cteTableWrap .invoice-table td:nth-child(13) { min-width: 130px; }                 /* situação */
#cteTableWrap .invoice-table th:nth-child(14),
#cteTableWrap .invoice-table td:nth-child(14) { min-width: 150px; }                 /* empresa */
#cteTableWrap .invoice-table th:nth-child(15),
#cteTableWrap .invoice-table td:nth-child(15) { min-width: 160px; }                 /* centro de custo */
#cteTableWrap .invoice-table th:nth-child(16),
#cteTableWrap .invoice-table td:nth-child(16) { min-width: 120px; }                 /* ações */

/* ── NF-e (17 colunas) ────────────────────────────────────────────── */
/* Scroll vertical + header fixo na tabela NF-e */
#nfeTableWrap {
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  overflow-x: auto;
}

#nfeTableWrap .invoice-table {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}

#nfeTableWrap .invoice-table th,
#nfeTableWrap .invoice-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#nfeTableWrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--navy, #04101b);
}

#nfeTableWrap .invoice-table th:nth-child(1),
#nfeTableWrap .invoice-table td:nth-child(1)  { width: 40px;  min-width: 40px; }   /* checkbox */
#nfeTableWrap .invoice-table th:nth-child(2),
#nfeTableWrap .invoice-table td:nth-child(2)  { min-width: 110px; }                 /* emissão */
#nfeTableWrap .invoice-table th:nth-child(3),
#nfeTableWrap .invoice-table td:nth-child(3)  { min-width: 100px; }                 /* número */
#nfeTableWrap .invoice-table th:nth-child(4),
#nfeTableWrap .invoice-table td:nth-child(4)  { min-width: 70px;  }                 /* CFOP */
#nfeTableWrap .invoice-table th:nth-child(5),
#nfeTableWrap .invoice-table td:nth-child(5)  { min-width: 180px; }                 /* remetente */
#nfeTableWrap .invoice-table th:nth-child(6),
#nfeTableWrap .invoice-table td:nth-child(6)  { min-width: 180px; }                 /* destinatário */
#nfeTableWrap .invoice-table th:nth-child(7),
#nfeTableWrap .invoice-table td:nth-child(7)  { min-width: 80px;  }                 /* UF dest. */
#nfeTableWrap .invoice-table th:nth-child(8),
#nfeTableWrap .invoice-table td:nth-child(8)  { min-width: 90px;  }                 /* ICMS (%) */
#nfeTableWrap .invoice-table th:nth-child(9),
#nfeTableWrap .invoice-table td:nth-child(9)  { min-width: 90px;  }                 /* IPI (%) */
#nfeTableWrap .invoice-table th:nth-child(10),
#nfeTableWrap .invoice-table td:nth-child(10) { min-width: 130px; }                 /* valor prod. */
#nfeTableWrap .invoice-table th:nth-child(11),
#nfeTableWrap .invoice-table td:nth-child(11) { min-width: 110px; }                 /* ICMS R$ */
#nfeTableWrap .invoice-table th:nth-child(12),
#nfeTableWrap .invoice-table td:nth-child(12) { min-width: 110px; }                 /* IPI R$ */
#nfeTableWrap .invoice-table th:nth-child(13),
#nfeTableWrap .invoice-table td:nth-child(13) { min-width: 130px; }                 /* total NF */
#nfeTableWrap .invoice-table th:nth-child(14),
#nfeTableWrap .invoice-table td:nth-child(14) { min-width: 130px; }                 /* situação */
#nfeTableWrap .invoice-table th:nth-child(15),
#nfeTableWrap .invoice-table td:nth-child(15) { min-width: 150px; }                 /* empresa */
#nfeTableWrap .invoice-table th:nth-child(16),
#nfeTableWrap .invoice-table td:nth-child(16) { min-width: 160px; }                 /* centro de custo */
#nfeTableWrap .invoice-table th:nth-child(17),
#nfeTableWrap .invoice-table td:nth-child(17) { min-width: 120px; }                 /* ações */

/* ── NF Recebida (16 colunas) ─────────────────────────────────────── */
#nfrTableWrap {
  max-height: calc(100vh - 320px);
  overflow-y: auto;
}
#nfrTableWrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--navy, #04101b);
}
.nfr-table { min-width: 1400px; }
.nfr-table th:nth-child(1),  .nfr-table td:nth-child(1)  { width: 40px;  min-width: 40px; }
.nfr-table th:nth-child(2),  .nfr-table td:nth-child(2)  { min-width: 110px; }
.nfr-table th:nth-child(3),  .nfr-table td:nth-child(3)  { min-width: 90px; }
.nfr-table th:nth-child(4),  .nfr-table td:nth-child(4)  { min-width: 70px; }
.nfr-table th:nth-child(5),  .nfr-table td:nth-child(5)  { min-width: 180px; }
.nfr-table th:nth-child(6),  .nfr-table td:nth-child(6)  { min-width: 150px; }
.nfr-table th:nth-child(7),  .nfr-table td:nth-child(7)  { min-width: 80px; }
.nfr-table th:nth-child(8),  .nfr-table td:nth-child(8)  { min-width: 80px; }
.nfr-table th:nth-child(9),  .nfr-table td:nth-child(9)  { min-width: 70px; }
.nfr-table th:nth-child(10), .nfr-table td:nth-child(10) { min-width: 120px; }
.nfr-table th:nth-child(11), .nfr-table td:nth-child(11) { min-width: 100px; }
.nfr-table th:nth-child(12), .nfr-table td:nth-child(12) { min-width: 90px; }
.nfr-table th:nth-child(13), .nfr-table td:nth-child(13) { min-width: 110px; }
.nfr-table th:nth-child(14), .nfr-table td:nth-child(14) { min-width: 120px; }
.nfr-table th:nth-child(15), .nfr-table td:nth-child(15) { min-width: 130px; }
.nfr-table th:nth-child(16), .nfr-table td:nth-child(16) { min-width: 100px; }

/* ── NFS Recebida (14 colunas) ────────────────────────────────────── */
#nfsTableWrap {
  max-height: calc(100vh - 320px);
  overflow-y: auto;
}
#nfsTableWrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--navy, #04101b);
}
.nfs-table { min-width: 1380px; }
.nfs-table th:nth-child(1),  .nfs-table td:nth-child(1)  { width: 40px;  min-width: 40px; }
.nfs-table th:nth-child(2),  .nfs-table td:nth-child(2)  { min-width: 110px; }
.nfs-table th:nth-child(3),  .nfs-table td:nth-child(3)  { min-width: 90px; }
.nfs-table th:nth-child(4),  .nfs-table td:nth-child(4)  { min-width: 200px; }
.nfs-table th:nth-child(5),  .nfs-table td:nth-child(5)  { min-width: 140px; }
.nfs-table th:nth-child(6),  .nfs-table td:nth-child(6)  { min-width: 130px; }
.nfs-table th:nth-child(7),  .nfs-table td:nth-child(7)  { min-width: 110px; }
.nfs-table th:nth-child(8),  .nfs-table td:nth-child(8)  { min-width: 130px; }
.nfs-table th:nth-child(9),  .nfs-table td:nth-child(9)  { min-width: 70px; }
.nfs-table th:nth-child(10), .nfs-table td:nth-child(10) { min-width: 110px; }
.nfs-table th:nth-child(11), .nfs-table td:nth-child(11) { min-width: 130px; }
.nfs-table th:nth-child(12), .nfs-table td:nth-child(12) { min-width: 120px; }
.nfs-table th:nth-child(13), .nfs-table td:nth-child(13) { min-width: 130px; }
.nfs-table th:nth-child(14), .nfs-table td:nth-child(14) { min-width: 100px; }

.invoice-status-select {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  min-width: 110px;
}

.invoice-status-select.pago {
  color: #16a34a;
  background: #dcfce7;
}

.invoice-status-select.pendente {
  color: #d97706;
  background: #fef3c7;
}

.invoice-status-select.inactive {
  color: #6b7280;
  background: #f3f4f6;
}

.tag.receita {
  color: var(--green);
  background: var(--soft-green);
}

.tag.despesa {
  color: var(--red);
  background: var(--soft-red);
}

.tag.transferencia {
  color: var(--blue);
  background: var(--soft-blue);
}

.status.pago {
  color: var(--green);
  background: var(--soft-green);
}

.status.pendente {
  color: var(--orange);
  background: #fff4e8;
}

.status.vencido {
  color: var(--red);
  background: var(--soft-red);
}

.status.parcial {
  color: #7c3aed;
  background: #ede9fe;
}

.status-select {
  min-height: 30px;
  min-width: 110px;
  border: 0;
  border-radius: 6px;
  padding: 5px 28px 5px 9px;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.status-select.pago {
  color: var(--green);
  background: var(--soft-green);
}

.status-select.pendente {
  color: var(--orange);
  background: #fff4e8;
}

.status-select.vencido {
  color: var(--red);
  background: var(--soft-red);
}

.status-select.parcial {
  color: #7c3aed;
  background: #ede9fe;
}

#closeCashDialog {
  width: min(520px, calc(100% - 28px));
}
.cash-close-summary {
  width: 100%;
  overflow: hidden;
}
.cash-close-summary table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}
.cash-close-summary td {
  padding: 8px 4px;
  word-break: break-word;
}
.cash-close-summary td:last-child {
  text-align: right;
  white-space: nowrap;
}

/* ── Combustível (19 colunas) ─────────────────────────────────────── */
.comb-tabs { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
.comb-tab-panel.hidden { display: none; }

#combTableWrap {
  max-height: calc(100vh - 320px);
  overflow-y: auto;
}
#combTableWrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--navy, #04101b);
}
.comb-table { min-width: 1700px; }
.comb-table th:nth-child(1),  .comb-table td:nth-child(1)  { width: 40px;  min-width: 40px; }
.comb-table th:nth-child(2),  .comb-table td:nth-child(2)  { min-width: 100px; }
.comb-table th:nth-child(3),  .comb-table td:nth-child(3)  { min-width: 90px; }
.comb-table th:nth-child(4),  .comb-table td:nth-child(4)  { min-width: 90px; }
.comb-table th:nth-child(5),  .comb-table td:nth-child(5)  { min-width: 100px; }
.comb-table th:nth-child(6),  .comb-table td:nth-child(6)  { min-width: 100px; }
.comb-table th:nth-child(7),  .comb-table td:nth-child(7)  { min-width: 100px; }
.comb-table th:nth-child(8),  .comb-table td:nth-child(8)  { min-width: 90px; }
.comb-table th:nth-child(9),  .comb-table td:nth-child(9)  { min-width: 100px; }
.comb-table th:nth-child(10), .comb-table td:nth-child(10) { min-width: 80px; }
.comb-table th:nth-child(11), .comb-table td:nth-child(11) { min-width: 90px; }
.comb-table th:nth-child(12), .comb-table td:nth-child(12) { min-width: 110px; }
.comb-table th:nth-child(13), .comb-table td:nth-child(13) { min-width: 90px; }
.comb-table th:nth-child(14), .comb-table td:nth-child(14) { min-width: 80px; }
.comb-table th:nth-child(15), .comb-table td:nth-child(15) { min-width: 130px; }
.comb-table th:nth-child(16), .comb-table td:nth-child(16) { min-width: 140px; }
.comb-table th:nth-child(17), .comb-table td:nth-child(17) { min-width: 100px; }
.comb-table th:nth-child(18), .comb-table td:nth-child(18) { min-width: 120px; }
.comb-table th:nth-child(19), .comb-table td:nth-child(19) { min-width: 80px; }

#combEstoqueTableWrap {
  max-height: calc(100vh - 380px);
  overflow-y: auto;
}
#combEstoqueTableWrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--navy, #04101b);
}
.comb-estoque-table { min-width: 900px; width: 100%; }

/* ══ Reaplicado depois do redeploy — ver notas do projeto ══ */
.settings-tabs {
  grid-template-columns: repeat(7, minmax(130px, 1fr));
}
.fiscal-tabs {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

/* Cadastro de parceiros — card de filtros mais compacto (ver
   partner-summary-footer no HTML, os cards de resumo saíram do topo). */
#partnersView .finance-hero-panel {
  padding: 12px 14px;
  margin-bottom: 12px;
}
#partnersView .finance-hero-panel .panel {
  padding: 10px 12px;
  margin-bottom: 0;
}
#partnersView .partner-filters {
  gap: 10px;
}
#partnersView .partner-filters label {
  font-size: 10px;
  gap: 4px;
}
#partnersView .partner-filters input,
#partnersView .partner-filters select {
  padding: 6px 8px;
  font-size: 12px;
}
