/* ── Reset & Base ─────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────────────── */
.header {
  background: white;
  color: #1a1a2e;
  padding: 16px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-bottom: 1px solid #e2e8f0;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* ── Navigation ─────────────────────────────────────────────────────── */
.header-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  color: #64748b;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.15s;
}

.nav-link:hover {
  color: #1a1a2e;
  background: #f1f5f9;
}

.nav-link.active {
  color: #273c75;
  background: #eef2ff;
  font-weight: 600;
}

/* ── Logo Image ─────────────────────────────────────────────────────── */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 32px;
  width: auto;
}

.header-badge {
  background: #273c75;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* ── Controls ────────────────────────────────────────────────────────── */
.controls {
  background: white;
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.controls-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-group label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.control-group select {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  min-width: 180px;
}

.control-group select:focus {
  outline: none;
  border-color: #273c75;
  box-shadow: 0 0 0 3px rgba(39, 60, 117, 0.1);
}

/* ── Generate Button ─────────────────────────────────────────────────── */
.btn-generate {
  background: #273c75;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
  height: 38px;
}

.btn-generate:hover {
  background: #1e3060;
}

.btn-generate:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.btn-generate.loading {
  background: #ea580c;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.generate-status {
  font-size: 13px;
  color: #64748b;
  padding: 8px 0;
}

.generate-status.success {
  color: #16a34a;
  font-weight: 600;
}

.generate-status.error {
  color: #dc2626;
  font-weight: 600;
}

/* ── Stats Bar ───────────────────────────────────────────────────────── */
.stats-bar {
  padding: 16px 24px;
}

.stats-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  text-align: center;
  position: relative;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
}

.stat-label {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ── Score Info Tooltip ──────────────────────────────────────────────── */
.info-icon {
  display: inline-block;
  cursor: pointer;
  font-size: 14px;
  color: #94a3b8;
  margin-left: 4px;
  vertical-align: middle;
  transition: colour 0.2s;
}

.info-icon:hover,
.info-icon:focus {
  color: #16a34a;
}

.stat-card-tooltip {
  position: relative;
}

.tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: white;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  width: 320px;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #1a1a2e;
}

.tooltip.visible {
  display: block;
}

.tooltip-hot { color: #4ade80; }
.tooltip-warm { color: #fb923c; }
.tooltip-cold { color: #f87171; }

/* ── Clickable High Scorers Stat ─────────────────────────────────────── */
.stat-card-clickable {
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
  border: 2px solid transparent;
}

.stat-card-clickable:hover {
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.15);
  border-color: #16a34a;
}

.stat-card-clickable.active {
  border-color: #16a34a;
  background: #f0fdf4;
}

.click-hint {
  display: block;
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
  color: #94a3b8;
  margin-top: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}

.stat-card-clickable:hover .click-hint {
  opacity: 1;
}


/* ── Certified Stat Tile ────────────────────────────────────────────── */
.stat-card-certified {
  border: 2px solid transparent;
}

.stat-card-certified .stat-value {
  color: #7c3aed;
}

.stat-card-certified.active {
  border-color: #7c3aed;
  background: #f5f3ff;
}

.stat-card-certified:hover {
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
  border-color: #7c3aed;
}

/* ── See All Links (stat tiles) ─────────────────────────────────────── */
.btn-see-all {
  display: block;
  margin: 6px auto 0;
  padding: 0;
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.btn-see-all:hover {
  color: #16a34a;
  background: none;
}

.stat-card-certified .btn-see-all:hover {
  color: #7c3aed;
}

/* ── Data Sources Section ────────────────────────────────────────────── */
.data-sources-section {
  padding: 0 24px 8px;
}

.data-sources-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.data-sources-toggle {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 16px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #64748b;
  transition: background 0.15s;
  text-align: left;
}

.data-sources-toggle:hover {
  background: #f8fafc;
}

.data-sources-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.data-sources-chevron {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.2s;
}

.data-sources-chevron.open {
  transform: rotate(180deg);
}

.data-sources-detail {
  background: white;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 12px 16px;
}

.data-sources-detail p {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
}

/* ── Tab Bar ─────────────────────────────────────────────────────────── */
.tab-bar {
  padding: 0 24px;
  background: white;
  border-bottom: 2px solid #e2e8f0;
}

.tab-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 0;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover {
  color: #273c75;
}

.tab-btn.active {
  color: #273c75;
  border-bottom-color: #273c75;
}

.pipeline-count-badge {
  background: #273c75;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

/* ── Pipeline Dropdown ───────────────────────────────────────────────── */
.pipeline-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 200;
  min-width: 180px;
  overflow: hidden;
}

.pipeline-dropdown button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  font-size: 13px;
  font-family: inherit;
  color: #1a1a2e;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.pipeline-dropdown button:hover {
  background: #f8fafc;
}

/* ── Pipeline View ───────────────────────────────────────────────────── */
.pipeline-stage {
  margin-bottom: 32px;
}

.pipeline-stage-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.pipeline-stage-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-meeting   { background: #2563eb; }
.dot-interested { background: #d97706; }
.dot-converted { background: #16a34a; }

.pipeline-stage-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
}

.pipeline-stage-count {
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 20px;
}

.pipeline-table {
  margin-bottom: 0;
}

.pipeline-cards {
  display: none;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 900px) {
  .pipeline-table {
    display: none !important;
  }
  .pipeline-cards {
    display: flex !important;
  }
}

/* Pipeline stage tag in table/modal */
.pipeline-stage-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}

.stage-tag-meeting    { background: #eff6ff; color: #2563eb; }
.stage-tag-interested { background: #fffbeb; color: #d97706; }
.stage-tag-converted  { background: #f0fdf4; color: #16a34a; }

/* ── Filter Bar ──────────────────────────────────────────────────────── */
.filter-bar {
  padding: 0 24px 12px;
}

.filter-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: white;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  font-size: 13px;
}

.filter-inner label {
  color: #64748b;
  font-weight: 500;
}

.filter-inner select,
.filter-inner input {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13px;
  background: white;
}

.filter-inner input[type="number"] {
  width: 60px;
}

.filter-inner input[type="text"] {
  width: 180px;
}

.btn-clear-filters {
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.15s;
}

.btn-clear-filters:hover {
  background: #f1f5f9;
  color: #1a1a2e;
}

/* ── Leads Section ───────────────────────────────────────────────────── */
.leads-section {
  padding: 0 24px 40px;
  max-width: 1448px;
  margin: 0 auto;
}

/* Loading */
.leads-loading {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.loader {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #16a34a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

.leads-empty {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 16px;
}

/* ── Desktop Table — Column Widths ───────────────────────────────────── */
.leads-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  table-layout: fixed;
}

.col-score    { width: 64px; }
.col-company  { width: 18%; }
.col-industry { width: 12%; }
.col-location { width: 9%; }
.col-contact  { width: 13%; }
.col-signal   { width: 18%; }
.col-hook     { width: auto; }  /* Takes remaining space */
.col-delete   { width: 36px; text-align: center; }

.leads-table thead th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.leads-table thead th.sortable:hover {
  background: #f1f5f9;
  color: #1a1a2e;
}

.leads-table thead th.sort-asc::after {
  content: " \25B2";
  font-size: 10px;
}

.leads-table thead th.sort-desc::after {
  content: " \25BC";
  font-size: 10px;
}

.leads-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s;
}

.leads-table tbody tr:hover {
  background: #f8fafc;
}

.leads-table tbody td {
  padding: 12px 16px;
  font-size: 13px;
  vertical-align: top;
  overflow: hidden;
}

.leads-table tbody td:first-child {
  text-align: left;
}

/* ── Score Badge ─────────────────────────────────────────────────────── */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  color: white;
}

.score-high {
  background: #16a34a;
}

.score-medium {
  background: #ea580c;
}

.score-low {
  background: #dc2626;
}

/* ── Company Cell ────────────────────────────────────────────────────── */
.company-name {
  font-weight: 600;
  color: #1a1a2e;
  display: block;
  font-size: 13px;
}

.company-website {
  font-size: 11px;
  color: #16a34a;
  text-decoration: none;
}

.company-website:hover {
  text-decoration: underline;
}

/* ── Contact Cell ────────────────────────────────────────────────────── */
.contact-name {
  font-weight: 500;
  display: block;
  font-size: 12px;
  line-height: 1.3;
}

.contact-email {
  font-size: 11px;
  color: #16a34a;
  text-decoration: none;
  word-break: break-all;
}

.contact-email:hover {
  text-decoration: underline;
}

.contact-needed {
  color: #94a3b8;
  font-style: italic;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.contact-needed-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1.5px solid #94a3b8;
  border-radius: 50%;
  text-align: center;
  line-height: 12px;
  font-size: 9px;
  font-style: normal;
  flex-shrink: 0;
}

.contact-title {
  font-size: 11px;
  color: #64748b;
  display: block;
  margin-top: 1px;
}

/* ── Enrich Button (Hunter.io) ──────────────────────────────────────── */
.enrich-btn {
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  color: #6366f1;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  font-family: inherit;
}

.enrich-btn:hover {
  background: #eef2ff;
  border-color: #6366f1;
}

/* ── Signal Tags ─────────────────────────────────────────────────────── */
.signal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.signal-tag {
  display: inline-block;
  background: #f0fdf4;
  color: #166534;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.signal-tag.cert-tag {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  font-weight: 600;
}

.signal-tag.job-tag {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  font-weight: 600;
}

/* ── Hook Text ───────────────────────────────────────────────────────── */
td .hook-text {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
}

td .hook-text strong {
  color: #1a1a2e;
}

/* ── Industry Tag ────────────────────────────────────────────────────── */
.industry-tag {
  background: #f1f5f9;
  color: #475569;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

/* ── Contacted Toggle (inline under company name) ────────────────────── */
.contacted-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  font-size: 10px;
  color: #94a3b8;
  cursor: pointer;
  background: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.contacted-toggle:hover {
  border-color: #16a34a;
  color: #16a34a;
  background: #f0fdf4;
}

.contacted-toggle.is-contacted {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #16a34a;
  font-weight: 600;
}

.contacted-toggle .tick {
  font-size: 11px;
}

/* ── Company Cell ───────────────────────────────────────────────────── */
.company-cell {
  display: block;
}

/* ── Delete Column Cell ─────────────────────────────────────────────── */
.col-delete-cell {
  text-align: center;
  vertical-align: middle;
  padding: 0 6px !important;
}

.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  color: #94a3b8;
  line-height: 1;
  flex-shrink: 0;
}

/* Delete button in modal — always visible, sits right-aligned */
.delete-modal-btn {
  color: #94a3b8 !important;
  border-color: #fecaca !important;
  opacity: 1 !important;
}

.delete-modal-btn:hover {
  color: #ef4444 !important;
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
}

tr:hover .delete-btn,
.lead-card:hover .delete-btn {
  opacity: 1;
}

.delete-btn:hover {
  color: #ef4444;
  background: #fef2f2;
  border-radius: 4px;
}

/* Mobile card delete btn — fixed to top-right of card header */
.delete-btn-card {
  opacity: 0.35;
  align-self: flex-start;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Action Button (used in modal and cards) ─────────────────────────── */
.action-btn {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.action-btn:hover {
  background: #f1f5f9;
  color: #1a1a2e;
  border-color: #cbd5e1;
}

.action-btn.contacted {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #16a34a;
}

/* ── Export Bar ───────────────────────────────────────────────────────── */
.export-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.btn-export {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-export:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #1a1a2e;
}

.export-count {
  font-size: 12px;
  color: #94a3b8;
}

/* ── Mobile Cards ────────────────────────────────────────────────────── */
.leads-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lead-card {
  background: white;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.lead-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.lead-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.lead-card-header .score-badge {
  width: 40px;
  height: 40px;
  font-size: 14px;
  flex-shrink: 0;
}

.lead-card-header .company-name {
  font-size: 16px;
}

.lead-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.lead-card-signal {
  margin-bottom: 6px;
}

.lead-card-hook {
  font-size: 13px;
  color: #16a34a;
  font-style: italic;
}

.lead-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

/* ── Modal ────────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #1a1a2e;
}

.modal-company-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.modal-section {
  margin-bottom: 16px;
}

.modal-section h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pencil-edit-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  opacity: 0.4;
  line-height: 1;
  transition: opacity 0.15s;
}
.pencil-edit-btn:hover {
  opacity: 1;
}

.modal-section p,
.modal-section a {
  font-size: 14px;
  color: #1a1a2e;
}

.modal-section a {
  color: #16a34a;
  text-decoration: none;
}

.modal-section a:hover {
  text-decoration: underline;
}

.modal-signal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-signal-tags .signal-tag {
  font-size: 12px;
  padding: 3px 10px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-notes-area {
  width: 100%;
  min-height: 60px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.modal-notes-area:focus {
  outline: none;
  border-color: #16a34a;
}

/* ── Utilities ───────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .leads-table {
    display: none !important;
  }

  .leads-cards:not(.hidden) {
    display: flex !important;
  }

  .filter-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-inner select,
  .filter-inner input[type="text"],
  .filter-inner input[type="number"] {
    width: 100%;
  }

  .controls-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .control-group select {
    min-width: unset;
    width: 100%;
  }

  .btn-generate {
    width: 100%;
    justify-content: center;
  }

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

  .tooltip {
    width: 260px;
    font-size: 11px;
  }

  .btn-clear-filters {
    margin-left: 0;
    width: 100%;
  }
}

@media (min-width: 901px) {
  .leads-cards {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   ANALYTICS & SEO PAGES
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Page Title Section ─────────────────────────────────────────────── */
.page-title-section {
  background: white;
  padding: 24px 24px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.page-title-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 14px;
  color: #64748b;
}

/* ── Loading & Error ────────────────────────────────────────────────── */
.analytics-loading {
  text-align: center;
  padding: 80px 20px;
  color: #64748b;
}

.analytics-error {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
}

.analytics-error p {
  background: #fef2f2;
  color: #dc2626;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid #fecaca;
}

/* ── Stat Card Explain Text ─────────────────────────────────────────── */
.stat-explain {
  font-size: 11px;
  color: #94a3b8;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.5;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  text-align: left;
}

/* ── Verdict Section ────────────────────────────────────────────────── */
.verdict-section {
  padding: 0 24px 16px;
}

.verdict-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.verdict-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: white;
}

.verdict-strong {
  border-color: #16a34a;
  background: #f0fdf4;
}

.verdict-good {
  border-color: #22c55e;
  background: #f0fdf4;
}

.verdict-moderate {
  border-color: #f59e0b;
  background: #fffbeb;
}

.verdict-low {
  border-color: #ef4444;
  background: #fef2f2;
}

.verdict-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.verdict-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.verdict-detail {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
}

/* ── Section Headings ───────────────────────────────────────────────── */
.section-heading {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 6px;
}

.section-subheading {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}

/* ── Insights Section ───────────────────────────────────────────────── */
.insights-section {
  padding: 0 24px 24px;
}

.insights-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.insight-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
}

.insight-card-highlight {
  border-color: #16a34a;
  background: #f0fdf4;
}

.insight-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.insight-icon {
  font-size: 20px;
  line-height: 1;
}

.insight-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.insight-value {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.insight-explain {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}

/* ── Explainer Section ──────────────────────────────────────────────── */
.explainer-section {
  padding: 0 24px 24px;
}

.explainer-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.explainer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.explainer-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
}

.explainer-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.explainer-card p {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
}

.explainer-card p strong {
  color: #1a1a2e;
}

/* ── Date Range Footer ──────────────────────────────────────────────── */
.date-range-section {
  padding: 0 24px 40px;
}

.date-range-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.date-range-label {
  font-size: 13px;
  color: #64748b;
}

.date-range-label span {
  color: #1a1a2e;
  font-weight: 500;
}

.date-range-source {
  font-size: 12px;
  color: #94a3b8;
}

/* ── Keywords Table ─────────────────────────────────────────────────── */
.keywords-section {
  padding: 0 24px 24px;
}

.keywords-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.keywords-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.keywords-table thead th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}

.keywords-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.keywords-table tbody tr:hover {
  background: #f8fafc;
}

.keywords-table tbody td {
  padding: 12px 16px;
  font-size: 13px;
  vertical-align: middle;
}

.kw-keyword {
  font-weight: 600;
  color: #1a1a2e;
}

.kw-clicks,
.kw-impressions {
  color: #475569;
}

/* Position Badges */
.pos-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.pos-top {
  background: #f0fdf4;
  color: #16a34a;
}

.pos-page1 {
  background: #eff6ff;
  color: #2563eb;
}

.pos-page2 {
  background: #fffbeb;
  color: #d97706;
}

.pos-deep {
  background: #f1f5f9;
  color: #64748b;
}

/* Opportunity Badges */
.opp-badge {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.opp-strong { color: #16a34a; }
.opp-good { color: #2563eb; }
.opp-quickwin { color: #d97706; font-weight: 600; }
.opp-potential { color: #7c3aed; }
.opp-monitor { color: #94a3b8; }

/* ── Responsive — Analytics/SEO Pages ───────────────────────────────── */
@media (max-width: 900px) {
  .header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .header-nav {
    gap: 2px;
  }

  .nav-link {
    font-size: 12px;
    padding: 4px 10px;
  }

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

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

  .date-range-inner {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  .keywords-table {
    font-size: 12px;
  }

  .keywords-table thead th,
  .keywords-table tbody td {
    padding: 8px 10px;
  }

  .verdict-card {
    flex-direction: column;
    gap: 8px;
  }

  .page-title {
    font-size: 18px;
  }

  .home-cards {
    grid-template-columns: 1fr !important;
  }

  .home-title {
    font-size: 22px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   HOMEPAGE
   ═══════════════════════════════════════════════════════════════════════ */

.home-hero {
  text-align: center;
  padding: 48px 24px 16px;
}

.home-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
}

.home-cards-section {
  padding: 0 24px 60px;
}

.home-cards {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.home-card {
  background: white;
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.home-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border-color: #cbd5e1;
}

.home-card-icon {
  font-size: 36px;
  margin-bottom: 12px;
  line-height: 1;
}

.home-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 10px;
}

.home-card-copy {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.home-card-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

.home-select {
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  width: 100%;
}

.home-select:focus {
  outline: none;
  border-color: #273c75;
  box-shadow: 0 0 0 3px rgba(39, 60, 117, 0.1);
}

.home-card-btn {
  display: inline-block;
  background: #273c75;
  color: white;
  text-decoration: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s;
  cursor: pointer;
  border: none;
}

.home-card-btn:hover {
  background: #1e3060;
}

/* ═══════════════════════════════════════════════════════════════════════
   TOP PAGES — Page Performance Section
   ═══════════════════════════════════════════════════════════════════════ */

.top-pages-section {
  padding: 0 24px 24px;
}

.top-pages-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.top-pages-loading {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}

.top-pages-empty {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-size: 14px;
}

.top-pages-error-msg {
  background: #fef2f2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid #fecaca;
}

/* ── Page Card ──────────────────────────────────────────────────────── */
.tp-card {
  background: white;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.2s;
}

.tp-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tp-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.tp-rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #273c75;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.tp-page-info {
  flex-grow: 1;
  min-width: 0;
}

.tp-page-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
}

.tp-page-path {
  font-size: 12px;
  color: #94a3b8;
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-views {
  font-size: 22px;
  font-weight: 700;
  color: #273c75;
  flex-shrink: 0;
  text-align: right;
}

.tp-views-label {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ── Metrics Row ──────────────────────────────────────────────────── */
.tp-metrics-row {
  display: flex;
  gap: 24px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 16px;
}

.tp-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tp-metric-label {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tp-metric-value {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
}

.tp-metric-good {
  color: #16a34a;
}

.tp-metric-bad {
  color: #dc2626;
}

/* ── Keywords Section ─────────────────────────────────────────────── */
.tp-keywords-section {
  margin-bottom: 12px;
}

.tp-keywords-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.tp-keywords-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tp-keyword {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: #f0f2f5;
  border-radius: 6px;
  font-size: 13px;
}

.tp-kw-query {
  font-weight: 600;
  color: #1a1a2e;
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-kw-stats {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
}

.tp-keyword .pos-badge {
  flex-shrink: 0;
}

.tp-no-keywords {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
  padding: 4px 0;
}

/* ── Insight ──────────────────────────────────────────────────────── */
.tp-insight {
  padding: 10px 14px;
  background: #eff6ff;
  border-radius: 6px;
  border-left: 3px solid #273c75;
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
}

.tp-insight-icon {
  margin-right: 4px;
}

/* ── Top Pages Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .tp-card-header {
    flex-wrap: wrap;
  }

  .tp-metrics-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .tp-metric {
    min-width: 80px;
  }

  .tp-keyword {
    flex-wrap: wrap;
    gap: 4px;
  }

  .tp-kw-query {
    width: 100%;
  }
}

/* ── Pipeline Toolbar ──────────────────────────────────────────────────── */
.pipeline-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  max-width: 1400px;
  margin: 0 auto 4px;
}

.pipeline-export-note {
  font-size: 12px;
  color: #94a3b8;
}

/* ── Kanban Board ──────────────────────────────────────────────────────── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 24px 40px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 900px) {
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .kanban-board { grid-template-columns: 1fr; }
}

/* ── Kanban Column ─────────────────────────────────────────────────────── */
.kanban-col {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  min-height: 200px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.kanban-header-contacted    { border-top: 3px solid #3b82f6; }
.kanban-header-meeting      { border-top: 3px solid #f59e0b; }
.kanban-header-post-meeting { border-top: 3px solid #8b5cf6; }
.kanban-header-closed       { border-top: 3px solid #16a34a; }

.kanban-col-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.kanban-col-count {
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  min-width: 24px;
  text-align: center;
}

.kanban-cards {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Kanban Card ───────────────────────────────────────────────────────── */
.kanban-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kanban-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}

.kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kanban-card-btn {
  background: none;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.kanban-card-btn:hover {
  border-color: #94a3b8;
  color: #475569;
}

.kanban-card-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.kanban-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.kanban-location {
  font-size: 11px;
  color: #94a3b8;
}

.kanban-card-contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #475569;
  padding-top: 4px;
  border-top: 1px solid #f1f5f9;
}

.kanban-card-contact a {
  color: #2563eb;
  text-decoration: none;
  font-size: 11px;
}

.kanban-card-notes {
  font-size: 11px;
  color: #64748b;
  font-style: italic;
  background: #f8fafc;
  border-radius: 4px;
  padding: 4px 8px;
  border-left: 2px solid #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kanban-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}

.kanban-move-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.kanban-move-btn:hover {
  background: #f0f9ff;
  border-color: #3b82f6;
  color: #2563eb;
}

/* ═══════════════════════════════════════════════════════════════════════
   DASHBOARD — home.html
   ═══════════════════════════════════════════════════════════════════════ */

.dash-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dash-section {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 24px 28px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.dash-section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 4px;
}

.dash-heading {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
}

.dash-section-link {
  font-size: 13px;
  color: #273c75;
  text-decoration: none;
  font-weight: 500;
}

.dash-section-link:hover {
  text-decoration: underline;
}

.dash-section-meta {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 400;
}

.dash-subtext {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.dash-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-stat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  min-width: 120px;
  flex: 1;
}

.dash-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.1;
}

.dash-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 5px;
}

.dash-stat-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.dash-stat-loading .dash-stat-value {
  color: #cbd5e1;
}

.dash-finch-link {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 14px;
}

.dash-finch-link a {
  color: #273c75;
  text-decoration: none;
  font-weight: 500;
}

.dash-finch-link a:hover {
  text-decoration: underline;
}

.dash-error {
  color: #dc2626;
  font-size: 13px;
  margin-top: 10px;
  padding: 10px 14px;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

/* ── Quick Lookup ─────────────────────────────────────────────────────── */
.lookup-wrap {
  margin-bottom: 10px;
}

.lookup-input {
  width: 100%;
  max-width: 480px;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  color: #1a1a2e;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.lookup-input:focus {
  outline: none;
  border-color: #273c75;
  box-shadow: 0 0 0 3px rgba(39, 60, 117, 0.1);
}

.lookup-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 680px;
}

.lookup-result-card {
  display: block;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.lookup-result-card:hover {
  border-color: #273c75;
  box-shadow: 0 2px 8px rgba(39, 60, 117, 0.08);
}

.lookup-company-name {
  font-weight: 600;
  font-size: 14px;
  color: #1a1a2e;
}

.lookup-company-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.lookup-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.lookup-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
  border: 1px solid transparent;
}

.lookup-badge-email {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

.lookup-badge-linkedin {
  background: #f0f9ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.lookup-badge-cert {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.lookup-badge-pipeline {
  background: #fefce8;
  color: #92400e;
  border-color: #fde68a;
}

.lookup-not-found {
  font-size: 13px;
  color: #64748b;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lookup-add-btn {
  background: #273c75;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.lookup-add-btn:hover {
  background: #1e3060;
}

/* ── Add to Scout Form ─────────────────────────────────────────────── */
.lookup-add-form {
  max-width: 560px;
  margin-top: 4px;
}

.add-form-inner {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
}

.add-form-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 12px;
}

.add-form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.add-form-input {
  flex: 1;
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  background: white;
  color: #1a1a2e;
}

.add-form-input:focus {
  outline: none;
  border-color: #273c75;
  box-shadow: 0 0 0 3px rgba(39, 60, 117, 0.1);
}

.add-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.add-form-save {
  background: #273c75;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.add-form-save:hover {
  background: #1e3060;
}

.add-form-save:disabled {
  opacity: 0.6;
  cursor: default;
}

.add-form-cancel {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.add-form-cancel:hover {
  color: #64748b;
}

.add-form-feedback {
  font-size: 12px;
  color: #16a34a;
  margin-top: 8px;
  padding: 6px 10px;
  background: #f0fdf4;
  border-radius: 6px;
  border: 1px solid #bbf7d0;
}

@media (max-width: 768px) {
  .dash-main {
    padding: 16px 16px 40px;
    gap: 14px;
  }

  .dash-section {
    padding: 18px 16px;
  }

  .dash-stats {
    gap: 8px;
  }

  .dash-stat {
    min-width: calc(50% - 4px);
    flex: 0 0 calc(50% - 4px);
    padding: 12px 14px;
  }

  .dash-stat-value {
    font-size: 22px;
  }

  .lookup-input {
    max-width: 100%;
  }
}
