/**
 * ============================================================
 * SPOTREALTY — Buyer Board Table View V1 Stylesheet
 * Isolated namespace: .buyer-table-*
 * Uses SpotRealty CSS variables and design tokens. Zero Tailwind.
 * ============================================================
 */

/* ── Utility Bar ────────────────────────────────────────── */
.buyer-table-utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 4px 10px 4px;
  font-size: 12px;
  user-select: none;
}

.buyer-table-utility-left,
.buyer-table-utility-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.buyer-table-quick-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-right: 2px;
}

.buyer-table-quick-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.buyer-table-quick-btn:hover {
  background: #f8fafc;
  color: #1e293b;
  border-color: #cbd5e1;
}

.buyer-table-quick-btn.active {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
  font-weight: 600;
}

.buyer-table-divider {
  width: 1px;
  height: 18px;
  background: #e2e8f0;
  margin: 0 2px;
}

/* ── Sub-View Toggle (Table vs Card) ─────────────────────── */
.buyer-table-subview-toggle {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.buyer-table-subview-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.buyer-table-subview-btn:hover {
  color: #1e293b;
}

.buyer-table-subview-btn.active {
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
}

/* ── Utility Right: Count, Sort, Columns ─────────────────── */
.buyer-table-count-summary {
  font-size: 12px;
  color: #64748b;
  margin-right: 4px;
}

.buyer-table-count-summary strong {
  color: #0f172a;
  font-weight: 600;
}

.buyer-table-popover-anchor {
  position: relative;
  display: inline-block;
}

.buyer-table-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.buyer-table-dropdown-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.buyer-table-dropdown-btn.is-active {
  border-color: #6366f1;
  background: #f5f3ff;
}

/* ── Table Container & Shell ────────────────────────────── */
.buyer-table-card {
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.buyer-table-scroll-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  min-height: 480px;
  position: relative;
  scroll-behavior: auto;
  cursor: grab;
  box-sizing: border-box;
}

.buyer-table-scroll-wrap.is-dragging {
  cursor: grabbing !important;
  user-select: none;
}

.buyer-table-scroll-wrap.is-dragging * {
  cursor: grabbing !important;
  user-select: none;
}

.buyer-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  color: #334155;
}

/* ── Header Rows & Cells ────────────────────────────────── */
.buyer-table-thead {
  background: #f8fafc;
  border-bottom: 1px solid var(--border, #e2e8f0);
  user-select: none;
}

.buyer-table-th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #64748b;
  text-transform: uppercase;
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 10;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.buyer-table-th-interactive {
  cursor: pointer;
  transition: color 0.15s ease;
}

.buyer-table-th-interactive:hover {
  color: #0f172a;
}

.buyer-table-th-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.buyer-table-th-first {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 25;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  box-shadow: 1px 0 0 #e2e8f0;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  box-sizing: border-box;
}

.buyer-table-th-last {
  position: relative;
  background: #f8fafc;
  text-align: right;
  width: 60px;
  min-width: 60px;
  padding-right: 16px;
}

.buyer-table-sort-arrow {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.buyer-table-sort-arrow.active {
  color: #4f46e5;
  font-weight: 700;
}

/* ── Table Body & Rows ──────────────────────────────────── */
.buyer-table-tbody {
  divide-y: 1px solid #f1f5f9;
}

.buyer-table-tr {
  height: 56px;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.buyer-table-tr:hover {
  background-color: #f8fafc;
}

.buyer-table-td {
  padding: 10px 16px;
  vertical-align: middle;
  white-space: nowrap;
}

.buyer-table-td-first {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #ffffff;
  border-right: 1px solid #f1f5f9;
  box-shadow: 1px 0 0 #f1f5f9;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  box-sizing: border-box;
}

.buyer-table-tr:hover .buyer-table-td-first {
  background-color: #f8fafc;
}

.buyer-table-td-last {
  text-align: right;
  padding-right: 16px;
  width: 60px;
  min-width: 60px;
}

/* Stage Column Width Authority */
.buyer-table-th[data-col="stage"],
.buyer-table-td[data-col="stage"],
.buyer-table-th:nth-child(2),
.buyer-table-td:nth-child(2) {
  min-width: 150px;
  width: 150px;
}

/* ── Cell Specific Components ───────────────────────────── */

/* 1. Buyer Identity Cell */
.buyer-table-identity-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.buyer-table-dial-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.buyer-table-dial-btn:hover {
  color: #4f46e5;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.buyer-table-identity-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.buyer-table-name-link {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease;
}

.buyer-table-name-link:hover {
  color: #4f46e5;
}

.buyer-table-id-tag {
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #94a3b8;
  line-height: 1.2;
}

/* 2. Stage / List Pill */
.buyer-table-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.15s ease;
  max-width: 175px;
  user-select: none;
}

.buyer-table-stage-pill:hover {
  filter: brightness(0.96);
}

.buyer-table-stage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.buyer-table-stage-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buyer-table-stage-arrow {
  opacity: 0.6;
  font-size: 10px;
  margin-left: 2px;
}

/* 3. Priority Badge */
.buyer-table-priority-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
  line-height: 1.3;
}

.buyer-table-priority-hot {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.buyer-table-priority-warm {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.buyer-table-priority-cold {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.buyer-table-priority-none {
  color: #94a3b8;
  font-weight: 400;
}

/* 4. Requirement Summary */
.buyer-table-req-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 280px;
}

.buyer-table-req-primary {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buyer-table-req-secondary {
  font-size: 11px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 5. Budget */
.buyer-table-budget {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

/* 6. Primary Assignee */
.buyer-table-assignee-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.buyer-table-avatar-initials {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #4338ca;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c7d2fe;
  flex-shrink: 0;
}

.buyer-table-assignee-name {
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 7. Next Follow-Up */
.buyer-table-followup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid;
  white-space: nowrap;
}

.buyer-table-followup-overdue {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.buyer-table-followup-today {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.buyer-table-followup-upcoming {
  background: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}

.buyer-table-followup-none {
  font-style: italic;
  color: #94a3b8;
  font-size: 11px;
}

.buyer-table-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dc2626;
  animation: buyerPulse 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes buyerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.buyer-table-comm-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.buyer-table-comm-label {
  font-size: 12px;
  font-weight: 500;
  color: #334155;
}

.buyer-table-actor-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 4px;
  line-height: 1.2;
  text-transform: uppercase;
}

.buyer-table-comm-empty {
  color: #94a3b8;
  font-style: italic;
  font-size: 12px;
}

.buyer-table-labels-wrap {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  overflow: hidden;
  max-width: 220px;
}

.buyer-table-label-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 10px;
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buyer-table-label-tag.is-truncated {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buyer-table-label-overflow {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  font-size: 10px;
  color: #475569;
  font-weight: 600;
  white-space: nowrap;
  cursor: default;
}


.buyer-table-activity-text {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

.buyer-table-activity-never {
  font-style: italic;
  color: #94a3b8;
  font-size: 11px;
}

/* 9. Row Action Menu Button */
.buyer-table-row-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.buyer-table-row-action-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* ── Popover Panels (Sort, Columns, Stage, Contact) ────── */
.buyer-table-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  z-index: 100;
  padding: 10px 8px;
  display: none;
}

.buyer-table-popover.is-open {
  display: block;
  animation: buyerFadeIn 0.12s ease-out;
}

@keyframes buyerFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.buyer-table-sort-popover {
  width: 280px;
  max-height: 440px;
  overflow-y: auto;
}

.buyer-table-columns-popover {
  width: 280px;
  max-height: 420px;
  overflow-y: auto;
  padding: 12px;
}

.buyer-table-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 8px 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.buyer-table-popover-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f172a;
}

.buyer-table-popover-reset {
  font-size: 11px;
  font-weight: 600;
  color: #4f46e5;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.buyer-table-popover-reset:hover {
  text-decoration: underline;
}

.buyer-table-sort-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  padding: 6px 8px 2px 8px;
}

.buyer-table-sort-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s ease;
}

.buyer-table-sort-option:hover {
  background: #f8fafc;
  color: #0f172a;
}

.buyer-table-sort-option.is-active {
  background: #f5f3ff;
  color: #4338ca;
  font-weight: 600;
}

.buyer-table-radio-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  margin-right: 8px;
  display: inline-block;
  flex-shrink: 0;
}

.buyer-table-sort-option.is-active .buyer-table-radio-circle {
  background: #4f46e5;
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px #e0e7ff;
}

/* Columns Configurator Checklist */
.buyer-table-col-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.buyer-table-col-item:hover {
  background: #f8fafc;
}

.buyer-table-col-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #334155;
}

.buyer-table-col-status {
  font-size: 10px;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

/* Quick Contact Popover */
.buyer-table-contact-popover {
  width: 220px;
  padding: 6px;
}

.buyer-table-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.12s ease;
}

.buyer-table-contact-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* ── Pagination Footer ──────────────────────────────────── */
.buyer-table-pagination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--border, #e2e8f0);
  background: #ffffff;
  font-size: 12px;
  color: #64748b;
  user-select: none;
}

.buyer-table-pagination-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.buyer-table-rows-select {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
}

.buyer-table-pagination-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.buyer-table-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.buyer-table-page-btn:hover:not(:disabled) {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}

.buyer-table-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.buyer-table-page-btn.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.3);
}

.buyer-table-ellipsis {
  padding: 0 4px;
  color: #94a3b8;
}

/* ── Empty State ────────────────────────────────────────── */
.buyer-table-empty {
  padding: 4rem 2rem;
  text-align: center;
  color: #64748b;
}

.buyer-table-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.buyer-table-empty-desc {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}

/* ── Header Filter & Sort System V1 ───────────────────────── */
.buyer-table-th-inner {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.buyer-table-th-sort-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
  user-select: none;
  text-align: left;
}

.buyer-table-th-sort-trigger:hover {
  color: #0f172a;
}

.buyer-table-th-label {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  color: inherit;
}

.buyer-table-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 18px;
  height: 18px;
  padding: 1px 3px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.buyer-table-filter-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

.buyer-table-filter-btn.is-active {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.buyer-table-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 9999px;
  background: #4f46e5;
  color: #ffffff;
  margin-left: 2px;
}

/* ── Header Filter Popover Container ───────────────────────── */
.buyer-table-header-popover {
  position: fixed;
  z-index: 99999;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  width: 290px;
  max-width: calc(100vw - 32px);
  font-size: 13px;
  color: #1e293b;
  overflow: hidden;
  display: none;
}

.buyer-table-header-popover.is-open {
  display: flex;
  flex-direction: column;
}

.buyer-table-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.buyer-table-popover-close {
  background: transparent;
  border: none;
  font-size: 16px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}

.buyer-table-popover-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.buyer-table-popover-body {
  padding: 12px 14px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.buyer-table-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.buyer-table-popover-btn-clear {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.buyer-table-popover-btn-clear:hover {
  background: #fee2e2;
}

.buyer-table-popover-btn-apply {
  background: #4f46e5;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.3);
  transition: background 0.15s ease;
}

.buyer-table-popover-btn-apply:hover {
  background: #4338ca;
}

.buyer-table-popover-search {
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
}

.buyer-table-popover-search:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.buyer-table-popover-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.buyer-table-popover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: #334155;
}

.buyer-table-popover-item:hover {
  background: #f1f5f9;
}

.buyer-table-popover-item input[type="checkbox"],
.buyer-table-popover-item input[type="radio"] {
  cursor: pointer;
  margin: 0;
}

.buyer-table-popover-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

