/* ================================================================
   Tabela semântica com 1ª coluna FIXA (sticky) + rolagem horizontal
   garantida. Complementa .theme-tablewrap/.theme-table.
   Uso: className="theme-tablewrap theme-table theme-table--sticky1"

   Por que a min-width: .theme-table table tem width:100%, então em telas
   estreitas a tabela encolhe em vez de transbordar — e a barra de rolagem
   nunca aparece. A min-width força o transbordo (→ scroll no wrapper, que
   já tem overflow-x:auto) quando o container fica menor que ela.
   ================================================================ */
.theme-table--sticky1 table { min-width: 640px; }

/* Linhas mais altas e respiráveis (o padrão .theme-table usa 6px 9px, que fica
   apertado em tabelas densas). Uso: adicionar .theme-table--roomy no wrapper. */
.theme-table--roomy tbody td { padding: 11px 10px; line-height: 1.35; }
.theme-table--roomy thead th { padding: 12px 10px; }

.theme-table--sticky1 th:first-child,
.theme-table--sticky1 td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  /* separador visual da coluna fixa ao rolar */
  box-shadow: 1px 0 0 var(--theme-line);
}

/* Fundo OPACO na coluna fixa (senão o conteúdo que rola aparece por baixo),
   respeitando a listra par/ímpar e o tema claro/escuro. */
.theme-table--sticky1 tbody td:first-child { background: var(--theme-panel); }
.theme-table--sticky1 tbody tr:nth-child(even) td:first-child {
  background: var(--theme-panel2);
}
/* Mantém a coluna fixa estável no hover (não deixa vazar o realce da linha). */
.theme-table--sticky1 tbody tr:hover td:first-child {
  background: var(--theme-panel);
}
.theme-table--sticky1 tbody tr:nth-child(even):hover td:first-child {
  background: var(--theme-panel2);
}
/* Cabeçalho fixo ao rolar verticalmente (wrapper precisa de altura/max-height).
   Complementa o sticky da 1ª coluna: aqui a LINHA de cabeçalho gruda no topo. */
.theme-table--sticky1 thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
/* Canto superior-esquerdo (cabeçalho da coluna fixa) acima de tudo. */
.theme-table--sticky1 thead th:first-child {
  z-index: 3;
  background: #0e1813;  /* mesmo fundo do .theme-table thead th */
}

/* ================================================================
   Cabeçalho de LINHA (<th scope="row">) e <tfoot> em tabela semântica.
   O .theme-table só estiliza `tbody td` / `thead th`, então sem isto a
   célula de cabeçalho de linha perde padding/borda — e, sendo sticky na
   1ª coluna, fica transparente (o conteúdo que rola aparece por baixo).
   ================================================================ */
.theme-table tbody th {
  padding: 6px 9px;
  text-align: center;
  font-weight: 600;
  color: var(--theme-ink);
  border-bottom: 1px solid var(--theme-line);
  background: transparent;
  white-space: nowrap;
}
.theme-table tbody tr:nth-child(even) th { background: var(--theme-panel2); }
.theme-table tbody tr:last-child th { border-bottom: none; }
.theme-table tbody tr:hover th { background: rgba(148, 214, 0, .07); }
html[data-theme="dark"] .theme-table tbody tr:hover th {
  background: rgba(164, 206, 78, .10);
}

/* Linha de totais/resumo: destacada e separada do corpo. */
.theme-table tfoot th,
.theme-table tfoot td {
  padding: 9px;
  text-align: center;
  font-weight: 700;
  color: var(--theme-ink);
  border-top: 2px solid var(--theme-line);
  background: var(--theme-panel2);
  white-space: nowrap;
}

/* Coluna fixa: fundo OPACO também em tbody th e tfoot (o sticky da 1ª
   coluna já vem da regra th/td:first-child acima). */
.theme-table--sticky1 tbody th:first-child { background: var(--theme-panel); }
.theme-table--sticky1 tbody tr:nth-child(even) th:first-child {
  background: var(--theme-panel2);
}
.theme-table--sticky1 tbody tr:hover th:first-child {
  background: var(--theme-panel);
}
.theme-table--sticky1 tbody tr:nth-child(even):hover th:first-child {
  background: var(--theme-panel2);
}
.theme-table--sticky1 tfoot th:first-child,
.theme-table--sticky1 tfoot td:first-child {
  background: var(--theme-panel2);
}
