/* ─── ADMIN DASHBOARD ─────────────────── */
.admin-page {
  min-height: 100vh;
  padding: 48px 24px 100px;
}

.admin-container {
  max-width: 1100px;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-header h1 {
  font-size: 2rem;
}

/* ─── STAT CARDS ──────────────────────── */
.stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 28px;
  flex: 1;
  min-width: 100px;
  text-align: center;
}

.stat-card-total {
  border-color: rgba(0, 232, 123, 0.2);
  background: var(--accent-dim);
}

.stat-card-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card-total .stat-card-num {
  color: var(--accent);
}

.stat-card-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── EMPTY STATE ─────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.empty-state p {
  color: var(--fg-muted);
}

.empty-state a {
  color: var(--accent);
}

/* ─── LEADS TABLE ─────────────────────── */
.leads-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.leads-table thead {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.leads-table th {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg-muted);
  padding: 14px 16px;
  text-align: left;
  white-space: nowrap;
}

.leads-table tbody .lead-row {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.leads-table tbody .lead-row:hover {
  background: var(--bg-elevated);
}

.leads-table tbody .lead-detail-row {
  border-bottom: 1px solid var(--border);
}

.leads-table td {
  padding: 14px 16px;
  vertical-align: top;
  color: var(--fg);
}

.lead-id {
  color: var(--fg-muted);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
}

.lead-biz-name {
  font-family: var(--font-display);
  font-weight: 600;
}

.lead-biz-type {
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-top: 2px;
}

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

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

.lead-automations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(0, 232, 123, 0.2);
}

.none {
  color: var(--fg-muted);
}

.lead-date {
  color: var(--fg-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* ─── STATUS SELECT ───────────────────── */
.status-select {
  appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  color: var(--fg-muted);
  transition: border-color 0.2s;
}

.status-select:hover,
.status-select:focus {
  border-color: var(--accent);
}

.status-select.status-new { color: var(--fg); }
.status-select.status-contacted { color: #60a5fa; }
.status-select.status-qualified { color: var(--accent); }
.status-select.status-closed { color: var(--fg-muted); }

/* ─── DETAIL ROW ──────────────────────── */
.lead-detail {
  padding: 0 16px 16px;
}

.detail-block {
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 6px;
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 10px 14px;
}

.detail-block strong {
  color: var(--fg);
}

/* ─── RESPONSIVE ──────────────────────── */
@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: repeat(3, 1fr);
    display: grid;
  }

  .stat-card-total {
    grid-column: 1 / -1;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
