.wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.flush {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.fillHeight {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.fillHeight .scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.fillHeight .footer {
  flex-shrink: 0;
}

.scroll {
  overflow-x: auto;
}

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

/* Header */
.th {
  padding: 9px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  white-space: nowrap;
  user-select: none;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  transition: color 0.12s;
  position: sticky;
  top: 0;
  z-index: 1;
}

.th.sortable {
  cursor: pointer;
}

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

.th.sorted {
  color: var(--amber);
}

.sortArrow {
  font-size: 8px;
  margin-left: 4px;
  opacity: 0.4;
}

.sorted .sortArrow {
  opacity: 1;
}

/* Rows */
.tr {
  border-bottom: 1px solid var(--border-subtle);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.08s;
  height: 40px;
}

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

.tr:hover {
  background: var(--bg-hover);
}

.tr.selected {
  background: var(--amber-bg);
}

.accentError {
  border-left-color: var(--error) !important;
}

.accentWarning {
  border-left-color: var(--warning) !important;
}

/* Cells */
.td {
  padding: 9px 14px;
  font-size: 13px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Expanded row */
.expandedRow {
  border-bottom: 1px solid var(--border-subtle);
  border-left: 3px solid transparent;
}

.expandedCell {
  padding: 0 14px 10px 20px !important;
}

/* Empty state */
.empty {
  padding: 32px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Footer / Pagination */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
}

.rangeInfo {
  font-family: var(--font-mono);
  font-size: 12px;
}

.paginationRight {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pageSizeLabel {
  font-size: 12px;
  color: var(--text-muted);
}

.pageSizeSelect {
  width: 70px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pageNum {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
}
