/* ==========================================================================
   ACE GLOBAL - App & Admin Dashboard Stylesheet (Dark Luxury Fintech)
   ========================================================================== */

:root {
  --app-bg: #02071a;
  --sidebar-bg: #040922;
  --card-bg: rgba(8, 19, 52, 0.75);
  --card-hover: rgba(14, 32, 85, 0.9);
  --border-color: rgba(212, 175, 55, 0.16);

  --gold: #d4af37;
  --gold-light: #fce08a;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --gold-gradient: linear-gradient(135deg, #fff0a8 0%, #d4af37 50%, #9a7424 100%);

  --blue-royal: #1d4ed8;
  --blue-cyan: #38bdf8;
  --blue-glow: rgba(37, 99, 235, 0.35);

  --emerald: #d4af37;
  --emerald-light: #fce08a;
  --emerald-glow: rgba(212, 175, 55, 0.35);
  
  --cyan: #38bdf8;
  --purple: #8b5cf6;
  --danger: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --font-heading: 'Outfit', sans-serif;
  --font-luxury: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-script: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
  background-color: var(--app-bg);
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(29, 78, 216, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 100% 20%, rgba(212, 175, 55, 0.08) 0%, transparent 45%);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
}

/* Auth Pages (Login / Register) Container */
.auth-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.22) 0%, transparent 60%),
              radial-gradient(circle at bottom left, rgba(212, 175, 55, 0.14) 0%, transparent 60%),
              var(--app-bg);
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(145deg, rgba(8, 20, 56, 0.95) 0%, rgba(3, 8, 26, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(212, 175, 55, 0.12);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1d4ed8, var(--gold-light), #38bdf8);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  text-decoration: none;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-family: var(--font-script);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--gold-light);
}

/* Layout: Sidebar + Main Content */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  box-sizing: border-box;
}

.sidebar-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
  flex: 1;
}

.sidebar-brand-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: linear-gradient(135deg, #091745 0%, #030820 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
  flex-shrink: 0;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

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

.sidebar-brand-badge {
  font-size: 0.65rem;
  background: var(--gold-glow);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
  padding: 3px 7px;
  border-radius: 5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1;
}

.sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.sidebar-close-btn:hover,
.sidebar-close-btn:active {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  transform: scale(1.05);
}

.sidebar-backdrop {
  display: none;
}

.sidebar-menu {
  padding: 20px 12px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 12px 6px;
}

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

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.sidebar-link.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.25) 0%, rgba(37, 99, 235, 0.05) 100%);
  color: var(--gold-light);
  border-left: 3px solid var(--gold);
}

.sidebar-footer {
  padding: 18px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
}

.sidebar-user-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
}

.sidebar-user-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Main Area */
.app-main {
  margin-left: 260px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100% - 260px);
}

/* Topbar */
.app-topbar {
  height: 70px;
  background: rgba(8, 12, 24, 0.85);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.balance-pill {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 6px 16px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.balance-label {
  color: var(--text-muted);
}

.balance-value {
  color: var(--gold-light);
  font-weight: 800;
  font-family: var(--font-heading);
}

/* Page Content Container */
.page-content {
  padding: 32px;
  flex-grow: 1;
}

.page-header {
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
}

.page-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

/* Stat Grid */
/* Stat Grid & Cards */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: linear-gradient(145deg, rgba(14, 28, 72, 0.72) 0%, rgba(5, 12, 38, 0.88) 100%);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.1), 0 12px 30px -10px rgba(0, 0, 0, 0.65);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  pointer-events: none;
}

/* Specific Ambient Gradients for Each Stat Card Category */
.stat-card.card-capital {
  border-color: rgba(212, 175, 55, 0.3);
}
.stat-card.card-capital::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at 100% 0%, rgba(212, 175, 55, 0.22) 0%, transparent 70%);
  pointer-events: none;
}
.stat-card.card-capital::before {
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.8), transparent);
}

.stat-card.card-profit {
  border-color: rgba(56, 189, 248, 0.3);
}
.stat-card.card-profit::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.24) 0%, transparent 70%);
  pointer-events: none;
}
.stat-card.card-profit::before {
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.8), transparent);
}

.stat-card.card-referral {
  border-color: rgba(168, 85, 247, 0.3);
}
.stat-card.card-referral::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at 100% 0%, rgba(168, 85, 247, 0.22) 0%, transparent 70%);
  pointer-events: none;
}
.stat-card.card-referral::before {
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.8), transparent);
}

.stat-card.card-balance {
  border-color: rgba(52, 211, 153, 0.3);
}
.stat-card.card-balance::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at 100% 0%, rgba(52, 211, 153, 0.22) 0%, transparent 70%);
  pointer-events: none;
}
.stat-card.card-balance::before {
  background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.8), transparent);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: inset 0 1px 2px 0 rgba(255, 255, 255, 0.18), 0 18px 36px rgba(0, 0, 0, 0.65);
}

.stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.stat-card-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.icon-emerald { background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0.1) 100%); color: var(--gold-light); border: 1px solid rgba(212, 175, 55, 0.35); }
.icon-gold { background: linear-gradient(135deg, rgba(212, 175, 55, 0.3) 0%, rgba(180, 130, 20, 0.15) 100%); color: var(--gold-light); border: 1px solid rgba(212, 175, 55, 0.4); }
.icon-cyan { background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(37, 99, 235, 0.12) 100%); color: #60a5fa; border: 1px solid rgba(56, 189, 248, 0.35); }
.icon-purple { background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(139, 92, 246, 0.12) 100%); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.35); }

.stat-card-val {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.stat-card-sub {
  font-size: 0.78rem;
  color: var(--text-subtle);
  position: relative;
  z-index: 1;
}

/* Card & Panels */
.panel-card {
  background: linear-gradient(160deg, rgba(12, 25, 65, 0.7) 0%, rgba(4, 10, 32, 0.88) 100%);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 28px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.08), 0 16px 40px -12px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.panel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.35), transparent);
  pointer-events: none;
}

/* ==========================================================================
   Active Investment Programs & Modern Transaction Styles
   ========================================================================== */

/* Active Investment Program Cards Grid */
.inv-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.inv-program-card {
  background: linear-gradient(145deg, rgba(16, 34, 90, 0.72) 0%, rgba(6, 14, 44, 0.92) 100%);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 18px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.1), 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  transition: all 0.25s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.inv-program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.7), transparent);
  pointer-events: none;
}

.inv-program-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: inset 0 1px 2px 0 rgba(255, 255, 255, 0.18), 0 18px 38px rgba(0, 0, 0, 0.7);
}

.inv-program-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.inv-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.08) 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

.inv-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inv-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulseDot 1.6s infinite;
}

.inv-program-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: rgba(4, 9, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}

.inv-metric-item {
  display: flex;
  flex-direction: column;
}

.inv-metric-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.inv-metric-val {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.inv-progress-container {
  margin-top: 14px;
}

.inv-progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.inv-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.inv-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 100%);
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  transition: width 0.6s ease;
}

/* Modern Transactions List */
.tx-list-modern {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tx-item-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(14, 28, 72, 0.45) 0%, rgba(5, 12, 38, 0.65) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 14px 18px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.tx-item-modern:hover {
  background: linear-gradient(135deg, rgba(20, 38, 95, 0.65) 0%, rgba(8, 18, 50, 0.85) 100%);
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateX(3px);
}

.tx-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.tx-icon-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.tx-icon-profit {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.1) 100%);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.tx-icon-referral {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.1) 100%);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.tx-icon-deposit {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(37, 99, 235, 0.1) 100%);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.tx-icon-withdrawal {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.1) 100%);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.tx-info-content {
  min-width: 0;
  flex: 1;
}

.tx-title-text {
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.tx-meta-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tx-item-right {
  text-align: right;
  flex-shrink: 0;
  padding-left: 12px;
}

.tx-amount-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.tx-badge-status {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-block;
  margin-top: 3px;
  text-transform: uppercase;
}

/* Executive Member Hero Card */
.member-hero-card {
  background: linear-gradient(135deg, rgba(16, 38, 105, 0.88) 0%, rgba(8, 18, 56, 0.94) 50%, rgba(3, 8, 28, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 20px;
  padding: 22px 26px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(255, 240, 168, 0.2), 0 16px 40px rgba(0, 0, 0, 0.55);
}

.member-hero-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.22) 0%, rgba(29, 78, 216, 0.12) 50%, transparent 75%);
  pointer-events: none;
}

.member-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.member-hero-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.member-avatar {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, #fff0a8 0%, #d4af37 50%, #9a7424 100%);
  color: #120e03;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  font-family: var(--font-heading);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.45);
  flex-shrink: 0;
}

.member-hero-title {
  font-family: var(--font-heading);
  font-size: 1.32rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.member-hero-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.member-badge-vip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.member-ref-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.member-ref-chip:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.4);
  color: #fff;
}

.member-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Deposit Responsive Grid */
.deposit-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  max-width: 980px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.panel-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.app-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.app-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}

.app-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  vertical-align: middle;
}

.app-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-info { background: rgba(6, 182, 212, 0.15); color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.3); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--gold-gradient);
  color: #120e03;
  font-weight: 800;
  border: 1px solid rgba(255, 246, 204, 0.4);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fff6cc 0%, #f0c950 50%, #b38827 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.6);
  color: #080601;
}

.btn-secondary {
  background: rgba(14, 34, 90, 0.6);
  border-color: rgba(37, 99, 235, 0.4);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(29, 78, 216, 0.8);
  border-color: rgba(212, 175, 55, 0.45);
}

.btn-gold {
  background: var(--gold-gradient);
  color: #120e03;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

/* Password Input with Show/Hide Toggle */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap .form-control {
  padding-right: 46px !important;
}

.btn-toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
  z-index: 2;
}

.btn-toggle-password:hover {
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.08);
}

.btn-toggle-password:focus {
  outline: none;
  color: var(--gold-light);
}

.btn-toggle-password svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}


/* Flash Alerts */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

/* Page Layout Grids & Actions */
#sidebarToggleBtn {
  display: none;
}

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

/* Tier Select Grid in invest.php */
.tier-select-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.tier-card {
  background: linear-gradient(150deg, rgba(14, 28, 72, 0.72) 0%, rgba(5, 12, 38, 0.88) 100%);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 18px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.08), 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tier-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.35), transparent);
  pointer-events: none;
}

.tier-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: inset 0 1px 2px 0 rgba(255, 255, 255, 0.15), 0 18px 40px rgba(0, 0, 0, 0.7);
}

.tier-card.popular {
  border-color: var(--gold);
  background: linear-gradient(150deg, rgba(25, 48, 115, 0.84) 0%, rgba(10, 20, 58, 0.94) 100%);
  box-shadow: inset 0 1px 2px rgba(255, 240, 168, 0.28), 0 16px 42px rgba(212, 175, 55, 0.25);
}

.tier-card.popular::before {
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.9), transparent);
}

/* Network Levels Grid in network.php */
.network-levels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

/* Withdrawal cards grid in withdrawal.php */
.wd-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.wd-stat-card {
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.wd-stat-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.04) 100%);
  border: 1px solid rgba(16, 185, 129, 0.32);
}

.wd-stat-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.04) 100%);
  border: 1px solid rgba(245, 158, 11, 0.32);
}

.wd-stat-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wd-stat-emerald .wd-stat-icon {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-light);
}

.wd-stat-amber .wd-stat-icon {
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold-light);
}

.wd-stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wd-stat-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.wd-stat-val {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.wd-stat-val.text-emerald {
  color: var(--emerald-light);
}

/* Deposit Components */
.deposit-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.deposit-method-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  padding: 13px 14px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.deposit-method-card.active,
.deposit-method-card:has(input:checked) {
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
}

.deposit-method-title {
  color: #fff;
  font-size: 0.92rem;
  display: block;
}

.deposit-method-sub {
  color: var(--gold-light);
  font-size: 0.74rem;
  display: block;
}

.deposit-balance-val {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--gold-light);
  margin: 6px 0;
  line-height: 1.15;
}

/* Tier Card Internal Components */
.tier-header-wrap {
  text-align: center;
  margin-bottom: 12px;
}

.tier-title {
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 4px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

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

.tier-cap-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  margin-bottom: 14px;
}

.tier-cap-lbl {
  font-size: 0.70rem;
  color: var(--text-muted);
  display: block;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.tier-cap-val {
  color: #fff;
  font-size: 1.08rem;
  font-weight: 800;
}

.tier-details-list {
  font-size: 0.84rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.tier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tier-row-lbl {
  color: var(--text-muted);
}

.tier-select-btn {
  width: 100%;
  padding: 9px;
  font-weight: 700;
}

/* Network Page Elements */
.ref-box-title {
  font-size: 1.25rem;
  color: #fff;
  margin-top: 4px;
  font-weight: 700;
}

.omset-reward-title {
  font-size: 1.20rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

/* Profile grid in profile.php */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

/* Mobile Bottom Navigation (Hidden on Desktop) */
.mobile-bottom-nav {
  display: none;
}

/* ==========================================================
   Responsive Breakpoints
   ========================================================== */

/* Tablet & Medium Screens */
@media (max-width: 1080px) {
  .stat-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .tier-select-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .network-levels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .wd-cards-grid,
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  /* Sidebar Drawer & Backdrop */
  .app-sidebar {
    transform: translateX(-100%);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 290px;
    max-width: 86vw;
    z-index: 1000;
    background: linear-gradient(180deg, #050f2e 0%, #03081c 60%, #02071a 100%);
    border-right: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: none;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
  }

  .app-sidebar.open {
    transform: translateX(0);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.85);
  }

  .sidebar-header {
    padding: 16px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

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

  .sidebar-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 7, 18, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .sidebar-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  #sidebarToggleBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    cursor: pointer;
  }

  .app-main {
    margin-left: 0;
    width: 100%;
  }

  /* Topbar Mobile */
  .app-topbar {
    height: 58px;
    padding: 0 14px;
    gap: 8px;
  }

  .topbar-left {
    gap: 10px;
  }

  .topbar-right {
    gap: 8px;
  }

  .market-status-text {
    display: none;
  }

  .market-status-pill {
    padding: 4px 8px;
  }

  .balance-pill {
    padding: 5px 10px;
    font-size: 0.78rem;
    gap: 4px;
  }

  .balance-label {
    display: none;
  }

  .balance-value {
    font-size: 0.88rem;
  }

  /* Hide topbar action buttons on mobile since Bottom Navigation provides 1-tap access */
  .topbar-action-btn {
    display: none;
  }

  /* Page Content Container */
  .page-content {
    padding: 16px 14px 90px 14px; /* extra bottom padding for bottom nav */
  }

  /* Page Header */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
  }

  .page-title {
    font-size: 1.22rem;
    line-height: 1.25;
  }

  .page-desc {
    font-size: 0.78rem;
  }

  .page-header-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .page-header-actions .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.80rem;
  }

  /* Stat Metrics Cards - Compact & Native App Hierarchy */
  .stat-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }

  .stat-cards-grid.stats-grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }

  .stat-cards-grid.stats-grid-3 .stat-card:last-child {
    grid-column: span 2;
  }

  .stat-card {
    padding: 10px 10px;
    border-radius: 12px;
    gap: 2px;
  }

  .stat-card::after {
    width: 70px;
    height: 70px;
  }

  .stat-card-top {
    margin-bottom: 4px;
  }

  .stat-card-label {
    font-size: 0.60rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
  }

  .stat-card-icon {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 6px;
  }

  .stat-card-icon svg {
    width: 13px;
    height: 13px;
  }

  .stat-card-val {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin-bottom: 2px;
  }

  .stat-card-val span {
    font-size: 0.65rem !important;
    font-weight: 500;
  }

  .stat-card-sub {
    font-size: 0.58rem;
    color: #64748b;
    line-height: 1.2;
  }

  /* Member Hero Card Mobile */
  .member-hero-card {
    padding: 12px 12px;
    border-radius: 14px;
    margin-bottom: 14px;
  }

  .member-hero-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.0rem;
    border-radius: 10px;
  }

  .member-hero-title {
    font-size: 0.98rem;
  }

  .member-badge-vip {
    font-size: 0.62rem;
    padding: 2px 6px;
  }

  .ref-copy-chip {
    font-size: 0.66rem;
    padding: 3px 8px;
  }

  .member-hero-actions {
    width: 100%;
    margin-top: 8px;
    display: flex;
    gap: 6px;
  }

  .member-hero-actions .btn {
    flex: 1;
    padding: 6px 6px;
    font-size: 0.74rem;
    justify-content: center;
  }

  /* Panels & Cards */
  .panel-card {
    padding: 14px 12px;
    border-radius: 14px;
    margin-bottom: 16px;
  }

  .panel-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .panel-title {
    font-size: 1.02rem;
  }

  /* Grids */
  .tier-select-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tier-card {
    padding: 14px 14px;
    border-radius: 12px;
  }

  .tier-title {
    font-size: 1.12rem;
  }

  .tier-badge {
    font-size: 0.70rem;
  }

  .tier-cap-box {
    padding: 7px 8px;
    margin-bottom: 10px;
  }

  .tier-cap-lbl {
    font-size: 0.64rem;
  }

  .tier-cap-val {
    font-size: 0.96rem;
  }

  .tier-details-list {
    font-size: 0.78rem;
    gap: 6px;
    margin-bottom: 12px;
  }

  .tier-select-btn {
    padding: 7px 10px;
    font-size: 0.80rem;
  }

  .network-levels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .network-levels-grid .stat-card {
    padding: 9px 9px;
  }

  .ref-box-title {
    font-size: 1.05rem;
  }

  .omset-reward-title {
    font-size: 1.02rem;
  }

  .deposit-grid,
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .deposit-method-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .deposit-method-card {
    padding: 10px 12px;
    gap: 8px;
  }

  .deposit-method-title {
    font-size: 0.86rem;
  }

  .deposit-method-sub {
    font-size: 0.68rem;
  }

  .deposit-balance-val {
    font-size: 1.25rem;
  }

  .wd-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }

  .wd-stat-card {
    padding: 10px 10px;
    gap: 8px;
    border-radius: 12px;
  }

  .wd-stat-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 7px;
  }

  .wd-stat-icon svg {
    width: 14px;
    height: 14px;
  }

  .wd-stat-label {
    font-size: 0.58rem;
  }

  .wd-stat-val {
    font-size: 1.05rem;
  }

  /* Buttons & Badges Touch Scaling */
  .btn {
    padding: 8px 14px;
    font-size: 0.82rem;
    border-radius: 8px;
  }

  .btn-sm {
    padding: 5px 9px;
    font-size: 0.74rem;
  }

  .badge {
    padding: 2px 7px;
    font-size: 0.66rem;
  }

  /* Form inputs */
  .form-control {
    padding: 8px 10px;
    font-size: 0.86rem;
  }

  .form-label {
    font-size: 0.76rem;
  }

  /* Table cells */
  .app-table th {
    padding: 8px 10px;
    font-size: 0.68rem;
  }

  .app-table td {
    padding: 10px 8px;
    font-size: 0.78rem;
  }

  /* Alerts */
  .alert {
    padding: 10px 12px;
    font-size: 0.80rem;
    margin-bottom: 14px;
  }

  /* Sticky Bottom Navigation Bar (Footer Menu) */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(4, 9, 28, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(212, 175, 55, 0.22);
    z-index: 85;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
    box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.65);
  }

  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    padding: 4px 2px;
  }

  .mobile-nav-item:active {
    transform: scale(0.92);
  }

  .mobile-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
  }

  .mobile-nav-icon svg {
    width: 20px;
    height: 20px;
  }

  .mobile-nav-label {
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 62px;
    text-align: center;
  }

  .mobile-nav-item.active {
    color: var(--gold-light);
  }

  .mobile-nav-item.active .mobile-nav-icon {
    color: var(--gold-light);
    transform: translateY(-1px);
    filter: drop-shadow(0 2px 6px rgba(212, 175, 55, 0.45));
  }

  .mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 22%;
    right: 22%;
    height: 2.5px;
    background: linear-gradient(90deg, #d4af37, #fce08a);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.8);
  }
}

/* Extra small mobile screens (<= 420px) */
@media (max-width: 420px) {
  .stat-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 10px;
  }
  .stat-card {
    padding: 8px 8px;
    border-radius: 10px;
    gap: 1px;
  }
  .stat-card-top {
    margin-bottom: 3px;
  }
  .stat-card-val {
    font-size: 0.95rem;
    line-height: 1.15;
    letter-spacing: -0.015em;
  }
  .stat-card-val span {
    font-size: 0.58rem !important;
  }
  .stat-card-label {
    font-size: 0.54rem;
    letter-spacing: 0.03em;
  }
  .stat-card-sub {
    font-size: 0.52rem;
    line-height: 1.2;
  }
  .stat-card-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 5px;
  }
  .stat-card-icon svg {
    width: 11px;
    height: 11px;
  }
  .network-levels-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px;
  }
  .network-levels-grid .stat-card {
    padding: 7px 6px;
  }
  .wd-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 12px;
  }
  .wd-stat-card {
    padding: 8px 8px;
    gap: 6px;
    border-radius: 10px;
  }
  .wd-stat-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
  }
  .wd-stat-icon svg {
    width: 12px;
    height: 12px;
  }
  .wd-stat-label {
    font-size: 0.52rem;
  }
  .wd-stat-val {
    font-size: 0.95rem;
  }
  .tier-title {
    font-size: 1.02rem;
  }
  .tier-cap-val {
    font-size: 0.88rem;
  }
  .page-title {
    font-size: 1.08rem;
  }
  .page-desc {
    font-size: 0.70rem;
  }
  .panel-title {
    font-size: 0.94rem;
  }
  .deposit-balance-val {
    font-size: 1.12rem;
  }
  .ref-box-title {
    font-size: 0.96rem;
  }
  .omset-reward-title {
    font-size: 0.92rem;
  }
}

/* ==========================================================================
   Fintech Modern & Premium Dashboard Components
   - Active Investment Programs Card Grid
   - Recent Transactions Activity Feed
   ========================================================================== */

/* Active Investment Cards Grid */
.inv-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.inv-program-card {
  position: relative;
  background: linear-gradient(145deg, rgba(8, 17, 44, 0.88) 0%, rgba(3, 7, 24, 0.96) 100%);
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 4, 18, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.inv-program-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 14px 38px rgba(0, 4, 18, 0.75), 0 0 22px rgba(212, 175, 55, 0.16);
}

/* Subtle top golden ambient highlight */
.inv-program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d4af37, #fce08a, transparent);
  opacity: 0.85;
}

.inv-program-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.inv-tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.16), rgba(245, 158, 11, 0.06));
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 5px 12px;
  border-radius: 9999px;
}

.inv-tier-icon {
  color: var(--gold);
  display: flex;
  align-items: center;
}

.inv-tier-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #fff7d6 0%, #f0c950 60%, #cca132 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.inv-ref-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
  letter-spacing: 0.04em;
  margin-left: 4px;
}

.inv-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.32);
}

.inv-status-pill.completed {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.32);
}

.inv-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: invPulse 2s infinite ease-in-out;
}

@keyframes invPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

/* Metrics 3-Col Grid */
.inv-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.inv-metric-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inv-metric-lbl {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.inv-metric-val {
  font-family: var(--font-heading);
  font-size: 1.04rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.inv-metric-val.roi-green {
  color: #34d399;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

/* Progress Cycle */
.inv-progress-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.inv-progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
}

.inv-progress-lbl {
  color: var(--text-muted);
  font-weight: 600;
}

.inv-progress-ratio {
  color: #f1f5f9;
  font-weight: 700;
}

.inv-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.inv-track-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 65%, #d4af37 100%);
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Recent Transactions Modern Feed */
.tx-list-modern {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.tx-item-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  background: linear-gradient(135deg, rgba(8, 17, 44, 0.55) 0%, rgba(3, 7, 24, 0.75) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tx-item-modern:hover {
  transform: translateX(3px);
  border-color: rgba(212, 175, 55, 0.32);
  background: linear-gradient(135deg, rgba(14, 28, 70, 0.65) 0%, rgba(5, 12, 36, 0.85) 100%);
}

.tx-item-left {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.tx-icon-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.tx-icon-avatar svg {
  width: 20px;
  height: 20px;
}

.tx-icon-profit {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.tx-icon-referral {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(168, 85, 247, 0.12));
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #fbbf24;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.2);
}

.tx-icon-deposit {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2);
}

.tx-icon-withdrawal {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(220, 38, 38, 0.08));
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

.tx-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

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

.tx-type-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.tx-type-profit { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.tx-type-referral { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.tx-type-deposit { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.tx-type-withdrawal { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.tx-desc-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}

.tx-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.tx-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.tx-amount {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.tx-amount.positive {
  color: #34d399;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.tx-amount.negative {
  color: #f87171;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

/* Modern Empty State */
.empty-state-modern {
  text-align: center;
  padding: 36px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.empty-state-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin-bottom: 2px;
}

.empty-state-title {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 700;
  color: #f1f5f9;
}

.empty-state-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .inv-cards-grid {
    grid-template-columns: 1fr;
  }
  .inv-program-card {
    padding: 16px;
  }
  .inv-metrics-grid {
    gap: 6px;
  }
  .inv-metric-box {
    padding: 8px 9px;
  }
  .inv-metric-val {
    font-size: 0.94rem;
  }
  .tx-item-modern {
    padding: 11px 13px;
    gap: 10px;
  }
  .tx-icon-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
  }
  .tx-icon-avatar svg {
    width: 17px;
    height: 17px;
  }
  .tx-desc-text {
    max-width: 150px;
    font-size: 0.81rem;
  }
  .tx-amount {
    font-size: 0.94rem;
  }
}

/* Admin Dual Grid for Panels */
.admin-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 860px) {
  .admin-dual-grid {
    grid-template-columns: 1fr;
  }
}

.inv-metrics-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .inv-metrics-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive 3-Column Stats Grid */
.stats-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .stats-grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }
  .stats-grid-3 .stat-card:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .stats-grid-3 {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 14px;
  }
  .stats-grid-3 .stat-card:last-child {
    grid-column: span 1;
  }
}
