/* ============================================================ Data table === */
.dt {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dt thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel-2);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 14px;
  height: 36px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.dt tbody td {
  padding: 0 14px;
  height: var(--row-h);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}
.dt tbody tr {
  transition: background var(--dur-fast) var(--ease);
  animation: gc-row-in var(--dur) var(--ease) both;
}
.dt tbody tr:hover {
  background: var(--panel-2);
}
.dt tbody tr:hover .dt__rowactions,
.dt tbody tr:focus-within .dt__rowactions {
  opacity: 1;
}
/* Keyboard focus on the row itself reads as a clear inset ring. */
.dt tbody tr:focus-visible {
  outline: none;
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--accent-ring);
}

/* Status-dot column — fixed narrow left rail. */
.dt__status {
  width: 30px;
  padding-left: 16px !important;
  padding-right: 0 !important;
}

/* Cell affordances. */
.dt__mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.dt__strong {
  font-weight: 600;
  color: var(--text);
}
.dt__muted {
  color: var(--text-muted);
}

/* Right-aligned row actions. Dimmed at rest, full on row hover/focus, but
   always present and reachable by keyboard and touch (never pointer-events:none,
   which would hide them from Tab and tap). */
.dt__actions {
  width: 1%;
  text-align: right;
}
.dt__rowactions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
  opacity: 0.5;
  transition: opacity var(--dur-fast) var(--ease);
}
/* When any action button is keyboard-focused, surface the whole group. */
.dt__rowactions:focus-within {
  opacity: 1;
}
@media (hover: none) {
  /* Touch devices have no hover: keep actions fully legible at all times. */
  .dt__rowactions {
    opacity: 1;
  }
}

.dt-wrap {
  max-height: calc(100vh - 230px);
  overflow: auto;
}

/* Skeleton loading rows: preview the table shape instead of a bare spinner. */
.dt__skel {
  display: inline-block;
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      var(--border) 0%,
      var(--border-strong) 50%,
      var(--border) 100%
    );
  background-size: 200% 100%;
  animation: gc-shimmer 1.4s var(--ease) infinite;
  vertical-align: middle;
}
.dt__skel--dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Search / toolbar above the table. */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.searchbox {
  position: relative;
  flex: 0 0 320px;
  max-width: 100%;
}
.searchbox__icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}
.searchbox .input {
  width: 100%;
  padding-left: 34px;
}
.toolbar__count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}
.toolbar__count .mono {
  color: var(--text);
}
