/* =====================================================
   Wealth Bridge Capital — stylesheet
   Same family as the FXTrade project (dark navy + gold),
   distinct identity through Fraunces display, soft aurora
   ambient gradient, and a top-bar-only navigation.
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
  --bg:          #0B1220;
  --bg-2:        #0F1729;
  --surface:     #141C2F;
  --surface-2:   #1A2440;
  --line:        rgba(255,255,255,0.08);
  --line-2:      rgba(255,255,255,0.04);
  --text:        #E8ECF4;
  --text-mid:    #8B95A8;
  --text-dim:    #525B70;
  --accent:      #FFB547;
  --accent-2:    #FFD27A;
  --accent-glow: rgba(255,181,71,0.22);
  --maple:       #E63946;          /* Canadian red, used sparingly */
  --positive:    #3DD68C;
  --positive-soft: rgba(61,214,140,0.12);
  --negative:    #F26B6B;
  --negative-soft: rgba(242,107,107,0.12);
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 8px 24px -8px rgba(0,0,0,0.6), 0 2px 4px rgba(0,0,0,0.4);
  --shadow-pop:  0 20px 50px -16px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.4);
  --font-display:'Fraunces', Georgia, serif;
  --font-body:   'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:   'JetBrains Mono', ui-monospace, monospace;
  --display-soft: 'opsz' 96, 'SOFT' 50;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-variation-settings: var(--display-soft); letter-spacing: -0.01em; }

/* ---------- Aurora-tinted top stripe ---------- */
.aurora-stripe {
  height: 2px;
  background: linear-gradient(90deg, #FFB547 0%, #6FE0A3 35%, #6CC8FF 65%, #E63946 100%);
  background-size: 200% 100%;
  animation: aurora-shift 18s ease-in-out infinite;
}
@keyframes aurora-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ---------- Top navigation ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(11,18,32,0.85);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 36, 'SOFT' 30;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.015em;
}
.brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--accent);
  border-radius: 8px;
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.brand-mark svg { width: 18px; height: 18px; color: var(--bg); }
.brand small {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-left: 2px;
  font-weight: 500;
  display: block;
  margin-top: -4px;
}

/* ---------- Top right cluster (balance + profile dropdown) ---------- */
.topbar-right { display: flex; align-items: center; gap: 14px; }
.balance-pill {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
}
.balance-pill .lbl { font-size: 10.5px; color: var(--text-dim); letter-spacing: 0.14em; text-transform: uppercase; }
.balance-pill .amt { font-size: 14px; color: var(--text); font-weight: 600; }

/* The dropdown trigger */
.profile-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.profile-pill:hover { border-color: var(--accent); background: var(--surface-2); }
.profile-pill.open  { border-color: var(--accent); background: var(--surface-2); }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--maple) 100%);
  color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.profile-pill .name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-pill .chev {
  width: 14px; height: 14px;
  color: var(--text-mid);
  transition: transform .2s ease;
}
.profile-pill.open .chev { transform: rotate(180deg); color: var(--accent); }

/* The dropdown menu itself */
.dropdown-menu {
  position: absolute;
  top: calc(100% - 6px);
  right: 0;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 8px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 100;
}
.dropdown-wrap { position: relative; }
.dropdown-wrap.open .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.dropdown-head {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 6px;
}
.dropdown-head .nm { font-size: 14px; font-weight: 600; color: var(--text); }
.dropdown-head .em { font-size: 12px; color: var(--text-mid); margin-top: 2px; }
.dropdown-divider { height: 1px; background: var(--line-2); margin: 6px 4px; }
.dropdown-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-mid);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .12s ease, color .12s ease;
}
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item .ico {
  width: 16px; height: 16px; flex-shrink: 0;
  color: var(--text-dim);
}
.dropdown-item:hover .ico { color: var(--accent); }
.dropdown-item .meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
.dropdown-item.danger { color: var(--negative); }
.dropdown-item.danger:hover { background: var(--negative-soft); }
.dropdown-item.danger .ico { color: var(--negative); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 8px 24px -8px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-2); color: var(--bg); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--text-mid); background: var(--surface); color: var(--text); }
.btn-positive { background: var(--positive); color: #08130C; }
.btn-positive:hover { filter: brightness(1.08); color: #08130C; }
.btn-full { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }

/* ============================================================
   LANDING PAGE
   ============================================================ */

/* Hero — two-column with the compound calculator on the right */
.hero {
  position: relative;
  padding: 60px 32px 80px;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  overflow: hidden;
}
.hero::before {
  /* Ambient aurora wash */
  content: '';
  position: absolute;
  top: -200px; left: -200px;
  width: 800px; height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: inline-flex; align-items: center; gap: 10px;
}
.hero-eyebrow .flag {
  width: 14px; height: 14px;
  color: var(--maple);
}
.hero h1 {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.0;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 600; }
.hero p.lead {
  font-size: 17px;
  color: var(--text-mid);
  max-width: 480px;
  margin: 0 0 36px;
  line-height: 1.6;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-points {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  max-width: 520px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.hero-points .item .num {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  font-size: 30px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.hero-points .item .label {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* ---------- Compound calculator (signature) ---------- */
.calc {
  background:
    radial-gradient(circle at 0% 0%,   rgba(255,181,71,0.10) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(108,200,255,0.05) 0%, transparent 50%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
.calc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.calc-head .title { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.calc-head .live {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--positive);
  letter-spacing: 0.16em;
  display: inline-flex; align-items: center; gap: 6px;
}
.calc-head .live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--positive); box-shadow: 0 0 6px var(--positive);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

.calc-amount {
  font-family: var(--font-mono);
  font-size: 46px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 4px 0 8px;
}
.calc-amount .ccy { color: var(--text-dim); font-weight: 500; margin-right: 8px; }
.calc-pkg {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--accent-glow);
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 22px;
}
.calc-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px;
  background: var(--line);
  border-radius: 2px;
  outline: none;
  margin: 14px 0 4px;
}
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 6px var(--accent-glow), 0 4px 12px rgba(0,0,0,0.4);
  border: 2px solid var(--bg);
}
.calc-slider::-moz-range-thumb {
  width: 22px; height: 22px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 6px var(--accent-glow);
}
.calc-range {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-dim); margin-bottom: 22px;
}
.calc-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.calc-stat .lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.calc-stat .val {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 600;
  color: var(--positive);
  margin-top: 4px;
  letter-spacing: -0.01em;
}
.calc-chart {
  width: 100%; height: 100px;
}

/* ---------- Packages section ---------- */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  text-align: center;
}
.section-head h2 {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 96, 'SOFT' 50;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 12px;
  text-align: center;
}
.section-head p {
  color: var(--text-mid);
  max-width: 540px;
  margin: 0 auto 50px;
  text-align: center;
  font-size: 15px;
}

.packages {
  max-width: 1200px;
  margin: 30px auto 120px;
  padding: 0 32px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.pkg-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: border-color .2s ease, transform .2s ease;
}
.pkg-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.pkg-card.featured {
  border-color: var(--accent);
  background:
    radial-gradient(circle at top right, var(--accent-glow) 0%, transparent 60%),
    var(--surface);
}
.pkg-card.featured::before {
  content: 'MOST CHOSEN';
  position: absolute;
  top: 18px; right: 18px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  background: var(--accent); color: var(--bg);
  padding: 4px 8px;
  border-radius: 3px;
  font-weight: 600;
}
.pkg-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.pkg-tagline { color: var(--text-mid); font-size: 13.5px; margin: 0 0 22px; min-height: 38px; }
.pkg-rate {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.pkg-rate small { font-size: 13px; color: var(--text-mid); font-weight: 500; margin-left: 4px; }
.pkg-range {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  margin: 6px 0 22px;
}
.pkg-range small { color: var(--text-dim); }
.pkg-assets {
  list-style: none;
  padding: 0; margin: 0 0 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.pkg-assets li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--text);
}
.pkg-assets li::before {
  content: ''; width: 5px; height: 5px;
  background: var(--accent); border-radius: 50%; flex-shrink: 0;
}

/* ---------- Trust / features strip ---------- */
.trust {
  max-width: 1200px; margin: 0 auto 100px; padding: 0 32px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.trust-item .num {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 96, 'SOFT' 50;
  font-size: 36px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.trust-item .lbl { font-size: 13px; color: var(--text-mid); margin-top: 6px; }

/* ---------- How it works ---------- */
.how {
  max-width: 1200px; margin: 0 auto 120px; padding: 0 32px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.how-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.how-step .step-num {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 18px;
}
.how-step h3 {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 600;
  margin: 0 0 8px;
}
.how-step p { color: var(--text-mid); font-size: 14px; margin: 0; }

/* ============================================================
   AUTH FORMS
   ============================================================ */
.auth-wrap {
  min-height: calc(100vh - 90px - 60px);
  display: grid; place-items: center;
  padding: 50px 20px;
}
.auth-card {
  width: 100%; max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}
.auth-card h2 {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 96, 'SOFT' 50;
  font-size: 30px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.auth-card .sub { color: var(--text-mid); margin: 0 0 28px; font-size: 14px; }
.auth-card .alt { color: var(--text-mid); text-align: center; margin-top: 22px; font-size: 13.5px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--text-mid);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14.5px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field small.hint { color: var(--text-dim); font-size: 12px; display: block; margin-top: 6px; }

/* ---------- Flash messages ---------- */
.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-size: 13.5px;
  border: 1px solid;
}
.flash.success { background: var(--positive-soft); border-color: var(--positive); color: var(--positive); }
.flash.error   { background: var(--negative-soft); border-color: var(--negative); color: var(--negative); }
.flash.info    { background: rgba(255,181,71,0.08); border-color: var(--accent); color: var(--accent); }

.flash-wrap { max-width: 1280px; margin: 16px auto 0; padding: 0 32px; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 32px 80px;
}

.page-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 32px;
  flex-wrap: wrap; gap: 18px;
}
.page-head h1 {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 96, 'SOFT' 50;
  font-size: 32px; font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.page-head .sub { color: var(--text-mid); font-size: 14px; margin: 0; }
.page-head .actions { display: flex; gap: 10px; }

/* ---------- Portfolio hero panel ---------- */
.portfolio {
  background:
    radial-gradient(circle at 100% 0%, var(--accent-glow) 0%, transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(108,200,255,0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.portfolio .pf-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.portfolio .pf-total {
  font-family: var(--font-mono);
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}
.portfolio .pf-total .ccy { color: var(--text-dim); font-weight: 500; margin-right: 8px; }
.portfolio .pf-delta {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--positive);
}
.portfolio .pf-delta.down { color: var(--negative); }
.portfolio .pf-cell .v {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-top: 6px;
}
.portfolio .pf-cell.positive .v { color: var(--positive); }

/* ---------- Stat tiles ---------- */
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 18px; margin-bottom: 22px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.stat .value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  margin-top: 8px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.stat .value.positive { color: var(--positive); }
.stat .delta { margin-top: 4px; font-size: 12.5px; color: var(--text-mid); font-family: var(--font-mono); }

/* ---------- Two-column dashboard grid ---------- */
.dash-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}

/* Card primitive */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.card-head h3 {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 600; margin: 0;
  color: var(--text);
  letter-spacing: -0.005em;
}
.card-head .more {
  font-size: 12.5px; color: var(--text-mid);
}

/* Earnings chart container */
.earnings-chart { width: 100%; height: 220px; }
.earnings-legend {
  display: flex; gap: 18px; margin-top: 12px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-mid);
}
.earnings-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: middle; }

/* Asset allocation donut */
.donut-wrap { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; }
.donut { width: 140px; height: 140px; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.donut-legend .row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
}
.donut-legend .row .sw { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.donut-legend .row .nm { flex: 1; color: var(--text-mid); }
.donut-legend .row .pc { font-family: var(--font-mono); font-size: 12px; color: var(--text); font-weight: 600; }

/* ---------- Active investments ---------- */
.invest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.invest-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.invest-card .pkg {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}
.invest-card .amt {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-top: 6px;
}
.invest-card .row-meta {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 14px;
}
.invest-card .earned {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--positive);
  margin-top: 10px;
  font-weight: 600;
}

/* ---------- Tables ---------- */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
.table th, .table td {
  text-align: left;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line-2);
}
.table th {
  font-weight: 500;
  color: var(--text-dim);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.table td.mono, .table th.mono { font-family: var(--font-mono); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.tag.deposit,
.tag.earning,
.tag.completed,
.tag.active,
.tag.approved { background: var(--positive-soft); color: var(--positive); }
.tag.withdrawal,
.tag.failed,
.tag.rejected { background: var(--negative-soft); color: var(--negative); }
.tag.pending,
.tag.investment { background: rgba(255,181,71,0.12); color: var(--accent); }
.tag.cancelled,
.tag.closed { background: rgba(255,255,255,0.08); color: var(--text-mid); }

/* ---------- Empty states ---------- */
.empty {
  text-align: center; padding: 36px 20px;
  color: var(--text-dim);
}
.empty .ico { font-size: 26px; margin-bottom: 8px; color: var(--text-dim); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 32px;
  color: var(--text-dim);
  font-size: 12.5px;
  text-align: center;
}
.footer .flag { display: inline-block; width: 12px; height: 12px; color: var(--maple); vertical-align: middle; margin: 0 4px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 40px 20px 60px; gap: 40px; }
  .packages, .how, .trust { grid-template-columns: 1fr; }
  .trust { gap: 16px; }
  .portfolio { grid-template-columns: 1fr; gap: 22px; padding: 26px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .invest-grid { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 14px 18px; }
  .main { padding: 24px 18px 60px; }
}
@media (max-width: 640px) {
  .balance-pill { display: none; }   /* shown inside dropdown instead */
  .profile-pill .name { display: none; }
  .stat-grid { grid-template-columns: 1fr; }
  .hero-points { grid-template-columns: 1fr 1fr; }
  .invest-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .dropdown-menu { width: calc(100vw - 32px); right: -8px; }
  .auth-card { padding: 28px 22px; }
}
