/* ─── VARIABLES ─────────────────────────────────────────────────────────────── */
:root {
  --bg:          #F4F6FA;
  --bg-white:    #FFFFFF;
  --bg-soft:     #F8F9FA;
  --border:      #E2E8F0;
  --border-dark: #CBD5E1;
  --navy:        #0F1C2E;
  --navy-mid:    #1A2D45;
  --text:        #0F1C2E;
  --text-sub:    #5A6B7D;
  --text-muted:  #94A3B8;
  --gold:        #C9973A;
  --gold-light:  #DFB15C;
  --gold-dim:    rgba(201,151,58,0.10);
  --gold-border: rgba(201,151,58,0.30);
  --green:       #27AE60;
  --green-dim:   rgba(39,174,96,0.10);
  --green-border:rgba(39,174,96,0.30);
  --red:         #E05C5C;
  --red-dim:     rgba(224,92,92,0.10);
  --blue:        #3B82F6;
  --blue-dim:    rgba(59,130,246,0.10);
  --teal:        #0891B2;
  --teal-dim:    rgba(8,145,178,0.10);
  --amber:       #F59E0B;
  --amber-dim:   rgba(245,158,11,0.10);
  --purple:      #8B5CF6;
  --shadow-xs:   0 1px 2px rgba(15,28,46,0.04);
  --shadow-sm:   0 1px 4px rgba(15,28,46,0.06), 0 2px 8px rgba(15,28,46,0.04);
  --shadow:      0 2px 8px rgba(15,28,46,0.06), 0 8px 24px rgba(15,28,46,0.06);
  --shadow-lg:   0 8px 32px rgba(15,28,46,0.12);
  --radius:      16px;
  --radius-sm:   12px;
  --radius-xs:   8px;
  --radius-pill: 100px;
  --nav-height:  64px;
  --bottom-nav:  72px;
  --transition:  0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET & BASE ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; }
input, textarea, select { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ─── TYPOGRAPHY ────────────────────────────────────────────────────────────── */
h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem; font-weight: 700; line-height: 1.2; color: var(--navy);
}
h2 { font-size: 1.15rem; font-weight: 700; color: var(--navy); }
h3 { font-size: 1rem; font-weight: 600; color: var(--navy); }
h4 { font-size: 0.9rem; font-weight: 600; color: var(--text-sub); margin: 1.25rem 0 0.4rem; }
p  { color: var(--text-sub); line-height: 1.7; }

/* ─── NAVBAR ────────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-height);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(15,28,46,0.04);
}
.nav-container {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 8px;
}
.nav-brand {
  font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700;
  color: var(--navy); white-space: nowrap; margin-right: 24px;
}
.brand-h { color: var(--gold); }
.nav-links { display: flex; list-style: none; gap: 2px; flex: 1; }
.nav-link {
  padding: 7px 14px; border-radius: var(--radius-xs);
  font-size: 0.875rem; font-weight: 500; color: var(--text-sub);
  transition: all var(--transition); white-space: nowrap;
}
.nav-link:hover { color: var(--navy); background: var(--bg-soft); }
.nav-link.active {
  color: var(--gold); background: var(--gold-dim); font-weight: 600;
}
.nav-user { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-user-name { font-size: 0.875rem; font-weight: 500; color: var(--text-sub); }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold-dim); border: 2px solid var(--gold-border);
  color: var(--gold); font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.btn-logout {
  font-size: 0.8rem; padding: 6px 14px; border-radius: var(--radius-xs);
  border: 1.5px solid var(--border); color: var(--text-sub);
  background: transparent; transition: all var(--transition); font-weight: 500;
}
.btn-logout:hover { border-color: var(--navy); color: var(--navy); }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 6px; background: none; border: none; margin-left: auto; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: all 0.3s; }

/* ─── MOBILE BOTTOM NAV ─────────────────────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  height: var(--bottom-nav);
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(15,28,46,0.08);
  padding: 0 8px;
}
.bottom-nav-inner {
  display: flex; height: 100%; align-items: stretch;
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  color: var(--text-muted); font-size: 0.68rem; font-weight: 500;
  text-decoration: none; transition: color var(--transition);
  padding: 6px 0; border-radius: var(--radius-xs);
}
.bottom-nav-item.active { color: var(--gold); }
.bottom-nav-item svg { flex-shrink: 0; }

/* ─── MAIN LAYOUT ───────────────────────────────────────────────────────────── */
.main-content {
  max-width: 1280px; margin: 0 auto;
  padding: calc(var(--nav-height) + 32px) 24px 60px;
  min-height: 100vh;
}
.page-container { max-width: 1100px; }
.page-container-full { max-width: 100%; }
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 32px; gap: 16px; flex-wrap: wrap;
}
.page-header h1 { margin-bottom: 4px; }
.page-subtitle { color: var(--text-sub); font-size: 0.95rem; margin-top: 2px; }
.section-title {
  font-size: 0.78rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px;
}
.section-block { margin-bottom: 32px; }

/* ─── CARD ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-white); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.card-p { padding: 24px; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.card-body { padding: 24px; }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--bg-soft); border-radius: 0 0 var(--radius) var(--radius); }

/* ─── BUTTONS ───────────────────────────────────────────────────────────────── */
.btn-gold {
  background: var(--gold); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 12px 24px; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-gold:hover {
  background: var(--gold-light); transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201,151,58,0.35);
}
.btn-gold:active { transform: translateY(0); }
.btn-gold:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-gold.btn-success { background: var(--green); }
.btn-outline {
  background: transparent; color: var(--text-sub);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 20px; font-size: 0.875rem; font-weight: 500;
  transition: all var(--transition); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-navy {
  background: var(--navy); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 12px 24px; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.btn-navy:hover { background: var(--navy-mid); }
.btn-full { width: 100%; justify-content: center; }
.btn-full-outline { display: flex; width: 100%; justify-content: center; }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.link-gold { color: var(--gold); font-weight: 500; }
.link-gold:hover { color: var(--gold-light); text-decoration: underline; }

/* ─── FORM ELEMENTS ─────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-sub); }
.form-input, .form-select, .form-textarea {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 0.9rem; width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,151,58,0.10);
}
.form-input[readonly] { background: var(--bg-soft); color: var(--text-muted); cursor: not-allowed; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.form-textarea { resize: vertical; min-height: 100px; }
.field-hint { font-size: 0.78rem; color: var(--text-muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input-prefix-wrap { position: relative; }
.input-prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-sub); font-weight: 600; pointer-events: none; }
.input-prefixed { padding-left: 28px; }

/* Floating label inputs */
.float-field { position: relative; }
.float-field input, .float-field textarea {
  width: 100%;
  background: var(--bg-white); border: 1.5px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 20px 14px 8px; font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.float-field input:focus, .float-field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,151,58,0.10);
}
.float-field input[readonly] { background: var(--bg-soft); color: var(--text-muted); cursor: not-allowed; }
.float-field label {
  position: absolute; top: 14px; left: 14px;
  font-size: 0.9rem; color: var(--text-muted);
  transition: all var(--transition); pointer-events: none;
}
.float-field input:not(:placeholder-shown) ~ label,
.float-field input:focus ~ label,
.float-field textarea:not(:placeholder-shown) ~ label,
.float-field textarea:focus ~ label {
  top: 6px; font-size: 0.72rem; font-weight: 600; color: var(--gold);
}
.password-wrap { position: relative; }
.toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); padding: 4px; display: flex;
}
.toggle-pw:hover { color: var(--text); }

/* ─── BADGES & TAGS ─────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-gold { background: var(--gold-dim); color: var(--gold); border: 1px solid var(--gold-border); }
.badge-green { background: var(--green-dim); color: var(--green); border: 1px solid var(--green-border); }
.badge-blue { background: var(--blue-dim); color: var(--blue); }
.badge-navy { background: rgba(15,28,46,0.08); color: var(--navy); }
.tag {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}

/* ─── LOGIN PAGE ────────────────────────────────────────────────────────────── */
.login-main { min-height: 100vh; display: flex; background: var(--bg); }
.login-page { display: flex; min-height: 100vh; width: 100%; }
.login-left {
  flex: 1;
  background: var(--navy);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 56px 60px 72px; position: relative; overflow: hidden;
}
.login-left::before {
  content: ''; position: absolute;
  top: -120px; right: -120px; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201,151,58,0.12) 0%, transparent 65%);
  border-radius: 50%;
}
.login-left::after {
  content: ''; position: absolute;
  bottom: -80px; left: -80px; width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(201,151,58,0.07) 0%, transparent 65%);
  border-radius: 50%;
}
.login-brand-wrap { position: relative; z-index: 1; }
.login-logo {
  font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 8px;
}
.login-tagline {
  color: rgba(255,255,255,0.45); font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.14em; font-weight: 500;
}
.login-feature-list { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 20px; }
.login-feature {
  display: flex; align-items: flex-start; gap: 16px;
}
.login-feature-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(201,151,58,0.15); border: 1px solid rgba(201,151,58,0.25);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--gold);
}
.login-feature-text h4 { font-size: 0.875rem; font-weight: 600; color: #fff; margin: 0 0 3px; }
.login-feature-text p { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin: 0; line-height: 1.4; }
.login-quote { position: relative; z-index: 1; }
.login-quote blockquote {
  font-family: 'Playfair Display', serif; font-size: 1.2rem;
  color: rgba(255,255,255,0.55); font-style: italic; line-height: 1.6;
  border-left: 2px solid var(--gold-border); padding-left: 20px;
}
.login-right {
  width: 520px; background: var(--bg-white);
  display: flex; align-items: center; justify-content: center; padding: 48px;
}
.login-card { width: 100%; max-width: 400px; }
.login-card-header { margin-bottom: 36px; }
.login-card-header h1 { font-size: 1.9rem; margin-bottom: 10px; }
.login-card-header p { color: var(--text-sub); font-size: 0.9rem; }
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-submit { margin-top: 8px; }
.login-error {
  display: flex; align-items: center; gap: 8px;
  background: var(--red-dim); border: 1px solid rgba(224,92,92,0.25);
  color: var(--red); padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 0.875rem; margin-bottom: 4px;
}
.login-footer { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.login-footer p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }
.login-demo { margin-top: 20px; }
.demo-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-btn {
  background: var(--bg-soft); border: 1.5px solid var(--border); color: var(--text-sub);
  padding: 9px 12px; border-radius: var(--radius-xs); font-size: 0.8rem; font-weight: 500;
  transition: all var(--transition); text-align: left; cursor: pointer;
}
.demo-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }

/* ─── DASHBOARD ─────────────────────────────────────────────────────────────── */
.dash-hero { margin-bottom: 32px; }
.dash-greeting { font-size: 2.2rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.dash-subtitle { font-size: 1rem; color: var(--text-sub); }

.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon-gold { background: var(--gold-dim); color: var(--gold); }
.stat-icon-green { background: var(--green-dim); color: var(--green); }
.stat-icon-blue { background: var(--blue-dim); color: var(--blue); }
.stat-icon-navy { background: rgba(15,28,46,0.08); color: var(--navy); }
.stat-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { font-size: 1rem; font-weight: 700; color: var(--navy); }
.stat-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.stat-alert-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; margin-left: 6px; }

/* Profile completion on dashboard */
.completion-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 24px; margin-bottom: 28px;
  color: #fff;
}
.completion-ring-wrap { flex-shrink: 0; }
.cring { position: relative; width: 80px; height: 80px; }
.cring svg { transform: rotate(-90deg); width: 80px; height: 80px; }
.cring-track { fill: none; stroke: rgba(255,255,255,0.12); stroke-width: 8; }
.cring-fill { fill: none; stroke: var(--gold); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(0.4,0,0.2,1); }
.cring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 800; color: var(--gold); }
.completion-text h3 { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.completion-text p { font-size: 0.85rem; color: rgba(255,255,255,0.55); margin: 0; line-height: 1.4; }
.completion-actions { margin-left: auto; flex-shrink: 0; }
.btn-white {
  background: rgba(255,255,255,0.12); color: #fff;
  border: 1.5px solid rgba(255,255,255,0.2); border-radius: var(--radius-sm);
  padding: 10px 20px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
.btn-white:hover { background: rgba(255,255,255,0.2); }

/* Quick actions */
.quick-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.action-card {
  background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 20px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none; color: inherit;
}
.action-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.action-card-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.action-card-icon-gold { background: var(--gold-dim); color: var(--gold); }
.action-card-icon-green { background: var(--green-dim); color: var(--green); }
.action-card-icon-blue { background: var(--blue-dim); color: var(--blue); }
.action-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--navy); }
.action-card p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.action-arrow { margin-top: auto; color: var(--text-muted); }

/* Activity timeline */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-line-wrap { display: flex; flex-direction: column; align-items: center; gap: 0; flex-shrink: 0; margin-top: 4px; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.activity-action { font-size: 0.875rem; font-weight: 500; color: var(--navy); }
.activity-time { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* Estate card */
.estate-card {
  background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-sm);
}
.estate-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.estate-name { font-size: 1.1rem; font-weight: 700; color: var(--navy); font-family: 'Playfair Display', serif; }
.estate-advisor { font-size: 0.82rem; color: var(--text-sub); margin-top: 3px; }
.estate-card-right { margin-left: auto; }

.completion-banner {
  background: var(--gold-dim); border: 1.5px solid var(--gold-border); border-radius: var(--radius);
  padding: 16px 20px; display: flex; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap;
}
.completion-banner-icon { color: var(--gold); flex-shrink: 0; }
.completion-banner-title { font-size: 0.875rem; font-weight: 700; color: var(--navy); }
.completion-banner-sub { font-size: 0.8rem; color: var(--text-sub); }

/* ─── WEALTH SIMULATOR ──────────────────────────────────────────────────────── */
.simulator-layout { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
.sim-panel { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.sim-panel-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 24px; }
.sim-panel .form-group { margin-bottom: 20px; }

/* Animated result number */
.sim-result-hero {
  text-align: center; padding: 32px 24px 24px;
  border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.sim-result-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.sim-result-number {
  font-size: 3rem; font-weight: 800; color: var(--gold);
  font-family: 'Inter', sans-serif; line-height: 1;
  transition: all 0.3s;
}
.sim-result-sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; }

/* Risk cards */
.risk-cards { display: flex; flex-direction: column; gap: 8px; }
.risk-card {
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-white);
}
.risk-card:hover { border-color: var(--border-dark); box-shadow: var(--shadow-xs); }
.risk-card.selected { border-color: transparent; }
.risk-card-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.risk-card .content { flex: 1; min-width: 0; }
.risk-card-level { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.risk-card-name { font-size: 0.875rem; font-weight: 700; color: var(--navy); }
.risk-card-return { font-size: 0.75rem; color: var(--text-sub); margin-top: 1px; }
/* colour themes */
.risk-blue  { border-color: rgba(59,130,246,0.3); background: rgba(59,130,246,0.02); }
.risk-blue.selected { border-color: var(--blue); background: var(--blue-dim); }
.risk-blue .risk-card-dot { background: var(--blue); }
.risk-teal  { border-color: rgba(8,145,178,0.3); background: rgba(8,145,178,0.02); }
.risk-teal.selected { border-color: var(--teal); background: var(--teal-dim); }
.risk-teal .risk-card-dot { background: var(--teal); }
.risk-green { border-color: rgba(39,174,96,0.3); background: rgba(39,174,96,0.02); }
.risk-green.selected { border-color: var(--green); background: var(--green-dim); }
.risk-green .risk-card-dot { background: var(--green); }
.risk-amber { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.02); }
.risk-amber.selected { border-color: var(--amber); background: var(--amber-dim); }
.risk-amber .risk-card-dot { background: var(--amber); }
.risk-red   { border-color: rgba(224,92,92,0.3); background: rgba(224,92,92,0.02); }
.risk-red.selected { border-color: var(--red); background: var(--red-dim); }
.risk-red .risk-card-dot { background: var(--red); }

/* Chart */
.chart-container { height: 280px; margin-bottom: 24px; }

/* Projection table */
.proj-table { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 20px; }
.proj-table-head {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  background: var(--bg-soft); padding: 10px 16px;
  font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
}
.proj-table-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  padding: 12px 16px; border-top: 1px solid var(--border); font-size: 0.875rem;
  transition: background var(--transition);
}
.proj-table-row:hover { background: var(--bg-soft); }
.proj-table-row.highlight { background: var(--gold-dim); font-weight: 700; }
.proj-label { font-weight: 700; color: var(--navy); }

/* Comparison bars */
.comparison-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.comparison-title { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.comp-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.comp-bar-label { width: 100px; font-size: 0.78rem; font-weight: 600; color: var(--text-sub); flex-shrink: 0; }
.comp-bar-track { flex: 1; height: 10px; background: var(--bg-soft); border-radius: var(--radius-pill); overflow: hidden; }
.comp-bar-fill { height: 100%; border-radius: var(--radius-pill); transition: width 0.8s cubic-bezier(0.4,0,0.2,1); }
.comp-bar-val { width: 80px; font-size: 0.78rem; font-weight: 700; color: var(--navy); text-align: right; flex-shrink: 0; }

/* Sim CTA */
.sim-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius); padding: 28px; display: flex; align-items: center; gap: 24px; margin-top: 20px;
  box-shadow: var(--shadow);
}
.sim-cta h3 { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.sim-cta p { font-size: 0.85rem; color: rgba(255,255,255,0.55); margin: 0; }
.sim-disclaimer { font-size: 0.72rem; color: var(--text-muted); display: flex; gap: 6px; line-height: 1.5; margin-top: 16px; }

/* ─── PREFERENCES ───────────────────────────────────────────────────────────── */
.prefs-progress {
  background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 24px; box-shadow: var(--shadow-sm);
}
.prefs-progress-label { font-size: 0.82rem; font-weight: 600; color: var(--text-sub); margin-bottom: 10px; display: flex; justify-content: space-between; }
.prefs-progress-track { height: 6px; background: var(--bg-soft); border-radius: var(--radius-pill); overflow: hidden; }
.prefs-progress-fill { height: 100%; background: var(--gold); border-radius: var(--radius-pill); transition: width 0.5s cubic-bezier(0.4,0,0.2,1); }

.prefs-section {
  background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 16px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.prefs-section-header { padding: 22px 26px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 16px; }
.prefs-section-num { font-size: 1.8rem; font-weight: 800; color: var(--border-dark); line-height: 1; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.prefs-section-header h2 { font-size: 1rem; font-weight: 700; margin-bottom: 3px; }
.prefs-section-header p { font-size: 0.85rem; color: var(--text-sub); margin: 0; }
.prefs-section-body { padding: 24px 26px; }

/* Large risk slider */
.risk-slider-wrap { display: flex; flex-direction: column; gap: 14px; }
.risk-slider-labels { display: flex; justify-content: space-between; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.slider-row { display: flex; align-items: center; gap: 16px; }
.risk-slider {
  flex: 1; appearance: none; height: 6px; border-radius: var(--radius-pill); outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--blue), var(--teal), var(--green), var(--amber), var(--red));
}
.risk-slider::-webkit-slider-thumb {
  appearance: none; width: 26px; height: 26px; background: var(--bg-white);
  border-radius: 50%; cursor: pointer;
  border: 3px solid var(--gold); box-shadow: 0 2px 8px rgba(201,151,58,0.4);
  transition: transform var(--transition);
}
.risk-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.risk-slider::-moz-range-thumb { width: 26px; height: 26px; background: var(--bg-white); border: 3px solid var(--gold); border-radius: 50%; cursor: pointer; }
.slider-value-badge {
  min-width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800; box-shadow: 0 2px 8px rgba(201,151,58,0.4);
  flex-shrink: 0;
}
.risk-desc-box {
  background: var(--bg-soft); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px;
  transition: all var(--transition);
}
.risk-desc-label { font-size: 0.82rem; font-weight: 700; color: var(--gold); margin-bottom: 5px; }
.risk-desc-text { font-size: 0.85rem; color: var(--text-sub); line-height: 1.6; margin: 0; }

/* Pill toggles (ESG) */
.pill-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-toggle { cursor: pointer; }
.pill-toggle input { display: none; }
.pill-toggle span {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-pill);
  font-size: 0.845rem; font-weight: 500; color: var(--text-sub);
  background: var(--bg-white); transition: all var(--transition); white-space: nowrap;
  user-select: none;
}
.pill-toggle:hover span { border-color: var(--gold); color: var(--gold); }
.pill-toggle input:checked + span {
  background: var(--gold-dim); border-color: var(--gold);
  color: var(--gold); font-weight: 600;
}

/* Sector icon cards */
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.sector-card { cursor: pointer; }
.sector-card input { display: none; }
.sector-card-inner {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-white); transition: all var(--transition); text-align: center;
}
.sector-card:hover .sector-card-inner { border-color: var(--gold); box-shadow: var(--shadow-xs); }
.sector-card input:checked + .sector-card-inner {
  border-color: var(--gold); background: var(--gold-dim);
}
.sector-icon { font-size: 1.6rem; }
.sector-name { font-size: 0.78rem; font-weight: 600; color: var(--text-sub); line-height: 1.3; }
.sector-card input:checked + .sector-card-inner .sector-name { color: var(--gold); }

/* Priority cards */
.priority-grid { display: flex; flex-direction: column; gap: 10px; }
.priority-card { cursor: pointer; }
.priority-card input { display: none; }
.priority-card-inner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-white); transition: all var(--transition);
}
.priority-card:hover .priority-card-inner { border-color: var(--gold); }
.priority-card input:checked + .priority-card-inner { border-color: var(--gold); background: var(--gold-dim); }
.priority-emoji { font-size: 1.3rem; flex-shrink: 0; }
.priority-title { font-size: 0.9rem; font-weight: 700; color: var(--navy); }
.priority-desc { font-size: 0.78rem; color: var(--text-muted); margin: 0; }
.priority-tick { margin-left: auto; color: var(--gold); flex-shrink: 0; display: none; }
.priority-card input:checked + .priority-card-inner .priority-tick { display: flex; }

.prefs-actions { margin-top: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.prefs-note { font-size: 0.82rem; color: var(--text-muted); max-width: 500px; line-height: 1.5; }

/* Save animation */
@keyframes successPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }
.btn-gold.save-success { animation: successPulse 0.4s ease; }

/* ─── EDUCATION HUB ─────────────────────────────────────────────────────────── */
.edu-header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.edu-progress-wrap { display: flex; align-items: center; gap: 12px; }
.edu-progress-text { font-size: 0.82rem; font-weight: 600; color: var(--text-sub); white-space: nowrap; }
.edu-progress-track { width: 120px; height: 6px; background: var(--border); border-radius: var(--radius-pill); overflow: hidden; }
.edu-progress-fill { height: 100%; background: var(--green); border-radius: var(--radius-pill); transition: width 0.5s cubic-bezier(0.4,0,0.2,1); }
.streak-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(245,158,11,0.1); border: 1.5px solid rgba(245,158,11,0.25);
  color: var(--amber); border-radius: var(--radius-pill);
  padding: 6px 14px; font-size: 0.82rem; font-weight: 700;
}

.edu-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.edu-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.edu-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.edu-card-img {
  height: 100px; display: flex; align-items: flex-end; padding: 14px;
  position: relative; overflow: hidden;
}
.edu-card-img-icon { font-size: 2rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.edu-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.edu-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.edu-card-title { font-size: 0.95rem; font-weight: 700; color: var(--navy); line-height: 1.3; }
.edu-card-desc { font-size: 0.83rem; color: var(--text-sub); line-height: 1.6; flex: 1; margin: 0; }
.edu-card-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-soft);
}
.edu-read-time { display: flex; align-items: center; gap: 5px; font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.edu-read-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--green-dim); color: var(--green); border: 1px solid var(--green-border);
  border-radius: var(--radius-pill); font-size: 0.7rem; font-weight: 700;
  padding: 3px 10px; text-transform: uppercase; letter-spacing: 0.04em;
}
.btn-read-more {
  background: transparent; border: 1.5px solid var(--border); color: var(--text-sub);
  padding: 6px 14px; border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 600;
  transition: all var(--transition); cursor: pointer;
}
.btn-read-more:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
@keyframes cardComplete { 0%{transform:scale(1)} 50%{transform:scale(1.02)} 100%{transform:scale(1)} }
.edu-card.just-read { animation: cardComplete 0.4s ease; }

/* External article link */
.edu-card-ext {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-white);
}
.btn-ext-link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 9px 16px;
  border: 1.5px solid var(--gold-border); border-radius: var(--radius-sm);
  color: var(--gold); background: transparent;
  font-size: 0.82rem; font-weight: 600; text-decoration: none;
  transition: all var(--transition);
}
.btn-ext-link:hover {
  background: var(--gold-dim); border-color: var(--gold);
  transform: translateY(-1px); box-shadow: 0 2px 8px rgba(201,151,58,0.15);
}
.btn-ext-link svg { flex-shrink: 0; opacity: 0.8; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15,28,46,0.5); backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 40px 24px; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal-panel {
  background: var(--bg-white); border-radius: var(--radius);
  max-width: 720px; width: 100%; box-shadow: var(--shadow-lg);
  margin: auto; overflow: hidden;
}
.modal-header { padding: 28px 32px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal-tag { font-size: 0.72rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.modal-title { font-size: 1.35rem; color: var(--navy); font-family: 'Playfair Display', serif; margin-bottom: 4px; }
.modal-meta { font-size: 0.78rem; color: var(--text-muted); }
.modal-close {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-xs);
  color: var(--text-muted); padding: 7px; transition: all var(--transition); flex-shrink: 0; display: flex; cursor: pointer;
}
.modal-close:hover { color: var(--navy); border-color: var(--border-dark); }
.modal-body { padding: 28px 32px; max-height: 60vh; overflow-y: auto; font-size: 0.9rem; color: var(--text-sub); line-height: 1.8; }
.modal-body p { margin-bottom: 14px; }
.modal-body h4 { color: var(--navy); font-size: 0.95rem; margin: 20px 0 8px; }
.modal-body strong { color: var(--navy); font-weight: 600; }
.modal-body em { color: var(--text); font-style: italic; }
.modal-footer { padding: 18px 32px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; background: var(--bg-soft); }

/* ─── BRIEFINGS ─────────────────────────────────────────────────────────────── */
.briefing-card {
  background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; gap: 24px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gold);
}
.briefing-date-col { display: flex; flex-direction: column; align-items: center; min-width: 48px; }
.briefing-month { font-size: 0.68rem; text-transform: uppercase; color: var(--gold); font-weight: 700; letter-spacing: 0.08em; }
.briefing-day { font-size: 2rem; font-weight: 800; color: var(--navy); font-family: 'Playfair Display', serif; line-height: 1.1; }
.briefing-content { flex: 1; }
.briefing-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.briefing-meta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
.briefing-meta-item { display: flex; align-items: center; gap: 5px; font-size: 0.82rem; color: var(--text-sub); }
.briefing-desc { font-size: 0.85rem; color: var(--text-sub); margin-bottom: 16px; }

.rsvp-section { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rsvp-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.rsvp-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.rsvp-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-soft); border: 1.5px solid var(--border); color: var(--text-sub);
  padding: 7px 14px; border-radius: var(--radius-pill); font-size: 0.82rem; font-weight: 600; transition: all var(--transition); cursor: pointer;
}
.rsvp-btn:hover { border-color: var(--border-dark); color: var(--navy); }
.rsvp-active-yes { background: var(--green-dim) !important; border-color: var(--green) !important; color: var(--green) !important; }
.rsvp-active-maybe { background: var(--amber-dim) !important; border-color: var(--amber) !important; color: var(--amber) !important; }
.rsvp-active-no { background: var(--red-dim) !important; border-color: var(--red) !important; color: var(--red) !important; }

.info-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; font-size: 0.85rem; color: var(--text-sub); margin-bottom: 28px;
}

.past-briefings-list { display: flex; flex-direction: column; gap: 10px; }
.past-briefing-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-xs); }
.past-briefing-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; cursor: pointer; gap: 16px; transition: background var(--transition); }
.past-briefing-header:hover { background: var(--bg-soft); }
.past-briefing-tag { font-size: 0.7rem; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.past-briefing-title { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.past-briefing-meta { font-size: 0.78rem; color: var(--text-muted); }
.past-briefing-toggle { color: var(--text-muted); flex-shrink: 0; transition: transform 0.3s; }
.past-briefing-body { padding: 0 22px 18px; }
.past-briefing-summary-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 8px; }
.past-briefing-summary { font-size: 0.875rem; color: var(--text-sub); line-height: 1.7; }

.empty-state { text-align: center; padding: 48px; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* ─── MESSAGES ──────────────────────────────────────────────────────────────── */
.messages-layout {
  display: grid; grid-template-columns: 260px 1fr;
  background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; height: calc(100vh - var(--nav-height) - 130px); min-height: 520px;
  box-shadow: var(--shadow-sm);
}
.messages-sidebar { border-right: 1px solid var(--border); display: flex; flex-direction: column; background: var(--bg-soft); }
.messages-sidebar-header { padding: 18px 18px 14px; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--border); }
.convo-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; transition: background var(--transition); border-bottom: 1px solid var(--border); }
.convo-active { background: var(--bg-white); border-left: 3px solid var(--gold); }
.convo-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--gold-dim);
  border: 2px solid var(--gold-border); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 800; flex-shrink: 0;
}
.convo-name { font-size: 0.875rem; font-weight: 700; color: var(--navy); }
.convo-preview { font-size: 0.75rem; color: var(--text-muted); }
.convo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-left: auto; }
.messages-sidebar-note { margin-top: auto; padding: 14px 16px; font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border); }

.messages-thread { display: flex; flex-direction: column; overflow: hidden; }
.thread-header { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--border); flex-shrink: 0; background: var(--bg-white); }
.thread-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gold-dim); border: 2px solid var(--gold-border); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 0.82rem; font-weight: 800; }
.thread-name { font-size: 0.95rem; font-weight: 700; color: var(--navy); }
.thread-role { font-size: 0.78rem; color: var(--text-muted); }
.thread-status { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--green); font-weight: 500; }
.status-dot-online { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.thread-messages { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
.thread-messages::-webkit-scrollbar { width: 4px; }
.thread-messages::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 2px; }

.message-row { display: flex; gap: 10px; align-items: flex-end; }
.message-row-heir { flex-direction: row-reverse; }
.msg-avatar-sm { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 700; }
.msg-avatar-sm { background: var(--gold-dim); border: 1px solid var(--gold-border); color: var(--gold); }
.msg-avatar-heir { background: var(--border); color: var(--text-sub); }
.message-bubble { max-width: 70%; border-radius: 18px; padding: 12px 16px; }
.bubble-advisor { background: var(--bg-white); border: 1px solid var(--border); border-bottom-left-radius: 4px; box-shadow: var(--shadow-xs); }
.bubble-heir { background: var(--navy); border-bottom-right-radius: 4px; }
.bubble-advisor .message-text { color: var(--text); }
.bubble-heir .message-text { color: #fff; }
.message-text { font-size: 0.875rem; line-height: 1.6; }
.message-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }
.bubble-heir .message-time { color: rgba(255,255,255,0.45); }

.thread-composer { padding: 14px 20px; border-top: 1px solid var(--border); flex-shrink: 0; background: var(--bg-white); }
.composer-wrap { display: flex; gap: 10px; align-items: flex-end; }
.composer-input {
  flex: 1; background: var(--bg-soft); border: 1.5px solid var(--border); color: var(--text);
  border-radius: 14px; padding: 12px 16px; font-size: 0.875rem; resize: none;
  min-height: 44px; max-height: 160px; transition: border-color var(--transition); line-height: 1.5; overflow-y: auto;
}
.composer-input:focus { outline: none; border-color: var(--gold); background: var(--bg-white); }
.composer-send {
  width: 44px; height: 44px; border-radius: 14px; background: var(--navy); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all var(--transition);
}
.composer-send:hover { background: var(--navy-mid); transform: scale(1.05); }
.composer-send:disabled { opacity: 0.4; transform: none; }
.composer-hint { font-size: 0.7rem; color: var(--text-muted); margin-top: 6px; }

/* ─── PROFILE ───────────────────────────────────────────────────────────────── */
.profile-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.profile-section { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.profile-section-header { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.profile-section-header h2 { font-size: 1rem; font-weight: 700; margin-bottom: 3px; }
.profile-section-header p { font-size: 0.85rem; color: var(--text-sub); margin: 0; }
.profile-fields { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.profile-save-row { margin-top: 8px; }

/* Profile avatar */
.profile-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 24px; border-bottom: 1px solid var(--border); }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--gold-dim); border: 3px solid var(--gold-border);
  color: var(--gold); font-size: 1.5rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
}
.profile-avatar-name { font-size: 1rem; font-weight: 700; color: var(--navy); }
.profile-avatar-role { font-size: 0.8rem; color: var(--text-muted); }

/* Sidebar widgets */
.profile-widget { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; box-shadow: var(--shadow-xs); overflow: hidden; }
.widget-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.widget-body { padding: 16px 20px; }
.completion-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; }
.completion-ring { position: relative; width: 80px; height: 80px; }
.completion-ring svg { transform: rotate(-90deg); width: 80px; height: 80px; }
.completion-ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 800; color: var(--gold); }
.completion-missing { display: flex; flex-direction: column; gap: 8px; padding: 0 20px 16px; }
.completion-missing-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.missing-item { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; color: var(--text-sub); }
.missing-item svg { color: var(--amber); flex-shrink: 0; }
.completion-done { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--green); font-size: 0.875rem; font-weight: 600; padding: 8px 20px 16px; }

.connection-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 10px 20px; border-bottom: 1px solid var(--border); gap: 12px; }
.connection-row:last-of-type { border-bottom: none; }
.connection-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }
.connection-value { font-size: 0.85rem; color: var(--navy); font-weight: 500; text-align: right; word-break: break-word; }
.connection-email { font-size: 0.75rem; }

.quick-links { display: flex; flex-direction: column; }
.quick-link-item { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 0.85rem; color: var(--text-sub); transition: all var(--transition); }
.quick-link-item:last-child { border-bottom: none; }
.quick-link-item:hover { background: var(--bg-soft); color: var(--gold); }

/* Toggle switches */
.notification-prefs { display: flex; flex-direction: column; }
.notif-section-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); padding: 10px 0 8px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.toggle-row:last-child { border-bottom: none; }
.toggle-label { display: flex; flex-direction: column; gap: 2px; }
.toggle-title { font-size: 0.875rem; font-weight: 600; color: var(--navy); }
.toggle-sub { font-size: 0.78rem; color: var(--text-muted); }
.toggle-switch { position: relative; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track { display: block; width: 42px; height: 24px; background: var(--border-dark); border-radius: 12px; transition: background 0.2s; cursor: pointer; position: relative; }
.toggle-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.toggle-switch input:checked + .toggle-track { background: var(--green); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(18px); }

/* ─── FLASH / TOAST ─────────────────────────────────────────────────────────── */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.875rem; border: 1px solid; }
.flash-error { background: var(--red-dim); border-color: rgba(224,92,92,0.25); color: var(--red); }
.flash-success { background: var(--green-dim); border-color: var(--green-border); color: var(--green); }
.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 500;
  background: var(--navy); color: #fff;
  padding: 14px 20px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500; box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.96); opacity: 0;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1); pointer-events: none;
  display: flex; align-items: center; gap: 10px; max-width: 320px;
}
.toast.show { transform: translateY(0) scale(1); opacity: 1; }
.toast.toast-success::before { content: '✓'; font-weight: 700; color: var(--green); }
.toast.toast-error { background: var(--red); }

/* ─── MISC ──────────────────────────────────────────────────────────────────── */
.progress-bar-mini { height: 4px; background: var(--border); border-radius: var(--radius-pill); margin-top: 8px; overflow: hidden; }
.progress-fill-mini { height: 100%; background: var(--gold); border-radius: var(--radius-pill); }
.badge-alert { background: var(--red); color: #fff; font-size: 0.68rem; font-weight: 800; padding: 2px 7px; border-radius: var(--radius-pill); display: inline-block; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ─── ANIMATIONS ────────────────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes countUp { from { opacity:0; transform:scale(0.9); } to { opacity:1; transform:scale(1); } }
.fade-up { animation: fadeUp 0.4s ease both; }
.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.1s; }
.fade-up-3 { animation-delay: 0.15s; }
.fade-up-4 { animation-delay: 0.2s; }

/* ─── NOTIFICATIONS ─────────────────────────────────────────────────────────── */
.notif-wrap { position: relative; }
.notif-bell {
  position: relative; background: none; border: none; cursor: pointer;
  color: var(--text-sub); padding: 6px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  transition: color var(--transition), background var(--transition);
}
.notif-bell:hover { color: var(--navy); background: var(--bg-soft); }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--red); color: #fff;
  font-size: 0.62rem; font-weight: 800;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-white);
  transition: opacity 0.2s;
}
.notif-badge-hidden { opacity: 0; pointer-events: none; }
.notif-dropdown {
  position: absolute; top: calc(100% + 12px); right: 0;
  width: 340px; background: var(--bg-white);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(15,28,46,0.14);
  opacity: 0; transform: translateY(-6px) scale(0.98);
  pointer-events: none; transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
  z-index: 200;
}
.notif-dropdown-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-size: 0.82rem; font-weight: 700; color: var(--navy);
}
.notif-read-all {
  background: none; border: none; cursor: pointer;
  font-size: 0.75rem; color: var(--gold); font-weight: 600;
  transition: color var(--transition);
}
.notif-read-all:hover { color: var(--gold-light); }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background var(--transition); position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-soft); }
.notif-item-unread { background: rgba(201,151,58,0.04); }
.notif-icon {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.notif-icon-message   { background: rgba(59,130,246,0.12); color: var(--blue); }
.notif-icon-briefing  { background: rgba(201,151,58,0.12); color: var(--gold); }
.notif-icon-document  { background: rgba(8,145,178,0.12);  color: var(--teal); }
.notif-icon-education { background: rgba(39,174,96,0.12);  color: var(--green); }
.notif-icon-preferences { background: rgba(139,92,246,0.12); color: #8B5CF6; }
.notif-icon-profile   { background: rgba(245,158,11,0.12); color: var(--amber); }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 0.82rem; font-weight: 600; color: var(--navy); line-height: 1.3; }
.notif-body  { font-size: 0.76rem; color: var(--text-sub); margin-top: 2px; line-height: 1.4; }
.notif-time  { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }
.notif-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0; margin-top: 6px;
}
.notif-empty { padding: 24px 16px; text-align: center; font-size: 0.85rem; color: var(--text-muted); }

/* ─── SIBLING CARD ───────────────────────────────────────────────────────────── */
.sibling-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  display: flex; align-items: center; gap: 18px;
  box-shadow: var(--shadow-xs);
}
.sibling-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; flex-shrink: 0;
}
.sibling-info { flex: 1; min-width: 0; }
.sibling-name  { font-size: 0.95rem; font-weight: 700; color: var(--navy); }
.sibling-meta  { font-size: 0.8rem; color: var(--text-sub); margin-top: 2px; }
.sibling-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.sibling-badge {
  font-size: 0.72rem; font-weight: 700; color: var(--gold);
  background: var(--gold-dim); padding: 4px 10px;
  border-radius: var(--radius-pill); border: 1px solid rgba(201,151,58,0.2);
  flex-shrink: 0;
}

/* ─── ONBOARDING WIZARD ──────────────────────────────────────────────────────── */
.onboard-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
}
.onboard-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px; padding: 40px;
}
.onboard-steps {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 36px;
}
.onboard-step {
  width: 32px; height: 4px; border-radius: var(--radius-pill);
  background: var(--border); transition: background 0.3s;
}
.onboard-step.active { background: var(--gold); }
.onboard-pane { display: none; animation: fadeUp 0.35s ease both; }
.onboard-pane.active { display: block; }
.onboard-icon {
  width: 68px; height: 68px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.onboard-icon-gold  { background: var(--gold-dim);           color: var(--gold); }
.onboard-icon-blue  { background: rgba(59,130,246,0.1);       color: var(--blue); }
.onboard-icon-green { background: var(--green-dim);           color: var(--green); }
.onboard-title { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin-bottom: 16px; line-height: 1.2; }
.onboard-body  { font-size: 0.9rem; color: var(--text-sub); line-height: 1.6; margin-bottom: 12px; }
.onboard-advisor-card {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  margin: 16px 0;
}
.onboard-advisor-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700; flex-shrink: 0;
}
.onboard-advisor-name  { font-size: 0.9rem; font-weight: 700; color: var(--navy); }
.onboard-advisor-firm  { font-size: 0.78rem; color: var(--text-sub); margin-top: 2px; }
.onboard-advisor-email { font-size: 0.73rem; color: var(--text-muted); margin-top: 2px; }
.onboard-features { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.onboard-feature {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 16px; background: var(--bg-soft);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.onboard-feature-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.onboard-feature-title { font-size: 0.87rem; font-weight: 700; color: var(--navy); }
.onboard-feature-desc  { font-size: 0.78rem; color: var(--text-sub); margin-top: 2px; }
.onboard-next-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.onboard-next-item {
  display: flex; align-items: center; gap: 14px;
  font-size: 0.875rem; font-weight: 600; color: var(--navy);
}
.onboard-next-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold-dim); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 800; flex-shrink: 0;
}
.onboard-nav {
  display: flex; align-items: center; gap: 12px; margin-top: 36px;
  padding-top: 24px; border-top: 1px solid var(--border);
}

/* ─── GOALS PAGE ─────────────────────────────────────────────────────────────── */
.goals-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-bottom: 32px;
}
.goal-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-xs); transition: box-shadow var(--transition);
}
.goal-card:hover { box-shadow: var(--shadow-sm); }
.goal-card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.goal-emoji { font-size: 1.5rem; line-height: 1; }
.goal-category-badge {
  font-size: 0.7rem; font-weight: 700; color: var(--text-muted);
  background: var(--bg-soft); padding: 3px 9px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  flex: 1;
}
.goal-delete {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: 4px; border-radius: var(--radius-xs); display: flex;
  transition: color var(--transition), background var(--transition);
}
.goal-delete:hover { color: var(--red); background: rgba(224,92,92,0.08); }
.goal-title { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.goal-notes { font-size: 0.78rem; color: var(--text-sub); line-height: 1.45; margin-bottom: 14px; }
.goal-amounts {
  display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px;
}
.goal-current { font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.goal-target   { font-size: 0.8rem; color: var(--text-muted); }
.goal-bar-track {
  height: 6px; background: var(--border); border-radius: var(--radius-pill);
  overflow: hidden; margin-bottom: 10px;
}
.goal-bar-fill {
  height: 100%; background: var(--gold);
  border-radius: var(--radius-pill); transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.goal-bar-done { background: var(--green); }
.goal-footer { display: flex; justify-content: space-between; align-items: center; }
.goal-pct { font-size: 0.78rem; font-weight: 700; color: var(--gold); }
.goal-pct-done { color: var(--green); }
.goal-deadline {
  font-size: 0.72rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.goals-empty {
  grid-column: 1 / -1; text-align: center; padding: 60px 20px;
}
.goals-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.goals-empty-title { font-size: 1rem; font-weight: 700; color: var(--navy); }
.goals-empty-sub { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* Goal category picker */
.goal-cat-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.goal-cat-pill { cursor: pointer; }
.goal-cat-pill input { display: none; }
.goal-cat-pill span {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border); font-size: 0.78rem; font-weight: 600;
  color: var(--text-sub); background: var(--bg-soft);
  transition: all var(--transition); cursor: pointer;
}
.goal-cat-pill input:checked + span {
  border-color: var(--gold); background: var(--gold-dim); color: var(--gold);
}

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,28,46,0.35);
  z-index: 300; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
  padding: 16px;
}
.modal-backdrop.modal-open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--bg-white); border-radius: var(--radius);
  width: 100%; max-width: 500px; box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
  transform: scale(0.96); transition: transform 0.2s;
}
.modal-backdrop.modal-open .modal-box { transform: scale(1); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.modal-close {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: 4px; border-radius: var(--radius-xs); display: flex;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--navy); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 12px;
  padding: 16px 24px; border-top: 1px solid var(--border);
}
.form-label { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ─── DOCUMENTS PAGE ─────────────────────────────────────────────────────────── */
.doc-filter-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
}
.doc-filter-btn {
  padding: 7px 16px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border); background: var(--bg-white);
  font-size: 0.8rem; font-weight: 600; color: var(--text-sub);
  cursor: pointer; transition: all var(--transition);
}
.doc-filter-btn:hover { border-color: var(--gold); color: var(--gold); }
.doc-filter-btn.active { border-color: var(--gold); background: var(--gold-dim); color: var(--gold); }
.docs-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.doc-row {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  display: flex; align-items: center; gap: 20px;
  box-shadow: var(--shadow-xs); transition: box-shadow var(--transition);
}
.doc-row:hover { box-shadow: var(--shadow-sm); }
.doc-icon {
  width: 48px; height: 56px; border-radius: var(--radius-xs);
  background: rgba(224,92,92,0.08); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; flex-shrink: 0;
  color: var(--red);
}
.doc-icon-pdf { background: rgba(224,92,92,0.08); color: var(--red); }
.doc-type-label { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: 0.92rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.doc-desc { font-size: 0.8rem; color: var(--text-sub); line-height: 1.4; margin-bottom: 8px; }
.doc-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.doc-category-tag {
  font-size: 0.7rem; font-weight: 700; color: var(--text-muted);
  background: var(--bg-soft); padding: 2px 8px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
}
.doc-date, .doc-size { font-size: 0.75rem; color: var(--text-muted); }
.btn-doc-download {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg-white);
  font-size: 0.8rem; font-weight: 600; color: var(--text-sub);
  cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.btn-doc-download:hover {
  border-color: var(--gold); color: var(--gold); background: var(--gold-dim);
}
.docs-empty { text-align: center; padding: 60px 20px; }
.docs-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.docs-empty-title { font-size: 1rem; font-weight: 700; color: var(--navy); }
.docs-empty-sub { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* ─── RESPONSIVE ────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .simulator-layout { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
  .edu-grid { grid-template-columns: repeat(2,1fr); }
  .messages-layout { grid-template-columns: 220px 1fr; }
  .quick-grid { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 768px) {
  :root { --nav-height: 56px; }
  h1 { font-size: 1.6rem; }
  .main-content { padding: calc(var(--nav-height) + 20px) 16px calc(var(--bottom-nav) + 20px); }

  .nav-links { display: none; }
  .nav-user { display: none; }
  .hamburger { display: none; }
  .bottom-nav { display: block; }

  .stat-grid { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .quick-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .demo-accounts { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .profile-sidebar { grid-template-columns: 1fr; }
  .sim-cta { flex-direction: column; }
  .messages-layout { grid-template-columns: 1fr; height: auto; min-height: 600px; }
  .messages-sidebar { display: none; }
  .completion-card { flex-wrap: wrap; }
  .completion-actions { width: 100%; }
  .completion-actions .btn-white { width: 100%; justify-content: center; }

  .login-page { flex-direction: column; }
  .login-left { display: none; }
  .login-right { width: 100%; padding: 32px 24px; min-height: 100vh; align-items: flex-start; padding-top: 64px; }

  .briefing-card { flex-direction: column; }
  .briefing-date-col { flex-direction: row; align-items: center; gap: 10px; }

  .notif-dropdown { width: 300px; right: -60px; }
  .doc-row { flex-wrap: wrap; }
  .btn-doc-download { width: 100%; justify-content: center; }
  .goals-grid { grid-template-columns: 1fr; }
  .sibling-card { flex-wrap: wrap; }
  .onboard-card { padding: 28px 20px; }

  .page-header { flex-direction: column; gap: 8px; }
  .edu-header-row { flex-direction: column; align-items: flex-start; }
  .rsvp-buttons { flex-wrap: wrap; }

  .sector-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .pill-grid { gap: 8px; }
  .proj-table-head div:nth-child(2), .proj-table-row div:nth-child(2) { display: none; }
  .proj-table-head, .proj-table-row { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .sim-result-number { font-size: 2.2rem; }
  .toast { right: 16px; left: 16px; max-width: none; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
