/* ── Dashboard base ─────────────────────────────────────────────────────────── */
:root {
  --blue: #1d4ed8;
  --blue-light: #eff6ff;
  --blue-hover: #1e40af;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --surface: #f9fafb;
  --white: #fff;
  --green: #16a34a;
  --green-light: #f0fdf4;
  --red: #dc2626;
  --red-light: #fef2f2;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
}

/* ── Dashboard nav ───────────────────────────────────────────────────────────── */
.dash-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.dash-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}
.dash-nav-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.3px;
}
.dash-nav-logo span { color: var(--blue); }
.dash-nav-steps {
  display: flex;
  gap: 4px;
  margin-left: 24px;
  flex: 1;
}
.dash-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .15s;
}
.dash-step.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.dash-step.done {
  background: var(--green-light);
  color: var(--green);
  border-color: #bbf7d0;
}
.dash-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: rgba(0,0,0,.1);
  flex-shrink: 0;
}
.dash-step.done .dash-step-num { background: var(--green); color: #fff; }
.dash-step.active .dash-step-num { background: rgba(255,255,255,.25); color: #fff; }
.dash-nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.dash-nav-email { font-size: 13px; color: var(--text-muted); }
.dash-nav-logout {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.dash-nav-logout:hover { background: var(--surface); color: var(--text); }

/* ── Dashboard layout ────────────────────────────────────────────────────────── */
.dash-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.dash-header { margin-bottom: 32px; }
.dash-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
  margin-bottom: 4px;
}
.dash-subtitle {
  font-size: 16px;
  color: var(--text-muted);
}

/* ── Tabs ────────────────────────────────────────────────────────────────────── */
.dash-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.dash-tab {
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.dash-tab:hover { color: var(--text); }
.dash-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.dash-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dash-card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-card-icon { font-size: 22px; }

/* ── Badge ───────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.badge-free { background: var(--blue-light); color: var(--blue); }
.badge-paid { background: var(--green-light); color: var(--green); }

/* ── Buttons ──────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all .15s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 6px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Form fields ──────────────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 700; color: var(--text); }
.form-input, .form-select {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
  transition: border-color .15s;
  width: 100%;
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--blue);
}
.form-input-lg { padding: 14px 18px; font-size: 17px; }
.form-hint { font-size: 12px; color: var(--text-muted); }
.form-error { font-size: 13px; color: var(--red); margin-top: 4px; }

/* ── Upgrade banner ──────────────────────────────────────────────────────────── */
.upgrade-banner {
  background: linear-gradient(135deg, var(--blue) 0%, #1e40af 100%);
  border-radius: var(--radius);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  color: #fff;
}
.upgrade-banner-left { display: flex; align-items: center; gap: 14px; }
.upgrade-banner-icon { font-size: 28px; }
.upgrade-banner-title { font-size: 16px; font-weight: 800; }
.upgrade-banner-desc { font-size: 13px; color: #bfdbfe; margin-top: 2px; }
.upgrade-banner-right { flex-shrink: 0; }
.upgrade-banner .btn { background: #fff; color: var(--blue); font-size: 14px; }
.upgrade-banner .btn:hover { background: #f0f9ff; }

/* ── Commission calculator ────────────────────────────────────────────────────── */
.calc-form { margin-bottom: 28px; }
.calc-results {
  display: none;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.calc-results.visible { display: block; }
.calc-results-table {
  width: 100%;
  border-collapse: collapse;
}
.calc-results-table th {
  text-align: left;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.calc-results-table td {
  padding: 14px 20px;
  font-size: 15px;
  background: var(--white);
  border-bottom: 1px solid var(--surface);
}
.calc-results-table tr:last-child td { border-bottom: none; }
.calc-result-label { color: var(--text-muted); }
.calc-result-value { font-weight: 700; font-size: 18px; }
.calc-result-value.positive { color: var(--green); }
.calc-result-value.negative { color: var(--red); }

.calc-summary {
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  margin: 0 20px 20px;
  display: none;
}
.calc-summary.visible { display: block; }
.calc-summary strong { color: var(--blue); }

.calc-cap-compare {
  background: var(--amber-light);
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 0 20px 20px;
  display: none;
}
.calc-cap-compare.visible { display: block; }
.calc-cap-compare h4 { font-size: 14px; font-weight: 800; color: var(--amber); margin-bottom: 8px; }
.calc-cap-compare p { font-size: 14px; color: var(--text); line-height: 1.6; }
.calc-cap-compare strong { color: var(--text); }

/* ── Brokerage cards ─────────────────────────────────────────────────────────── */
.brokerage-results { display: flex; flex-direction: column; gap: 12px; }
.brokerage-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: border-color .15s, box-shadow .15s;
}
.brokerage-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); }
.brokerage-card-body { flex: 1; min-width: 0; }
.brokerage-card-name { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.brokerage-card-location { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.brokerage-card-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.brokerage-meta-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.brokerage-meta-chip.highlight { background: var(--green-light); color: var(--green); border-color: #bbf7d0; }
.brokerage-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.brokerage-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue);
}
.brokerage-card-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: flex-start; }
.brokerage-card-actions .btn { white-space: nowrap; }

/* ── Shortlist ────────────────────────────────────────────────────────────────── */
.shortlist-bar {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.shortlist-label { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; }
.shortlist-items { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.shortlist-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--green-light);
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}
.shortlist-chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--green);
  font-size: 16px;
  line-height: 1;
  padding: 0;
  display: flex;
}
.shortlist-empty { font-size: 13px; color: var(--text-muted); font-style: italic; }

/* ── Checklist ────────────────────────────────────────────────────────────────── */
.checklist-section { margin-bottom: 20px; }
.checklist-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  user-select: none;
  transition: background .15s;
}
.checklist-section-header:hover { background: var(--border); }
.checklist-section-icon { font-size: 18px; }
.checklist-section-toggle { margin-left: auto; font-size: 14px; color: var(--text-muted); }
.checklist-questions { display: none; padding: 16px 18px; }
.checklist-questions.open { display: block; }
.checklist-item { padding: 10px 0; border-bottom: 1px solid var(--surface); }
.checklist-item:last-child { border-bottom: none; }
.checklist-item-question { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.checklist-item-why { font-size: 13px; color: var(--blue); font-style: italic; line-height: 1.5; }

/* ── Email template ──────────────────────────────────────────────────────────── */
.email-template-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.email-template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.email-template-label { font-size: 14px; font-weight: 700; }
.email-template-body {
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  font-family: -apple-system, 'Segoe UI', Roboto, monospace;
  background: var(--white);
}
.email-template-actions {
  padding: 12px 18px;
  display: flex;
  gap: 10px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* ── Explainer ────────────────────────────────────────────────────────────────── */
.explainer-section { margin-bottom: 28px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.explainer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--white);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  user-select: none;
}
.explainer-header:hover { background: var(--surface); }
.explainer-content { display: none; padding: 20px; background: var(--blue-light); border-top: 1px solid var(--border); font-size: 14px; line-height: 1.8; }
.explainer-content.open { display: block; }
.explainer-content h4 { font-size: 14px; font-weight: 800; color: var(--blue); margin-bottom: 8px; margin-top: 16px; }
.explainer-content h4:first-child { margin-top: 0; }
.explainer-content p { color: var(--text); margin-bottom: 10px; }
.explainer-content code { background: rgba(29,78,216,.1); padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* ── Profile page ────────────────────────────────────────────────────────────── */
.profile-hero {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.profile-hero-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.profile-name { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; }
.profile-location { font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.profile-section { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 16px; box-shadow: var(--shadow); }
.profile-section-title { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-stat { background: var(--surface); border-radius: 8px; padding: 12px 16px; }
.profile-stat-label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.profile-stat-value { font-size: 18px; font-weight: 800; color: var(--text); }
.profile-stat-value.good { color: var(--green); }
.profile-training-text { font-size: 14px; color: var(--text); line-height: 1.7; }

/* ── Compare table ───────────────────────────────────────────────────────────── */
.compare-table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.compare-table th {
  text-align: left;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  background: var(--surface);
  border-bottom: 2px solid var(--border);
}
.compare-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:first-child { font-weight: 700; color: var(--text-muted); font-size: 13px; }
.compare-table td:not(:first-child) { font-weight: 600; }
.compare-table .best-cell { background: var(--green-light); }
.compare-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--green-light);
  color: var(--green);
}

/* ── Auth pages ──────────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
}
.auth-logo { font-size: 22px; font-weight: 800; color: var(--text); text-decoration: none; margin-bottom: 28px; display: block; letter-spacing: -0.3px; }
.auth-logo span { color: var(--blue); }
.auth-title { font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 6px; letter-spacing: -0.3px; }
.auth-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-divider { text-align: center; font-size: 13px; color: var(--text-muted); margin: 16px 0; }
.auth-divider a { color: var(--blue); font-weight: 600; text-decoration: none; }
.auth-error-box { background: var(--red-light); border: 1px solid #fca5a5; border-radius: 8px; padding: 12px 14px; font-size: 14px; color: var(--red); margin-bottom: 16px; }

/* ── No results ──────────────────────────────────────────────────────────────── */
.no-results {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.no-results-icon { font-size: 48px; margin-bottom: 12px; }
.no-results-title { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.no-results-text { font-size: 14px; }

/* ── Journey Shell (sidebar layout) ─────────────────────────────────────────── */
.dashboard-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: sticky;
  top: 0;
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 24px;
  border-bottom: 1px solid #1e293b;
}

.sidebar-brand {
  font-size: 16px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.3px;
}

.sidebar-progress {
  padding: 20px 20px 12px;
}

.progress-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.progress-track {
  height: 4px;
  background: #1e293b;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #f59e0b;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.step-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.15s;
}

.step-active { background: rgba(245,158,11,0.12); }
.step-item:hover:not(.step-locked):not(.step-completed) { background: rgba(255,255,255,0.05); }

.step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-active .step-icon { background: #f59e0b; }
.step-completed .step-icon { background: rgba(245,158,11,0.15); }

.step-num {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.step-active .step-num { color: #0f172a; }

.step-label {
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  display: block;
  line-height: 1.3;
  transition: color 0.15s;
}

.step-active .step-label { color: #f59e0b; font-weight: 600; }
.step-completed .step-label { color: #cbd5e1; }
.step-label:hover { color: #f1f5f9 !important; }
.step-label-locked { color: #475569 !important; cursor: default; }

.sidebar-footer {
  padding: 16px 20px 0;
  border-top: 1px solid #1e293b;
  margin-top: 16px;
}

.sidebar-subscription {
  padding: 12px 20px 0;
}

.sub-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}

.sub-link:hover {
  color: #f1f5f9;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #334155;
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 600; color: #f1f5f9; }
.user-email { font-size: 11px; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.logout-form { display: flex; }
.logout-btn { background: none; border: none; font-size: 12px; color: #475569; cursor: pointer; padding: 0; font-family: inherit; transition: color 0.15s; }
.logout-btn:hover { color: #f1f5f9; }

.legacy-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: #f59e0b;
  color: #0f172a;
  margin-top: 3px;
  letter-spacing: 0.3px;
}

/* Main content */
.main-content {
  flex: 1;
  padding: 40px 48px;
  max-width: 820px;
}

.gate-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #92400e;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
}

/* Step header */
.step-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245,158,11,0.08);
  color: #d97706;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.step-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
  margin-bottom: 8px;
}

.step-subtitle { color: #64748b; font-size: 15px; margin-bottom: 36px; }

/* Sections */
.section { margin-bottom: 36px; }
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Expandable guide */
.guide-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.guide-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  text-align: left;
  transition: background 0.1s;
}

.guide-toggle:hover { background: #f8fafc; }

.guide-chevron {
  width: 18px;
  height: 18px;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.guide-item.open .guide-chevron { transform: rotate(180deg); }

.guide-body { display: none; padding: 0 18px 18px; border-top: 1px solid #e2e8f0; }
.guide-item.open .guide-body { display: block; }

.guide-body p { font-size: 14px; color: #475569; line-height: 1.7; margin-top: 14px; }
.guide-body p:first-child { margin-top: 14px; }

.math-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 14px 16px;
  font-family: 'SF Mono', 'Fira Mono', monospace;
  font-size: 13px;
  color: #166534;
  margin: 12px 0;
  line-height: 1.8;
}

.email-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
}

.email-box-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #94a3b8; margin-bottom: 8px; }
.email-box pre { font-family: inherit; white-space: pre-wrap; word-break: break-word; color: #334155; }

/* Legacy callout */
.legacy-callout {
  background: #0f172a;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 24px;
  line-height: 1.5;
}
.legacy-callout strong { color: #f1f5f9; }
.legacy-callout a { color: #f59e0b; font-weight: 600; text-decoration: none; }
.legacy-callout a:hover { text-decoration: underline; }

/* Upsell card */
.upsell-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.05);
}

.upsell-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.upsell-card > p { color: #64748b; font-size: 14px; margin-bottom: 20px; line-height: 1.6; }

/* Free upsell variant */
.upsell-free {
  border-color: #e2e8f0;
  background: #f8fafc;
}
.upsell-free h3 { color: #374151; }

/* Paid upsell variant */
.upsell-paid {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 12px rgba(245,158,11,0.12);
}
.upsell-paid h3 { color: #92400e; }
.upsell-paid .upsell-list li svg { color: #d97706; }

.upsell-list { list-style: none; margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.upsell-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: #334155; }
.upsell-list li svg { flex-shrink: 0; margin-top: 1px; color: #16a34a; }

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f59e0b;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.btn-gold:hover { background: #d97706; transform: translateY(-1px); }
.btn-gold:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s;
}
.btn-ghost:hover { background: #f1f5f9; }

.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s;
}
.btn-ghost-sm:hover { background: #f1f5f9; }

/* Module grid */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.module-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.module-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.module-name { font-size: 15px; font-weight: 700; color: #0f172a; }

.module-price-badge {
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  color: #d97706;
  background: rgba(245,158,11,0.08);
  padding: 3px 8px;
  border-radius: 4px;
}

.module-desc { font-size: 13px; color: #64748b; line-height: 1.5; }

/* Conversion table */
.conv-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; }
.conv-table th, .conv-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.conv-table th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #94a3b8; background: #f8fafc; }
.conv-table td { color: #334155; }
.conv-table tr:last-child td { border-bottom: none; }
.conv-table td:last-child { font-weight: 700; }

/* Script block */
.script-block {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #f59e0b;
  border-radius: 0 12px 12px 0;
  padding: 18px 20px;
  margin: 12px 0;
}
.script-block .script-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #94a3b8; margin-bottom: 6px; }
.script-block p { font-size: 12px; color: #94a3b8; font-style: italic; margin-bottom: 8px; }
.script-block pre { font-family: inherit; font-size: 14px; color: #0f172a; line-height: 1.7; }

/* Complete step */
.complete-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  margin-top: 28px;
}
.complete-btn:hover { border-color: #f59e0b; color: #d97706; }

/* Divider */
.step-divider { height: 1px; background: #e2e8f0; margin: 28px 0; }

/* Responsive */
@media (max-width: 768px) {
  .dashboard-shell { flex-direction: column; }
  .sidebar { width: 100%; min-height: auto; flex-direction: row; padding: 12px 16px; position: static; flex-wrap: wrap; }
  .sidebar-logo { padding: 0; border: none; }
  .sidebar-progress { display: none; }
  .step-nav { flex-direction: row; padding: 0; gap: 0; overflow-x: auto; }
  .step-item { white-space: nowrap; }
  .sidebar-footer { display: none; }
  .main-content { padding: 24px 20px; }
  .step-title { font-size: 22px; }
  .dash-nav-steps { display: none; }
  .dash-container { padding: 20px 16px 48px; }
  .form-grid { grid-template-columns: 1fr; }
  .brokerage-card { flex-direction: column; }
  .brokerage-card-actions { width: 100%; }
  .profile-grid { grid-template-columns: 1fr; }
  .upgrade-banner { flex-direction: column; gap: 16px; }
  .auth-box { padding: 28px 24px; }
  .calc-results-table { font-size: 13px; }
  .calc-results-table th, .calc-results-table td { padding: 10px 12px; }
  .compare-table { min-width: 500px; }
}

/* ── Welcome modal ──────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 48px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.1);
  animation: modalIn 0.25s ease;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  transition: background 0.15s;
}
.modal-close:hover { background: #e2e8f0; color: #0f172a; }

.modal-icon { margin-bottom: 20px; }

.modal-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
  line-height: 1.25;
}

.modal-sub {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 28px;
}

.modal-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }

.modal-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.modal-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f59e0b;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.modal-step-label { font-size: 14px; font-weight: 700; color: #0f172a; margin-bottom: 2px; }
.modal-step-desc { font-size: 12px; color: #94a3b8; line-height: 1.4; }

.modal-note {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal-cta {
  width: 100%;
  justify-content: center;
  font-size: 15px;
  padding: 14px 24px;
}

/* ── Mobile top bar ─────────────────────────────────────────────────────────── */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 50;
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #f1f5f9;
}

.mobile-right { display: flex; align-items: center; gap: 12px; }

.mobile-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245,158,11,0.12);
  padding: 3px 10px;
  border-radius: 20px;
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.mobile-menu-btn:hover { color: #f1f5f9; }

/* ── Mobile nav drawer ─────────────────────────────────────────────────────── */
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: #0f172a;
  z-index: 200;
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav.open { transform: translateX(0); }

.mobile-nav-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  align-self: flex-end;
  padding: 4px;
  margin-bottom: 12px;
}

.mobile-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #f1f5f9;
  padding-bottom: 16px;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 8px;
}

.mobile-step-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.mobile-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.15s;
}
.mobile-step-item.active { background: rgba(245,158,11,0.12); }

.mobile-step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.mobile-step-item.active .mobile-step-icon { background: #f59e0b; color: #0f172a; }
.mobile-step-item.completed .mobile-step-icon { background: rgba(245,158,11,0.15); }

.mobile-step-label {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
}
.mobile-step-label.locked { color: #475569; cursor: default; }
.mobile-step-item.active .mobile-step-label { color: #f59e0b; font-weight: 600; }
.mobile-step-item.completed .mobile-step-label { color: #cbd5e1; }

.mobile-nav-footer {
  padding-top: 16px;
  border-top: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-link {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.mobile-nav-link:hover { background: rgba(255,255,255,0.05); color: #f1f5f9; }

.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.6);
  z-index: 150;
}
.mobile-nav-backdrop.open { display: block; }

/* Mobile: hide desktop sidebar, show topbar */
@media (max-width: 768px) {
  .mobile-topbar { display: flex; }
  .sidebar { display: none; }
  .dashboard-shell { flex-direction: column; }
}

/* ── Step card polish ────────────────────────────────────────────────────────── */
.step-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: box-shadow 0.15s;
}
.step-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }

.step-card-num {
  font-size: 32px;
  font-weight: 800;
  color: #f59e0b;
  line-height: 1;
  min-width: 40px;
}

.step-card-body { flex: 1; }
.step-card-title { font-size: 18px; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.step-card-reason { font-size: 14px; color: #64748b; margin-bottom: 16px; line-height: 1.6; }

.step-card.completed {
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.7;
}
.step-card.completed .step-card-num { color: #94a3b8; }
.step-card.completed .step-card-title { color: #64748b; }

.completed-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

/* ── Journey overview strip ────────────────────────────────────────────────── */
.journey-overview {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 28px;
}

.journey-overview-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
  margin-bottom: 14px;
}

.journey-steps-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.journey-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.journey-step-item.active .journey-step-num { background: #f59e0b; color: #0f172a; }
.journey-step-item.active > div:last-child { color: #0f172a; font-weight: 700; }
.journey-step-item:not(.active) > div:last-child { color: #94a3b8; font-size: 13px; }

.journey-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.journey-step-connector {
  width: 24px;
  height: 1px;
  background: #e2e8f0;
  flex-shrink: 0;
}

/* ── Step CTA cards ─────────────────────────────────────────────────────────── */
.step-cta-row { display: flex; gap: 16px; margin-bottom: 24px; }

.step-cta-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  flex: 1;
}

.step-cta-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #d97706;
  background: rgba(245,158,11,0.08);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.step-cta-title { font-size: 16px; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.step-cta-desc { font-size: 13px; color: #64748b; line-height: 1.5; }
.step-cta-note { font-size: 12px; color: #94a3b8; font-style: italic; margin-top: 8px; }

/* ── Step mark complete ────────────────────────────────────────────────────── */
.step-mark-complete { margin-top: 28px; padding-top: 24px; border-top: 1px solid #e2e8f0; }
.step-mark-hint { font-size: 13px; color: #94a3b8; margin-bottom: 12px; }

/* ── Step header polish ─────────────────────────────────────────────────────── */
.step-header { margin-bottom: 32px; }

.step-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245,158,11,0.1);
  color: #d97706;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
  border: 1px solid rgba(245,158,11,0.2);
}

.step-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
  margin-bottom: 10px;
  line-height: 1.2;
}

.step-subtitle { color: #64748b; font-size: 15px; line-height: 1.7; margin-bottom: 0; }

/* ── Referral widget ───────────────────────────────────────────────────────── */
.referral-widget {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.referral-widget-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.referral-widget-body { flex: 1; }

.referral-widget-title {
  font-size: 14px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 6px;
}

.referral-widget-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #374151;
  margin-bottom: 6px;
}

.referral-widget-stats strong { font-weight: 700; }

.referral-widget-link {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  font-family: monospace;
}

.referral-share-btn {
  font-size: 13px;
  font-weight: 600;
  color: #16a34a;
  text-decoration: none;
}
.referral-share-btn:hover { text-decoration: underline; }

/* ── Toolkit grid ───────────────────────────────────────────────────────────── */
.toolkit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Full-width CTA on mobile */
@media (max-width: 640px) {
  .upsell-card { padding: 20px; }
  .btn-gold, .btn-ghost { width: 100%; justify-content: center; }
  .step-card { padding: 20px; flex-direction: column; }
  .step-card-num { font-size: 28px; }
}