/* Companies Research - Shared Styles */
:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --bg: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-secondary);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 30px 0;
  margin-bottom: 30px;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

.header .subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-top: 4px;
}

.header nav a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  opacity: 0.85;
  transition: opacity 0.2s;
  font-size: 0.9rem;
}

.header nav a:hover { opacity: 1; }

.breadcrumb {
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--text);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Company Grid */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.company-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.company-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.company-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}

.company-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--bg-secondary);
  padding: 4px;
  flex-shrink: 0;
}

.company-header h3 {
  font-size: 1.15rem;
  margin: 0;
}

.company-header .tagline {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.company-body {
  padding: 20px;
}

.company-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.meta-tag.funding { background: #ecfdf5; color: #065f46; }
.meta-tag.team { background: #eff6ff; color: #1e40af; }
.meta-tag.stage { background: #fef3c7; color: #92400e; }

/* People Section */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.person-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 10px;
  align-items: flex-start;
}

.person-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
}

.person-info h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.person-info .role {
  font-size: 0.8rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.person-info .bio {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.person-links {
  margin-top: 6px;
}

.person-links a {
  font-size: 0.75rem;
  color: var(--primary);
  text-decoration: none;
  margin-right: 10px;
}

.person-links a:hover { text-decoration: underline; }

/* Ratings */
.rating-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.rating-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  min-width: 80px;
}

.rating-dots {
  display: flex;
  gap: 3px;
}

.rating-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.rating-dot.filled { background: var(--primary); }
.rating-dot.filled.high { background: var(--success); }
.rating-dot.filled.mid { background: var(--warning); }
.rating-dot.filled.low { background: var(--danger); }

/* Tracking */
.tracking-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.tracking-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.tracking-row label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-width: 100px;
}

.tracking-select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  background: var(--bg);
  cursor: pointer;
}

.tracking-select:focus {
  border-color: var(--primary);
  outline: none;
}

.tracking-notes {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}

.tracking-notes:focus {
  border-color: var(--primary);
  outline: none;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.not-started { background: #f3f4f6; color: #6b7280; }
.status-badge.researching { background: #dbeafe; color: #1e40af; }
.status-badge.interested { background: #d1fae5; color: #065f46; }
.status-badge.applied { background: #fef3c7; color: #92400e; }
.status-badge.interviewing { background: #ede9fe; color: #5b21b6; }
.status-badge.offer { background: #d1fae5; color: #065f46; }
.status-badge.rejected { background: #fee2e2; color: #991b1b; }
.status-badge.passed { background: #f3f4f6; color: #6b7280; }

/* Sections */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Dashboard Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Category Links */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.category-link {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.2s;
}

.category-link:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

.category-link .emoji {
  font-size: 2rem;
  margin-bottom: 10px;
}

.category-link h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.category-link p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.category-link .count {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 10px;
  background: var(--bg-secondary);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

/* Priority Badge */
.priority-badge {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  background: var(--primary);
  margin-right: 6px;
}

/* Expandable Sections */
.expandable-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: background 0.2s;
}

.expandable-header:hover {
  background: #eef0f2;
}

.expandable-header .arrow {
  transition: transform 0.2s;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.expandable-header.open .arrow {
  transform: rotate(90deg);
}

.expandable-content {
  display: none;
  padding: 16px 20px;
}

.expandable-content.open {
  display: block;
}

/* Requirements List */
.requirements-list {
  list-style: none;
  padding: 0;
}

.requirements-list li {
  padding: 6px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
}

.requirements-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .company-grid {
    grid-template-columns: 1fr;
  }

  .people-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Reject Button */
.reject-btn {
  background: none;
  border: none;
  color: #d1d5db;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}

.reject-btn:hover {
  color: var(--danger);
  background: #fee2e2;
}

/* Restore Button */
.restore-btn {
  background: none;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 3px 10px;
  border-radius: 20px;
  transition: all 0.2s;
  font-weight: 500;
  white-space: nowrap;
}

.restore-btn:hover {
  background: var(--primary);
  color: white;
}

/* Archived Section */
.archived-section {
  margin-top: 40px;
  border-top: 2px solid var(--border);
  padding-top: 20px;
}

.archived-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #f3f4f6;
  border-radius: 10px;
  margin-bottom: 8px;
  transition: background 0.2s;
  user-select: none;
}

.archived-header:hover {
  background: #e5e7eb;
}

.archived-header h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.archived-header .arrow {
  transition: transform 0.2s;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.archived-header.open .arrow {
  transform: rotate(90deg);
}

.archived-content {
  display: none;
}

.archived-content.open {
  display: block;
}

.archived-section .pipeline-table {
  opacity: 0.55;
}

.archived-section .pipeline-table tr:hover {
  opacity: 1;
}

.archived-section .pipeline-table td {
  color: var(--text-secondary);
}

/* Bay Area Tags */
.bay-area-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  background: #d1fae5;
  color: #065f46;
  margin-left: 6px;
  white-space: nowrap;
  vertical-align: middle;
}

.not-bay-area-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  background: #fee2e2;
  color: #991b1b;
  margin-left: 6px;
  white-space: nowrap;
  vertical-align: middle;
}

/* Bay Area Filter Button Active State */
.filter-btn.bay-area-filter {
  border-color: #10b981;
  color: #065f46;
}

.filter-btn.bay-area-filter.active {
  background: #d1fae5;
  border-color: #10b981;
  color: #065f46;
}

/* Compensation Input */
.comp-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 4px;
  font-size: 0.82rem;
  font-family: inherit;
  border-radius: 4px;
  min-width: 100px;
}

.comp-input:focus {
  border-color: var(--primary);
  background: white;
  outline: none;
}

/* Print */
@media print {
  .tracking-section { display: none; }
  .header { background: var(--primary) !important; }
}
