/* People Page */

.former-role {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #8b5e3c;
  background: #fdf0e2;
  border-radius: 3px;
  padding: 1px 4px;
  margin-right: 4px;
  vertical-align: middle;
}

:root {
  --color-primary: #C41230;
  --color-primary-hover: #a30f28;
  --color-primary-light: #fde8eb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f5f5;
  color: #111827;
  line-height: 1.5;
}

/* Unified Header styles are in header.css */

/* Main App Layout */
.people-app {
  display: flex;
  flex-direction: column;
  padding-top: 48px;
  height: 100vh;
}

/* Tab Navigation */
.people-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}

.people-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.people-tab:hover {
  background: #f3f4f6;
  color: #374151;
}

.people-tab.active {
  background: var(--color-primary);
  color: #ffffff;
}

.people-tab svg {
  flex-shrink: 0;
}

/* Content Views */
.people-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.people-content.hidden {
  display: none;
}

/* Section Header */
.people-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}

.people-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.people-title h1 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.people-count {
  font-size: 13px;
  color: #6b7280;
}

.people-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Search Box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 12px;
  color: #9ca3af;
  pointer-events: none;
}

.search-box .search-input {
  padding-left: 36px;
  width: 280px;
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.search-input:focus {
  border-color: var(--color-primary);
}

/* Date Filter Pills */
.filter-pills {
  display: flex;
  gap: 4px;
}

.filter-pill {
  padding: 6px 14px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  background: #ffffff;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover {
  border-color: #f9a8b4;
  color: #374151;
}

.filter-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

/* AG Grid Container */
.people-grid-container {
  flex: 1;
  overflow: hidden;
  padding: 0;
}

.people-grid {
  width: 100%;
  height: 100%;
}

/* Social link styles (used by AG Grid cell renderers) */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6b7280;
  text-decoration: none;
  font-size: 12px;
}

.social-link:hover {
  color: var(--color-primary);
}

.social-link svg {
  width: 14px;
  height: 14px;
}

/* Grid cell link styles */
.people-grid a {
  color: var(--color-primary);
  text-decoration: none;
}

.people-grid a:hover {
  text-decoration: underline;
}

/* Investor/firm badge */
.firm-badge {
  font-size: 11px;
  color: #6b7280;
}

/* Source badge */
.source-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: #f3f4f6;
  color: #6b7280;
}

/* Investor Select Dropdown */
.investor-select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  background: #ffffff;
  outline: none;
  min-width: 240px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.investor-select:focus {
  border-color: var(--color-primary);
}

/* Who Follows Bar */
.who-follows-bar {
  background: #f9fafb;
  border-bottom: 1px solid #e5e5e5;
  padding: 12px 24px;
}

.who-follows-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.who-follows-label {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  white-space: nowrap;
}

.who-follows-results {
  flex: 1;
  min-width: 200px;
}

.who-follows-loading,
.who-follows-none,
.who-follows-error {
  font-size: 13px;
  color: #6b7280;
}

.who-follows-error {
  color: #dc2626;
}

.who-follows-account {
  margin-bottom: 6px;
  font-size: 13px;
}

.who-follows-desc {
  font-size: 12px;
  color: #6b7280;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.who-follows-vcs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.who-follows-label-small {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.who-follows-vc-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.who-follows-vc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--color-primary-light);
  border: 1px solid #f9a8b4;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-primary);
}

/* VC Filter Dropdown (Follows tab) */
.follows-vc-filter {
  min-width: 200px;
}

/* Flag Pill */
.flag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.flag-pill svg {
  width: 12px;
  height: 12px;
}

/* Flag Column Cell */
.flag-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  height: 100%;
}

.flag-cell svg {
  width: 20px;
  height: 20px;
  transition: all 0.15s;
}

.flag-cell .flag-outline {
  color: #9ca3af;
  fill: #f3f4f6;
  stroke: #9ca3af;
}

.flag-cell:hover .flag-outline {
  color: #f9a8b4;
  fill: var(--color-primary-light);
  stroke: #f9a8b4;
}

.flag-cell .flag-filled {
  color: var(--color-primary);
}

.flag-cell:hover .flag-filled {
  color: var(--color-primary-hover);
}

/* ============================================
   People Search Tab - Overrides for screen.css
   ============================================ */

/* Collapsible section headers (people-specific) */
.section-header.collapsible {
  cursor: pointer;
  user-select: none;
}

.section-header.collapsible:hover h3 {
  color: var(--color-text-primary);
}

.section-header.collapsible svg {
  transition: transform 0.15s;
}

.section-header.collapsible.collapsed svg {
  transform: rotate(-90deg);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-group.collapsed,
.collapsible-body.collapsed {
  display: none;
}

/* Search results header (people-specific bar above grid) */
.search-results-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  min-height: 40px;
}

.search-results-count {
  font-size: 13px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.search-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--color-primary-light);
  border: 1px solid #f9a8b4;
  border-radius: 12px;
  font-size: 11px;
  color: var(--color-primary);
  white-space: nowrap;
}

.active-filter-tag button {
  border: none;
  background: none;
  color: var(--color-primary);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.active-filter-tag button:hover {
  color: var(--color-primary-hover);
}

/* AI Search Toolbar (matches company screener) */
.search-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--color-primary-light);
  border-bottom: 1px solid #f5c6cb;
  flex-shrink: 0;
}

.search-toolbar-ai {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 3;
  min-width: 0;
}

.search-toolbar-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.search-toolbar-text {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.search-toolbar-text .filter-input {
  font-size: 12px;
  height: 34px;
}

/* AI search button loading state */
.ai-search-btn.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Tag badges in grid */
.tag-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  margin-right: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
}

.tag-badge.bg { background: #ccfbf1; color: #115e59; }
.tag-badge.list { background: #ccfbf1; color: #115e59; }
.tag-badge.edu { background: #fef3c7; color: #92400e; }
.tag-badge.founder { background: #dcfce7; color: #166534; }
.tag-badge.mil { background: #f3f4f6; color: #4b5563; }

/* Loading state for search grid */
.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: #6b7280;
  font-size: 14px;
}

/* Bulk Actions Toolbar */
.bulk-actions-toolbar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: #1f2937;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 100;
  font-size: 13px;
}

.bulk-actions-toolbar.hidden { display: none; }

.bulk-actions-toolbar .bulk-count {
  font-weight: 500;
}

.bulk-actions-toolbar .btn-sm {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.bulk-actions-toolbar .btn-sm:hover {
  background: rgba(255,255,255,0.1);
}

/* Column checkbox in column picker */
.column-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
}

.column-checkbox:hover {
  background: var(--color-bg-secondary, #f3f4f6);
}

.column-checkbox.pinned {
  opacity: 0.5;
  cursor: default;
}

/* Excluded chip state (three-state cycling: off -> include -> exclude) */
.quick-filter-chip.excluded {
  background: #fff;
  border: 1.5px dashed #dc2626;
  color: #dc2626;
  text-decoration: line-through;
}

.quick-filter-chip.excluded:hover {
  background: #fef2f2;
}

/* Excluded active filter pill */
.active-filter-tag.excluded {
  background: #fef2f2;
  border-color: #dc2626;
  color: #dc2626;
  text-decoration: line-through;
}

.active-filter-tag.excluded button {
  color: #dc2626;
}

.active-filter-tag.excluded button:hover {
  color: #991b1b;
}

/* Title keyword filter section */
.title-keyword-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.title-keyword-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.title-keyword-picker .filter-input {
  flex: 1;
  min-width: 120px;
  font-size: 12px;
}

.title-keyword-chips {
  display: contents;
}

.title-keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  white-space: nowrap;
}

.title-keyword-chip.include {
  background: var(--color-primary-light);
  border: 1px solid #f9a8b4;
  color: var(--color-primary);
}

.title-keyword-chip.exclude {
  background: #fef2f2;
  border: 1px dashed #dc2626;
  color: #dc2626;
  text-decoration: line-through;
}

.title-keyword-chip button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  color: inherit;
}

.title-keyword-chip button:hover {
  opacity: 0.7;
}

/* Logic connector (clickable or/and between same-type chips) */
.logic-connector {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 8px;
  user-select: none;
  transition: all 0.15s;
  line-height: 1;
}

.logic-connector:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

/* ============================================
   Condition Groups
   ============================================ */
.condition-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.group-paren {
  font-size: 16px;
  font-weight: 600;
  color: #9ca3af;
  line-height: 1;
}

.group-connector {
  font-size: 11px;
  font-weight: 600;
  color: #6366f1;
  padding: 2px 8px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
  line-height: 1;
}

.group-connector:hover {
  background: #eef2ff;
  color: #4f46e5;
}

.add-group-link {
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  user-select: none;
  white-space: nowrap;
}

.add-group-link:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.active-group-indicator {
  font-size: 11px;
  color: #6b7280;
  padding: 4px 8px;
  background: #f3f4f6;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
}

.active-group-indicator:hover {
  background: #e5e7eb;
}

/* Active saved view item */
.saved-view-item.active {
  border-color: var(--color-primary, #C41230);
  background: var(--color-primary-light, #fde8eb);
}

/* ==================== INVESTOR FIT PANEL ==================== */

.investor-fit-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 560px;
  height: 100vh;
  background: var(--color-bg, #fff);
  border-left: 1px solid var(--color-border, #e5e7eb);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.investor-fit-panel.open {
  transform: translateX(0);
}

.investor-fit-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  flex-shrink: 0;
}

.investor-fit-panel-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text, #111827);
}

.investor-fit-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.investor-fit-panel-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--color-text-muted, #6b7280);
  padding: 4px;
  line-height: 1;
}

.investor-fit-panel-close:hover {
  color: var(--color-text, #111827);
}

.investor-fit-panel-regenerate {
  background: none;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 4px;
  cursor: pointer;
  color: var(--color-text-muted, #6b7280);
  padding: 4px 6px;
  display: flex;
  align-items: center;
}

.investor-fit-panel-regenerate:hover {
  color: var(--color-text, #111827);
  border-color: var(--color-text-muted, #9ca3af);
}

.investor-fit-agent-dots {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.investor-fit-panel-status {
  padding: 8px 20px;
  font-size: 12px;
  color: var(--color-text-muted, #6b7280);
  flex-shrink: 0;
}

.investor-fit-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text, #111827);
}

.investor-fit-panel-content h1,
.investor-fit-panel-content h2,
.investor-fit-panel-content h3 {
  margin: 16px 0 8px 0;
  color: var(--color-text, #111827);
}

.investor-fit-panel-content h1 { font-size: 18px; }
.investor-fit-panel-content h2 { font-size: 15px; }
.investor-fit-panel-content h3 { font-size: 13px; }

.investor-fit-panel-content p {
  margin: 8px 0;
}

.investor-fit-panel-content ul, .investor-fit-panel-content ol {
  margin: 8px 0;
  padding-left: 20px;
}

.investor-fit-panel-content li {
  margin: 4px 0;
}

.investor-fit-panel-content strong {
  font-weight: 600;
}

.investor-fit-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--color-border, #e5e7eb);
  flex-shrink: 0;
}

.investor-fit-panel-meta {
  font-size: 11px;
  color: var(--color-text-muted, #6b7280);
}

/* Score button in grid */
.score-btn-investor-fit {
  background: none;
  border: 1px solid var(--color-border, #d1d5db);
  border-radius: 4px;
  color: var(--color-text-muted, #6b7280);
  font-size: 11px;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.score-btn-investor-fit:hover {
  border-color: var(--color-primary, #C41230);
  color: var(--color-primary, #C41230);
}

/* Score cell container */
.score-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Score badges (reuse from screen.css pattern) */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s;
  letter-spacing: 0.3px;
  line-height: 1.4;
}

.score-badge:hover {
  opacity: 0.8;
}

.score-a   { background: #dbeafe; color: #1e40af; }
.score-bplus { background: #e0e7ff; color: #3730a3; }
.score-b   { background: #fef3c7; color: #92400e; }
.score-c   { background: #fee2e2; color: #991b1b; }

/* Agent dots (reuse pattern) */
.score-agent-dot {
  display: flex;
  align-items: center;
  gap: 4px;
}

.score-agent-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.score-agent-indicator.pending {
  background: var(--color-border, #d1d5db);
  animation: pulse 1.5s ease-in-out infinite;
}

.score-agent-indicator.success {
  background: #22c55e;
}

.score-agent-indicator.error {
  background: #ef4444;
}

.score-agent-label {
  font-size: 11px;
  color: var(--color-text-muted, #6b7280);
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Focus Area Tags */
.focus-area-tag {
  display: inline-block;
  padding: 1px 6px;
  margin: 1px 2px;
  background: rgba(196, 18, 48, 0.10);
  color: #C41230;
  border: 1px solid rgba(196, 18, 48, 0.20);
  font-size: 10px;
  font-weight: 500;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.4;
}

/* User-Added Tags (Notable Deals + Focus Areas) */
.notable-deal-user,
.focus-area-user {
  background: rgba(59, 130, 246, 0.10);
  color: #3b82f6;
  border: 1px dashed rgba(59, 130, 246, 0.35);
}

.notable-deal-add-btn,
.focus-area-add-btn {
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  background: transparent;
  border: 1px dashed #ccc;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  vertical-align: middle;
}
.notable-deal-add-btn:hover,
.focus-area-add-btn:hover {
  color: #3b82f6;
  border-color: #3b82f6;
}

.tag-popup-remove {
  cursor: pointer;
  margin-left: 3px;
  font-size: 12px;
  opacity: 0.6;
}
.tag-popup-remove:hover {
  opacity: 1;
}

/* Notable Deals Popup */
.notable-deals-popup {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 12px;
  min-width: 260px;
  max-width: 360px;
  font-size: 12px;
}
.notable-deals-popup-header {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
  color: #1a1a2e;
}
.notable-deals-popup-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 4px;
}
.notable-deals-popup-section {
  margin-bottom: 8px;
}
.notable-deals-popup-input-row {
  display: flex;
  gap: 6px;
}
.notable-deals-popup-input {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
}
.notable-deals-popup-input:focus {
  border-color: #3b82f6;
}
.notable-deals-popup-add-btn {
  padding: 4px 10px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.notable-deals-popup-add-btn:hover {
  background: #2563eb;
}

/* Batch Progress Toast */
.batch-progress-toast {
  background: #1a1a2e;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  min-width: 220px;
  transition: opacity 0.3s;
}

.batch-progress-text {
  margin-bottom: 6px;
}

.batch-progress-bar-bg {
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
}

.batch-progress-bar-fill {
  height: 100%;
  background: var(--color-primary, #C41230);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ============================================
   Column Filter Row (inline filters)
   ============================================ */
.column-filter-row {
  display: flex;
  background: var(--color-bg-secondary, #16162a);
  border-bottom: 1px solid var(--color-border, #2d2d4a);
  overflow: hidden;
  flex-shrink: 0;
  height: 30px;
}
.column-filter-row.hidden {
  display: none;
  height: 0;
}
.col-filter-cell {
  flex-shrink: 0;
  padding: 3px 4px;
  box-sizing: border-box;
  border-right: 1px solid var(--color-border-light, #23233a);
}
.col-filter-input {
  width: 100%;
  height: 24px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  border: 1px solid var(--color-border, #2d2d4a);
  border-radius: 3px;
  background: var(--color-bg, #0f0f1e);
  color: var(--color-text-primary, #e0e0e0);
  transition: border-color 0.15s;
}
.col-filter-input:focus {
  outline: none;
  border-color: var(--color-primary, #C41230);
  box-shadow: 0 0 0 2px rgba(196, 18, 48, 0.15);
}
.col-filter-input::placeholder {
  color: var(--color-text-muted, #6b7280);
  font-size: 10px;
}
.col-filter-input.has-value {
  border-color: var(--color-primary, #C41230);
  background: rgba(196, 18, 48, 0.08);
  font-weight: 500;
}
.btn-icon.filter-active {
  background: rgba(196, 18, 48, 0.15);
  border-color: var(--color-primary, #C41230);
  color: var(--color-primary, #C41230);
}

/* ============================================
   Manual/Editable People Rows
   ============================================ */
.manual-row { background-color: #fafbff !important; }
.manual-row:hover { background-color: #f0f4ff !important; }
.manual-row .ag-cell:first-child {
  border-left: 3px solid #4a90d9;
}

/* Editing indicator */
.ag-cell.ag-cell-inline-editing {
  border: 2px solid #4a90d9 !important;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(74, 144, 217, 0.3);
}

/* Generic small button (if not already loaded from screen.css) */
.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  cursor: pointer;
}
.btn-sm:hover { background: #f3f4f6; }

/* Add Person Button */
.btn-add-person {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  border: 1px solid var(--color-primary, #C41230);
  background: var(--color-primary-light, #fde8eb);
  color: var(--color-primary, #C41230);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-add-person:hover {
  background: var(--color-primary, #C41230);
  color: #fff;
}

/* Add Person Panel */
.add-person-panel {
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.add-person-panel.hidden { display: none; }

.add-person-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.add-person-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.add-person-or {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}

.btn-close-panel {
  margin-left: auto;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
  padding: 2px 8px;
  cursor: pointer;
  color: #6b7280;
}
.btn-close-panel:hover { color: #111; border-color: #999; }

/* Typeahead dropdown */
.add-person-typeahead {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-height: 200px;
  overflow-y: auto;
}
.add-person-typeahead.hidden { display: none; }

.typeahead-item {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}
.typeahead-item:hover { background: #f0f4ff; }
.typeahead-item:last-child { border-bottom: none; }

.typeahead-detail {
  font-size: 11px;
  color: #6b7280;
}

.typeahead-empty {
  padding: 8px 12px;
  font-size: 12px;
  color: #9ca3af;
}

/* Freeform entry */
.add-person-freeform {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.add-person-freeform.hidden { display: none; }

.btn-primary {
  background: var(--color-primary, #C41230);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.btn-primary:hover { background: var(--color-primary-hover, #a30f28); }

/* Filter Actions */
.filter-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  position: sticky;
  bottom: 0;
  background: var(--color-bg, #fff);
  border-top: 1px solid var(--color-border, #e5e7eb);
  z-index: 5;
}
.filter-actions .btn-primary {
  flex: 1;
}
.filter-actions .btn-secondary {
  flex: 0;
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 12px;
}
#ps-apply.filters-dirty {
  animation: pulse-apply 1.5s ease-in-out 1;
}
@keyframes pulse-apply {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.3); }
}

/* Role Picker — dropdown to switch active role */
.role-picker-btn {
  display: inline-block;
  font-size: 10px;
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 6px;
  cursor: pointer;
  vertical-align: middle;
}
.role-picker-btn:hover {
  background: #e5e7eb;
  color: #374151;
}
.role-picker-dropdown {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 280px;
  max-width: 400px;
  max-height: 300px;
  overflow-y: auto;
  padding: 4px 0;
}
.role-picker-item {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
}
.role-picker-item:last-child { border-bottom: none; }
.role-picker-item:hover { background: #f9fafb; }
.role-picker-current {
  background: #eff6ff;
}
.role-picker-current:hover { background: #dbeafe; }
.role-picker-title {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
}
.role-picker-company {
  font-size: 11px;
  color: #6b7280;
  margin-top: 1px;
}

/* ============================================
   Granular List Sharing
   ============================================ */
.share-radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.share-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  color: #374151;
}

.share-radio-label input[type="radio"] {
  margin: 0;
  accent-color: var(--color-primary, #C41230);
}

.share-custom-section {
  margin-top: 8px;
  padding: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.share-custom-section.hidden {
  display: none;
}

.share-teams {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}

.share-teams .checkbox-label {
  font-size: 13px;
}

.share-users-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 8px;
}

.share-users-add {
  display: flex;
  gap: 6px;
  align-items: center;
}

.share-users-add .filter-input {
  flex: 1;
  font-size: 12px;
}

.share-users-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.share-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--color-primary-light, #fde8eb);
  border: 1px solid #f9a8b4;
  border-radius: 12px;
  font-size: 11px;
  color: var(--color-primary, #C41230);
}

.share-user-chip button {
  border: none;
  background: none;
  color: var(--color-primary, #C41230);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.share-user-chip button:hover {
  color: var(--color-primary-hover, #a30f28);
}

/* Share icons in sidebar list */
.share-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  color: #9ca3af;
  vertical-align: middle;
}

.share-icon.everyone { color: #6b7280; }
.share-icon.team { color: #3b82f6; }
.share-icon.custom { color: #8b5cf6; }

/* Set filter styles are now injected dynamically by ag-grid-utils.js */
