/* YC Batch Explorer */

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
}

.yc-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding-top: 48px;
  overflow: hidden;
  background: #f9fafb;
}

/* Toolbar */
.yc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.yc-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.yc-toolbar-left h1 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.batch-select {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  background: #fff;
  cursor: pointer;
  min-width: 140px;
}

.batch-select:focus {
  outline: none;
  border-color: #C41230;
  box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.1);
}

.yc-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
}

.search-box:focus-within {
  border-color: #C41230;
  box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.1);
}

.search-box svg {
  color: #9ca3af;
  flex-shrink: 0;
}

.search-input {
  border: none;
  outline: none;
  font-size: 13px;
  color: #111827;
  background: transparent;
  width: 180px;
}

.search-input::placeholder {
  color: #9ca3af;
}

/* Stats Cards */
.yc-stats {
  display: flex;
  gap: 12px;
  padding: 12px 24px;
  overflow-x: auto;
}

.stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 100px;
}

.stat-clickable {
  cursor: pointer;
  transition: all 0.15s;
}

.stat-clickable:hover {
  border-color: #C41230;
  box-shadow: 0 1px 4px rgba(196, 18, 48, 0.1);
}

.stat-clickable.stat-active {
  border-color: #C41230;
  background: #fef2f4;
  box-shadow: 0 0 0 2px rgba(196, 18, 48, 0.15);
}

.stat-card-wide {
  flex: 1;
  min-width: 200px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  margin-top: 2px;
}

.stat-industries {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.industry-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  background: #f3f4f6;
  color: #374151;
}

.industry-pill .industry-count {
  color: #9ca3af;
  font-weight: 400;
}

/* Tabs */
.yc-tabs {
  display: flex;
  gap: 0;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.yc-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.yc-tab:hover {
  color: #111827;
}

.yc-tab.active {
  color: #C41230;
  border-bottom-color: #C41230;
}

.yc-tab svg {
  opacity: 0.6;
}

.yc-tab.active svg {
  opacity: 1;
}

.tab-count {
  font-size: 11px;
  font-weight: 400;
  color: #9ca3af;
  margin-left: 2px;
}

.yc-tab.active .tab-count {
  color: #C41230;
}

/* Grid Container */
.yc-grid-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.yc-grid-container .yc-grid {
  flex: 1;
  min-height: 0;
}

.yc-grid-container.hidden {
  display: none;
}

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

/* Hide AG Grid multi-sort order numbers in headers */
.yc-grid .ag-sort-order {
  display: none;
}

/* Garry's Picks */
.garry-star {
  color: #f59e0b;
  font-size: 16px;
  line-height: 1;
  display: inline-block;
}

.picks-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
}

.picks-toggle:hover {
  border-color: #f59e0b;
  color: #111827;
}

.picks-toggle.active {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
}

.picks-toggle-star {
  color: #f59e0b;
  font-size: 14px;
}

.stat-value-picks {
  color: #b45309;
}

/* Social icon links */
.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.social-icon-link:hover {
  opacity: 1;
}

/* VC follower badges */
.vc-followers {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
}

.vc-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  background: #ede9fe;
  color: #6d28d9;
  white-space: nowrap;
}

/* Tag Badges in Grid */
.yc-tag-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  background: #fde8eb;
  color: #C41230;
  margin-right: 3px;
  margin-bottom: 1px;
  white-space: nowrap;
}

.yc-tag-badge.tag-education {
  background: #ede9fe;
  color: #6d28d9;
}

.yc-tag-badge.tag-fellowship {
  background: #e0f2fe;
  color: #0369a1;
}

.yc-tag-badge.tag-company {
  background: #ccfbf1;
  color: #115e59;
  cursor: default;
}

.badge-floating-tooltip {
  position: fixed;
  background: #1f2937;
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10000;
  pointer-events: none;
}

.yc-tag-badge.tag-founder {
  background: #d1fae5;
  color: #065f46;
}

/* Status badge in grid */
.status-active {
  color: #059669;
  font-weight: 500;
}

.status-acquired {
  color: #7c3aed;
  font-weight: 500;
}

.status-public {
  color: #2563eb;
  font-weight: 500;
}

.status-inactive {
  color: #9ca3af;
}

/* Attio CRM styles */
.attio-yes {
  color: #059669;
  font-weight: 500;
}

.stat-value-attio {
  color: #059669;
}

.stat-value-meetings {
  color: #2563eb;
}

.meeting-count {
  color: #2563eb;
  font-weight: 600;
}

.yc-meeting-count {
  color: #f97316;
  font-weight: 600;
}

/* Pipeline status */
.pipeline-omega,
.pipeline-early {
  font-size: 12px;
  font-weight: 500;
}

.pipeline-active {
  color: #059669;
}

.pipeline-pass {
  color: #9ca3af;
}

/* Connection strength */
.connection-strong {
  color: #059669;
  font-weight: 500;
}

.connection-good {
  color: #d97706;
  font-weight: 500;
}

.connection-weak {
  color: #9ca3af;
}

.next-meeting {
  color: #2563eb;
  font-style: italic;
}

/* Traction metrics */
.cell-positive {
  color: #059669;
}

.cell-negative {
  color: #dc2626;
}

/* Attribute filter bar */
.attr-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.attr-filter-bar.hidden {
  display: none;
}

.attr-filter-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin-right: 4px;
}

.attr-mode-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  min-width: 36px;
  border: 1px solid #6366f1;
  border-radius: 4px;
  background: #eef2ff;
  font-size: 11px;
  font-weight: 700;
  color: #4f46e5;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.5px;
}

.attr-mode-toggle:hover {
  background: #e0e7ff;
}

.attr-mode-toggle.mode-or {
  background: #fef3c7;
  border-color: #d97706;
  color: #b45309;
}

.attr-mode-toggle.mode-or:hover {
  background: #fde68a;
}

.attr-quick-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
}

.attr-quick-btn:hover {
  border-color: #C41230;
  color: #C41230;
}

.attr-quick-btn.active {
  background: #fde8eb;
  border-color: #C41230;
  color: #C41230;
}

.attr-filter-dropdown {
  position: relative;
}

.attr-dropdown-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
}

.attr-dropdown-btn:hover {
  border-color: #9ca3af;
  color: #374151;
}

.attr-filter-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 240px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  padding: 4px 0;
}

.attr-search-wrap {
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.attr-search-input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}

.attr-search-input:focus {
  border-color: #C41230;
  box-shadow: 0 0 0 2px rgba(196, 18, 48, 0.1);
}

.attr-group-header {
  padding: 6px 12px 2px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9ca3af;
}

.attr-filter-menu.hidden {
  display: none;
}

.attr-menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  transition: background 0.1s;
}

.attr-menu-item:hover {
  background: #f3f4f6;
}

.attr-menu-item input[type="checkbox"] {
  accent-color: #C41230;
}

/* Column filter toggle button */
.btn-icon-yc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon-yc.btn-with-label {
  width: auto;
  padding: 0 10px;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
}

.btn-icon-yc:hover {
  border-color: #9ca3af;
  color: #374151;
}

.btn-icon-yc.filter-active {
  background: #fde8eb;
  border-color: #C41230;
  color: #C41230;
}

/* Column filter row (inline filters above grid) */
.yc-column-filter-row {
  display: flex;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  overflow: hidden;
}

.yc-column-filter-row.hidden {
  display: none;
  height: 0;
}

.yc-col-filter-cell {
  flex-shrink: 0;
  padding: 3px 4px;
  box-sizing: border-box;
}

.yc-col-filter-input {
  width: 100%;
  height: 24px;
  padding: 2px 6px;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  font-size: 11px;
  color: #374151;
  background: #fff;
  box-sizing: border-box;
}

.yc-col-filter-input:focus {
  outline: none;
  border-color: #C41230;
  box-shadow: 0 0 0 1px rgba(196, 18, 48, 0.15);
}

.yc-col-filter-input::placeholder {
  color: #9ca3af;
  font-size: 10px;
}

.yc-col-filter-input.has-value {
  border-color: #C41230;
  background: #fef2f4;
}

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

.flag-icon {
  opacity: 0.25;
  transition: opacity 0.15s, transform 0.1s;
}

.flag-cell:hover .flag-icon {
  opacity: 0.6;
  transform: scale(1.1);
}

.flag-icon.flag-active {
  opacity: 1;
  color: #C41230;
}

.flag-icon.flag-others {
  opacity: 0.7;
  color: #e88da0;
}

.flag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 700;
  background: #C41230;
  color: #fff;
  margin-left: 2px;
  padding: 0 3px;
  line-height: 1;
}

.stat-value-flagged {
  color: #C41230;
}

/* Review (checked) column */
.review-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.review-icon {
  opacity: 0.25;
  transition: opacity 0.15s, transform 0.1s;
  color: #6b7280;
}

.review-cell:hover .review-icon {
  opacity: 0.6;
  transform: scale(1.1);
}

.review-icon.review-active {
  opacity: 1;
  color: #059669;
}

.review-icon.review-others {
  opacity: 0.7;
  color: #6ee7b7;
}

.review-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 700;
  background: #059669;
  color: #fff;
  margin-left: 2px;
  padding: 0 3px;
  line-height: 1;
}

.stat-value-reviewed {
  color: #059669;
}

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

.yc-loading::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-top-color: #C41230;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== SET FILTER DROPDOWN ========== */

.set-filter-btn {
  width: 100%;
  height: 24px;
  padding: 2px 6px;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  font-size: 10px;
  color: #6b7280;
  background: #fff;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
  transition: all 0.15s;
}

.set-filter-btn:hover {
  border-color: #9ca3af;
  color: #374151;
}

.set-filter-btn.has-value {
  border-color: #C41230;
  background: #fef2f4;
  color: #C41230;
  font-weight: 500;
}

.set-filter-dropdown {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  min-width: 200px;
  max-width: 280px;
  overflow: hidden;
}

.set-filter-search-wrap {
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
}

.set-filter-search {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}

.set-filter-search:focus {
  border-color: #C41230;
  box-shadow: 0 0 0 2px rgba(196, 18, 48, 0.1);
}

.set-filter-actions {
  display: flex;
  gap: 12px;
  padding: 6px 10px;
  border-bottom: 1px solid #f3f4f6;
}

.set-filter-actions a {
  font-size: 11px;
  font-weight: 500;
  color: #C41230;
  text-decoration: none;
  cursor: pointer;
}

.set-filter-actions a:hover {
  text-decoration: underline;
}

.set-filter-list {
  max-height: 240px;
  overflow-y: auto;
  padding: 4px 0;
}

.set-filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  transition: background 0.1s;
}

.set-filter-item:hover {
  background: #f3f4f6;
}

.set-filter-item input[type="checkbox"] {
  accent-color: #C41230;
  flex-shrink: 0;
}

/* ========== BOOLEAN FILTER ========== */

.bool-filter-btn {
  width: 100%;
  height: 24px;
  padding: 2px 6px;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  font-size: 10px;
  color: #6b7280;
  background: #fff;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.15s;
  font-weight: 500;
}

.bool-filter-btn:hover {
  border-color: #9ca3af;
}

.bool-filter-btn.bool-filter-yes {
  border-color: #059669;
  background: #ecfdf5;
  color: #059669;
}

.bool-filter-btn.bool-filter-no {
  border-color: #dc2626;
  background: #fef2f2;
  color: #dc2626;
}

/* ========== FILTER BADGE + CLEAR ========== */

.btn-icon-yc {
  position: relative;
}

.filter-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  background: #C41230;
  color: #fff;
  padding: 0 4px;
  line-height: 1;
}

.filter-badge.hidden {
  display: none;
}

.filter-clear-link {
  font-size: 12px;
  font-weight: 500;
  color: #C41230;
  text-decoration: none;
  cursor: pointer;
}

.filter-clear-link:hover {
  text-decoration: underline;
}

.filter-clear-link.hidden {
  display: none;
}

/* ========== FILTER HINT TOOLTIP ========== */

.filter-hint {
  position: fixed;
  background: #1f2937;
  color: #d1d5db;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10001;
  pointer-events: none;
}

/* ========== SAVED VIEWS ========== */

.saved-views-container {
  position: relative;
}

.saved-views-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
}

.saved-views-btn:hover {
  border-color: #9ca3af;
  color: #374151;
}

.saved-views-btn svg {
  opacity: 0.6;
}

.saved-views-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  min-width: 220px;
  z-index: 1000;
  overflow: hidden;
}

.saved-views-menu.hidden {
  display: none;
}

.saved-views-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.saved-views-header a {
  font-size: 11px;
  font-weight: 500;
  color: #C41230;
  text-decoration: none;
}

.saved-views-header a:hover {
  text-decoration: underline;
}

.saved-views-empty {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
}

.saved-view-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  transition: background 0.1s;
}

.saved-view-item:hover {
  background: #f3f4f6;
}

.saved-view-name {
  font-size: 13px;
  color: #111827;
  cursor: pointer;
  flex: 1;
}

.saved-view-delete {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.15s;
}

.saved-view-delete:hover {
  color: #dc2626;
}

.saved-views-footer {
  padding: 8px 12px;
  border-top: 1px solid #e5e7eb;
}

.saved-views-footer a {
  font-size: 11px;
  color: #6b7280;
  text-decoration: none;
}

.saved-views-footer a:hover {
  color: #C41230;
  text-decoration: underline;
}

/* ========== CONTEXT MENU ========== */

.yc-context-menu {
  position: fixed;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 10000;
  min-width: 200px;
  padding: 4px 0;
}

.yc-context-menu.hidden {
  display: none;
}

.yc-ctx-item {
  padding: 8px 12px;
  font-size: 13px;
  color: #111827;
  cursor: pointer;
  transition: background 0.1s;
}

.yc-ctx-item:hover {
  background: #f3f4f6;
}

.yc-ctx-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

.yc-ctx-filter {
  color: #C41230;
  font-size: 12px;
}

.yc-ctx-flag-active {
  color: #C41230;
  font-weight: 500;
}

#yc-ctx-flag-icon {
  font-size: 14px;
}

/* ==================== RESEARCH PANEL ==================== */

.research-panel {
  position: fixed;
  top: 48px;
  right: 0;
  bottom: 0;
  width: 520px;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transform: translateX(0);
  transition: transform 0.25s ease;
}

.research-panel.hidden {
  transform: translateX(100%);
  pointer-events: none;
}

.research-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #fafafa;
  flex-shrink: 0;
}

.research-panel-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.research-panel-close {
  border: none;
  background: none;
  font-size: 22px;
  color: #6b7280;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  border-radius: 4px;
}

.research-panel-close:hover {
  color: #111827;
  background: #f3f4f6;
}

.research-panel-status {
  padding: 12px 20px;
  border-bottom: 1px solid #f3f4f6;
  flex-shrink: 0;
}

.research-panel-status.hidden {
  display: none;
}

.research-status-message {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}

.research-status-cached {
  font-size: 12px;
  color: #059669;
  font-weight: 500;
}

.research-status-complete {
  font-size: 12px;
  color: #059669;
  font-weight: 500;
}

.research-status-error {
  font-size: 12px;
  color: #dc2626;
  font-weight: 500;
}

/* Agent progress dots */
.research-agent-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-dot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #6b7280;
}

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

.agent-dot-indicator.pending {
  background: #d1d5db;
  animation: pulse-dot 1.5s infinite;
}

.agent-dot-indicator.success {
  background: #059669;
  animation: none;
}

.agent-dot-indicator.error {
  background: #dc2626;
  animation: none;
}

.agent-dot-label {
  white-space: nowrap;
}

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

/* Research content area */
.research-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
}

.research-panel-content h2 {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin: 20px 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #f3f4f6;
}

.research-panel-content h2:first-child {
  margin-top: 0;
}

.research-panel-content h3 {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin: 14px 0 6px 0;
}

.research-panel-content ul,
.research-panel-content ol {
  padding-left: 20px;
  margin: 6px 0;
}

.research-panel-content li {
  margin: 3px 0;
}

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

.research-panel-content strong {
  color: #111827;
}

.research-panel-content a {
  color: #C41230;
  text-decoration: none;
}

.research-panel-content a:hover {
  text-decoration: underline;
}

.research-panel-content code {
  background: #f3f4f6;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 12px;
}

.research-panel-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 13px;
}

.research-panel-content th,
.research-panel-content td {
  text-align: left;
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
}

.research-panel-content th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
}

.research-panel-content tr:nth-child(even) {
  background: #f9fafb;
}

.research-placeholder {
  text-align: center;
  color: #9ca3af;
  padding: 40px 20px;
  font-style: italic;
}

.research-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.5;
}

/* Metadata footer */
.research-metadata {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  font-size: 11px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.research-regenerate-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
}

.research-regenerate-btn:hover {
  border-color: #C41230;
  color: #C41230;
}

/* Research button in grid */
.research-btn {
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.15s;
  font-size: 14px;
}

.research-btn:hover {
  opacity: 1;
}

.research-done {
  cursor: pointer;
  opacity: 0.8;
  font-size: 14px;
}

.research-done:hover {
  opacity: 1;
}

.research-spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
  font-size: 14px;
  color: #C41230;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Batch research progress */
.batch-research-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
}

.batch-research-btn:hover {
  border-color: #C41230;
  color: #C41230;
}

.batch-research-btn.active {
  background: #fef2f4;
  border-color: #C41230;
  color: #C41230;
}

.batch-progress-text {
  font-size: 12px;
  color: #C41230;
  font-weight: 500;
}

/* Research score badges — grid cells */
.research-score {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.3px;
}

.research-score-aaa   { background: #dcfce7; color: #166534; } /* backward compat for cached AAA scores */
.research-score-a     { background: #dbeafe; color: #1e40af; }
.research-score-bplus { background: #e0e7ff; color: #3730a3; }
.research-score-b     { background: #fef3c7; color: #92400e; }
.research-score-c     { background: #fee2e2; color: #991b1b; }

/* Research score badges — panel header */
.research-score-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Column picker now uses shared modal from shared.css */
