/* ==========================================================================
   BITCHAIN PRO X — ULTRA-LUXURY USER DASHBOARD SYSTEM
   Exact recreation of the reference design:
   - Deep obsidian background (#030108) & dark navy surfaces (#0a0518)
   - Left Sidebar with active state glow & "Grow Together Earn Together" Web3 card
   - Top Profile Card & Current Package Card
   - 4 Financial Overview Cards with category sparklines
   - Income Summary SVG Donut Chart + Category Breakdown
   - Dynamic Referral Link generator with 1-click copy
   - Recent Activity Table (desktop) / Stacked Cards (mobile)
   - Strict Category Color System: Direct=Purple, Team=Blue, Non-Working=Green, Reward=Gold
   ========================================================================== */

/* Page Layout Structure */
.dash-page-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: #030108;
  color: #ffffff;
  position: relative;
  overflow-x: hidden;
  max-width: 100vw;
}

/* --------------------------------------------------------------------------
   1. LEFT SIDEBAR NAVIGATION
   -------------------------------------------------------------------------- */
.dash-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: rgba(10, 5, 24, 0.95);
  border-right: 1px solid rgba(199, 125, 255, 0.15);
  backdrop-filter: blur(25px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-top-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 0 8px;
}

.sidebar-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(199, 125, 255, 0.6));
}

.sidebar-brand-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
}

.sidebar-brand-text span {
  color: var(--primary-light);
}

.sidebar-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.25s ease;
  position: relative;
}

.sidebar-menu-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  transition: stroke 0.25s ease;
}

.sidebar-menu-item:hover {
  background: rgba(157, 78, 221, 0.15);
  color: #ffffff;
}

.sidebar-menu-item:hover svg {
  stroke: var(--primary-light);
}

/* Active Sidebar Item */
.sidebar-menu-item.active {
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.4) 0%, rgba(199, 125, 255, 0.25) 100%);
  border: 1px solid rgba(199, 125, 255, 0.4);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(157, 78, 221, 0.25);
}

.sidebar-menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--primary-light);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--primary-light);
}

.sidebar-menu-item.active svg {
  stroke: var(--primary-light);
}

/* Sidebar Lower Grow Card */
.sidebar-grow-card {
  background: radial-gradient(circle at 50% 0%, rgba(157, 78, 221, 0.25) 0%, rgba(10, 5, 24, 0.9) 100%);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.sidebar-grow-card::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: radial-gradient(circle, rgba(199, 125, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.cube-emblem-wrap {
  width: 50px;
  height: 50px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, #7b2cbf 0%, #c77dff 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(199, 125, 255, 0.5);
  font-size: 1.4rem;
}

.grow-card-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  text-transform: uppercase;
}

.grow-card-subtitle {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--primary-light);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   2. MAIN DASHBOARD CONTENT AREA
   -------------------------------------------------------------------------- */
.dash-main-content {
  flex: 1;
  min-width: 0;
  padding: 24px 32px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Top Dashboard Header Navigation Bar */
.dash-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(199, 125, 255, 0.12);
}

.dash-page-title h1 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
}

.dash-page-title p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

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

.dash-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(15, 7, 39, 0.8);
  border: 1px solid var(--purple-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
}

.dash-icon-btn:hover {
  border-color: var(--primary-light);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(199, 125, 255, 0.3);
}

.noti-badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: #ff4d6d;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   3. USER PROFILE & CURRENT PACKAGE GRID
   -------------------------------------------------------------------------- */
.profile-package-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr);
  gap: 24px;
}

/* User Profile Card */
.profile-overview-card {
  background: rgba(15, 7, 39, 0.85);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(157, 78, 221, 0.2);
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  overflow: hidden;
}

.profile-overview-card::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 80%;
  height: 180%;
  background: radial-gradient(circle, rgba(199, 125, 255, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.avatar-ring-frame {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.avatar-pulse-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7b2cbf 0%, #c77dff 100%);
  opacity: 0.6;
  filter: blur(8px);
  animation: avatarGlowPulse 3s infinite alternate;
}

@keyframes avatarGlowPulse {
  0% { opacity: 0.4; transform: scale(0.98); }
  100% { opacity: 0.8; transform: scale(1.04); }
}

.avatar-inner-circle {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #240046 0%, #7b2cbf 100%);
  border: 3px solid var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(199, 125, 255, 0.5);
  overflow: hidden;
}

/* ── Camera overlay for avatar upload ── */
.avatar-camera-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s ease;
  z-index: 5;
  color: #fff;
  pointer-events: none;
}

.avatar-ring-frame:hover .avatar-camera-overlay {
  opacity: 1;
}

.avatar-ring-frame:hover {
  transform: scale(1.04);
  transition: transform 0.2s ease;
}

/* ── Avatar ring frame transition ── */
.avatar-ring-frame {
  transition: transform 0.2s ease;
}


.profile-details-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-name-text {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

/* NO verification tick badge! Clean rank badge */
.rank-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: rgba(199, 125, 255, 0.15);
  border: 1px solid var(--purple-border-focus);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-light);
  box-shadow: 0 0 12px rgba(199, 125, 255, 0.3);
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 20px;
}

.meta-field-box {
  display: flex;
  flex-direction: column;
}

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

.meta-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
}

/* Premium Rank Upgrade Card */
.upgrade-card-wrapper {
  background: linear-gradient(145deg, rgba(15, 7, 39, 0.9), rgba(6, 2, 20, 0.95));
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(157, 78, 221, 0.15);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.upgrade-card-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(199, 125, 255, 0.5), transparent);
}

.upgrade-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upgrade-side.next-side {
  text-align: right;
  align-items: flex-end;
}

.upgrade-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.upgrade-package-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.upgrade-side.next-side .upgrade-package-info {
  flex-direction: row-reverse;
}

.upgrade-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(123,44,191,0.2) 0%, rgba(199,125,255,0.1) 100%);
  border: 1px solid rgba(199, 125, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(199, 125, 255, 0.2);
}

.upgrade-icon.next-icon {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.2) 0%, rgba(255, 229, 153, 0.1) 100%);
  border-color: rgba(255, 209, 102, 0.4);
  box-shadow: 0 0 20px rgba(255, 209, 102, 0.2);
}

.upgrade-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 4px;
}

.upgrade-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e0aaff;
}

.upgrade-price.next-price {
  color: #ffe599;
}

.upgrade-arrow-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.upgrade-arrow-line {
  width: 30px;
  height: 1px;
  background: rgba(199, 125, 255, 0.3);
  border-radius: 2px;
}

.upgrade-arrow-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(199, 125, 255, 0.1);
  border: 1px solid rgba(199, 125, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #c77dff;
  box-shadow: 0 0 15px rgba(199, 125, 255, 0.3);
  animation: arrowPulse 2s infinite;
}

@keyframes arrowPulse {
  0% { box-shadow: 0 0 10px rgba(199, 125, 255, 0.2); transform: scale(1); }
  50% { box-shadow: 0 0 25px rgba(199, 125, 255, 0.5); transform: scale(1.05); }
  100% { box-shadow: 0 0 10px rgba(199, 125, 255, 0.2); transform: scale(1); }
}

.upgrade-action-bottom {
  grid-column: 1 / -1;
  margin-top: 10px;
}

.upgrade-now-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #7b2cbf 0%, #9d4edd 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px rgba(123, 44, 191, 0.4);
}

.upgrade-now-btn:hover {
  background: linear-gradient(135deg, #8b31d8 0%, #c77dff 100%);
  box-shadow: 0 12px 30px rgba(199, 125, 255, 0.6);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   4. FINANCIAL OVERVIEW CARDS (4 CARDS GRID)
   -------------------------------------------------------------------------- */
.financial-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.fin-card {
  background: rgba(15, 7, 39, 0.85);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-md);
  padding: 22px;
  backdrop-filter: blur(15px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.3s ease;
}

.fin-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(157, 78, 221, 0.3);
}

.fin-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fin-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Specific Category Card Icons & Colors */

/* Available Balance — Full Purple Theme */
.fin-card.available {
  border-color: rgba(199, 125, 255, 0.6);
  background: linear-gradient(135deg, rgba(26, 8, 60, 0.95) 0%, rgba(15, 7, 39, 0.95) 100%);
  box-shadow: 0 0 30px rgba(157, 78, 221, 0.35), inset 0 0 40px rgba(199, 125, 255, 0.06);
  animation: purpleCardPulse 3s ease-in-out infinite alternate;
}

@keyframes purpleCardPulse {
  0% { box-shadow: 0 0 20px rgba(157, 78, 221, 0.3), inset 0 0 30px rgba(199, 125, 255, 0.05); border-color: rgba(199, 125, 255, 0.45); }
  100% { box-shadow: 0 0 45px rgba(199, 125, 255, 0.6), inset 0 0 50px rgba(199, 125, 255, 0.12); border-color: rgba(199, 125, 255, 0.9); }
}

.fin-card.available:hover {
  border-color: #e0aaff;
  box-shadow: 0 0 55px rgba(199, 125, 255, 0.75), 0 12px 30px rgba(157, 78, 221, 0.4);
}

.fin-card.available .fin-card-value {
  color: #e0aaff;
  text-shadow: 0 0 20px rgba(199, 125, 255, 0.8);
}

.fin-card.available .fin-card-title {
  color: rgba(199, 125, 255, 0.75);
  text-shadow: 0 0 10px rgba(199, 125, 255, 0.4);
}

.fin-card.available .fin-icon-wrap {
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.5) 0%, rgba(199, 125, 255, 0.3) 100%);
  border: 1px solid rgba(199, 125, 255, 0.7);
  color: #e0aaff;
  box-shadow: 0 0 18px rgba(199, 125, 255, 0.5);
}

/* Total Income — Full Sky Blue Theme */
.fin-card.total-income {
  border-color: rgba(58, 134, 255, 0.6);
  background: linear-gradient(135deg, rgba(5, 15, 45, 0.95) 0%, rgba(15, 7, 39, 0.95) 100%);
  box-shadow: 0 0 30px rgba(58, 134, 255, 0.3), inset 0 0 40px rgba(58, 134, 255, 0.05);
  animation: blueCardPulse 3s ease-in-out infinite alternate;
}

@keyframes blueCardPulse {
  0%   { box-shadow: 0 0 20px rgba(58, 134, 255, 0.25), inset 0 0 30px rgba(58, 134, 255, 0.04); border-color: rgba(58, 134, 255, 0.4); }
  100% { box-shadow: 0 0 45px rgba(116, 179, 255, 0.65), inset 0 0 50px rgba(58, 134, 255, 0.12); border-color: rgba(116, 179, 255, 0.95); }
}

.fin-card.total-income:hover {
  border-color: #74b3ff;
  box-shadow: 0 0 55px rgba(116, 179, 255, 0.7), 0 12px 30px rgba(58, 134, 255, 0.4);
}

.fin-card.total-income .fin-card-value {
  color: #74b3ff;
  text-shadow: 0 0 20px rgba(58, 134, 255, 0.8);
}

.fin-card.total-income .fin-card-title {
  color: rgba(116, 179, 255, 0.75);
  text-shadow: 0 0 10px rgba(58, 134, 255, 0.4);
}

.fin-card.total-income .fin-icon-wrap {
  background: linear-gradient(135deg, rgba(20, 60, 160, 0.55) 0%, rgba(58, 134, 255, 0.25) 100%);
  border: 1px solid rgba(116, 179, 255, 0.7);
  box-shadow: 0 0 18px rgba(58, 134, 255, 0.5);
}

/* Today's Income — Full Gold Theme */
.fin-card.today-income {
  border-color: rgba(255, 209, 102, 0.6);
  background: linear-gradient(135deg, rgba(45, 30, 5, 0.95) 0%, rgba(15, 7, 39, 0.95) 100%);
  box-shadow: 0 0 30px rgba(255, 209, 102, 0.3), inset 0 0 40px rgba(255, 209, 102, 0.05);
  animation: goldCardPulse 3s ease-in-out infinite alternate;
}

@keyframes goldCardPulse {
  0%   { box-shadow: 0 0 20px rgba(255, 209, 102, 0.25), inset 0 0 30px rgba(255, 209, 102, 0.04); border-color: rgba(255, 209, 102, 0.4); }
  100% { box-shadow: 0 0 45px rgba(255, 229, 153, 0.6), inset 0 0 50px rgba(255, 209, 102, 0.12); border-color: rgba(255, 229, 153, 0.9); }
}

.fin-card.today-income:hover {
  border-color: #ffe599;
  box-shadow: 0 0 55px rgba(255, 229, 153, 0.7), 0 12px 30px rgba(255, 209, 102, 0.4);
}

.fin-card.today-income .fin-card-value {
  color: #ffe599;
  text-shadow: 0 0 20px rgba(255, 209, 102, 0.8);
}

.fin-card.today-income .fin-card-title {
  color: rgba(255, 209, 102, 0.75);
  text-shadow: 0 0 10px rgba(255, 209, 102, 0.4);
}

.fin-card.today-income .fin-icon-wrap {
  background: linear-gradient(135deg, rgba(180, 120, 0, 0.5) 0%, rgba(255, 209, 102, 0.25) 100%);
  border: 1px solid rgba(255, 209, 102, 0.7);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.5);
}

/* Total Team — Full Green Theme */
.fin-card.total-team {
  border-color: rgba(0, 245, 212, 0.6);
  background: linear-gradient(135deg, rgba(0, 30, 25, 0.95) 0%, rgba(15, 7, 39, 0.95) 100%);
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.28), inset 0 0 40px rgba(0, 245, 212, 0.05);
  animation: greenCardPulse 3s ease-in-out infinite alternate;
}

@keyframes greenCardPulse {
  0%   { box-shadow: 0 0 20px rgba(0, 245, 212, 0.22), inset 0 0 30px rgba(0, 245, 212, 0.04); border-color: rgba(0, 245, 212, 0.4); }
  100% { box-shadow: 0 0 45px rgba(0, 245, 212, 0.65), inset 0 0 50px rgba(0, 245, 212, 0.12); border-color: rgba(0, 245, 212, 0.95); }
}

.fin-card.total-team:hover {
  border-color: #00f5d4;
  box-shadow: 0 0 55px rgba(0, 245, 212, 0.7), 0 12px 30px rgba(0, 245, 212, 0.35);
}

.fin-card.total-team .fin-card-value {
  color: #00f5d4;
  text-shadow: 0 0 20px rgba(0, 245, 212, 0.8);
}

.fin-card.total-team .fin-card-title {
  color: rgba(0, 245, 212, 0.75);
  text-shadow: 0 0 10px rgba(0, 245, 212, 0.4);
}

.fin-card.total-team .fin-icon-wrap {
  background: linear-gradient(135deg, rgba(0, 100, 85, 0.55) 0%, rgba(0, 245, 212, 0.2) 100%);
  border: 1px solid rgba(0, 245, 212, 0.7);
  box-shadow: 0 0 18px rgba(0, 245, 212, 0.45);
}

.fin-card-title {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
  position: relative;
  z-index: 10;
}

.fin-card-value {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  position: relative;
  z-index: 10;
}

.fin-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.trend-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

.trend-indicator-badge.green { color: #00f5d4; }
.trend-indicator-badge.purple { color: #c77dff; }
.trend-indicator-badge.blue { color: #3a86ff; }
.trend-indicator-badge.gold { color: #ffd166; }

.sparkline-svg {
  width: 80px;
  height: 30px;
}

/* --------------------------------------------------------------------------
   5. INCOME SUMMARY SECTION (DONUT CHART & BREAKDOWN)
   -------------------------------------------------------------------------- */
.income-summary-card {
  background: rgba(15, 7, 39, 0.85);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(157, 78, 221, 0.2);
}

.summary-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.summary-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
}

.summary-time-select {
  background: rgba(10, 5, 24, 0.8);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-md);
  color: #ffffff;
  padding: 6px 14px;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

.income-summary-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
}

/* Donut Chart Container */
.donut-chart-wrapper {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto;
}

.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-center-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.donut-center-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.donut-center-val {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff;
  margin: 2px 0;
}

.donut-center-sub {
  font-size: 0.75rem;
  color: #00f5d4;
  font-weight: 600;
}

/* Income Breakdown List */
.income-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.income-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(199, 125, 255, 0.12);
  border-radius: var(--radius-md);
  transition: background 0.25s ease;
}

.income-cat-item:hover {
  background: rgba(157, 78, 221, 0.1);
}

.cat-left-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

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

/* Category Specific Glowing Themes (Matching Top Cards) */

/* 1. Direct Income — Purple Theme */
.cat-item.direct {
  background: linear-gradient(135deg, rgba(26, 8, 60, 0.75) 0%, rgba(15, 7, 39, 0.85) 100%);
  border: 1px solid rgba(199, 125, 255, 0.35);
  box-shadow: 0 4px 15px rgba(157, 78, 221, 0.15);
}
.cat-item.direct:hover {
  border-color: #c77dff;
  box-shadow: 0 0 25px rgba(199, 125, 255, 0.4);
}
.cat-item.direct .cat-icon-badge {
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.5) 0%, rgba(199, 125, 255, 0.25) 100%);
  border: 1px solid rgba(199, 125, 255, 0.6);
  box-shadow: 0 0 12px rgba(199, 125, 255, 0.4);
}
.cat-item.direct .cat-amount-val { color: #e0aaff; text-shadow: 0 0 10px rgba(199, 125, 255, 0.5); }
.cat-item.direct .cat-progress-fill { background: linear-gradient(90deg, #7b2cbf 0%, #c77dff 100%); }

/* 2. Team Income — Sky Blue Theme */
.cat-item.team {
  background: linear-gradient(135deg, rgba(5, 15, 45, 0.75) 0%, rgba(15, 7, 39, 0.85) 100%);
  border: 1px solid rgba(58, 134, 255, 0.35);
  box-shadow: 0 4px 15px rgba(58, 134, 255, 0.15);
}
.cat-item.team:hover {
  border-color: #74b3ff;
  box-shadow: 0 0 25px rgba(58, 134, 255, 0.4);
}
.cat-item.team .cat-icon-badge {
  background: linear-gradient(135deg, rgba(20, 60, 160, 0.5) 0%, rgba(58, 134, 255, 0.25) 100%);
  border: 1px solid rgba(116, 179, 255, 0.6);
  box-shadow: 0 0 12px rgba(58, 134, 255, 0.4);
}
.cat-item.team .cat-amount-val { color: #74b3ff; text-shadow: 0 0 10px rgba(58, 134, 255, 0.5); }
.cat-item.team .cat-progress-fill { background: linear-gradient(90deg, #1e60d2 0%, #3a86ff 100%); }

/* 3. Non-Working Income — Green Theme */
.cat-item.non-working {
  background: linear-gradient(135deg, rgba(0, 30, 25, 0.75) 0%, rgba(15, 7, 39, 0.85) 100%);
  border: 1px solid rgba(0, 245, 212, 0.35);
  box-shadow: 0 4px 15px rgba(0, 245, 212, 0.15);
}
.cat-item.non-working:hover {
  border-color: #00f5d4;
  box-shadow: 0 0 25px rgba(0, 245, 212, 0.4);
}
.cat-item.non-working .cat-icon-badge {
  background: linear-gradient(135deg, rgba(0, 100, 85, 0.5) 0%, rgba(0, 245, 212, 0.25) 100%);
  border: 1px solid rgba(0, 245, 212, 0.6);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.4);
}
.cat-item.non-working .cat-amount-val { color: #00f5d4; text-shadow: 0 0 10px rgba(0, 245, 212, 0.5); }
.cat-item.non-working .cat-progress-fill { background: linear-gradient(90deg, #00b498 0%, #00f5d4 100%); }

/* 4. Reward Income — Gold Theme */
.cat-item.reward {
  background: linear-gradient(135deg, rgba(45, 30, 5, 0.75) 0%, rgba(15, 7, 39, 0.85) 100%);
  border: 1px solid rgba(255, 209, 102, 0.35);
  box-shadow: 0 4px 15px rgba(255, 209, 102, 0.15);
}
.cat-item.reward:hover {
  border-color: #ffe599;
  box-shadow: 0 0 25px rgba(255, 209, 102, 0.4);
}
.cat-item.reward .cat-icon-badge {
  background: linear-gradient(135deg, rgba(180, 120, 0, 0.5) 0%, rgba(255, 209, 102, 0.25) 100%);
  border: 1px solid rgba(255, 209, 102, 0.6);
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.4);
}
.cat-item.reward .cat-amount-val { color: #ffe599; text-shadow: 0 0 10px rgba(255, 209, 102, 0.5); }
.cat-item.reward .cat-progress-fill { background: linear-gradient(90deg, #d49b00 0%, #ffd166 100%); }

.cat-name-desc {
  min-width: 0;
}

.cat-name-desc h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-name-desc p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cat-right-values {
  text-align: right;
  flex-shrink: 0;
}

.cat-amount-val {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.cat-pct-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

.cat-progress-track {
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  overflow: hidden;
}

.cat-progress-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.8s ease;
}

/* Category Specific Progress Bar Fill Colors */
.cat-item.direct .cat-progress-fill { background: #9d4edd; }
.cat-item.team .cat-progress-fill { background: #3a86ff; }
.cat-item.non-working .cat-progress-fill { background: #00f5d4; }
.cat-item.reward .cat-progress-fill { background: #ffd166; }

.cat-pct-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   6. REFERRAL LINK CARD SECTION
   -------------------------------------------------------------------------- */
.referral-section-card {
  background: linear-gradient(135deg, rgba(26, 12, 58, 0.9) 0%, rgba(15, 7, 39, 0.9) 100%);
  border: 1px solid var(--purple-border-hover);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(157, 78, 221, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ref-left-block {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ref-link-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(157, 78, 221, 0.25);
  border: 1px solid var(--purple-border-focus);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary-light);
  box-shadow: 0 0 20px rgba(199, 125, 255, 0.3);
}

.ref-text-title h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 900;
  color: #ffffff;
}

.ref-text-title p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.ref-input-copy-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 550px;
}

.ref-url-input {
  width: 100%;
  height: 48px;
  background: rgba(10, 5, 24, 0.85);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-md);
  padding: 0 16px;
  color: var(--primary-light);
  font-family: monospace;
  font-size: 0.9rem;
  outline: none;
}

.btn-ref-copy {
  height: 48px;
  padding: 0 22px;
  background: linear-gradient(135deg, #7b2cbf 0%, #9d4edd 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.btn-ref-copy:hover {
  background: linear-gradient(135deg, #8b31d8 0%, #c77dff 100%);
  box-shadow: 0 0 20px rgba(199, 125, 255, 0.5);
}

/* --------------------------------------------------------------------------
   7. RECENT ACTIVITY TABLE & RESPONSIVE CARDS
   -------------------------------------------------------------------------- */
.recent-activity-card {
  background: rgba(15, 7, 39, 0.85);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(157, 78, 221, 0.2);
}

.activity-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.activity-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.activity-table th {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1.5px solid rgba(199, 125, 255, 0.15);
}

.activity-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  color: #ffffff;
}

.activity-table tr:last-child td {
  border-bottom: none;
}

.activity-row-item {
  transition: all 0.25s ease;
}

.activity-row-item:hover {
  background: rgba(157, 78, 221, 0.08);
}

.activity-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.act-title-text {
  font-weight: 800;
  color: #ffffff;
  font-size: 0.92rem;
  letter-spacing: 0.3px;
}

.act-icon-dot {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.activity-row-item:hover .act-icon-dot,
.mobile-activity-card:hover .act-icon-dot {
  transform: scale(1.08);
}

/* Category & Transaction Type Colors — Primary Theme Matched */
.act-icon-dot.deposit     { background: rgba(0, 245, 212, 0.15); border: 1px solid rgba(0, 245, 212, 0.35); color: #00f5d4; box-shadow: 0 0 12px rgba(0, 245, 212, 0.2); }
.act-icon-dot.withdrawal  { background: rgba(255, 107, 107, 0.15); border: 1px solid rgba(255, 107, 107, 0.35); color: #ff6b6b; box-shadow: 0 0 12px rgba(255, 107, 107, 0.2); }
.act-icon-dot.purchase    { background: rgba(199, 125, 255, 0.15); border: 1px solid rgba(199, 125, 255, 0.35); color: #c77dff; box-shadow: 0 0 12px rgba(199, 125, 255, 0.2); }
.act-icon-dot.reward      { background: rgba(255, 209, 102, 0.15); border: 1px solid rgba(255, 209, 102, 0.35); color: #ffd166; box-shadow: 0 0 12px rgba(255, 209, 102, 0.2); }
.act-icon-dot.direct      { background: rgba(157, 78, 221, 0.15); border: 1px solid rgba(157, 78, 221, 0.35); color: #c77dff; box-shadow: 0 0 12px rgba(157, 78, 221, 0.2); }
.act-icon-dot.team        { background: rgba(58, 134, 255, 0.15); border: 1px solid rgba(58, 134, 255, 0.35); color: #3a86ff; box-shadow: 0 0 12px rgba(58, 134, 255, 0.2); }
.act-icon-dot.non-working { background: rgba(0, 245, 212, 0.15); border: 1px solid rgba(0, 245, 212, 0.35); color: #00f5d4; box-shadow: 0 0 12px rgba(0, 245, 212, 0.2); }

/* Status Pills */
.act-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.act-status-pill.approved,
.act-status-pill.completed {
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.35);
  color: #00f5d4;
  box-shadow: 0 0 8px rgba(0, 245, 212, 0.15);
}

.act-status-pill.pending {
  background: rgba(255, 190, 11, 0.12);
  border: 1px solid rgba(255, 190, 11, 0.35);
  color: #ffbe0b;
  box-shadow: 0 0 8px rgba(255, 190, 11, 0.15);
  animation: pendingPulse 2s ease-in-out infinite alternate;
}

@keyframes pendingPulse {
  0% { opacity: 0.75; }
  100% { opacity: 1; }
}

.act-status-pill.rejected {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: #ff6b6b;
}

/* Amount Badges */
.act-amount-badge {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.act-amount-badge.deposit     { color: #00f5d4; text-shadow: 0 0 10px rgba(0, 245, 212, 0.3); }
.act-amount-badge.withdrawal  { color: #ff6b6b; text-shadow: 0 0 10px rgba(255, 107, 107, 0.3); }
.act-amount-badge.purchase    { color: #c77dff; text-shadow: 0 0 10px rgba(199, 125, 255, 0.3); }
.act-amount-badge.reward      { color: #ffd166; text-shadow: 0 0 10px rgba(255, 209, 102, 0.3); }
.act-amount-badge.direct      { color: #c77dff; text-shadow: 0 0 10px rgba(199, 125, 255, 0.3); }
.act-amount-badge.team        { color: #3a86ff; text-shadow: 0 0 10px rgba(58, 134, 255, 0.3); }
.act-amount-badge.non-working { color: #00f5d4; text-shadow: 0 0 10px rgba(0, 245, 212, 0.3); }

/* Mobile activity list - hidden by default on desktop */
.mobile-activity-list {
  display: none;
}

/* Empty Activity State */
.empty-state-box {
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}


.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(199, 125, 255, 0.1);
  border: 1px solid var(--purple-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--text-muted);
}

.empty-state-text {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   8. LOWER BRANDED WEB3 BANNER
   -------------------------------------------------------------------------- */
.grow-earn-banner {
  background: radial-gradient(circle at 50% 50%, rgba(123, 44, 191, 0.25) 0%, rgba(10, 5, 24, 0.9) 100%);
  border: 1px solid var(--purple-border-hover);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.banner-content-inner {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}

.banner-motto-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff;
  margin-bottom: 8px;
}

.banner-motto-title span {
  color: var(--primary-light);
}

.banner-subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   9. DASHBOARD SKELETON LOADERS
   -------------------------------------------------------------------------- */
.skeleton-pulse {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
  border-radius: 6px;
  display: inline-block;
}

@keyframes skeletonLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE BREAKPOINTS (MOBILE & TABLET)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .dash-page-wrapper {
    flex-direction: column;
  }

  .dash-sidebar {
    display: none; /* Hide redundant duplicate sidebar logo bar on mobile */
  }

  .sidebar-grow-card {
    display: none;
  }

  .profile-package-grid {
    grid-template-columns: 1fr;
  }

  .financial-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .income-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Hide profile avatar icon in top navbar on mobile — profile is shown in the dashboard card */
  .navbar .nav-actions {
    display: none !important;
  }

  .dash-main-content {
    display: flex;
    flex-direction: column;
  }

  .dash-main-content > * {
    order: 10;
  }

  .dash-header-bar {
    order: 1;
    margin-bottom: 4px;
  }

  #dashErrorAlertWrap {
    order: 2;
  }

  .profile-package-grid {
    display: contents; /* Allows child cards to re-order independently on mobile */
  }

  .profile-overview-card {
    order: 3;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 18px;
    gap: 18px;
  }

  .financial-overview-grid {
    order: 4;
  }

  .upgrade-card-wrapper {
    order: 5;
  }

  #dashWalletSection {
    order: 6;
  }

  .income-summary-card {
    order: 7;
  }

  .referral-section-card {
    order: 8;
  }

  .recent-activity-card {
    order: 9;
  }

  .grow-earn-banner {
    order: 10;
  }

  .dash-footer {
    order: 10;
  }

  .desktop-only-element {
    display: none !important;
  }

  .mobile-greeting-pill {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(94, 21, 230, 0.4) 0%, rgba(33, 10, 94, 0.6) 100%);
    border: 1px solid rgba(138, 43, 226, 0.5);
    border-radius: 50px;
    padding: 8px 16px;
    width: fit-content;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(94, 21, 230, 0.3);
  }

  .greeting-icon {
    font-size: 1.2rem;
    margin-right: 8px;
    animation: wave 2s infinite;
    transform-origin: 70% 70%;
  }

  @keyframes wave {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
  }

  .greeting-text {
    font-size: 0.85rem;
    color: #e0e0e0;
    font-weight: 500;
  }

  .greeting-text span {
    font-weight: 700;
    color: #fff;
  }

  /* Profile Card Neon Overhaul with Premium Animations */
  .profile-overview-card {
    order: 3;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 15px 20px;
    gap: 15px;
    border-radius: 16px;
    border: none;
    background: 
      radial-gradient(circle at 50% 50%, rgba(60, 20, 130, 0.8) 0%, rgba(15, 7, 39, 0.95) 70%),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 400'%3E%3Cpath d='M0 200 Q 200 100 400 200 T 800 200 L 800 400 L 0 400 Z' fill='none' stroke='rgba(199, 125, 255, 0.15)' stroke-width='2'/%3E%3Cpath d='M0 250 Q 200 150 400 250 T 800 250 L 800 400 L 0 400 Z' fill='none' stroke='rgba(0, 245, 212, 0.1)' stroke-width='4' filter='blur(3px)'/%3E%3Cpath d='M0 150 Q 200 300 400 150 T 800 150 L 800 400 L 0 400 Z' fill='none' stroke='rgba(138, 43, 226, 0.2)' stroke-width='6' filter='blur(5px)'/%3E%3C/svg%3E");
    background-size: 200% 200%;
    background-position: 0% 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 20px rgba(138, 43, 226, 0.2);
    animation: premiumWaveShift 12s ease-in-out infinite alternate, premiumCardPulse 4s infinite alternate;
  }
  
  @keyframes premiumWaveShift {
    0% { background-position: 0% 100%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 0%; }
  }

  @keyframes premiumCardPulse {
    0% { box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 20px rgba(138, 43, 226, 0.2); }
    100% { box-shadow: 0 15px 40px rgba(138, 43, 226, 0.5), inset 0 0 50px rgba(0, 245, 212, 0.3); }
  }

  /* Donut Chart Premium Mobile Animations */
  .income-summary-card {
    background: rgba(15, 7, 39, 0.85);
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
  }

  /* Add deep space background with pulsing stars to income card */
  .income-summary-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; right: -50%; bottom: -50%;
    background: 
      radial-gradient(circle at 50% 30%, rgba(94, 21, 230, 0.4) 0%, transparent 40%),
      radial-gradient(1px 1px at 20% 30%, #fff 100%, transparent),
      radial-gradient(1px 1px at 40% 70%, #fff 100%, transparent),
      radial-gradient(2px 2px at 80% 40%, #00f5d4 100%, transparent),
      radial-gradient(2px 2px at 60% 10%, #c77dff 100%, transparent),
      radial-gradient(1px 1px at 90% 80%, #fff 100%, transparent);
    background-size: 100% 100%, 200px 200px, 150px 150px, 250px 250px, 300px 300px, 180px 180px;
    pointer-events: none;
    z-index: 0;
    animation: rotateStars 60s linear infinite, starPulse 3s ease-in-out infinite alternate;
  }
  
  @keyframes rotateStars {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  @keyframes starPulse {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
  }

  .donut-svg {
    width: 220px;
    height: 220px;
    filter: drop-shadow(0 0 15px rgba(138, 43, 226, 0.8)) drop-shadow(0 0 30px rgba(0, 245, 212, 0.4));
    animation: donutGlowPulse 2.5s infinite alternate;
  }
  
  @keyframes donutGlowPulse {
    0% { filter: drop-shadow(0 0 15px rgba(138, 43, 226, 0.6)) drop-shadow(0 0 20px rgba(0, 245, 212, 0.2)); transform: scale(1); }
    100% { filter: drop-shadow(0 0 25px rgba(138, 43, 226, 1)) drop-shadow(0 0 45px rgba(0, 245, 212, 0.6)); transform: scale(1.02); }
  }

  .avatar-ring-frame {
    width: 110px;
    height: 110px;
    background: conic-gradient(from 0deg, #ff007f, #7b2cbf, #00f5d4, #ff007f);
    padding: 4px;
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(0, 245, 212, 0.4), 0 0 25px rgba(255, 0, 127, 0.4);
    animation: rotateRing 4s linear infinite;
  }
  
  @keyframes rotateRing {
    100% { transform: rotate(360deg); }
  }

  .avatar-inner-circle {
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    /* Reverse rotation to keep avatar upright */
    animation: rotateRingRev 4s linear infinite;
  }
  
  @keyframes rotateRingRev {
    100% { transform: rotate(-360deg); }
  }

  .profile-title-row {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
  }

  .rank-badge-pill {
    display: inline-flex;
    margin-top: 2px;
  }

  /* Inline Meta Stats to match Reference Image 2 */
  .profile-meta-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    margin-top: 15px;
    background: rgba(15, 7, 39, 0.5); /* Dark bar background */
    border-radius: 12px;
    padding: 10px 4px;
    border: none;
    gap: 4px;
  }

  .meta-field-box {
    background: transparent;
    border: none;
    padding: 0 2px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 3px;
    box-shadow: none;
    flex: 1;
    position: relative;
    min-width: 0; /* Important to allow text truncation below intrinsic size */
  }

  /* Vertical dividers between items */
  .meta-field-box:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
  }
  
  /* The left-side icons */
  .meta-field-box::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
    flex-shrink: 0;
  }
  
  .meta-field-box:nth-child(1)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c77dff' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  }
  .meta-field-box:nth-child(2)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c77dff' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
  }
  .meta-field-box:nth-child(3) {
    display: none !important; /* Hide Sponsor on mobile to fit inline */
  }
  .meta-field-box:nth-child(4)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c77dff' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  }

  .meta-label {
    display: none; /* Hide original HTML Labels */
  }

  /* Stack the new label (::before) and the value text */
  .meta-value {
    display: flex;
    flex-direction: column;
    font-size: 0.65rem;
    color: #fff;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  
  /* Inject labels above the values */
  .meta-field-box:nth-child(1) .meta-value::before { content: 'User ID:'; color: #b3b3b3; font-size: 0.55rem; font-weight: 600; margin-bottom: 2px; }
  .meta-field-box:nth-child(2) .meta-value::before { content: 'Upline ID:'; color: #b3b3b3; font-size: 0.55rem; font-weight: 600; margin-bottom: 2px; }
  .meta-field-box:nth-child(4) .meta-value::before { content: 'Joining Date:'; color: #b3b3b3; font-size: 0.55rem; font-weight: 600; margin-bottom: 2px; }


  /* Financial Cards Full Width Glow */
  .financial-overview-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .fin-card {
    border-left: 3px solid transparent;
    padding: 16px 20px;
    background: linear-gradient(90deg, rgba(20, 10, 40, 0.8) 0%, rgba(15, 7, 39, 0.4) 100%);
  }

  .fin-card.available { 
    border-left-color: #c77dff; 
    box-shadow: inset 20px 0 30px -20px rgba(199, 125, 255, 0.2);
  }
  .fin-card.total-income { 
    border-left-color: #00f5d4; 
    box-shadow: inset 20px 0 30px -20px rgba(0, 245, 212, 0.2);
  }
  .fin-card.today-income { 
    border-left-color: #ffbe0b; 
    box-shadow: inset 20px 0 30px -20px rgba(255, 190, 11, 0.2);
  }
  .fin-card.total-team { 
    border-left-color: #00bbf9; 
    box-shadow: inset 20px 0 30px -20px rgba(0, 187, 249, 0.2);
  }

  /* Upgrade Card Mobile Layout */
  .upgrade-card-wrapper {
    display: flex;
    flex-direction: column;
    padding: 18px;
    gap: 15px;
    background: rgba(15, 7, 39, 0.9);
    border: 1px solid rgba(138, 43, 226, 0.4);
    border-radius: 12px;
  }

  .upgrade-side {
    width: 100%;
    text-align: left;
    align-items: flex-start;
  }
  
  .upgrade-side.next-side {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 15px;
  }

  .upgrade-arrow-center {
    display: none; /* Hide Arrow */
  }

  .upgrade-action-bottom {
    margin-top: 5px;
  }

  .upgrade-now-btn {
    width: 100%;
    padding: 14px;
    font-size: 0.95rem;
    border-radius: 8px;
  }
}

@media (max-width: 640px) {
  .dash-main-content {
    padding: 16px 14px 40px;
    gap: 20px;
  }

  .upgrade-card-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 16px;
    padding: 20px;
  }

  .upgrade-side.next-side {
    text-align: left;
    align-items: flex-start;
  }
  
  .upgrade-side.next-side .upgrade-package-info {
    flex-direction: row;
  }

  .upgrade-arrow-center {
    justify-content: flex-start;
    padding-left: 20px;
  }
  
  .upgrade-arrow-line {
    display: none;
  }
  
  .upgrade-arrow-icon {
    width: 32px;
    height: 32px;
    transform: rotate(90deg);
  }

  .financial-overview-grid {
    grid-template-columns: 1fr;
  }

  .referral-section-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 20px 16px;
  }

  .ref-left-block {
    flex-direction: column;
  }

  /* Fix for income category items overflowing on mobile */
  .income-cat-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .cat-right-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    width: 100%;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .ref-input-copy-group {
    max-width: 100%;
    flex-direction: column;
  }

  .btn-ref-copy {
    width: 100%;
    justify-content: center;
  }

  /* Responsive Recent Activity Cards on Mobile */
  .activity-table-wrapper {
    display: none;
  }

  .mobile-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-activity-card {
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(26, 8, 60, 0.7) 0%, rgba(15, 7, 39, 0.8) 100%);
    border: 1px solid rgba(199, 125, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
  }

  .mobile-activity-card:hover {
    transform: translateY(-2px);
    border-color: rgba(199, 125, 255, 0.45);
    box-shadow: 0 8px 24px rgba(157, 78, 221, 0.25);
  }
}

/* =========================================================
   DASHBOARD MOBILE MENU — My Team & Rewards emoji nav links
   ========================================================= */
@media (max-width: 600px) {
  .dash-mob-nav-link {
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 18px 24px !important;
    font-size: 1.05rem !important;
    letter-spacing: 1.5px !important;
  }

  .dash-mob-emoji {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
  }
}
