/* Leads admin page — matches theme.css design tokens */

.leads-table {
  width: 100%;
  border-collapse: collapse;
}

.leads-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-muted);
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--border);
}

.leads-table th:first-child { padding-left: 0; }

.leads-table td {
  padding: 14px 12px;
  font-size: 14px;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.leads-table td:first-child { padding-left: 0; }

.leads-table tr:last-child td { border-bottom: none; }

.lead-cell-name { font-weight: 600; }

.lead-cell-time {
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lead-email-link {
  color: var(--accent);
  text-decoration: none;
}

.lead-email-link:hover { text-decoration: underline; }

.service-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.service-tag.roofing {
  background: rgba(245,158,11,0.12);
  color: var(--accent);
}

.service-tag.hvac {
  background: rgba(56,189,248,0.12);
  color: var(--accent-blue);
}

.service-tag.nurture.pending {
  background: rgba(148,163,184,0.15);
  color: var(--fg-muted);
}

.service-tag.nurture.nurturing {
  background: rgba(99,102,241,0.14);
  color: #6366f1;
}

.service-tag.nurture.complete {
  background: rgba(34,197,94,0.14);
  color: #16a34a;
}

.service-tag.nurture.unsubscribed {
  background: rgba(239,68,68,0.12);
  color: #dc2626;
}

.service-tag.nurture.replied {
  background: rgba(34,197,94,0.16);
  color: #15803d;
}

.lead-score-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 100px;
  min-width: 32px;
  text-align: center;
}

.lead-score-badge.score-0 {
  background: rgba(148,163,184,0.15);
  color: var(--fg-muted);
}

.lead-score-badge.score-1 {
  background: rgba(99,102,241,0.14);
  color: #6366f1;
}

.lead-score-badge.score-2 {
  background: rgba(245,158,11,0.14);
  color: #b45309;
}

.lead-score-badge.score-3 {
  background: rgba(34,197,94,0.14);
  color: #16a34a;
}

.lead-score-badge.score-4 {
  background: rgba(16,185,129,0.16);
  color: #047857;
}

.lead-field-optional {
  color: var(--fg-muted);
  font-weight: 400;
}

.nurture-hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .leads-table th, .leads-table td {
    padding: 12px 8px;
    font-size: 13px;
  }
}

/* Lead drip funnel + step dots + history */

.drip-funnel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 0 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.drip-funnel-chip {
  background: rgba(148,163,184,0.12);
  border-radius: 100px;
  padding: 8px 14px;
  min-width: 96px;
  text-align: center;
}

.drip-funnel-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-muted);
}

.drip-funnel-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.drip-funnel-arrow {
  color: var(--fg-muted);
  font-size: 14px;
  user-select: none;
}

.drip-step-dots {
  display: flex;
  gap: 6px;
  padding-top: 6px;
}

.drip-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 600;
  background: rgba(148,163,184,0.15);
  color: var(--fg-muted);
}

.drip-dot.pending {
  background: rgba(148,163,184,0.15);
  color: var(--fg-muted);
  border-color: var(--border);
}

.drip-dot.sent {
  background: rgba(99,102,241,0.14);
  color: #6366f1;
  border-color: rgba(99,102,241,0.4);
}

.drip-dot.opened {
  background: rgba(34,197,94,0.14);
  color: #16a34a;
  border-color: rgba(34,197,94,0.4);
}

.drip-dot.clicked {
  background: rgba(245,158,11,0.14);
  color: #b45309;
  border-color: rgba(245,158,11,0.4);
}

.drip-history-row td {
  background: rgba(99,102,241,0.04);
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.drip-history-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.drip-history {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.drip-history th {
  text-align: left;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-muted);
  padding: 6px 12px 6px 0;
  border-bottom: 1px solid var(--border);
}

.drip-history td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.drip-history tr:last-child td { border-bottom: none; }

/* Recent unsubscribes panel */

.unsubscribes-section {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-bottom: 32px;
}

.unsubscribes-header {
  margin-bottom: 12px;
}

.unsubscribes-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.unsubscribes-scope {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg-muted);
}

.unsubscribes-scope a {
  color: var(--accent);
  text-decoration: none;
}

.unsubscribes-scope a:hover { text-decoration: underline; }

.unsubscribes-table {
  width: 100%;
  border-collapse: collapse;
}

.unsubscribes-table th {
  text-align: left;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-muted);
  padding: 0 12px 8px;
  border-bottom: 1px solid var(--border);
}

.unsubscribes-table th:first-child { padding-left: 0; }

.unsubscribes-table td {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.unsubscribes-table td:first-child { padding-left: 0; }

.unsubscribes-table tr:last-child td { border-bottom: none; }

.unsubscribes-empty {
  text-align: center;
  color: var(--fg-muted);
  font-size: 13px;
  padding: 16px 12px;
}

.unsubscribes-source-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.unsubscribes-source-tag.click,
.unsubscribes-source-tag.confirm {
  background: rgba(239,68,68,0.12);
  color: #dc2626;
}
