/* ═══════════════════════════════════════════════
   WhatsApp Chatbot SaaS — Premium Dark Dashboard
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --bg-base:       #0a0e1a;
  --bg-card:       #111827;
  --bg-card2:      #1a2235;
  --bg-hover:      #1f2d45;
  --border:        rgba(255,255,255,0.07);
  --border-light:  rgba(255,255,255,0.12);

  --accent:        #6366f1;
  --accent-glow:   rgba(99,102,241,0.25);
  --accent2:       #06b6d4;
  --green:         #10b981;
  --yellow:        #f59e0b;
  --red:           #ef4444;
  --orange:        #f97316;

  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;

  --hot:           #ef4444;
  --hot-bg:        rgba(239,68,68,0.12);
  --warm:          #f59e0b;
  --warm-bg:       rgba(245,158,11,0.12);
  --cold:          #06b6d4;
  --cold-bg:       rgba(6,182,212,0.12);
  --unknown:       #64748b;
  --unknown-bg:    rgba(100,116,139,0.12);

  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     16px;
  --shadow:        0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:   0 0 40px rgba(99,102,241,0.15);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-card2); border-radius: 99px; }

/* ══════════════════════════════════
   LOGIN PAGE
══════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 30% 40%, rgba(99,102,241,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(6,182,212,0.08) 0%, transparent 50%),
              var(--bg-base);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow), var(--shadow-glow);
  animation: fadeUp 0.5s ease;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}

.login-logo h1 {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-logo p {
  font-size: 12px;
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
}

.login-card h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

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

.login-error {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: #fca5a5;
  margin-bottom: 16px;
  display: none;
}

/* ══════════════════════════════════
   FORM ELEMENTS
══════════════════════════════════ */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group label span.required { color: var(--red); margin-left: 2px; }

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea { resize: vertical; min-height: 100px; }

select option { background: var(--bg-card2); }

.input-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #818cf8);
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--accent-glow); }

.btn-secondary {
  background: var(--bg-card2);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-light); }

.btn-success {
  background: linear-gradient(135deg, #059669, var(--green));
  color: white;
  box-shadow: 0 4px 15px rgba(16,185,129,0.25);
}
.btn-success:hover { transform: translateY(-1px); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.25);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; width: 100%; justify-content: center; }
.btn-icon { padding: 9px; border-radius: var(--radius-sm); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ══════════════════════════════════
   APP LAYOUT
══════════════════════════════════ */
.app-layout { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ── */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}

.sidebar-logo .logo-text { font-size: 13px; font-weight: 700; line-height: 1.2; }
.sidebar-logo .logo-sub { font-size: 10px; color: var(--text-muted); font-weight: 400; }

.sidebar-nav { padding: 16px 12px; flex: 1; }

.nav-section { margin-bottom: 24px; }
.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 8px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  user-select: none;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-glow);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.2);
}

.nav-item .nav-icon { font-size: 16px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.client-selector {
  width: 100%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  padding: 9px 12px;
  cursor: pointer;
  margin-bottom: 12px;
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-base);
}

.page { display: none; padding: 28px 32px; }
.page.active { display: block; }

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
}

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

/* ══════════════════════════════════
   STAT CARDS
══════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  cursor: default;
}

.stat-card:hover { transform: translateY(-2px); border-color: var(--border-light); }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card.hot::before { background: var(--hot); }
.stat-card.warm::before { background: var(--warm); }
.stat-card.cold::before { background: var(--cold); }
.stat-card.visits::before { background: var(--green); }
.stat-card.calls::before { background: var(--accent); }
.stat-card.total::before { background: linear-gradient(90deg, var(--accent), var(--accent2)); }

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.stat-card.hot .stat-value { color: var(--hot); }
.stat-card.warm .stat-value { color: var(--warm); }
.stat-card.cold .stat-value { color: var(--cold); }
.stat-card.visits .stat-value { color: var(--green); }
.stat-card.calls .stat-value { color: #a5b4fc; }
.stat-card.total .stat-value { color: var(--text-primary); }

.stat-icon {
  position: absolute;
  right: 16px; top: 16px;
  font-size: 28px;
  opacity: 0.2;
}

/* ══════════════════════════════════
   LEADS TABLE
══════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
}

.filters-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-select {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 7px 12px;
  cursor: pointer;
}

.search-box {
  position: relative;
}

.search-box input {
  padding-left: 36px;
  width: 220px;
  font-size: 13px;
  height: 36px;
}

.search-box::before {
  content: '🔍';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
}

.table-wrap { overflow-x: auto; }

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

thead th {
  text-align: left;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: pointer;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-hover); }

tbody td {
  padding: 14px 20px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

tbody td:first-child { color: var(--text-primary); font-weight: 500; }

/* ── Score Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-hot { background: var(--hot-bg); color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); }
.badge-warm { background: var(--warm-bg); color: #fcd34d; border: 1px solid rgba(245,158,11,0.25); }
.badge-cold { background: var(--cold-bg); color: #67e8f9; border: 1px solid rgba(6,182,212,0.25); }
.badge-unknown { background: var(--unknown-bg); color: var(--text-muted); border: 1px solid rgba(100,116,139,0.25); }
.badge-new { background: rgba(99,102,241,0.12); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.25); }
.badge-qualified { background: rgba(16,185,129,0.12); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.25); }
.badge-visit { background: rgba(249,115,22,0.12); color: #fdba74; border: 1px solid rgba(249,115,22,0.25); }
.badge-converted { background: rgba(16,185,129,0.2); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.4); }
.badge-lost { background: rgba(239,68,68,0.1); color: #fca5a5; border: 1px solid rgba(239,68,68,0.2); }
.badge-active { background: rgba(16,185,129,0.12); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.25); }
.badge-inactive { background: rgba(100,116,139,0.12); color: var(--text-muted); border: 1px solid rgba(100,116,139,0.25); }

/* ══════════════════════════════════
   MODAL
══════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 700px;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  transition: transform 0.3s;
  position: relative;
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-header h2 { font-size: 18px; font-weight: 700; }
.modal-header p { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }

.modal-close {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 16px;
  flex-shrink: 0;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal-body { padding: 24px 28px; }
.modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Lead Detail ── */
.lead-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-item { }
.detail-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}
.detail-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}
.detail-value.empty { color: var(--text-muted); font-style: italic; font-weight: 400; }

/* ── Conversation History ── */
.conversation-section { margin-top: 20px; }
.conversation-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.chat-history {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg { max-width: 80%; }

.chat-msg.user { align-self: flex-end; }
.chat-msg.model { align-self: flex-start; }

.chat-bubble {
  padding: 9px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.chat-msg.user .chat-bubble {
  background: var(--accent-glow);
  border: 1px solid rgba(99,102,241,0.3);
  color: #c7d2fe;
  border-bottom-right-radius: 4px;
}

.chat-msg.model .chat-bubble {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-bottom-left-radius: 4px;
}

.chat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.chat-msg.user .chat-label { text-align: right; }

/* ══════════════════════════════════
   ONBOARDING WIZARD
══════════════════════════════════ */
.wizard-steps {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}

.wizard-step {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.wizard-step.active {
  background: var(--accent-glow);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.2);
}

.wizard-step.done {
  color: var(--green);
}

.wizard-step .step-num {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.wizard-panel { display: none; }
.wizard-panel.active { display: block; }

/* ── Guide Steps ── */
.guide-steps { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }

.guide-step {
  display: flex;
  gap: 16px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.guide-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid rgba(99,102,241,0.3);
  color: #a5b4fc;
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.guide-step-content h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.guide-step-content p { font-size: 13px; color: var(--text-secondary); }

.copy-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 10px;
}

.copy-box code {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #67e8f9;
  word-break: break-all;
}

.copy-btn {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.copy-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.copy-btn.copied { color: var(--green); border-color: rgba(16,185,129,0.3); }

/* ── Form Rows ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ── Clients Grid ── */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.client-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
}
.client-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow); }

.client-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px;
}

.client-avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.client-info { margin-left: 12px; flex: 1; }
.client-name { font-size: 15px; font-weight: 700; }
.client-type { font-size: 12px; color: var(--text-muted); }

.client-meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.client-meta span { margin-right: 12px; }

.client-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.25); color: #6ee7b7; }
.alert-error   { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.25); color: #fca5a5; }
.alert-info    { background: var(--accent-glow); border: 1px solid rgba(99,102,241,0.25); color: #a5b4fc; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 13px; }

/* ── Loading spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ── Animations ── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-in { animation: fadeIn 0.3s ease; }

/* ── Notes textarea in modal ── */
.notes-section { margin-top: 16px; }
.notes-section label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; display: block; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .page { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .lead-detail-grid { grid-template-columns: 1fr; }
  .modal { margin: 0; border-radius: var(--radius) var(--radius) 0 0; }
}
