/* ============================================================
   PayTool AI — Stylesheet
   Premium, state-of-the-art fintech SaaS theme
   Supports Light & Dark Modes + Glassmorphism + Dynamic Animations
   ============================================================ */

:root {
  /* Default light theme */
  --primary: #2563EB;          /* blue-600 */
  --primary-dark: #1D4ED8;     /* blue-700 */
  --primary-soft: #EFF6FF;     /* blue-50 */
  --accent: #0EA5E9;           /* sky-500 */
  --accent-soft: #F0F9FF;      /* sky-50 */
  --gradient: linear-gradient(135deg, #2563EB 0%, #0EA5E9 100%);
  --gradient-text: linear-gradient(135deg, #2563EB 0%, #0284C7 100%);

  /* Surfaces */
  --bg: #F8FAFC;               /* slate-50 */
  --bg-subtle: #F1F5F9;        /* slate-100 */
  --bg-muted: #E2E8F0;         /* slate-200 */
  --surface: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.75);
  --surface-hover: rgba(241, 245, 249, 0.7);

  /* Text */
  --text: #0F172A;             /* slate-900 */
  --text-2: #334155;           /* slate-700 */
  --muted: #64748B;            /* slate-500 */

  /* Lines */
  --border: #E2E8F0;           /* slate-200 */
  --border-strong: #CBD5E1;    /* slate-300 */
  --border-glass: rgba(226, 232, 240, 0.8);

  /* Status */
  --success: #10B981;          /* emerald-500 */
  --success-soft: #EFFDF5;
  --warning: #F59E0B;          /* amber-500 */
  --warning-soft: #FFFBEB;
  --error: #EF4444;            /* red-500 */
  --error-soft: #FEF2F2;
  --info: #06B6D4;             /* cyan-500 */
  --info-soft: #ECFEFF;

  /* Radius */
  --r-card: 16px;
  --r-input: 12px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 25px 50px -12px rgba(37, 99, 235, 0.12);
  --glow: rgba(37, 99, 235, 0.05);

  --maxw: 1240px;
  --nav-h: 72px;
  --sidebar-w: 240px;
}

html[data-theme="dark"] {
  --primary: #3B82F6;          /* blue-500 */
  --primary-dark: #2563EB;     /* blue-600 */
  --primary-soft: rgba(59, 130, 246, 0.12);
  --accent: #06B6D4;           /* cyan-500 */
  --accent-soft: rgba(6, 182, 212, 0.12);
  --gradient: linear-gradient(135deg, #3B82F6 0%, #06B6D4 100%);
  --gradient-text: linear-gradient(135deg, #60A5FA 0%, #22D3EE 100%);

  /* Surfaces */
  --bg: #070913;               /* Deep dark slate */
  --bg-subtle: #0B0E1E;        /* Subtle navy slate */
  --bg-muted: #161B33;         /* Muted blue slate */
  --surface: #0E1225;          /* Card background dark */
  --surface-glass: rgba(14, 18, 37, 0.7);
  --surface-hover: rgba(25, 32, 64, 0.6);

  /* Text */
  --text: #F8FAFC;             /* slate-50 */
  --text-2: #CBD5E1;           /* slate-300 */
  --muted: #64748B;            /* slate-500 */

  /* Lines */
  --border: #1E2540;           /* Border dark */
  --border-strong: #2D3960;    /* Border dark focus */
  --border-glass: rgba(255, 255, 255, 0.06);

  /* Status */
  --success: #10B981;
  --success-soft: rgba(16, 185, 129, 0.15);
  --warning: #F59E0B;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --error: #EF4444;
  --error-soft: rgba(239, 68, 68, 0.15);
  --info: #06B6D4;
  --info-soft: rgba(6, 182, 212, 0.15);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  --glow: rgba(59, 130, 246, 0.25);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* Lucide icons sizing */
[data-lucide] { width: 20px; height: 20px; stroke-width: 2; vertical-align: middle; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-subtle); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 50px; border: 2px solid var(--bg-subtle); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) var(--bg-subtle); }

/* ============================================================
   Typography helpers
   ============================================================ */
.grad {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.muted { color: var(--muted); }

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-align: center;
  color: var(--text);
}
.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 600px;
  margin: 16px auto 0;
  font-size: 1.08rem;
}
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
}
.center { text-align: center; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 11px 20px;
  border-radius: var(--r-input);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
  user-select: none;
}
.btn [data-lucide] { width: 18px; height: 18px; }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(37,99,235,0.4);
}
.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 12px 24px -8px rgba(37,99,235,0.6), 0 0 0 3px var(--glow);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-light { background: #fff; color: #000; }
.btn-light:hover { background: #f3f4f6; transform: translateY(-1px); }

.btn-clear { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.25); }
.btn-clear:hover { background: rgba(255,255,255,0.2); }

.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ============================================================
   Navbar
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand .logo {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  box-shadow: 0 4px 10px -3px var(--glow);
  overflow: hidden;
  background: var(--gradient);
  color: #fff;
}
.brand .logo img { width: 100%; height: 100%; object-fit: cover; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links > a:not(.btn) {
  color: var(--text-2);
  font-weight: 500;
  font-size: 0.94rem;
  transition: color .15s ease;
  position: relative;
}
.nav-links > a:not(.btn):hover { color: var(--primary); }
.nav-links > a.active { color: var(--text); font-weight: 600; }
.nav-links > a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -10px;
  height: 2px; border-radius: 2px;
  background: var(--gradient);
}

/* Theme switch button */
.theme-toggle {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: var(--surface-glass);
  transition: all 0.2s ease;
}
.theme-toggle:hover {
  background: var(--bg-muted);
  color: var(--primary);
  transform: rotate(15deg);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.hamburger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 80px) 0 90px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 700px;
  background:
    radial-gradient(closest-side, rgba(37,99,235,0.15), transparent 75%),
    radial-gradient(closest-side, rgba(14,165,233,0.12), transparent 70%);
  background-position: 65% 0, 35% 20%;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
  animation: glow-shift 8s ease-in-out infinite alternate;
}
@keyframes glow-shift {
  0% { transform: translateX(-50%) translate(0, 0) scale(1); }
  100% { transform: translateX(-50%) translate(-20px, 30px) scale(1.08); }
}
.hero .container { z-index: 1; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 7px 16px 7px 8px;
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}
.badge:hover { transform: translateY(-1px); }
.badge .tag {
  background: var(--gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge .tag [data-lucide] { width: 13px; height: 13px; }

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
  color: var(--text);
}
.lead {
  max-width: 640px;
  margin: 24px auto 0;
  font-size: 1.2rem;
  color: var(--muted);
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 38px; }
.trust {
  margin-top: 30px;
  color: var(--muted);
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.trust strong { color: var(--text); }
.trust [data-lucide] { width: 16px; height: 16px; color: var(--success); }

/* ---------- Logos bar ---------- */
.logos { padding: 10px 0 70px; }
.logos .cap { text-align: center; color: var(--muted); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 26px; }
.logo-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 18px 52px;
}
.logo-row span {
  font-weight: 700; font-size: 1.3rem; color: #94a3b8; letter-spacing: -0.02em;
  opacity: 0.7; transition: opacity 0.2s ease;
}
.logo-row span:hover { opacity: 1; }

/* ============================================================
   Sections / cards
   ============================================================ */
section { padding: 88px 0; position: relative; }
.bg-subtle { background: var(--bg-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120px circle at var(--x, 0px) var(--y, 0px), rgba(37, 99, 235, 0.12) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 100%);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 50px; }

.ico {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 20px;
  transition: transform 0.2s ease;
}
.card:hover .ico { transform: scale(1.08) rotate(3deg); }
.ico [data-lucide] { width: 24px; height: 24px; }
.ico.accent { background: var(--accent-soft); color: var(--accent); }

.card h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.card p { color: var(--muted); font-size: 0.96rem; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 54px; position: relative; }
.step {
  text-align: center;
  padding: 32px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease;
}
.step:hover { transform: translateY(-4px); }
.step .num {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  margin: 0 auto 20px;
  font-size: 1.3rem; font-weight: 800; color: #fff;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 10px 22px -8px rgba(37,99,235,0.7);
  transition: transform 0.3s ease;
}
.step:hover .num { transform: scale(1.08) rotate(10deg); }
.step h3 { margin-bottom: 8px; font-size: 1.15rem; }
.step p { color: var(--muted); font-size: 0.96rem; }

/* ---------- CTA band ---------- */
.cta-band { padding: 88px 0; }
.cta-band .inner {
  position: relative;
  overflow: hidden;
  background: var(--gradient);
  border-radius: 28px;
  padding: 64px 32px;
  text-align: center;
  box-shadow: var(--shadow-xl);
}
.cta-band .inner::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(closest-side at 80% 20%, rgba(255,255,255,0.18), transparent 60%);
}
.cta-band h2 { position: relative; font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; color: #fff; margin-bottom: 12px; letter-spacing: -0.02em; }
.cta-band p { position: relative; color: rgba(255,255,255,0.9); margin-bottom: 28px; font-size: 1.08rem; }
.cta-band .btn-light { position: relative; }
.cta-band .btn-clear { position: relative; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  position: relative;
  background:
    radial-gradient(70% 130% at 88% 0%, rgba(14,165,233,0.04), transparent 60%),
    radial-gradient(55% 130% at 8% 0%, rgba(37,99,235,0.03), transparent 55%),
    var(--bg-subtle);
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding: 72px 0 28px;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient);
}
.footer .brand { color: var(--text); }

.footer-grid { display: grid; grid-template-columns: 1.5fr 2.3fr; gap: 56px; }

.footer-brand .fdesc { margin-top: 16px; max-width: 330px; font-size: 0.93rem; line-height: 1.7; color: var(--muted); }
.footer-news { display: flex; gap: 8px; margin-top: 24px; max-width: 340px; }
.footer-news input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text); font-family: inherit; font-size: 0.9rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.footer-news input::placeholder { color: #94a3b8; }
.footer-news input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--glow); }
.footer-news button { padding: 0 16px; flex-shrink: 0; }
.footer-news button [data-lucide] { width: 18px; height: 18px; }

.footer-badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px; padding: 8px 14px;
  border-radius: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  font-size: 0.8rem; font-weight: 600; color: var(--text-2);
}
.footer-badge [data-lucide] { width: 15px; height: 15px; color: var(--success); }

.footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.footer-links h4 { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 18px; color: var(--text); }
.footer-links a { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; transition: color .15s ease, padding .15s ease; }
.footer-links a:hover { color: var(--primary); padding-left: 3px; }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  margin-top: 56px; padding-top: 26px;
  border-top: 1px solid var(--border);
}
.fcopy { font-size: 0.85rem; color: var(--muted); }
.fcopy a { color: var(--text-2); transition: color .15s ease; }
.fcopy a:hover { color: var(--primary); }
.footer-meta { display: flex; align-items: center; gap: 22px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.status-pill .sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,0.2); animation: pulse-dot 2s infinite; }

/* ============================================================
   Page hero (interior pages)
   ============================================================ */
.page-hero {
  position: relative;
  text-align: center;
  padding: calc(var(--nav-h) + 64px) 0 20px;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute; top: -160px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(closest-side, rgba(37,99,235,0.08), transparent 70%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.page-hero p { color: var(--muted); margin: 18px auto 0; font-size: 1.12rem; max-width: 600px; }

/* ============================================================
   Pricing
   ============================================================ */
.billing-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-muted);
  padding: 5px;
  border-radius: var(--r-pill);
  margin: 30px auto 48px;
}
.billing-switcher button {
  background: none;
  border: 0;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--r-pill);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.25s ease;
}
.billing-switcher button.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; margin-top: 20px; }
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 34px 30px;
  display: flex; flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(.22,1,.36,1);
}
.price-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.price-card h3 { font-size: 1.3rem; font-weight: 700; }
.price-card .tier-sub { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.price { font-size: 2.9rem; font-weight: 800; margin: 22px 0 2px; letter-spacing: -0.03em; color: var(--text); transition: transform 0.2s ease; }
.price.flip { transform: scale(0.9); }
.price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-note { color: var(--muted); font-size: 0.85rem; min-height: 20px; }
.price-card ul { margin: 24px 0 28px; display: grid; gap: 13px; }
.price-card li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.94rem; color: var(--text-2); }
.price-card li [data-lucide] { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; margin-top: 1px; }
.price-card .btn { margin-top: auto; }

.price-card.popular {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              var(--gradient) border-box;
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
}
.price-card.popular:hover {
  transform: translateY(-12px);
}
.popular-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--gradient); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 16px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 6px 14px -4px rgba(37,99,235,0.6);
}
.popular-badge [data-lucide] { width: 13px; height: 13px; }

/* FAQ Accodion */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 14px; box-shadow: var(--shadow-xs); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left;
  background: none; border: 0; color: var(--text);
  font-family: inherit; font-size: 1.02rem; font-weight: 600;
  padding: 20px 22px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-q .chev { transition: transform .25s ease; color: var(--muted); flex-shrink: 0; display: inline-flex; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); color: var(--primary); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; color: var(--muted); }
.faq-a p { padding: 0 22px 20px; font-size: 0.95rem; }

/* ============================================================
   Auth / login
   ============================================================ */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 5fr 6fr; }
.auth-left {
  position: relative;
  overflow: hidden;
  background: var(--gradient);
  padding: 48px 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #fff;
}
.auth-left::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(closest-side at 80% 15%, rgba(255,255,255,0.18), transparent 55%),
              radial-gradient(closest-side at 10% 90%, rgba(255,255,255,0.12), transparent 50%);
}
.auth-left > * { position: relative; z-index: 1; }
.auth-left .brand { color: #fff; }
.auth-left .brand .logo { background: rgba(255,255,255,0.2); box-shadow: none; }
.auth-left h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; }
.auth-left .sub { margin-top: 16px; font-size: 1.08rem; color: rgba(255,255,255,0.92); max-width: 420px; }
.auth-left .stats { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 0.92rem; font-weight: 500; }
.auth-left .stats span { display: inline-flex; align-items: center; gap: 7px; }
.auth-left .stats [data-lucide] { width: 17px; height: 17px; }
.auth-quote { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.25); border-radius: 14px; padding: 20px; font-size: 0.95rem; backdrop-filter: blur(6px); }
.auth-quote .who { margin-top: 10px; font-weight: 600; font-size: 0.85rem; opacity: 0.9; }

.auth-right { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--bg-subtle); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card > h1 { font-size: 1.65rem; font-weight: 800; }
.auth-card > .muted { margin-bottom: 26px; }

.tabs { display: flex; background: var(--bg-muted); border: 1px solid var(--border); border-radius: 12px; padding: 5px; margin-bottom: 26px; position: relative; }
.tab {
  flex: 1; text-align: center; padding: 10px; border-radius: 8px;
  background: none; border: 0; color: var(--muted);
  font-family: inherit; font-weight: 600; font-size: 0.94rem; cursor: pointer; transition: .2s ease;
  position: relative; z-index: 2;
}
.tab.active { color: var(--primary); }
.tabs-slider {
  position: absolute;
  top: 5px; bottom: 5px; left: 5px;
  width: calc(50% - 5px);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.87rem; font-weight: 600; margin-bottom: 7px; color: var(--text-2); }
.field input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-input);
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit; font-size: 0.95rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: #94a3b8; }
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--glow); }
.field .err { color: var(--error); font-size: 0.8rem; margin-top: 6px; display: none; }
.field.invalid input { border-color: var(--error); }
.field.invalid input:focus { box-shadow: 0 0 0 3px rgba(220,38,38,0.15); }
.field.invalid .err { display: block; }

.row-between { display: flex; justify-content: space-between; align-items: center; }
.link { color: var(--primary); font-size: 0.85rem; font-weight: 600; }
.link:hover { color: var(--accent); text-decoration: underline; }

.strength { margin-top: 9px; }
.strength-bar { height: 6px; border-radius: 50px; background: var(--bg-muted); overflow: hidden; }
.strength-bar > i { display: block; height: 100%; width: 0; border-radius: 50px; transition: width .25s ease, background .25s ease; }
.strength-label { font-size: 0.78rem; margin-top: 6px; color: var(--muted); font-weight: 500; }

.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: var(--muted); margin: 6px 0 18px; }
.checkbox input { margin-top: 3px; accent-color: var(--primary); width: 16px; height: 16px; }
.checkbox a { color: var(--primary); }

.divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 0.82rem; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.oauth { display: grid; gap: 12px; }
.oauth .btn { gap: 10px; }
.oauth .btn svg { width: 18px; height: 18px; }

/* ============================================================
   Toast
   ============================================================ */
#toast-host { position: fixed; top: 20px; right: 20px; z-index: 4000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 14px 18px;
  min-width: 280px; max-width: 380px;
  box-shadow: var(--shadow-lg);
  color: var(--text); font-size: 0.92rem;
  display: flex; gap: 11px; align-items: flex-start;
  transform: translateX(120%); opacity: 0;
  transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .35s ease;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast .t-icon { flex-shrink: 0; display: inline-flex; }
.toast.success .t-icon { color: var(--success); }
.toast.error .t-icon { color: var(--error); }
.toast .t-icon [data-lucide] { width: 20px; height: 20px; }

/* ============================================================
   SaaS Dashboard Layout (Sidebar + Content Grid)
   ============================================================ */
.dash-body { background: var(--bg-subtle); display: flex; min-height: 100vh; overflow-x: hidden; }

/* Dashboard Sidebar */
.dash-sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
  transition: transform 0.3s ease, background 0.3s ease;
}
.sidebar-brand {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
}
.sidebar-menu {
  flex: 1;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
}
.sidebar-link:hover {
  background: var(--bg-subtle);
  color: var(--primary);
}
.sidebar-link.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.sidebar-link [data-lucide] {
  width: 18px;
  height: 18px;
}
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* Dashboard content wrapping */
.dash-container {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin 0.3s ease;
}

/* Header inside dashboard */
.dash-nav {
  position: sticky; top: 0; height: 64px;
  display: flex; align-items: center;
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  z-index: 90;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.dash-nav .nav-inner {
  display: flex;
  justify-content: flex-end; /* user menu to the right */
  align-items: center;
  width: 100%;
}
.dash-user { display: flex; align-items: center; gap: 12px; }
.dash-user .uname { font-size: 0.92rem; font-weight: 600; color: var(--text-2); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gradient); color: #fff;
  font-weight: 700; font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.dash-main { padding: 32px 0 64px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.dash-head h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.dash-head p { color: var(--muted); font-size: 0.95rem; margin-top: 2px; }

/* KPI CARDS */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.kpi:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.kpi .k-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.kpi .k-label { color: var(--muted); font-size: 0.84rem; font-weight: 500; }
.kpi .k-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.kpi .k-ic [data-lucide] { width: 19px; height: 19px; }
.kpi .k-val { font-size: 1.95rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.kpi .k-delta { font-size: 0.83rem; font-weight: 600; margin-top: 7px; display: inline-flex; align-items: center; gap: 4px; }
.kpi .k-delta [data-lucide] { width: 15px; height: 15px; }
.delta-up { color: var(--success); }
.delta-blue { color: var(--info); }

/* TWO COLUMN PANELS */
.dash-cols { display: grid; grid-template-columns: 6fr 4fr; gap: 18px; margin-bottom: 18px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel-head h3 { font-size: 1.08rem; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.panel-head h3 [data-lucide] { width: 18px; height: 18px; color: var(--primary); }
.panel-head .sub { color: var(--muted); font-size: 0.84rem; }

.table-wrap { overflow-x: auto; }
table.recon { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.recon th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
}
table.recon td { padding: 13px 12px; border-bottom: 1px solid var(--border); color: var(--text-2); }
table.recon tbody tr:last-child td { border-bottom: 0; }
table.recon tbody tr { transition: background .15s ease, transform 0.15s ease; cursor: pointer; }
table.recon tbody tr:hover { background: var(--surface-hover); }
table.recon tbody tr.newly-added { animation: highlight-flash 1.5s ease; }
@keyframes highlight-flash {
  0% { background: var(--primary-soft); transform: scale(0.99); }
  100% { background: transparent; transform: scale(1); }
}

.src-tag { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text); }
.src-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.amount { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }
.amount.neg { color: var(--error); }

.status { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 600; padding: 4px 11px; border-radius: var(--r-pill); white-space: nowrap; }
.status [data-lucide] { width: 13px; height: 13px; }
.status.matched { background: var(--success-soft); color: var(--success); }
.status.partial { background: var(--warning-soft); color: var(--warning); }
.status.review  { background: var(--info-soft); color: var(--info); }

.insights { display: grid; gap: 12px; }
.insight { display: flex; gap: 12px; padding: 13px 14px; border-radius: 11px; background: var(--bg-subtle); border: 1px solid var(--border); font-size: 0.9rem; color: var(--text-2); }
.insight .i-ic { flex-shrink: 0; display: inline-flex; margin-top: 1px; }
.insight .i-ic [data-lucide] { width: 18px; height: 18px; }
.insight.warn { border-left: 3px solid var(--warning); } .insight.warn .i-ic { color: var(--warning); }
.insight.ok   { border-left: 3px solid var(--success); } .insight.ok .i-ic { color: var(--success); }
.insight.tip  { border-left: 3px solid var(--accent); }  .insight.tip .i-ic { color: var(--accent); }

/* Bar chart */
.chart { display: flex; align-items: flex-end; gap: 14px; height: 210px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 44px; border-radius: 8px 8px 0 0; background: var(--gradient); position: relative; transition: height 1s cubic-bezier(.22,1,.36,1); height: 0; min-height: 2px; }
.bar:hover { filter: brightness(1.08); cursor: pointer; }
.bar::after {
  content: attr(data-val);
  position: absolute; top: -30px; left: 50%; transform: translateX(-50%) scale(0.8);
  background: var(--text); color: var(--bg);
  padding: 3px 8px; border-radius: 6px; font-size: 0.72rem; white-space: nowrap;
  box-shadow: var(--shadow-md); opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}
.bar:hover::after { opacity: 1; transform: translateX(-50%) scale(1); }
.bar-label { font-size: 0.78rem; color: var(--muted); font-weight: 500; }

.sources { display: grid; gap: 12px; }
.source { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; border-radius: 11px; background: var(--bg-subtle); border: 1px solid var(--border); }
.source .s-left { display: flex; align-items: center; gap: 12px; }
.source .s-logo { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 0.78rem; background: var(--surface); border: 1px solid var(--border); color: var(--primary); }
.source .s-name { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.source .s-meta { font-size: 0.78rem; color: var(--muted); }

/* ============================================================
   Drag & Drop CSV Upload Uploader
   ============================================================ */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-card);
  padding: 24px;
  text-align: center;
  background: var(--surface);
  transition: all 0.25s ease;
  cursor: pointer;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.dropzone [data-lucide] {
  width: 36px; height: 36px;
  color: var(--primary);
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}
.dropzone:hover [data-lucide] {
  transform: translateY(-2px);
}
.dropzone h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.dropzone p { font-size: 0.85rem; color: var(--muted); }

/* scanning scanner laser line animation */
.dropzone .scanner {
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 10px var(--primary);
  animation: scan 1.8s linear infinite;
  display: none;
}
@keyframes scan {
  0% { top: 0; }
  50% { top: 100%; }
  100% { top: 0; }
}

/* ============================================================
   Detailed Reconciliation Slide-Over Panel
   ============================================================ */
.slide-over {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 480px;
  background: var(--surface);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  border-left: 1px solid var(--border);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}
.slide-over.open {
  transform: translateX(0);
}
.slide-over-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.slide-over-header h2 { font-size: 1.25rem; font-weight: 800; }
.slide-over-close {
  background: none; border: 0; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; transition: background 0.15s ease;
}
.slide-over-close:hover { background: var(--bg-subtle); color: var(--text); }
.slide-over-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.slide-over-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

.comparison-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.comp-side {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.comp-title { font-size: 0.72rem; text-transform: uppercase; font-weight: 700; color: var(--muted); letter-spacing: 0.05em; margin-bottom: 8px; display: flex; align-items: center; gap: 5px;}
.comp-val { font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; }
.comp-desc { font-size: 0.8rem; color: var(--text-2); word-break: break-word; }

.discrepancy-card {
  background: var(--warning-soft);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--warning);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 500;
}
.discrepancy-card.match-ok {
  background: var(--success-soft);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--success);
}
.discrepancy-card [data-lucide] { flex-shrink: 0; }

.slide-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.slide-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   Interactive Sources Connection Modal
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 28px;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
}
.modal-backdrop.open .modal-frame {
  transform: translateY(0) scale(1);
}
.modal-frame h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.modal-frame p { font-size: 0.9rem; color: var(--muted); margin-bottom: 20px; }

.source-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.source-opt {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.source-opt:hover {
  border-color: var(--primary);
  background: var(--surface);
}
.source-opt.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}
.source-opt-logo {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; color: var(--primary);
}

.sync-progress-container {
  display: none;
  text-align: center;
  padding: 20px 0;
}
.progress-bar-bg {
  height: 6px; background: var(--bg-muted); border-radius: 50px; overflow: hidden; margin: 16px 0 8px;
}
.progress-bar-fill {
  height: 100%; width: 0%; background: var(--gradient); border-radius: 50px; transition: width 0.1s linear;
}
.sync-status-lbl { font-size: 0.85rem; font-weight: 600; color: var(--primary); }

/* ============================================================
   AI Copilot Floating Interface
   ============================================================ */
.copilot-trigger {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.5);
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.copilot-trigger:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 14px 28px -4px rgba(124, 58, 237, 0.6);
}
.copilot-trigger [data-lucide] { width: 26px; height: 26px; }

.copilot-pane {
  position: fixed;
  bottom: 96px; right: 24px;
  width: 380px; height: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}
.copilot-pane.open {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
.copilot-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--gradient);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.copilot-header h3 { font-size: 0.95rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.copilot-header h3 [data-lucide] { width: 18px; height: 18px; }
.copilot-header button { background: none; border: 0; color: rgba(255,255,255,0.8); cursor: pointer; display: flex; }
.copilot-header button:hover { color: #fff; }

.copilot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.chat-msg.ai {
  background: var(--bg-subtle);
  color: var(--text-2);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}
.chat-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s ease;
}
.chat-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.copilot-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}
.copilot-input-area input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  font-family: inherit; font-size: 0.85rem;
  background: var(--bg-subtle);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease;
}
.copilot-input-area input:focus { border-color: var(--primary); background: var(--surface); }
.copilot-input-area button {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff; border: 0;
  display: grid; place-items: center; cursor: pointer; transition: transform 0.15s ease;
}
.copilot-input-area button:hover { transform: scale(1.05); }

/* ============================================================
   Landing — hero product preview (browser mockup)
   ============================================================ */
.hero-preview {
  max-width: 980px;
  margin: 60px auto 0;
  position: relative;
  z-index: 1;
}
.hero-preview::after {
  content: "";
  position: absolute;
  inset: auto 8% -30px 8%;
  height: 60px;
  background: radial-gradient(closest-side, rgba(37,99,235,0.35), transparent 75%);
  filter: blur(20px);
  z-index: -1;
}
.browser {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.browser-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.browser-bar .dot.r { background: #ef4444; }
.browser-bar .dot.y { background: #f59e0b; }
.browser-bar .dot.g { background: #10b981; }
.browser-bar .url {
  margin-left: 12px;
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 14px;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.browser-bar .url [data-lucide] { width: 13px; height: 13px; color: var(--success); }
.browser-body { padding: 22px; background: var(--bg-subtle); }

.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.mini-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow-xs); text-align: left; }
.mini-kpi .l { font-size: 0.72rem; color: var(--muted); font-weight: 500; }
.mini-kpi .v { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }
.mini-kpi .d { font-size: 0.72rem; font-weight: 600; color: var(--success); margin-top: 2px; display: inline-flex; align-items: center; gap: 3px; }
.mini-kpi .d [data-lucide] { width: 12px; height: 12px; }

.mini-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow-xs); }
.mini-panel .mp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mini-panel .mp-head b { font-size: 0.85rem; }
.mini-panel .mp-head span { font-size: 0.72rem; color: var(--muted); }
.mini-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--border); font-size: 0.82rem; }
.mini-row .ml { display: flex; align-items: center; gap: 9px; color: var(--text-2); }
.mini-row .src-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.mini-row .mamt { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }
.mini-bars { display: flex; align-items: flex-end; gap: 8px; height: 70px; margin-top: 4px; }
.mini-bars i { flex: 1; background: var(--gradient); border-radius: 5px 5px 0 0; display: block; }

/* ============================================================
   Stats strip
   ============================================================ */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-strip .s-num { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-strip .s-lbl { color: var(--muted); margin-top: 4px; font-size: 0.95rem; }

/* ============================================================
   Testimonials
   ============================================================ */
.tg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 50px; }
.tcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tcard::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120px circle at var(--x, 0px) var(--y, 0px), rgba(37, 99, 235, 0.12) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 100%);
  pointer-events: none;
}
.tcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.tcard .stars { display: flex; gap: 2px; color: #F59E0B; margin-bottom: 14px; }
.tcard .stars [data-lucide] { width: 16px; height: 16px; fill: #F59E0B; }
.tcard .quote { color: var(--text-2); font-size: 0.97rem; margin-bottom: 20px; flex: 1; }
.tcard .who { display: flex; align-items: center; gap: 12px; }
.tcard .who .av { width: 42px; height: 42px; border-radius: 50%; background: var(--gradient); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }
.tcard .who .nm { font-weight: 700; font-size: 0.9rem; }
.tcard .who .rl { color: var(--muted); font-size: 0.82rem; }

/* ============================================================
   About / Team
   ============================================================ */
.stats-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; text-align: center; }
.stat-big { font-size: 2.7rem; font-weight: 800; letter-spacing: -0.03em; }
.stat-big.grad-num { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-lbl { color: var(--muted); margin-top: 6px; }

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 50px; }
.member { text-align: center; }
.member .m-avatar {
  width: 88px; height: 88px; border-radius: 50%;
  margin: 0 auto 16px; display: grid; place-items: center;
  font-size: 1.6rem; font-weight: 800; color: #fff;
  background: var(--gradient); box-shadow: var(--shadow-lg);
  transition: transform 0.25s ease;
}
.member:hover .m-avatar { transform: scale(1.06) rotate(5deg); }
.member h4 { font-size: 1.05rem; }
.member .role { color: var(--primary); font-size: 0.85rem; font-weight: 600; margin: 3px 0 8px; }
.member p { color: var(--muted); font-size: 0.88rem; }

.mission { max-width: 760px; margin: 0 auto; text-align: center; font-size: 1.2rem; color: var(--text-2); }

/* ============================================================
   Legal
   ============================================================ */
.legal { max-width: 800px; margin: 0 auto; }
.legal .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; padding: 12px 16px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 10px; }
.legal h2 { font-size: 1.5rem; font-weight: 800; margin: 44px 0 14px; padding-bottom: 12px; border-bottom: 2px solid var(--border); letter-spacing: -0.02em; }
.legal h3 { font-size: 1.1rem; margin: 26px 0 8px; color: var(--text); }
.legal p, .legal li { color: var(--text-2); margin-bottom: 12px; }
.legal ul { list-style: disc; padding-left: 22px; }
.legal ul li { margin-bottom: 8px; }
.legal a { color: var(--primary); font-weight: 500; }
.legal a:hover { text-decoration: underline; }

/* ============================================================
   Dashboard - Dropdown
   ============================================================ */
.user-trigger {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 1px solid transparent; border-radius: 50px;
  padding: 5px 8px 5px 14px; cursor: pointer; font-family: inherit;
  transition: background .15s ease, border-color .15s ease;
}
.user-trigger:hover { background: var(--bg-subtle); border-color: var(--border); }
.user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 250px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0; transform: translateY(-8px) scale(0.98);
  pointer-events: none; transition: .18s ease; z-index: 1100;
}
.user-dropdown.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.ud-head { display: flex; align-items: center; gap: 12px; padding: 12px; }
.ud-name { font-weight: 700; font-size: 0.92rem; color: var(--text); }
.ud-email { color: var(--muted); font-size: 0.8rem; }
.ud-plan {
  margin: 0 8px 8px; padding: 8px 12px; border-radius: 9px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 0.8rem; font-weight: 600;
}
.ud-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 9px;
  background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 0.88rem; font-weight: 500; color: var(--text-2);
  text-align: left; transition: background .12s ease, color .12s ease;
}
.ud-item:hover { background: var(--bg-subtle); color: var(--text); }
.ud-item [data-lucide] { width: 17px; height: 17px; }
.ud-logout { color: var(--error); border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; margin-top: 4px; }
.ud-logout:hover { background: var(--error-soft); color: var(--error); }

/* ---------- Demo banner ---------- */
.demo-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--info-soft);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--text-2);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 500;
}
.demo-banner strong { color: var(--text); font-weight: 700; }
.demo-banner [data-lucide] { width: 18px; height: 18px; flex-shrink: 0; color: var(--info); }
.demo-banner a { color: var(--primary); font-weight: 700; text-decoration: underline; }
.demo-banner a:hover { color: var(--primary-dark); }

/* ============================================================
   Fade-in & Responsive
   ============================================================ */
.fade-in { opacity: 0; transform: translateY(22px); transition: opacity .6s cubic-bezier(0.215, 0.61, 0.355, 1), transform .6s cubic-bezier(0.215, 0.61, 0.355, 1); }
.fade-in.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 980px) {
  .grid-3, .steps, .pricing-grid, .kpi-grid, .team-grid, .stats-band { grid-template-columns: repeat(2, 1fr); }
  .dash-cols { grid-template-columns: 1fr; }
  .price-card.popular { transform: none; }
  .tg { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .mini-kpis { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%); transition: transform .3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links > a:not(.btn) { padding: 12px 4px; }
  .nav-links .btn { width: 100%; }
  .nav-links > a.active::after { display: none; }
  .hamburger { display: flex; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-left { padding: 40px 28px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .dash-sidebar { transform: translateX(-100%); }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-container { margin-left: 0; }
  .dash-nav { padding-left: 14px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .grid-3, .steps, .pricing-grid, .team-grid, .kpi-grid, .stats-band { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .chart { gap: 7px; }
  .browser-body { padding: 14px; }
  .mini-kpis { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .hero-preview { margin-top: 40px; }
  .slide-over { max-width: 100%; }
  .comparison-box { grid-template-columns: 1fr; }
  .copilot-pane { width: calc(100vw - 32px); right: 16px; left: 16px; }
}

.view-panel {
  animation: fadeInPanel 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
