/* LeadMarket Pro – Global Styles */
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --gold: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
}

* { box-sizing: border-box; }

body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.3); } 50% { box-shadow: 0 0 0 8px rgba(37,99,235,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: calc(200px + 100%) 0; } }

.fade-in { animation: fadeIn 0.3s ease forwards; }
.slide-in { animation: slideIn 0.25s ease forwards; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* Spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* Lead Cards */
.lead-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: fadeIn 0.3s ease forwards;
}
.lead-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* Quality badges */
.badge-hot { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-warm { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.badge-cold { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* Sidebar */
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 8px;
  color: #64748b; font-size: 14px; font-weight: 500;
  transition: all 0.15s ease; cursor: pointer;
  text-decoration: none;
}
.sidebar-link:hover { background: #f1f5f9; color: #1e40af; }
.sidebar-link.active { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.sidebar-link i { width: 18px; text-align: center; font-size: 15px; }

/* Modal overlay */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
  animation: fadeIn 0.2s ease;
}
.modal-box {
  background: white; border-radius: 16px;
  max-width: 480px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: fadeIn 0.25s ease;
  max-height: 90vh; overflow-y: auto;
}

/* Toast notifications */
#toast-container {
  position: fixed; top: 20px; right: 20px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  min-width: 280px; max-width: 380px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  animation: slideIn 0.25s ease;
  transition: opacity 0.3s ease;
}
.toast-success { background: #ecfdf5; color: #065f46; border-left: 4px solid #10b981; }
.toast-error { background: #fef2f2; color: #991b1b; border-left: 4px solid #ef4444; }
.toast-info { background: #eff6ff; color: #1e40af; border-left: 4px solid #3b82f6; }
.toast-warning { background: #fffbeb; color: #92400e; border-left: 4px solid #f59e0b; }

/* Stat cards */
.stat-card {
  background: white; border-radius: 12px; padding: 20px;
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.15s ease;
}
.stat-card:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.06); }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: #f8fafc; color: #475569;
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0; text-align: left;
}
.data-table td {
  padding: 12px 14px; border-bottom: 1px solid #f1f5f9;
  font-size: 14px; color: #374151;
}
.data-table tr:hover td { background: #f8fafc; }
.data-table tr:last-child td { border-bottom: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.15s ease; text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #2563eb; color: white; }
.btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.btn-secondary { background: #f1f5f9; color: #374151; border: 1px solid #e2e8f0; }
.btn-secondary:hover:not(:disabled) { background: #e2e8f0; }
.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-danger:hover:not(:disabled) { background: #fecaca; }
.btn-success { background: #dcfce7; color: #16a34a; }
.btn-success:hover:not(:disabled) { background: #bbf7d0; }
.btn-gold { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.btn-gold:hover:not(:disabled) { background: linear-gradient(135deg, #d97706, #b45309); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; }

/* Form inputs */
.form-input {
  width: 100%; padding: 10px 14px; border-radius: 8px;
  border: 1.5px solid #e2e8f0; font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background: white; color: #111;
}
.form-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-input::placeholder { color: #94a3b8; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 5px; }

/* Pill tags */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pill-blue { background: #dbeafe; color: #1e40af; }
.pill-green { background: #dcfce7; color: #166534; }
.pill-orange { background: #ffedd5; color: #c2410c; }
.pill-purple { background: #ede9fe; color: #7c3aed; }
.pill-gray { background: #f1f5f9; color: #475569; }
.pill-red { background: #fee2e2; color: #dc2626; }

/* Navbar */
.navbar {
  background: white; border-bottom: 1px solid #e2e8f0;
  padding: 0 24px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}

/* Sidebar layout */
.app-layout { display: flex; min-height: calc(100vh - 60px); }
.sidebar { width: 240px; background: white; border-right: 1px solid #e2e8f0; padding: 16px 12px; flex-shrink: 0; }
.main-content { flex: 1; padding: 24px; overflow-x: hidden; }

/* Credit display */
.credit-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white; padding: 5px 12px; border-radius: 20px;
  font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px;
}

/* Exclusive lead highlight */
.exclusive-ring { box-shadow: 0 0 0 2px #f59e0b; }

/* Progress bar */
.progress-bar { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }

/* Mobile sidebar */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .sidebar.open { display: block; position: fixed; top: 60px; left: 0; bottom: 0; z-index: 200; box-shadow: 4px 0 20px rgba(0,0,0,0.1); }
  .main-content { padding: 16px; }
}

/* Unlock overlay on lead card */
.unlock-overlay {
  position: absolute; inset: 0; border-radius: 12px;
  background: linear-gradient(180deg, transparent 40%, rgba(255,255,255,0.97) 75%);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 16px;
}

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: #94a3b8; }
.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: #475569; margin-bottom: 8px; }

/* Revenue chart placeholder */
.chart-bar { transition: height 0.4s ease; cursor: default; }
.chart-bar:hover { opacity: 0.8; }

/* Toggle Switch (settings) */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer; inset: 0;
  background-color: #cbd5e1; transition: 0.2s; border-radius: 24px;
}
.switch .slider:before {
  position: absolute; content: ""; height: 18px; width: 18px;
  left: 3px; bottom: 3px; background-color: white;
  transition: 0.2s; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .slider { background-color: #2563eb; }
.switch input:checked + .slider:before { transform: translateX(18px); }

/* Form label */
.form-label { display: block; font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 4px; }
