:root {
  --saas-ink: #0f172a;
  --saas-muted: #64748b;
  --saas-line: #e2e8f0;
  --saas-soft: #f8fafc;
  --saas-white: #ffffff;
  --saas-primary: #1d4ed8;
  --saas-primary-dark: #0f172a;
  --saas-success: #15803d;
  --saas-warning: #b45309;
  --saas-danger: #b91c1c;
  --saas-radius: 16px;
  --saas-shadow: 0 14px 35px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--saas-ink); }
a { color: inherit; text-decoration: none; }

/* Landing page */
.landing-body { background: #fff; color: var(--saas-ink); }
.landing-container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.landing-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--saas-line); }
.landing-nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.landing-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.08rem; }
.landing-brand > span { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--saas-primary-dark); color: #fff; font-weight: 800; }
.landing-nav nav, .landing-footer nav { display: flex; align-items: center; gap: 22px; font-size: .94rem; }
.landing-nav nav > a:not(.landing-btn), .landing-footer nav a { color: #334155; }
.landing-btn { border: 1px solid transparent; border-radius: 10px; padding: 12px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.landing-btn:hover { transform: translateY(-1px); }
.landing-btn-dark { background: var(--saas-primary-dark); color: #fff; box-shadow: 0 8px 18px rgba(15, 23, 42, .16); }
.landing-btn-light { background: #fff; border-color: var(--saas-line); color: var(--saas-ink); }
.landing-btn-white { background: #fff; color: var(--saas-primary-dark); }
.full-width { width: 100%; }
.hero { padding: 100px 0 82px; text-align: center; background: radial-gradient(circle at 50% 0%, #eff6ff 0, #fff 48%); }
.hero-content { max-width: 900px; }
.eyebrow, .page-kicker, .section-heading > span { color: #2563eb; font-size: .78rem; text-transform: uppercase; font-weight: 800; letter-spacing: .13em; }
.hero h1 { margin: 18px auto 16px; max-width: 980px; font-size: clamp(2.7rem, 6vw, 5rem); line-height: 1.02; letter-spacing: -.055em; }
.hero p { max-width: 820px; margin: 0 auto; color: var(--saas-muted); font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.hero small { display: block; margin-top: 16px; color: #94a3b8; }
.landing-section { padding: 82px 0; }
.landing-soft { background: var(--saas-soft); border-block: 1px solid #f1f5f9; }
.section-heading { max-width: 720px; margin-bottom: 34px; }
.section-heading h2 { margin: 10px 0 8px; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.08; letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--saas-muted); line-height: 1.7; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px; }
.feature-card { min-height: 230px; padding: 26px; border: 1px solid var(--saas-line); border-radius: var(--saas-radius); background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--saas-shadow); }
.feature-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--saas-line); background: var(--saas-soft); font-size: 1.25rem; }
.feature-card h3 { margin: 22px 0 9px; font-size: 1.06rem; }
.feature-card p { margin: 0; color: var(--saas-muted); line-height: 1.6; font-size: .94rem; }
.steps-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.steps-grid article { padding: 24px; border-radius: var(--saas-radius); background: #fff; border: 1px solid var(--saas-line); }
.steps-grid b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--saas-primary-dark); color: #fff; }
.steps-grid h3 { margin: 18px 0 8px; }
.steps-grid p { color: var(--saas-muted); line-height: 1.55; margin: 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; align-items: stretch; }
.pricing-grid.in-app { grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); }
.pricing-card { position: relative; display: flex; flex-direction: column; padding: 28px; border-radius: var(--saas-radius); border: 1px solid var(--saas-line); background: #fff; }
.pricing-card.featured { border-color: var(--saas-primary-dark); box-shadow: var(--saas-shadow); }
.pricing-badge { position: absolute; top: -13px; left: 24px; background: var(--saas-primary-dark); color: #fff; border-radius: 999px; padding: 6px 11px; font-size: .72rem; font-weight: 800; }
.pricing-card h3 { margin: 0 0 8px; font-size: 1.3rem; }
.pricing-card > p { color: var(--saas-muted); min-height: 66px; line-height: 1.5; }
.price { margin: 16px 0; display: flex; align-items: baseline; gap: 6px; }
.price strong { font-size: 1.75rem; }
.price span { color: var(--saas-muted); }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.pricing-card li { padding: 8px 0; color: #475569; border-bottom: 1px dashed #eef2f7; }
.landing-security { background: #0f172a; color: #fff; }
.security-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 70px; align-items: center; }
.security-grid h2 { font-size: clamp(2rem,4vw,3.3rem); margin: 12px 0; }
.security-grid p { color: #cbd5e1; line-height: 1.7; }
.security-grid ul { display: grid; gap: 14px; list-style: none; margin: 0; padding: 0; }
.security-grid li { padding: 15px 18px; border: 1px solid #334155; border-radius: 12px; background: rgba(255,255,255,.03); }
.landing-cta { padding: 64px 0; background: #2563eb; color: #fff; }
.landing-cta .landing-container { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.landing-cta h2 { margin: 0; font-size: clamp(1.7rem,3vw,2.6rem); }
.landing-footer { border-top: 1px solid var(--saas-line); padding: 30px 0; }
.landing-footer .landing-container { display: flex; align-items: center; gap: 20px; }
.landing-footer span { color: var(--saas-muted); flex: 1; }

/* Auth */
.auth-body { min-height: 100vh; background: #f8fafc; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(340px,.9fr) minmax(480px,1.1fr); }
.auth-brand-panel { padding: clamp(36px,6vw,80px); color: #fff; background: linear-gradient(145deg,#0f172a,#1e293b); display: flex; flex-direction: column; justify-content: space-between; gap: 60px; }
.auth-brand-panel .landing-brand > span { background: #fff; color: #0f172a; }
.auth-brand-panel .eyebrow { color: #93c5fd; }
.auth-brand-panel h1 { margin: 12px 0; font-size: clamp(2.3rem,4vw,4rem); line-height: 1.03; letter-spacing: -.05em; }
.auth-brand-panel p, .auth-brand-panel li { color: #cbd5e1; line-height: 1.65; }
.auth-brand-panel ul { padding-left: 20px; }
.auth-form-panel { padding: 42px 24px; display: grid; place-items: center; }
.auth-card { width: min(460px,100%); background: #fff; border: 1px solid var(--saas-line); border-radius: 20px; box-shadow: var(--saas-shadow); padding: 34px; }
.auth-card-wide { width: min(760px,100%); }
.auth-card h2 { margin: 0 0 7px; font-size: 1.9rem; }
.auth-card > p { margin: 0 0 26px; color: var(--saas-muted); }
.auth-foot { text-align: center; margin: 20px 0 0 !important; }
.auth-foot a { color: #1d4ed8; font-weight: 700; }
.form-grid { display: grid; gap: 18px; }
.form-grid.two-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
.field-full { grid-column: 1/-1; }
.field-row { display: flex; flex-direction: column; gap: 7px; }
.field-row label { font-size: .87rem; font-weight: 700; color: #334155; }
.form-control, .field-row input:not([type=checkbox]), .field-row select, .field-row textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 10px; padding: 11px 13px; background: #fff; font: inherit; color: var(--saas-ink); outline: none; }
.form-control:focus, .field-row input:focus, .field-row select:focus, .field-row textarea:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.checkbox-row { flex-direction: row; flex-wrap: wrap; align-items: center; }
.checkbox-row label { order: 2; }
.checkbox-row input { order: 1; }
.field-error { color: var(--saas-danger); font-size: .82rem; }
.form-error { padding: 12px 14px; margin-bottom: 18px; border-radius: 10px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* In-app SaaS pages */
.brand-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; background: #fff; }
.brand-mark, .btn-primary { background: var(--tenant-primary, #1d4ed8) !important; }
.trial-pill { display: inline-flex; margin-left: 10px; padding: 4px 8px; border-radius: 999px; background: #fff7ed; color: #9a3412; font-size: .72rem; font-weight: 800; border: 1px solid #fed7aa; }
.saas-two-columns { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.8fr); gap: 22px; }
.saas-card { padding: 24px; margin-bottom: 22px; }
.saas-card h2 { margin-top: 0; font-size: 1.12rem; }
.saas-metrics { grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); margin-bottom: 22px; }
.module-chip-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.module-chip { padding: 8px 11px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; font-size: .82rem; font-weight: 700; }
.detail-list { display: grid; gap: 12px; margin: 0; }
.detail-list > div { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 10px; border-bottom: 1px solid #eef2f7; }
.detail-list dt { color: var(--saas-muted); }
.detail-list dd { margin: 0; font-weight: 700; text-align: right; }
.saas-steps { list-style: none; padding: 0; display: grid; gap: 10px; }
.saas-steps li { border-left: 3px solid #cbd5e1; padding: 10px 12px; color: var(--saas-muted); }
.saas-steps li.done { border-color: #16a34a; color: #166534; }
.saas-steps li.active { border-color: #2563eb; color: #1d4ed8; font-weight: 700; }
.stack-list { display: grid; gap: 10px; }
.stack-list article { padding: 13px 14px; border: 1px solid var(--saas-line); border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack-list article > div { display: grid; gap: 3px; }
.stack-list small { color: var(--saas-muted); overflow-wrap: anywhere; }
.status-badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: .74rem; font-weight: 800; }
.status-success { background: #dcfce7; color: #166534; }
.status-warning { background: #ffedd5; color: #9a3412; }
.status-info { background: #dbeafe; color: #1e40af; }
.suspension-card { max-width: 680px; margin: 60px auto; text-align: center; background: #fff; border: 1px solid var(--saas-line); border-radius: 20px; padding: 44px; box-shadow: var(--saas-shadow); }
.suspension-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 20px; background: #fff7ed; color: #c2410c; font-size: 2rem; font-weight: 900; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; }
.header-actions { display: flex; gap: 10px; }

@media (max-width: 1000px) {
  .feature-grid, .pricing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .steps-grid { grid-template-columns: repeat(2,1fr); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 370px; }
  .saas-two-columns { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .landing-container { width: min(100% - 28px,1120px); }
  .landing-nav nav > a:not(.landing-btn) { display: none; }
  .hero { padding: 70px 0 56px; }
  .hero h1 { font-size: 2.7rem; }
  .feature-grid, .pricing-grid, .steps-grid, .security-grid, .form-grid.two-columns { grid-template-columns: 1fr; }
  .landing-cta .landing-container, .landing-footer .landing-container { flex-direction: column; align-items: flex-start; }
  .landing-footer nav { flex-wrap: wrap; }
  .auth-brand-panel { padding: 34px 24px; min-height: 320px; }
  .auth-form-panel { padding: 24px 14px; }
  .auth-card { padding: 24px; }
  .field-full { grid-column: auto; }
  .header-actions, .form-actions { flex-wrap: wrap; }
}
.legal-note { color: var(--saas-muted); font-size: .84rem; line-height: 1.5; }
.legal-note a { color: #1d4ed8; font-weight: 700; }
.legal-page { padding: 80px 0; max-width: 850px; }
.legal-page h1 { font-size: clamp(2.4rem,5vw,4rem); margin: 12px 0 30px; letter-spacing: -.04em; }
.legal-card { border: 1px solid var(--saas-line); border-radius: 18px; padding: 32px; line-height: 1.8; color: #475569; }
.legal-card h2 { color: var(--saas-ink); margin-top: 28px; }
