:root {
  --bg: #0B0F1A;
  --surface: #111827;
  --surface2: #1a2234;
  --fg: #F0F4FF;
  --fg-muted: #8892a4;
  --accent: #00D4FF;
  --accent-dim: rgba(0, 212, 255, 0.12);
  --accent-glow: rgba(0, 212, 255, 0.25);
  --font-display: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.crm-layout { padding: 96px 24px 60px; min-height: 100vh; }
.crm-container { max-width: 1200px; margin: 0 auto; }

.crm-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 40px; }
.crm-title { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--fg); letter-spacing: -0.02em; }
.crm-subtitle { color: var(--fg-muted); font-size: 0.95rem; margin-top: 6px; }

.btn-back { color: var(--fg-muted); text-decoration: none; font-size: 0.85rem; padding: 8px 16px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; transition: all 0.2s; }
.btn-back:hover { border-color: var(--accent); color: var(--accent); }

.stats-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 32px; }
.stat-card { background: var(--surface); border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; padding: 24px 20px; text-align: center; }
.stat-number { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
.stat-new .stat-number { color: var(--accent); }
.stat-contacted .stat-number { color: #a78bfa; }
.stat-qualified .stat-number { color: var(--yellow); }
.stat-won .stat-number { color: var(--green); }
.stat-lost .stat-number { color: var(--red); }

.leads-table-wrap { background: var(--surface); border: 1px solid rgba(255,255,255,0.07); border-radius: 16px; overflow: hidden; }

.leads-table { width: 100%; border-collapse: collapse; }
.leads-table th { padding: 14px 16px; text-align: left; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); background: var(--surface2); border-bottom: 1px solid rgba(255,255,255,0.06); }
.leads-table td { padding: 14px 16px; font-size: 0.9rem; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.leads-table tr:last-child td { border-bottom: none; }
.leads-table tr:hover td { background: rgba(255,255,255,0.02); }

.lead-name { font-weight: 600; }
.lead-email { color: var(--accent); text-decoration: none; }
.lead-email:hover { text-decoration: underline; }
.lead-service { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; color: var(--fg-muted); background: rgba(255,255,255,0.06); padding: 3px 8px; border-radius: 6px; }
.lead-date { color: var(--fg-muted); font-size: 0.85rem; }

.status-select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  transition: all 0.2s;
}
.status-select option { background: var(--surface); color: var(--fg); }
.status-new { border-color: var(--accent); color: var(--accent); }
.status-contacted { border-color: #a78bfa; color: #a78bfa; }
.status-qualified { border-color: var(--yellow); color: var(--yellow); }
.status-won { border-color: var(--green); color: var(--green); }
.status-lost { border-color: var(--red); color: var(--red); }

.follow-up-count { font-weight: 600; color: var(--accent); }

.btn-follow-up {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: var(--fg-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-follow-up:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-follow-up:disabled { opacity: 0.5; cursor: default; }

.empty-state { text-align: center; padding: 80px 40px; }
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 8px; }
.empty-state p { color: var(--fg-muted); margin-bottom: 28px; }

.btn-primary { display: inline-block; padding: 10px 24px; background: var(--accent); color: #0B0F1A; font-weight: 700; font-size: 0.9rem; border-radius: 10px; text-decoration: none; }

@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .crm-header { flex-direction: column; gap: 16px; }
  .leads-table { font-size: 0.8rem; }
  .leads-table th, .leads-table td { padding: 10px 8px; }
}