/* ============ DATA TABLE / RICH TABLE ============ */

.data-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.data-toolbar-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 240px; }
.data-toolbar-right { display: flex; align-items: center; gap: 8px; }
.data-toolbar .input-icon { flex: 1; max-width: 320px; }

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.data-table thead th {
  position: sticky; top: 0;
  background: var(--bg-card);
  text-align: left;
  padding: 12px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-light);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table thead th .sort {
  display: inline-flex; vertical-align: middle;
  margin-left: 4px;
  color: var(--t-light);
}
.data-table thead th.sorted-asc .sort,
.data-table thead th.sorted-desc .sort {
  color: var(--primary);
}
.data-table thead th.sorted-asc .sort svg { transform: rotate(180deg); }
.data-table thead th .sort svg { width: 10px; height: 10px; stroke: currentColor; stroke-width: 2; fill: none; transition: transform 160ms; }

.data-table tbody td {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--t-base);
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
.data-table tbody tr { transition: background 140ms; }
.data-table tbody tr:hover td { background: var(--bg-hover); }
.data-table tbody tr.is-selected td { background: var(--primary-soft); }

.data-cell-user {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.data-cell-user .av {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 11px;
  flex-shrink: 0;
}
.data-cell-user-meta { line-height: 1.3; min-width: 0; }
.data-cell-user-name { font-size: 13px; font-weight: 600; color: var(--t-base); }
.data-cell-user-email {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--t-muted);
  letter-spacing: 0.02em;
}

.data-cell-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--t-muted);
  letter-spacing: 0.02em;
}

.data-cell-actions {
  display: flex; gap: 2px;
}
.data-cell-actions .btn--icon {
  padding: 6px;
  background: transparent;
  border: 0;
  color: var(--t-muted);
  border-radius: 6px;
  transition: background 140ms, color 140ms;
}
.data-cell-actions .btn--icon:hover { background: var(--bg-hover); color: var(--t-base); }
.data-cell-actions .btn--icon svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 1.8; fill: none; }

.data-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--t-muted);
}
.data-foot-info {
  display: flex; align-items: center; gap: 16px;
}
.data-foot-info .select { width: auto; padding: 6px 28px 6px 10px; font-size: 12px; }

.pager {
  display: flex; gap: 4px; align-items: center;
}
.pager-btn {
  min-width: 30px; height: 30px;
  padding: 0 8px;
  display: grid; place-items: center;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t-muted);
  transition: background 160ms, color 160ms;
}
.pager-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--t-base); }
.pager-btn.is-active {
  background: var(--primary);
  color: #fff;
}
.pager-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pager-btn svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; }
