/* ============================================================
   Sabea MyFinancials — Portal Styles
   Refined editorial aesthetic. Navy + gold + cream.
   ============================================================ */

:root {
  --navy: #12153D;
  --navy-80: #1a1d4c;
  --navy-60: #3a3d6b;
  --navy-40: #6e709a;
  --navy-20: #c2c3d2;
  --gold: #C9A84C;
  --gold-dark: #a88a35;
  --gold-light: #e8d79a;
  --cream: #F8F4EC;
  --cream-warm: #F1EBDD;
  --paper: #FFFFFF;
  --ink: #1a1a1f;
  --ink-60: #5a5a66;
  --ink-40: #9a9aa6;
  --line: #e5e0d4;
  --line-soft: #efeadd;
  --error: #b5362e;
  --success: #2d6a4f;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(18, 21, 61, 0.06);
  --shadow-md: 0 4px 16px rgba(18, 21, 61, 0.08);
  --shadow-lg: 0 12px 40px rgba(18, 21, 61, 0.12);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-dark); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-nav { display: flex; align-items: center; gap: 20px; }
.user-greeting { font-size: 14px; color: var(--ink-60); }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-lg .brand-mark { width: 56px; height: 56px; font-size: 28px; }
.brand-lg .brand-name { font-size: 28px; }
.brand-lg .brand-sub { font-size: 14px; }
.brand-mark {
  width: 38px; height: 38px;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  letter-spacing: -0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-dark);
  font-weight: 500;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary, .btn-ghost, .btn-secondary {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 14px 28px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--navy);
  color: var(--cream);
}
.btn-primary:hover:not(:disabled) {
  background: var(--navy-80);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.btn-primary::after {
  content: '';
  width: 6px; height: 6px;
  border-right: 1.5px solid var(--gold);
  border-top: 1.5px solid var(--gold);
  transform: rotate(45deg);
  margin-left: 6px;
  transition: transform 0.2s;
}
.btn-primary:hover:not(:disabled)::after { transform: rotate(45deg) translateX(2px) translateY(-2px); }
.btn-primary.btn-block { width: 100%; }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  padding: 8px 16px;
  font-size: 14px;
}
.btn-ghost:hover { background: var(--cream-warm); }

.btn-secondary {
  background: var(--paper);
  color: var(--navy);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--navy); }

/* ============================================================
   FORMS
   ============================================================ */
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-60);
  letter-spacing: 0.01em;
}
.input {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(18, 21, 61, 0.08);
}
.input-signature {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
}

/* ============================================================
   SCREEN BASE
   ============================================================ */
.screen { flex: 1; display: block; }
.container, .container-narrow {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}
.container-narrow { max-width: 720px; }

.screen-intro { margin-bottom: 32px; }
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold-dark);
  margin-bottom: 12px;
}
.screen-title {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  line-height: 1.1;
}
.screen-lede {
  font-size: 17px;
  color: var(--ink-60);
  max-width: 620px;
  margin: 0;
  line-height: 1.6;
}
.screen-lede em { color: var(--navy); font-style: italic; }

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-hero {
  background: var(--navy);
  color: var(--cream);
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.login-hero::after {
  content: '';
  position: absolute;
  bottom: 40px; left: 64px;
  width: 64px; height: 2px;
  background: var(--gold);
}
.login-hero .brand-name { color: var(--cream); }
.login-hero .brand-sub { color: var(--gold); }
.login-hero .brand-mark { background: var(--cream); color: var(--navy); }
.hero-inner { max-width: 480px; position: relative; z-index: 1; }
.hero-headline {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 500;
  line-height: 1.05;
  margin: 56px 0 24px;
  letter-spacing: -0.025em;
}
.hero-blurb {
  font-size: 17px;
  color: rgba(248, 244, 236, 0.75);
  margin: 0 0 40px;
  line-height: 1.6;
}
.hero-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(248, 244, 236, 0.85);
}
.dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 32px;
  background: var(--cream);
}
.login-card {
  width: 100%;
  max-width: 420px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  color: var(--navy);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.card-sub {
  font-size: 15px;
  color: var(--ink-60);
  margin: 0 0 32px;
  line-height: 1.55;
}
.login-status {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
}
.login-status.success {
  background: #e8f2ec;
  color: var(--success);
  border: 1px solid #b5d9c2;
}
.login-status.error {
  background: #fbeceb;
  color: var(--error);
  border: 1px solid #e6bdba;
}
.fine-print {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-40);
  line-height: 1.6;
}

/* SSO buttons */
.sso-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.btn-sso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-sso:hover {
  border-color: var(--navy);
  background: var(--cream-warm);
  transform: translateY(-1px);
}
.btn-sso svg { flex-shrink: 0; }
.btn-sso:disabled { opacity: 0.5; cursor: not-allowed; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 20px;
  font-size: 12px;
  color: var(--ink-40);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

@media (max-width: 900px) {
  .login-split { grid-template-columns: 1fr; }
  .login-hero { padding: 40px 28px; min-height: 40vh; }
  .hero-headline { font-size: 36px; margin-top: 32px; }
  .login-form-wrap { padding: 48px 24px; }
}

/* ============================================================
   CONSENT SCREEN
   ============================================================ */
.consent-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.doc-block {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}
.doc-block:first-child { padding-top: 0; }
.doc-icon {
  font-size: 28px;
  width: 48px; height: 48px;
  background: var(--cream-warm);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
}
.doc-body { min-width: 0; }
.doc-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}
.doc-meta {
  font-size: 13px;
  color: var(--ink-40);
  margin-bottom: 10px;
}
.doc-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.doc-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}
.doc-link:hover { color: var(--gold-dark); }
.doc-note {
  font-size: 13px;
  color: var(--ink-40);
  font-style: italic;
}
.doc-check { min-width: 240px; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
}
.checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.checkbox-mark {
  width: 22px; height: 22px;
  border: 1.5px solid var(--navy-40);
  border-radius: 5px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s;
  background: var(--paper);
}
.checkbox input:checked + .checkbox-mark {
  background: var(--navy);
  border-color: var(--navy);
}
.checkbox input:checked + .checkbox-mark::after {
  content: '';
  position: absolute;
  left: 6px; top: 2px;
  width: 6px; height: 11px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
}
.checkbox-label { padding-top: 1px; }

.signature-block {
  margin-top: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}
.sig-meta {
  display: flex;
  gap: 40px;
  margin-top: 16px;
  padding: 16px;
  background: var(--cream-warm);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.sig-meta-label {
  display: block;
  font-size: 11px;
  color: var(--ink-40);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

#consentSubmit { margin-top: 32px; }

.consent-status {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
}
.consent-status.error {
  background: #fbeceb;
  color: var(--error);
  border: 1px solid #e6bdba;
}

@media (max-width: 720px) {
  .consent-card { padding: 28px 20px; }
  .doc-block {
    grid-template-columns: 40px 1fr;
  }
  .doc-check { grid-column: 1 / -1; margin-top: 8px; }
  .doc-icon { width: 40px; height: 40px; font-size: 20px; }
  .screen-title { font-size: 32px; }
}

/* ============================================================
   HUB SCREEN
   ============================================================ */
.hub-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 48px;
}

.progress-ring {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}
.progress-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.progress-track {
  fill: none;
  stroke: var(--line);
  stroke-width: 5;
}
.progress-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 326.7; /* 2πr where r=52 */
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 0.6s ease;
}
.progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.progress-pct {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--navy);
  font-weight: 600;
  line-height: 1;
}
.progress-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-40);
  margin-top: 4px;
}

.stages {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.stage {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  gap: 20px;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.15s;
  cursor: pointer;
  position: relative;
}
.stage:last-child { border-bottom: none; }
.stage:hover { background: var(--cream-warm); }

.stage-number {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-40);
  background: var(--paper);
  transition: all 0.2s;
}
.stage.complete .stage-number {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--navy);
}
.stage.complete .stage-number::before {
  content: '✓';
  font-size: 18px;
  font-family: var(--font-body);
  color: var(--gold);
}
.stage.complete .stage-number-text { display: none; }

.stage-body { min-width: 0; }
.stage-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2px;
  letter-spacing: -0.005em;
}
.stage-desc {
  font-size: 14px;
  color: var(--ink-60);
  margin: 0;
}

.stage-status {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-40);
  font-weight: 500;
}
.stage.complete .stage-status {
  color: var(--gold-dark);
}
.stage.current .stage-status {
  color: var(--navy);
  font-weight: 600;
}

.stage-chevron {
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--navy-40);
  border-top: 1.5px solid var(--navy-40);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.stage:hover .stage-chevron {
  border-color: var(--navy);
  transform: rotate(45deg) translateX(2px) translateY(-2px);
}

.submit-panel {
  margin-top: 40px;
  padding: 32px 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-80) 100%);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.submit-panel::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.15) 0%, transparent 70%);
  pointer-events: none;
}
.submit-copy h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 6px;
  font-weight: 500;
}
.submit-copy p {
  font-size: 14px;
  color: rgba(248, 244, 236, 0.75);
  margin: 0;
  max-width: 480px;
}
#submitForReviewBtn {
  background: var(--gold);
  color: var(--navy);
  flex-shrink: 0;
  font-weight: 600;
}
#submitForReviewBtn:hover:not(:disabled) {
  background: var(--gold-light);
}
#submitForReviewBtn::after {
  border-color: var(--navy);
}

@media (max-width: 720px) {
  .hub-head { flex-direction: column-reverse; align-items: center; text-align: center; }
  .hub-head .screen-title { font-size: 32px; }
  .stage { grid-template-columns: 40px 1fr auto; padding: 18px 20px; }
  .stage-chevron { display: none; }
  .submit-panel { flex-direction: column; align-items: stretch; text-align: center; padding: 24px; }
}

/* ============================================================
   MODAL (stage placeholder)
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 21, 61, 0.5);
  backdrop-filter: blur(4px);
}
.modal-panel {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 48px 40px 40px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--ink-40);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
}
.modal-close:hover { background: var(--cream-warm); color: var(--navy); }
.modal-body h2 {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--navy);
  margin: 0 0 12px;
  font-weight: 500;
}
.modal-body p {
  font-size: 15px;
  color: var(--ink-60);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   UTILITY
   ============================================================ */
[hidden] { display: none !important; }

/* ============================================================
   APP SHELL (post-login: sidebar + main)
   ============================================================ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--navy);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 30;
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sb-brand .brand-mark { background: var(--cream); color: var(--navy); }
.sb-brand .brand-name { color: var(--cream); }
.sb-brand .brand-sub { color: var(--gold); }

.sb-member {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sb-member-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 2px;
}
.sb-member-broker {
  font-size: 12px;
  color: rgba(248,244,236,0.55);
}

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

.sb-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(201,168,76,0.85);
  font-weight: 600;
  padding: 16px 10px 8px;
}

.sb-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: rgba(248,244,236,0.78);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  position: relative;
}
.sb-link:hover {
  background: rgba(255,255,255,0.06);
  color: var(--cream);
}
.sb-link.active {
  background: rgba(201,168,76,0.14);
  color: var(--gold);
}
.sb-link.active .sb-link-icon { filter: drop-shadow(0 0 6px rgba(201,168,76,0.5)); }
.sb-link-icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }
.sb-link-label { flex: 1; }
.sb-link.locked {
  color: rgba(248,244,236,0.35);
  cursor: pointer;
}
.sb-link.locked .sb-link-icon { opacity: 0.4; }
.sb-link.locked:hover { background: rgba(255,255,255,0.04); color: rgba(248,244,236,0.55); }
.sb-lock {
  font-size: 10px;
  opacity: 0.5;
}

.sb-bottom {
  padding: 16px 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sb-logout {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(248,244,236,0.78);
  padding: 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.sb-logout:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.main {
  flex: 1;
  background: var(--cream);
  min-height: 100vh;
}

.page { display: block; }
.page[hidden] { display: none !important; }

/* Mobile sidebar toggle */
.sb-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 40;
  background: var(--navy);
  color: var(--cream);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
  .sb-toggle { display: block; }
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    transition: left 0.25s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { left: 0; }
  .main { padding-top: 76px; }
  .container { padding: 32px 20px 64px; }
}

/* ============================================================
   EMP TEASER PAGE
   ============================================================ */
.eyebrow-gold { color: var(--gold); }

.emp-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-80) 100%);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  color: var(--cream);
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}
.emp-hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,168,76,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.emp-hero::after {
  content: '';
  position: absolute;
  bottom: 32px; left: 48px;
  width: 60px; height: 2px;
  background: var(--gold);
}
.emp-hero-content { position: relative; z-index: 1; max-width: 760px; }

.emp-headline {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 12px 0 16px;
  color: var(--cream);
}
.emp-tagline {
  font-size: 18px;
  color: rgba(248,244,236,0.8);
  line-height: 1.55;
  margin: 0 0 40px;
  max-width: 600px;
}

.emp-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 36px;
  margin: 40px 0;
}
.emp-feature {
  display: flex;
  gap: 16px;
}
.emp-feature-icon {
  font-size: 24px;
  width: 48px;
  height: 48px;
  background: rgba(201,168,76,0.14);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.emp-feature h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--cream);
}
.emp-feature p {
  font-size: 14px;
  color: rgba(248,244,236,0.7);
  margin: 0;
  line-height: 1.55;
}

.emp-cta {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.emp-cta h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--gold);
}
.emp-cta p {
  font-size: 15px;
  color: rgba(248,244,236,0.75);
  margin: 0 0 20px;
  max-width: 520px;
}
.emp-cta .btn-primary {
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
}
.emp-cta .btn-primary:hover:not(:disabled) {
  background: var(--gold-light);
}
.emp-cta .btn-primary::after { border-color: var(--navy); }

.emp-cta-status {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
}
.emp-cta-status.success {
  background: rgba(45,106,79,0.18);
  color: #b5e0c2;
  border: 1px solid rgba(45,106,79,0.4);
}
.emp-cta-status.error {
  background: rgba(181,54,46,0.18);
  color: #f0b8b3;
  border: 1px solid rgba(181,54,46,0.4);
}

@media (max-width: 720px) {
  .emp-hero { padding: 36px 24px; }
  .emp-headline { font-size: 36px; }
  .emp-features { grid-template-columns: 1fr; gap: 20px; }
}

/* Placeholder cards (stub pages) */
.placeholder-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
}
.placeholder-card p { margin: 0; color: var(--ink-60); }
.placeholder-card a {
  font-weight: 500;
  color: var(--navy);
  border-bottom: 1px solid var(--gold);
  text-decoration: none;
}
.emp-placeholder {
  border-color: rgba(201,168,76,0.4);
  background: linear-gradient(135deg, var(--paper) 0%, var(--cream-warm) 100%);
}

/* ============================================================
   BRAND LOGOS
   ============================================================ */

/* Login hero (navy bg) */
.login-hero-logo {
  margin-bottom: 36px;
}
.login-hero-logo img {
  display: block;
  height: 60px;
  width: auto;
  max-width: 100%;
}

/* Sidebar (navy bg) */
.sb-brand {
  padding: 22px 22px 18px !important;
  display: block !important;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sb-brand-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 100%;
}

/* Consent screen (cream bg) */
.consent-logo {
  margin-bottom: 28px;
}
.consent-logo img {
  display: block;
  height: 52px;
  width: auto;
  margin: 0 auto 4px;
}

@media (max-width: 720px) {
  .login-hero-logo img { height: 48px; }
  .consent-logo img { height: 40px; }
}


/* ============================================================
   FROLLO BANK STATEMENTS FLOW
   ============================================================ */
.frollo-flow {
  text-align: left;
}
.frollo-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold-dark);
  margin-bottom: 10px;
}
.frollo-flow h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--navy);
  margin: 0 0 14px;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.frollo-lede {
  font-size: 15px;
  color: var(--ink-60);
  margin: 0 0 28px;
  line-height: 1.55;
}
.frollo-lede strong { color: var(--navy); }

.frollo-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}
.frollo-section:last-of-type { border-bottom: none; }
.frollo-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.005em;
}
.frollo-section p {
  font-size: 14px;
  color: var(--ink-60);
  margin: 0;
  line-height: 1.55;
}
.frollo-section p strong { color: var(--ink); font-weight: 600; }

.frollo-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}
.frollo-steps li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.frollo-steps li:last-child { border-bottom: none; padding-bottom: 0; }
.frollo-steps li:first-child { padding-top: 4px; }
.frollo-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-body);
  flex-shrink: 0;
  margin-top: 1px;
}
.frollo-steps li > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.frollo-steps strong {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}
.frollo-steps span {
  font-size: 13px;
  color: var(--ink-60);
  line-height: 1.5;
}
.frollo-highlight {
  color: var(--gold-dark) !important;
  font-weight: 500;
}

.frollo-points {
  list-style: none;
  padding: 0;
  margin: 0;
}
.frollo-points li {
  font-size: 13.5px;
  color: var(--ink);
  padding: 5px 0 5px 22px;
  position: relative;
  line-height: 1.5;
}
.frollo-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 12px;
  height: 6px;
  border-left: 1.5px solid var(--gold-dark);
  border-bottom: 1.5px solid var(--gold-dark);
  transform: rotate(-45deg);
}

.frollo-cta {
  margin: 28px 0 18px;
}

.frollo-return-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  background: var(--cream-warm);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.frollo-return-icon {
  font-size: 22px;
  color: var(--gold-dark);
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.frollo-return-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.frollo-return-body strong {
  font-size: 14px;
  color: var(--navy);
  font-weight: 600;
}
.frollo-return-body span {
  font-size: 13px;
  color: var(--ink-60);
  line-height: 1.5;
}

.frollo-done-btn {
  background: var(--gold) !important;
  color: var(--navy) !important;
  font-weight: 600 !important;
}
.frollo-done-btn:hover:not(:disabled) {
  background: var(--gold-light) !important;
}
.frollo-done-btn::after {
  border-color: var(--navy) !important;
}

.frollo-skip {
  text-align: center;
  margin: 14px 0 0 !important;
  font-size: 13px !important;
}
.frollo-skip a {
  color: var(--ink-40);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}
.frollo-skip a:hover {
  color: var(--navy);
  border-color: var(--navy);
}

.frollo-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}
.frollo-status.success {
  background: rgba(45, 106, 79, 0.1);
  color: var(--success);
  border: 1px solid rgba(45, 106, 79, 0.25);
}
.frollo-status.error {
  background: rgba(181, 54, 46, 0.08);
  color: var(--error);
  border: 1px solid rgba(181, 54, 46, 0.2);
}

/* Make the modal a bit wider to fit the explainer comfortably */
.modal-panel:has(.frollo-flow) {
  max-width: 580px;
  padding: 40px 36px 32px;
}

/* ============================================================
   EMP DASHBOARD
   ============================================================ */

/* Financial Freedom Hero */
.ff-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-80) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 24px 0 24px;
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.ff-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(201,168,76,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.ff-hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.ff-hero-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(248,244,236,0.55);
  font-weight: 600;
  margin-bottom: 6px;
}
.ff-hero-years {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
}
.ff-hero-yearlabel {
  font-size: 13px;
  color: rgba(248,244,236,0.6);
  margin-top: 8px;
  max-width: 320px;
}
.ff-hero-aside {
  text-align: right;
}
.ff-hero-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--cream);
  line-height: 1;
}

.ff-progress {
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.ff-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(248,244,236,0.55);
  margin-bottom: 8px;
}
.ff-progress-meta strong {
  color: var(--cream);
  font-weight: 600;
}
.ff-progress-pct {
  color: var(--gold) !important;
  font-weight: 600;
}
.ff-progress-track {
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  overflow: hidden;
}
.ff-progress-bar {
  height: 100%;
  background: var(--gold);
  border-radius: 6px;
  transition: width 1s ease;
  width: 0;
}

.ff-hero-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.ff-tile {
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px 14px;
}
.ff-tile-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(248,244,236,0.5);
  font-weight: 600;
  margin-bottom: 4px;
}
.ff-tile-val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--cream);
}
.ff-tile-pos { color: var(--success-light, #84e3a3); }
.ff-tile-neg { color: var(--error-light, #f28a83); }

.ff-hero-explain {
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12.5px;
  color: rgba(248,244,236,0.5);
  line-height: 1.55;
  position: relative;
  z-index: 1;
}
.ff-hero-explain strong { color: rgba(248,244,236,0.7); }

/* Quick stats grid */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.dash-stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.dash-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-40);
  font-weight: 600;
  margin-bottom: 6px;
}
.dash-stat-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.dash-stat-sub {
  font-size: 12px;
  color: var(--ink-60);
  margin-top: 4px;
}

/* Asset position card */
.dash-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.dash-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.dash-card-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}

.asset-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.asset-row:last-child { border-bottom: none; }
.asset-row-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.asset-row-label strong {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}
.asset-row-label span {
  font-size: 12px;
  color: var(--ink-40);
}
.asset-row-vals {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--ink-60);
}
.asset-row-vals strong { color: var(--navy); font-weight: 600; }
.asset-row-vlabel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-40);
  margin-right: 4px;
}

.dash-empty {
  font-size: 14px;
  color: var(--ink-40);
  padding: 20px;
  text-align: center;
}

.dash-disclaimer {
  font-size: 12px;
  color: var(--ink-40);
  background: var(--cream-warm);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}
.dash-disclaimer strong { color: var(--ink); font-weight: 600; }

@media (max-width: 720px) {
  .ff-hero { padding: 22px 20px; }
  .ff-hero-years { font-size: 36px; }
  .ff-hero-num { font-size: 22px; }
  .ff-hero-tiles { grid-template-columns: 1fr; }
  .dash-stats-grid { grid-template-columns: 1fr; }
  .asset-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .asset-row-vals { gap: 16px; flex-wrap: wrap; }
}

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.settings-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.settings-card-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}
.settings-card-lede {
  font-size: 13.5px;
  color: var(--ink-60);
  margin: 0 0 18px;
  line-height: 1.5;
}
.settings-pill {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--ink-10, rgba(0,0,0,0.06));
  color: var(--ink-60);
}
.settings-pill.emp-pill {
  background: var(--gold-light, rgba(201,168,76,0.18));
  color: var(--gold-dark);
}
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.settings-form .input {
  max-width: 280px;
}
.settings-rates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  margin-bottom: 18px;
}
.settings-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.settings-readonly {
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink-60);
}
.settings-help {
  font-size: 11.5px;
  color: var(--ink-40);
  margin: 2px 0 0;
}
.settings-status {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.settings-status.success {
  background: rgba(45, 106, 79, 0.1);
  color: var(--success);
  border: 1px solid rgba(45, 106, 79, 0.25);
}
.settings-status.error {
  background: rgba(181, 54, 46, 0.08);
  color: var(--error);
  border: 1px solid rgba(181, 54, 46, 0.2);
}
.emp-only-card {
  border-color: rgba(201, 168, 76, 0.4);
}

@media (max-width: 720px) {
  .settings-rates-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RAFFI CHAT
   ============================================================ */
.raffi-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 0px);
  max-width: 820px;
  margin: 0 auto;
  background: var(--paper);
}

.raffi-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  flex-shrink: 0;
}
.raffi-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.raffi-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}
.raffi-subtitle {
  font-size: 12.5px;
  color: var(--ink-40);
}
.raffi-clear-btn { margin-left: auto; }

.raffi-messages {
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.raffi-welcome {
  text-align: center;
  padding: 36px 12px 24px;
}
.raffi-welcome-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 26px;
  margin: 0 auto 16px;
}
.raffi-welcome h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--navy);
  margin: 0 0 8px;
}
.raffi-welcome p {
  font-size: 14px;
  color: var(--ink-60);
  max-width: 460px;
  margin: 0 auto 22px;
  line-height: 1.55;
}
.raffi-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 560px;
  margin: 0 auto;
}
.raffi-quick-btn {
  background: var(--cream-warm);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
}
.raffi-quick-btn:hover {
  background: var(--gold-light, rgba(201,168,76,0.15));
  border-color: var(--gold);
  color: var(--navy);
}

.raffi-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 100%;
}
.raffi-msg-user {
  justify-content: flex-end;
}
.raffi-msg-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}
.raffi-msg-body {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px 14px 14px 14px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 80%;
  word-wrap: break-word;
}
.raffi-msg-body strong { font-weight: 600; color: var(--navy); }
.raffi-msg-body em { color: var(--ink-60); }
.raffi-msg-body ul {
  margin: 8px 0;
  padding-left: 22px;
}
.raffi-msg-body li {
  margin-bottom: 4px;
}
.raffi-msg-user .raffi-msg-body {
  background: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
  border-radius: 14px 14px 4px 14px;
}
.raffi-msg-user .raffi-msg-body strong { color: var(--gold); }

.raffi-typing .raffi-msg-body {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 18px;
}
.raffi-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-40);
  animation: raffiPulse 1.2s infinite;
}
.raffi-dot:nth-child(2) { animation-delay: 0.15s; }
.raffi-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes raffiPulse {
  0%, 60%, 100% { opacity: 0.3; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.2); }
}

.raffi-composer {
  border-top: 1px solid var(--line);
  padding: 16px 28px 20px;
  background: var(--paper);
  flex-shrink: 0;
}
.raffi-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--cream-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 8px 8px 16px;
  transition: border-color 0.15s;
}
.raffi-input-wrap:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}
.raffi-input-wrap textarea {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  resize: none;
  padding: 8px 0;
  outline: none;
  max-height: 160px;
  line-height: 1.5;
}
.raffi-send-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.15s, opacity 0.15s;
}
.raffi-send-btn:hover:not(:disabled) {
  transform: translateX(1px);
}
.raffi-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.raffi-send-icon { line-height: 1; }

.raffi-disclaimer {
  font-size: 11.5px;
  color: var(--ink-40);
  margin-top: 10px;
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .raffi-header { padding: 14px 18px; }
  .raffi-messages { padding: 18px 16px; }
  .raffi-composer { padding: 12px 16px 16px; }
  .raffi-msg-body { max-width: 88%; font-size: 13.5px; }
}

/* Button small variant */
.btn-sm {
  padding: 6px 12px !important;
  font-size: 12.5px !important;
}

/* ============================================================
   PORTFOLIO PAGE
   ============================================================ */
.port-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px 0 20px;
}
.port-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.port-entity-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.port-entity-tabs:empty { display: none; }
.port-tab {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-60);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
}
.port-tab:hover { border-color: var(--gold); color: var(--ink); }
.port-tab.active {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--navy);
}

.port-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.port-summary-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.port-summary-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-40);
  font-weight: 600;
  margin-bottom: 6px;
}
.port-summary-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.port-summary-val.port-summary-neg { color: var(--error, #b5362e); }
.port-summary-sub {
  font-size: 12px;
  color: var(--ink-60);
  margin-top: 4px;
}

@media (max-width: 720px) {
  .port-summary-grid { grid-template-columns: 1fr; }
}

/* Section dividers + groups */
.port-section-divider {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-dark);
  font-weight: 600;
  padding: 18px 0 8px;
  border-top: 1px solid var(--line-soft);
  margin-top: 4px;
}
.port-section-divider:first-child { border-top: none; }
.port-group {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

/* Holding row */
.holding-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background 0.12s;
}
.holding-row:hover {
  background: var(--cream-warm);
}
.holding-row:last-child { border-bottom: none; }
.holding-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--cream-warm);
}
.holding-icon.h-etf, .holding-icon.h-share { background: rgba(99,102,241,0.12); }
.holding-icon.h-property { background: rgba(245,158,11,0.12); }
.holding-icon.h-cash { background: rgba(34,197,94,0.12); }
.holding-icon.h-crypto { background: rgba(249,115,22,0.12); }
.holding-icon.h-business { background: rgba(168,85,247,0.12); }
.holding-name {
  flex: 1;
  min-width: 0;
}
.holding-nm {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.holding-sub {
  font-size: 12px;
  color: var(--ink-40);
  margin-top: 2px;
}
.holding-price {
  text-align: right;
  flex-shrink: 0;
}
.holding-val {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.holding-chg {
  font-size: 11.5px;
  margin-top: 2px;
  font-weight: 500;
}
.chg-up { color: var(--success, #2d6a4f); }
.chg-dn { color: var(--error, #b5362e); }
.chg-flat { color: var(--ink-40); }

.port-entity-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 6px;
  text-transform: none;
  letter-spacing: 0;
}

.port-tag-us { display: inline-block; background: rgba(59,130,246,0.13); color: #2563eb; padding: 2px 7px; border-radius: 5px; font-size: 11px; font-weight: 600; }
.port-tag-asx { display: inline-block; background: rgba(201,168,76,0.18); color: var(--gold-dark); padding: 2px 7px; border-radius: 5px; font-size: 11px; font-weight: 600; }

.port-empty {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
  padding: 48px 24px;
  box-shadow: var(--shadow-sm);
}
.port-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.port-empty h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 6px;
}
.port-empty p {
  font-size: 13px;
  color: var(--ink-60);
  margin: 0 0 18px;
}

/* ============================================================
   HOLDING MODAL
   ============================================================ */
.modal-panel-wide {
  max-width: 580px !important;
  padding: 32px 32px 28px !important;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 18px;
}

.hm-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.hm-row > label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.hm-row > input,
.hm-row > select,
.hm-row > div > input,
.hm-row > div > select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.hm-row > input:focus,
.hm-row > select:focus,
.hm-row > div > input:focus,
.hm-row > div > select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
.hm-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex-direction: row;
}
.hm-row-2 > div { display: flex; flex-direction: column; gap: 5px; }
.hm-row-2 > div > label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.hm-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400 !important;
  cursor: pointer;
}
.hm-checkbox input { width: auto !important; }

.hm-edit-meta {
  font-size: 13px;
  color: var(--ink-60);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.hm-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.hm-actions .btn-primary { flex: 1; }
.btn-danger {
  background: rgba(181,54,46,0.08);
  color: var(--error, #b5362e);
  border: 1px solid rgba(181,54,46,0.3);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}
.btn-danger:hover { background: rgba(181,54,46,0.15); }

@media (max-width: 720px) {
  .modal-panel-wide { padding: 24px 20px !important; }
  .hm-row-2 { grid-template-columns: 1fr; }
  .hm-actions { flex-direction: column; }
}

/* ============================================================
   STRATEGY & FORECAST
   ============================================================ */

/* Status banner */
.sf-status-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius);
  margin: 24px 0 20px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
}
.sf-status-badge::before {
  font-size: 18px;
  font-weight: bold;
}
.sf-status-ontrack {
  background: rgba(45, 106, 79, 0.1);
  color: var(--success, #2d6a4f);
  border-color: rgba(45, 106, 79, 0.3);
}
.sf-status-gap {
  background: rgba(201, 168, 76, 0.13);
  color: var(--gold-dark);
  border-color: rgba(201, 168, 76, 0.3);
}

/* KPI grid */
.sf-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.sf-kpi-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.sf-kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-40);
  font-weight: 600;
  margin-bottom: 8px;
}
.sf-kpi-val {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.015em;
}
.sf-kpi-sub {
  font-size: 12px;
  color: var(--ink-60);
  margin-top: 4px;
}

@media (max-width: 720px) {
  .sf-kpi-grid { grid-template-columns: 1fr; }
}

/* Chart card */
.sf-chart-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.sf-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.sf-chart-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}
.sf-chart-meta {
  font-size: 11.5px;
  background: var(--cream-warm);
  color: var(--ink-60);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 500;
}
.sf-chart-strip {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--ink-60);
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.sf-chart-strip strong { color: var(--navy); font-weight: 600; }
.sf-chart-wrap {
  position: relative;
  height: 260px;
}

/* Section header */
.sf-section-head {
  margin: 32px 0 14px;
}
.sf-section-head h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 4px;
}
.sf-section-head p {
  font-size: 14px;
  color: var(--ink-60);
  margin: 0;
}

/* Scenario tabs */
.sf-scenario-tabs {
  display: flex;
  gap: 8px;
  background: var(--cream-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px;
  margin-bottom: 18px;
}
.sf-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ink-60);
  padding: 10px 12px;
  border-radius: calc(var(--radius) - 4px);
  font-size: 13.5px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
}
.sf-tab:hover { color: var(--navy); }
.sf-tab.active {
  background: var(--navy);
  color: var(--cream);
  font-weight: 600;
}

/* Scenario card */
.sf-scenario-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.sf-scenario-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.sf-scenario-icon {
  font-size: 22px;
}
.sf-scenario-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}
.sf-scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.sf-scenario-cell {
  background: var(--cream-warm);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
}
.sf-scenario-cell-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-40);
  font-weight: 600;
  margin-bottom: 6px;
}
.sf-scenario-cell-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
}
.sf-scenario-cell-sub {
  font-size: 11.5px;
  color: var(--ink-60);
  margin-top: 4px;
}
.sf-scenario-still {
  background: var(--navy);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.sf-scenario-still-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(248,244,236,0.5);
  font-weight: 600;
  margin-bottom: 6px;
}
.sf-scenario-still-val {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: -0.015em;
}
.sf-scenario-rate {
  text-align: right;
}
.sf-scenario-rate-label {
  font-size: 11px;
  color: rgba(248,244,236,0.45);
  margin-bottom: 4px;
}
.sf-scenario-rate-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
}
.sf-scenario-rate-real {
  font-size: 11px;
  color: rgba(248,244,236,0.4);
  margin-top: 2px;
}
.sf-scenario-explainer {
  font-size: 13px;
  color: var(--ink-60);
  line-height: 1.6;
  margin: 14px 0 0;
}

@media (max-width: 720px) {
  .sf-scenario-grid { grid-template-columns: 1fr; }
  .sf-scenario-still { flex-direction: column; align-items: flex-start; }
  .sf-scenario-rate { text-align: left; }
}

/* Mix scenario */
.sf-mix-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.sf-mix-blurb {
  font-size: 13.5px;
  color: var(--ink-60);
  margin: 0 0 22px;
  line-height: 1.55;
}
.sf-mix-slider-wrap {
  margin-bottom: 22px;
}
.sf-mix-slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--ink-40);
  margin-bottom: 10px;
  font-weight: 500;
}
.sf-mix-slider-labels span:nth-child(2) {
  color: var(--gold-dark);
  font-weight: 600;
}
#sfMixSlider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: linear-gradient(to right, #6366f1 0%, #6366f1 50%, var(--gold) 50%, var(--gold) 100%);
  border-radius: 6px;
  outline: none;
}
#sfMixSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--navy);
  border: 3px solid var(--cream);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
#sfMixSlider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--navy);
  border: 3px solid var(--cream);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.sf-mix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.sf-mix-cell {
  background: var(--cream-warm);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
}
.sf-mix-cell-icon {
  font-size: 22px;
  margin-bottom: 4px;
}
.sf-mix-cell-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-40);
  font-weight: 600;
  margin-bottom: 6px;
}
.sf-mix-cell-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
}
.sf-mix-cell-sub {
  font-size: 11.5px;
  color: var(--ink-60);
  margin-top: 4px;
}
.sf-mix-total {
  background: var(--navy);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.sf-mix-total-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(248,244,236,0.55);
  font-weight: 600;
}
.sf-mix-total-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--gold);
}

@media (max-width: 720px) {
  .sf-mix-grid { grid-template-columns: 1fr; }
}

/* On-track state */
.sf-on-track {
  background: var(--paper);
  border: 1px solid rgba(45,106,79,0.25);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  margin-bottom: 18px;
}
.sf-on-track-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(45,106,79,0.13);
  color: var(--success, #2d6a4f);
  display: grid;
  place-items: center;
  font-size: 30px;
  margin: 0 auto 14px;
  font-weight: bold;
}
.sf-on-track h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 8px;
}
.sf-on-track p {
  font-size: 14px;
  color: var(--ink-60);
  margin: 0 auto;
  max-width: 460px;
  line-height: 1.6;
}

/* Assumptions footer */
.sf-assumptions {
  background: var(--cream-warm);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--ink-60);
  line-height: 1.7;
}
.sf-assumption-line strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   FACT FIND STAGE FORMS
   ============================================================ */

/* Tall modal variant for stage forms */
.modal.modal-tall .modal-panel {
  max-width: 760px;
  max-height: 92vh;
  overflow-y: auto;
}

.ff-stage {
  font-family: var(--font-body);
}

.ff-stage-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}
.ff-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-dark);
  font-weight: 600;
  margin-bottom: 8px;
}
.ff-stage-header h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.ff-lede {
  font-size: 14px;
  color: var(--ink-60);
  line-height: 1.55;
  margin: 0;
}

.ff-section {
  margin-bottom: 28px;
}
.ff-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.ff-section-head h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}
.ff-required-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  background: rgba(201,168,76,0.18);
  color: var(--gold-dark);
  padding: 3px 8px;
  border-radius: 100px;
}
.ff-section-lede {
  font-size: 13px;
  color: var(--ink-60);
  line-height: 1.55;
  margin: 0 0 14px;
}

.ff-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}
.ff-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ff-field-full {
  grid-column: 1 / -1;
}
.ff-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.ff-input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  box-sizing: border-box;
}
.ff-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
.ff-input-large {
  font-size: 18px !important;
  padding: 12px 14px !important;
  font-weight: 600;
}
.ff-help {
  font-size: 11.5px;
  color: var(--ink-40);
  margin: 4px 0 0;
}

/* Radio + checkbox rows */
.ff-radio-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.ff-radio,
.ff-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--cream-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}
.ff-radio:has(input:checked),
.ff-checkbox:has(input:checked) {
  border-color: var(--gold);
  background: rgba(201,168,76,0.08);
}
.ff-radio input,
.ff-checkbox input {
  margin: 0;
  cursor: pointer;
}
.ff-checkbox-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Pre-fill banner */
.ff-prefill-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(201,168,76,0.13);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 24px;
}
.ff-prefill-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.ff-prefill-banner strong {
  display: block;
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}
.ff-prefill-banner p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-60);
  line-height: 1.5;
}

/* Uploader tiles */
.ff-uploaders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ff-uploaders-stack {
  grid-template-columns: 1fr;
}
.ff-uploader {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: all 0.15s;
}
.ff-uploader-idle:hover {
  border-color: var(--gold);
  background: var(--cream-warm);
}
.ff-uploader-done {
  background: rgba(45,106,79,0.06);
  border: 1.5px solid rgba(45,106,79,0.3);
  border-style: solid;
}
.ff-uploader-busy {
  background: var(--cream-warm);
  border-style: solid;
}
.ff-uploader-error {
  background: rgba(181,54,46,0.06);
  border: 1.5px solid rgba(181,54,46,0.3);
  border-style: solid;
}
.ff-uploader-icon,
.ff-uploader-icon-done {
  font-size: 22px;
  flex-shrink: 0;
}
.ff-uploader-icon-done {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--success, #2d6a4f);
  color: white;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: bold;
}
.ff-uploader-spinner {
  width: 24px; height: 24px;
  border: 2.5px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: ffSpin 0.9s linear infinite;
  flex-shrink: 0;
}
@keyframes ffSpin { to { transform: rotate(360deg); } }
.ff-uploader-text {
  flex: 1;
  min-width: 0;
}
.ff-uploader-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2px;
}
.ff-uploader-status-text {
  font-size: 12px;
  color: var(--ink-60);
}
.ff-uploader-error-text { color: var(--error, #b5362e); }
.ff-optional {
  font-weight: 400;
  color: var(--ink-40);
  font-size: 12px;
}
.ff-uploader-pick-btn,
.ff-uploader-retry,
.ff-uploader-replace {
  background: var(--navy);
  color: var(--cream);
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
}
.ff-uploader-replace {
  background: transparent;
  color: var(--ink-60);
  border: 1px solid var(--line);
}
.ff-uploader-replace:hover {
  background: var(--cream-warm);
}
.ff-uploader-retry {
  background: var(--error, #b5362e);
}

@media (max-width: 720px) {
  .ff-grid-2 { grid-template-columns: 1fr; }
  .ff-uploaders { grid-template-columns: 1fr; }
  .ff-uploader { flex-wrap: wrap; gap: 10px; }
}

/* Extraction status banner */
.ff-extraction-status {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.ff-extraction-success {
  background: rgba(45,106,79,0.1);
  color: var(--success, #2d6a4f);
  border: 1px solid rgba(45,106,79,0.25);
}

/* Stage actions */
.ff-stage-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 22px;
  margin-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.ff-stage-actions .btn-primary {
  flex: 1;
  max-width: 280px;
}
.ff-stage-actions .btn-primary:disabled {
  background: var(--line);
  color: var(--ink-40);
  cursor: not-allowed;
}

/* ============================================================
   FLOW MODE — Guided fact find
   ============================================================ */
.ff-flow-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

/* Stepper */
.ff-stepper {
  margin-bottom: 30px;
}
.ff-stepper-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.ff-stepper-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-dark);
  font-weight: 600;
}
.ff-stepper-overview-btn {
  background: transparent;
  border: none;
  color: var(--ink-60);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,0.15);
  text-underline-offset: 3px;
  font-family: var(--font-body);
}
.ff-stepper-overview-btn:hover { color: var(--navy); }

.ff-stepper-bar-wrap {
  position: relative;
  height: 8px;
  background: var(--cream-warm);
  border-radius: 4px;
  margin-bottom: 14px;
  overflow: visible;
}
.ff-stepper-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  border-radius: 4px;
  transition: width 0.4s ease;
  width: 0;
}
.ff-stepper-pct {
  position: absolute;
  right: 0;
  top: -22px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-dark);
}

/* Stepper dots */
.ff-stepper-dots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.ff-step-dot {
  flex: 1;
  min-width: 60px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  border-radius: 8px;
  transition: background 0.15s;
}
.ff-step-dot:hover { background: var(--cream-warm); }
.ff-step-dot-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-40);
  transition: all 0.15s;
}
.ff-step-dot-label {
  font-size: 10.5px;
  color: var(--ink-40);
  text-align: center;
  font-weight: 500;
  line-height: 1.3;
}
.ff-step-dot.active .ff-step-dot-num {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--gold);
}
.ff-step-dot.active .ff-step-dot-label {
  color: var(--navy);
  font-weight: 600;
}
.ff-step-dot.done .ff-step-dot-num {
  background: var(--success, #2d6a4f);
  border-color: var(--success, #2d6a4f);
  color: white;
}
.ff-step-dot.done .ff-step-dot-label {
  color: var(--ink-60);
}

@media (max-width: 720px) {
  .ff-step-dot-label { display: none; }
  .ff-step-dot { min-width: auto; padding: 8px 2px; }
}

/* Welcome card */
.ff-welcome-card,
.ff-ready-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.ff-welcome-icon,
.ff-ready-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.ff-welcome-card h2,
.ff-ready-card h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.ff-welcome-card p,
.ff-ready-card p {
  font-size: 15px;
  color: var(--ink-60);
  line-height: 1.55;
  max-width: 460px;
  margin: 0 auto 24px;
}
.ff-ready-card .btn-block {
  max-width: 320px;
  margin: 0 auto 12px;
}
.ff-ready-secondary {
  font-size: 13px !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent !important;
}

.ff-placeholder-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
}
.ff-placeholder-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--navy);
  margin: 0 0 8px;
}
.ff-placeholder-card p {
  font-size: 14px;
  color: var(--ink-60);
  margin: 0 0 20px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Make stage forms render nicely inline (not in modal) */
.ff-flow-container .ff-stage {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 36px 32px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 720px) {
  .ff-flow-container { padding: 16px 12px 60px; }
  .ff-flow-container .ff-stage { padding: 24px 20px; }
}

/* Frollo inline steps */
.frollo-steps-inline {
  margin: 0;
  padding-left: 22px;
  font-size: 13.5px;
  color: var(--ink-60);
  line-height: 1.7;
}
.frollo-steps-inline li {
  margin-bottom: 6px;
}
.frollo-steps-inline strong {
  color: var(--ink);
  font-weight: 600;
}

/* ============================================================
   ASSETS / LIABILITIES — list-based stages
   ============================================================ */

/* Summary card at top */
.ff-summary-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-80, #1a1f5c) 100%);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ff-summary-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(201,168,76,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.ff-summary-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(248,244,236,0.55);
  font-weight: 600;
  margin-bottom: 4px;
}
.ff-summary-card-val {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: -0.015em;
  line-height: 1;
}
.ff-summary-card-val.ff-summary-card-neg { color: #f28a83; }
.ff-summary-card-sub {
  font-size: 12px;
  color: rgba(248,244,236,0.5);
  margin-top: 6px;
}

/* Sectioned list (groups of similar items) */
.ff-list-section {
  margin-bottom: 18px;
}
.ff-list-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 8px;
  font-size: 13px;
}
.ff-list-section-icon { font-size: 16px; }
.ff-list-section-title {
  font-weight: 600;
  color: var(--navy);
  flex: 1;
}
.ff-list-section-subtotal {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-60);
}
.ff-list-items {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Single list item */
.ff-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background 0.15s;
}
.ff-list-item:last-child { border-bottom: none; }
.ff-list-item:hover { background: var(--cream-warm); }
.ff-list-item-main {
  flex: 1;
  min-width: 0;
}
.ff-list-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}
.ff-list-item-sub {
  font-size: 12px;
  color: var(--ink-60);
  margin-top: 3px;
}
.ff-list-item-val {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  flex-shrink: 0;
}
.ff-list-item-val-neg { color: var(--error, #b5362e); }
.ff-list-item-chev {
  color: var(--ink-40);
  font-size: 22px;
  font-weight: 300;
  flex-shrink: 0;
}

/* Empty list state */
.ff-empty-list {
  text-align: center;
  padding: 36px 24px;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.ff-empty-list .ff-empty-icon {
  font-size: 36px;
  margin-bottom: 8px;
}
.ff-empty-list h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 4px;
}
.ff-empty-list p {
  font-size: 13px;
  color: var(--ink-60);
  margin: 0;
}

/* Add button */
.ff-add-btn {
  margin-bottom: 18px;
}

/* Info banner */
.ff-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--cream-warm);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--ink-60);
  margin-bottom: 18px;
}
.ff-info-banner .ff-info-icon { flex-shrink: 0; font-size: 14px; }

/* Sub-form modal (overlay above the inline form) */
#ffSubformOverlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ff-subform-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
}
.ff-subform-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(18,21,61,0.6);
  backdrop-filter: blur(2px);
  cursor: pointer;
  z-index: 0;
}
.ff-subform-modal-panel {
  position: relative;
  z-index: 1;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 28px 28px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  max-height: 92vh;
  overflow-y: auto;
}
.ff-subform-modal-panel h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 18px;
}
.ff-subform-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--ink-60);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}
.ff-subform-close:hover { background: var(--cream-warm); }

/* Sub-form layout (re-uses ff-row, ff-input, ff-checkbox) */
.ff-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.ff-row label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.ff-subform-actions {
  display: flex;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  align-items: center;
}
.ff-subform-actions .btn-primary { flex: 1; }
.ff-subform-actions .btn-danger { margin-right: auto; }
.ff-subform-actions .btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-60);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  cursor: pointer;
  font-family: var(--font-body);
}
.ff-subform-actions .btn-ghost:hover {
  background: var(--cream-warm);
  color: var(--navy);
}

@media (max-width: 720px) {
  .ff-subform-modal-panel { padding: 22px 18px 18px; }
  .ff-subform-actions { flex-direction: column-reverse; align-items: stretch; }
  .ff-subform-actions .btn-danger { margin-right: 0; margin-top: 8px; }
}

.ff-extraction-warning {
  background: rgba(201,168,76,0.13);
  color: var(--gold-dark);
  border: 1px solid rgba(201,168,76,0.3);
}

/* ============================================================
   "Document is unavailable" — uploader footer + state
   ============================================================ */

.ff-uploader-wrap {
  margin-bottom: 12px;
}
.ff-uploader-wrap .ff-uploader { margin-bottom: 0; }

.ff-uploader-unavailable-link {
  background: transparent;
  border: none;
  color: var(--ink-60);
  font-size: 12px;
  cursor: pointer;
  padding: 6px 4px 0;
  font-family: var(--font-body);
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,0.2);
  text-underline-offset: 3px;
  display: block;
}
.ff-uploader-unavailable-link:hover {
  color: var(--gold-dark);
  text-decoration-color: var(--gold);
}

/* Unavailable tile state */
.ff-uploader.ff-uploader-unavailable {
  background: #fff8e6;
  border-color: #f0d97a;
}
.ff-uploader-icon-unavail {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #f0c130;
  color: #6b4f00;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.ff-unavail-tag {
  display: inline-block;
  background: #f0c130;
  color: #6b4f00;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 6px;
}

/* Unavailable subform header */
.ff-unavail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.ff-unavail-icon {
  font-size: 22px;
}
.ff-unavail-header h3 {
  margin: 0;
}
.ff-unavail-lede {
  font-size: 13.5px;
  color: var(--ink-60);
  margin: 0 0 14px;
  line-height: 1.5;
}
.ff-unavail-help {
  background: var(--cream-warm);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: var(--ink-60);
  line-height: 1.5;
}
.ff-unavail-help strong { color: var(--ink); }
.ff-unavail-help a {
  color: var(--gold-dark);
  text-decoration: underline;
}

/* Reason textarea */
.ff-textarea {
  resize: vertical;
  min-height: 70px;
  font-family: var(--font-body);
  line-height: 1.5;
}

/* ============================================================
   DOCUMENT EXPIRY — visual states
   ============================================================ */

/* Expired tile state */
.ff-uploader.ff-uploader-expired {
  background: #fdebea;
  border-color: #f4b8b3;
}
.ff-uploader-expired .ff-uploader-icon-done {
  background: var(--error, #b5362e);
  color: white;
}

/* Inline badges on tile labels */
.ff-expired-badge {
  display: inline-block;
  background: var(--error, #b5362e);
  color: white;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 6px;
}
.ff-expiring-badge {
  display: inline-block;
  background: #f0c130;
  color: #6b4f00;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 6px;
}

/* Stepper dot — expired state (red) */
.ff-step-dot.expired .ff-step-dot-num {
  background: var(--error, #b5362e);
  border-color: var(--error, #b5362e);
  color: white;
  animation: pulse-red 2s ease-in-out infinite;
}
.ff-step-dot.expired .ff-step-dot-label {
  color: var(--error, #b5362e);
  font-weight: 600;
}
.ff-step-dot.expiring-soon .ff-step-dot-num {
  border-color: #f0c130;
  background: #fff8e6;
  color: #6b4f00;
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(181, 54, 46, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(181, 54, 46, 0); }
}

/* Welcome card — expired-doc variant */
.ff-welcome-expired {
  background: linear-gradient(135deg, #fdebea 0%, var(--paper) 100%);
  border-color: #f4b8b3;
}

/* Submit-blocked card */
.ff-expired-block {
  text-align: left;
  padding: 32px 28px;
}
.ff-expired-block .ff-ready-icon { text-align: center; display: block; }
.ff-expired-block h2 { text-align: center; }
.ff-expired-block > p {
  text-align: center;
  margin-bottom: 24px;
}
.ff-expired-section {
  background: var(--cream-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.ff-expired-section h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 8px;
}
.ff-expired-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.ff-expired-list li {
  padding: 6px 0;
  font-size: 13.5px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.ff-expired-list li strong { font-weight: 600; }
.ff-expired-meta {
  font-size: 11.5px;
  color: var(--error, #b5362e);
  font-weight: 500;
}
.btn-secondary.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}
.ff-expired-help {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-60);
  margin-top: 18px;
  margin-bottom: 0;
}
.ff-expired-help a {
  color: var(--gold-dark);
  text-decoration: underline;
}

/* ============================================================
   HOUSEHOLD MEMBERS — settings card
   ============================================================ */
.hh-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.hh-member-row:last-child { border-bottom: none; }

.hh-member-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 16px;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.hh-member-info { flex: 1; min-width: 0; }
.hh-member-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}
.hh-member-you {
  font-size: 11.5px;
  color: var(--ink-60);
  font-weight: 500;
  margin-left: 4px;
}
.hh-member-meta {
  font-size: 12.5px;
  color: var(--ink-60);
  margin-top: 2px;
  word-break: break-word;
}

.hh-member-tags {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  flex-shrink: 0;
}
.hh-member-role,
.hh-member-status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.hh-member-role-primary {
  background: var(--navy);
  color: var(--gold);
}
.hh-member-role-partner {
  background: var(--cream-warm);
  color: var(--navy);
  border: 1px solid var(--line);
}
.hh-member-status-active {
  background: #e3f2e8;
  color: #1f6b3f;
}
.hh-member-status-pending {
  background: #fff8e6;
  color: #6b4f00;
}

/* Invite form */
.invite-form {
  margin-top: 16px;
  padding: 18px;
  background: var(--cream-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.invite-form h4 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--navy);
  margin: 0 0 6px;
}
.invite-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.invite-grid-full { grid-column: 1 / -1; }
.invite-grid label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.invite-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: flex-end;
}
.invite-form-status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.invite-form-status-success {
  background: #e3f2e8;
  color: #1f6b3f;
  border: 1px solid #b9deca;
}
.invite-form-status-error {
  background: #fdebea;
  color: #b5362e;
  border: 1px solid #f4b8b3;
}

@media (max-width: 600px) {
  .invite-grid { grid-template-columns: 1fr; }
}

/* Joint household — partner welcome variant */
.ff-welcome-partner {
  background: linear-gradient(135deg, #fff 0%, #f8f3e8 100%);
  border-color: var(--gold);
}
.ff-welcome-partner h2 {
  color: var(--navy);
}
.ff-welcome-partner p {
  max-width: 520px;
}
