/* ==========================================================================
   TABELAS
   Cabeçalhos, linhas, células de ação, estados vazios
   ========================================================================== */

/* ─────────────────────────────────────────
   CONTAINER
───────────────────────────────────────── */

.table-container {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

/* ─────────────────────────────────────────
   CABEÇALHO
───────────────────────────────────────── */

.table thead th {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

/* ─────────────────────────────────────────
   LINHAS
───────────────────────────────────────── */

.table tbody tr {
  transition: background-color var(--transition-speed) ease;
}

/* Linha clicável — cursor pointer e hover */
.table tbody tr.is-clickable {
  cursor: pointer;
}

.table tbody tr.is-clickable:hover {
  background-color: var(--bg-hover);
}

/* Linha não clicável — sem hover */
.table tbody tr.no-click:hover {
  cursor: default;
  background-color: transparent;
}

/* ─────────────────────────────────────────
   CÉLULAS
───────────────────────────────────────── */

.table td,
.table th {
  vertical-align: middle;
}

/* Célula de ações */
.table td.acoes {
  white-space: nowrap;
  text-align: center;
}

/* Texto longo com ellipsis */
.table td.acoes-truncate {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─────────────────────────────────────────
   TABELA SEM DADOS
───────────────────────────────────────── */

td.lista-vazia {
  text-align: center;
  padding: var(--spacing-xl) !important;
  color: var(--text-muted);
}

td.lista-vazia .icon {
  display: block;
  margin: 0 auto var(--spacing-sm);
}

td.lista-vazia p {
  margin-top: var(--spacing-sm);
  font-size: var(--font-size-sm);
}

/* ─────────────────────────────────────────
   RESPONSIVIDADE
───────────────────────────────────────── */

@media (max-width: 768px) {
  .table-container {
    border-radius: 0;
    box-shadow: none;
  }

  .table td.acoes-truncate {
    max-width: 140px;
  }

  /* Oculta colunas menos importantes em mobile */
  .table .hide-mobile {
    display: none;
  }
}

@media (max-width: 480px) {
  .table td,
  .table th {
    font-size: var(--font-size-xs);
    padding: 0.4rem 0.5rem;
  }
}
