/* ChaseBot — Clean, modern, conversion-focused design */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #10b981;
  --accent-dark: #059669;
  --danger: #ef4444;
  --warning: #f59e0b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

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

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== LANDING PAGE ===== */
.landing { min-height: 100vh; }

/* Nav */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; max-width: 1100px; margin: 0 auto; padding-left: 24px; padding-right: 24px;
}
.nav-logo { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); text-decoration: none; }
.nav-logo span { color: var(--primary); }
.nav-links { display: flex; gap: 12px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--gray-600); font-weight: 500; font-size: 0.95rem; padding: 8px 16px; border-radius: var(--radius-sm); transition: all 0.2s; }
.nav-links a:hover { color: var(--gray-900); background: var(--gray-100); }
.nav-links a.btn-primary { background: var(--primary); color: white; }
.nav-links a.btn-primary:hover { background: var(--primary-dark); }

/* Hero */
.hero {
  text-align: center; padding: 80px 24px 60px; max-width: 800px; margin: 0 auto;
}
.hero-badge {
  display: inline-block; background: var(--primary-light); color: var(--primary-dark);
  font-size: 0.85rem; font-weight: 600; padding: 6px 16px; border-radius: 999px; margin-bottom: 24px;
}
.hero h1 { font-size: 3.2rem; font-weight: 800; line-height: 1.1; margin-bottom: 20px; color: var(--gray-900); }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p { font-size: 1.25rem; color: var(--gray-500); max-width: 600px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem;
  text-decoration: none; border: none; cursor: pointer; transition: all 0.2s;
}
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: white; color: var(--gray-700); border: 2px solid var(--gray-200); }
.btn-secondary:hover { border-color: var(--gray-300); background: var(--gray-50); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Social proof */
.social-proof { text-align: center; padding: 40px 24px; }
.social-proof p { color: var(--gray-400); font-size: 0.9rem; margin-bottom: 8px; }
.social-proof .stats { display: flex; gap: 48px; justify-content: center; flex-wrap: wrap; }
.social-proof .stat { text-align: center; }
.social-proof .stat strong { display: block; font-size: 2rem; color: var(--gray-900); font-weight: 800; }
.social-proof .stat span { color: var(--gray-500); font-size: 0.9rem; }

/* How it works */
.how-it-works { padding: 80px 24px; background: white; }
.section-title { text-align: center; font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; }
.section-subtitle { text-align: center; color: var(--gray-500); font-size: 1.1rem; margin-bottom: 48px; max-width: 600px; margin-left: auto; margin-right: auto; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; max-width: 1100px; margin: 0 auto; }
.step { text-align: center; padding: 32px 24px; }
.step-number {
  width: 56px; height: 56px; border-radius: 50%; background: var(--primary-light);
  color: var(--primary); font-weight: 800; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { color: var(--gray-500); font-size: 0.95rem; }

/* Escalation preview */
.escalation { padding: 80px 24px; }
.escalation-timeline { max-width: 600px; margin: 0 auto; }
.escalation-item {
  display: flex; gap: 20px; padding: 20px 0;
  border-left: 3px solid var(--gray-200); margin-left: 20px; padding-left: 24px;
  position: relative;
}
.escalation-item::before {
  content: ''; position: absolute; left: -9px; top: 24px;
  width: 15px; height: 15px; border-radius: 50%; background: white; border: 3px solid var(--primary);
}
.escalation-item.warning::before { border-color: var(--warning); }
.escalation-item.danger::before { border-color: var(--danger); }
.escalation-item .day { font-weight: 700; font-size: 0.85rem; color: var(--primary); text-transform: uppercase; }
.escalation-item.warning .day { color: var(--warning); }
.escalation-item.danger .day { color: var(--danger); }
.escalation-item h4 { font-size: 1.05rem; margin: 4px 0; }
.escalation-item p { color: var(--gray-500); font-size: 0.9rem; }

/* Pricing */
.pricing { padding: 80px 24px; background: white; }
.pricing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; max-width: 700px; margin: 0 auto; }
.pricing-card {
  background: var(--gray-50); border: 2px solid var(--gray-200); border-radius: var(--radius);
  padding: 36px 28px; text-align: center;
}
.pricing-card.featured { border-color: var(--primary); background: white; box-shadow: var(--shadow-xl); position: relative; }
.pricing-card.featured .badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: white; font-size: 0.8rem; font-weight: 600;
  padding: 4px 16px; border-radius: 999px;
}
.pricing-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.pricing-card .price { font-size: 2.5rem; font-weight: 800; color: var(--gray-900); }
.pricing-card .price span { font-size: 1rem; font-weight: 500; color: var(--gray-500); }
.pricing-card .price-note { color: var(--gray-400); font-size: 0.85rem; margin-bottom: 24px; }
.pricing-card ul { list-style: none; text-align: left; margin-bottom: 24px; }
.pricing-card ul li { padding: 8px 0; color: var(--gray-600); font-size: 0.95rem; display: flex; gap: 10px; align-items: start; }
.pricing-card ul li::before { content: '✓'; color: var(--accent); font-weight: 700; }
.pricing-card .btn { width: 100%; }

/* Footer */
.footer { text-align: center; padding: 48px 24px; color: var(--gray-400); font-size: 0.9rem; }

/* ===== DASHBOARD ===== */
.dashboard { min-height: 100vh; background: var(--gray-50); }
.dash-header {
  background: white; border-bottom: 1px solid var(--gray-200); padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.dash-content { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }

/* Stats cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: white; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.stat-card .label { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 4px; }
.stat-card .value { font-size: 1.8rem; font-weight: 700; color: var(--gray-900); }
.stat-card .value.green { color: var(--accent); }
.stat-card .value.blue { color: var(--primary); }

/* Invoice list */
.invoice-section { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.invoice-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--gray-200); }
.invoice-header h2 { font-size: 1.2rem; }
.invoice-table { width: 100%; border-collapse: collapse; }
.invoice-table th { text-align: left; padding: 12px 24px; font-size: 0.8rem; color: var(--gray-500); text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em; border-bottom: 1px solid var(--gray-200); background: var(--gray-50); }
.invoice-table td { padding: 16px 24px; border-bottom: 1px solid var(--gray-100); font-size: 0.95rem; }
.invoice-table tr:last-child td { border-bottom: none; }
.invoice-table tr:hover { background: var(--gray-50); }

/* Status badges */
.badge-status { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-overdue { background: #fee2e2; color: #991b1b; }

/* Reminder chips */
.reminder-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.reminder-chip { padding: 2px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 600; }
.reminder-chip.sent { background: #d1fae5; color: #065f46; }
.reminder-chip.pending { background: var(--gray-100); color: var(--gray-500); }
.reminder-chip.cancelled { background: var(--gray-100); color: var(--gray-400); text-decoration: line-through; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex;
  align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(4px);
}
.modal {
  background: white; border-radius: var(--radius); padding: 32px; width: 90%; max-width: 480px;
  box-shadow: var(--shadow-xl); max-height: 90vh; overflow-y: auto;
}
.modal h2 { font-size: 1.3rem; margin-bottom: 24px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-group input, .form-group select {
  width: 100%; padding: 10px 14px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: inherit; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 24px; color: var(--gray-400); }
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { color: var(--gray-600); margin-bottom: 8px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--gray-800); color: white;
  padding: 14px 24px; border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 500;
  box-shadow: var(--shadow-xl); z-index: 9999; animation: slideIn 0.3s ease;
}
.toast.success { background: var(--accent); }
.toast.error { background: var(--danger); }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1.05rem; }
  .nav-links a:not(.btn-primary) { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .invoice-table { font-size: 0.85rem; }
  .invoice-table th, .invoice-table td { padding: 12px 16px; }
  .dash-header { flex-wrap: wrap; gap: 12px; }
}
