.table-wrapper {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.table {
  border-collapse: collapse;
  min-width: 100%;
  width: 100%;
}

.table thead {
  background: var(--surface-muted);
}

.table th {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  text-transform: uppercase;
}

.table th.text-left {
  text-align: left;
}

.table th.text-right {
  text-align: right;
}

.table tbody {
  background: var(--surface);
}

.table tbody tr + tr,
.table tbody tr.table-group-row {
  border-top: 1px solid var(--border);
}

.table td {
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  white-space: nowrap;
}

.table-cell-primary {
  color: var(--text);
  font-weight: 500;
}

.table-cell-secondary {
  color: var(--text-muted);
}

.table-cell-actions {
  font-weight: 500;
  text-align: right;
  width: 1%;
}

.table-cell-fill {
  max-width: 0;
  width: 100%;
}

.table-cell-number {
  text-align: right;
}

.table-cell-breakable {
  overflow-wrap: anywhere;
  white-space: normal;
}

.table-total-row {
  border-top: 1px solid var(--border);
}

.table-total-cell {
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  white-space: nowrap;
}

.table-empty {
  color: var(--text-muted);
  padding: 2rem 1rem;
  text-align: center;
}

.table-empty a {
  color: var(--text-muted);
}

.table-empty a:hover {
  text-decoration: underline;
}

.table-group-row {
  background: var(--surface-muted);
}

.table-group-cell {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge {
  align-items: center;
  border-radius: var(--radius-full);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.25rem 0.625rem;
}

.badge--success {
  background: var(--lime-100);
  color: var(--lime-700);
}

.badge--warning {
  background: var(--amber-100);
  color: var(--amber-800);
}

.badge--info {
  background: var(--blue-100);
  color: var(--blue-800);
}

.badge--neutral {
  background: var(--surface-subtle);
  color: var(--text-muted);
}
