/* TTC Prospect Engine - Brand Styles */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-input: #1a1a1a;
  --bg-hover: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #999999;
  --text-muted: #666666;
  --accent-red: #ff0000;
  --accent-red-dim: #cc0000;
  --border: #2a2a2a;
  --border-light: #333333;
  --success: #22c55e;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-height: 60px;
}

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

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* Login Screen */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; }

#login-screen {
  justify-content: center;
  align-items: center;
  background: var(--bg-primary);
}

.login-container {
  text-align: center;
  max-width: 360px;
  width: 100%;
  padding: 0 20px;
}

.login-logo {
  width: 80px;
  height: auto;
  margin-bottom: 24px;
  opacity: 0.9;
}

.login-container h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

.pin-input-group {
  display: flex;
  gap: 12px;
}

.pin-input-group input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 24px;
  font-family: var(--font);
  text-align: center;
  letter-spacing: 8px;
  padding: 12px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}

.pin-input-group input:focus {
  border-color: var(--accent-red);
}

.error-text {
  color: var(--accent-red);
  font-size: 13px;
  margin-top: 12px;
}

/* Buttons */
.btn {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--accent-red);
  color: white;
}

.btn-primary:hover { background: var(--accent-red-dim); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-sm {
  font-size: 11px;
  padding: 5px 12px;
}

/* Navigation */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  width: 36px;
  height: auto;
}

.nav-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.nav-center {
  display: flex;
  gap: 4px;
}

.nav-tab {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.nav-tab:hover { color: var(--text-secondary); }
.nav-tab.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

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

.user-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Views */
.view {
  display: none;
  padding: 32px 24px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - var(--nav-height));
}

.view.active { display: block; }

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.view-header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

/* Badges */
.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-creative {
  background: rgba(255, 0, 0, 0.15);
  color: var(--accent-red);
}

.badge-dev {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

/* Prospect Grid */
/* Dashboard Grid */
.prospect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

/* Prospect Cards */
.prospect-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--card-accent, var(--border));
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.prospect-card:hover {
  border-color: var(--border-light);
  border-left-color: var(--card-accent, var(--border-light));
  transform: translateY(-1px);
  background: var(--bg-hover);
}

/* Industry color coding */
.industry-golf { --card-accent: #22c55e; }
.industry-hospitality { --card-accent: #f59e0b; }
.industry-gaming { --card-accent: #a855f7; }
.industry-lifestyle { --card-accent: #f43f5e; }
.industry-adventure { --card-accent: #3b82f6; }
.industry-entertainment { --card-accent: #ec4899; }
.industry-technology { --card-accent: #06b6d4; }
.industry-sports { --card-accent: #22c55e; }
.industry-education { --card-accent: #6366f1; }
.industry-unknown { --card-accent: #666666; }

/* Industry tag */
.industry-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: color-mix(in srgb, var(--card-accent, #666) 15%, transparent);
  color: var(--card-accent, #666);
  white-space: nowrap;
}

.prospect-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.prospect-card-title {
  min-width: 0;
  flex: 1;
}

.prospect-card h3 {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prospect-card .domain {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Lane indicators */
.lane-indicators {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-top: 2px;
}

.lane-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.lane-dot.approved {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.15);
}

.lane-dot-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
}

.lane-dot.approved .lane-dot-label {
  color: var(--success);
}

.status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-researching { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.status-lanes { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-building { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.status-complete { background: rgba(34, 197, 94, 0.15); color: var(--success); }

.prospect-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.prospect-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Activity line */
.prospect-activity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

.activity-who {
  color: var(--text-secondary);
}

.activity-chats {
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 100%;
}

.modal-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-content > p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

/* Apollo Modal */
.apollo-modal {
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.modal-close-btn {
  font-size: 24px;
  line-height: 1;
  padding: 4px 8px;
  color: var(--text-muted);
}

.modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.modal-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-tab:hover { color: var(--text-secondary); }
.modal-tab.active {
  color: var(--accent-red);
  border-bottom-color: var(--accent-red);
}

.tab-panel.hidden { display: none; }

.tab-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.apollo-search-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.apollo-loading {
  text-align: center;
  padding: 32px 0;
}

.apollo-loading p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 12px;
}

.apollo-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

#apollo-result-count {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.apollo-result-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

.apollo-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.apollo-card:hover {
  border-color: var(--border-light);
  background: var(--bg-hover);
}

.apollo-card.selected {
  border-color: var(--accent-red);
  background: rgba(255, 0, 0, 0.05);
}

.apollo-card-check {
  padding-top: 2px;
  flex-shrink: 0;
}

.apollo-card-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-red);
  cursor: pointer;
}

.apollo-card-body {
  flex: 1;
  min-width: 0;
}

.apollo-card-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.apollo-card-meta-line {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.apollo-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
}

.apollo-results-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  padding: 10px 14px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-red);
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 120px 20px;
}

.loader {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

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

.loading-state h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.loading-state p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.progress-steps {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.progress-steps .step {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  padding-left: 20px;
}

.progress-steps .step::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.progress-steps .step.active::before {
  border-color: var(--accent-red);
  background: var(--accent-red);
}

.progress-steps .step.done::before {
  border-color: var(--success);
  background: var(--success);
}

.progress-steps .step.done { color: var(--success); }
.progress-steps .step.active { color: var(--accent-red); }

/* Research Grid */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.research-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.research-card.full-width {
  grid-column: 1 / -1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.card-body h4 {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.card-body h4:first-child { margin-top: 0; }

.card-body ul {
  list-style: none;
  padding: 0;
}

.card-body li {
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.card-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  background: var(--accent-red);
  border-radius: 50%;
}

/* Lighthouse Scores */
.lighthouse-scores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.score-ring {
  text-align: center;
}

.score-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 22px;
  font-weight: 800;
  border: 3px solid;
}

.score-circle.good { border-color: var(--success); color: var(--success); }
.score-circle.avg { border-color: var(--warning); color: var(--warning); }
.score-circle.poor { border-color: var(--accent-red); color: var(--accent-red); }

.score-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Core Web Vitals Grid */
.cwv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 8px 0 16px;
}

.cwv-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  text-align: center;
}

.cwv-value {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 2px;
}

.cwv-value.good { color: var(--success); }
.cwv-value.avg { color: var(--warning); }
.cwv-value.poor { color: var(--accent-red); }

.cwv-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cwv-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Resource Stats */
.resource-stats {
  display: flex;
  gap: 16px;
  margin: 8px 0 16px;
}

.resource-stat {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  text-align: center;
  flex: 1;
}

.resource-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.resource-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Competitor Comparison Table */
.comp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  font-size: 13px;
}

.comp-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 6px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.comp-table th:first-child { text-align: left; }

.comp-table td {
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.comp-name {
  text-align: left !important;
  font-weight: 600;
  color: var(--text-primary);
}

.comp-score {
  font-weight: 800;
  font-size: 14px;
}

.comp-score.good { color: var(--success); }
.comp-score.avg { color: var(--warning); }
.comp-score.poor { color: var(--accent-red); }

.comp-row-prospect {
  background: rgba(255, 0, 0, 0.05);
}

.comp-row-prospect .comp-name {
  color: var(--accent-red);
}

/* Lane Layout */
.lane-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 0;
  height: calc(100vh - var(--nav-height));
  margin: -32px -24px;
}

.lane-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lane-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.lane-header h2 {
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lane-owner {
  font-size: 14px;
  color: var(--accent-red);
  font-weight: 600;
  margin-top: 2px;
}

.lane-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.lane-status.approved {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.lane-nav, .presentation-nav {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.presentation-nav {
  justify-content: center;
  margin-bottom: 24px;
}

.lane-findings {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.lane-findings h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.lane-findings p,
.lane-findings li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.lane-findings ul {
  list-style: none;
  padding: 0;
}

.lane-findings li {
  padding: 4px 0 4px 14px;
  position: relative;
}

.lane-findings li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 5px;
  background: var(--accent-red);
  border-radius: 50%;
}

.lane-brief {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.lane-brief h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.brief-editor {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-primary);
  min-height: 100px;
  max-height: 200px;
  overflow-y: auto;
  outline: none;
}

.brief-editor:focus {
  border-color: var(--accent-red);
}

.brief-editor:empty::before {
  content: attr(placeholder);
  color: var(--text-muted);
}

.lane-actions {
  padding: 16px 24px;
  display: flex;
  gap: 8px;
}

/* Chat */
.lane-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.chat-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.chat-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.chat-header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.chat-msg {
  margin-bottom: 16px;
  max-width: 85%;
}

.chat-msg.user {
  margin-left: auto;
}

.chat-msg-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.chat-msg.user .chat-msg-header { color: var(--accent-red); text-align: right; }
.chat-msg.assistant .chat-msg-header { color: var(--info); }

.chat-msg-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.chat-msg.user .chat-msg-body {
  background: rgba(255, 0, 0, 0.08);
  border-color: rgba(255, 0, 0, 0.2);
}

.chat-msg-body p { margin-bottom: 8px; }
.chat-msg-body p:last-child { margin-bottom: 0; }

.chat-msg-body ul, .chat-msg-body ol {
  margin: 8px 0;
  padding-left: 20px;
}

.chat-msg-body li { margin-bottom: 4px; }

.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-input-area textarea {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: var(--radius);
  outline: none;
  resize: none;
  transition: border-color 0.2s;
}

.chat-input-area textarea:focus {
  border-color: var(--accent-red);
}

/* Approval Tracker */
.pending-state {
  text-align: center;
  padding: 80px 20px;
}

.pending-state h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.pending-state > p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.approval-tracker {
  max-width: 400px;
  margin: 0 auto 32px;
}

.approval-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.approval-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.approval-dot.pending { background: var(--warning); }
.approval-dot.approved { background: var(--success); }

.approval-status {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* Presentation Frame */
.presentation-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-height: 600px;
  padding: 40px;
}

/* Color Swatch */
.color-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.swatch {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  position: relative;
}

.swatch-label {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 2px;
}

/* Responsive */
@media (max-width: 1024px) {
  .research-grid { grid-template-columns: 1fr; }
  .lane-layout { grid-template-columns: 1fr; }
  .lane-sidebar { max-height: 40vh; }
}

@media (max-width: 768px) {
  .nav-center { display: none; }
  .prospect-grid { grid-template-columns: 1fr; }
  .lighthouse-scores { grid-template-columns: repeat(2, 1fr); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ---- Nav Tabs ---- */
.nav-center {
  display: flex;
  gap: 4px;
}
.nav-tab {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-tab:hover { color: var(--white); background: var(--card-bg); }
.nav-tab.active { color: var(--white); background: var(--card-bg); border-color: var(--border); }

/* ---- Pipeline View ---- */
.pipeline-actions {
  display: flex;
  gap: 10px;
}
.pipeline-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  margin-bottom: 24px;
  gap: 16px;
}
.pipeline-search {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 6px;
  outline: none;
  width: 240px;
  transition: border-color 0.2s;
}
.pipeline-search:focus { border-color: var(--accent-red); }
.pipeline-search::placeholder { color: var(--text-muted); }
.pipeline-tabs {
  display: flex;
  gap: 4px;
}
.pipeline-tab {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.pipeline-tab:hover { color: var(--white); border-color: var(--text-muted); }
.pipeline-tab.active { color: var(--white); background: var(--red); border-color: var(--red); }

/* Ready to Present section */
.ready-section {
  padding: 0 32px;
  margin-bottom: 28px;
}
.ready-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.ready-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}
.ready-title {
  font-size: 13px;
  font-weight: 600;
  color: #22c55e;
  letter-spacing: 0.03em;
}
.ready-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--bg);
  background: #22c55e;
  padding: 2px 8px;
  border-radius: 10px;
}
.ready-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.ready-card {
  background: var(--card);
  border: 1px solid #22c55e30;
  border-radius: 8px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 14px;
}
.ready-card:hover {
  border-color: #22c55e;
  background: #22c55e08;
}
.ready-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}
.ready-card-info {
  flex: 1;
  min-width: 0;
}
.ready-card-company {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ready-card-domain {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.ready-card-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}
.ready-card-score.score-red { color: #ff4444; background: #ff444415; }
.ready-card-score.score-amber { color: #f59e0b; background: #f59e0b15; }
.ready-card-score.score-green { color: #22c55e; background: #22c55e15; }

/* Green indicator on pipeline rows */
.row-ready {
  border-left: 3px solid #22c55e;
}
.ready-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #22c55e;
  background: #22c55e12;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 6px;
  letter-spacing: 0.02em;
}
.ready-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22c55e;
}

.pipeline-stats {
  display: flex;
  gap: 24px;
  padding: 0 32px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.pipeline-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 80px;
}
.pipeline-stat .stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  font-family: 'Inter', sans-serif;
}
.pipeline-stat .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pipeline-table-wrap {
  padding: 0 32px;
  overflow-x: auto;
}
.pipeline-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.pipeline-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  font-weight: 600;
}
.pipeline-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-dim);
  vertical-align: middle;
}
.pipeline-table tr:hover td { background: rgba(255,255,255,0.02); }
.pipeline-table tr:last-child td { border-bottom: none; }

.contact-name {
  display: block;
  font-weight: 600;
  color: var(--white);
  font-size: 14px;
}
.contact-owner {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.td-position {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-domain {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
}

/* Tier badges */
.tier-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tier-executive { background: rgba(255,0,0,0.15); color: #ff4444; }
.tier-vp { background: rgba(245,158,11,0.15); color: #f59e0b; }
.tier-director { background: rgba(99,102,241,0.15); color: #818cf8; }
.tier-senior_manager { background: rgba(34,197,94,0.15); color: #4ade80; }
.tier-manager { background: rgba(34,197,94,0.1); color: #22c55e; }
.tier-individual { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.tier-other, .tier-unknown { background: rgba(255,255,255,0.04); color: var(--text-muted); }

/* Audit status */
.audit-done {
  color: #22c55e;
  font-size: 12px;
  font-weight: 600;
}
.audit-pending {
  color: var(--text-muted);
  font-size: 12px;
}
.audit-none {
  color: rgba(255,255,255,0.15);
  font-size: 12px;
}

/* Presentation link */
.presentation-link {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
}
.presentation-link:hover { text-decoration: underline; }

/* Import modal extras */
.form-select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--white);
  font-size: 14px;
  appearance: none;
  cursor: pointer;
}
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.import-preview-text {
  font-size: 14px;
  color: var(--text-dim);
  padding: 12px 0;
}
.import-success {
  color: #22c55e;
  font-weight: 600;
}
.import-error {
  color: var(--red);
  font-weight: 600;
}
.tier-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* Score bands */
.band-header-row td { padding: 0 !important; border-bottom: none !important; }
.band-header-cell {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px !important; margin-top: 8px;
  border-left: 3px solid var(--text-dim);
  background: rgba(255,255,255,0.02);
}
.band-label {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px;
}
.band-count { font-size: 11px; color: var(--text-dim); }
.band-critical .band-header-cell { border-left-color: #ef4444; }
.band-critical .band-label { color: #ef4444; }
.band-poor .band-header-cell { border-left-color: #f97316; }
.band-poor .band-label { color: #f97316; }
.band-fair .band-header-cell { border-left-color: #f59e0b; }
.band-fair .band-label { color: #f59e0b; }
.band-ok .band-header-cell { border-left-color: #eab308; }
.band-ok .band-label { color: #eab308; }
.band-good .band-header-cell { border-left-color: #22c55e; }
.band-good .band-label { color: #22c55e; }
.band-great .band-header-cell { border-left-color: #10b981; }
.band-great .band-label { color: #10b981; }
.band-unaudited .band-header-cell { border-left-color: var(--text-dim); }
.band-unaudited .band-label { color: var(--text-dim); }
.band-more {
  text-align: center; font-size: 12px; color: var(--text-dim);
  padding: 12px; font-style: italic;
}

/* Avg score badge */
.avg-score {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 3px; margin-left: 6px;
  vertical-align: middle;
}
.avg-score.score-red { background: rgba(239,68,68,0.15); color: #ef4444; }
.avg-score.score-amber { background: rgba(245,158,11,0.15); color: #f59e0b; }
.avg-score.score-green { background: rgba(34,197,94,0.15); color: #22c55e; }

/* Action buttons */
.td-actions { display: flex; gap: 6px; align-items: center; }
.btn-sm {
  padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: 600;
  border: 1px solid var(--border); background: transparent; color: var(--text-primary);
  cursor: pointer; transition: all 0.15s; text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-sm:hover { background: rgba(255,255,255,0.06); }
.btn-sm:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-research { border-color: #f59e0b; color: #f59e0b; }
.btn-research:hover { background: rgba(245,158,11,0.1); }
.btn-view { border-color: var(--text-dim); color: var(--text-dim); }
.btn-view:hover { background: rgba(255,255,255,0.06); }
.btn-audit { border-color: #3b82f6; color: #3b82f6; }
.btn-audit:hover { background: rgba(59,130,246,0.1); }
.audit-running { animation: pulse-bg 2s ease-in-out infinite; }
@keyframes pulse-bg { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

/* Research modal */
.research-modal-content {
  max-width: 640px; max-height: 85vh; overflow-y: auto;
  padding: 32px; background: var(--bg-card); border-radius: 12px;
  border: 1px solid var(--border);
}
.research-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap;
}
.research-header h2 { font-size: 20px; font-weight: 700; margin: 0; }
.rec-badge {
  padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
}
.rec-pursue { background: rgba(34,197,94,0.15); color: #22c55e; }
.rec-skip { background: rgba(239,68,68,0.15); color: #ef4444; }
.rec-review { background: rgba(245,158,11,0.15); color: #f59e0b; }
.fit-score { font-size: 13px; color: var(--text-dim); font-weight: 600; }
.research-conflict {
  padding: 10px 14px; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  border-radius: 6px; color: #ef4444; font-size: 13px; margin-bottom: 16px;
}
.research-meta {
  font-size: 12px; color: var(--text-dim); margin-bottom: 20px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.research-section { margin-bottom: 20px; }
.research-section h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-dim); margin-bottom: 8px; font-weight: 600;
}
.research-section p { font-size: 14px; line-height: 1.6; color: var(--text-secondary); margin: 0; }
.research-list { list-style: none; padding: 0; margin: 0; }
.research-list li {
  font-size: 13px; color: var(--text-secondary); padding: 4px 0 4px 16px;
  position: relative; line-height: 1.5;
}
.research-list li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim);
}
.research-highlight {
  padding: 14px 16px; background: rgba(255,0,0,0.05);
  border: 1px solid rgba(255,0,0,0.15); border-radius: 8px;
}
.research-highlight h3 { color: #ff0000; }
.research-skip {
  padding: 14px 16px; background: rgba(239,68,68,0.05);
  border: 1px solid rgba(239,68,68,0.15); border-radius: 8px;
}
.research-pain {
  font-size: 12px; color: var(--text-dim); margin-top: 16px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.btn-close {
  display: block; width: 100%; margin-top: 24px; padding: 10px;
  background: transparent; border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-dim); font-size: 13px; cursor: pointer; text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-close:hover { background: rgba(255,255,255,0.04); }

/* Archive button */
.th-archive { width: 32px; }
.td-archive { width: 32px; padding: 8px 4px 8px 12px !important; }
.btn-archive {
  width: 22px; height: 22px; padding: 0; border: none;
  background: transparent; color: var(--text-muted);
  font-size: 12px; line-height: 22px; text-align: center;
  cursor: pointer; border-radius: 4px; transition: all 0.15s;
  opacity: 0;
}
.pipeline-table tr:hover .btn-archive { opacity: 1; }
.btn-archive:hover { background: rgba(239,68,68,0.15); color: #ef4444; }
.btn-archive:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-restore:hover { background: rgba(34,197,94,0.15); color: #22c55e; }

/* Archived tab */
.pipeline-tab-archived { margin-left: auto; }

/* Pipeline responsive */
@media (max-width: 768px) {
  .pipeline-tabs { padding: 0 16px; }
  .pipeline-stats { padding: 0 16px; }
  .pipeline-table-wrap { padding: 0 16px; }
  .pipeline-table th, .pipeline-table td { padding: 10px 10px; font-size: 12px; }
  .pipeline-actions { flex-direction: column; }
}