/* =====================================================================
   tables.css - Tabelas de dados e listagens
   ===================================================================== */

.table-wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.table th,
.table td {
  padding: 12px var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.table th {
  background: var(--color-surface-2);
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--color-gold-light);
  white-space: nowrap;
}
.table tbody tr {
  transition: transform 200ms ease, box-shadow 200ms ease, background 180ms ease;
}
.table tbody tr:hover {
  background: var(--color-gold-bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions button { margin-left: var(--space-1); }

.filters-bar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: flex-end;
}
.filters-bar .field { flex: 1; min-width: 180px; }

/* === Tabela animada Claude Design === */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.data-table thead th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr.row-anim {
  animation: row-in 400ms var(--ease-out, cubic-bezier(0.16,1,0.3,1)) both;
}
.data-table tbody tr.row-clickable {
  cursor: pointer;
  transition: background 140ms;
}
.data-table tbody tr.row-clickable:hover { background: var(--surface-2); }
