/* ============================================================
   CryptoCMS - Ultra Premium Dark/Light Theme v2.0
   Enterprise Crypto Mining & Investment Platform
   ============================================================ */

/* ── Google Fonts Import ───────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --primary:        #6366F1;
  --primary-dark:   #4F46E5;
  --primary-light:  #818CF8;
  --primary-glow:   rgba(99,102,241,0.4);
  --secondary:      #F59E0B;
  --accent:         #10B981;
  --accent-dark:    #059669;
  --accent-glow:    rgba(16,185,129,0.4);
  --danger:         #EF4444;
  --danger-dark:    #DC2626;
  --warning:        #F59E0B;
  --info:           #3B82F6;
  --success:        #10B981;
  --purple:         #8B5CF6;
  --pink:           #EC4899;
  --cyan:           #06B6D4;

  /* Dark Theme (default) */
  --bg-base:        #060B14;
  --bg-surface:     #0D1321;
  --bg-card:        #111827;
  --bg-card-2:      #141E2E;
  --bg-card-hover:  #1A2438;
  --bg-input:       #0A1020;
  --bg-sidebar:     #080D18;
  --bg-topbar:      rgba(8,13,24,0.96);
  --bg-glass:       rgba(17,24,39,0.8);

  --text-primary:   #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted:     #64748B;
  --text-inverse:   #0B0F1A;
  --text-white:     #FFFFFF;

  --border:         rgba(255,255,255,0.06);
  --border-light:   rgba(255,255,255,0.1);
  --border-focus:   rgba(99,102,241,0.6);
  --border-accent:  rgba(16,185,129,0.3);

  --shadow-xs:      0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:      0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.6);
  --shadow-xl:      0 16px 60px rgba(0,0,0,0.7);
  --shadow-glow:    0 0 30px rgba(99,102,241,0.25);
  --shadow-accent:  0 0 30px rgba(16,185,129,0.2);

  --radius-xs:      4px;
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      20px;
  --radius-2xl:     28px;
  --radius-full:    9999px;

  --sidebar-width:  268px;
  --topbar-height:  68px;
  --transition:     all 0.25s cubic-bezier(0.4,0,0.2,1);
  --transition-fast: all 0.15s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: all 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* ── Light Theme ───────────────────────────────────────────── */
[data-theme="light"] {
  --bg-base:        #EEF2FF;
  --bg-surface:     #F8FAFF;
  --bg-card:        #FFFFFF;
  --bg-card-2:      #F1F5FF;
  --bg-card-hover:  #F8FAFF;
  --bg-input:       #F1F5F9;
  --bg-sidebar:     #1E293B;
  --bg-topbar:      rgba(255,255,255,0.96);
  --bg-glass:       rgba(255,255,255,0.85);

  --text-primary:   #0F172A;
  --text-secondary: #475569;
  --text-muted:     #94A3B8;

  --border:         rgba(0,0,0,0.07);
  --border-light:   rgba(0,0,0,0.12);
  --border-focus:   rgba(99,102,241,0.5);

  --shadow-xs:      0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.12);
  --shadow-xl:      0 16px 60px rgba(0,0,0,0.15);
  --shadow-glow:    0 0 30px rgba(99,102,241,0.15);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 14px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* ── Layout ────────────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1);
  background: var(--bg-base);
}
.page-content {
  flex: 1;
  padding: 28px;
  margin-top: var(--topbar-height);
  max-width: 100%;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

/* Sidebar Header */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary) !important;
  text-decoration: none;
}
.logo-img {
  width: 38px; height: 38px;
  object-fit: contain;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 2px;
}
.logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 17px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}
.sidebar-close-btn {
  display: none;
  color: var(--text-muted);
  padding: 6px;
  border-radius: 8px;
  transition: var(--transition);
  background: transparent;
}
.sidebar-close-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

/* Sidebar User */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.user-avatar-wrap { position: relative; flex-shrink: 0; }
.user-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 12px rgba(99,102,241,0.3);
}
.user-status-dot {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid var(--bg-sidebar);
}
.user-status-dot.online { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.user-status-dot.offline { background: var(--text-muted); }
.user-info { flex: 1; min-width: 0; }
.user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-rank { margin-top: 3px; }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-verified { background: rgba(16,185,129,0.15); color: var(--accent); border: 1px solid rgba(16,185,129,0.2); }
.badge-unverified { background: rgba(100,116,139,0.12); color: var(--text-muted); border: 1px solid rgba(100,116,139,0.15); }
.badge-pending { background: rgba(245,158,11,0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.badge-primary { background: rgba(99,102,241,0.15); color: var(--primary-light); border: 1px solid rgba(99,102,241,0.2); }

/* Sidebar Nav */
.sidebar-nav { flex: 1; padding: 10px 0 8px; overflow-y: auto; }
.nav-section { margin-bottom: 4px; }
.nav-section-title {
  display: block;
  padding: 10px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px 10px 16px;
  color: var(--text-secondary);
  margin: 1px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
}
.nav-item:hover {
  background: rgba(99,102,241,0.08);
  color: var(--text-primary);
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(99,102,241,0.06));
  color: var(--primary-light);
  box-shadow: inset 0 0 0 1px rgba(99,102,241,0.15);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 65%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 0 3px 3px 0;
}
.nav-icon {
  width: 18px;
  font-size: 14px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
}
.nav-item.active .nav-icon { opacity: 1; }
.nav-badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}
.pulse-badge { background: rgba(16,185,129,0.18); color: var(--accent); animation: pulseGlow 2s infinite; }
.warning-badge { background: rgba(245,158,11,0.18); color: var(--warning); }
.danger-badge { background: rgba(239,68,68,0.18); color: var(--danger); }
.info-badge { background: rgba(59,130,246,0.18); color: var(--info); }

@keyframes pulseGlow {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,0.3); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(16,185,129,0); }
}

/* Sidebar Wallet */
.sidebar-wallet {
  padding: 16px;
  margin: 8px;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(16,185,129,0.06));
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.sidebar-wallet::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(99,102,241,0.15), transparent);
  border-radius: 50%;
  pointer-events: none;
}
.wallet-quick-title {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  font-weight: 600;
}
.wallet-quick-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.wallet-quick-actions { display: flex; gap: 8px; }
.btn-wallet-action {
  flex: 1;
  padding: 7px 4px;
  text-align: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn-wallet-action:hover {
  background: rgba(99,102,241,0.15);
  color: var(--primary-light);
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-1px);
}

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--bg-topbar);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 900;
  gap: 16px;
  transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
}
.topbar-left { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.menu-toggle {
  display: none;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  background: transparent;
}
.menu-toggle:hover { background: var(--bg-card); color: var(--text-primary); }

/* Crypto Ticker */
.crypto-ticker {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
}
.ticker-inner {
  display: flex;
  gap: 32px;
  animation: tickerScroll 50s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.ticker-inner:hover { animation-play-state: paused; }
@keyframes tickerScroll { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.ticker-item:hover { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.2); }
.ticker-coin-logo { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.ticker-price { color: var(--text-primary); font-weight: 600; }
.ticker-change.positive { color: var(--accent); }
.ticker-change.negative { color: var(--danger); }

/* Topbar Buttons */
.topbar-btn {
  position: relative;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: var(--transition);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.topbar-btn:hover { background: var(--bg-card); color: var(--text-primary); }
.topbar-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-topbar);
  line-height: 1;
}
.topbar-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  background: transparent;
  cursor: pointer;
}
.topbar-user-btn:hover { background: var(--bg-card); }
.topbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 8px rgba(99,102,241,0.3);
}
.topbar-username { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.topbar-chevron { font-size: 10px; color: var(--text-muted); transition: var(--transition); }
.topbar-user-btn:hover .topbar-chevron { transform: rotate(180deg); }

/* Dropdown Panels */
.topbar-dropdown { position: relative; }
.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.97);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  z-index: 1100;
  backdrop-filter: blur(20px);
}
.dropdown-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.notif-panel { width: 340px; max-height: 420px; overflow-y: auto; }
.user-panel { width: 230px; }
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
}
.panel-action { font-size: 11px; color: var(--primary-light); font-weight: 500; }
.panel-action:hover { color: var(--primary); }
.panel-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.panel-empty i { font-size: 28px; margin-bottom: 10px; display: block; opacity: 0.4; }

/* Notification Items */
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
}
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.notif-success .notif-icon { background: rgba(16,185,129,0.12); color: var(--accent); }
.notif-warning .notif-icon { background: rgba(245,158,11,0.12); color: var(--warning); }
.notif-info .notif-icon { background: rgba(59,130,246,0.12); color: var(--info); }
.notif-error .notif-icon { background: rgba(239,68,68,0.12); color: var(--danger); }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-msg { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* User Panel */
.user-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.up-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.up-name { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.up-email { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.up-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
}
.up-item:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.up-item i { width: 16px; text-align: center; font-size: 13px; }
.up-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
  margin-bottom: 24px;
}
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
}
.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.card-body { padding: 20px; }

/* ── Stat Cards ────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.06;
  transform: translate(20px,-20px);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-light); }
.stat-card.primary { border-left: 3px solid var(--primary); }
.stat-card.primary::after { background: var(--primary); }
.stat-card.success { border-left: 3px solid var(--accent); }
.stat-card.success::after { background: var(--accent); }
.stat-card.warning { border-left: 3px solid var(--warning); }
.stat-card.warning::after { background: var(--warning); }
.stat-card.danger { border-left: 3px solid var(--danger); }
.stat-card.danger::after { background: var(--danger); }
.stat-card.info { border-left: 3px solid var(--info); }
.stat-card.info::after { background: var(--info); }
.stat-card.purple { border-left: 3px solid var(--purple); }
.stat-card.purple::after { background: var(--purple); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-card.primary .stat-icon { background: rgba(99,102,241,0.12); color: var(--primary); }
.stat-card.success .stat-icon { background: rgba(16,185,129,0.12); color: var(--accent); }
.stat-card.warning .stat-icon { background: rgba(245,158,11,0.12); color: var(--warning); }
.stat-card.danger .stat-icon { background: rgba(239,68,68,0.12); color: var(--danger); }
.stat-card.info .stat-icon { background: rgba(59,130,246,0.12); color: var(--info); }
.stat-card.purple .stat-icon { background: rgba(139,92,246,0.12); color: var(--purple); }

.stat-info { flex: 1; min-width: 0; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.stat-change {
  font-size: 11px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-change.up { color: var(--accent); }
.stat-change.down { color: var(--danger); }

/* ── Grid System ───────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-success {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-color: var(--accent-dark);
  box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}
.btn-success:hover {
  background: linear-gradient(135deg, #34D399, var(--accent));
  box-shadow: 0 4px 16px rgba(16,185,129,0.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), var(--danger-dark));
  color: #fff;
  border-color: var(--danger-dark);
  box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #F87171, var(--danger));
  box-shadow: 0 4px 16px rgba(239,68,68,0.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #D97706);
  color: #fff;
  border-color: #D97706;
  box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}
.btn-warning:hover {
  background: linear-gradient(135deg, #FCD34D, var(--warning));
  box-shadow: 0 4px 16px rgba(245,158,11,0.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-info {
  background: linear-gradient(135deg, var(--info), #2563EB);
  color: #fff;
  border-color: #2563EB;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}
.btn-info:hover {
  background: linear-gradient(135deg, #60A5FA, var(--info));
  box-shadow: 0 4px 16px rgba(59,130,246,0.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-light);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-ghost {
  background: transparent;
  color: var(--primary-light);
  border-color: transparent;
}
.btn-ghost:hover {
  background: rgba(99,102,241,0.1);
  color: var(--primary-light);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: var(--radius-md); }
.btn-xl { padding: 14px 32px; font-size: 16px; border-radius: var(--radius-md); }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

/* ── Form Elements ─────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13.5px;
  transition: var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { opacity: 0.5; cursor: not-allowed; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-text { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 11px; color: var(--danger); margin-top: 5px; }

.input-group { position: relative; }
.input-group .form-control { padding-left: 40px; }
.input-group-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}
.input-group-suffix {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}

/* Toggle Switch */
.toggle-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle-input { display: none; }
.toggle-slider {
  width: 42px; height: 24px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}
.toggle-input:checked + .toggle-slider { background: var(--primary); border-color: var(--primary); }
.toggle-input:checked + .toggle-slider::after { transform: translateX(18px); background: #fff; }
.toggle-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table-wrap::-webkit-scrollbar { height: 4px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,0.02); }
tbody tr:hover { background: rgba(255,255,255,0.015); }

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.status-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; }
.status-active, .status-approved, .status-completed, .status-success {
  background: rgba(16,185,129,0.12);
  color: var(--accent);
  border: 1px solid rgba(16,185,129,0.2);
}
.status-active::before, .status-approved::before, .status-completed::before, .status-success::before { background: var(--accent); }
.status-pending {
  background: rgba(245,158,11,0.12);
  color: var(--warning);
  border: 1px solid rgba(245,158,11,0.2);
}
.status-pending::before { background: var(--warning); }
.status-rejected, .status-failed, .status-cancelled {
  background: rgba(239,68,68,0.12);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.2);
}
.status-rejected::before, .status-failed::before, .status-cancelled::before { background: var(--danger); }
.status-inactive, .status-paused {
  background: rgba(100,116,139,0.12);
  color: var(--text-muted);
  border: 1px solid rgba(100,116,139,0.2);
}
.status-inactive::before, .status-paused::before { background: var(--text-muted); }
.status-processing {
  background: rgba(59,130,246,0.12);
  color: var(--info);
  border: 1px solid rgba(59,130,246,0.2);
}
.status-processing::before { background: var(--info); animation: pulseGlow 1.5s infinite; }

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  border: 1px solid transparent;
  margin-bottom: 16px;
}
.alert i { flex-shrink: 0; margin-top: 1px; }
.alert-dismissible { justify-content: space-between; }
.alert-dismissible button { color: inherit; opacity: 0.6; padding: 2px; border-radius: 4px; flex-shrink: 0; }
.alert-dismissible button:hover { opacity: 1; background: rgba(255,255,255,0.1); }
.alert-success { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.25); color: #34D399; }
.alert-error, .alert-danger { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.25); color: #F87171; }
.alert-warning { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.25); color: #FCD34D; }
.alert-info { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.25); color: #60A5FA; }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.25s cubic-bezier(0.4,0,0.2,1);
}
@keyframes modalIn { from { opacity:0; transform: scale(0.95) translateY(10px); } to { opacity:1; transform: scale(1) translateY(0); } }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  transition: var(--transition);
  border: 1px solid var(--border);
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  font-family: 'Space Grotesk', sans-serif;
}

/* ── Toast ─────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 84px; right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  min-width: 280px;
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  color: var(--text-primary);
}
.toast.show { transform: translateX(0); }
.toast-success { border-left: 3px solid var(--accent); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info    { border-left: 3px solid var(--info); }
.toast-success i { color: var(--accent); }
.toast-error   i { color: var(--danger); }
.toast-warning i { color: var(--warning); }
.toast-info    i { color: var(--info); }

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.page-btn {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  min-width: 36px;
  text-align: center;
}
.page-btn:hover { background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.3); color: var(--primary-light); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,0.3); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* ── Investment Plan Cards ─────────────────────────────────── */
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}
.plan-card-top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99,102,241,0.25);
}
.plan-card.featured {
  border-color: rgba(99,102,241,0.35);
  box-shadow: 0 0 40px rgba(99,102,241,0.12);
  background: linear-gradient(160deg, rgba(99,102,241,0.05), var(--bg-card));
}
.plan-featured-badge {
  position: absolute;
  top: 16px; right: -26px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 32px;
  transform: rotate(45deg);
  letter-spacing: 0.08em;
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}
.plan-icon {
  width: 68px; height: 68px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 18px;
  transition: var(--transition);
}
.plan-card:hover .plan-icon { transform: scale(1.1) rotate(5deg); }
.plan-name { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; font-family: 'Space Grotesk', sans-serif; }
.plan-roi {
  font-size: 44px;
  font-weight: 900;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1;
  margin: 14px 0 4px;
  letter-spacing: -2px;
}
.plan-roi-label { font-size: 12px; color: var(--text-muted); margin-bottom: 18px; font-weight: 500; }
.plan-details { display: flex; flex-direction: column; gap: 0; margin: 16px 0; text-align: left; }
.plan-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.plan-detail-row:last-child { border-bottom: none; }
.plan-detail-label { color: var(--text-muted); font-weight: 500; }
.plan-detail-value { color: var(--text-primary); font-weight: 600; }

/* ── Wallet Cards ──────────────────────────────────────────── */
.wallet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.wallet-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.wallet-card-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.wallet-card-balance {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -1px;
  line-height: 1.1;
}
.wallet-card-locked {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.wallet-card-icon {
  position: absolute;
  top: 20px; right: 20px;
  width: 46px; height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.wallet-card-trend {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

/* ── Mining Card ───────────────────────────────────────────── */
.mining-card {
  background: linear-gradient(160deg, rgba(99,102,241,0.08), var(--bg-card) 60%);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.mining-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(99,102,241,0.12), transparent);
  border-radius: 50%;
  pointer-events: none;
}
.mining-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}
.mining-status-badge.active {
  background: rgba(16,185,129,0.12);
  color: var(--accent);
  border: 1px solid rgba(16,185,129,0.25);
}
.mining-status-badge.active i { animation: pulseGlow 1.5s infinite; font-size: 8px; }
.mining-status-badge.idle {
  background: rgba(100,116,139,0.12);
  color: var(--text-muted);
  border: 1px solid rgba(100,116,139,0.2);
}
.mining-hashrate {
  font-size: 52px;
  font-weight: 900;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -2px;
}
.mining-hashrate-unit { font-size: 13px; color: var(--text-muted); margin: 6px 0 20px; font-weight: 500; }

/* Progress Ring */
.progress-ring-wrap { position: relative; display: inline-block; margin: 8px 0; }
.progress-ring { transform: rotate(-90deg); }
.progress-ring-bg { fill: none; stroke: rgba(255,255,255,0.06); }
.progress-ring-fill { fill: none; stroke: url(#progressGrad); stroke-linecap: round; transition: stroke-dashoffset 0.5s ease; }
.progress-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.progress-ring-pct { font-size: 28px; font-weight: 800; color: var(--text-primary); font-family: 'Space Grotesk', sans-serif; }
.progress-ring-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }

.mining-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.mining-stat { text-align: center; }
.mining-stat-val { font-size: 16px; font-weight: 700; color: var(--text-primary); font-family: 'Space Grotesk', sans-serif; }
.mining-stat-lbl { font-size: 11px; color: var(--text-muted); margin-top: 3px; font-weight: 500; }
.mining-btn-row { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

/* ── Referral ──────────────────────────────────────────────── */
.referral-link-box {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}
.referral-link-box:hover { border-color: rgba(99,102,241,0.3); }
.referral-link-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: monospace;
}

/* ── Charts ────────────────────────────────────────────────── */
.chart-container { position: relative; height: 240px; }

/* ── Footer ────────────────────────────────────────────────── */
.page-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--text-muted); transition: var(--transition); }
.footer-links a:hover { color: var(--primary-light); }

/* ── Sidebar Overlay ───────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  animation: fadeIn 0.2s ease;
}
.sidebar-overlay.show { display: block; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* ── Popup ─────────────────────────────────────────────────── */
.popup-box { max-width: 480px; text-align: center; }
.popup-content { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; }
.popup-btn { margin-top: 4px; }

/* ── Utilities ─────────────────────────────────────────────── */
.text-primary-color { color: var(--primary-light) !important; }
.text-success  { color: var(--accent) !important; }
.text-danger   { color: var(--danger) !important; }
.text-warning  { color: var(--warning) !important; }
.text-info     { color: var(--info) !important; }
.text-muted    { color: var(--text-muted) !important; }
.text-center   { text-align: center; }
.text-right    { text-align: right; }
.text-left     { text-align: left; }
.fw-bold       { font-weight: 700; }
.fw-600        { font-weight: 600; }
.fw-500        { font-weight: 500; }
.d-flex        { display: flex; }
.d-grid        { display: grid; }
.d-none        { display: none !important; }
.d-block       { display: block; }
.d-inline-flex { display: inline-flex; }
.align-center  { align-items: center; }
.align-start   { align-items: flex-start; }
.align-end     { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.flex-wrap     { flex-wrap: wrap; }
.flex-1        { flex: 1; }
.gap-4         { gap: 4px; }
.gap-6         { gap: 6px; }
.gap-8         { gap: 8px; }
.gap-12        { gap: 12px; }
.gap-16        { gap: 16px; }
.gap-20        { gap: 20px; }
.gap-24        { gap: 24px; }
.mt-4          { margin-top: 4px; }
.mt-8          { margin-top: 8px; }
.mt-12         { margin-top: 12px; }
.mt-16         { margin-top: 16px; }
.mt-20         { margin-top: 20px; }
.mt-24         { margin-top: 24px; }
.mb-4          { margin-bottom: 4px; }
.mb-8          { margin-bottom: 8px; }
.mb-12         { margin-bottom: 12px; }
.mb-16         { margin-bottom: 16px; }
.mb-20         { margin-bottom: 20px; }
.mb-24         { margin-bottom: 24px; }
.mb-32         { margin-bottom: 32px; }
.p-0           { padding: 0; }
.p-16          { padding: 16px; }
.p-20          { padding: 20px; }
.p-24          { padding: 24px; }
.w-full        { width: 100%; }
.h-full        { height: 100%; }
.rounded-full  { border-radius: var(--radius-full); }
.rounded-lg    { border-radius: var(--radius-lg); }
.overflow-hidden { overflow: hidden; }
.position-relative { position: relative; }
.min-w-0       { min-width: 0; }
.truncate      { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Responsive display helpers */
.d-md-none     { display: none; }
.d-md-inline   { display: none; }
.d-md-flex     { display: none; }

/* ── Admin Specific ────────────────────────────────────────── */
.admin-sidebar { background: #060C18; }
.admin-topbar  { background: rgba(6,12,24,0.97); }
.admin-badge-pending { background: rgba(245,158,11,0.15); color: var(--warning); padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; }

/* Light theme sidebar overrides */
[data-theme="light"] .sidebar { background: #1E293B; }
[data-theme="light"] .sidebar .nav-item { color: #94A3B8; }
[data-theme="light"] .sidebar .nav-item:hover { background: rgba(255,255,255,0.08); color: #F1F5F9; }
[data-theme="light"] .sidebar .nav-item.active { background: rgba(99,102,241,0.2); color: #C7D2FE; }
[data-theme="light"] .sidebar .nav-section-title { color: #64748B; }
[data-theme="light"] .sidebar-user .user-name { color: #F1F5F9; }
[data-theme="light"] .sidebar-wallet { background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(16,185,129,0.1)); }
[data-theme="light"] .wallet-quick-amount { color: #F1F5F9; }
[data-theme="light"] .sidebar-close-btn { color: #94A3B8; }
[data-theme="light"] .btn-wallet-action { background: rgba(255,255,255,0.08); color: #94A3B8; border-color: rgba(255,255,255,0.12); }
[data-theme="light"] .user-status-dot { border-color: #1E293B; }
[data-theme="light"] .logo-text { background: linear-gradient(135deg, #818CF8, #34D399); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ── Loading States ────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Responsive ────────────────────────────────────────────── */
@media (min-width: 768px) {
  .d-md-inline { display: inline; }
  .d-md-flex   { display: flex; }
  .d-md-none   { display: none; }
  .grid-2      { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1400px) {
  .grid-5 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; --topbar-height: 60px; }
  .sidebar { transform: translateX(-268px); width: 268px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close-btn { display: flex; }
  .main-wrapper { margin-left: 0; }
  .topbar { left: 0; padding: 0 16px; }
  .menu-toggle { display: flex; }
  .crypto-ticker { display: none; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .mining-stats-row { grid-template-columns: repeat(3, 1fr); }
  .page-header-row { flex-direction: column; align-items: flex-start; }
  .d-md-none { display: none !important; }
  .d-md-inline { display: none; }
}
@media (max-width: 480px) {
  .mining-stats-row { grid-template-columns: 1fr; }
  .stat-value { font-size: 20px; }
  .plan-roi { font-size: 36px; }
  .wallet-card-balance { font-size: 24px; }
  .toast-container { right: 12px; left: 12px; max-width: none; }
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes glow { 0%,100%{box-shadow:0 0 10px rgba(99,102,241,0.3)} 50%{box-shadow:0 0 25px rgba(99,102,241,0.6)} }
@keyframes slideInRight { from{transform:translateX(30px);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes slideInUp { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }
@keyframes scaleIn { from{transform:scale(0.9);opacity:0} to{transform:scale(1);opacity:1} }

/* ── Scrollbar Global ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }

/* ── Glassmorphism Card ────────────────────────────────────── */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
}

/* ── Gradient Text ─────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-gold {
  background: linear-gradient(135deg, #F59E0B, #FBBF24, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Divider ───────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12px; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Progress Bar ──────────────────────────────────────────── */
.progress-bar-wrap { background: var(--bg-input); border-radius: var(--radius-full); height: 8px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.6s ease; }
.progress-bar-primary .progress-bar-fill { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.progress-bar-success .progress-bar-fill { background: linear-gradient(90deg, var(--accent), #34D399); }
.progress-bar-warning .progress-bar-fill { background: linear-gradient(90deg, var(--warning), #FCD34D); }
.progress-bar-danger .progress-bar-fill { background: linear-gradient(90deg, var(--danger), #F87171); }

/* ── Info Box ──────────────────────────────────────────────── */
.info-box {
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.info-box i { color: var(--info); flex-shrink: 0; margin-top: 1px; }

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  opacity: 0.25;
}
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state-desc { font-size: 13px; line-height: 1.6; margin-bottom: 20px; }

/* ── Tab System ────────────────────────────────────────────── */
.tab-container { }
.tab-nav { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: var(--transition);
  background: transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
}
.tab-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }
.tab-btn.active { color: var(--primary-light); border-bottom-color: var(--primary); }
.tab-pane { display: none; animation: fadeIn 0.2s ease; }
.tab-pane.active { display: block; }
