/* ============================================================
   Nexora — Crypto Dashboard  |  Embedded Stylesheet
   Desktop-first responsive · Dark/Light themes
   Orange accent · Glassmorphism · Syne + DM Sans
   ============================================================ */

/* ── 0. CUSTOM PROPERTIES ─────────────────────────────────── */
:root {
  --accent:       #f97316;
  --accent-light: #fb923c;
  --accent-dark:  #ea6a0a;
  --accent-glow:  rgba(249,115,22,0.30);

  --pos:  #22c55e;
  --neg:  #ef4444;
  --neu:  #94a3b8;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;

  --r-sm:  10px;
  --r-md:  16px;
  --r-lg:  22px;
  --r-xl:  30px;

  --ease-out: cubic-bezier(0.16,1,0.3,1);
  --ease-in:  cubic-bezier(0.7,0,0.84,0);
  --t-fast:   150ms;
  --t-med:    280ms;
  --t-slow:   450ms;

  /* Desktop sidebar width */
  --sidebar-w: 260px;
  --sidebar-collapsed-w: 72px;
}

/* ── DARK THEME ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg-base:      #080a10;
  --bg-surface:   #10131c;
  --bg-elevated:  #181c2a;
  --bg-card:      #13172000;
  --bg-glass:     rgba(255,255,255,0.03);
  --bg-glass-b:   rgba(255,255,255,0.07);

  --border:       rgba(255,255,255,0.06);
  --border-med:   rgba(255,255,255,0.11);

  --text-primary:   #eef0f8;
  --text-secondary: #7e8a9f;
  --text-muted:     #3e4a5c;

  --shadow-card: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.35);
  --shadow-btn:  0 4px 20px rgba(249,115,22,0.35);

  --header-bg:  rgba(8,10,16,0.90);
  --sidebar-bg: rgba(10,12,18,0.98);
  --bottom-bg:  rgba(10,13,22,0.97);

  --notif-bg:   #111420;
}

/* ── LIGHT THEME ─────────────────────────────────────────────── */
[data-theme="light"] {
  --bg-base:      #f0f2f8;
  --bg-surface:   #ffffff;
  --bg-elevated:  #e9ecf4;
  --bg-card:      #ffffff;
  --bg-glass:     rgba(255,255,255,0.70);
  --bg-glass-b:   rgba(255,255,255,0.93);

  --border:       rgba(0,0,0,0.07);
  --border-med:   rgba(0,0,0,0.12);

  --text-primary:   #0f1728;
  --text-secondary: #4b5568;
  --text-muted:     #9ca3af;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.09);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.08);
  --shadow-btn:  0 4px 16px rgba(249,115,22,0.28);

  --header-bg:  rgba(240,242,248,0.92);
  --sidebar-bg: rgba(255,255,255,0.99);
  --bottom-bg:  rgba(255,255,255,0.98);

  --notif-bg:   #ffffff;
}

/* ── 1. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color var(--t-med) var(--ease-out),
              color var(--t-med) var(--ease-out);
  -webkit-font-smoothing: antialiased;
}

a  { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; color: inherit; font-family: inherit; }

/* ── 2. UTILITIES ─────────────────────────────────────────── */
.pos     { color: var(--pos) !important; }
.neg     { color: var(--neg) !important; }
.neutral { color: var(--text-muted) !important; }

/* ── 3. OVERLAY ───────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease-out);
}
.overlay.active { opacity: 1; pointer-events: all; }

/* ── 4. NOTIFICATION DROPDOWN ─────────────────────────────── */
.notif-dropdown {
  position: fixed;
  top: 70px;
  right: 20px;
  width: 360px;
  max-height: 480px;
  background: var(--notif-bg);
  border: 1px solid var(--border-med);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 60px rgba(0,0,0,0.45);
  z-index: 1100;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-12px) scale(0.97);
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease-out),
              transform var(--t-med) var(--ease-out);
}
.notif-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.notif-dropdown-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.notif-mark-all {
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
}
.notif-mark-all:hover { background: rgba(249,115,22,0.10); }

.notif-list { overflow-y: auto; flex: 1; }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-glass); }
.notif-item.unread::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.notif-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.notif-icon-wrap.green  { background: rgba(34,197,94,0.12);  color: var(--pos); }
.notif-icon-wrap.orange { background: rgba(249,115,22,0.12); color: var(--accent); }
.notif-icon-wrap.red    { background: rgba(239,68,68,0.12);  color: var(--neg); }
.notif-icon-wrap.blue   { background: rgba(99,102,241,0.12); color: #818cf8; }

.notif-text { flex: 1; min-width: 0; }
.notif-title {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 2px;
}
.notif-desc {
  font-size: 0.73rem;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 2px;
}

.notif-footer {
  padding: 13px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.notif-view-all {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
}
.notif-view-all:hover { text-decoration: underline; }

/* ── 5. MOBILE SIDEBAR (slide-up panel) ───────────────────── */
.mobile-sidebar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-med);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: var(--sp-3) var(--sp-3) 40px;
  max-height: 88dvh;
  overflow-y: auto;
  transform: translateY(110%);
  transition: transform var(--t-slow) var(--ease-out);
  will-change: transform;
  box-shadow: 0 -8px 48px rgba(0,0,0,0.35);
  display: none; /* shown only on mobile */
}
.mobile-sidebar.open { transform: translateY(0); }

.mobile-sidebar::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-med);
  margin: 0 auto var(--sp-3);
}

/* ── 6. SIDEBAR SHARED STYLES (mobile + desktop nav) ──────── */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-2);
}
.sidebar-avatar { position: relative; flex-shrink: 0; }
.sidebar-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}
.online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 11px;
  height: 11px;
  background: var(--pos);
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}
.sidebar-user-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.sidebar-tag { font-size: 0.74rem; color: var(--accent); font-weight: 500; }

.sidebar-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), color var(--t-fast);
}
.sidebar-close:hover { background: var(--accent); color: #fff; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 13px var(--sp-2);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.sidebar-link:hover, .sidebar-link:focus-visible {
  background: var(--bg-glass-b);
  color: var(--text-primary);
  transform: translateX(4px);
  outline: none;
}
.sidebar-link.active {
  background: linear-gradient(135deg,rgba(249,115,22,0.15),rgba(249,115,22,0.05));
  color: var(--accent);
}
.sidebar-link-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: background var(--t-fast);
}
.sidebar-link.active .sidebar-link-icon { background: var(--accent); color: #fff; }

.sidebar-link.logout { color: var(--neg); margin-top: var(--sp-1); }
.sidebar-link.logout .sidebar-link-icon { background: rgba(239,68,68,0.12); color: var(--neg); }

.badge-pill {
  font-size: 0.68rem; font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: auto;
  margin-right: 6px;
}
.badge-pill.orange { background: rgba(249,115,22,0.18); color: var(--accent); }

.sidebar-footer {
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
  margin-top: var(--sp-2);
}
.theme-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--sp-2);
  border-radius: var(--r-md);
  margin-bottom: 4px;
  color: var(--text-secondary);
  font-size: 0.9rem; font-weight: 500;
}
.theme-row i { margin-right: 10px; }

/* ── Toggle Switch ─ */
.toggle-switch { position: relative; display: inline-block; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  display: block;
  width: 46px; height: 26px;
  border-radius: 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-med);
  position: relative;
  transition: background var(--t-med);
}
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform var(--t-med) var(--ease-out), background var(--t-med);
}
.toggle-switch input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-track .toggle-thumb {
  transform: translateX(20px);
  background: #fff;
}

/* ── 7. BTN ICON (header/notif buttons) ─────────────────────── */
.btn-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  position: relative;
}
.btn-icon:hover { background: var(--bg-glass-b); color: var(--text-primary); transform: scale(1.05); }

.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg-base);
  animation: pulseDot 2.5s ease-in-out infinite;
}
.notif-count {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 1.5px solid var(--bg-base);
}

@keyframes pulseDot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}

/* ════════════════════════════════════════════════
   ── DESKTOP LAYOUT (≥ 1024px)
════════════════════════════════════════════════ */

/* ── 8. DESKTOP WRAPPER ────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100dvh;
  position: relative;
}

/* ── 9. DESKTOP LEFT SIDEBAR ─────────────────────────────── */
.desktop-sidebar {
  width: var(--sidebar-w);
  min-height: 100dvh;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0;
  z-index: 500;
  transition: background var(--t-med), width var(--t-med) var(--ease-out);
  overflow: hidden;
}

.desktop-sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--accent-glow) 30%,
    var(--accent-glow) 70%,
    transparent
  );
}

.ds-logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 22px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ds-logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px var(--accent-glow);
  flex-shrink: 0;
}
.ds-logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}
.ds-logo-text em {
  font-style: normal;
  color: var(--accent);
}

.ds-nav {
  flex: 1;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.ds-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 12px 10px 6px;
}

.ds-nav-btn {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.ds-nav-btn i {
  font-size: 0.95rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  transition: transform var(--t-fast);
}
.ds-nav-btn:hover {
  background: var(--bg-glass-b);
  color: var(--text-primary);
}
.ds-nav-btn.active {
  background: linear-gradient(135deg,rgba(249,115,22,0.18),rgba(249,115,22,0.06));
  color: var(--accent);
}
.ds-nav-btn.active i { transform: scale(1.1); }
.ds-nav-btn.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.ds-nav-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(249,115,22,0.18);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 10px;
}
.ds-nav-badge.gray {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.ds-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}

.ds-user-area {
  padding: 16px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.ds-user-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast);
}
.ds-user-card:hover { background: var(--bg-glass-b); }

.ds-user-avatar {
  position: relative;
  flex-shrink: 0;
}
.ds-user-avatar img {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}
.ds-user-avatar .online-dot {
  width: 9px; height: 9px;
  bottom: 1px; right: 1px;
  border-width: 1.5px;
}
.ds-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ds-user-tag { font-size: 0.7rem; color: var(--accent); font-weight: 500; }
.ds-user-opts {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ── 10. DESKTOP MAIN AREA ─────────────────────────────────── */
.main-area {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-width: 0; /* Prevent flex overflow */
  overflow-x: hidden;
}

/* ── 11. DESKTOP TOP HEADER ─────────────────────────────────── */
.desktop-header {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 400;
  gap: 24px;
  transition: background var(--t-med);
  flex-shrink: 0;
}

.dh-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.dh-greeting {
  font-size: 0.88rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.dh-greeting strong {
  color: var(--text-primary);
  font-weight: 600;
}

.dh-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 8px 16px;
  max-width: 280px;
  flex: 1;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.dh-search:focus-within {
  border-color: var(--accent);
  background: var(--bg-glass-b);
}
.dh-search i { color: var(--text-muted); font-size: 0.85rem; flex-shrink: 0; }
.dh-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  min-width: 0;
}
.dh-search input::placeholder { color: var(--text-muted); }

.dh-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.dh-notif-btn {
  position: relative;
}

.dh-user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 5px 14px 5px 5px;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.dh-user-chip:hover { background: var(--bg-glass-b); border-color: var(--border-med); }
.dh-user-chip img {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}
.dh-user-chip-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}
.dh-user-chip i { color: var(--text-muted); font-size: 0.7rem; }

/* ── 12. DESKTOP CONTENT AREA ──────────────────────────────── */
.desktop-content {
  flex: 1;
  padding: 32px 32px 40px;
  max-width: 1360px;
  width: 100%;
  display: block; /* Critical fix: was flex, causing horizontal layout */
  overflow-x: hidden;
  overflow-y: auto;
}

/* ── 13. WELCOME ROW ──────────────────────────────────────── */
.welcome-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.welcome-left { min-width: 0; }
.welcome-sub { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 4px; }
.welcome-name {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.welcome-name .wave { font-style: normal; }
.welcome-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 6px;
}
.welcome-right {
  flex-shrink: 0;
  max-width: 100%;
}

.ticker-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
.ticker-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px 8px 10px;
  min-width: 180px;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
  flex-shrink: 0;
}
.ticker-chip:hover { border-color: var(--border-med); background: var(--bg-glass-b); }
.ticker-sym { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); min-width: 28px; }
.ticker-price { font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; color: var(--text-primary); flex: 1; }
.ticker-change { font-size: 0.73rem; font-weight: 600; }

/* ── 14. BALANCE + QUICK ACTIONS ROW ─────────────────────── */
.hero-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 100%;
}

.balance-hero {
  background: linear-gradient(135deg, #181220 0%, #0f1520 60%, #0a0e18 100%);
  border: 1px solid var(--border-med);
  border-radius: var(--r-lg);
  padding: 28px 28px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

[data-theme="light"] .balance-hero {
  background: linear-gradient(135deg, #fff7f0 0%, #fffbf6 60%, #fef9f5 100%);
}

.balance-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249,115,22,0.15), transparent 70%);
}

.balance-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.balance-amount {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  line-height: 1;
  margin-bottom: 10px;
}
.balance-currency {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 8px;
}
.balance-number {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
}
.balance-cents {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 8px;
}
.balance-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  margin-bottom: 20px;
}
.balance-change { font-weight: 600; }
.balance-period { color: var(--text-muted); }

.sparkline-svg { width: 100%; height: 52px; margin-top: 4px; }
.spark-line { stroke-dasharray: 320; stroke-dashoffset: 320; animation: drawLine 1.6s var(--ease-out) 0.4s forwards; }
.spark-fill { opacity: 0; animation: fadeIn 0.6s ease 1.2s forwards; }

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/* Quick Actions card */
.quick-actions-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.qa-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.qa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
}
.qa-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.qa-btn:hover { background: var(--bg-glass-b); border-color: var(--border-med); transform: translateY(-1px); }
.qa-btn.primary {
  background: linear-gradient(135deg,var(--accent),var(--accent-dark));
  border-color: var(--accent);
  color: #fff;
}
.qa-btn.primary:hover { box-shadow: 0 4px 20px var(--accent-glow); }
.qa-btn-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}
.qa-btn.primary .qa-btn-icon { background: rgba(255,255,255,0.2); }
.qa-btn:not(.primary) .qa-btn-icon { background: var(--bg-base); }
.qa-btn-label { font-size: 0.78rem; font-weight: 600; color: inherit; }
.qa-btn:not(.primary) .qa-btn-label { color: var(--text-secondary); }

/* ── 15. STAT CARDS ───────────────────────────────────────── */
.cards-section { margin-bottom: 24px; width: 100%; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
.see-all {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  display: flex; align-items: center; gap: 5px;
  transition: gap var(--t-fast);
}
.see-all:hover { gap: 8px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
  width: 100%;
}

.dash-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  animation: fadeSlideUp var(--t-slow) var(--ease-out) both;
  min-width: 0;
}
.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  border-color: var(--border-med);
}

.card-body-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.card-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.card-value { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; color: var(--text-primary); line-height: 1.2; margin-top: 2px; }
.card-meta { font-size: 0.72rem; font-weight: 500; margin-top: 2px; display: flex; align-items: center; gap: 4px; }

.card-icon-wrap {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Card variants */
.card-balance {
  background: linear-gradient(135deg, #16101f 0%, #0e121e 100%);
  border-color: rgba(249,115,22,0.15);
}
[data-theme="light"] .card-balance { background: linear-gradient(135deg,#fff4ed,#fff8f5); }
.card-balance .card-icon-wrap { background: rgba(249,115,22,0.15); color: var(--accent); }
.card-balance::after {
  content: '';
  position: absolute;
  bottom: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(249,115,22,0.12),transparent 70%);
}

.card-profit {
  background: linear-gradient(135deg,#0e1a10,#0c1510);
  border-color: rgba(34,197,94,0.12);
}
[data-theme="light"] .card-profit { background: linear-gradient(135deg,#f0fff4,#e6fde9); }
.card-profit .card-icon-wrap { background: rgba(34,197,94,0.15); color: var(--pos); }
.card-profit::after {
  content: '';
  position: absolute;
  bottom: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(34,197,94,0.10),transparent 70%);
}

.card-deposit {
  background: linear-gradient(135deg,#0d1520,#0c1018);
  border-color: rgba(99,102,241,0.12);
}
[data-theme="light"] .card-deposit { background: linear-gradient(135deg,#f0f4ff,#eef0ff); }
.card-deposit .card-icon-wrap { background: rgba(99,102,241,0.15); color: #818cf8; }
.card-deposit::after {
  content: '';
  position: absolute;
  bottom: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(99,102,241,0.10),transparent 70%);
}

.card-signal {
  background: linear-gradient(135deg,#0e1a12,#0c1610);
  border-color: rgba(34,197,94,0.10);
}
[data-theme="light"] .card-signal { background: linear-gradient(135deg,#f0fff5,#e6fded); }
.card-signal .card-icon-wrap { background: rgba(34,197,94,0.15); color: var(--pos); }

.signal-value { display: flex; align-items: center; gap: 6px; }
.signal-badge {
  font-size: 0.52rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px;
  background: rgba(34,197,94,0.18); color: var(--pos);
  padding: 2px 5px; border-radius: 4px;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0.45; } }
.signal-bar-wrap { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.signal-bar-track { flex: 1; height: 5px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; }
.signal-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg,var(--pos),#16a34a);
  transition: width 1.4s var(--ease-out);
  box-shadow: 0 0 8px rgba(34,197,94,0.5);
}
.signal-pct { font-size: 0.65rem; font-weight: 600; color: var(--pos); min-width: 28px; text-align: right; }

/* ── 16. BOTTOM ROW (Investments + Transactions side by side) */
.bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}

.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  min-width: 0;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.panel-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Invest rows ─ */
.invest-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
  cursor: pointer;
}
.invest-row:last-child { border-bottom: none; }
.invest-row:hover { background: var(--bg-glass); }

.invest-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.btc-icon { background: rgba(247,147,26,0.15); }
.eth-icon { background: rgba(98,126,234,0.15); }
.sol-icon { background: rgba(153,69,255,0.15); }

.invest-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.invest-name { font-weight: 600; font-size: 0.87rem; color: var(--text-primary); }
.invest-sub { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invest-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.invest-amount { font-family: var(--font-display); font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }
.invest-change { font-size: 0.7rem; font-weight: 600; }

/* ── Transaction rows ─ */
.tx-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
  cursor: pointer;
}
.tx-row:last-child { border-bottom: none; }
.tx-row:hover { background: var(--bg-glass); }

.tx-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.tx-in     { background: rgba(34,197,94,0.12);  color: var(--pos); }
.tx-out    { background: rgba(239,68,68,0.12);   color: var(--neg); }
.tx-profit { background: rgba(249,115,22,0.12);  color: var(--accent); }

.tx-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.tx-title { font-size: 0.84rem; font-weight: 600; color: var(--text-primary); }
.tx-date  { font-size: 0.7rem;  color: var(--text-muted); }
.tx-amount { font-family: var(--font-display); font-size: 0.88rem; font-weight: 700; white-space: nowrap; }

/* ── 17. ANIMATIONS ───────────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cards-grid .dash-card:nth-child(1) { animation-delay: 60ms; }
.cards-grid .dash-card:nth-child(2) { animation-delay: 120ms; }
.cards-grid .dash-card:nth-child(3) { animation-delay: 180ms; }
.cards-grid .dash-card:nth-child(4) { animation-delay: 240ms; }

/* ── 18. FOCUS & SCROLLBAR ─────────────────────────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-med); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }


/* ════════════════════════════════════════════════
   ── MOBILE / TABLET LAYOUT (< 1024px)
════════════════════════════════════════════════ */

/* On desktop: hide mobile stuff */
.mobile-header, .mobile-main, .bottom-nav, .mobile-sidebar, .mobile-app-wrapper { display: none; }
/* On desktop: show desktop stuff */
.desktop-sidebar, .main-area, .desktop-header, .desktop-content { display: flex; }
.desktop-content { display: block; } /* explicit override */

@media (max-width: 1023px) {
  /* Hide desktop elements */
  .app-layout { display: none !important; }
  .desktop-sidebar  { display: none !important; }
  .desktop-header   { display: none !important; }
  .desktop-content  { display: none !important; }
  .main-area        { display: none !important; }

  /* Show mobile elements */
  .mobile-app-wrapper { display: flex; flex-direction: column; min-height: 100dvh; }
  .mobile-header  { display: flex; }
  .mobile-main    { display: block; }
  .bottom-nav     { display: flex; }
  .mobile-sidebar { display: block; }

  /* Notification dropdown repositioning on mobile */
  .notif-dropdown {
    width: calc(100vw - 32px);
    right: 16px;
    top: 64px;
  }
}

/* ── MOBILE HEADER ─────────────────────────────────────────── */
.mobile-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-2);
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 400;
  transition: background var(--t-med);
}
.header-logo {
  display: flex; align-items: center; gap: 9px;
}
.logo-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg,var(--accent),var(--accent-dark));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.85rem;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}
.logo-text em { font-style: normal; color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.hamburger {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
}
.ham-bar {
  display: block;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  width: 18px;
  transition: transform var(--t-fast), opacity var(--t-fast), width var(--t-fast);
}
.ham-bar.short { width: 12px; align-self: flex-start; margin-left: 3px; }
[aria-expanded="true"] .ham-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
[aria-expanded="true"] .ham-bar:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .ham-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); width: 18px; margin-left: 0; }

/* ── MOBILE MAIN ─────────────────────────────────────────── */
.mobile-main {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-2);
  padding-bottom: 90px;
}

/* ── MOBILE WELCOME SECTION ──────────────────────────────── */
.welcome-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--sp-3);
  animation: fadeSlideUp var(--t-slow) var(--ease-out) both;
}
.welcome-right { flex-shrink: 0; }

/* Mobile balance hero */
.mobile-balance-hero {
  background: linear-gradient(135deg,#181220,#0f1520,#0a0e18);
  border: 1px solid var(--border-med);
  border-radius: var(--r-lg);
  padding: 22px 20px 18px;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-card);
  animation: fadeSlideUp var(--t-slow) var(--ease-out) 60ms both;
}
[data-theme="light"] .mobile-balance-hero {
  background: linear-gradient(135deg,#fff7f0,#fffbf6,#fef9f5);
}
.mobile-balance-hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(249,115,22,0.15),transparent 70%);
}

/* ── MOBILE CARDS GRID (2 columns) ─────────────────────── */
.mobile-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: var(--sp-3);
}
.mobile-cards-grid .dash-card {
  padding: 16px 14px 14px;
  animation: fadeSlideUp var(--t-slow) var(--ease-out) 120ms both;
}
.mobile-cards-grid .card-value { font-size: 1rem; }
.mobile-cards-grid .card-icon-wrap { width: 36px; height: 36px; font-size: 0.95rem; border-radius: 10px; }

/* Mobile investment / transaction sections */
.mobile-investments, .mobile-transactions {
  margin-bottom: var(--sp-3);
  animation: fadeSlideUp var(--t-slow) var(--ease-out) 180ms both;
}
.mobile-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.mobile-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.mobile-panel .invest-row, .mobile-panel .tx-row { padding: 13px var(--sp-2); }

/* ── BOTTOM NAV ─────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  z-index: 600;
  align-items: flex-end;
  justify-content: space-around;
  padding: 10px 8px 18px;
  background: var(--bottom-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 32px rgba(0,0,0,0.25);
  transition: background var(--t-med);
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.2px;
  transition: color var(--t-fast), transform var(--t-fast);
  position: relative;
  min-width: 52px;
}
.nav-btn i { font-size: 1.1rem; transition: transform var(--t-fast), color var(--t-fast); }
.nav-btn:hover, .nav-btn.active { color: var(--accent); }
.nav-btn:hover i, .nav-btn.active i { transform: translateY(-2px); }
.nav-btn.active::after {
  content: '';
  position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.nav-btn-center { margin-top: -20px; }
.center-btn-ring {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg,var(--accent),var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: #fff;
  box-shadow: 0 4px 18px var(--accent-glow);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  border: 3px solid var(--bottom-bg);
}
.nav-btn-center:hover .center-btn-ring, .nav-btn-center.active .center-btn-ring {
  transform: scale(1.08);
  box-shadow: 0 6px 28px var(--accent-glow);
}
.nav-btn-center i { font-size: 1.15rem; color: #fff; transform: none !important; }
.nav-btn-center span { color: var(--text-muted); }
.nav-btn-center.active span { color: var(--accent); }
.nav-btn-center.active::after { display: none; }

/* ── TABLET mid-range adjustments ──────────────────────────── */
@media (min-width: 600px) and (max-width: 1023px) {
  .mobile-main { padding: var(--sp-3); }
  .bottom-nav { max-width: 600px; }
  .mobile-cards-grid { grid-template-columns: repeat(4,1fr); }
  .mobile-balance-hero .balance-number { font-size: 2.4rem; }
  .mobile-cards-grid .card-value { font-size: 1.1rem; }
}

/* ── Desktop large tweaks ──────────────────────────────────── */
@media (min-width: 1280px) {
  .cards-grid { grid-template-columns: repeat(4,1fr); }
  .balance-number { font-size: 2.8rem; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .cards-grid { grid-template-columns: repeat(2,1fr); }
  .hero-row { grid-template-columns: 1.2fr 1fr; }
  .bottom-row { grid-template-columns: 1fr 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
/* ════════════════════════════════════════════════
   ADDITIONAL PAGE STYLES
   Add these to the bottom of your existing style.css
════════════════════════════════════════════════ */

/* ── Mobile Page Header ──────────────────────────── */
.mobile-page-header {
  margin-bottom: var(--sp-3);
  animation: fadeSlideUp var(--t-slow) var(--ease-out) both;
}
.mobile-page-header h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.mobile-page-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ── DEPOSIT PAGE ────────────────────────────────── */
.deposit-container {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  width: 100%;
}
.deposit-methods {
  animation: fadeSlideUp var(--t-slow) var(--ease-out) both;
}
.deposit-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.deposit-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.deposit-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.deposit-tab {
  padding: 10px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.deposit-tab:hover {
  background: var(--bg-glass-b);
  color: var(--text-primary);
}
.deposit-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.deposit-tabs.mobile-tabs {
  justify-content: center;
}

.deposit-assets {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.deposit-asset-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  transition: all var(--t-fast);
  cursor: pointer;
}
.deposit-asset-card:hover {
  border-color: var(--border-med);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.asset-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.asset-icon.bitcoin { background: rgba(247,147,26,0.15); }
.asset-icon.ethereum { background: rgba(98,126,234,0.15); }
.asset-icon.usdt { background: rgba(38,161,123,0.15); }
.asset-icon.solana { background: rgba(153,69,255,0.15); }
.asset-info {
  flex: 1;
  min-width: 0;
}
.asset-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.asset-network {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.deposit-btn {
  padding: 10px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.deposit-btn:hover {
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: scale(1.03);
}

.deposit-history {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  animation: fadeSlideUp var(--t-slow) var(--ease-out) 120ms both;
}
.history-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  transition: background var(--t-fast);
}
.history-item:hover {
  background: var(--bg-glass);
}
.history-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.history-icon.deposit-in { background: rgba(34,197,94,0.12); color: var(--pos); }
.history-icon.withdraw-out { background: rgba(239,68,68,0.12); color: var(--neg); }
.history-details {
  flex: 1;
  min-width: 0;
}
.history-asset {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-primary);
}
.history-date {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.history-amount {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
}
.history-status {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.history-status.completed {
  background: rgba(34,197,94,0.12);
  color: var(--pos);
}
.history-status.failed {
  background: rgba(239,68,68,0.12);
  color: var(--neg);
}
.history-status.pending {
  background: rgba(249,115,22,0.12);
  color: var(--accent);
}

/* ── WITHDRAW PAGE ────────────────────────────────── */
.withdraw-container {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  width: 100%;
}
.withdraw-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  animation: fadeSlideUp var(--t-slow) var(--ease-out) both;
}
.form-header {
  margin-bottom: 24px;
}
.form-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.form-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.form-header p strong {
  color: var(--accent);
}
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--t-fast);
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
}
.form-input::placeholder {
  color: var(--text-muted);
}
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237e8a9f' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.form-select:focus {
  outline: none;
  border-color: var(--accent);
}
.amount-input-wrapper {
  position: relative;
}
.amount-input-wrapper .form-input {
  padding-right: 70px;
}
.amount-max {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 12px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity var(--t-fast);
}
.amount-max:hover {
  opacity: 0.85;
}

.withdraw-fee-info {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.fee-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.fee-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.submit-withdraw-btn,
.submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  border: none;
}
.submit-withdraw-btn:hover,
.submit-btn:hover {
  box-shadow: 0 6px 24px var(--accent-glow);
  transform: translateY(-1px);
}

.withdraw-history {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

/* ── TRANSACTIONS PAGE ───────────────────────────── */
.transactions-full-container {
  width: 100%;
  animation: fadeSlideUp var(--t-slow) var(--ease-out) both;
}
.tx-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tx-filter-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.tx-filter-btn:hover {
  background: var(--bg-glass-b);
  color: var(--text-primary);
}
.tx-filter-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: var(--accent);
  color: #fff;
}
.tx-date-filter {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}
.tx-full-list {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.tx-status-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.tx-status-badge.completed {
  background: rgba(34,197,94,0.12);
  color: var(--pos);
}
.tx-status-badge.pending {
  background: rgba(249,115,22,0.12);
  color: var(--accent);
}
.tx-status-badge.failed {
  background: rgba(239,68,68,0.12);
  color: var(--neg);
}
.mobile-tx-filters {
  overflow-x: auto;
  padding-bottom: 4px;
}
.mobile-tx-filters .tx-filter-btn {
  flex-shrink: 0;
}

/* ── INVEST PAGE ──────────────────────────────────── */
.invest-container {
  width: 100%;
  animation: fadeSlideUp var(--t-slow) var(--ease-out) both;
}
.invest-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.invest-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.invest-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.invest-stat-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}
.invest-stat-change {
  font-size: 0.75rem;
  font-weight: 600;
}

.invest-plans-section {
  margin-bottom: 24px;
}
.invest-plans-section h3,
.invest-recommendations h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.invest-plan-detail {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
  transition: all var(--t-fast);
  cursor: pointer;
}
.invest-plan-detail:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.35);
  border-color: var(--border-med);
}
.plan-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.plan-icon.btc { background: rgba(247,147,26,0.15); }
.plan-icon.eth { background: rgba(98,126,234,0.15); }
.plan-icon.sol { background: rgba(153,69,255,0.15); }
.plan-info {
  flex: 1;
  min-width: 0;
}
.plan-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.plan-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.plan-metrics {
  text-align: right;
  flex-shrink: 0;
}
.plan-value {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.plan-roi {
  font-size: 0.72rem;
  font-weight: 600;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.recommendation-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
}
.recommendation-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  border-color: var(--border-med);
}
.rec-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
}
.rec-badge.hot {
  background: #ef4444;
}
.rec-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
  margin: 0 auto 14px;
}
.recommendation-card h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.recommendation-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}
.rec-btn {
  padding: 10px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--t-fast);
}
.rec-btn:hover {
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: scale(1.05);
}

/* ── PROFILE PAGE ─────────────────────────────────── */
.profile-container {
  width: 100%;
  max-width: 680px;
  animation: fadeSlideUp var(--t-slow) var(--ease-out) both;
}
.profile-header-card {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}
.profile-avatar-lg {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar-lg img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--accent);
}
.change-photo-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
}
.profile-info-main h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.profile-username {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}
.profile-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(249,115,22,0.15);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 12px;
  margin-bottom: 10px;
}
.profile-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}
.profile-stats {
  display: flex;
  gap: 28px;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.profile-stat strong {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.profile-stat span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-details-form {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

/* ── SETTINGS PAGE ────────────────────────────────── */
.settings-container {
  width: 100%;
  max-width: 680px;
  animation: fadeSlideUp var(--t-slow) var(--ease-out) both;
}
.settings-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}
.settings-section h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.setting-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}
.setting-info {
  flex: 1;
  min-width: 0;
}
.setting-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.setting-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── SECURITY PAGE ────────────────────────────────── */
.security-container {
  width: 100%;
  max-width: 680px;
  animation: fadeSlideUp var(--t-slow) var(--ease-out) both;
}
.security-status-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.security-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.score-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(249,115,22,0.05), transparent 70%);
}
.score-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.score-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}
.score-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
}
.score-status.good {
  background: rgba(34,197,94,0.12);
  color: var(--pos);
}

.security-settings {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.security-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  transition: background var(--t-fast);
}
.security-item:not(:last-child) {
  border-bottom: 1px solid var(--border);
}
.security-item:hover {
  background: var(--bg-glass);
}
.security-item.warning {
  background: rgba(239,68,68,0.04);
}
.security-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  flex-shrink: 0;
}
.security-info {
  flex: 1;
  min-width: 0;
}
.security-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.security-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
}
.security-action-btn {
  padding: 8px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.security-action-btn:hover {
  background: var(--bg-glass-b);
  color: var(--text-primary);
}
.security-action-btn.enabled {
  background: rgba(34,197,94,0.12);
  color: var(--pos);
  border-color: transparent;
}
.security-action-btn.warning-btn {
  background: rgba(239,68,68,0.12);
  color: var(--neg);
  border-color: transparent;
}
.security-action-btn.warning-btn:hover {
  background: rgba(239,68,68,0.2);
}

/* ── RESPONSIVE: Deposit & Withdraw containers ────── */
@media (max-width: 1100px) {
  .deposit-container,
  .withdraw-container {
    grid-template-columns: 1fr;
  }
  .deposit-history,
  .withdraw-history {
    margin-top: 20px;
  }
}

@media (max-width: 900px) {
  .invest-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .recommendation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .invest-overview-grid,
  .recommendation-grid {
    grid-template-columns: 1fr;
  }
  .profile-header-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .profile-stats {
    justify-content: center;
  }
  .tx-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .tx-filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
}