/* ============================================================
   INVOICEFLOW — Landing Page Styles
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary:        #6C8FEF;
  --primary-dark:   #5570CC;
  --primary-light:  #E0E8FD;
  --primary-xlight: #F3F6FE;
  --success:        #34C77B;
  --success-light:  #E1F9ED;
  --warning:        #F5A623;
  --warning-light:  #FEF3C7;
  --danger:         #E5503C;
  --danger-light:   #FDECEB;
  --purple:         #8B6FE0;
  --purple-light:   #EFEBFD;
  --bg:             #F0F2F7;
  --white:          #FFFFFF;
  --surface:        #FFFFFF;
  --text-primary:   #1A1F2E;
  --text-secondary: #4B5468;
  --text-muted:     #5C6478;
  --border:         #DDE3ED;
  --border-light:   #EDF0F5;
  --shadow-sm:      0 1px 2px 0 rgba(0,0,0,.04);
  --shadow:         0 2px 8px -1px rgba(0,0,0,.06);
  --shadow-lg:      0 8px 20px -3px rgba(0,0,0,.07);
  --shadow-xl:      0 16px 30px -5px rgba(0,0,0,.09);
  --radius-sm:      10px;
  --radius:         14px;
  --radius-lg:      18px;
  --radius-xl:      24px;
  --font:           'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease:           0.18s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── NAVBAR ────────────────────────────────────────────────── */
/* Matches app.html .app-header exactly */

.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 0 24px;
  transition: box-shadow var(--ease);
}
.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
.nav-container {
  max-width: 1200px; margin: 0 auto;
  height: 64px; display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 700; color: var(--text-primary);
  text-decoration: none; flex-shrink: 0;
  letter-spacing: -.01em;
}
.nav-logo-icon {
  width: 32px; height: 32px; background: var(--primary);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.nav-logo-icon svg { width: 18px; height: 18px; fill: white; }
.nav-links { display: flex; list-style: none; gap: 2px; flex: 1; }
.nav-links a {
  display: block; padding: 7px 13px; color: var(--text-muted);
  text-decoration: none; font-size: 14px; font-weight: 500;
  border-radius: var(--radius-sm); transition: all var(--ease);
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg); }
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-mobile-btn {
  display: none; background: none; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; padding: 8px; color: var(--text-primary);
  width: 38px; height: 38px; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
  transition: border-color var(--ease), color var(--ease);
}
.nav-mobile-btn:hover { border-color: var(--primary); color: var(--primary); }
.nav-mobile-btn span {
  display: block; width: 18px; height: 2px; background: currentColor;
  border-radius: 2px; transition: all .3s;
}

/* ─── BUTTONS ───────────────────────────────────────────────── */
/* Match app.css button system exactly */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer; text-decoration: none; border: none;
  transition: all var(--ease); white-space: nowrap; line-height: 1;
}
.btn-ghost {
  background: var(--surface); color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-xlight); }
.btn-primary { background: var(--primary); color: white; border: 1.5px solid transparent; }
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(108,143,239,.35);
  transform: translateY(-1px);
}
.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: var(--radius); }
.btn-white { background: white; color: var(--primary); box-shadow: var(--shadow); border: 1.5px solid transparent; }
.btn-white:hover { background: var(--primary-xlight); }
.btn-outline-white {
  background: transparent; color: white;
  border: 1.5px solid rgba(255,255,255,.5);
}
.btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: white; }

/* ─── HERO ───────────────────────────────────────────────────── */

.hero {
  padding: 140px 24px 80px;
  background: linear-gradient(180deg, var(--primary-xlight) 0%, var(--bg) 65%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -220px; right: -180px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(108,143,239,.09) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: -80px; left: -80px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(16,185,129,.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  text-align: center; position: relative; z-index: 1;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-light); color: var(--primary);
  padding: 6px 16px; border-radius: 100px;
  font-size: 13px; font-weight: 600; margin-bottom: 28px;
  border: 1px solid rgba(108,143,239,.2);
}
.badge-dot {
  width: 7px; height: 7px; background: var(--primary);
  border-radius: 50%; animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.7); }
}
.hero h1 {
  font-size: clamp(38px, 6vw, 70px); font-weight: 900;
  line-height: 1.08; letter-spacing: -.03em;
  color: var(--text-primary); margin-bottom: 24px;
  max-width: 900px; margin-left: auto; margin-right: auto;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: clamp(16px, 2vw, 20px); color: var(--text-muted);
  max-width: 580px; margin: 0 auto 40px; line-height: 1.75;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.hero-note { font-size: 13px; color: var(--text-muted); margin-bottom: 56px; }
.hero-note strong { color: var(--success); }

/* Mock App Screenshot */
.hero-screenshot {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 32px 80px rgba(0,0,0,.13), 0 0 0 1px var(--border);
  overflow: hidden; max-width: 980px; margin: 0 auto;
}
.screenshot-bar {
  background: #1E293B; padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
}
.s-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.s-dot.r { background: #FF5F57; }
.s-dot.y { background: #FFBD2E; }
.s-dot.g { background: #28C940; }
.s-url {
  flex: 1; background: rgba(255,255,255,.08); border-radius: 4px;
  height: 24px; margin: 0 10px; display: flex; align-items: center; padding: 0 10px;
}
.s-url span { font-size: 11px; color: rgba(255,255,255,.5); }
.screenshot-body { display: flex; background: #F8FAFC; min-height: 360px; }
.mock-aside {
  width: 195px; background: #242B3A; padding: 18px 0; flex-shrink: 0;
}
.mock-brand {
  padding: 0 16px 16px; font-size: 14px; font-weight: 700; color: white;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 10px;
}
.mock-brand-ico {
  width: 26px; height: 26px; background: var(--primary);
  border-radius: 6px; flex-shrink: 0;
}
.mock-nav { list-style: none; }
.mock-nav li {
  padding: 9px 16px; font-size: 12px; color: #94A3B8;
  display: flex; align-items: center; gap: 9px; cursor: pointer;
}
.mock-nav li.active {
  background: rgba(108,143,239,.18); color: white;
  border-right: 3px solid var(--primary);
}
.mock-nav li .ico { width: 15px; height: 15px; border-radius: 3px; background: currentColor; opacity: .7; flex-shrink: 0; }
.mock-content { flex: 1; padding: 20px; }
.mock-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.mock-page-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.mock-action {
  background: var(--primary); color: white;
  padding: 6px 14px; border-radius: 6px; font-size: 11px; font-weight: 600;
}
.mock-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 16px; }
.mock-kpi {
  background: white; border-radius: 8px; padding: 14px;
  border: 1px solid var(--border);
}
.mock-kpi-label { font-size: 10px; color: var(--text-muted); margin-bottom: 5px; }
.mock-kpi-val { font-size: 19px; font-weight: 700; color: var(--text-primary); }
.mock-kpi-delta { font-size: 9px; color: var(--success); margin-top: 3px; }
.mock-table-wrap {
  background: white; border-radius: 8px; border: 1px solid var(--border); overflow: hidden;
}
.mock-thead, .mock-trow {
  display: grid; grid-template-columns: 2fr 1.2fr 1fr .9fr;
  padding: 9px 14px; gap: 8px; align-items: center;
}
.mock-thead { background: #F8FAFC; border-bottom: 1px solid var(--border); }
.mock-thead span { font-size: 10px; font-weight: 600; color: var(--text-muted); }
.mock-trow { border-bottom: 1px solid #F1F5F9; }
.mock-trow:last-child { border-bottom: none; }
.mock-trow span { font-size: 11px; color: var(--text-secondary); }
.mbadge {
  display: inline-block; padding: 2px 8px; border-radius: 100px;
  font-size: 9px; font-weight: 700;
}
.mbadge.paid    { background: #D1FAE5; color: #065F46; }
.mbadge.sent    { background: #DBEAFE; color: #1E40AF; }
.mbadge.overdue { background: #FEE2E2; color: #991B1B; }
.mbadge.draft   { background: #F3F4F6; color: #374151; }

/* ─── STATS BAR ─────────────────────────────────────────────── */

/* ─── SECTIONS BASE ─────────────────────────────────────────── */

section { padding: 100px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-head { margin-bottom: 60px; }
.section-head.center { text-align: center; }
.section-head.center .section-sub { margin: 0 auto; }
.section-tag {
  display: inline-block; background: var(--primary-light); color: var(--primary);
  padding: 4px 14px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; margin-bottom: 14px;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.15;
  color: var(--text-primary); margin-bottom: 14px;
}
.section-sub {
  font-size: 18px; color: var(--text-muted);
  max-width: 540px; line-height: 1.75;
}

/* ─── FEATURES ───────────────────────────────────────────────── */

.features { background: var(--bg); }
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.feat-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: all var(--ease); position: relative; overflow: hidden;
}
.feat-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--success));
  transform: scaleX(0); transition: transform .3s ease; transform-origin: left;
}
.feat-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.feat-card:hover::after { transform: scaleX(1); }
.feat-icon {
  width: 52px; height: 52px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.feat-icon.blue   { background: var(--primary-light); }
.feat-icon.green  { background: var(--success-light); }
.feat-icon.purple { background: var(--purple-light); }
.feat-icon.orange { background: var(--warning-light); }
.feat-icon.pink   { background: #FCE7F3; }
.feat-icon.teal   { background: #CCFBF1; }
.feat-icon svg { width: 26px; height: 26px; }
.feat-card h3 { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.feat-card p { font-size: 15px; color: var(--text-muted); line-height: 1.75; }
.feat-bullets { margin-top: 16px; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.feat-bullets li {
  font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.feat-bullets li::before {
  content: ''; width: 6px; height: 6px;
  background: var(--success); border-radius: 50%; flex-shrink: 0;
}

/* ─── HOW IT WORKS ───────────────────────────────────────────── */

.how { background: var(--bg); }
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 40px; position: relative; }
.steps::before {
  content: '';
  position: absolute; top: 36px;
  left: calc(16.7% + 28px); right: calc(16.7% + 28px);
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary), var(--primary-light));
}
.step { text-align: center; position: relative; z-index: 1; }
.step-num {
  width: 72px; height: 72px; background: var(--primary); color: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; margin: 0 auto 20px;
  box-shadow: 0 10px 28px rgba(108,143,239,.33); position: relative; z-index: 1;
}
.step h3 { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.step p { font-size: 15px; color: var(--text-muted); line-height: 1.75; max-width: 280px; margin: 0 auto; }

/* ─── PRICING ────────────────────────────────────────────────── */

.pricing { background: var(--bg); }
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; align-items: start; }
.price-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px; position: relative;
  transition: all var(--ease);
}
.price-card:not(.popular):hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.price-card.popular {
  background: var(--primary); border-color: var(--primary);
  transform: scale(1.04);
  box-shadow: 0 24px 60px rgba(108,143,239,.32);
}
.pop-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--success); color: white;
  padding: 4px 18px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  white-space: nowrap; text-transform: uppercase;
}
.price-tier {
  font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
}
.price-card.popular .price-tier { color: rgba(255,255,255,.7); }
.price-val { display: flex; align-items: flex-start; gap: 2px; margin-bottom: 6px; }
.price-currency { font-size: 22px; font-weight: 700; color: var(--text-secondary); margin-top: 10px; }
.price-amount { font-size: 54px; font-weight: 800; letter-spacing: -.03em; color: var(--text-primary); line-height: 1; }
.price-period { font-size: 15px; color: var(--text-muted); align-self: flex-end; padding-bottom: 5px; }
.price-card.popular .price-currency,
.price-card.popular .price-amount,
.price-card.popular .price-period { color: white; }
.price-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; line-height: 1.65; }
.price-card.popular .price-desc { color: rgba(255,255,255,.75); }
.price-divider { height: 1px; background: var(--border); margin-bottom: 24px; }
.price-card.popular .price-divider { background: rgba(255,255,255,.2); }
.price-features { list-style: none; display: flex; flex-direction: column; gap: 13px; margin-bottom: 32px; }
.price-features li { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--text-secondary); }
.price-card.popular .price-features li { color: rgba(255,255,255,.9); }
.check { width: 18px; height: 18px; flex-shrink: 0; }
.btn-plan {
  display: block; width: 100%; padding: 12px; text-align: center;
  border-radius: var(--radius); font-size: 14px; font-weight: 700;
  cursor: pointer; border: 1.5px solid transparent; font-family: var(--font);
  text-decoration: none; transition: all var(--ease);
}
.btn-plan-outline {
  background: transparent; color: var(--primary);
  border-color: var(--border);
}
.btn-plan-outline:hover { background: var(--primary); color: white; border-color: var(--primary); }
.btn-plan-white { background: white; color: var(--primary); border-color: rgba(255,255,255,.3); }
.btn-plan-white:hover { background: var(--primary-xlight); }

/* ─── TESTIMONIALS ───────────────────────────────────────────── */

.testimonials { background: var(--bg); }
.test-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.test-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 28px; border: 1.5px solid var(--border);
  transition: all var(--ease);
}
.test-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.test-stars { display: flex; gap: 3px; margin-bottom: 20px; }
.test-stars svg { width: 18px; height: 18px; fill: #F59E0B; }
.test-quote { font-size: 16px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 24px; font-style: italic; }
.test-author { display: flex; align-items: center; gap: 13px; }
.test-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: white; flex-shrink: 0;
}
.av-blue   { background: var(--primary); }
.av-green  { background: var(--success); }
.av-purple { background: var(--purple); }
.test-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.test-role { font-size: 13px; color: var(--text-muted); }

/* ─── FAQ ────────────────────────────────────────────────────── */

.faq { background: var(--surface); }
.faq-list {
  max-width: 720px; margin: 0 auto;
  border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
}
.faq-item { border-bottom: 1.5px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%; background: none; border: none;
  padding: 22px 28px; display: flex; justify-content: space-between;
  align-items: center; gap: 20px; cursor: pointer;
  text-align: left; transition: background var(--ease); font-family: var(--font);
}
.faq-q:hover { background: var(--bg); }
.faq-q-text { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.faq-ico {
  width: 26px; height: 26px; flex-shrink: 0;
  background: var(--primary-light); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--primary);
  transition: transform .3s, background var(--ease);
}
.faq-ico svg { width: 14px; height: 14px; }
.faq-item.open .faq-ico { transform: rotate(45deg); background: var(--primary); color: white; }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0 28px; font-size: 15px; color: var(--text-muted); line-height: 1.8;
}
.faq-item.open .faq-a { max-height: 300px; padding: 0 28px 22px; }

/* ─── CTA BANNER ─────────────────────────────────────────────── */

.cta-banner {
  background: linear-gradient(135deg, #1E3A8A 0%, #6C8FEF 55%, #1D4ED8 100%);
  padding: 100px 24px; text-align: center; position: relative; overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute; inset: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.cta-inner { max-width: 680px; margin: 0 auto; position: relative; z-index: 1; }
.cta-banner h2 {
  font-size: clamp(32px, 5vw, 52px); font-weight: 800; color: white;
  letter-spacing: -.025em; line-height: 1.1; margin-bottom: 18px;
}
.cta-banner p { font-size: 18px; color: rgba(255,255,255,.8); margin-bottom: 40px; line-height: 1.75; }
.cta-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta-fine { margin-top: 18px; font-size: 13px; color: rgba(255,255,255,.5); }

/* ─── FOOTER ─────────────────────────────────────────────────── */

.footer { background: #242B3A; padding: 80px 24px 40px; color: rgba(255,255,255,.55); }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 56px; margin-bottom: 56px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; color: white; margin-bottom: 14px; }
.footer-logo-ico { width: 34px; height: 34px; background: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.footer-logo-ico svg { width: 18px; height: 18px; fill: white; }
.footer-desc { font-size: 14px; line-height: 1.8; max-width: 270px; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: white; margin-bottom: 18px; letter-spacing: .05em; text-transform: uppercase; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,.45); text-decoration: none; transition: color var(--ease); }
.footer-col ul li a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 28px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.footer-copy { font-size: 13px; }
.footer-legal { display: flex; gap: 22px; }
.footer-legal a { font-size: 13px; color: rgba(255,255,255,.4); text-decoration: none; transition: color var(--ease); }
.footer-legal a:hover { color: white; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .features-grid, .test-grid { grid-template-columns: repeat(2,1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .price-card.popular { transform: none; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .stats-inner { grid-template-columns: repeat(2,1fr); }
  .mock-kpis { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .nav-mobile-btn { display: flex; }

  /* ── Mobile menu open state ──────────────────────────────── */
  .navbar.nav-open {
    background: var(--white);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
  }
  .navbar.nav-open .nav-container { flex-wrap: wrap; height: auto; padding-bottom: 16px; }
  .navbar.nav-open .nav-links {
    display: flex; flex-direction: column; gap: 4px;
    width: 100%; order: 3; padding: 8px 0;
    border-top: 1px solid var(--border); margin-top: 4px;
  }
  .navbar.nav-open .nav-links a {
    padding: 12px 16px; font-size: 16px;
    border-radius: var(--radius-sm);
  }
  .navbar.nav-open .nav-actions {
    display: flex; width: 100%; order: 4;
    gap: 10px; padding-top: 8px;
  }
  .navbar.nav-open .nav-actions .btn { flex: 1; justify-content: center; }

  /* Hamburger → X animation */
  .navbar.nav-open .nav-mobile-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .navbar.nav-open .nav-mobile-btn span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .navbar.nav-open .nav-mobile-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero { padding: 120px 24px 56px; }
  .features-grid, .test-grid, .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .mock-aside { display: none; }
  .hero-screenshot { border-radius: var(--radius-lg); }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 34px; }
  .hero-cta { flex-direction: column; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .cta-btns { flex-direction: column; }
  .mock-kpis { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   INTERACTIVE DEMO SECTION
   ═══════════════════════════════════════════════════════════════ */

.demo-section {
  padding: 96px 24px 80px;
  background: linear-gradient(180deg, #F0F7FF 0%, var(--white) 50%);
}

/* ── Step tab pills ──────────────────────────────────────────── */
.demo-steps {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin: 48px 0 24px;
}
.demo-step {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: all var(--ease); white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.demo-step:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-xlight); }
.demo-step.active {
  background: var(--primary); border-color: var(--primary); color: white;
  box-shadow: 0 4px 14px rgba(108,143,239,.4);
}
.ds-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.25); color: white;
}
.demo-step:not(.active) .ds-num { background: var(--bg); color: var(--text-muted); }

/* ── Browser chrome ──────────────────────────────────────────── */
.demo-chrome {
  border: 1.5px solid #CBD5E1; border-radius: var(--radius-xl);
  overflow: hidden; background: var(--white);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.04);
  max-width: 1100px; margin: 0 auto 24px;
}
.demo-chrome-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(180deg, #F1F5F9 0%, #E8EEF5 100%);
  border-bottom: 1px solid #CBD5E1;
}
.demo-dots { display: flex; gap: 6px; flex-shrink: 0; }
.demo-dots span { width: 12px; height: 12px; border-radius: 50%; display: block; }
.demo-dots span:nth-child(1) { background: #FF5F57; }
.demo-dots span:nth-child(2) { background: #FEBC2E; }
.demo-dots span:nth-child(3) { background: #28C840; }
.demo-url-pill {
  flex: 1; display: flex; align-items: center; gap: 6px;
  background: var(--white); border: 1px solid #CBD5E1;
  border-radius: 7px; padding: 5px 12px;
  font-size: 12px; color: var(--text-muted);
  max-width: 360px; margin: 0 auto;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.05);
}
.demo-url-pill svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--success); }
.demo-reset-btn {
  margin-left: auto; flex-shrink: 0;
  padding: 5px 12px; background: white;
  border: 1px solid #CBD5E1; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; transition: all var(--ease);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.demo-reset-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-xlight); }

/* ── App layout ──────────────────────────────────────────────── */
.demo-app-layout { display: flex; height: 580px; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.demo-app-sidebar {
  width: 200px; flex-shrink: 0;
  background: linear-gradient(180deg, #242B3A 0%, #1A2744 100%);
  padding: 0; display: flex; flex-direction: column;
}
.das-brand {
  display: flex; align-items: center; gap: 9px;
  padding: 15px 14px 14px; border-bottom: 1px solid rgba(255,255,255,.08);
  font-weight: 700; font-size: 14px; color: white;
}
.das-brand-ico {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, #6C8FEF, #60A5FA);
  border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(108,143,239,.6);
}
.das-brand-ico svg { width: 16px; height: 16px; fill: white; }
.das-nav { list-style: none; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.das-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; font-size: 13px;
  color: rgba(255,255,255,.45); cursor: pointer; transition: all .15s ease;
}
.das-nav-item svg { width: 15px; height: 15px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.das-nav-item:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); }
.das-nav-item.active { background: rgba(108,143,239,.35); color: white; }
.das-nav-item.active svg { stroke: #93C5FD; }

/* ── Panel fade-in ───────────────────────────────────────────── */
@keyframes dpFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Panel area ──────────────────────────────────────────────── */
.demo-panels-wrap { flex: 1; overflow: hidden; position: relative; background: #F3F6FB; }
.demo-panel {
  display: none; height: 100%; overflow-y: auto;
  padding: 16px 18px; flex-direction: column; gap: 12px;
}
.demo-panel.active { display: flex; animation: dpFadeIn .22s ease; }
.demo-panel::-webkit-scrollbar { width: 5px; }
.demo-panel::-webkit-scrollbar-track { background: transparent; }
.demo-panel::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 99px; }

/* ── Panel topbar ────────────────────────────────────────────── */
.dp-topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0; padding-bottom: 12px;
  border-bottom: 1px solid #E2E8EF;
}
.dp-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0; }
.dp-topbar-actions { display: flex; gap: 8px; }
.dp-action-btn {
  padding: 7px 14px; background: var(--primary); color: white;
  border: none; border-radius: var(--radius-sm); font-size: 12px;
  font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: all .15s ease;
  box-shadow: 0 1px 4px rgba(108,143,239,.35);
}
.dp-action-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(108,143,239,.4); }
.dp-action-btn.outline { background: none; color: var(--primary); border: 1.5px solid #BFDBFE; box-shadow: none; }
.dp-action-btn.outline:hover { background: var(--primary-xlight); transform: none; box-shadow: none; }

/* ── KPIs ────────────────────────────────────────────────────── */
.dp-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; flex-shrink: 0; }
.dp-kpi {
  background: var(--white); border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius); padding: 13px 14px;
  transition: box-shadow var(--ease), transform var(--ease);
}
.dp-kpi:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.dp-kpi.blue  { border-top-color: #6C8FEF; }
.dp-kpi.green { border-top-color: #10B981; }
.dp-kpi.orange{ border-top-color: #D97706; }
.dp-kpi.purple{ border-top-color: #8B5CF6; }
.dp-kpi.teal  { border-top-color: #0D9488; }

/* ── KPI icon box ────────────────────────────────────────────── */
.dp-kpi-ic {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 9px;
}
.dp-kpi-ic svg { width: 15px; height: 15px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dp-kpi-ic.blue   { background: #EFF6FF; } .dp-kpi-ic.blue svg   { stroke: #6C8FEF; }
.dp-kpi-ic.green  { background: #ECFDF5; } .dp-kpi-ic.green svg  { stroke: #10B981; }
.dp-kpi-ic.orange { background: #FFFBEB; } .dp-kpi-ic.orange svg { stroke: #D97706; }
.dp-kpi-ic.purple { background: #F5F3FF; } .dp-kpi-ic.purple svg { stroke: #8B5CF6; }
.dp-kpi-ic.teal   { background: #F0FDFA; } .dp-kpi-ic.teal svg   { stroke: #0D9488; }

.dp-kpi-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: 4px; }
.dp-kpi-val { font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -.03em; line-height: 1.1; }
.dp-kpi-delta { font-size: 11px; font-weight: 500; margin-top: 5px; }
.dp-kpi-delta.pos { color: #059669; }
.dp-kpi-delta.neu { color: var(--text-muted); }
.dp-kpi-delta.neg { color: #DC2626; }

/* ── Cards ───────────────────────────────────────────────────── */
.dp-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dp-card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, #FAFBFC 0%, #FFFFFF 100%);
}
.dp-card-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.dp-count {
  display: inline-flex; align-items: center;
  background: var(--primary-xlight); color: var(--primary);
  font-size: 11px; font-weight: 700; padding: 1px 8px;
  border-radius: 99px; margin-left: 6px;
}
.dp-link-btn { font-size: 12px; color: var(--primary); background: none; border: none; cursor: pointer; font-weight: 600; }
.dp-link-btn:hover { text-decoration: underline; }

/* ── Table ───────────────────────────────────────────────────── */
.dp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dp-table th {
  text-align: left; padding: 8px 16px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); background: #F5F7FA;
  border-bottom: 2px solid var(--border); white-space: nowrap;
}
.dp-table td {
  padding: 10px 16px; border-bottom: 1px solid #F1F5F9;
  color: var(--text-secondary); vertical-align: middle;
}
.dp-table tbody tr:last-child td { border-bottom: none; }
.dp-table tbody tr:nth-child(even) td { background: #FAFBFC; }
.dp-table tbody tr:hover td { background: #EFF6FF; cursor: default; transition: background .1s; }
.dp-table .mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px; color: #4B5563;
  background: #F3F4F6; padding: 2px 6px; border-radius: 4px; display: inline-block;
}
.dp-table .muted { color: var(--text-muted); font-size: 11px; }

/* ── Customer avatar row ─────────────────────────────────────── */
.dp-cust-row { display: flex; align-items: center; gap: 9px; }
.dp-av {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--av-bg, #EFF6FF); color: var(--av-clr, #6C8FEF);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; letter-spacing: .02em;
  border: 1.5px solid rgba(0,0,0,.06);
}

/* ── Badges ──────────────────────────────────────────────────── */
.dp-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 99px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.dp-badge.paid    { background: #D1FAE5; color: #065F46; }
.dp-badge.sent    { background: #DBEAFE; color: #1D4ED8; }
.dp-badge.overdue { background: #FEE2E2; color: #B91C1C; }
.dp-badge.draft   { background: #F3F4F6; color: #4B5563; }

.dp-type { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 5px; font-size: 10px; font-weight: 600; }
.dp-type.recurring { background: #EFF6FF; color: #1D4ED8; }
.dp-type.one-time  { background: #FFF7ED; color: #C2410C; }

/* ── Search mock ─────────────────────────────────────────────── */
.dp-search-mock {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; background: #F8FAFC; border: 1px solid var(--border);
  border-radius: 7px; font-size: 12px; color: var(--text-muted); min-width: 180px;
}
.dp-search-mock svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ── Invoice Form ────────────────────────────────────────────── */
.dp-form-layout { display: flex; gap: 12px; align-items: flex-start; }
.dp-form-card { flex: 1; }
.dp-form-section { padding: 14px 14px 0; }
.dp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.dp-field { display: flex; flex-direction: column; gap: 4px; }
.dp-field label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); }
.dp-select-mock {
  padding: 7px 10px; background: #EFF6FF; border: 1.5px solid #BFDBFE;
  border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--primary);
  display: flex; align-items: center; justify-content: space-between;
}
.dp-select-mock svg { width: 13px; height: 13px; color: var(--primary); }
.dp-input-mock {
  padding: 7px 10px; background: #F8FAFC; border: 1.5px solid var(--border);
  border-radius: 7px; font-size: 12px; color: var(--text-secondary);
  display: flex; align-items: center;
}
.dp-input-mock.mono { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 11px; }
.dp-line-items { padding: 12px 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.dp-li-head {
  display: grid; grid-template-columns: 3fr 1fr 1fr 1fr;
  gap: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted); padding: 0 8px;
}
.dp-li-row {
  display: grid; grid-template-columns: 3fr 1fr 1fr 1fr;
  gap: 6px; font-size: 12px; padding: 8px;
  background: #F8FAFC; border: 1px solid var(--border); border-radius: 7px; color: var(--text-secondary);
}
.dp-add-line {
  padding: 8px; background: none; border: 1.5px dashed #CBD5E1;
  border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--primary);
  cursor: pointer; text-align: center; transition: all var(--ease);
}
.dp-add-line:hover { border-color: var(--primary); background: var(--primary-xlight); }
.dp-totals-block {
  padding: 12px 14px; border-top: 2px solid var(--border);
  display: flex; flex-direction: column; gap: 6px; background: #FAFBFC;
}
.dp-tot-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.dp-tot-row.grand {
  font-weight: 800; font-size: 15px; color: var(--primary);
  padding-top: 10px; border-top: 2px solid #BFDBFE; margin-top: 4px;
}
.dp-form-side { width: 192px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
.dp-side-block { padding: 14px; }
.dp-side-block h4 { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: 10px; }
.dp-radio-list { display: flex; flex-direction: column; gap: 7px; }
.dp-radio { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); }
.dp-radio-dot {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0; box-sizing: border-box;
}
.dp-radio.on .dp-radio-dot {
  border-color: var(--primary); background: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,143,239,.15);
}
.dp-email-chip { background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: 6px; padding: 8px 10px; font-size: 12px; color: #1D4ED8; font-weight: 500; }
.dp-send-btn {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, #6C8FEF 0%, #3B82F6 100%);
  color: white; border: none; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 14px rgba(108,143,239,.45);
  transition: all var(--ease);
}
.dp-send-btn:hover { background: linear-gradient(135deg, #1D4ED8 0%, #6C8FEF 100%); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(108,143,239,.5); }

/* ── Period tabs ─────────────────────────────────────────────── */
.dp-period-tabs {
  display: flex; gap: 3px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; padding: 3px;
}
.dp-period { padding: 4px 12px; border-radius: 6px; border: none; background: none; font-size: 12px; font-weight: 500; color: var(--text-muted); cursor: pointer; }
.dp-period.active { background: var(--white); color: var(--text-primary); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* ── Bar chart ───────────────────────────────────────────────── */
.dp-bar-chart {
  display: flex; align-items: flex-end; gap: 5px;
  padding: 16px 16px 0; min-height: 250px;
}
.dp-bc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0; }
.dp-bar {
  width: 100%; height: var(--h, 40px); min-height: 4px;
  background: linear-gradient(to top, #6C8FEF 0%, #93C5FD 100%);
  opacity: .45; border-radius: 4px 4px 0 0;
  position: relative; cursor: pointer; transition: opacity .2s, transform .15s;
}
.dp-bar:hover { opacity: 1; transform: scaleY(1.03); transform-origin: bottom; }
.dp-bar-tip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: #1E293B; color: white; font-size: 10px; font-weight: 700;
  padding: 4px 8px; border-radius: 5px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 5;
}
.dp-bar-tip::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: #1E293B;
}
.dp-bar:hover .dp-bar-tip { opacity: 1; }
.dp-bc-current .dp-bar { opacity: 1; background: linear-gradient(to top, #1E40AF 0%, #3B82F6 100%); }
.dp-bl { font-size: 10px; color: var(--text-muted); font-weight: 500; padding: 5px 0 10px; white-space: nowrap; }

/* ── Invoice doc ─────────────────────────────────────────────── */
.dp-inv-doc {
  background: var(--white); border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg); padding: 22px 24px;
  max-width: 580px; font-size: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
}
.dp-inv-hd {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 2px solid #EFF6FF;
}
.dp-inv-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--text-primary); }
.dp-inv-logo svg { width: 24px; height: 24px; }
.dp-inv-meta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.dp-inv-meta-rows { display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.dp-inv-meta-rows div { display: flex; gap: 12px; justify-content: flex-end; color: var(--text-muted); }
.dp-inv-meta-rows div strong { color: var(--text-primary); min-width: 80px; text-align: right; }
.dp-inv-parties {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 18px; line-height: 1.75;
}
.dp-inv-parties div {
  padding: 12px 14px; border-radius: var(--radius);
  background: #F8FAFC; border: 1px solid var(--border);
}
.dp-inv-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 5px; }
.dp-inv-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.dp-inv-table th {
  text-align: left; padding: 8px 12px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: white; background: var(--primary);
}
.dp-inv-table th:first-child { border-radius: 6px 0 0 0; }
.dp-inv-table th:last-child  { border-radius: 0 6px 0 0; }
.dp-inv-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.dp-inv-table tbody tr:last-child td { border-bottom: none; }
.dp-inv-table tbody tr:nth-child(even) td { background: #F8FAFC; }
.dp-inv-totals {
  display: flex; flex-direction: column; gap: 7px; align-items: flex-end;
  margin-bottom: 16px; padding: 14px 16px;
  background: #F8FAFC; border-radius: var(--radius); border: 1px solid var(--border);
}
.dp-inv-tr { display: flex; gap: 40px; color: var(--text-muted); font-size: 12px; }
.dp-inv-tr.grand {
  font-weight: 800; font-size: 16px; color: var(--primary);
  padding-top: 10px; border-top: 2px solid #BFDBFE;
  margin-top: 4px; width: 100%; justify-content: flex-end;
}
.dp-inv-footer {
  font-size: 10px; color: var(--text-muted);
  border-top: 1px solid var(--border); padding-top: 12px;
  line-height: 1.75; text-align: center;
}

/* ── Guided tooltip ──────────────────────────────────────────── */
.demo-tooltip {
  max-width: 1100px; margin: 0 auto 36px;
  background: linear-gradient(135deg, #EFF6FF 0%, #F0F9FF 100%);
  border: 1.5px solid #BFDBFE; border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg); padding: 18px 22px;
  display: flex; align-items: flex-start; gap: 16px;
  box-shadow: 0 4px 20px rgba(108,143,239,.1);
}
.demo-tip-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: white; border: 1.5px solid #BFDBFE;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 2px 6px rgba(108,143,239,.15); margin-top: 2px;
}
.demo-tip-icon svg { width: 17px; height: 17px; color: var(--primary); }
.demo-tip-text { flex: 1; font-size: 14px; color: #1E3A8A; line-height: 1.7; margin: 0; font-weight: 500; }
.demo-tip-nav { display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding-top: 2px; }
.demo-nav-btn {
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: all var(--ease);
}
.demo-nav-btn.outlined { background: white; border: 1.5px solid #BFDBFE; color: var(--primary); }
.demo-nav-btn.outlined:disabled { opacity: .4; cursor: default; }
.demo-nav-btn.outlined:not(:disabled):hover { border-color: var(--primary); background: var(--primary-xlight); }
.demo-nav-btn.primary {
  background: var(--primary); border: none; color: white;
  box-shadow: 0 2px 10px rgba(108,143,239,.4);
}
.demo-nav-btn.primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 5px 14px rgba(108,143,239,.45); }
.demo-dots-row { display: flex; gap: 6px; }
.demo-dots-row span {
  width: 8px; height: 8px; border-radius: 50%;
  background: #BFDBFE; transition: all .25s ease; display: block; cursor: pointer;
}
.demo-dots-row span.active { background: var(--primary); transform: scale(1.35); }

/* ── Bottom CTA ──────────────────────────────────────────────── */
.demo-bottom-cta { text-align: center; padding-top: 8px; }
.demo-cta-note { margin-top: 12px; font-size: 13px; color: var(--text-muted); }

/* ── Demo responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dp-kpis { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 860px) {
  .demo-app-sidebar { display: none; }
  .demo-app-layout  { height: auto; min-height: 520px; }
  .demo-panel       { min-height: 520px; height: auto; }
  .dp-form-layout   { flex-direction: column; }
  .dp-form-side     { width: 100%; }
  .dp-inv-parties   { grid-template-columns: 1fr; gap: 10px; }
  .demo-tooltip     { flex-direction: column; gap: 12px; }
  .demo-tip-nav     { width: 100%; justify-content: space-between; }
}
@media (max-width: 600px) {
  .demo-steps  { gap: 6px; }
  .demo-step   { padding: 8px 14px; font-size: 13px; }
  .ds-lbl      { display: none; }
  .dp-kpis     { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .dp-table th:nth-child(2), .dp-table td:nth-child(2) { display: none; }
  .dp-table th:nth-child(4), .dp-table td:nth-child(4) { display: none; }
  .dp-bar-chart { gap: 3px; }
  .dp-bl        { display: none; }
  .dp-field-row { grid-template-columns: 1fr; }
  .dp-li-head span:nth-child(2), .dp-li-row span:nth-child(2) { display: none; }
}

/* ── Step tab pills ──────────────────────────────────────────── */
.demo-steps {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin: 48px 0 28px;
}
.demo-step {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: all var(--ease); white-space: nowrap;
}
.demo-step:hover { border-color: var(--primary); color: var(--primary); }
.demo-step.active { background: var(--primary); border-color: var(--primary); color: white; }
.ds-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.3); font-size: 11px; font-weight: 700;
}
.demo-step:not(.active) .ds-num { background: var(--bg); color: var(--text-secondary); }

/* ── Browser chrome ──────────────────────────────────────────── */
.demo-chrome {
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--white);
  box-shadow: var(--shadow-xl);
  max-width: 1100px; margin: 0 auto 28px;
}
.demo-chrome-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: #F8FAFC;
  border-bottom: 1px solid var(--border);
}
.demo-dots { display: flex; gap: 6px; flex-shrink: 0; }
.demo-dots span { width: 12px; height: 12px; border-radius: 50%; display: block; }
.demo-dots span:nth-child(1) { background: #FF5F57; }
.demo-dots span:nth-child(2) { background: #FEBC2E; }
.demo-dots span:nth-child(3) { background: #28C840; }
.demo-url-pill {
  flex: 1; display: flex; align-items: center; gap: 6px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 12px;
  font-size: 12px; color: var(--text-muted);
  max-width: 360px; margin: 0 auto;
}
.demo-url-pill svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--success); }
.demo-reset-btn {
  margin-left: auto; flex-shrink: 0;
  padding: 5px 12px; background: none;
  border: 1.5px solid var(--border); border-radius: 6px;
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; transition: all var(--ease);
}
.demo-reset-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ── App layout ──────────────────────────────────────────────── */
.demo-app-layout { display: flex; height: 520px; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.demo-app-sidebar {
  width: 196px; flex-shrink: 0; background: #242B3A;
  padding: 0; display: flex; flex-direction: column;
}
.das-brand {
  display: flex; align-items: center; gap: 8px;
  padding: 16px; border-bottom: 1px solid rgba(255,255,255,.08);
  font-weight: 700; font-size: 14px; color: white;
}
.das-brand-ico {
  width: 28px; height: 28px; background: var(--primary); border-radius: 7px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.das-brand-ico svg { width: 16px; height: 16px; color: white; }
.das-nav { list-style: none; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.das-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; font-size: 13px;
  color: rgba(255,255,255,.5); cursor: pointer; transition: all var(--ease);
}
.das-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.das-nav-item:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.85); }
.das-nav-item.active { background: rgba(108,143,239,.4); color: white; }

/* ── Panel area ──────────────────────────────────────────────── */
.demo-panels-wrap { flex: 1; overflow: hidden; position: relative; background: var(--bg); }
.demo-panel { display: none; height: 100%; overflow-y: auto; padding: 18px; flex-direction: column; gap: 14px; }
.demo-panel.active { display: flex; }

/* ── Panel topbar ────────────────────────────────────────────── */
.dp-topbar { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.dp-title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin: 0; }
.dp-topbar-actions { display: flex; gap: 8px; }
.dp-action-btn {
  padding: 7px 13px; background: var(--primary); color: white;
  border: none; border-radius: var(--radius-sm); font-size: 13px;
  font-weight: 600; cursor: pointer; white-space: nowrap; transition: background var(--ease);
}
.dp-action-btn:hover { background: var(--primary-dark); }
.dp-action-btn.outline {
  background: none; color: var(--primary); border: 1.5px solid var(--primary);
}
.dp-action-btn.outline:hover { background: var(--primary-xlight); }

/* ── KPIs ────────────────────────────────────────────────────── */
.dp-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; flex-shrink: 0; }
.dp-kpi {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.dp-kpi-lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 5px; }
.dp-kpi-val { font-size: 20px; font-weight: 800; color: var(--text-primary); letter-spacing: -.02em; }
.dp-kpi-delta { font-size: 11px; margin-top: 3px; }
.dp-kpi-delta.pos { color: var(--success); }
.dp-kpi-delta.neu { color: var(--text-muted); }

/* ── Cards ───────────────────────────────────────────────────── */
.dp-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dp-card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.dp-card-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.dp-count { font-size: 12px; font-weight: 400; color: var(--text-muted); margin-left: 4px; }
.dp-link-btn { font-size: 12px; color: var(--primary); background: none; border: none; cursor: pointer; font-weight: 500; }
.dp-link-btn:hover { text-decoration: underline; }

/* ── Table ───────────────────────────────────────────────────── */
.dp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dp-table th {
  text-align: left; padding: 8px 16px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted);
  background: #FAFBFC; border-bottom: 1px solid var(--border);
}
.dp-table td { padding: 9px 16px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.dp-table tbody tr:last-child td { border-bottom: none; }
.dp-table tbody tr:hover td { background: #FAFBFC; cursor: default; }
.dp-table .mono { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 11px; color: var(--text-muted); }
.dp-table .muted { color: var(--text-muted); }

/* ── Badges ──────────────────────────────────────────────────── */
.dp-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 99px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.dp-badge.paid    { background: var(--success-light); color: #065F46; }
.dp-badge.sent    { background: var(--primary-light);  color: #1E40AF; }
.dp-badge.overdue { background: var(--danger-light);   color: #991B1B; }
.dp-badge.draft   { background: #F3F4F6;               color: #374151; }
.dp-type {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 5px;
  font-size: 10px; font-weight: 600;
}
.dp-type.recurring { background: var(--primary-xlight); color: var(--primary); }
.dp-type.one-time  { background: #FFF7ED; color: #C2410C; }

/* ── Search mock ─────────────────────────────────────────────── */
.dp-search-mock {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; font-size: 12px; color: var(--text-muted); min-width: 180px;
}
.dp-search-mock svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ── Invoice Form ────────────────────────────────────────────── */
.dp-form-layout { display: flex; gap: 14px; align-items: flex-start; }
.dp-form-card { flex: 1; }
.dp-form-section { padding: 14px 14px 0; }
.dp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.dp-field { display: flex; flex-direction: column; gap: 4px; }
.dp-field label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.dp-select-mock, .dp-input-mock {
  padding: 7px 10px; background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 7px; font-size: 12px; color: var(--text-primary);
  display: flex; align-items: center; justify-content: space-between;
}
.dp-select-mock svg { width: 13px; height: 13px; color: var(--text-muted); }
.dp-input-mock.mono { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 11px; }
.dp-line-items { padding: 12px 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; }
.dp-li-head {
  display: grid; grid-template-columns: 3fr 1fr 1fr 1fr;
  gap: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted); padding: 0 6px;
}
.dp-li-row {
  display: grid; grid-template-columns: 3fr 1fr 1fr 1fr;
  gap: 6px; font-size: 12px; padding: 7px 6px;
  background: var(--bg); border-radius: 6px; color: var(--text-secondary);
}
.dp-add-line {
  padding: 7px; background: none; border: 1.5px dashed var(--border);
  border-radius: 6px; font-size: 12px; color: var(--primary);
  cursor: pointer; text-align: center;
}
.dp-add-line:hover { border-color: var(--primary); background: var(--primary-xlight); }
.dp-totals-block { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; }
.dp-tot-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.dp-tot-row.grand {
  font-weight: 800; font-size: 14px; color: var(--text-primary);
  padding-top: 8px; border-top: 1px solid var(--border); margin-top: 2px;
}
.dp-form-side { width: 200px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
.dp-side-block { padding: 14px; }
.dp-side-block h4 { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 10px; }
.dp-radio-list { display: flex; flex-direction: column; gap: 7px; }
.dp-radio { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-secondary); cursor: default; }
.dp-radio-dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; }
.dp-radio.on .dp-radio-dot { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 3px rgba(108,143,239,.12); }
.dp-email-chip { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; font-size: 12px; color: var(--text-secondary); }
.dp-send-btn {
  width: 100%; padding: 11px; background: var(--primary); color: white;
  border: none; border-radius: var(--radius-sm); font-size: 13px;
  font-weight: 700; cursor: pointer; transition: background var(--ease);
}
.dp-send-btn:hover { background: var(--primary-dark); }

/* ── Period tabs ─────────────────────────────────────────────── */
.dp-period-tabs {
  display: flex; gap: 3px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; padding: 3px;
}
.dp-period {
  padding: 4px 12px; border-radius: 6px; border: none; background: none;
  font-size: 12px; font-weight: 500; color: var(--text-muted); cursor: pointer;
}
.dp-period.active { background: var(--white); color: var(--text-primary); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ── Bar chart ───────────────────────────────────────────────── */
.dp-bar-chart {
  display: flex; align-items: flex-end; gap: 6px;
  padding: 14px 16px 0; min-height: 180px;
}
.dp-bc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dp-bar {
  width: 100%; height: var(--h, 40px); min-height: 4px;
  background: #BFDBFE; border-radius: 4px 4px 0 0;
  position: relative; cursor: default; transition: background .2s ease;
}
.dp-bar:hover { background: var(--primary); }
.dp-bar-tip {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  background: var(--text-primary); color: white; font-size: 10px; font-weight: 600;
  padding: 3px 6px; border-radius: 4px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 5;
}
.dp-bar:hover .dp-bar-tip { opacity: 1; }
.dp-bc-current .dp-bar { background: var(--primary); }
.dp-bl { font-size: 10px; color: var(--text-muted); font-weight: 500; padding-bottom: 10px; }

/* ── Invoice doc ─────────────────────────────────────────────── */
.dp-inv-doc {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; max-width: 600px; font-size: 12px;
}
.dp-inv-hd { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.dp-inv-logo { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; color: var(--text-primary); }
.dp-inv-logo svg { width: 22px; height: 22px; }
.dp-inv-meta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.dp-inv-meta-rows { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--text-muted); }
.dp-inv-meta-rows div { display: flex; gap: 10px; }
.dp-inv-meta-rows span { min-width: 46px; }
.dp-inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; line-height: 1.7; }
.dp-inv-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 3px; }
.dp-inv-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.dp-inv-table th { text-align: left; padding: 7px 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); }
.dp-inv-table td { padding: 9px 10px; border: 1px solid var(--border); color: var(--text-secondary); }
.dp-inv-totals { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; margin-bottom: 16px; }
.dp-inv-tr { display: flex; gap: 36px; color: var(--text-muted); }
.dp-inv-tr.grand { font-weight: 800; font-size: 14px; color: var(--text-primary); padding-top: 7px; border-top: 2px solid var(--text-primary); margin-top: 2px; }
.dp-inv-footer { font-size: 10px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 12px; line-height: 1.6; }

/* ── Guided tooltip ──────────────────────────────────────────── */
.demo-tooltip {
  max-width: 1100px; margin: 0 auto 40px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px;
  display: flex; align-items: flex-start; gap: 14px;
  box-shadow: var(--shadow);
}
.demo-tip-icon {
  width: 34px; height: 34px; background: var(--primary-xlight); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.demo-tip-icon svg { width: 17px; height: 17px; color: var(--primary); }
.demo-tip-text { flex: 1; font-size: 14px; color: var(--text-secondary); line-height: 1.65; margin: 0; padding-top: 5px; }
.demo-tip-nav { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.demo-nav-btn {
  padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px;
  font-weight: 600; cursor: pointer; white-space: nowrap; transition: all var(--ease);
}
.demo-nav-btn.outlined {
  background: none; border: 1.5px solid var(--border); color: var(--text-secondary);
}
.demo-nav-btn.outlined:disabled { opacity: .4; cursor: default; }
.demo-nav-btn.outlined:not(:disabled):hover { border-color: var(--primary); color: var(--primary); }
.demo-nav-btn.primary { background: var(--primary); border: none; color: white; }
.demo-nav-btn.primary:hover { background: var(--primary-dark); }
.demo-dots-row { display: flex; gap: 6px; }
.demo-dots-row span { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: all var(--ease); display: block; }
.demo-dots-row span.active { background: var(--primary); transform: scale(1.25); }

/* ── Bottom CTA ──────────────────────────────────────────────── */
.demo-bottom-cta { text-align: center; padding-top: 8px; }
.demo-cta-note { margin-top: 12px; font-size: 13px; color: var(--text-muted); }

/* ── Demo responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dp-kpis { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 860px) {
  .demo-app-sidebar { display: none; }
  .demo-app-layout { height: auto; min-height: 540px; }
  .demo-panel { min-height: 540px; height: auto; }
  .dp-form-layout { flex-direction: column; }
  .dp-form-side { width: 100%; }
  .dp-inv-parties { grid-template-columns: 1fr; gap: 12px; }
  .demo-tooltip { flex-direction: column; gap: 12px; }
  .demo-tip-nav { width: 100%; justify-content: space-between; }
}
@media (max-width: 600px) {
  .demo-steps { gap: 6px; }
  .demo-step { padding: 8px 14px; font-size: 13px; }
  .ds-lbl { display: none; }
  .dp-kpis { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .dp-table th:nth-child(2), .dp-table td:nth-child(2) { display: none; }
  .dp-table th:nth-child(4), .dp-table td:nth-child(4) { display: none; }
  .dp-bar-chart { gap: 4px; }
  .dp-bl { display: none; }
  .dp-field-row { grid-template-columns: 1fr; }
  .dp-li-head span:nth-child(2), .dp-li-row span:nth-child(2) { display: none; }
}
