:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --border: #e5e5ee;
  --text: #14141f;
  --text-muted: #6b6b7a;
  --accent: #5b5fef;
  --accent-2: #8b5cf6;
  --accent-hover: #4a4dd6;
  --accent-soft: #eef0fe;
  --success: #17845a;
  --success-bg: #e6f7ef;
  --warning: #92400e;
  --warning-bg: #fef3c7;
  --danger: #b3261e;
  --danger-bg: #fde8e6;
  --radius: 12px;
  --radius-lg: 20px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 40px;
  --shadow-card: 0 1px 2px rgba(20, 20, 31, 0.04), 0 1px 1px rgba(20, 20, 31, 0.03);
  --shadow-elevated: 0 24px 48px -16px rgba(30, 27, 75, 0.18), 0 4px 12px rgba(30, 27, 75, 0.06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { letter-spacing: -0.015em; }
a { color: var(--accent); }

/* ── Brand mark — reused on the public header, auth cards, and the logged-in shell ── */
.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.brand-lockup .brand-sub { display: block; font-weight: 500; font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.03em; text-transform: uppercase; }

/* ── Public site header (home/login/signup) ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 16px max(24px, calc((100% - 1120px) / 2));
}
.site-header nav { display: flex; gap: 10px; align-items: center; }
.site-header-nav .nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
}
.site-header-nav .nav-link:hover { color: var(--accent); background: var(--accent-soft); }
.site-header-nav .nav-divider { width: 1px; height: 22px; background: var(--border); margin: 0 6px; }
@media (max-width: 900px) {
  .site-header-nav .nav-link, .site-header-nav .nav-divider { display: none; }
}

/* ── Logged-in app shell (dashboard/clients/transactions) ── */
.shell-page { min-height: 100vh; display: flex; flex-direction: column; }
.shell-page .site-footer { flex-shrink: 0; }
.shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 15px max(24px, calc((100% - 1000px) / 2));
}
.shell-nav { display: flex; gap: 22px; align-items: center; }
.shell-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.shell-nav a.active, .shell-nav a:hover { color: var(--accent); }

.shell { flex: 1; max-width: 1000px; margin: 0 auto; padding: 32px 24px 64px; width: 100%; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { font-size: 1.65rem; font-weight: 800; margin: 0 0 4px; }
.page-heading .note { font-size: 0.95rem; }
.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.page-back-link:hover { color: var(--accent); }

label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-top: var(--space-4); }
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: var(--space-2);
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 9px;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
button:hover, .btn:hover { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary, button[type="submit"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(91, 95, 239, 0.55);
}
.btn-primary:hover, button[type="submit"]:hover { filter: brightness(1.06); color: #fff; box-shadow: 0 10px 24px -6px rgba(91, 95, 239, 0.6); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-secondary { background: var(--surface); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn-sm { padding: 7px 13px; font-size: 0.85rem; }
.btn-lg { padding: 13px 26px; font-size: 1rem; border-radius: 10px; }
.btn-full { width: 100%; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); box-shadow: var(--shadow-card); }
.card + .card { margin-top: var(--space-4); }
.section-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: var(--space-5) 0 var(--space-2); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); box-shadow: var(--shadow-card); }
.stat-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); }
.stat-value { font-size: 1.6rem; font-weight: 800; margin-top: 6px; letter-spacing: -0.01em; }
.stat-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.note { color: var(--text-muted); font-size: 0.85rem; }
.error { color: var(--danger); font-size: 0.85rem; min-height: 1.2em; }

.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.01em; }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: var(--bg); color: var(--text-muted); }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; padding: 10px; color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }

.tabs { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); border-bottom: 1px solid var(--border); }
.tab { background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 6px; color: var(--text-muted); font-weight: 600; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab:hover { color: var(--accent); border-color: transparent; border-bottom-color: var(--accent); }

.toast-container { position: fixed; top: 16px; right: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 11px 16px; font-size: 0.85rem; box-shadow: var(--shadow-elevated); }
.toast-success { border-color: var(--success); color: var(--success); }
.toast-warning { border-color: var(--warning); color: var(--warning); }

.actions-row { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; margin-top: var(--space-3); }

/* ══════════════════════════ Marketing / landing page ══════════════════════════ */
.hero {
  text-align: center;
  padding: 72px 24px 88px;
  background:
    radial-gradient(60% 60% at 50% 0%, var(--accent-soft) 0%, transparent 70%);
}
.hero .eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
  letter-spacing: 0.01em;
}
.hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; line-height: 1.12; margin: 0 0 20px; }
.hero h1 .accent-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead { font-size: 1.15rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 34px; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.section { max-width: 1120px; margin: 0 auto; padding: 76px 24px; }
.section-title { text-align: center; font-size: 2rem; font-weight: 800; margin: 0 0 12px; }
.section-subtitle { text-align: center; color: var(--text-muted); max-width: 580px; margin: 0 auto 52px; font-size: 1.02rem; }

.commission-band {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px 32px;
  text-align: center;
  max-width: 1120px;
  margin: 0 auto;
  box-shadow: 0 30px 60px -24px rgba(91, 95, 239, 0.5);
}
.commission-band .big-number { font-size: clamp(3rem, 8vw, 4.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.commission-band .big-label { font-size: 1.1rem; font-weight: 600; opacity: 0.92; margin-top: 10px; }
.commission-band p { max-width: 520px; margin: 20px auto 0; opacity: 0.85; }

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
.step-card { text-align: center; }
.step-number {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem; margin: 0 auto 18px;
}
.step-card h3 { font-size: 1.1rem; margin: 0 0 8px; }
.step-card p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.benefit-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-card); }
.benefit-card .benefit-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.benefit-card h3 { font-size: 1.02rem; margin: 0 0 6px; }
.benefit-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

.final-cta { text-align: center; padding: 88px 24px; }
.final-cta h2 { font-size: 1.9rem; font-weight: 800; margin: 0 0 14px; }
.final-cta p { color: var(--text-muted); margin: 0 0 30px; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 56px 24px 28px; margin-top: auto; }
.footer-top { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand .footer-tagline { color: var(--text-muted); font-size: 0.87rem; margin: 12px 0 0; max-width: 300px; line-height: 1.6; }
.footer-col-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col a { color: var(--text); text-decoration: none; font-size: 0.89rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom .copyright { color: var(--text-muted); font-size: 0.83rem; }
.footer-bottom .footer-product-link { color: var(--text-muted); text-decoration: none; font-size: 0.83rem; font-weight: 600; }
.footer-bottom .footer-product-link:hover { color: var(--accent); }
@media (max-width: 720px) { .footer-top { grid-template-columns: 1fr; gap: 28px; } }

/* ══════════════════════════ Auth pages (login / signup / verify / forgot-password) ══════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-page .site-header, .auth-page .site-footer { flex-shrink: 0; }

/* Simple centered card (verify-otp, forgot-password — mid-flow steps, no marketing panel) */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(70% 55% at 50% 0%, var(--accent-soft) 0%, var(--bg) 65%);
}
.auth-card {
  max-width: 408px;
  width: 100%;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-elevated);
}
.auth-card .logo-mark { display: flex; margin: 0 auto 20px; width: 52px; height: 52px; }
.auth-card h1 { font-size: 1.5rem; margin: 0 0 6px; text-align: center; }
.auth-card .auth-subtitle { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin: 0 0 26px; }
.auth-card .error { text-align: center; }
.auth-card .auth-footer { text-align: center; margin-top: 22px; font-size: 0.88rem; color: var(--text-muted); }
.auth-card .auth-footer a { font-weight: 600; text-decoration: none; }
.auth-card .auth-footer a:hover { text-decoration: underline; }
.auth-card .back-home { display: block; text-align: center; margin-top: 18px; font-size: 0.82rem; color: var(--text-muted); text-decoration: none; }
.auth-card .back-home:hover { color: var(--accent); }

/* Split layout (login, signup — real entry points, benefits panel + form) */
.auth-split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-benefits-panel {
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-benefits-panel h2 { font-size: 1.85rem; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.015em; }
.auth-benefits-panel .lead { opacity: 0.88; margin: 0 0 40px; font-size: 1.02rem; max-width: 400px; }
.auth-benefits-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 24px; max-width: 400px; }
.auth-benefits-list li { display: flex; gap: 14px; align-items: flex-start; }
.auth-benefits-list .check-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.auth-benefits-list strong { display: block; margin-bottom: 3px; font-size: 0.98rem; }
.auth-benefits-list .desc { opacity: 0.82; font-size: 0.87rem; }

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: var(--bg);
}
.auth-form-panel .auth-card { box-shadow: none; border: none; background: transparent; padding: 0; max-width: 380px; }

@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-benefits-panel { display: none; }
  .auth-form-panel { padding: 40px 20px; }
}

/* ══════════════════════════ Article pages (keyword-targeted content) ══════════════════════════ */
.article-wrap { max-width: 720px; margin: 0 auto; padding: 56px 24px 88px; }
.article-wrap .eyebrow { margin-bottom: 18px; }
.article-wrap h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; line-height: 1.2; margin: 0 0 18px; }
.article-wrap .article-lead { font-size: 1.08rem; color: var(--text-muted); margin: 0 0 36px; }
.article-wrap h2 { font-size: 1.35rem; font-weight: 800; margin: 44px 0 14px; }
.article-wrap p { font-size: 1rem; line-height: 1.7; margin: 0 0 18px; }
.article-wrap ul { padding-left: 22px; margin: 0 0 18px; }
.article-wrap li { font-size: 1rem; line-height: 1.7; margin-bottom: 8px; }
.article-wrap .article-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin: 44px 0;
  box-shadow: var(--shadow-card);
}
.article-wrap .article-cta h3 { margin: 0 0 8px; font-size: 1.15rem; }
.article-wrap .article-cta p { color: var(--text-muted); margin: 0 0 18px; }
.related-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

@media (max-width: 560px) {
  .hero { padding: 52px 20px 64px; }
  .section { padding: 56px 20px; }
  .site-header { padding: 18px 20px; }
}
