/* PulseOS Design System — Light Theme */
:root {
  --canvas: #F4F4F1;
  --surface: #FFFFFF;
  --sidebar: #F8F8F5;
  --green: #16A34A;
  --green-tint: #EFF7F1;
  --green-dark: #14532D;
  --amber: #D97706;
  --amber-tint: #FEF3C7;
  --neutral: #D0CEC8;
  --stone: #78716C;
  --void: #1C1C1A;
  --muted: #6B7280;
  --border: #E5E3DF;
  --red-tint: #FEE2E2;
  --red: #DC2626;
  --red-dark: #A32D2D;
  --type-white: #FFFFFF;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.10);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--void);
  line-height: 1.5;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }

/* ── NAV ── */
.site-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
  color: var(--void);
}
.nav-logo span { color: var(--green); }
.nav-links {
  display: flex;
  gap: 24px;
  flex: 1;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  color: var(--stone);
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--void); }
.nav-links a.pulse-link { color: var(--green); font-weight: 500; }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.btn-nav {
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.btn-nav-outline {
  background: transparent;
  border: 1.5px solid var(--green);
  color: var(--green);
}
.btn-nav-primary {
  background: var(--green);
  color: var(--type-white);
}
.btn-nav:hover { opacity: 0.85; }

/* ── FOOTER ── */
footer {
  background: var(--void);
  color: var(--type-white);
  padding: 40px 24px;
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo { font-weight: 700; font-size: 16px; }
.footer-logo span { color: var(--green); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.6); }
.footer-links a:hover { color: var(--type-white); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
  text-decoration: none;
}
.btn-primary { background: var(--green); color: var(--type-white); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--green);
  color: var(--green);
}
.btn-neutral {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--void);
}
.btn:hover { opacity: 0.85; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-green { background: var(--green-tint); color: var(--green-dark); }
.badge-amber { background: var(--amber-tint); color: var(--amber); }
.badge-neutral { background: #F5F4F1; color: var(--stone); }
.badge-red { background: var(--red-tint); color: var(--red); }
.badge-new { background: var(--green); color: var(--type-white); }

/* ── STATUS DOTS ── */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-neutral { background: var(--neutral); }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-sm { padding: 16px; border-radius: var(--radius); }

/* ── CONTAINERS ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }

/* ── EYEBROW ── */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 12px;
}
.eyebrow-green { color: var(--green); }

/* ── HEADINGS ── */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.3px; color: var(--void); }
.h1 { font-size: 52px; font-weight: 800; }
.h2 { font-size: 36px; font-weight: 700; }
.h3 { font-size: 22px; font-weight: 700; }
.h4 { font-size: 16px; font-weight: 600; }
.text-green { color: var(--green); }

/* ── TRUST STRIP ── */
.trust-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.avatar-stack { display: flex; }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--type-white);
  margin-left: -8px;
}
.avatar:first-child { margin-left: 0; }
.avatar-bg-1 { background: #3B82F6; }
.avatar-bg-2 { background: #8B5CF6; }
.avatar-bg-3 { background: var(--amber); }
.avatar-bg-4 { background: var(--green); }
.avatar-bg-5 { background: #EC4899; }
.trust-text { font-size: 13px; color: var(--stone); }
.trust-text strong { color: var(--void); }
.stars { color: #F59E0B; font-size: 14px; }

/* ── PORTAL LAYOUT ── */
.portal-shell {
  display: flex;
  min-height: 100vh;
  background: var(--canvas);
}
.portal-sidebar {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 0 0 24px;
}
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 16px;
}
.sidebar-logo span { color: var(--green); }
.sidebar-nav { flex: 1; padding: 20px 0 0; }
.sidebar-nav ul { list-style: none; }
.sidebar-nav-item { position: relative; }
.sidebar-nav-item + .sidebar-nav-item { border-top: 0.5px solid var(--border); }
.sidebar-nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 0;
  font-size: 13px;
  color: var(--stone);
  transition: background 0.1s, color 0.1s;
}
.sidebar-nav-item a:hover { background: var(--canvas); color: var(--void); }
.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--green);
}
.sidebar-nav-item.active a {
  background: var(--green-tint);
  color: var(--green);
  font-weight: 500;
}
.sidebar-pulse-item a { color: var(--green); font-weight: 500; }

/* ── SIDEBAR ICON COMPONENTS ── */
.snav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.snav-icon i { font-size: 18px; line-height: 1; }
.snav-badge {
  background: var(--amber-tint);
  color: var(--amber);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: auto;
}
.snav-pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-left: auto;
  flex-shrink: 0;
}
.sidebar-user {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info { font-size: 12px; line-height: 1.4; }
.sidebar-user-name { font-weight: 600; color: var(--void); }
.sidebar-user-role { color: var(--stone); }

.portal-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.portal-topnav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.portal-topnav-title { font-weight: 600; font-size: 15px; }
.portal-topnav-actions { display: flex; gap: 10px; align-items: center; }
.portal-content { padding: 28px; flex: 1; }

/* ── PORTAL LIVE STATUS ── */
.sidebar-status {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--stone);
  border-bottom: 1px solid var(--border);
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.2);
}

/* ── TABLE ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--stone);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFAF8; }

/* ── LEFT-EDGE BAR ── */
.table-row-with-bar { position: relative; }
.table-row-with-bar td:first-child { padding-left: 22px; }
.edge-bar {
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
}
.edge-amber { background: var(--amber); }
.edge-green { background: var(--green); }
.edge-neutral { background: var(--neutral); }

/* ── PROGRESS BAR ── */
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  width: 100px;
}
.progress-fill { height: 100%; border-radius: 2px; background: var(--green); }
.progress-fill-amber { background: var(--amber); }

/* ── KPI CARDS ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.kpi-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.7px; color: var(--stone); margin-bottom: 6px; }
.kpi-value { font-size: 26px; font-weight: 700; color: var(--void); }
.kpi-sub { font-size: 12px; color: var(--stone); margin-top: 4px; }
.kpi-sub-green { color: var(--green); }

/* ── PULSE STRIP ── */
.pulse-strip {
  background: var(--green);
  color: var(--type-white);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.pulse-strip-logo { font-weight: 700; font-size: 14px; }
.pulse-strip-prompt { flex: 1; }
.pulse-strip-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ── FILTER PILLS ── */
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--stone);
  transition: all 0.15s;
}
.pill.active {
  background: var(--green-tint);
  border-color: var(--green);
  color: var(--green);
  font-weight: 600;
}

/* ── SPLIT AUTH LAYOUT ── */
.auth-shell { min-height: 100vh; display: flex; }
.auth-left {
  width: 480px;
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 56px;
  flex-shrink: 0;
}
.auth-left-green { background: var(--green-tint); }
.auth-right {
  flex: 1;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 48px;
}
.auth-form { width: 100%; max-width: 380px; }
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--void);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--void);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--green); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-btn {
  width: 100%;
  padding: 12px;
  background: var(--green);
  color: var(--type-white);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* ── CHAT UI ── */
.chat-shell { display: flex; flex-direction: column; height: 100%; min-height: calc(100vh - 56px); }
.chat-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-messages { flex: 1; padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.chat-bubble {
  max-width: 65%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
}
.bubble-user {
  background: var(--green);
  color: var(--type-white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.bubble-assistant {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--void);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-chips { display: flex; gap: 8px; padding: 0 28px 16px; flex-wrap: wrap; }
.chat-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  color: var(--stone);
  cursor: pointer;
}
.chat-input-bar {
  padding: 14px 28px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}
.chat-input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  font-size: 14px;
  outline: none;
}
.chat-send {
  width: 40px;
  height: 40px;
  background: var(--green);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── REVENUE BAND ── */
.revenue-band {
  background: var(--green);
  color: var(--type-white);
  padding: 20px 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.revenue-metric-label { font-size: 11px; opacity: 0.8; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.revenue-metric-value { font-size: 22px; font-weight: 700; }

/* ── PRICING ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}
.pricing-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pricing-card-pro { border-color: var(--green); }
.pricing-card-header { padding: 24px; }
.pricing-card-header-pro {
  background: var(--green);
  color: var(--type-white);
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.pricing-plan-name { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.pricing-price { font-size: 40px; font-weight: 800; line-height: 1; }
.pricing-price-period { font-size: 14px; color: var(--stone); margin-left: 2px; }
.pricing-sub { font-size: 13px; color: var(--stone); margin-top: 6px; }
.pricing-features { padding: 0 24px 24px; }
.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
}
.pricing-feature:last-child { border-bottom: none; }
.check-green { color: var(--green); font-weight: 700; }
.pricing-cta { padding: 0 24px 24px; }

/* ── COMPARISON TABLE ── */
.comparison-table { width: 100%; border-collapse: collapse; margin-top: 48px; }
.comparison-table th {
  padding: 14px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--void);
  border-bottom: 2px solid var(--border);
}
.comparison-table th:first-child { text-align: left; }
.comparison-table td {
  padding: 12px 20px;
  text-align: center;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  color: var(--stone);
}
.comparison-table td:first-child { text-align: left; color: var(--void); font-weight: 500; }
.comparison-row-pulse td { background: var(--green-tint); color: var(--green-dark); font-weight: 500; }
.comparison-row-pulse td:first-child { color: var(--green); font-weight: 700; }

/* ── TOGGLE ── */
.billing-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  padding: 4px;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  width: fit-content;
  margin: 0 auto 40px;
}
.toggle-option {
  padding: 7px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--stone);
  transition: all 0.15s;
  user-select: none;
}
.toggle-option.active {
  background: var(--green);
  color: var(--type-white);
  font-weight: 600;
}

/* ── STATS BAR ── */
.stats-bar {
  display: flex;
  gap: 40px;
  align-items: center;
}
.stat-item { text-align: center; }
.stat-number { font-size: 28px; font-weight: 800; color: var(--void); }
.stat-label { font-size: 12px; color: var(--stone); margin-top: 2px; }

/* ── FEATURE SECTIONS ── */
.feature-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.feature-section.reverse { direction: rtl; }
.feature-section.reverse > * { direction: ltr; }

/* ── ACTIVITY FEED ── */
.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.activity-time { font-size: 11px; color: var(--stone); }

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}
.timeline-item { position: relative; padding: 0 0 20px 16px; }
.timeline-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--surface);
}
.timeline-label { font-size: 12px; color: var(--stone); margin-bottom: 2px; }
.timeline-content { font-size: 13.5px; }

/* ── WAVEFORM ── */
.waveform {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
}
.wave-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--green);
  opacity: 0.5;
}

/* ── STRENGTH METER ── */
.strength-meter { display: flex; gap: 4px; margin-top: 6px; }
.strength-seg {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: var(--border);
}
.strength-seg.filled { background: var(--green); }
.strength-seg.filled-amber { background: var(--amber); }

/* ── PROGRESS STEP ── */
.step-progress { display: flex; gap: 0; margin-bottom: 28px; }
.step-seg {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 1px;
}
.step-seg.done { background: var(--green); }

/* ── SSO BUTTON ── */
.sso-btn {
  width: 100%;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--void);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-size: 12px;
  color: var(--stone);
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── UTILITIES ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--stone); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.rounded { border-radius: var(--radius); }
.border { border: 1px solid var(--border); }
.shadow { box-shadow: var(--shadow); }
.bg-surface { background: var(--surface); }
.bg-canvas { background: var(--canvas); }
.bg-green-tint { background: var(--green-tint); }

/* ── PORTAL MOBILE BOTTOM NAV (hidden on desktop) ── */
.portal-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--border);
  height: 62px;
  align-items: center;
  justify-content: space-around;
}
.portal-mobile-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--stone);
  padding: 8px 4px 6px;
  flex: 1;
  text-align: center;
  text-decoration: none;
  transition: color 0.15s;
  border-left: 0.5px solid var(--border);
}
.portal-mobile-nav-item:first-child { border-left: none; }
.portal-mobile-nav-item i { font-size: 22px; line-height: 1; }
.portal-mobile-nav-item.active { color: var(--green); font-weight: 500; }
.portal-mobile-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%; right: 20%;
  height: 2px;
  background: var(--green);
  border-radius: 2px 2px 0 0;
}
.snav-pulse-tab { color: var(--green); }
.snav-pulse-tab span { color: var(--green); font-weight: 500; }

/* ── NAV HAMBURGER (hidden on desktop) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--stone);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE NAV PANEL ── */
.mobile-nav-panel {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  z-index: 99;
  padding: 4px 20px 20px;
}
.mobile-nav-panel.open { display: block; }
@media (min-width: 769px) { .mobile-nav-panel { display: none !important; } }
.mobile-nav-list { list-style: none; padding: 0; margin: 0 0 16px; }
.mobile-nav-list li a {
  display: block;
  padding: 13px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--void);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.mobile-nav-list li:last-child a { border-bottom: none; }
.mobile-nav-list li a.pulse-link { color: var(--green); font-weight: 600; }
.mobile-nav-ctas { display: flex; flex-direction: column; gap: 8px; }

/* ── RESPONSIVE — 768px MOBILE ── */
@media (max-width: 768px) {

  /* --- Global nav --- */
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-hamburger { display: flex; }
  .nav-inner { padding: 0 16px; gap: 0; justify-content: space-between; }

  /* --- Container --- */
  .container { padding: 0 20px; }

  /* --- Hero (index.html) --- */
  .hero-section { padding: 40px 0 48px; }
  .hero-h1 { font-size: 38px; letter-spacing: -0.8px; }
  .hero-sub { font-size: 16px; max-width: 100%; margin-bottom: 20px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { text-align: center; justify-content: center; width: 100%; }
  .stats-bar { gap: 20px; justify-content: center; flex-wrap: wrap; }
  .stat-number { font-size: 22px; }
  .trust-strip { flex-wrap: wrap; gap: 8px; }

  /* --- Features (features.html) --- */
  .feature-copy h2 { font-size: 26px; }
  .feature-copy p { font-size: 15px; }

  /* --- Pricing (pricing.html) --- */
  .trust-section { flex-direction: column; gap: 16px; }

  /* --- Auth (signin/signup) --- */
  .auth-shell { flex-direction: column; }
  .auth-left { width: 100%; padding: 40px 24px; min-height: auto; }
  .auth-right { padding: 36px 24px; min-height: auto; }
  .auth-form { max-width: 100%; }
  .form-row { grid-template-columns: 1fr; }

  /* --- Portal shell: hide sidebar, show bottom nav --- */
  .portal-sidebar { display: none; }
  .portal-shell { flex-direction: column; }
  .portal-main { padding-bottom: 70px; }
  .portal-topnav { padding: 12px 16px; height: auto; min-height: 52px; }
  .portal-topnav-title { font-size: 15px; }
  .portal-content { padding: 16px; }
  .portal-mobile-nav { display: flex; }

  /* --- Portal KPIs --- */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* --- Revenue band: 2×2 --- */
  .revenue-band { grid-template-columns: repeat(2, 1fr); padding: 16px; gap: 12px; }
  .revenue-metric-value { font-size: 18px; }

  /* --- Data tables: horizontal scroll --- */
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 520px; }

  /* --- Filter pills: no-wrap scroll --- */
  .filter-pills { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }

  /* --- Chat --- */
  .chat-header { padding: 12px 16px; }
  .chat-messages { padding: 16px; gap: 12px; }
  .chat-bubble { max-width: 85%; }
  .chat-chips { padding: 0 16px 12px; }
  .chat-input-bar { padding: 10px 16px; }

  /* --- Pulse strip --- */
  .pulse-strip { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; }
  .pulse-strip-prompt { font-size: 12px; }
  .pulse-strip-btn { align-self: flex-end; }

  /* --- System banner --- */
  .system-banner { padding: 10px 16px; font-size: 12px; flex-wrap: wrap; }

  /* --- Footer --- */
  .site-footer .container { flex-direction: column; gap: 16px; }
  .footer-links { flex-wrap: wrap; gap: 12px; }
}
