/* ── SnapPilot Design System ─────────────────────────────────── */
:root {
  --purple:      #7c3aed;
  --purple-dark: #5b21b6;
  --purple-light:#a78bfa;
  --purple-bg:   #f5f3ff;
  --indigo:      #4f46e5;
  --white:       #ffffff;
  --gray-50:     #fafafa;
  --gray-100:    #f4f4f5;
  --gray-200:    #e4e4e7;
  --gray-300:    #d1d5db;
  --gray-400:    #9ca3af;
  --gray-500:    #6b7280;
  --gray-600:    #4b5563;
  --gray-700:    #374151;
  --gray-800:    #1f2937;
  --gray-900:    #111827;
  --green:       #059669;
  --green-bg:    #ecfdf5;
  --red:         #dc2626;
  --red-bg:      #fef2f2;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 10px 40px rgba(0,0,0,.12);
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   20px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5 {
  margin: 0 0 16px;
  line-height: 1.25;
  color: var(--gray-900);
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 16px; }
a  { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── Layout ──────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 1100px; margin: 0 auto; padding: 0 24px;
}
.nav-logo {
  font-size: 20px; font-weight: 800; color: var(--gray-900);
  letter-spacing: -.5px;
}
.nav-logo span { color: var(--purple); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--gray-600); }
.nav-links a:hover { color: var(--purple); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 10px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--radius-sm); font-size: 15px;
  font-weight: 600; cursor: pointer; border: none; transition: all .15s;
  text-decoration: none; white-space: nowrap; line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--purple); color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,.35);
}
.btn-primary:hover { background: var(--purple-dark); box-shadow: 0 4px 16px rgba(124,58,237,.45); }
.btn-secondary {
  background: var(--white); color: var(--gray-800);
  border: 1.5px solid var(--gray-300);
}
.btn-secondary:hover { border-color: var(--purple); color: var(--purple); }
.btn-ghost { background: transparent; color: var(--gray-700); padding: 10px 16px; }
.btn-ghost:hover { background: var(--gray-100); }
.btn-sm   { padding: 8px 16px; font-size: 13px; }
.btn-lg   { padding: 15px 36px; font-size: 16px; }
.btn-full { width: 100%; }
.btn-danger { background: var(--red); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
}
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); transition: all .2s; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, #faf5ff 0%, #eff6ff 50%, #f0fdf4 100%);
  padding: 100px 0 80px;
  text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--purple-bg); color: var(--purple);
  border: 1px solid #ddd6fe; border-radius: 100px;
  font-size: 13px; font-weight: 600; padding: 5px 14px;
  margin-bottom: 24px;
}
.hero-title { margin-bottom: 20px; }
.hero-title span { color: var(--purple); }
.hero-sub {
  font-size: 1.15rem; color: var(--gray-600);
  max-width: 600px; margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { font-size: 13px; color: var(--gray-400); margin-top: 16px; }

/* ── Features ────────────────────────────────────────────────── */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px;
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--purple-bg); display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px;
}
.feature-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.feature-desc  { font-size: 14px; color: var(--gray-500); margin: 0; }

/* ── Pricing ─────────────────────────────────────────────────── */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px;
  align-items: start;
}
.pricing-card {
  border: 2px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 32px; background: var(--white);
}
.pricing-card.featured {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(124,58,237,.1);
}
.pricing-badge {
  display: inline-block; background: var(--purple); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 100px;
  margin-bottom: 16px; text-transform: uppercase; letter-spacing: .5px;
}
.pricing-name  { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.pricing-desc  { font-size: 14px; color: var(--gray-500); margin-bottom: 24px; }
.pricing-price { font-size: 2.5rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.pricing-price sup { font-size: 1.2rem; vertical-align: super; }
.pricing-price-note { font-size: 13px; color: var(--gray-400); margin: 6px 0 24px; }
.pricing-divider { border: none; border-top: 1px solid var(--gray-200); margin: 24px 0; }
.pricing-features { list-style: none; margin: 0; padding: 0; }
.pricing-features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--gray-600); padding: 5px 0;
}
.pricing-features .check { color: var(--green); font-size: 16px; flex-shrink: 0; }
.pricing-features .cross { color: var(--gray-300); font-size: 16px; flex-shrink: 0; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm); font-size: 15px; color: var(--gray-900);
  background: var(--white); outline: none; transition: border .15s;
  font-family: inherit;
}
.form-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.form-input::placeholder { color: var(--gray-400); }
textarea.form-input { resize: vertical; min-height: 120px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.form-error { font-size: 13px; color: var(--red); margin-top: 6px; }
.form-hint  { font-size: 13px; color: var(--gray-400); margin-top: 6px; }

/* ── Alert ───────────────────────────────────────────────────── */
.alert { padding: 14px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; }
.alert-success { background: var(--green-bg); color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background: var(--red-bg);   color: #991b1b; border: 1px solid #fca5a5; }
.alert-info    { background: var(--purple-bg); color: #4c1d95; border: 1px solid #ddd6fe; }

/* ── Badge ───────────────────────────────────────────────────── */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 100px; }
.badge-green  { background: var(--green-bg);  color: var(--green); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-gray   { background: var(--gray-100);  color: var(--gray-600); }
.badge-red    { background: var(--red-bg);    color: var(--red); }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--gray-900); color: var(--gray-400);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 48px;
}
.footer-brand { font-size: 20px; font-weight: 800; color: var(--white); margin-bottom: 10px; }
.footer-brand span { color: var(--purple-light); }
.footer-desc { font-size: 14px; line-height: 1.7; max-width: 260px; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--white); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .5px; }
.footer-col a { display: block; font-size: 14px; color: var(--gray-400); margin-bottom: 8px; }
.footer-col a:hover { color: var(--white); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; }

/* ── Auth pages ──────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #faf5ff 0%, #eff6ff 100%);
  padding: 32px 16px;
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--white);
  border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 40px; box-shadow: var(--shadow-lg);
}
.auth-logo { font-size: 22px; font-weight: 800; color: var(--gray-900); margin-bottom: 8px; }
.auth-logo span { color: var(--purple); }
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.auth-sub   { font-size: 14px; color: var(--gray-500); margin-bottom: 28px; }
.auth-divider { text-align: center; font-size: 13px; color: var(--gray-400); margin: 20px 0; }
.auth-switch { text-align: center; font-size: 14px; color: var(--gray-500); margin-top: 20px; }

/* ── Dashboard ───────────────────────────────────────────────── */
.dash-layout { display: flex; min-height: 100vh; }
.dash-sidebar {
  width: 240px; background: var(--gray-900); padding: 24px 0;
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.dash-logo { font-size: 18px; font-weight: 800; color: var(--white); padding: 0 20px 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
.dash-logo span { color: var(--purple-light); }
.dash-nav { padding: 16px 12px; flex: 1; }
.dash-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--gray-400);
  margin-bottom: 2px; text-decoration: none;
}
.dash-nav a:hover { background: rgba(255,255,255,.06); color: var(--white); }
.dash-nav a.active { background: rgba(124,58,237,.25); color: var(--purple-light); }
.dash-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.dash-main { flex: 1; background: var(--gray-50); padding: 32px; overflow-y: auto; }
.dash-header { margin-bottom: 28px; }
.dash-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.dash-sub   { font-size: 14px; color: var(--gray-500); margin: 0; }
.stat-grid  { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card  { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px; }
.stat-label { font-size: 12px; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-sub   { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links   { display: none; }
  .hero        { padding: 64px 0 48px; }
  .section     { padding: 56px 0; }
  .dash-layout { flex-direction: column; }
  .dash-sidebar { width: 100%; height: auto; position: static; }
  .dash-main   { padding: 24px 16px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ── Nav profile dropdown ─────────────────────────────────────── */
.nav-profile-wrap { position: relative; }

.nav-profile-btn {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 1.5px solid var(--gray-200);
  border-radius: 100px; padding: 5px 12px 5px 6px;
  cursor: pointer; font-size: 14px; font-weight: 500;
  color: var(--gray-700); transition: all .15s;
}
.nav-profile-btn:hover { border-color: var(--purple); color: var(--purple); }

.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--purple); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}

.nav-profile-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 180px; padding: 6px; z-index: 200;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .15s;
}
.nav-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--gray-700); font-weight: 500;
  text-decoration: none; cursor: pointer; width: 100%;
  border: none; background: transparent; text-align: left;
  transition: background .12s;
}
.nav-dd-item:hover { background: var(--gray-100); color: var(--gray-900); text-decoration: none; }
.nav-dd-item svg { color: var(--gray-400); flex-shrink: 0; }

.nav-dd-divider { height: 1px; background: var(--gray-200); margin: 4px 0; }

.nav-dd-logout { color: var(--red) !important; }
.nav-dd-logout svg { color: var(--red) !important; }
.nav-dd-logout:hover { background: var(--red-bg) !important; }

/* ── Dashboard improvements ───────────────────────────────────── */
.dash-user-info {
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.dash-user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--purple); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.dash-user-name  { font-size: 13px; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-user-email { font-size: 11px; color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.quick-actions-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.quick-action-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 20px;
  display: flex; align-items: flex-start; gap: 14px;
  text-decoration: none; color: var(--gray-800);
  transition: all .15s; cursor: pointer;
}
.quick-action-card:hover { box-shadow: var(--shadow-md); border-color: var(--purple); transform: translateY(-1px); text-decoration: none; }
.quick-action-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--purple-bg); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.quick-action-icon svg { color: var(--purple); }
.quick-action-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.quick-action-desc  { font-size: 12px; color: var(--gray-400); margin: 0; }

.section-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: var(--gray-900); }

/* ── Razorpay not-configured notice ───────────────────────────── */
.payment-notice {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: 13px; color: #92400e; margin-bottom: 12px;
  display: flex; align-items: flex-start; gap: 8px;
}
