/* ============================================================
   PULSE CHECK — Design System
   Minimalist SaaS / Stripe-Notion-Typeform aesthetic
   ============================================================ */

/* --- Tokens ------------------------------------------------ */
:root {
  /* Primary */
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;

  /* Neutrals */
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Surfaces */
  --bg:        #ffffff;
  --surface:   #f8fafc;
  --surface-2: #f1f5f9;

  /* Text */
  --text:       #0f172a;
  --text-muted: #64748b;

  /* Misc */
  --radius:      16px;
  --radius-sm:   10px;
  --radius-lg:   24px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:      0 4px 16px rgba(0,0,0,.06);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.08);
  --shadow-blue: 0 8px 30px rgba(37,99,235,.18);
  --transition:  .3s cubic-bezier(.4,0,.2,1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* --- Utilities --------------------------------------------- */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-tag {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--blue-600);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--slate-900);
  letter-spacing: -.02em;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 48px;
}

.text-center { text-align: center; }

.gradient-text {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 30px;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn-primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover {
  background: var(--blue-700);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(37,99,235,.28);
}

.btn-outline {
  background: transparent;
  color: var(--blue-600);
  border: 2px solid var(--blue-200);
}
.btn-outline:hover {
  background: var(--blue-50);
  border-color: var(--blue-400);
  transform: translateY(-2px);
}

.btn-white {
  background: #fff;
  color: var(--blue-600);
  box-shadow: var(--shadow);
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-lg { padding: 16px 38px; font-size: 1rem; }

/* --- Navbar ------------------------------------------------ */
.navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: box-shadow var(--transition), padding var(--transition);
}
.navbar.scrolled {
  box-shadow: 0 1px 12px rgba(0,0,0,.06);
  padding: 10px 0;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -.02em;
}
.logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--slate-900); }

.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--slate-700);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Hero -------------------------------------------------- */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 700px; height: 500px;
  background: radial-gradient(ellipse, rgba(59,130,246,.12) 0%, transparent 70%);
  top: -100px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--slate-900);
  margin-bottom: 20px;
  letter-spacing: -.03em;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-mockup {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.04);
}
.hero-mockup img {
  width: 100%;
  display: block;
}

/* --- How It Works ------------------------------------------ */
.how-it-works {
  padding: 120px 0;
  background: var(--surface);
}

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

.step-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.step-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 10px;
}

.step-card p {
  font-size: .9rem;
  color: var(--text-muted);
}

/* --- Why Section ------------------------------------------- */
.why-section {
  padding: 120px 0;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.benefit-card {
  display: flex;
  gap: 20px;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--slate-200);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.benefit-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.benefit-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--blue-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.benefit-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--slate-800);
}

.benefit-card p {
  font-size: .88rem;
  color: var(--text-muted);
}

/* --- Early Adopter Banner ---------------------------------- */
.promo-banner {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  text-align: center;
  color: #fff;
}

.promo-banner h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.promo-banner p {
  font-size: 1.05rem;
  opacity: .9;
  margin-bottom: 28px;
}

.promo-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .5px;
  margin-bottom: 24px;
}

/* --- CTA Section ------------------------------------------- */
.cta-section {
  padding: 120px 0;
  text-align: center;
}

.cta-section h2 { margin-bottom: 16px; }
.cta-section p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 36px;
}

/* --- Footer ------------------------------------------------ */
.footer {
  border-top: 1px solid var(--slate-200);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-inner p {
  font-size: .85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: .85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--slate-900); }

/* ============================================================
   PRICING PAGE
   ============================================================ */
.pricing-hero {
  padding: 160px 0 40px;
  text-align: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 0 0 120px;
}

.pricing-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.pricing-card.popular {
  border-color: var(--blue-500);
  box-shadow: var(--shadow-blue);
  position: relative;
}
.pricing-card.popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  background: var(--blue-600);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 16px;
  border-radius: 50px;
}

.pricing-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--slate-800);
}

.pricing-price {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 4px;
}
.pricing-price span {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-desc {
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--slate-100);
}

.pricing-features {
  flex: 1;
  margin-bottom: 28px;
}
.pricing-features li {
  font-size: .88rem;
  color: var(--slate-600);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pricing-features li::before {
  content: '✓';
  color: var(--blue-500);
  font-weight: 700;
  font-size: .8rem;
}

.pricing-card .btn { width: 100%; text-align: center; }

/* ============================================================
   DASHBOARD PAGE
   ============================================================ */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 0;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: var(--slate-900);
  color: #fff;
  padding: 28px 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  margin-bottom: 36px;
  font-size: 1.1rem;
  font-weight: 800;
}
.sidebar-logo img {
  width: 28px; height: 28px;
  border-radius: 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--slate-400);
  transition: background var(--transition), color var(--transition);
}
.sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.sidebar-nav a.active {
  color: #fff;
  background: var(--blue-600);
  border-radius: 0;
}

.sidebar-nav a .nav-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* Main Content */
.dash-main {
  flex: 1;
  background: var(--surface);
  padding: 32px 36px;
  overflow-y: auto;
}

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.dash-topbar h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
}

.dash-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--blue-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  color: var(--blue-600);
}

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--slate-900);
}
.stat-card .stat-change {
  font-size: .78rem;
  font-weight: 600;
  margin-top: 4px;
}
.stat-change.up { color: #10b981; }
.stat-change.down { color: #ef4444; }

/* Chart area */
.dash-chart {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.dash-chart h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--slate-800);
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 180px;
}

.bar-chart .bar {
  flex: 1;
  background: linear-gradient(to top, var(--blue-500), var(--blue-300));
  border-radius: 6px 6px 0 0;
  position: relative;
  transition: opacity var(--transition);
  min-width: 0;
}

.bar-chart .bar:hover { opacity: .8; }

.bar-chart .bar-label {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Recent feedback */
.dash-feedback {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.dash-feedback h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--slate-800);
}

.feedback-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--slate-100);
}
.feedback-item:last-child { border-bottom: none; }

.feedback-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.feedback-body { flex: 1; }
.feedback-body strong {
  font-size: .88rem;
  color: var(--slate-800);
}
.feedback-body p {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.feedback-body .feedback-meta {
  font-size: .75rem;
  color: var(--slate-400);
  margin-top: 4px;
}

.feedback-stars {
  color: #f59e0b;
  font-size: .85rem;
  flex-shrink: 0;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   AUTH PAGES (Login / Signup)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
  background: var(--surface);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin: 0 auto 16px;
}

.auth-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.auth-header p {
  font-size: .92rem;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--slate-700);
}

.form-group input,
.form-group textarea,
.form-group select {
  font-family: inherit;
  font-size: .92rem;
  padding: 12px 16px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: .85rem;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.auth-footer-text {
  text-align: center;
  font-size: .88rem;
  color: var(--text-muted);
  margin-top: 24px;
}

.auth-footer-text a {
  color: var(--blue-600);
  font-weight: 600;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--slate-200);
}

.auth-divider span {
  font-size: .78rem;
  color: var(--slate-400);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-hint {
  text-align: center;
  font-size: .82rem;
  color: var(--slate-500);
}

.auth-hint strong {
  color: var(--slate-700);
  font-weight: 600;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease;
  max-width: 360px;
}

.toast.success { background: #059669; }
.toast.error   { background: #dc2626; }
.toast.info    { background: var(--blue-600); }

.toast.hiding {
  animation: toastOut .3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ============================================================
   STAR RATING
   ============================================================ */
.star-rating {
  display: flex;
  gap: 6px;
}

.star {
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--slate-300);
  cursor: pointer;
  transition: color .15s ease, transform .15s ease;
  padding: 0;
  line-height: 1;
}

.star:hover,
.star.active {
  color: #f59e0b;
  transform: scale(1.15);
}

/* ============================================================
   FEEDBACK SUCCESS STATE
   ============================================================ */
.feedback-card {
  max-width: 520px;
}

.feedback-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #059669;
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: popIn .4s cubic-bezier(.175,.885,.32,1.275);
}

@keyframes popIn {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.feedback-success h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 8px;
}

.feedback-success p {
  color: var(--text-muted);
  font-size: .95rem;
}

/* ============================================================
   DASHBOARD — Generate Report Button
   ============================================================ */
.dash-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.reports-list {
  margin-top: 20px;
}

.report-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--slate-100);
}

.report-item:last-child { border-bottom: none; }

.report-item .report-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--slate-800);
}

.report-item .report-meta {
  font-size: .78rem;
  color: var(--slate-400);
}

.report-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.report-badge.completed {
  background: #d1fae5;
  color: #059669;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; width: 100%;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px 0;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }

  .steps-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }

  .hero h1 { font-size: 2rem; }
  .hero { padding: 130px 0 60px; }

  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }

  /* Dashboard mobile */
  .dashboard-layout { flex-direction: column; }
  .sidebar { width: 100%; padding: 16px 0; }
  .sidebar-nav { display: flex; overflow-x: auto; }
  .sidebar-nav a { white-space: nowrap; padding: 10px 16px; }
  .dash-main { padding: 20px 16px; }
}


/* ============================================================
   Pulse Check — User Dashboard Styles
   Premium SaaS dashboard (Stripe / Notion aesthetic)
   ============================================================ */

/* --- Top Navigation ---------------------------------------- */
.ud-topnav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--slate-200);
  height: 64px;
  display: flex;
  align-items: center;
}

.ud-topnav-inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.ud-topnav-left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.ud-topnav-left .logo img { width: 28px; height: 28px; }
.ud-topnav-left .logo { font-size: 1.15rem; }

.ud-nav-links {
  display: flex;
  gap: 6px;
}

.ud-nav-link {
  font-size: .85rem;
  font-weight: 500;
  color: var(--slate-500);
  padding: 8px 14px;
  border-radius: 8px;
  transition: all var(--transition);
}

.ud-nav-link:hover {
  color: var(--slate-900);
  background: var(--slate-50);
}

.ud-nav-link.active {
  color: var(--blue-600);
  background: var(--blue-50);
  font-weight: 600;
}

.ud-upgrade-link {
  color: var(--blue-600) !important;
  font-weight: 600 !important;
}

.ud-topnav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

/* Icon button */
.ud-icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
}
.ud-icon-btn:hover {
  background: var(--slate-100);
}
.ud-icon .emoji { font-size: 1.05rem; }
.ud-notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ef4444;
  position: absolute;
  top: 8px; right: 8px;
  border: 2px solid #fff;
}

/* User menu */
.ud-user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 10px;
  border: 1px solid var(--slate-200);
  cursor: pointer;
  transition: all var(--transition);
}
.ud-user-menu:hover { background: var(--slate-50); }

.ud-user-avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
}

.ud-user-name {
  font-size: .85rem;
  font-weight: 500;
  color: var(--slate-700);
}

.ud-chevron {
  font-size: .7rem;
  color: var(--slate-400);
}

/* Dropdown */
.ud-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 6px;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}
.ud-dropdown.open { display: block; }
.ud-dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--slate-600);
  border-radius: 8px;
  transition: all var(--transition);
}
.ud-dropdown a:hover {
  background: var(--slate-50);
  color: var(--slate-900);
}

/* --- Main Content ------------------------------------------ */
.ud-main {
  margin-top: 64px;
  padding: 32px;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  min-height: calc(100vh - 64px);
  background: var(--surface);
}

body:has(.ud-topnav) {
  background: var(--surface);
}

/* Sections */
.ud-section {
  display: none;
}
.ud-section.active {
  display: block;
  animation: fadeIn .3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ud-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.ud-page-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -.02em;
}

.ud-page-subtitle {
  font-size: .92rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Stat Cards -------------------------------------------- */
.ud-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.ud-stat-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--slate-100);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition);
}
.ud-stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.ud-stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.ud-stat-content {
  flex: 1;
}

.ud-stat-label {
  display: block;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ud-stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -.02em;
}

.ud-stat-trend {
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 4px;
}
.ud-stat-trend.up {
  color: #059669;
  background: #ecfdf5;
}
.ud-stat-trend.down {
  color: #dc2626;
  background: #fef2f2;
}

.ud-stat-badge {
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--blue-50);
  color: var(--blue-600);
  flex-shrink: 0;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* --- Usage Card -------------------------------------------- */
.ud-usage-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--slate-100);
  padding: 24px;
  margin-bottom: 24px;
}

.ud-usage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ud-usage-header h3 {
  font-size: .92rem;
  font-weight: 700;
  color: var(--slate-800);
}

.ud-usage-count {
  font-size: .88rem;
  font-weight: 700;
  color: var(--blue-600);
}

.ud-progress-bar {
  width: 100%;
  height: 10px;
  background: var(--slate-100);
  border-radius: 10px;
  overflow: hidden;
}

.ud-progress-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

.ud-progress-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.ud-usage-footer {
  margin-top: 10px;
  font-size: .82rem;
  color: var(--text-muted);
}

/* --- Charts ------------------------------------------------ */
.ud-charts-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.ud-chart-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--slate-100);
  padding: 24px;
  margin-bottom: 24px;
}

.ud-chart-card h3 {
  font-size: .92rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 16px;
}

.ud-chart-wide { grid-column: 1; }

.ud-donut-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ud-donut-legend {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.ud-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--slate-600);
}

.ud-legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

/* --- Score Bars -------------------------------------------- */
.ud-score-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ud-score-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ud-score-label {
  width: 80px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--slate-600);
  flex-shrink: 0;
}

.ud-score-bar-track {
  flex: 1;
  height: 10px;
  background: var(--slate-100);
  border-radius: 10px;
  overflow: hidden;
}

.ud-score-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width .6s ease;
}

.ud-score-count {
  width: 30px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--slate-500);
  text-align: right;
}

/* --- Tables ------------------------------------------------ */
.ud-table-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--slate-100);
  padding: 24px;
  margin-bottom: 24px;
}

.ud-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ud-table-header h3 {
  font-size: .92rem;
  font-weight: 700;
  color: var(--slate-800);
}

.ud-view-all {
  font-size: .82rem;
  font-weight: 600;
  color: var(--blue-600);
}

.ud-table-scroll { overflow-x: auto; }

.ud-table {
  width: 100%;
  border-collapse: collapse;
}

.ud-table th {
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--slate-100);
}

.ud-table td {
  padding: 14px;
  font-size: .85rem;
  color: var(--slate-700);
  border-bottom: 1px solid var(--slate-50);
  vertical-align: middle;
}

.ud-table tbody tr:hover {
  background: var(--slate-50);
}

.ud-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ud-status-badge.positive { background: #d1fae5; color: #059669; }
.ud-status-badge.neutral  { background: #fef3c7; color: #d97706; }
.ud-status-badge.negative { background: #fef2f2; color: #dc2626; }

.ud-score-stars {
  color: #f59e0b;
  font-size: .88rem;
  letter-spacing: 1px;
}

/* --- Reports Grid ------------------------------------------ */
.ud-reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.ud-report-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--slate-100);
  padding: 24px;
  transition: all var(--transition);
}
.ud-report-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.ud-report-card h4 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 12px;
}

.ud-report-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.ud-report-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--slate-500);
}

.ud-report-meta-row strong {
  color: var(--slate-700);
  font-weight: 600;
}

.ud-report-actions {
  display: flex;
  gap: 8px;
}

.ud-btn-sm {
  padding: 8px 16px;
  font-size: .78rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--slate-200);
  background: #fff;
  color: var(--slate-600);
  cursor: pointer;
  transition: all var(--transition);
}
.ud-btn-sm:hover {
  background: var(--slate-50);
  border-color: var(--slate-300);
}
.ud-btn-sm.primary {
  background: var(--blue-600);
  color: #fff;
  border-color: var(--blue-600);
}
.ud-btn-sm.primary:hover {
  background: var(--blue-700);
}

/* --- Account ------------------------------------------------ */
.ud-account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.ud-account-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--slate-100);
  padding: 28px;
}

.ud-account-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 4px;
}

.ud-plan-info {
  margin: 16px 0;
}

.ud-plan-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blue-600);
}

.ud-plan-detail {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.ud-usage-mini {
  margin-top: 16px;
}

.ud-usage-mini span {
  font-size: .82rem;
  font-weight: 500;
  color: var(--slate-600);
  display: block;
  margin-bottom: 8px;
}

/* --- Upgrade Banner ---------------------------------------- */
.ud-upgrade-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff;
  border-radius: 16px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 720px;
  width: calc(100% - 64px);
  box-shadow: 0 12px 40px rgba(37,99,235,.3);
  z-index: 999;
  animation: slideUp .4s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.ud-upgrade-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ud-upgrade-icon {
  font-size: 1.5rem;
}

.ud-upgrade-content strong {
  display: block;
  font-size: .95rem;
  margin-bottom: 2px;
}

.ud-upgrade-content p {
  font-size: .82rem;
  opacity: .85;
}

/* --- Notifications Panel ----------------------------------- */
.ud-notif-panel {
  position: fixed;
  top: 64px;
  right: 24px;
  width: 340px;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: fadeIn .2s ease;
}

.ud-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--slate-100);
}

.ud-notif-header h4 {
  font-size: .92rem;
  font-weight: 700;
  color: var(--slate-800);
}

.ud-notif-list { max-height: 320px; overflow-y: auto; }

.ud-notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--slate-50);
  transition: background var(--transition);
}
.ud-notif-item:hover { background: var(--slate-50); }

.ud-notif-item.unread { background: var(--blue-50); }

.ud-notif-dot-small {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue-500);
  flex-shrink: 0;
  margin-top: 6px;
}

.ud-notif-item strong {
  font-size: .82rem;
  color: var(--slate-800);
  display: block;
}

.ud-notif-item p {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.ud-notif-item span {
  font-size: .72rem;
  color: var(--slate-400);
  margin-top: 4px;
  display: block;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 1024px) {
  .ud-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .ud-charts-row { grid-template-columns: 1fr; }
  .ud-account-grid { grid-template-columns: 1fr; }
  .ud-nav-links { display: none; } /* TODO: add mobile menu */
}

@media (max-width: 768px) {
  .ud-stat-grid { grid-template-columns: 1fr; }
  .ud-main { padding: 16px; }
  .ud-topnav-inner { padding: 0 16px; }
  .ud-user-name { display: none; }
  .ud-section-header { flex-direction: column; gap: 16px; }
  .ud-upgrade-banner {
    flex-direction: column;
    text-align: center;
    bottom: 16px;
  }
  .ud-reports-grid { grid-template-columns: 1fr; }
  .ud-notif-panel { right: 8px; width: calc(100% - 16px); }
}


/* Master-file helpers */
html, body { min-height: 100%; }
body.master-body { background: var(--bg); }
#app { min-height: 100vh; }
