.table-link {
  font-size: 12px;
  color: var(--color-fg);
  text-decoration: none;
}

.table-link:hover,
.table-link:focus {
  text-decoration: underline;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-divider);
  vertical-align: top;
}

.table td:not(:first-child) {
  border-left: 1px solid var(--color-divider);
}

.table td.strike {
  text-decoration: line-through;
  color: var(--color-muted-2);
}

.table th {
  padding: 4px 12px;
  background: var(--color-table-header-bg);
  font-weight: 400;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-muted);
}

.table thead th {
  box-shadow: inset 0 1px 0 var(--color-divider);
}

.table th[data-sort] {
  cursor: pointer;
  white-space: nowrap;
}

.table th[data-sort] .sort-indicator {
  display: inline-block;
  margin-left: 2px;
  font-size: 12px;
  color: var(--color-muted-3);
  font-weight: 500;
  line-height: 1;
  vertical-align: middle;
  transform: translateY(-1px);
  transform-origin: 50% 50%;
  opacity: 1;
  visibility: visible;
}

.table th[data-sort][aria-sort="ascending"] .sort-indicator,
.table th[data-sort][aria-sort="descending"] .sort-indicator {
  color: var(--color-muted);
  font-weight: 700;
}

.table th[data-sort][aria-sort="descending"] .sort-indicator {
  transform: translateY(-1px) rotate(180deg);
}

.table th:not(:first-child) {
  border-left: 1px solid var(--color-divider);
}

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

.table .clickable-row {
  cursor: pointer;
}

.table .clickable-row:hover {
  background: var(--color-row-hover);
}

.table .section-row td {
  background: var(--color-surface-3);
  font-weight: 600;
  color: var(--color-muted);
}

.order-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.order-btn {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-fg);
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.order-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.table-wrap {
  overflow-x: auto;
}

.view-pane {
  position: relative;
}
