.table-container {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th {
  padding: 12px 16px;
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-gray-50);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.table th:hover {
  color: var(--color-text);
}

.table th.sorted {
  color: var(--color-primary-600);
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
  vertical-align: middle;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover td {
  background: var(--color-gray-100);
}

.table tbody tr:hover td:first-child {
  border-left-color: var(--color-primary-500);
}

.table--striped tr:nth-child(even) td {
  background: var(--color-gray-50);
}

.table--compact th,
.table--compact td {
  padding: 8px 12px;
}

.table__actions {
  display: flex;
  gap: var(--space-1);
  justify-content: flex-start;
}

.text-center .table__actions {
  justify-content: center;
}

.text-right .table__actions {
  justify-content: flex-end;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .table th {
    background: var(--color-gray-800);
  }
  :root:not([data-theme="light"]) .table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.08);
  }
  :root:not([data-theme="light"]) .table tbody tr:hover td:first-child {
    border-left-color: var(--color-primary-400);
  }
  :root:not([data-theme="light"]) .table--striped tr:nth-child(even) td {
    background: var(--color-gray-800);
  }
}

[data-theme="dark"] .table th {
  background: var(--color-gray-800);
}
[data-theme="dark"] .table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .table tbody tr:hover td:first-child {
  border-left-color: var(--color-primary-400);
}
[data-theme="dark"] .table--striped tr:nth-child(even) td {
  background: var(--color-gray-800);
}

.sort-link {
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  display: inline-flex;
  align-items: center;
  width: 100%;
}

.text-center .sort-link,
th.text-center .sort-link {
  justify-content: center;
}

.text-right .sort-link,
th.text-right .sort-link {
  justify-content: flex-end;
}

.sort-link:hover {
  color: var(--color-primary-600);
}

.sort-link.sort-active {
  color: var(--color-primary-600);
}

.sort-icon {
  transition: transform 0.2s ease;
}


