/* ============================================================
   WealthBridge App — Dashboard Stylesheet
   Red #C8102E · Navy #0B1A2C · Blue #1B3B8B
============================================================ */

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

:root {
  --navy:       #0B1A2C;
  --navy-2:     #0F2236;
  --navy-3:     #162C44;
  --blue:       #1B3B8B;
  --blue-mid:   #1E50B3;
  --blue-light: #2563EB;
  --red:        #C8102E;
  --red-dark:   #9B0B22;
  --green:      #059669;
  --green-light:#10B981;
  --gold:       #C9962A;
  --white:      #FFFFFF;
  --gray-50:    #F8FAFC;
  --gray-100:   #F1F5F9;
  --gray-200:   #E2E8F0;
  --gray-400:   #94A3B8;
  --gray-600:   #64748B;
  --gray-800:   #1E293B;
  --text:       #0F172A;
  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  20px;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
  --shadow-md:  0 4px 24px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.14);
  --transition: all .2s ease;
  --sidebar-w:  260px;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; font-size: 15px; color: var(--text); background: var(--gray-100); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── App Layout ──────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--navy);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 200;
  transition: transform .3s ease;
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.sidebar-brand {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.sidebar-logo-img  { height: 36px; object-fit: contain; }
.sidebar-logo-text { font-size: 1.1rem; font-weight: 800; color: #fff; letter-spacing: -0.3px; }

.sidebar-nav { flex: 1; padding: 16px 0; }
.nav-list    { list-style: none; padding: 0 12px; }
.nav-list li { margin-bottom: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.65);
  font-size: .875rem; font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.nav-item i { width: 18px; text-align: center; font-size: .95rem; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--blue); color: #fff; font-weight: 600; }
.nav-item.active i { color: #fff; }

.nav-divider { height: 1px; background: rgba(255,255,255,.07); margin: 12px 24px; }

.nav-badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: .68rem; font-weight: 700;
  padding: 2px 7px; border-radius: 12px;
  min-width: 20px; text-align: center;
}

.sidebar-kyc-alert {
  margin: 0 12px 12px;
  background: rgba(200,16,46,.15);
  border: 1px solid rgba(200,16,46,.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
  font-size: .78rem; color: #FCA5A5;
}
.sidebar-kyc-alert i { color: var(--red); flex-shrink: 0; }
.sidebar-kyc-alert a { color: #FCA5A5; font-weight: 600; margin-left: auto; }

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.sidebar-user-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.sidebar-user-info   { flex: 1; min-width: 0; }
.sidebar-user-name   { display: block; font-size: .82rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email  { display: block; font-size: .72rem; color: rgba(255,255,255,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout      { color: rgba(255,255,255,.45); font-size: 1rem; padding: 6px; transition: var(--transition); }
.sidebar-logout:hover { color: var(--red); text-decoration: none; }

/* ── Sidebar overlay (mobile) ────────────────────────────── */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 190; }

/* ── Main area ───────────────────────────────────────────── */
.app-main {
  margin-left: var(--sidebar-w);
  flex: 1; display: flex; flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  height: 64px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar-toggle {
  display: none; background: none; border: none; cursor: pointer;
  font-size: 1.2rem; color: var(--gray-600); padding: 6px;
}
.topbar-title {
  flex: 1; font-size: 1.15rem; font-weight: 700; color: var(--navy);
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-notif {
  position: relative; color: var(--gray-600); font-size: 1.15rem;
  padding: 6px; transition: var(--transition);
}
.topbar-notif:hover { color: var(--blue); text-decoration: none; }
.topbar-notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--red); color: #fff;
  font-size: .6rem; font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.topbar-avatar img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gray-200); transition: var(--transition); }
.topbar-avatar:hover img { border-color: var(--blue); }

/* ── Content ─────────────────────────────────────────────── */
.app-content { flex: 1; padding: 28px; }

/* ── Footer ──────────────────────────────────────────────── */
.app-footer {
  padding: 14px 28px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  font-size: .78rem; color: var(--gray-400);
  display: flex; gap: 16px; align-items: center;
}
.app-footer a { color: var(--gray-400); }
.app-footer a:hover { color: var(--blue); }

/* ── Page header ─────────────────────────────────────────── */
.page-heading { margin-bottom: 24px; }
.page-heading h2 { font-size: 1.4rem; font-weight: 800; color: var(--navy); }
.page-heading p  { color: var(--gray-600); font-size: .9rem; margin-top: 4px; }

/* ── Balance Cards ───────────────────────────────────────── */
.balance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.balance-card {
  border-radius: var(--radius);
  padding: 24px 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.balance-card::after {
  content: '';
  position: absolute; right: -20px; top: -20px;
  width: 100px; height: 100px;
  background: rgba(255,255,255,.07);
  border-radius: 50%;
}
.balance-card.bc-blue   { background: linear-gradient(135deg, #1B3B8B, #2563EB); }
.balance-card.bc-navy   { background: linear-gradient(135deg, #0B1A2C, #1B3B8B); }
.balance-card.bc-green  { background: linear-gradient(135deg, #059669, #10B981); }
.balance-card.bc-purple { background: linear-gradient(135deg, #6D28D9, #8B5CF6); }
.balance-card.bc-gold   { background: linear-gradient(135deg, #B45309, #D97706); }

.bc-icon   { font-size: 1.6rem; opacity: .7; margin-bottom: 12px; }
.bc-label  { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .8; margin-bottom: 6px; }
.bc-amount { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.bc-sub    { font-size: .75rem; opacity: .7; margin-top: 6px; }

/* ── Dashboard 2-col grid ────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 28px; }
.dash-grid.full { grid-template-columns: 1fr; }

/* ── Card ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: .95rem; font-weight: 700; color: var(--navy); }
.card-link   { font-size: .82rem; color: var(--blue); font-weight: 600; }
.card-body   { padding: 0; }
.card-body.padded { padding: 22px; }
.card-empty  { padding: 40px; text-align: center; color: var(--gray-400); font-size: .875rem; }
.card-empty i { font-size: 2rem; display: block; margin-bottom: 12px; opacity: .5; }

/* ── Table ─────────────────────────────────────────────────── */
.app-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.app-table th {
  background: var(--gray-50); text-align: left;
  padding: 11px 16px; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--gray-600); border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.app-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--text); vertical-align: middle;
}
.app-table tr:last-child td { border-bottom: none; }
.app-table tr:hover td { background: var(--gray-50); }
.app-table .td-amount { font-weight: 700; font-family: 'Courier New', monospace; }
.app-table .td-credit { color: var(--green); }
.app-table .td-debit  { color: var(--red);   }

/* ── Status badges ───────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap;
}
.badge-green   { background: rgba(5,150,105,.12);  color: #059669; }
.badge-red     { background: rgba(200,16,46,.10);  color: var(--red); }
.badge-yellow  { background: rgba(217,119,6,.12);  color: #B45309; }
.badge-blue    { background: rgba(27,59,139,.10);  color: var(--blue); }
.badge-purple  { background: rgba(109,40,217,.10); color: #6D28D9; }
.badge-gray    { background: var(--gray-100);      color: var(--gray-600); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: var(--transition); text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary   { background: var(--blue); color: #fff; }
.btn-primary:hover   { background: var(--blue-mid); color: #fff; }
.btn-danger    { background: var(--red); color: #fff; }
.btn-danger:hover    { background: var(--red-dark); }
.btn-success   { background: var(--green); color: #fff; }
.btn-success:hover   { background: #047857; }
.btn-outline   { background: transparent; border: 1.5px solid var(--gray-200); color: var(--gray-800); }
.btn-outline:hover   { border-color: var(--blue); color: var(--blue); background: rgba(27,59,139,.04); }
.btn-sm   { padding: 6px 14px; font-size: .8rem; }
.btn-lg   { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: 8px 12px; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .84rem; font-weight: 600; color: var(--navy); margin-bottom: 7px; }
.form-label .req { color: var(--red); margin-left: 2px; }
.form-hint { font-size: .75rem; color: var(--gray-400); margin-top: 5px; }
.form-error-msg { font-size: .75rem; color: var(--red); margin-top: 5px; display: flex; align-items: center; gap: 4px; }

.input-wrap { position: relative; }
.input-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: .9rem; pointer-events: none; }
.input-wrap.textarea-wrap i { top: 16px; transform: none; }

.form-control {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: .875rem; color: var(--text);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.input-wrap .form-control { padding-left: 40px; }
.form-control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,59,139,.1); }
.form-control.error { border-color: var(--red); }
.form-control:disabled { background: var(--gray-100); cursor: not-allowed; }
select.form-control { -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: .875rem; margin-bottom: 20px;
}
.alert i { flex-shrink: 0; margin-top: 1px; }
.alert strong { display: block; margin-bottom: 2px; }
.alert-success { background: rgba(5,150,105,.08); border: 1px solid rgba(5,150,105,.25); color: #065F46; }
.alert-success i { color: var(--green); }
.alert-error   { background: rgba(200,16,46,.07); border: 1px solid rgba(200,16,46,.25); color: var(--red-dark); }
.alert-error i { color: var(--red); }
.alert-warning { background: rgba(217,119,6,.08); border: 1px solid rgba(217,119,6,.25); color: #78350F; }
.alert-warning i { color: #D97706; }
.alert-info    { background: rgba(27,59,139,.07); border: 1px solid rgba(27,59,139,.2); color: var(--navy); }
.alert-info i  { color: var(--blue); }

/* ── Quick Actions ───────────────────────────────────────── */
.quick-actions { display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.qa-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 22px; background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); font-size: .8rem; font-weight: 600; color: var(--navy);
  cursor: pointer; transition: var(--transition); text-decoration: none;
  min-width: 100px; flex: 1;
}
.qa-btn i { font-size: 1.5rem; color: var(--blue); }
.qa-btn:hover { border-color: var(--blue); background: rgba(27,59,139,.03); text-decoration: none; color: var(--blue); }

/* ── KYC Banner ─────────────────────────────────────────── */
.kyc-banner {
  background: linear-gradient(135deg, #78350F, #D97706);
  color: #fff; border-radius: var(--radius); padding: 18px 24px;
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
}
.kyc-banner i { font-size: 1.4rem; flex-shrink: 0; }
.kyc-banner-text { flex: 1; }
.kyc-banner-text strong { display: block; font-size: .95rem; margin-bottom: 2px; }
.kyc-banner-text span   { font-size: .82rem; opacity: .85; }

/* ── Investment Plan Cards ──────────────────────────────── */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.plan-card {
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); overflow: hidden;
  transition: var(--transition);
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue); }
.plan-card.featured { border-color: var(--blue); }
.plan-card-header {
  padding: 18px 20px; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
}
.plan-card-header.bg-blue { background: linear-gradient(135deg, var(--blue), var(--blue-light)); }
.plan-card-header.bg-red  { background: linear-gradient(135deg, var(--red), #E63950); }
.plan-card-header.bg-gold { background: linear-gradient(135deg, #B45309, #D97706); }
.plan-card-name   { font-size: .9rem; font-weight: 700; }
.plan-card-type   { font-size: .72rem; opacity: .8; }
.plan-card-roi    { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.plan-card-roi span { font-size: .7rem; font-weight: 500; }
.plan-card-body   { padding: 18px 20px; }
.plan-card-body p { font-size: .82rem; color: var(--gray-600); margin-bottom: 14px; line-height: 1.6; }
.plan-meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.plan-meta-row { display: flex; justify-content: space-between; font-size: .8rem; }
.plan-meta-row span:first-child { color: var(--gray-600); }
.plan-meta-row span:last-child  { font-weight: 600; color: var(--navy); }

/* ── Portfolio / Investment detail ──────────────────────── */
.portfolio-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.ps-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 20px;
}
.ps-card .ps-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-400); margin-bottom: 8px; }
.ps-card .ps-value { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.ps-card .ps-sub   { font-size: .75rem; color: var(--gray-400); margin-top: 4px; }

/* ── Progress bar ────────────────────────────────────────── */
.progress-wrap { background: var(--gray-200); border-radius: 8px; height: 8px; overflow: hidden; }
.progress-bar  { height: 100%; border-radius: 8px; background: var(--blue); transition: width .4s ease; }
.progress-bar.green  { background: var(--green); }
.progress-bar.red    { background: var(--red); }
.progress-bar.gold   { background: var(--gold); }

/* ── Auth pages (login / register) ──────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(27,59,139,.5), transparent 60%),
              radial-gradient(circle at 80% 20%, rgba(200,16,46,.2), transparent 50%);
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  padding: 44px 40px;
  position: relative; z-index: 1;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo img { height: 40px; margin: 0 auto 8px; }
.auth-logo-text { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.auth-logo-sub  { font-size: .8rem; color: var(--gray-600); }
.auth-title { font-size: 1.4rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.auth-sub   { font-size: .875rem; color: var(--gray-600); margin-bottom: 28px; }
.auth-footer-text { text-align: center; font-size: .84rem; color: var(--gray-600); margin-top: 20px; }
.auth-footer-text a { color: var(--blue); font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.auth-divider span { font-size: .78rem; color: var(--gray-400); }

/* Password toggle */
.pw-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: .9rem; }
.pw-toggle:hover { color: var(--blue); }

/* ── 2FA Code input ──────────────────────────────────────── */
.otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 24px 0; }
.otp-input {
  width: 52px; height: 60px;
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 1.5rem; font-weight: 700; text-align: center;
  color: var(--navy); transition: var(--transition);
}
.otp-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,59,139,.1); outline: none; }

/* ── Transactions filter bar ─────────────────────────────── */
.filter-bar {
  display: flex; gap: 12px; align-items: center;
  flex-wrap: wrap; margin-bottom: 20px;
}
.filter-bar .form-control { max-width: 160px; }

/* ── Deposit methods ─────────────────────────────────────── */
.deposit-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; }
.dep-method {
  border: 2px solid var(--gray-200); border-radius: var(--radius);
  padding: 18px 14px; text-align: center; cursor: pointer;
  transition: var(--transition); position: relative;
}
.dep-method:hover   { border-color: var(--blue); background: rgba(27,59,139,.03); }
.dep-method.selected{ border-color: var(--blue); background: rgba(27,59,139,.06); }
.dep-method.selected::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; top: 8px; right: 10px; font-size: .65rem; color: var(--blue); }
.dep-method i   { font-size: 1.6rem; margin-bottom: 8px; }
.dep-method span{ font-size: .78rem; font-weight: 600; color: var(--navy); display: block; }

/* ── Copy box (wallet address) ───────────────────────────── */
.copy-box {
  display: flex; align-items: center;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); overflow: hidden; margin: 8px 0;
}
.copy-box-addr { flex: 1; padding: 10px 14px; font-family: monospace; font-size: .82rem; color: var(--navy); word-break: break-all; }
.copy-box-btn  { padding: 10px 14px; background: var(--blue); color: #fff; border: none; cursor: pointer; font-size: .8rem; font-weight: 600; white-space: nowrap; transition: var(--transition); }
.copy-box-btn:hover { background: var(--blue-mid); }

/* ── Profile sections ────────────────────────────────────── */
.profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.profile-avatar-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 28px; text-align: center; }
.profile-avatar-img  { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 16px; object-fit: cover; border: 3px solid var(--gray-200); }
.profile-name  { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.profile-email { font-size: .82rem; color: var(--gray-600); margin-top: 4px; }
.profile-since { font-size: .78rem; color: var(--gray-400); margin-top: 4px; }
.profile-kyc-badge { display: inline-block; margin-top: 12px; }

/* ── Notifications list ──────────────────────────────────── */
.notif-list { list-style: none; }
.notif-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 22px; border-bottom: 1px solid var(--gray-200);
  transition: var(--transition);
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(27,59,139,.03); }
.notif-item:hover  { background: var(--gray-50); }
.notif-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
}
.notif-icon.deposit  { background: rgba(5,150,105,.1); color: var(--green); }
.notif-icon.withdraw { background: rgba(200,16,46,.1); color: var(--red); }
.notif-icon.profit   { background: rgba(27,59,139,.1); color: var(--blue); }
.notif-icon.security { background: rgba(217,119,6,.1); color: #D97706; }
.notif-icon.default  { background: var(--gray-100); color: var(--gray-600); }
.notif-content { flex: 1; }
.notif-title   { font-size: .875rem; font-weight: 600; color: var(--navy); }
.notif-message { font-size: .82rem; color: var(--gray-600); margin-top: 2px; line-height: 1.5; }
.notif-time    { font-size: .72rem; color: var(--gray-400); margin-top: 4px; }
.notif-dot     { width: 8px; height: 8px; background: var(--blue); border-radius: 50%; margin-top: 6px; flex-shrink: 0; }

/* ── Stats mini widget ───────────────────────────────────── */
.mini-stats { display: flex; gap: 0; }
.mini-stat  { flex: 1; padding: 16px 20px; border-right: 1px solid var(--gray-200); text-align: center; }
.mini-stat:last-child { border-right: none; }
.mini-stat-val { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.mini-stat-lbl { font-size: .72rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; }

/* ── Section tabs ────────────────────────────────────────── */
.tab-bar { display: flex; gap: 4px; background: var(--gray-100); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 20px; width: fit-content; }
.tab-btn {
  padding: 8px 18px; border-radius: 6px; font-size: .84rem; font-weight: 600;
  cursor: pointer; border: none; background: none; color: var(--gray-600);
  transition: var(--transition);
}
.tab-btn.active { background: var(--white); color: var(--navy); box-shadow: var(--shadow); }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--gray-200); margin: 20px 0; }

/* ── Typography helpers ──────────────────────────────────── */
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-blue   { color: var(--blue); }
.text-gray   { color: var(--gray-600); }
.text-navy   { color: var(--navy); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fs-sm  { font-size: .82rem; }
.fs-xs  { font-size: .75rem; }
.mt-4   { margin-top: 16px; }
.mt-6   { margin-top: 24px; }
.mb-4   { margin-bottom: 16px; }
.mb-6   { margin-bottom: 24px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .balance-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-stat-row { grid-template-columns: repeat(2, 1fr); }
  .plans-grid   { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .dash-grid    { grid-template-columns: 1fr; }
  .deposit-methods { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-260px); width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.visible { display: block; }
  .app-main { margin-left: 0; }
  .topbar-toggle { display: block; }
  .auth-card { padding: 32px 24px; }
  .app-content { padding: 20px 16px; }
  .balance-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .plans-grid   { grid-template-columns: 1fr; }
  .deposit-methods { grid-template-columns: 1fr 1fr; }
  .form-row     { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .balance-grid { grid-template-columns: 1fr; }
  .deposit-methods { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 0 16px; }
}
