/* ========== Headhunt — Premium Agent Database ========== */

.bulk-select-all-banner {
  background: var(--color-gray-50, #F8FAFC);
  border: 1px solid var(--color-gray-200, #E2E8F0);
  border-radius: var(--radius-md, 8px);
  padding: 8px 16px;
  text-align: center;
  font-size: var(--font-size-sm, 13px);
  color: var(--color-gray-700, #334155);
  margin-bottom: var(--sp-2, 8px);
}

/* ---------- Stats Strip ---------- */

.hh-stats-strip {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.hh-stat-card {
  flex: 1;
  background: var(--color-white);
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  transition: all 0.15s;
  box-shadow: none;
}
.hh-stat-clickable:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}
.hh-stat-card--active {
  border-color: #0D9488;
  background: linear-gradient(135deg, #F0FDFA, #CCFBF1);
  box-shadow: none;
}

.hh-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0F172A;
}

.hh-stat-label {
  font-size: 0.65rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-top: var(--sp-1);
}

.hh-stat-pf { border-top: 3px solid #10B981; }
.hh-stat-bayut { border-top: 3px solid #3B82F6; }

/* ---------- Sync Status ---------- */

.hh-sync-status {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
  margin-left: var(--sp-3);
}

/* ---------- Source Tabs ---------- */

.hh-toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}

.hh-source-tabs {
  display: flex;
  gap: var(--sp-1);
}

.hh-source-tab {
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--color-gray-200);
  background: var(--color-white);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.hh-source-tab:hover { background: var(--color-gray-50); }

.hh-source-tab--active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.hh-search-wrap { flex: 1; min-width: 200px; }

/* ---------- Filter Bar ---------- */

.hh-filter-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}

.hh-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2);
  background: var(--color-primary-50, #EEF2FF);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
}

.hh-filter-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-primary);
  padding: 0 2px;
}

/* ---------- Collapsible Sidebar ---------- */

.candidates-layout .hh-sidebar-collapsed {
  width: 0;
  min-width: 0;
  padding: 0;
  border-left: none;
  overflow: hidden;
  opacity: 0;
  transition: width 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
}

.candidates-layout .candidates-sidebar:not(.hh-sidebar-collapsed) {
  transition: width 0.25s ease, opacity 0.2s ease 0.05s, padding 0.25s ease;
  opacity: 1;
}

/* ---------- Scrollable Table Wrap ---------- */

.hh-table-scroll-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* The card inside the scroll-wrap holds the table and scrolls both axes */
.hh-table-scroll-wrap > .card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.hh-table-scroll-wrap > .card > .table-container {
  flex: 1;
  min-height: 0;
  overflow: auto;           /* horizontal + vertical scroll for the table data */
  -webkit-overflow-scrolling: touch;
}

/* Remove padding for headhunt layout */
.page-container:has(.candidates-layout .hh-table-scroll-wrap) { padding: 0; }

/* ---------- Sidebar Filter Items ---------- */

.hh-sidebar-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-1);
  margin-bottom: var(--sp-1);
}

/* ---------- Agent Table ---------- */

/* Table visual design → css/data-table.css */
.hh-row--active td { background: #EFF6FF !important; }

.th-check, .td-check { width: 40px; text-align: center; }

/* Name / areas cell styling → css/data-table.css */

.hh-sortable { cursor: pointer; user-select: none; }
.hh-sortable:hover { color: var(--color-primary); }
.hh-sort-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.hh-sort-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  color: var(--color-gray-400, #94A3B8);
}
.hh-sortable:hover .hh-sort-icon { color: var(--color-primary); }
.hh-sorted-asc .hh-sort-icon,
.hh-sorted-desc .hh-sort-icon {
  color: var(--color-primary);
}
.hh-sort-icon--neutral { opacity: 0.85; }

/* ---------- Source Badges ---------- */

.hh-source-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.03em;
  margin-right: 2px;
}

.hh-source-pf { background: #D1FAE5; color: #065F46; }
.hh-source-bayut { background: #DBEAFE; color: #1E40AF; }

/* ---------- Agent Badges (table) ---------- */

.hh-badge-sm {
  display: inline-block;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  margin-right: 2px;
}

.hh-badge-super { background: #FEF3C7; color: #92400E; }
.hh-badge-tru { background: #E0E7FF; color: #3730A3; }

/* ---------- Profile Badge Row ---------- */

.hh-profile-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.hh-profile-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.hh-profile-tags-row:empty { display: none; }

.hh-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  line-height: 1.6;
}

.hh-chip-super { background: #FEF3C7; color: #92400E; }
.hh-chip-tru { background: #E0E7FF; color: #3730A3; }
.hh-chip-verified { background: #D1FAE5; color: #065F46; }
.hh-chip-pf { background: #D1FAE5; color: #065F46; }
.hh-chip-bayut { background: #DBEAFE; color: #1E40AF; }
.hh-chip-converted { background: #F3E8FF; color: #6B21A8; }

/* ---------- Source-specific deal sections ---------- */
.hh-source-section { margin-bottom: var(--sp-6); }
.hh-source-section:last-child { margin-bottom: 0; }
.hh-source-header {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) 0; margin-bottom: var(--sp-2);
  border-bottom: 2px solid var(--color-border);
}
.hh-source-header.hh-source-pf { border-bottom-color: #10B981; }
.hh-source-header.hh-source-bayut { border-bottom-color: #3B82F6; }
.hh-source-summary { font-size: 0.8125rem; color: var(--color-text-secondary); }

/* ---------- Source tab content ---------- */
.hh-src-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.hh-src-header__left { display: flex; align-items: center; gap: var(--sp-3); }
.hh-src-link { font-size: 0.8125rem; color: var(--color-primary); text-decoration: none; }
.hh-src-link:hover { text-decoration: underline; }
.hh-src-stats {
  display: flex; flex-wrap: wrap; gap: 0;
  border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden;
}
.hh-src-stat-item {
  flex: 1 1 0; min-width: 120px; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 2px;
  border-right: 1px solid var(--color-border);
}
.hh-src-stat-item:last-child { border-right: none; }
.hh-src-stat-item__label { font-size: 0.6875rem; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.hh-src-stat-item__value { font-size: 0.9375rem; font-weight: 600; color: var(--color-text); }
.hh-src-section-title { font-size: 0.8125rem; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: var(--sp-2); }

/* Tab accent underlines for PF/Bayut */
.hh-tab--pf.active { border-bottom-color: #10B981 !important; color: #059669; }
.hh-tab--bayut.active { border-bottom-color: #3B82F6 !important; color: #2563EB; }

/* ---------- Tasks tab ---------- */
.hh-task-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--color-border);
}
.hh-task-item:last-child { border-bottom: none; }
.hh-task-item--done { opacity: 0.5; }
.hh-task-item--done .hh-task-title { text-decoration: line-through; }
.hh-task-check { display: flex; align-items: center; gap: var(--sp-2); cursor: pointer; }
.hh-task-checkbox { width: 16px; height: 16px; accent-color: var(--color-primary); cursor: pointer; }
.hh-task-title { font-size: 0.875rem; }
.hh-task-due { font-size: 0.75rem; color: var(--color-text-secondary); white-space: nowrap; }

/* ---------- Events tab ---------- */
.hh-event-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px 12px; border-bottom: 1px solid var(--color-border);
}
.hh-event-item:last-child { border-bottom: none; }
.hh-event-item--past { opacity: 0.5; }
.hh-event-icon { font-size: 1.25rem; flex-shrink: 0; }
.hh-event-info { flex: 1; }

/* ---------- Saved Searches ---------- */
.hh-saved-searches { max-height: 200px; overflow-y: auto; }
.hh-saved-search-item {
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 6px; transition: background 0.15s;
}
.hh-saved-search-item:hover { background: var(--color-hover); }
.hh-saved-search-item--active { background: var(--color-primary-light, #EEF2FF); }
.hh-saved-search-btn {
  flex: 1; text-align: left; padding: 6px 8px; border: none; background: none;
  font-size: 0.8125rem; cursor: pointer; color: var(--color-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hh-saved-search-del {
  border: none; background: none; cursor: pointer; padding: 4px 8px;
  font-size: 1rem; color: var(--color-text-secondary); opacity: 0;
  transition: opacity 0.15s;
}
.hh-saved-search-item:hover .hh-saved-search-del { opacity: 1; }
.hh-saved-search-del:hover { color: var(--color-error); }

/* ---------- Notes tab ---------- */
.hh-note-card {
  padding: var(--sp-3); margin-bottom: var(--sp-2);
  background: var(--color-surface); border-radius: 8px; border: 1px solid var(--color-border);
}
.hh-note-card__header { display: flex; justify-content: space-between; align-items: center; }

/* ---------- Source accordion (left panel) ---------- */
.hh-source-accordion { border: 1px solid var(--color-border); border-radius: 8px; margin-bottom: var(--sp-2); overflow: hidden; }
.hh-source-accordion:last-child { margin-bottom: 0; }
.hh-source-accordion__toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 8px 12px; border: none; background: var(--color-surface);
  cursor: pointer; transition: background 0.15s;
}
.hh-source-accordion__toggle:hover { background: var(--color-hover); }
.hh-source-accordion--pf { border-left: 3px solid #10B981; }
.hh-source-accordion--bayut { border-left: 3px solid #3B82F6; }
.hh-accordion-chevron { transition: transform 0.2s; flex-shrink: 0; color: var(--color-text-secondary); }
.hh-source-accordion.open .hh-accordion-chevron { transform: rotate(180deg); }
.hh-source-accordion__body {
  max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  padding: 0 12px; background: var(--color-bg);
}
.hh-source-accordion.open .hh-source-accordion__body {
  max-height: 2000px; padding: 8px 12px 12px;
}

/* ---------- Pagination ---------- */

.hh-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
}

.hh-page-info {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
}

.hh-page-btns {
  display: flex;
  gap: var(--sp-1);
}

/* ---------- Profile ---------- */

.hh-profile {
  max-width: 800px;
  margin: 0 auto;
}

.hh-profile-header {
  margin-bottom: var(--sp-4);
}

.hh-profile-hero {
  display: flex;
  gap: var(--sp-5);
  margin-bottom: var(--sp-4);
}

.hh-profile-photo img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.hh-profile-info h2 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--sp-1);
}

.hh-profile-subtitle {
  color: var(--color-gray-600);
  margin-bottom: var(--sp-1);
}

.hh-profile-meta {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
  margin-bottom: var(--sp-2);
}

.hh-profile-badges {
  display: flex;
  gap: var(--sp-1);
  flex-wrap: wrap;
}

.hh-profile-actions {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--color-gray-200);
}

/* ---------- Tabs ---------- */

.hh-profile-tabs {
  display: flex;
  gap: var(--sp-1);
  border-bottom: 2px solid var(--color-gray-200);
  margin-bottom: var(--sp-4);
}

.hh-tab {
  padding: var(--sp-2) var(--sp-4);
  background: none;
  border: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}

.hh-tab:hover { color: var(--color-gray-700); }

.hh-tab--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ---------- Profile Sections ---------- */

.hh-profile-sections { display: flex; flex-direction: column; gap: var(--sp-5); }

.hh-section h3 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-3);
}

.hh-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-2);
}

.hh-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hh-field-label {
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
}

.hh-areas-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}

.hh-area-pill {
  padding: var(--sp-1) var(--sp-2);
  background: var(--color-gray-100);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
}

.hh-deal-type {
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.hh-deal-sale { background: #D1FAE5; color: #065F46; }
.hh-deal-rent { background: #DBEAFE; color: #1E40AF; }

.hh-pipeline-list {
  list-style: none;
  padding: 0;
}

.hh-pipeline-list li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) 0;
  font-size: var(--font-size-sm);
}

.hh-pipeline-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.hh-bio {
  font-size: var(--font-size-sm);
  color: var(--color-gray-600);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ---------- Change History ---------- */

.hh-change-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.hh-change-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: var(--color-gray-50);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
}

.hh-change-date {
  flex-shrink: 0;
  width: 100px;
  color: var(--color-gray-500);
  font-size: var(--font-size-xs);
}

.hh-change-text {
  flex: 1;
  color: var(--color-gray-700);
}

.hh-change-source {
  flex-shrink: 0;
}

/* ---------- Pipelines Grid ---------- */

.hh-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-4);
}

.hh-pipeline-card h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--sp-1);
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-gray-900);
}

.hh-pipeline-stats {
  margin: var(--sp-3) 0;
}

.hh-pipeline-count {
  font-size: var(--font-size-sm);
  color: var(--color-gray-600);
}

.hh-pipeline-stages-mini {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: var(--sp-2);
}

.hh-pipeline-stages-mini span {
  min-width: 4px;
  transition: width 0.3s;
}

.hh-pipeline-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

/* ---------- Kanban Board ---------- */

.hh-kanban {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  padding-bottom: var(--sp-4);
  min-height: 400px;
}

.hh-kanban-col {
  flex: 0 0 260px;
  background: var(--color-gray-50);
  border-radius: var(--radius-lg);
  padding: var(--sp-3);
}

.hh-kanban-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.hh-kanban-col-name {
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.hh-kanban-col-count {
  background: var(--color-gray-200);
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
}

.hh-kanban-cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-height: 60px;
}

.hh-kanban-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: var(--sp-2) var(--sp-3);
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.hh-kanban-card:hover {
  box-shadow: var(--shadow-sm);
}

.hh-kanban-card-name {
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  margin-bottom: 2px;
}

.hh-kanban-card-brokerage {
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
  margin-bottom: var(--sp-1);
}

.hh-kanban-card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--font-size-xs);
  color: var(--color-gray-600);
}

.hh-dragging { opacity: 0.4; }
.hh-drag-over { background: var(--color-gray-100); }

/* ---------- Sidebar Premium ---------- */

.nav-item--locked {
  opacity: 0.5;
}

.nav-item--headhunt .nav-icon { color: #F59E0B; }
.nav-item--headhunt:not(.nav-item--active):not(.nav-item--locked) { color: #F59E0B; }
.nav-item--headhunt.nav-item--active .nav-icon { color: inherit; }

.nav-pro-badge {
  display: inline-block;
  padding: 0 5px;
  background: linear-gradient(135deg, #8B5CF6, #6366F1);
  color: white;
  font-size: 9px;
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-sm);
  margin-left: auto;
  letter-spacing: 0.05em;
}

/* ---------- Star Button ---------- */

.td-star { width: 30px; text-align: center; }
.hh-star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--color-gray-300);
  transition: all 0.15s;
  padding: 6px;
  line-height: 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hh-star-btn:active { transform: scale(0.9); }
.hh-star-btn:hover { color: #F59E0B; transform: scale(1.2); }
.hh-star-btn--active { color: #F59E0B; }

/* ---------- Enrichment Sync Dot ---------- */

.td-sync { width: 30px; text-align: center; }
.hh-sync-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.hh-sync-dot--fresh { background: #22C55E; }
.hh-sync-dot--stale { background: #EF4444; animation: pulse-stale 2s infinite; }
@keyframes pulse-stale {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- Slide-in Drawer ---------- */

.hh-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 998;
  transition: background 0.3s;
}
.hh-drawer-backdrop--visible { background: rgba(0, 0, 0, 0.12); }

.hh-drawer {
  position: fixed;
  top: 0;
  right: -60%;
  width: 60%;
  height: 100vh;
  height: 100dvh;
  background: white;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.hh-drawer--open { right: 0; }

.hh-drawer-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.hh-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #F1F5F9;
  flex-shrink: 0;
}
.hh-drawer-header-left,
.hh-drawer-header-right { display: flex; align-items: center; gap: var(--sp-2); }

.hh-drawer-identity {
  display: flex;
  gap: var(--sp-4);
  padding: 20px 24px;
  align-items: center;
}
.hh-drawer-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}
.hh-drawer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hh-drawer-identity h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 2px; }

.hh-drawer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 16px;
}
.hh-drawer-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  font-size: 0.8125rem;
  color: var(--color-gray-700);
  text-decoration: none;
  transition: all 0.12s;
}
.hh-drawer-contact-item:hover { background: var(--color-gray-50); border-color: var(--color-gray-300); }

.hh-drawer-metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-1);
  padding: 0 var(--sp-5) var(--sp-3);
}
.hh-drawer-metric {
  text-align: center;
  padding: var(--sp-2);
  background: #F8FAFC;
  border-radius: 12px;
}
.hh-drawer-metric-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gray-900);
}
.hh-drawer-metric-label {
  font-size: 0.6rem;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hh-drawer-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-gray-200);
  padding: 0 var(--sp-5);
  flex-shrink: 0;
  background: #FAFBFC;
}
.hh-drawer-tab {
  flex: 1;
  padding: 12px 0;
  background: none;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-gray-400);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
  text-align: center;
  letter-spacing: 0.01em;
}
.hh-drawer-tab:hover { color: #0F172A; background: rgba(0,0,0,0.02); }
.hh-drawer-tab--active { color: #0F172A; font-weight: 700; border-bottom-color: #0D9488; background: white; }

.hh-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-5);
}

.hh-drawer-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.hh-drawer-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: #F8FAFC;
  border-radius: 10px;
  border: 1px solid #F1F5F9;
}
.hh-drawer-field-label {
  color: #94A3B8;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hh-drawer-field-value,
.hh-drawer-field span:last-child {
  font-size: 0.85rem;
  color: #0F172A;
  font-weight: 600;
}

.hh-drawer-bio {
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 0.85rem;
  line-height: 1.75;
  color: #475569;
  margin-top: 4px;
}
.hh-drawer-bio__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94A3B8;
  margin-bottom: 8px;
}

/* Drawer deals */
.hh-drawer-deals { display: flex; flex-direction: column; gap: var(--sp-2); }
.hh-drawer-deal {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: var(--color-gray-50);
  border-radius: var(--radius-md);
}
.hh-drawer-deal-type { flex-shrink: 0; }
.hh-drawer-deal-info { flex: 1; }
.hh-drawer-deal-price {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

.hh-action-label { display: none; }
.hh-mobile-show { display: none; }

/* Drawer notes */
.hh-drawer-notes { display: flex; flex-direction: column; gap: var(--sp-3); }
.hh-drawer-note-add {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--color-gray-200);
}
.hh-drawer-note-add .btn { align-self: flex-end; }
.hh-drawer-note {
  padding: var(--sp-2) var(--sp-3);
  background: var(--color-gray-50);
  border-radius: var(--radius-md);
}
.hh-drawer-note-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

/* Drawer changes */
.hh-drawer-changes { display: flex; flex-direction: column; gap: var(--sp-2); }

/* ---------- Comparison Table ---------- */

.hh-compare-table th { vertical-align: bottom; padding-bottom: var(--sp-3); }
.hh-compare-table td { font-size: var(--font-size-sm); }
.hh-compare-table tr:hover { background: var(--color-gray-50); }

/* ---------- Responsive ---------- */

/* Desktop defaults (must be BEFORE the media query) */
.hh-desktop-only { display: block; }
.hh-mobile-only { display: none; }
.mobile-sheet-handle { display: none; }
.hh-mobile-toolbar { display: none; }

@media (max-width: 768px) {
  /* Mobile search bar */
  .hh-mobile-search {
    padding: 0 4px 8px;
  }
  .hh-mobile-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
  }
  .hh-mobile-search-icon {
    position: absolute;
    left: 12px;
    color: var(--color-gray-400, #94A3B8);
    pointer-events: none;
  }
  .hh-mobile-search-input {
    width: 100%;
    padding: 10px 36px 10px 36px;
    border: 1px solid var(--color-gray-200, #E2E8F0);
    border-radius: 12px;
    background: var(--color-gray-50, #F8FAFC);
    font-size: 16px;
    color: var(--color-gray-900, #0F172A);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
  }
  .hh-mobile-search-input:focus {
    border-color: var(--color-primary, #1B2A4A);
    box-shadow: 0 0 0 3px rgba(27, 42, 74, 0.08);
    background: white;
  }
  .hh-mobile-search-input::placeholder {
    color: var(--color-gray-400, #94A3B8);
  }
  .hh-mobile-search-clear {
    position: absolute;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--color-gray-200, #E2E8F0);
    border-radius: 50%;
    font-size: 16px;
    color: var(--color-gray-500, #64748B);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  /* Stats strip — compact horizontal scroll */
  .hh-stats-strip {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 4px 4px !important;
    margin-bottom: 8px !important;
  }
  .hh-stats-strip::-webkit-scrollbar { display: none; }
  .hh-stat-card {
    flex: 0 0 auto !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    min-width: 0 !important;
    border-width: 1px !important;
  }
  .hh-stat-value { font-size: 0.95rem !important; }
  .hh-stat-label { font-size: 0.625rem !important; margin-top: 1px !important; }

  /* Header — compact */
  .candidates-header { margin-bottom: 8px !important; }
  .candidates-header h1 { font-size: 1.25rem !important; }
  .candidates-count { font-size: 0.7rem !important; }
  .hh-sync-status { font-size: 0.65rem !important; display: block; color: #94A3B8; }

  /* Desktop/mobile toggle */
  .hh-desktop-only { display: none !important; }
  .hh-mobile-only { display: block; }

  /* ╔══════════════════════════════════════════════════════════════════╗
     ║  LOCKED — VAULT MOBILE CARD UI/UX                               ║
     ║  DO NOT MODIFY any styles between this banner and the closing   ║
     ║  LOCKED banner below. This layout, spacing, typography, and     ║
     ║  card structure have been approved and must not be changed       ║
     ║  without explicit written permission from the product owner.    ║
     ╚══════════════════════════════════════════════════════════════════╝ */

  /* Mobile card list */
  .hh-card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 2px;
  }
  .hh-agent-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: var(--color-white, #fff);
    border: 1px solid var(--color-gray-100, #F1F5F9);
    border-radius: 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    animation: card-fade-in 0.25s ease both;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .hh-agent-card:active { background: var(--color-gray-50, #F8FAFC); }

  /* Row 1: checkbox + avatar + name/subtitle + star */
  .hh-agent-card__check {
    position: absolute;
    top: 14px;
    left: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hh-agent-card__check input { width: 18px; height: 18px; }
  /* Make card relative for checkbox positioning */
  .hh-agent-card { position: relative; padding-left: 44px; }

  .hh-agent-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    overflow: hidden;
  }
  /* Top section: avatar + info side by side */
  .hh-agent-card__body {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
  }
  /* Info block next to avatar */
  .hh-agent-card__info {
    flex: 1 1 0%;
    min-width: 0;
  }
  .hh-agent-card__top {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .hh-agent-card__name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-gray-900, #0F172A);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
  }
  .hh-agent-card__top .hh-star-btn {
    font-size: 16px;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    flex: 0 0 auto;
    line-height: 1;
  }
  .hh-agent-card__subtitle {
    font-size: 0.8125rem;
    color: var(--color-gray-500, #64748B);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
    line-height: 1.3;
  }

  /* Row 2: chips + stats inline */
  .hh-agent-card__chips { display: flex; gap: 4px; margin-top: 0; flex-wrap: wrap; align-items: center; }
  .hh-agent-card__chips .hh-source-badge,
  .hh-agent-card__chips .hh-badge-sm { font-size: 0.625rem; padding: 2px 6px; }
  .hh-agent-card__stats {
    font-size: 0.75rem;
    color: var(--color-gray-600, #475569);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hh-card-dot { color: var(--color-gray-300, #CBD5E1); }

  /* Row 3: meta row — chips + stats + actions */
  .hh-agent-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .hh-agent-card__meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
  }

  /* Action buttons — horizontal row at bottom */
  .hh-agent-card__actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex: 0 0 auto;
  }
  .hh-card-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-gray-200, #E2E8F0);
    text-decoration: none;
    background: white;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s;
  }
  .hh-card-action-btn--call { color: #3B82F6; }
  .hh-card-action-btn--call:active { background: rgba(59,130,246,0.1); }
  .hh-card-action-btn--whatsapp { color: #25D366; }
  .hh-card-action-btn--whatsapp:active { background: rgba(37,211,102,0.1); }
  @keyframes card-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ╔══════════════════════════════════════════════════════════════════╗
     ║  END LOCKED — VAULT MOBILE CARD UI/UX                          ║
     ╚══════════════════════════════════════════════════════════════════╝ */

  /* Hide column picker on mobile (irrelevant with card view) */
  #hh-edit-cols-btn { display: none !important; }

  /* Mobile toolbar */
  .candidates-header-actions { display: none !important; }
  .hh-mobile-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--color-white, #fff);
    border-bottom: 1px solid var(--color-gray-100, #F1F5F9);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .hh-mobile-toolbar::-webkit-scrollbar { display: none; }
  .hh-mobile-toolbar-btn {
    flex-shrink: 0;
    min-height: 40px;
    min-width: 40px;
    padding: 8px 14px;
    border: 1px solid var(--color-gray-200, #E2E8F0);
    border-radius: 999px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-gray-700, #334155);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    transition: all 0.15s;
  }
  .hh-mobile-toolbar-btn:active { background: var(--color-gray-50, #F8FAFC); }
  .hh-mobile-toolbar-btn--active {
    background: var(--color-primary, #1B2A4A);
    color: white;
    border-color: var(--color-primary, #1B2A4A);
  }
  .hh-mobile-filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-accent, #F59E0B);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Toolbar — stacked */
  .hh-toolbar { flex-direction: column; align-items: stretch; gap: var(--sp-2); }
  .hh-search-wrap { min-width: 0; width: 100%; }
  .hh-source-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  .hh-source-tab { flex-shrink: 0; white-space: nowrap; }
  .hh-source-tabs { scrollbar-width: none; -ms-overflow-style: none; }
  .hh-source-tabs::-webkit-scrollbar { display: none; }

  /* Filter bar — horizontal scroll pills */
  .hh-filter-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding: 0 var(--sp-3) var(--sp-1);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .hh-filter-bar::-webkit-scrollbar { display: none; }
  .hh-filter-pill { flex-shrink: 0; white-space: nowrap; }

  /* Table wrap — scroll container on mobile */
  .hh-table-scroll-wrap {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
  }
  .hh-table th, .hh-table td {
    white-space: nowrap;
    font-size: var(--font-size-xs);
    padding: 8px 6px;
  }

  /* Profile hero — stack */
  .hh-profile-hero { flex-direction: column; gap: var(--sp-3); }
  .hh-field-grid { grid-template-columns: 1fr; }

  /* Drawer — full screen, slide from bottom */
  .hh-drawer {
    top: auto;
    bottom: 0;
    right: 0 !important;
    width: 100vw !important;
    height: calc(100vh - var(--mobile-nav-height, 64px));
    height: calc(100dvh - var(--mobile-nav-height, 64px) - env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1) !important;
    border-radius: 16px 16px 0 0;
  }
  .hh-drawer--open { transform: translateY(0); }
  .hh-drawer::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--color-gray-300, #CBD5E1);
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }

  /* --- Drawer header — compact, no border --- */
  .hh-drawer-header {
    padding: 6px 12px 0;
    border-bottom: none;
    flex-shrink: 0;
  }
  .hh-drawer-header-right { flex-wrap: wrap; gap: var(--sp-1); }
  .hh-drawer-header-right .btn { font-size: var(--font-size-xs); min-height: 36px; padding: 6px 10px; }
  .hh-drawer-header-right .hh-star-btn { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; font-size: 20px !important; }
  .hh-drawer-header-left .btn { min-width: 36px; min-height: 36px; font-size: 1.1rem; }
  .drawer-nav-btn { min-width: 36px; min-height: 36px; }

  /* --- Drawer identity — centered card style --- */
  .hh-drawer-identity {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4px 20px 10px;
    gap: 8px;
  }
  .hh-drawer-avatar {
    width: 64px !important;
    height: 64px !important;
    border-radius: 18px !important;
    font-size: 24px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .hh-drawer-identity h2 { font-size: 1.15rem; margin-bottom: 0; }
  .hh-drawer-identity .text-sm { font-size: 0.8rem; color: var(--color-gray-500); }
  .hh-profile-badge-row { justify-content: center; }

  /* --- Drawer sections — no shrink, tight spacing --- */
  .hh-drawer-identity,
  .hh-drawer-convert-bar,
  .hh-drawer-contact,
  .hh-drawer-metrics,
  .hh-drawer .hh-compat-score { flex-shrink: 0; }

  /* --- Action row — full width equal buttons --- */
  .hh-drawer-convert-bar {
    padding: 8px 16px;
    gap: 8px;
    border-bottom: none;
    background: none;
  }
  .hh-drawer-convert-bar .btn {
    flex: 1;
    min-height: 44px;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    justify-content: center;
    gap: 6px;
  }
  .hh-drawer-convert-btn { border-radius: 12px !important; }
  .hh-action-label { display: inline !important; font-size: 0.75rem; }

  /* --- Contact pills — compact inline --- */
  .hh-drawer-contact {
    padding: 0 16px 8px;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
  }
  .hh-drawer-contact-item {
    min-height: 36px;
    padding: 4px 12px;
    font-size: 0.75rem;
    border-radius: 18px;
    gap: 4px;
  }

  /* --- Compat score — compact --- */
  .hh-drawer .hh-compat-score {
    margin: 0 16px 6px;
    padding: 6px 10px;
    border-radius: 8px;
  }

  /* --- Metrics — 5 cols, compact --- */
  .hh-drawer-metrics {
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 0 12px 8px;
  }
  .hh-drawer-metric {
    padding: 6px 2px;
    border-radius: 8px;
  }
  .hh-drawer-metric-val { font-size: 1rem; }
  .hh-drawer-metric-label { font-size: 0.55rem; }

  .hh-drawer-fields { grid-template-columns: 1fr; }

  /* Drawer tabs — horizontal scroll with fade indicator */
  .hh-drawer-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(to right, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, black 92%, transparent 100%);
    padding-right: 20px;
    background: white;
    border-top: 1px solid var(--color-gray-100, #F1F5F9);
    border-bottom: 1px solid var(--color-gray-200, #E2E8F0);
    flex-shrink: 0;
    gap: 0;
  }
  .hh-drawer-tabs::-webkit-scrollbar { display: none; }
  .hh-drawer-tab {
    flex: none;
    padding: 10px 14px;
    white-space: nowrap;
    font-size: 0.75rem;
    min-height: 40px;
    display: flex;
    align-items: center;
  }

  /* Drawer body — maximise scroll area */
  .hh-drawer-body {
    padding: 12px 16px;
    -webkit-overflow-scrolling: touch;
  }
  .hh-drawer-field {
    padding: 10px 12px;
    border-radius: 8px;
  }
  .hh-drawer-bio {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.8125rem;
    line-height: 1.65;
  }

  /* Profile tabs — horizontal scroll with fade */
  #hh-profile-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(to right, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, black 92%, transparent 100%);
    padding-right: 20px;
  }
  #hh-profile-tabs::-webkit-scrollbar { display: none; }
  .hh-tab {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 0.8125rem;
  }

  /* Advanced Search — bottom sheet on mobile */
  .candidates-sidebar:not(.hh-sidebar-collapsed) {
    position: fixed !important;
    bottom: calc(var(--mobile-nav-height, 64px) + var(--safe-area-bottom, 0px));
    left: 0;
    right: 0;
    top: auto;
    height: 70vh;
    height: 70dvh;
    width: 100% !important;
    z-index: 700;
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-top: 1px solid var(--color-gray-200, #E2E8F0);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
    animation: sheet-slide-up 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    background: var(--color-white, #fff);
  }
  .candidates-sidebar.hh-sidebar-collapsed {
    width: 0 !important;
    height: 0;
    opacity: 0;
    position: fixed !important;
    pointer-events: none;
  }
  .mobile-sheet-handle {
    display: block;
    width: 40px;
    height: 4px;
    background: var(--color-gray-300, #CBD5E1);
    border-radius: 2px;
    margin: 12px auto 4px;
    flex-shrink: 0;
  }
  .hh-search-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 699;
    animation: fade-in-backdrop 0.2s ease;
  }

  /* Bulk actions — fixed above mobile nav, scrollable */
  .hh-bulk-bar {
    position: fixed;
    bottom: calc(var(--mobile-nav-height, 64px) + var(--safe-area-bottom, 0px));
    left: 0;
    right: 0;
    z-index: 600;
    border-radius: 0;
    padding: 8px 12px;
  }
  .hh-bulk-bar .flex,
  .bulk-bar .flex {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 8px;
    scrollbar-width: none;
  }
  .hh-bulk-bar .btn,
  .bulk-bar .btn { flex-shrink: 0; min-height: 40px; }

  /* Source tabs — premium pill style */
  .hh-source-tab {
    min-height: 36px;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 500;
    transition: all 0.15s;
  }
  .hh-source-tab--active {
    background: var(--color-primary, #1B2A4A);
    color: white;
    box-shadow: 0 2px 8px rgba(27,42,74,0.2);
  }

  /* Pagination — touch-friendly */
  .hh-pagination {
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding: 12px 16px;
  }
  .hh-page-btns {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .hh-page-btns .btn {
    min-width: 44px;
    min-height: 44px;
  }

  /* Kanban — horizontal snap with polish */
  .hh-kanban {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 8px 0;
    gap: 8px;
    max-height: calc(100dvh - var(--mobile-nav-height, 64px) - 180px);
    scrollbar-width: none;
  }
  .hh-kanban::-webkit-scrollbar { display: none; }
  .hh-kanban-col {
    flex: none;
    width: 85vw;
    min-width: 85vw;
    scroll-snap-align: center;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow-y: auto;
    max-height: 100%;
  }
  .hh-kanban-col-header {
    position: sticky;
    top: 0;
    background: var(--color-gray-50, #F8FAFC);
    z-index: 1;
    border-radius: 16px 16px 0 0;
  }
  .hh-kanban-card {
    padding: 12px;
    min-height: 72px;
  }
}

@keyframes sheet-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes fade-in-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== Vault Search UX ========== */

/* Search result summary */
.hh-search-summary {
  font-size: 0.8125rem;
  color: var(--color-gray-600);
  padding: var(--sp-2) 0;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.hh-search-summary strong {
  color: var(--color-gray-900);
  font-weight: 700;
}

/* Recent searches pills */
.hh-recent-searches {
  display: flex;
  gap: var(--sp-1);
  flex-wrap: wrap;
  padding: var(--sp-1) 0;
}
.hh-recent-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-full, 20px);
  font-size: var(--font-size-xs);
  color: var(--color-gray-600);
  cursor: pointer;
  transition: all 0.15s;
}
.hh-recent-pill:hover {
  background: var(--color-gray-200);
  color: var(--color-gray-900);
}

/* Search bar clear button */
.hh-search-wrapper {
  position: relative;
}
.hh-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-gray-400);
  font-size: 16px;
  padding: 4px;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}
.hh-search-clear:hover { color: var(--color-gray-700); background: var(--color-gray-200); }

/* Active filter badges */
.hh-active-filters {
  display: flex;
  gap: var(--sp-1);
  flex-wrap: wrap;
  align-items: center;
}
.hh-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: var(--radius-full, 20px);
  font-size: var(--font-size-xs);
  color: #0D9488;
  font-weight: 500;
}
.hh-filter-badge__remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #0D9488;
  font-size: 14px;
  padding: 0;
  line-height: 1;
  margin-left: 2px;
}
.hh-filter-badge__remove:hover { color: #0F766E; }
.hh-clear-all-filters {
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
  cursor: pointer;
  background: none;
  border: none;
  padding: 3px 6px;
  font-weight: 500;
}
.hh-clear-all-filters:hover { color: var(--color-error, #EF4444); }

/* Table toolbar — filters left, edit columns right */
.hh-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
  min-height: 28px;
}

.hh-table-toolbar__filters {
  flex: 1;
  min-width: 0;
}

.hh-table-toolbar__cols {
  flex-shrink: 0;
  margin-left: auto;
  white-space: nowrap;
}

/* Filter count badge on toggle button */
.hh-filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #0D9488;
  color: white;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
}

/* Drawer convert button */
.hh-drawer-convert-bar {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--color-gray-100);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.04), rgba(13, 148, 136, 0.02));
}
.hh-drawer-convert-btn {
  flex: 1;
}

/* Compatibility score */
.hh-compat-score {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--color-gray-50);
  border-radius: 10px;
  font-size: 0.8125rem;
}
.hh-compat-bar {
  flex: 1;
  height: 6px;
  background: var(--color-gray-200);
  border-radius: 3px;
  overflow: hidden;
}
.hh-compat-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.hh-compat-label {
  font-weight: 700;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Similar agents section */
.hh-similar-agents {
  border-top: 1px solid var(--color-gray-100);
  padding: var(--sp-3) var(--sp-5);
}
.hh-similar-agents__title {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-2);
}
.hh-similar-agent {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  cursor: pointer;
  border-bottom: 1px solid var(--color-gray-50);
  transition: background 0.15s;
}
.hh-similar-agent:last-child { border-bottom: none; }
.hh-similar-agent:hover { background: var(--color-gray-50); border-radius: 6px; padding-left: 4px; padding-right: 4px; }
.hh-similar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}
.hh-similar-info { flex: 1; min-width: 0; }
.hh-similar-name { font-size: 0.8125rem; font-weight: 500; color: var(--color-gray-900); }
.hh-similar-detail { font-size: var(--font-size-xs); color: var(--color-gray-500); }

/* Quick actions on agent table rows */
.hh-quick-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}
.hh-row:hover .hh-quick-actions { opacity: 1; }
.hh-quick-action-btn {
  background: none;
  border: 1px solid var(--color-gray-200);
  border-radius: 4px;
  cursor: pointer;
  padding: 3px 5px;
  font-size: 12px;
  color: var(--color-gray-500);
  transition: all 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hh-quick-action-btn:hover {
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  border-color: var(--color-gray-300);
}
.hh-quick-action-btn--convert:hover { color: #0D9488; border-color: #0D9488; background: rgba(13, 148, 136, 0.06); }
.hh-quick-action-btn--whatsapp:hover { color: #25D366; border-color: #25D366; background: rgba(37, 211, 102, 0.06); }
.hh-quick-action-btn--call:hover { color: #3B82F6; border-color: #3B82F6; background: rgba(59, 130, 246, 0.06); }

/* -- Vault Search UX Mobile -- */
@media (max-width: 768px) {
  .hh-quick-actions { opacity: 1; }
  .hh-quick-action-btn { min-width: 44px; min-height: 44px; }
  .hh-drawer-convert-bar { flex-wrap: wrap; }
  .hh-similar-agent { padding: var(--sp-2); }
}
