/* ===================================================
   NexaChain MLM Dashboard — style.css
   Dark Futuristic / Web3 Wallet Aesthetic
   =================================================== */

/* ---- CSS Variables ---- */
:root {
  --cyan: #00F5D4;
  --cyan2: #00c9ae;
  --purple: #8B5CF6;
  --purple2: #6d3fcf;
  --green: #10b981;
  --orange: #f59e0b;
  --red: #f43f5e;
  --bg: #050505;
  --bg2: #0a0a0f;
  --card-bg: rgba(255, 255, 255, 0.035);
  --card-border: rgba(255, 255, 255, 0.07);
  --text: #e8e8f0;
  --text-muted: rgba(255, 255, 255, 0.4);
  --sidebar-w: 240px;
  --topbar-h: 64px;
  --radius: 20px;
  --radius-sm: 12px;
  font-size: 15px;
}

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  /* REPLACE overflow-x: hidden WITH: */
  overflow-y: auto;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

img {
  display: block;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 245, 212, 0.25);
  border-radius: 4px;
}

/* ---- Starfield Particle Background ---- */
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #ffffff, rgba(0, 0, 0, 0)),
    radial-gradient(1.5px 1.5px at 40px 70px, rgba(0, 245, 212, 0.8), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 90px 40px, #ffffff, rgba(0, 0, 0, 0)),
    radial-gradient(1px 1px at 160px 120px, rgba(139, 92, 246, 0.8), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 230px 190px, #ffffff, rgba(0, 0, 0, 0)),
    radial-gradient(1.5px 1.5px at 310px 80px, rgba(0, 245, 212, 0.6), rgba(0, 0, 0, 0));
  background-repeat: repeat;
  background-size: 350px 350px;
  opacity: 0.35;
  animation: starTwinkle 4s ease-in-out infinite alternate;
}

@keyframes starTwinkle {
  0% {
    opacity: 0.2;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
  }

  100% {
    opacity: 0.25;
    transform: scale(1.02);
  }
}

/* ---- Animated Orbit Rings ---- */
.orbit {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 650px;
  height: 650px;
  border: 1px dashed rgba(0, 245, 212, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
  pointer-events: none;
  z-index: 0;
  animation: orbitRotate 45s linear infinite;
}

/* Glowing node attached to outer orbit */
.orbit::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--cyan);
}

.orbit.small {
  width: 420px;
  height: 420px;
  border: 1px solid rgba(139, 92, 246, 0.12);
  animation: orbitRotateReverse 30s linear infinite;
}

/* Glowing node attached to inner orbit */
.orbit.small::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--purple);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--purple);
}

/* Orbit Animation Keyframes */
@keyframes orbitRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes orbitRotateReverse {
  from {
    transform: translate(-50%, -50%) rotate(360deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(0deg);
  }
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  /* CHANGE: Use flex-start instead of center so overflow scrolls correctly */
  align-items: flex-start;
  justify-content: center;
  /* background: radial-gradient(circle at top, rgba(0,245,212,0.06), transparent 28%), 
              linear-gradient(180deg, rgba(5,5,15,0.98), rgba(0,0,0,0.96)); */
  padding: 1.5rem 1rem;

  /* Enables vertical scrolling */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Add margin: auto to .auth-panel to keep it vertically centered ONLY when it fits */
.auth-panel {
  width: min(100%, 760px);
  max-width: 760px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  background: rgba(10, 11, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.38);

  /* ADD THIS LINE: Keeps it centered when height fits, but prevents top-clipping when tall */
  margin: auto;
}

body.auth-mode .auth-screen {
  display: flex;
}

body.auth-mode .sidebar,
body.auth-mode .main-wrapper,
body.auth-mode .mobile-bottom-nav,
body.auth-mode .notif-panel,
body.auth-mode .sidebar-overlay {
  display: none !important;
}


.auth-form {
  width: 100%;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.auth-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.auth-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.7px;
}

.auth-copy h1 {
  font-size: clamp(2rem, 3.2vw, 3.5rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

.auth-copy p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  max-width: 28rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

/* ---- Auth Note Styling ---- */
.auth-note {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
  font-weight: 400;
  letter-spacing: 0.3px;
}

/* Link inside the Auth Note */
.auth-note a {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
  margin-left: 0.25rem;
}

/* Glowing underline effect on hover */
.auth-note a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
  box-shadow: 0 0 8px var(--cyan);
}

.auth-note a:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0, 245, 212, 0.6);
}

.auth-note a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (max-width: 900px) {
  .auth-panel {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .auth-copy h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 640px) {
  .auth-panel {
    gap: 1.25rem;
    padding: 1.3rem;
  }

  .auth-copy p {
    max-width: 100%;
  }

  .auth-title {
    font-size: 1.35rem;
  }

  .auth-subtitle {
    font-size: 0.75rem;
  }
}

/* ---- Glassmorphism Card ---- */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}

.glass-card:hover {
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.08);
}

/* ---- Sidebar ---- */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  max-height: 100vh;
  background: rgba(5, 5, 15, 0.85);
  backdrop-filter: blur(30px);
  border-right: 1px solid var(--card-border);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1.5rem 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1.4rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
}

.logo-icon {
  font-size: 1.7rem;
  color: var(--cyan);
}

.logo-text {
  font-family: 'Orbitron', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo-accent {
  color: var(--cyan);
}

.sidebar-nav {
  flex: 1 1 auto;
  padding: 1rem 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.25s;
  position: relative;
}

.nav-item i {
  font-size: 1.1rem;
  min-width: 20px;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: var(--cyan);
  background: rgba(0, 245, 212, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 245, 212, 0.15);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 3px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.has-submenu {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  gap: 0.8rem;
}

.submenu-toggle span {
  flex: 1;
  text-align: left;
}

.submenu-arrow {
  font-size: 0.95rem;
  transition: transform 0.25s ease;
}

.has-submenu.open .submenu-arrow {
  transform: rotate(180deg);
}

.submenu {
  display: grid;
  gap: 0.2rem;
  height: 0;
  overflow: hidden;
  transition: height 0.25s ease;
}

.has-submenu.open .submenu {
  height: auto;
}

.submenu-link {
  padding-left: 1.25rem;
}

.submenu-link i {
  transform: rotate(-45deg);
}

.nav-divider {
  height: 1px;
  background: var(--card-border);
  margin: 0.5rem 0;
}

.nav-logout:hover {
  color: var(--red);
  background: rgba(244, 63, 94, 0.08);
}

.sidebar-rank-badge {
  margin: 0 0.75rem 0.5rem;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.25s;
  min-width: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.sidebar-rank-badge:hover {
  background: rgba(139, 92, 246, 0.2);
}

.rank-orb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.5);
  flex-shrink: 0;
}

.rank-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ---- Mobile Bottom Nav ---- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(5, 5, 15, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--card-border);
  z-index: 100;
  padding: 0.5rem 0 max(0.5rem, env(safe-area-inset-bottom));
}

.mob-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 0.3rem 0;
  transition: all 0.2s;
}

.mob-nav-item i {
  font-size: 1.2rem;
}

.mob-nav-item.active {
  color: var(--cyan);
}

.mob-nav-item.active i {
  filter: drop-shadow(0 0 6px var(--cyan));
}

/* ---- Main Wrapper ---- */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ---- Topbar ---- */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  background: rgba(5, 5, 15, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.sidebar-toggle {
  font-size: 1.4rem;
  color: var(--text);
  display: none;
  padding: 0.2rem;
  transition: color 0.2s;
}

.sidebar-toggle:hover {
  color: var(--cyan);
}

.topbar-title {
  font-family: 'Orbitron', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  flex: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--text-muted);
  transition: all 0.25s;
  position: relative;
}

.icon-btn:hover {
  color: var(--cyan);
  border-color: rgba(0, 245, 212, 0.3);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.2);
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar {
  /*width: 40px;*/
  height: 40px;
  /*border-radius: 50%;*/

  cursor: pointer;
  position: relative;
  overflow: visible;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-status {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg);
}

/* ---- Notification Panel ---- */
.notif-panel {
  position: fixed;
  top: var(--topbar-h);
  right: 1rem;
  width: 320px;
  max-height: 480px;
  background: rgba(5, 5, 20, 0.95);
  backdrop-filter: blur(30px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  z-index: 200;
  display: none;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideDown 0.25s ease;
}

.notif-panel.show {
  display: flex;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--card-border);
  font-weight: 600;
  font-size: 0.9rem;
}

.notif-close {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.notif-close:hover {
  color: var(--red);
}

.notif-list {
  overflow-y: auto;
  padding: 0.5rem;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notif-item.unread {
  background: rgba(0, 245, 212, 0.04);
}

.notif-icon {
  font-size: 1.2rem;
  min-width: 24px;
  margin-top: 2px;
}

.notif-icon.reward {
  color: var(--cyan);
}

.notif-icon.team {
  color: var(--purple);
}

.notif-icon.rank {
  color: var(--orange);
}

.notif-icon.wallet {
  color: var(--green);
}

.notif-title {
  font-size: 0.82rem;
  font-weight: 600;
}

.notif-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.notif-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- Content Area ---- */
.content-area {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

/* ---- Pages ---- */
.page {
  display: none;
}

.page.active {
  display: block;
  animation: pageIn 0.35s ease;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Section Label ---- */
.section-label {
  font-family: 'Orbitron', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.5rem 0 0.75rem;
}

/* ---- Gradient Text ---- */
.gradient-text {
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Glow Button ---- */
.btn-glow {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #050505;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.65rem 1.4rem;
  border-radius: 50px;
  transition: all 0.3s;
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.3);
  align-items: center;
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(0, 245, 212, 0.5), 0 0 60px rgba(139, 92, 246, 0.2);
}

.btn-glow.sm {
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
}

/* ---- Welcome Card ---- */
.welcome-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.06), rgba(139, 92, 246, 0.06));
  border-color: rgba(0, 245, 212, 0.15);
  padding: 1.75rem;
  margin-bottom: 0.5rem;
}

.welcome-left {
  flex: 1;
}

.welcome-greeting {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.welcome-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.rank-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.2);
  color: var(--cyan);
}

.rank-pill.secondary {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
  color: var(--purple);
}

.welcome-right {
  flex-shrink: 0;
}

.total-earnings-card {
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.12), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(0, 245, 212, 0.15);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.5rem;
  text-align: center;
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.1);
}

.te-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.te-amount {
  font-family: 'Orbitron', monospace;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--cyan);
  line-height: 1.2;
}

.te-amount span {
  font-size: 1rem;
}

.te-change {
  font-size: 0.75rem;
  color: var(--green);
  margin-top: 0.25rem;
}

/* ---- Mini Stat Cards ---- */
.mini-stat-card {
  text-align: center;
  padding: 1rem;
  transition: all 0.3s;
}

.mini-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 245, 212, 0.1);
}

.mini-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin: 0 auto 0.6rem;
}

.mini-stat-icon.cyan {
  background: rgba(0, 245, 212, 0.12);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.2);
}

.mini-stat-icon.purple {
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.mini-stat-icon.green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.mini-stat-icon.orange {
  background: rgba(245, 158, 11, 0.12);
  color: var(--orange);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.mini-stat-val {
  font-size: 1.1rem;
  font-weight: 700;
}

.mini-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ---- Stat Cards ---- */
.stat-card {
  padding: 1.25rem;
  transition: all 0.3s;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.stat-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.stat-icon-wrap.cyan {
  background: rgba(0, 245, 212, 0.12);
  color: var(--cyan);
}

.stat-icon-wrap.green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
}

.stat-icon-wrap.purple {
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple);
}

.stat-icon-wrap.orange {
  background: rgba(245, 158, 11, 0.12);
  color: var(--orange);
}

.stat-icon-wrap.red {
  background: rgb(245 11 11 / 12%);
  color: var(--red);
}

.stat-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 50px;
}

.stat-badge.positive {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
}

.stat-badge.negative {
  background: rgba(244, 63, 94, 0.15);
  color: var(--red);
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}

.progress-bar-wrap {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar-fill.cyan {
  background: linear-gradient(90deg, var(--cyan2), var(--cyan));
  box-shadow: 0 0 8px var(--cyan);
}

.progress-bar-fill.green {
  background: linear-gradient(90deg, #059669, var(--green));
  box-shadow: 0 0 8px var(--green);
}

.progress-bar-fill.purple {
  background: linear-gradient(90deg, var(--purple2), var(--purple));
  box-shadow: 0 0 8px var(--purple);
}

.progress-bar-fill.orange {
  background: linear-gradient(90deg, #d97706, var(--orange));
  box-shadow: 0 0 8px var(--orange);
}

.progress-bar-fill.red {
  background: linear-gradient(90deg, #f50b0b, var(--red));
  box-shadow: 0 0 8px var(--red);
}

/* ---- Quick Actions ---- */
.quick-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.qa-btn {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.1rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.3s;
}

.qa-btn i {
  font-size: 1.4rem;
}

.qa-btn.cyan {
  background: rgba(0, 245, 212, 0.08);
  border-color: rgba(0, 245, 212, 0.2);
  color: var(--cyan);
}

.qa-btn.cyan:hover {
  background: rgba(0, 245, 212, 0.16);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.2);
  transform: translateY(-3px);
}

.qa-btn.purple {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
  color: var(--purple);
}

.qa-btn.purple:hover {
  background: rgba(139, 92, 246, 0.16);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
  transform: translateY(-3px);
}

.qa-btn.green {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--green);
}

.qa-btn.green:hover {
  background: rgba(16, 185, 129, 0.16);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  transform: translateY(-3px);
}

.qa-btn.orange {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--orange);
}

.qa-btn.orange:hover {
  background: rgba(245, 158, 11, 0.16);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
  transform: translateY(-3px);
}

/* ---- Transactions ---- */
.txn-card {
  padding: 0;
  overflow: hidden;
}

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

.txn-item:last-of-type {
  border-bottom: none;
}

.txn-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

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

.txn-icon.deposit {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
}

.txn-icon.withdrawal {
  background: rgba(244, 63, 94, 0.12);
  color: var(--red);
}

.txn-icon.referral {
  background: rgba(0, 245, 212, 0.12);
  color: var(--cyan);
}

.txn-icon.matching {
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple);
}

.txn-info {
  flex: 1;
}

.txn-title {
  font-size: 0.88rem;
  font-weight: 600;
}

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

.txn-right {
  text-align: right;
}

.txn-amount {
  font-size: 0.9rem;
  font-weight: 700;
}

.txn-amount.positive {
  color: var(--green);
}

.txn-amount.negative {
  color: var(--red);
}

.txn-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  display: inline-block;
}

.txn-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
}

.txn-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--orange);
}

.txn-badge.danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--red);
}

.txn-view-all {
  padding: 0.9rem 1.4rem;
  text-align: center;
  border-top: 1px solid var(--card-border);
}

.txn-view-all a {
  font-size: 0.82rem;
  color: var(--cyan);
  font-weight: 600;
  transition: opacity 0.2s;
}

.txn-view-all a:hover {
  opacity: 0.7;
}

/* ---- Txn Filters ---- */
.txn-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.txn-filter-btn {
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  transition: all 0.2s;
}

.txn-filter-btn:hover,
.txn-filter-btn.active {
  background: rgba(0, 245, 212, 0.1);
  border-color: rgba(0, 245, 212, 0.3);
  color: var(--cyan);
}

/* ---- Wallet Page ---- */
.wallet-hero {
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.08), rgba(139, 92, 246, 0.12));
  border-color: rgba(0, 245, 212, 0.2);
  margin-bottom: 0.75rem;
  overflow: visible;
}

.wallet-hero-inner {
  position: relative;
  z-index: 2;
}

.wallet-card-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.wallet-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.wallet-balance {
  font-family: 'Orbitron', monospace;
  font-size: 3rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.wallet-cents {
  font-size: 1.4rem;
  opacity: 0.6;
}

.wallet-addr {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.wallet-actions-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.wallet-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #050505;
  transition: all 0.3s;
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.25);
}

.wallet-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(0, 245, 212, 0.4);
}

.wallet-action-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text);
  box-shadow: none;
}

.wallet-action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.wallet-sub-card {
  padding: 1.25rem;
}

.wsc-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.wsc-icon.cyan {
  background: rgba(0, 245, 212, 0.1);
  color: var(--cyan);
}

.wsc-icon.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
}

.wsc-icon.orange {
  background: rgba(245, 158, 11, 0.1);
  color: var(--orange);
}

.wsc-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.wsc-amount {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.wsc-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.wsc-bar div {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan2), var(--cyan));
}

.wsc-bar.green div {
  background: linear-gradient(90deg, #059669, var(--green));
}

.wsc-bar.orange div {
  background: linear-gradient(90deg, #d97706, var(--orange));
}

/* ---- Network Page ---- */
.network-hero {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.05), rgba(139, 92, 246, 0.05));
}

.nh-stat {
  text-align: center;
}

.nh-val {
  font-family: 'Orbitron', monospace;
  font-size: 1.6rem;
  font-weight: 900;
}

.nh-val.cyan {
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(0, 245, 212, 0.5);
}

.nh-val.green {
  color: var(--green);
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.nh-val.purple {
  color: var(--purple);
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.nh-val.orange {
  color: var(--orange);
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.nh-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nh-divider {
  width: 1px;
  height: 48px;
  background: var(--card-border);
}

/* ---- Network Tree ---- */
.network-tree-card {
  padding: 2rem;
  overflow-x: auto;
}

.tree-root {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tree-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.tree-node.root-node .node-avatar {
  width: 64px;
  height: 64px;
}

.node-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 14px rgba(0, 245, 212, 0.35);
  overflow: hidden;
}

.node-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.node-avatar.sm {
  width: 44px;
  height: 44px;
}

.node-avatar.xs {
  width: 36px;
  height: 36px;
  border-color: rgba(0, 245, 212, 0.4);
  box-shadow: none;
}

.node-name {
  font-size: 0.78rem;
  font-weight: 600;
}

.node-rank {
  font-size: 0.65rem;
  padding: 0.1rem 0.5rem;
  border-radius: 50px;
}

.node-rank {
  background: rgba(0, 245, 212, 0.1);
  color: var(--cyan);
}

.node-rank.gold {
  background: rgba(245, 158, 11, 0.1);
  color: var(--orange);
}

.node-rank.silver {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

.node-rank.bronze {
  background: rgba(180, 83, 9, 0.1);
  color: #d97706;
}

.node-count {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.tree-connector {
  width: 2px;
  height: 30px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  margin: 0.5rem 0;
}

.tree-level {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  position: relative;
}

.tree-level::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 212, 0.4), rgba(139, 92, 246, 0.4), transparent);
}

.tree-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 16px;
}

.branch-children {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.branch-children .tree-node.sm {
  gap: 0.25rem;
}

/* Leaderboard */
.leaderboard-list {}

.lb-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid var(--card-border);
  transition: background 0.2s;
}

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

.lb-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.lb-rank {
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  width: 28px;
  text-align: center;
}

.lb-rank.top1 {
  color: var(--orange);
}

.lb-rank.top2 {
  color: #94a3b8;
}

.lb-rank.top3 {
  color: #d97706;
}

.lb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.lb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-info {
  flex: 1;
}

.lb-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.lb-team {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.lb-earnings {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green);
}

/* ---- Packages ---- */
.pkg-card {
  text-align: center;
  padding: 1.5rem;
  height: 100%;
  transition: all 0.3s;
  position: relative;
}

.pkg-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 245, 212, 0.1);
}

.pkg-card.featured {
  border-color: rgba(0, 245, 212, 0.3);
  background: rgba(0, 245, 212, 0.05);
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.1);
}

.pkg-featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #050505;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.85rem;
  border-radius: 50px;
  white-space: nowrap;
}

.pkg-tier {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.pkg-tier.starter {
  color: #94a3b8;
}

.pkg-tier.silver {
  color: #94a3b8;
}

.pkg-tier.gold {
  color: var(--orange);
}

.pkg-tier.diamond {
  color: var(--cyan);
}

.pkg-price {
  font-family: 'Orbitron', monospace;
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
}

.pkg-roi {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.pkg-roi span {
  color: var(--green);
  font-weight: 700;
}

.pkg-features {
  list-style: none;
  text-align: left;
  margin-bottom: 0;
}

.pkg-features li {
  font-size: 0.8rem;
  padding: 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pkg-features li:last-child {
  border-bottom: none;
}

.pkg-features .bi-check-circle-fill {
  color: var(--green);
}

.pkg-features .bi-x-circle-fill.off {
  color: rgba(255, 255, 255, 0.2);
}

/* ---- Analytics ---- */
.chart-card {
  padding: 1.4rem;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.chart-period {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  height: 180px;
  padding-bottom: 0.5rem;
}

.bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  justify-content: flex-end;
}

.bar {
  width: 100%;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(to top, var(--purple), var(--cyan));
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.2);
  transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.bar:hover {
  filter: brightness(1.2);
}

.bar-label {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.bar-val {
  font-size: 0.68rem;
  color: var(--cyan);
  font-weight: 600;
}

.donut-chart-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin: 0.75rem auto;
  width: 180px;
  height: 180px;
}

#donutChart {
  position: absolute;
}

.donut-center {
  text-align: center;
  pointer-events: none;
}

.donut-total {
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--cyan);
}

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

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  color: var(--text-muted);
}

.legend-val {
  font-weight: 600;
}

.growth-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


.growth-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.growth-name {
  font-size: 0.8rem;
  font-weight: 600;
}

.growth-pct {
  font-size: 0.78rem;
  color: var(--green);
  font-weight: 700;
}

.growth-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.growth-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
}

.growth-bar-fill {
  height: 100%;
  border-radius: 6px;
}

/* ---- Settings ---- */
.settings-card {
  margin-bottom: 1rem;
}

.settings-avatar-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.settings-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;

}

.settings-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.settings-section-title {
  font-family: 'Orbitron', monospace;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.85rem;
}

.settings-toggle-row:last-child {
  border-bottom: none;
}

/* Neon Toggle */
.neon-toggle {
  width: 44px;
  height: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
}

.neon-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.3s;
}

.neon-toggle.active {
  background: rgba(0, 245, 212, 0.15);
  border-color: rgba(0, 245, 212, 0.4);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.2);
}

.neon-toggle.active::after {
  left: calc(100% - 19px);
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

/* Neon Input */
.form-group-neon {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group-neon label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.neon-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  outline: none;
  width: 100%;
  transition: all 0.25s;
  appearance: none;
}

.neon-input:focus {
  border-color: rgba(0, 245, 212, 0.4);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.1);
}

.neon-input[readonly] {
  color: var(--text-muted);
  cursor: default;
}

select.neon-input option {
  background: #000;
}

.copy-input-wrap {
  display: flex;
  gap: 0.5rem;
}

.copy-btn {
  padding: 0 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.2);
  color: var(--cyan);
  font-size: 1rem;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: rgba(0, 245, 212, 0.2);
}

/* ---- Modals ---- */

.neon-modal-overlay.show {
  display: flex;
}

.neon-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  z-index: 500; display: none;
  align-items: flex-start;      /* was: center */
  justify-content: center;
  overflow-y: auto;             /* add */
  padding: 5rem 1rem;           /* was: 1rem */
}
.neon-modal {
  width: 100%; max-width: 420px;
  margin: auto;                 /* add — keeps it centered when it fits */
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(30px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.neon-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.neon-modal-header button {
  color: var(--text-muted);
  font-size: 1rem;
  transition: color 0.2s;
}

.neon-modal-header button:hover {
  color: var(--red);
}

.modal-balance-disp {
  background: rgba(0, 245, 212, 0.06);
  border: 1px solid rgba(0, 245, 212, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.modal-balance-disp strong {
  color: var(--cyan);
}

/* Invite Modal */
.invite-qr {
  text-align: center;
  padding: 1rem 0;
}

.project-logo-wrap {
  width: 100px;
  height: 100px;
  margin: 0 auto 15px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 25px rgba(124, 108, 240, 0.25);
  overflow: hidden;
}

.project-logo {
  width: 75px;
  height: 75px;
  object-fit: contain;
}

.invite-ref-code {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.invite-ref-code strong {
  color: var(--cyan);
  font-family: 'Orbitron', monospace;
}

.share-btns {
  display: flex;
  gap: 0.5rem;
}

.share-btn {
  flex: 1;
  padding: 0.55rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.share-btn.whatsapp {
  background: rgba(37, 211, 102, 0.1);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.2);
}

.share-btn.telegram {
  background: rgba(0, 136, 204, 0.1);
  color: #0088cc;
  border: 1px solid rgba(0, 136, 204, 0.2);
}

.share-btn.twitter {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--card-border);
}

.share-btn:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

/* ---- Toast ---- */
.neon-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.3);
  backdrop-filter: blur(20px);
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: 50px;
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.2);
  z-index: 1000;
  opacity: 0;
  transition: all 0.35s;
  pointer-events: none;
  white-space: nowrap;
}

.neon-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Fade In Animation ---- */
.fade-in {
  animation: fadeUp 0.5s ease both;
}

.fade-in:nth-child(2) {
  animation-delay: 0.08s;
}

.fade-in:nth-child(3) {
  animation-delay: 0.16s;
}

.fade-in:nth-child(4) {
  animation-delay: 0.24s;
}

.fade-in:nth-child(5) {
  animation-delay: 0.32s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    width: min(86vw, 280px);
    padding-bottom: 0rem;
    z-index: 101;
  }

  .sidebar-rank-badge {
    padding: 0.7rem 0.75rem;
    gap: 0.6rem;
    margin: 0 0.6rem 0.5rem;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .rank-orb {
    width: 28px;
    height: 28px;
  }

  .sidebar-nav {
    padding-bottom: 1rem;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.6);
  }

  .sidebar-nav {
    padding-bottom: 1.5rem;
  }

  .sidebar-toggle {
    display: flex;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .content-area {
    padding-bottom: 80px;
  }

  .welcome-card {
    flex-direction: column;
  }

  .welcome-right {
    width: 100%;
  }

  .total-earnings-card {
    text-align: left;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
  }

  .te-amount {
    font-size: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .sidebar-rank-badge {
    margin: 0 0.6rem 0.6rem;
    padding: 0.65rem 0.7rem;
  }

  .content-area {
    padding: 1rem;
    padding-bottom: 5rem;
  }

  .topbar {
    padding: 0 1rem;
  }

  .wallet-balance {
    font-size: 2.2rem;
  }

  .tree-level {
    gap: 1rem;
  }

  .pkg-card {
    padding: 1.25rem;
  }

  .pkg-price {
    font-size: 1.8rem;
  }

  .neon-toast {
    bottom: 90px;
  }

  .notif-panel {
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
  }

  .modal-fullscreen-sm-down .modal-content {
    min-height: 100vh;
    max-height: 100vh;
  }

  .modal-fullscreen-sm-down .modal-body {
    max-height: calc(100vh - 170px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-fullscreen-sm-down .modal-header,
  .modal-fullscreen-sm-down .modal-footer {
    z-index: 2;
  }

}

/* Sidebar overlay on mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.sidebar-overlay.show {
  display: block;
}


/* ---- Register Page Distinct Layout ---- */
.register-panel {
  width: min(100%, 520px);
  /* Compact centered card */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: rgba(10, 11, 18, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 245, 212, 0.05);
  margin: auto;
}

.register-header h2 {
  font-family: 'Orbitron', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
}

.register-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Icon adjustment for centered header */
.register-header .logo-icon {
  font-size: 1.8rem;
  color: var(--cyan);
  filter: drop-shadow(0 0 8px rgba(0, 245, 212, 0.5));
}

/* Responsive tuning for small mobile screens */
@media (max-width: 540px) {
  .register-panel .form-row {
    grid-template-columns: 1fr;
    /* Stack sponsor inputs vertically on small screens */
  }
}

/* ---- Success Page Layout ---- */
.success-panel {
  width: min(100%, 520px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: rgba(10, 11, 18, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.25);
  /* Subtle Green border */
  border-radius: var(--radius);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 50px rgba(16, 185, 129, 0.1);
  margin: auto;
}

.success-icon-wrap {
  font-size: 3.5rem;
  color: var(--green);
  filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.6));
  margin-bottom: 0.5rem;
}

.success-header h2 {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.success-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---- Credentials Box ---- */
.credentials-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cred-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.cred-row:last-child {
  border-bottom: none;
}

.cred-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cred-value {
  font-weight: 600;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
}

/* Accent Colors */
.text-cyan {
  color: var(--cyan) !important;
}

.text-purple {
  color: var(--purple) !important;
}

.text-glow {
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 245, 212, 0.6);
  font-family: 'Orbitron', monospace;
}

/* Copy Button */
.btn-copy {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.btn-copy:hover {
  color: var(--cyan);
}

/* Secondary Cyber Button */
.btn-outline-cyber {
  padding: 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.btn-outline-cyber:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--cyan);
  color: var(--cyan);
}

.wallet-box {
  margin-top: 12px;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(0, 255, 255, .15);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 18px rgba(0, 255, 255, .08);
}

.wallet-box i {
  color: #18e5d8;
  font-size: 1rem;
}

.wallet-text {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #dffcff;
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .3px;
}

.wallet-copy-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #16f2d1, #6b5cff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .3s;
  box-shadow: 0 0 15px rgba(22, 242, 209, .35);
}

.wallet-copy-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 22px rgba(22, 242, 209, .55);
}

.wallet-copy-btn:active {
  transform: scale(.95);
}

/* ---- Package Purchase Page ---- */
.purchase-card {
  padding: 1.75rem;
}

.purchase-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.purchase-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--bg);
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.3);
  flex-shrink: 0;
}

.purchase-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
}

.purchase-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.purchase-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


/* Modern Dark Glassmorphism Pagination Styling */
.glass-pagination .page-link {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  margin: 0 3px;
  border-radius: 8px !important;
  padding: 6px 12px;
  font-size: 0.85rem;
  transition: all 0.2s ease-in-out;
}

.glass-pagination .page-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.glass-pagination .page-item.active .page-link {
  background: #22c55e;
  /* Theme Accent Green */
  border-color: #22c55e;
  color: #000000;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.glass-pagination .page-item.disabled .page-link {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
  color: #52525b;
}

.glass-pagination .page-item.dots .page-link {
  background: transparent;
  border: none;
  color: #71717a;
}

/* ---- Support Page ---- */
.txn-card-head {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--card-border);
}

.txn-msg {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.txn-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.txn-icon.ticket {
  background: rgba(0, 245, 212, 0.12);
  color: var(--cyan);
}

.txn-icon.reply {
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple);
}

.txn-badge.info {
  background: rgba(0, 245, 212, 0.15);
  color: var(--cyan);
}

.txn-badge.accent {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple);
}

.priority-chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  margin-left: 0.4rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

.priority-chip.danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--red);
}

.priority-chip.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--orange);
}

.priority-chip.info {
  background: rgba(0, 245, 212, 0.15);
  color: var(--cyan);
}

.priority-chip.muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.admin-reply-box {
  font-size: 0.8rem;
  color: var(--text);
  margin-top: 0.45rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
}

/* Tabs */
.glass-tabs {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.glass-tabs .nav-link {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.glass-tabs .nav-link:hover {
  color: var(--text);
  border-color: rgba(0, 245, 212, 0.3);
}

.glass-tabs .nav-link.active {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: var(--bg);
  border-color: transparent;
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.25);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}