*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --sidebar-w: 260px;
  --blue: #1A3C6E; --blue-mid: #2756A0; --blue-light: #3B78D4;
  --blue-pale: #EBF2FC; --blue-subtle: #F4F8FD; --accent: #F0A500;
  --green: #16a34a; --green-pale: #f0fdf4; --red: #dc2626; --red-pale: #fef2f2;
  --white: #FFFFFF; --text: #1A1F2E; --text-mid: #4A5568; --text-muted: #8A96A8;
  --border: #D6E4F5; --font-display: 'Playfair Display', serif; --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Shadow Hierarchy */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 36px rgba(0,0,0,0.15);

  /* Card Design */
  --card-radius: 12px;
  --card-padding: 1.5rem;
}

/* ── PULL TO REFRESH ── */
.pull-refresh {
  position: fixed; top: -80px; left: 50%; transform: translateX(-50%);
  background: var(--white); border-radius: 20px; padding: 0.75rem 1.25rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 1000;
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 500; color: var(--text-mid);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0; pointer-events: none;
}
.pull-refresh.active { opacity: 1; }
.pull-refresh.pulling { transform: translateX(-50%) translateY(100px); }
.pull-refresh.ready .pull-icon { transform: rotate(180deg); color: var(--blue); }
.pull-refresh.ready .pull-text { color: var(--blue); }
.pull-icon { transition: transform 0.3s ease; }
.pull-icon i { font-size: 1rem; }

/* ── ACCESSIBILITY ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
.sr-only:focus { position: static; width: auto; height: auto; padding: 0.5rem 1rem; margin: 0; overflow: visible; clip: auto; white-space: normal; background: var(--blue); color: var(--white); z-index: 9999; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--blue-mid); outline-offset: 2px; }
html, body { height: 100%; }
body {
  font-family: var(--font-body); background: var(--blue-subtle); color: var(--text); display: flex;
  min-height: 100vh; line-height: 1.6;
  overflow-x: hidden;
}

.sidebar-logo,
.sidebar-user,
.nav-section,
.sidebar-bottom,
.topbar {
  transition:
    opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

body.dashboard-shell-prep:not(.dashboard-shell-ready) .sidebar-logo,
body.dashboard-shell-prep:not(.dashboard-shell-ready) .sidebar-user,
body.dashboard-shell-prep:not(.dashboard-shell-ready) .nav-section,
body.dashboard-shell-prep:not(.dashboard-shell-ready) .sidebar-bottom {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
}

body.dashboard-shell-prep:not(.dashboard-shell-ready) .topbar {
  opacity: 0;
  transform: translate3d(0, -22px, 0);
}

body.dashboard-shell-ready .topbar { transition-delay: 0.08s; }
body.dashboard-shell-ready .sidebar-logo { transition-delay: 0.12s; }
body.dashboard-shell-ready .sidebar-user { transition-delay: 0.18s; }
body.dashboard-shell-ready .sidebar-user + .nav-section { transition-delay: 0.26s; }
body.dashboard-shell-ready .sidebar-user + .nav-section + .nav-section { transition-delay: 0.34s; }
body.dashboard-shell-ready .sidebar-bottom { transition-delay: 0.42s; }
.dashboard-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top, rgba(123,184,245,0.22), transparent 38%),
    linear-gradient(150deg, rgba(26,60,110,0.97), rgba(39,86,160,0.95));
  opacity: 1;
  visibility: visible;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}
.dashboard-loading-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.dashboard-loading-card {
  width: min(100%, 320px);
  padding: 2rem 1.6rem;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(7,19,45,0.32);
  backdrop-filter: blur(18px);
  text-align: center;
  color: var(--white);
}
.dashboard-loading-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.14);
  border-top-color: var(--accent);
  animation: dashboardSpin 0.9s linear infinite;
}
.dashboard-loading-card h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin-bottom: 0.35rem;
}
.dashboard-loading-card p {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  line-height: 1.6;
}
@keyframes dashboardSpin {
  to { transform: rotate(360deg); }
}
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--blue);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; height: 100vh;
  z-index: 50; transition: transform 0.3s;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 1.75rem 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-logo img { height: 44px; filter: brightness(0) invert(1); }

.sidebar-user {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; gap: 0.75rem;
}
.su-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  color: var(--white); flex-shrink: 0;
}
.su-name { font-size: 0.875rem; font-weight: 600; color: var(--white); line-height: 1.2; }
.su-email { font-size: 0.72rem; color: rgba(255,255,255,0.5); margin-top: 0.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }

.nav-section { padding: 1.25rem 1rem 0.5rem; }
.nav-section-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; color: rgba(255,255,255,0.35); padding: 0 0.5rem; margin-bottom: 0.5rem; }
.nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0.75rem; border-radius: 10px; margin-bottom: 0.2rem;
  color: rgba(255,255,255,0.65); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
  border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.nav-item.active { background: rgba(255,255,255,0.14); color: var(--white); font-weight: 600; }
.nav-item .ni-icon { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }
.nav-item .ni-badge {
  margin-left: auto; background: var(--accent); color: var(--blue);
  font-size: 0.62rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 100px;
}

.sidebar-bottom {
  margin-top: auto; padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.btn-logout {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.7rem 0.75rem; border-radius: 10px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7); font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-logout:hover { background: rgba(220,38,38,0.2); color: #FCA5A5; border-color: rgba(220,38,38,0.3); }

.main-wrap {
  margin-left: var(--sidebar-w);
  width: calc(100vw - var(--sidebar-w));
  flex: 1; display: flex; flex-direction: column;
  min-width: 0;
}

/* TOP BAR */
.menu-toggle{
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  display: none;
}
.topbar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 0.9rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 40; box-shadow: var(--shadow);
}
.topbar-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--blue); }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.notif-btn {
  width: 36px; height: 36px; border-radius: 10px; background: var(--blue-subtle);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.notif-btn:hover { background: var(--blue-pale); transform: translateY(-1px); }
.notif-btn.open { background: var(--blue-pale); border-color: var(--blue-light); }
.notif-dot {
  position: absolute; top: 6px; right: 7px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--red); border: 2px solid var(--white);
}
.notif-dot.hidden { display: none; }
.notification-drawer {
  position: fixed; top: 78px; right: 24px; width: min(360px, calc(100vw - 32px));
  max-height: min(70vh, 540px); background: var(--white); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-lg); z-index: 90; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.98); transition: all 0.2s ease;
}
.notification-drawer.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.notification-drawer-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1rem 1rem 0.9rem; border-bottom: 1px solid var(--border); background: var(--blue-subtle);
}
.notification-drawer-title { font-size: 0.98rem; font-weight: 700; color: var(--blue); }
.notification-drawer-subtitle { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
.notification-drawer-actions { display: flex; align-items: center; gap: 0.45rem; }
.notification-drawer-btn {
  border: 1px solid var(--border); background: var(--white); color: var(--blue-mid);
  border-radius: 8px; padding: 0.45rem 0.75rem; font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.notification-drawer-btn:hover { background: var(--blue-pale); border-color: var(--blue-light); }
.notification-drawer-btn.icon-only {
  width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center;
}
.notification-drawer-list {
  display: flex; flex-direction: column; gap: 0.75rem; padding: 0.9rem; overflow-y: auto; max-height: 430px;
}
.notification-drawer-empty {
  padding: 1.2rem 0.5rem; text-align: center; color: var(--text-muted); font-size: 0.88rem;
}
.notification-drawer-item {
  border: 1px solid var(--border); border-radius: 14px; padding: 0.9rem; background: var(--white);
  display: flex; gap: 0.75rem; align-items: flex-start;
}
.notification-drawer-item.unread {
  border-color: var(--blue-light); background: linear-gradient(180deg, var(--blue-subtle), var(--white));
}
.notification-drawer-item-icon {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: var(--blue-pale); color: var(--blue-mid);
}
.notification-drawer-item-icon.success { background: var(--green-pale); color: var(--green); }
.notification-drawer-item-icon.error { background: #FEE2E2; color: var(--red); }
.notification-drawer-item-body { min-width: 0; flex: 1; }
.notification-drawer-item-message { color: var(--text); font-size: 0.88rem; line-height: 1.5; }
.notification-drawer-item-time { color: var(--text-muted); font-size: 0.72rem; margin-top: 0.35rem; }
.mobile-menu-btn {
  display: none; width: 36px; height: 36px; border-radius: 10px;
  background: var(--blue-subtle); border: 1px solid var(--border);
  align-items: center; justify-content: center; cursor: pointer; font-size: 1.1rem;
}
.topbar-invest {
  padding: 0.5rem 1.1rem; border-radius: 8px; background: var(--blue-mid); color: var(--white);
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 700;
  text-decoration: none; transition: background 0.2s; border: none; cursor: pointer;
}
.topbar-invest:hover { background: var(--blue); }

/* page content */
.page-content {
  flex: 1;
  padding: 2rem;
  min-height: 100vh;
}

/* TAB PAGES */
.tab-page { display: none; }
.tab-page.active { display: block; }

/* ── OVERVIEW ── */
.welcome-bar {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 60%, var(--blue-light) 100%);
  border-radius: 20px; padding: 2rem 2.5rem; margin-bottom: 2rem;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.welcome-bar::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 50%, rgba(255,255,255,0.05), transparent 60%);
}
.wb-text { position: relative; z-index: 1; }
.wb-hi { font-size: 0.78rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.3rem; }
.wb-name { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; color: var(--white); }
.wb-sub { font-size: 0.875rem; color: rgba(255,255,255,0.65); margin-top: 0.25rem; }
.wb-actions { position: relative; z-index: 1; display: flex; gap: 0.75rem; }
.btn-wb-primary {
  padding: 0.7rem 1.5rem; border-radius: 8px; background: var(--accent);
  color: var(--blue); font-family: var(--font-body); font-size: 0.85rem; font-weight: 700;
  text-decoration: none; transition: background 0.2s; border: none; cursor: pointer;
}
.btn-wb-primary:hover { background: #FFB92A; }
.btn-wb-ghost {
  padding: 0.7rem 1.2rem; border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.3); background: transparent;
  color: rgba(255,255,255,0.85); font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: background 0.2s;
}
.btn-wb-ghost:hover { background: rgba(255,255,255,0.1); }

/* STAT CARDS */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--card-radius);
  padding: var(--card-padding); transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.sc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.sc-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.sc-icon.blue { background: var(--blue-pale); }
.sc-icon.green { background: var(--green-pale); }
.sc-icon.amber { background: #FFFBEB; }
.sc-icon.purple { background: #F5F3FF; }
.sc-change {
  font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 100px;
  display: flex; align-items: center; gap: 0.2rem;
}
.sc-change.up { background: var(--green-pale); color: var(--green); }
.sc-change.neutral { background: var(--blue-pale); color: var(--blue-mid); }
.sc-val { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--blue); line-height: 1; margin-bottom: 0.25rem; }
.sc-label { font-size: 0.78rem; color: var(--text-muted); }

/* GRID 2-COL */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.grid-3-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }

/* CARD BASE */
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--card-radius);
  padding: var(--card-padding); transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.card-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--blue); }
.card-action { font-size: 0.78rem; color: var(--blue-mid); font-weight: 600; cursor: pointer; text-decoration: none; }
.card-action:hover { text-decoration: underline; }

/* PORTFOLIO CHART (CSS art) */
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-bottom: 0.75rem; }
.chart-bar {
  flex: 1; border-radius: 6px 6px 0 0; background: var(--blue-pale);
  transition: background 0.2s; cursor: pointer; position: relative;
}
.chart-bar.active { background: var(--blue-mid); }
.chart-bar:hover { background: var(--blue-light); }
.chart-bar .bar-tip {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  background: var(--blue); color: white; font-size: 0.65rem; font-weight: 700;
  padding: 0.15rem 0.4rem; border-radius: 4px; white-space: nowrap; opacity: 0; transition: opacity 0.2s;
}
.chart-bar:hover .bar-tip { opacity: 1; }
.chart-labels { display: flex; gap: 6px; }
.chart-label { flex: 1; text-align: center; font-size: 0.65rem; color: var(--text-muted); }
.chart-legend { display: flex; gap: 1rem; margin-top: 0.75rem; }
.cl-item { display: flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: var(--text-muted); }
.cl-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ACTIVE PLANS */
.plan-rows { display: flex; flex-direction: column; gap: 0.75rem; }
.plan-row {
  border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.25rem;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1rem;
  transition: border-color 0.2s;
}
.plan-row:hover { border-color: var(--blue-light); }
.plan-row-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--blue-pale);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.pr-name { font-weight: 700; font-size: 0.9rem; color: var(--blue); }
.pr-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.1rem; }
.pr-progress { margin-top: 0.5rem; }
.progress-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue-mid); border-radius: 2px; transition: width 1s ease; }
.pr-pct { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; }
.pr-return { text-align: right; }
.pr-return .val { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--green); }
.pr-return .lbl { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.1rem; }
.pr-status { text-align: right; }
.status-pill {
  display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 0.25rem 0.65rem; border-radius: 100px;
}
.status-pill.active { background: var(--green-pale); color: var(--green); }
.status-pill.pending { background: #FFFBEB; color: #D97706; }
.status-pill.completed { background: var(--blue-pale); color: var(--blue-mid); }

/* TRANSACTION LIST */
.tx-list { display: flex; flex-direction: column; gap: 0; }
.tx-item {
  display: flex; align-items: center; gap: 1rem; padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.tx-item:last-child { border-bottom: none; }
.tx-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.tx-icon.deposit { background: var(--green-pale); }
.tx-icon.earning { background: var(--blue-pale); }
.tx-icon.withdrawal { background: var(--red-pale); }
.tx-info { flex: 1; }
.tx-name { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.tx-date { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem; }
.tx-amount { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.tx-amount.pos { color: var(--green); }
.tx-amount.neg { color: var(--red); }
.tx-badge { font-size: 0.65rem; font-weight: 600; padding: 0.15rem 0.45rem; border-radius: 100px; margin-left: 0.4rem; }
.tx-badge.confirmed { background: var(--green-pale); color: var(--green); }
.tx-badge.pending { background: #FFFBEB; color: #D97706; }

/* QUICK STATS SIDE */
.quick-stat-list { display: flex; flex-direction: column; gap: 1rem; }
.qs-item { display: flex; align-items: center; justify-content: space-between; }
.qs-label { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem; }
.qs-val { font-size: 0.875rem; font-weight: 700; color: var(--text); }
.qs-divider { height: 1px; background: var(--border); }

/* REFERRAL CARD */
.ref-card {
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  border-radius: 16px; padding: 1.5rem; color: var(--white); margin-bottom: 1.25rem;
}
.ref-card h4 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; }
.ref-card p { font-size: 0.8rem; color: rgba(255,255,255,0.65); margin-bottom: 1.25rem; line-height: 1.6; }
.ref-code-wrap { display: flex; gap: 0.5rem; }
.ref-code {
  flex: 1; padding: 0.6rem 0.85rem; background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 8px;
  font-family: monospace; font-size: 0.875rem; color: var(--white); outline: none;
}
.btn-copy-ref {
  padding: 0.6rem 1rem; background: var(--accent); color: var(--blue);
  border: none; border-radius: 8px; font-family: var(--font-body);
  font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: background 0.2s;
}
.btn-copy-ref:hover { background: #FFB92A; }
.ref-stats { display: flex; gap: 1rem; margin-top: 1rem; }
.ref-stat { flex: 1; background: rgba(255,255,255,0.1); border-radius: 10px; padding: 0.75rem; text-align: center; }
.ref-stat .rv { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.ref-stat .rl { font-size: 0.65rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.08em; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 2.5rem 1rem; }
.empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state h4 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--blue); margin-bottom: 0.4rem; }
.empty-state p { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.6; }
.btn-invest-now {
  display: inline-block; padding: 0.65rem 1.5rem; border-radius: 8px;
  background: var(--blue-mid); color: var(--white); font-family: var(--font-body);
  font-size: 0.82rem; font-weight: 700; text-decoration: none; transition: background 0.2s;
}
.btn-invest-now:hover { background: var(--blue); }

/* ── INVEST TAB ── */
.plan-invest-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.pi-card {
  border: 1.5px solid var(--border); border-radius: 16px; padding: 1.75rem;
  background: var(--white); transition: all 0.25s; cursor: pointer;
}
.pi-card:hover { border-color: var(--blue-mid); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.pi-card.selected { border-color: var(--blue-mid); background: var(--blue-pale); box-shadow: var(--shadow-md); }
.pi-card.featured { background: var(--blue); border-color: var(--blue); color: var(--white); }
.pi-card.featured:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.pi-popular { display: inline-block; background: var(--accent); color: var(--blue); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.18rem 0.6rem; border-radius: 100px; margin-bottom: 1rem; }
.pi-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--blue); }
.pi-card.featured .pi-name { color: var(--white); }
.pi-price { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: var(--blue); line-height: 1; }
.pi-price sup { font-size: 1rem; vertical-align: top; margin-top: 0.4rem; }
.pi-card.featured .pi-price { color: #7BB8F5; }
.pi-sub { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1.25rem; }
.pi-card.featured .pi-sub { color: rgba(255,255,255,0.5); }
.pi-divider { height: 1px; background: var(--border); margin-bottom: 1.25rem; }
.pi-card.featured .pi-divider { background: rgba(255,255,255,0.15); }
.pi-feats { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.5rem; }
.pi-feats li { display: flex; justify-content: space-between; font-size: 0.82rem; }
.pi-feats li span:first-child { color: var(--text-muted); }
.pi-feats li span:last-child { font-weight: 600; color: var(--text); }
.pi-card.featured .pi-feats li span:first-child { color: rgba(255,255,255,0.55); }
.pi-card.featured .pi-feats li span:last-child { color: var(--white); }
.btn-pi {
  display: block; text-align: center; padding: 0.8rem; border-radius: 10px;
  border: 1.5px solid var(--blue-mid); color: var(--blue-mid);
  font-size: 0.82rem; font-weight: 700; text-decoration: none;
  transition: all 0.2s; cursor: pointer; background: transparent; font-family: var(--font-body); width: 100%;
}
.btn-pi:hover, .pi-card.selected .btn-pi { background: var(--blue-mid); color: var(--white); border-color: var(--blue-mid); }
.pi-card.featured .btn-pi { background: var(--white); color: var(--blue); border-color: var(--white); }
.pi-card.featured .btn-pi:hover { background: var(--blue-pale); }

/* ── WITHDRAW TAB ── */
.withdraw-form { max-width: 560px; }
.wf-field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.25rem; }
.wf-field label { font-size: 0.78rem; font-weight: 600; color: var(--text); }
.wf-field input, .wf-field select {
  padding: 0.85rem 1rem; border: 1.5px solid var(--border); border-radius: 10px;
  font-family: var(--font-body); font-size: 0.875rem; color: var(--text);
  background: var(--blue-subtle); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.wf-field input:focus, .wf-field select:focus {
  border-color: var(--blue-mid); box-shadow: 0 0 0 3px rgba(39,86,160,0.1); background: var(--white);
}
.wf-note {
  background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 10px;
  padding: 0.85rem 1rem; font-size: 0.8rem; color: #92400E; line-height: 1.6; margin-bottom: 1.5rem;
  display: flex; gap: 0.5rem;
}
.btn-withdraw {
  padding: 1rem 2.5rem; border-radius: 10px; background: var(--blue-mid); color: var(--white);
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 700;
  border: none; cursor: pointer; transition: background 0.2s;
}
.btn-withdraw:hover { background: var(--blue); }
.balance-indicator {
  background: var(--blue-pale); border: 1px solid var(--border); border-radius: 10px;
  padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
}
.bi-label { font-size: 0.78rem; color: var(--text-muted); }
.bi-val { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--blue); }

/* ── PROFILE TAB ── */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.profile-avatar-card { text-align: center; padding: 2.5rem; }
.pa-circle {
  width: 90px; height: 90px; border-radius: 50%; background: var(--blue-mid);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--white);
  margin: 0 auto 1rem;
}
.pa-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--blue); }
.pa-email { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.25rem; }
.pa-joined { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }
.pa-tier {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--blue-pale); color: var(--blue-mid);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.85rem; border-radius: 100px; margin-top: 1rem;
}
.password-change-form { display: flex; flex-direction: column; gap: 1rem; }
.password-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.password-form-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.password-form-note { font-size: 0.82rem; color: var(--text-muted); line-height: 1.7; }
.password-form-status {
  padding: 0.9rem 1rem; border-radius: 10px; border: 1px solid var(--border);
  font-size: 0.85rem; line-height: 1.6;
}
.password-form-status.success { background: var(--green-pale); color: var(--green); border-color: rgba(22, 163, 74, 0.2); }
.password-form-status.error { background: var(--red-pale); color: var(--red); border-color: rgba(220, 38, 38, 0.2); }
.password-form-status.hidden { display: none; }
.password-logout-btn {
  padding: 0.7rem 1.4rem; border-radius: 8px; border: 1.5px solid var(--red);
  background: transparent; color: var(--red); font-family: var(--font-body);
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.password-logout-btn:hover { background: var(--red-pale); }

/* RESPONSIVE */
@media (max-width: 1100px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3-1 { grid-template-columns: 1fr; }
  .plan-invest-grid { grid-template-columns: 1fr 1fr; }
  .balance-ticker-section { padding: 1.5rem; }
  .bts-amount { font-size: 2.2rem; }
  .performance-chart-section { margin-bottom: 1.5rem; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; width: 100%; }
  .page-content { padding: 1.25rem; }
  .topbar { padding: 0.85rem 1.25rem; }
  .topbar-title { font-size: 1.15rem; }
  .mobile-menu-btn { display: flex; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .plan-invest-grid { grid-template-columns: 1fr; }
  .plan-row { grid-template-columns: auto 1fr; }
  .pr-status { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
  .password-form-grid { grid-template-columns: 1fr; }
  .welcome-bar { padding: 1.5rem; }
  .wb-name { font-size: 1.4rem; }
  .wb-actions { width: 100%; flex-direction: column; }
  .btn-wb-primary, .btn-wb-ghost { width: 100%; text-align: center; }
  .balance-ticker-section { padding: 1.25rem; margin-bottom: 1.5rem; }
  .bts-amount { font-size: 1.8rem; }
  .bts-actions { flex-direction: column; }
  .btn-bts { width: 100%; }
  .performance-chart-section { padding: 1rem; }
  .pcs-chart-container { height: 200px; }
  .pcs-filters { flex-wrap: wrap; }
  .investment-card { padding: 1rem; margin-bottom: 0.75rem; }
  .ic-info { grid-template-columns: 1fr; gap: 0.5rem; }
  .ic-actions { flex-direction: column; }
  .btn-ic { width: 100%; }
  .ref-stats { grid-template-columns: 1fr; }
  .password-form-actions { flex-direction: column; }
  .transaction-item { gap: 0.75rem; padding: 0.75rem; }
  .ti-icon { width: 36px; height: 36px; }
  .ti-amount { font-size: 0.9rem; }
  .withdraw-form { gap: 1rem; }
  .wf-note { flex-direction: row; font-size: 0.75rem; padding: 0.75rem; }
  .balance-indicator { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .notification { min-width: 0; width: 100%; }
  .modal-header, .modal-body { padding: 1rem; }
}

@media (max-width: 480px) {
  .stat-cards { grid-template-columns: 1fr; }
  .page-content { padding: 1rem; }
  .topbar { padding: 0.8rem 1rem; }
  .topbar-title { font-size: 1rem; }
  .sidebar { width: min(88vw, 320px); }
  .wb-actions { flex-direction: column; }
  .balance-ticker-section { padding: 1rem; margin-bottom: 1.25rem; }
  .bts-amount { font-size: 1.5rem; }
  .bts-title { font-size: 0.85rem; }
  .bts-actions { gap: 0.5rem; }
  .btn-bts { padding: 0.5rem 1rem; font-size: 0.75rem; }
  .performance-chart-section { padding: 0.75rem; }
  .pcs-title { font-size: 1rem; }
  .pcs-filters { gap: 0.3rem; }
  .pcs-filter-btn { padding: 0.35rem 0.7rem; font-size: 0.75rem; }
  .pcs-chart-container { height: 150px; }
  .investment-card { padding: 0.75rem; }
  .ic-plan { font-size: 0.95rem; }
  .ic-amount { font-size: 1rem; }
  .ic-progress-label { font-size: 0.7rem; }
  .card { padding: 1rem; }
  .card-title { font-size: 1rem; }
  .transaction-list { gap: 0.5rem; }
  .transaction-item { padding: 0.5rem; }
  .ti-title { font-size: 0.8rem; }
  .ti-date { font-size: 0.7rem; }
  .ti-amount { font-size: 0.8rem; }
  .wf-field label { font-size: 0.7rem; }
  .wf-field input, .wf-field select { padding: 0.7rem 0.85rem; font-size: 0.8rem; }
  .btn-withdraw { padding: 0.8rem; font-size: 0.8rem; }
  .ref-card { padding: 1.25rem; }
  .ref-card h4 { font-size: 1rem; }
  .ref-card p { font-size: 0.8rem; }
  .ref-code-wrap { flex-direction: column; }
  .ref-code { padding: 0.65rem 0.85rem; font-size: 0.8rem; margin-bottom: 0.5rem; }
  .btn-copy-ref { width: 100%; }
  .modal-content { width: 95%; }
  .card-header { gap: 0.5rem; align-items: flex-start; }
  .transaction-item,
  .deposit-item {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .ti-details,
  .deposit-details {
    min-width: 0;
    width: calc(100% - 3.25rem);
  }
  .ti-amount,
  .deposit-amount {
    width: 100%;
    text-align: left;
    margin-left: 3.25rem;
  }
  .deposit-status,
  .btn-confirm-deposit {
    margin-left: 3.25rem;
  }
  .btn-confirm-deposit {
    width: calc(100% - 3.25rem);
    text-align: center;
    padding: 0.55rem 0.75rem;
  }
  .notification-container { left: 8px; right: 8px; top: 8px; }
  .notification { padding: 0.85rem; }
  .notification-message { font-size: 0.82rem; }
  .dim-header,
  .dim-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ANIMATE IN */
@keyframes fadeUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }

@keyframes counterIncrement {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-20px); opacity: 0; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes chartFill {
  from { fill-opacity: 0; }
  to { fill-opacity: 0.15; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

body.dashboard-shell-ready .tab-page.active .welcome-bar,
body.dashboard-shell-ready .tab-page.active .balance-ticker-section,
body.dashboard-shell-ready .tab-page.active .stat-card,
body.dashboard-shell-ready .tab-page.active .card {
  animation: fadeUp 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.dashboard-shell-ready .tab-page.active .welcome-bar { animation-delay: 0.1s; }
body.dashboard-shell-ready .tab-page.active .balance-ticker-section { animation-delay: 0.18s; }
body.dashboard-shell-ready .tab-page.active .stat-card:nth-child(1) { animation-delay: 0.26s; }
body.dashboard-shell-ready .tab-page.active .stat-card:nth-child(2) { animation-delay: 0.32s; }
body.dashboard-shell-ready .tab-page.active .stat-card:nth-child(3) { animation-delay: 0.38s; }
body.dashboard-shell-ready .tab-page.active .stat-card:nth-child(4) { animation-delay: 0.44s; }
body.dashboard-shell-ready .tab-page.active .card { animation-delay: 0.5s; }

/* OVERLAY */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 45;
}
.sidebar-overlay.show { display: block; }

/* REAL-TIME REFRESH ANIMATION */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── BALANCE TICKER SECTION ── */
.balance-ticker-section {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  border-radius: var(--card-radius); padding: 2rem; margin-bottom: 2rem;
  color: var(--white); position: relative; overflow: hidden;
}
.balance-ticker-section::before {
  content: ''; position: absolute; top: 0; right: 0; width: 200px; height: 200px;
  background: rgba(255,255,255,0.1); border-radius: 50%; transform: translate(50%, -50%);
}
.bts-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;
  position: relative; z-index: 1;
}
.bts-title { font-size: 0.95rem; font-weight: 600; opacity: 0.9; text-transform: uppercase; letter-spacing: 0.08em; }
.bts-timestamp { font-size: 0.8rem; opacity: 0.7; }
.bts-amount {
  position: relative; z-index: 1; font-family: var(--font-display);
  font-size: 2.8rem; font-weight: 700; margin-bottom: 0.75rem; line-height: 1;
}
.bts-amount .ticker-value {
  display: inline-block; animation: counterIncrement 1s ease-out;
}
.bts-change {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.85rem; border-radius: 20px;
  background: rgba(255,255,255,0.15); font-size: 0.9rem; font-weight: 600;
}
.bts-change.positive { color: #5DDC8A; }
.bts-change.negative { color: #FF7B7B; }
.bts-actions {
  position: relative; z-index: 1; display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap;
}
.btn-bts {
  padding: 0.6rem 1.25rem; border-radius: 8px; border: 1.5px solid rgba(255,255,255,0.3);
  background: transparent; color: var(--white); font-family: var(--font-body);
  font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-bts:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.5); }
.btn-bts-primary {
  background: var(--accent); color: var(--blue); border-color: var(--accent);
  font-weight: 700;
}
.btn-bts-primary:hover { background: #FFB92A; }

@media (prefers-reduced-motion: reduce) {
  .dashboard-loading-spinner,
  .bts-amount .ticker-value {
    animation: none;
  }

  .sidebar-logo,
  .sidebar-user,
  .nav-section,
  .sidebar-bottom,
  .topbar {
    transition: none;
  }

  body.dashboard-shell-prep:not(.dashboard-shell-ready) .sidebar-logo,
  body.dashboard-shell-prep:not(.dashboard-shell-ready) .sidebar-user,
  body.dashboard-shell-prep:not(.dashboard-shell-ready) .nav-section,
  body.dashboard-shell-prep:not(.dashboard-shell-ready) .sidebar-bottom,
  body.dashboard-shell-prep:not(.dashboard-shell-ready) .topbar {
    opacity: 1;
    transform: none;
  }

  body.dashboard-shell-ready .tab-page.active .welcome-bar,
  body.dashboard-shell-ready .tab-page.active .balance-ticker-section,
  body.dashboard-shell-ready .tab-page.active .stat-card,
  body.dashboard-shell-ready .tab-page.active .card {
    animation: none;
  }
}

/* ── PERFORMANCE CHART SECTION ── */
.performance-chart-section {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--card-radius); padding: var(--card-padding);
  margin-bottom: 2rem;
}
.pcs-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;
}
.pcs-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--blue); }
.pcs-filters {
  display: flex; gap: 0.5rem;
}
.pcs-filter-btn {
  padding: 0.4rem 0.9rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--white); color: var(--text-mid); font-family: var(--font-body);
  font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.pcs-filter-btn.active {
  background: var(--blue-mid); color: var(--white); border-color: var(--blue-mid);
}
.pcs-filter-btn:hover:not(.active) { border-color: var(--blue-light); color: var(--blue); }
.pcs-chart-container {
  height: 280px; margin-bottom: 1rem; position: relative;
  background: var(--blue-subtle); border-radius: 10px; padding: 1rem;
}
.pcs-chart-placeholder {
  display: flex; align-items: center; justify-content: center; height: 100%;
  color: var(--text-muted); font-size: 0.9rem;
}

/* ── INVESTMENT CARD ENHANCED ── */
.investment-card {
  background: var(--white); border: 1px solid var(--border);
  border-left: 4px solid var(--blue-mid); border-radius: var(--card-radius);
  padding: var(--card-padding); margin-bottom: 1rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.investment-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-left-color: var(--blue-light); }
.ic-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 1rem; }
.ic-plan { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--blue); }
.ic-amount { font-size: 1.25rem; font-weight: 700; color: var(--green); }
.ic-info { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.ic-info-item { display: flex; flex-direction: column; }
.ic-info-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.25rem; }
.ic-info-val { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text); }
.ic-progress { margin: 1rem 0; }
.ic-progress-label {
  display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.ic-progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.ic-progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue-mid), var(--blue-light)); border-radius: 3px; transition: width 1s ease; }
.ic-actions { display: flex; gap: 0.75rem; }
.btn-ic {
  flex: 1; padding: 0.6rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--white); color: var(--blue-mid); font-family: var(--font-body);
  font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-ic:hover { border-color: var(--blue-mid); background: var(--blue-pale); }

/* NOTIFICATION SYSTEM */
.notification-container {
  position: fixed; top: 20px; right: 20px; z-index: 1000;
  display: flex; flex-direction: column; gap: 10px; max-width: 350px;
}
.notification {
  background: var(--white); border-radius: 8px; padding: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-left: 4px solid var(--blue); display: flex; align-items: center; gap: 0.75rem;
  animation: slideInRight 0.3s ease-out; min-width: 300px;
}
.notification-success { border-left-color: var(--green); }
.notification-error { border-left-color: var(--red); }
.notification-info { border-left-color: var(--blue); }
.notification-icon { font-size: 1.2rem; flex-shrink: 0; }
.notification-message { flex: 1; font-size: 0.9rem; color: var(--text); }
.notification-close {
  background: none; border: none; font-size: 1.2rem; cursor: pointer;
  color: var(--text-muted); padding: 0; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background 0.2s;
}
.notification-close:hover { background: var(--blue-pale); }
.btn-confirm {
  background: var(--green); color: var(--white); border: none; padding: 0.5rem 1rem;
  border-radius: 6px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s;
}
.btn-confirm:hover { background: var(--green-dark); }

/* LIVE PORTFOLIO BALANCE CARD */
.portfolio-balance-card {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  border-radius: 12px; padding: 2rem; margin-bottom: 2rem; color: var(--white);
  position: relative; overflow: hidden;
}
.portfolio-balance-card::before {
  content: ''; position: absolute; top: 0; right: 0; width: 200px; height: 200px;
  background: rgba(255,255,255,0.1); border-radius: 50%; transform: translate(50%, -50%);
}
.pbc-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;
  position: relative; z-index: 1;
}
.pbc-title { font-size: 1.1rem; font-weight: 600; opacity: 0.9; }
.market-status {
  font-size: 0.9rem; font-weight: 500; padding: 0.25rem 0.75rem;
  border-radius: 20px; background: rgba(255,255,255,0.2);
}
.pbc-balance {
  margin-bottom: 1.5rem; position: relative; z-index: 1;
}
.balance-amount {
  font-size: 2.5rem; font-weight: 700; font-family: var(--font-display);
  margin-bottom: 0.5rem; display: block;
}
.balance-change {
  font-size: 0.9rem; font-weight: 500; padding: 0.25rem 0.5rem;
  border-radius: 6px; display: inline-block;
}
.balance-change.positive { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.balance-change.negative { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.market-indicators {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem;
  position: relative; z-index: 1;
}
.market-item {
  background: rgba(255,255,255,0.1); border-radius: 8px; padding: 0.75rem;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.market-label { font-size: 0.8rem; opacity: 0.8; font-weight: 500; }
.market-value { font-size: 1.1rem; font-weight: 600; }
.market-change {
  font-size: 0.8rem; font-weight: 500; padding: 0.1rem 0.3rem; border-radius: 4px;
  display: inline-block; align-self: flex-start;
}
.market-change.positive { background: rgba(16, 185, 129, 0.3); color: #10b981; }
.market-change.negative { background: rgba(239, 68, 68, 0.3); color: #ef4444; }

/* INVESTMENT PLAN PERFORMANCE */
.pi-performance {
  display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.5rem;
}
.performance-value {
  font-size: 0.9rem; font-weight: 600; padding: 0.2rem 0.4rem;
  border-radius: 4px; display: inline-block; align-self: flex-start;
}
.performance-value.positive { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.performance-value.negative { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.performance-label { font-size: 0.7rem; color: var(--text-muted); }

/* TRANSACTION ANIMATIONS */
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

.transaction-item.new-transaction {
  animation: slideInRight 0.5s ease-out;
  background: linear-gradient(90deg, var(--blue-pale) 0%, transparent 100%);
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

.transaction-item:hover {
  background-color: var(--bg-hover);
}

.transaction-item:last-child {
  border-bottom: none;
}

.ti-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.ti-icon.green { background: var(--green); }
.ti-icon.red { background: var(--red); }
.ti-icon.blue { background: var(--blue); }

.ti-details {
  flex: 1;
}

.ti-title {
  font-weight: 600;
  color: var(--text);
}

.ti-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ti-amount {
  font-weight: 600;
  font-size: 1.1rem;
}

.ti-amount.positive { color: var(--green); }
.ti-amount.negative { color: var(--red); }

.ti-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ti-status.completed { background: var(--green-pale); color: var(--green); }
.ti-status.pending { background: var(--amber-pale); color: var(--amber); }
.ti-status.failed { background: var(--red-pale); color: var(--red); }

/* DEPOSIT LIST STYLES */
.deposit-list {
  max-height: 400px;
  overflow-y: auto;
}

.deposit-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

.deposit-item:hover {
  background-color: var(--bg-hover);
}

.deposit-item:last-child {
  border-bottom: none;
}

.deposit-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.deposit-icon.green { background: var(--green); color: var(--white); }
.deposit-icon.amber { background: var(--amber); color: var(--white); }

.deposit-details {
  flex: 1;
  min-width: 0;
}

.deposit-type {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.deposit-address {
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
  margin-bottom: 0.25rem;
}

.deposit-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.deposit-amount {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--blue-mid);
  flex-shrink: 0;
}

.btn-confirm-deposit {
  margin-left: auto;
  border: 1px solid var(--blue-mid);
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-confirm-deposit:hover {
  background: var(--blue-mid);
  color: #fff;
  border-color: var(--blue-dark);
}

.deposit-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}

.status-pending {
  background: rgba(245, 158, 11, 0.2);
  color: #d97706;
}

.status-confirming {
  background: rgba(59, 130, 246, 0.2);
  color: #2563eb;
}

.status-confirmed {
  background: rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

.status-failed {
  background: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.deposit-item.new-deposit {
  animation: slideInRight 0.5s ease-out;
  background: linear-gradient(90deg, var(--green-pale) 0%, transparent 100%);
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
  .notification-container {
    left: 10px; right: 10px; top: 10px; max-width: none;
  }
  .notification-drawer {
    top: 72px; right: 16px; left: 16px; width: auto;
  }
  .portfolio-balance-card {
    padding: 1.5rem;
  }
  .balance-amount { font-size: 2rem; }
  .market-indicators {
    grid-template-columns: 1fr;
  }
}

/* Google Translate Widget */
#google_translate_element {
  font-size: 14px;
}
#google_translate_element .goog-te-gadget-simple {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: 6px;
  font-size: 0;
  width: 30px;
  height: 30px;
  color: var(--blue);
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/></svg>');
  background-size: 18px;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#google_translate_element .goog-te-gadget-simple:hover {
  background-color: var(--blue-pale);
  border-color: var(--blue);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ── PENDING DEPOSITS MODAL ── */
.modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center;
  padding: 1rem; transition: opacity 0.3s, visibility 0.3s;
}
.modal.hidden { display: none; }
.modal-content {
  background: var(--white); border-radius: 16px; max-width: 500px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden;
  animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem; border-bottom: 1px solid var(--border); background: var(--blue-subtle);
}
.modal-header h2 { font-size: 1.3rem; color: var(--blue); margin: 0; }
.modal-close {
  background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted);
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.5rem; max-height: 60vh; overflow-y: auto; }
.deposit-item-modal {
  background: var(--blue-pale); border-radius: 12px; padding: 1rem; margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.deposit-item-modal:last-child { margin-bottom: 0; }
.dim-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 0.75rem; }
.dim-title { font-weight: 600; color: var(--blue); font-size: 0.95rem; }
.dim-amount { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--blue); }
.dim-info { font-size: 0.8rem; color: var(--text-mid); margin: 0.5rem 0; line-height: 1.5; }
.dim-info strong { color: var(--blue); }
.dim-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.btn-confirm {
  flex: 1; padding: 0.6rem; background: var(--green); color: var(--white);
  border: none; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.85rem;
  transition: background 0.2s;
}
.btn-confirm:hover { background: #15923f; }
.btn-decline {
  flex: 1; padding: 0.6rem; background: var(--red); color: var(--white);
  border: none; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.85rem;
  transition: background 0.2s;
}
.btn-decline:hover { background: #b91c1c; }
.empty-deposits {
  text-align: center; padding: 2rem 1rem; color: var(--text-muted);
}
.empty-deposits-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.empty-deposits p { margin: 0; font-size: 0.95rem; }

/* ── TRANSACTION LIST ENHANCED ── */
.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.transaction-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--white);
  transition: all 0.2s;
}
.transaction-item:hover {
  border-color: var(--blue-light);
  box-shadow: var(--shadow-md);
}
.ti-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
  font-size: 1.2rem;
}
.ti-icon.green { background: var(--green); }
.ti-icon.red { background: var(--red); }
.ti-icon.blue { background: var(--blue-mid); }
.ti-details {
  flex: 1;
}
.ti-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.ti-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.ti-amount {
  font-weight: 700;
  font-size: 1rem;
  text-align: right;
}
.ti-amount.positive { color: var(--green); }
.ti-amount.negative { color: var(--red); }

/* ── WITHDRAW FORM ENHANCED ── */
.withdraw-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.wf-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.wf-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.wf-field input,
.wf-field select {
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--blue-subtle);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wf-field input:focus,
.wf-field select:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(39, 86, 160, 0.1);
  background: var(--white);
}
.wf-note {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 10px;
  padding: 1rem;
  font-size: 0.8rem;
  color: #92400E;
  line-height: 1.6;
  display: flex;
  gap: 0.75rem;
}
.btn-withdraw {
  padding: 1rem;
  border-radius: 10px;
  background: var(--blue-mid);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-withdraw:hover { background: var(--blue); }
.balance-indicator {
  background: var(--blue-pale);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bi-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}
.bi-val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
}

/* ── REFERRAL STATS ── */
.ref-card {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  border-radius: var(--card-radius);
  padding: 2rem;
  color: var(--white);
  margin-bottom: 1.25rem;
}
.ref-card h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.ref-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.ref-code-wrap {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.ref-code {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--white);
  outline: none;
}
.btn-copy-ref {
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--blue);
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-copy-ref:hover { background: #FFB92A; }
.ref-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.ref-stat {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}
.ref-stat .rv {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.4rem;
}
.ref-stat .rl {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
