/* ==========================================================================
   Data tables
   ========================================================================== */

.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table thead th {
  text-align: left;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 700;
  padding: 13px 16px;
  background: var(--surface-2);
  border-bottom: 1.5px solid var(--border-strong);
  white-space: nowrap;
}
.data-table thead th.sortable { cursor: pointer; user-select: none; }
.data-table thead th.sortable .sort-icon { display: inline-flex; vertical-align: middle; margin-left: 4px; width: 11px; height: 11px; opacity: 0.5; }
.data-table thead th.sortable.sorted .sort-icon { opacity: 1; color: var(--primary); }

.data-table tbody td {
  padding: 14px 16px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--surface-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .cell-primary { font-weight: 600; }
.data-table .cell-muted { color: var(--text-muted); }
.data-table .cell-actions { text-align: right; position: relative; }

.table-checkbox { width: 40px; }

.cell-with-avatar { display: flex; align-items: center; gap: 10px; }
.cell-with-avatar .cwa-name { font-weight: 600; font-size: 14.5px; }
.cell-with-avatar .cwa-sub { font-size: 13px; color: var(--text-faint); }
.conversion-dot { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.2); }
a.cell-with-avatar-link { text-decoration: none; color: inherit; }
a.cell-with-avatar-link:hover .cwa-name { color: var(--primary); text-decoration: underline; }

.lead-status-select { min-width: 132px; font-size: 13.5px; font-weight: 600; padding: 7px 28px 7px 10px; }

.table-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: var(--sp-3);
}
.table-toolbar-left { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }

.table-container { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

.bulk-bar {
  display: none;
  align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: var(--primary-soft);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}
.bulk-bar.active { display: flex; }
.bulk-bar .spacer { flex: 1; }
