/* ===== MineFlow Dashboard UX/UI Enhancements ===== */
/* This file ONLY adds/overrides visual styles. No layout or functional changes. */

/* ===== AMBIENT BACKGROUND ===== */
.dashboard-main {
  position: relative;
}
.dashboard-main::before {
  content: '';
  position: fixed;
  top: -20%;
  left: 10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: ambientFloat1 20s ease-in-out infinite;
}
.dashboard-main::after {
  content: '';
  position: fixed;
  bottom: -10%;
  right: 5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: ambientFloat2 25s ease-in-out infinite;
}
.dashboard-content {
  position: relative;
  z-index: 1;
}

@keyframes ambientFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(80px, 40px) scale(1.1); }
  50% { transform: translate(-40px, 80px) scale(0.95); }
  75% { transform: translate(60px, -30px) scale(1.05); }
}
@keyframes ambientFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-60px, -50px) scale(1.08); }
  66% { transform: translate(50px, 40px) scale(0.92); }
}

/* ===== ENHANCED SIDEBAR ===== */
.sidebar {
  background: rgba(8, 8, 14, 0.98) !important;
  border-right: 1px solid rgba(99, 102, 241, 0.06) !important;
}
.sidebar-nav {
  padding: 0.75rem 0.625rem !important;
}
.sidebar-link {
  border-radius: 10px !important;
  padding: 0.7rem 0.9rem !important;
  margin-bottom: 2px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
}
.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #818cf8, #6366f1);
  transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-link:hover {
  background: rgba(99, 102, 241, 0.06) !important;
  color: #c4b5fd !important;
  transform: translateX(2px);
}
.sidebar-link.active {
  background: rgba(99, 102, 241, 0.1) !important;
  color: #a78bfa !important;
  font-weight: 600 !important;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.08);
}
.sidebar-link.active::before {
  height: 60%;
}
.sidebar-link svg {
  transition: transform 0.2s ease, color 0.2s ease;
}
.sidebar-link:hover svg {
  transform: scale(1.1);
}

/* Sidebar user area */
.sidebar-user {
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.06);
  transition: all 0.3s ease;
}
.sidebar-user:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.12);
}
.sidebar-user .avatar {
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

/* ===== ENHANCED TOPBAR ===== */
.dashboard-topbar {
  background: rgba(8, 8, 14, 0.85) !important;
  backdrop-filter: blur(24px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.2) !important;
  border-bottom: 1px solid rgba(99, 102, 241, 0.06) !important;
}
.topbar-left h2 {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== BALANCE DISPLAY (HEADER) ===== */
.balance-display {
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.balance-display:hover {
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.15);
}

/* ===== ENHANCED STAT CARDS ===== */
.stat-card {
  background: rgba(15, 15, 24, 0.7) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(99, 102, 241, 0.07) !important;
  border-radius: 16px !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.stat-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(99, 102, 241, 0.15) !important;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.25),
    0 0 30px rgba(99, 102, 241, 0.06) !important;
}
.stat-card:hover::after {
  opacity: 1;
}
.stat-card .stat-icon {
  border-radius: 14px !important;
  transition: all 0.3s ease;
}
.stat-card:hover .stat-icon {
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.15);
}
.stat-card .stat-value {
  font-size: 1.875rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}
.stat-card .stat-label {
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ===== ENHANCED CARDS ===== */
.card {
  background: rgba(15, 15, 24, 0.6) !important;
  backdrop-filter: blur(20px) saturate(1.1) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.1) !important;
  border: 1px solid rgba(99, 102, 241, 0.06) !important;
  border-radius: 16px !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.card:hover {
  border-color: rgba(99, 102, 241, 0.12) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
}
.card-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  padding: 1.25rem 1.5rem !important;
}
.card-header h4 {
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  color: #e2e8f0;
  letter-spacing: -0.01em;
}

/* ===== ENHANCED TABLES ===== */
.table th {
  background: rgba(8, 8, 14, 0.6) !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid rgba(99, 102, 241, 0.06) !important;
}
.table td {
  padding: 0.875rem 1rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.025) !important;
  font-size: 0.875rem;
  color: #cbd5e1;
  transition: all 0.15s ease;
}
.table tbody tr {
  transition: all 0.2s ease !important;
}
.table tbody tr:hover {
  background: rgba(99, 102, 241, 0.04) !important;
}
.table tbody tr:hover td {
  color: #e2e8f0;
}

/* ===== ENHANCED BADGES ===== */
.badge {
  border-radius: 8px !important;
  padding: 0.3rem 0.7rem !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-success {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #34d399 !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.1);
}
.badge-warning {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.1);
}
.badge-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #f87171 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.1);
}
.badge-info {
  background: rgba(99, 102, 241, 0.12) !important;
  color: #a5b4fc !important;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.1);
}
.badge-primary {
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ===== ENHANCED MODALS ===== */
.modal-overlay {
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(8px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(8px) saturate(1.2) !important;
}
.modal-overlay.active {
  animation: modalOverlayIn 0.25s ease-out !important;
}
.modal {
  background: rgba(12, 12, 20, 0.98) !important;
  border: 1px solid rgba(99, 102, 241, 0.12) !important;
  border-radius: 20px !important;
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(99, 102, 241, 0.05) !important;
  animation: modalContentIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}
.modal-header h3 {
  font-weight: 700 !important;
  letter-spacing: -0.01em;
}
.modal-close {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #64748b !important;
  transition: all 0.2s ease !important;
  font-size: 1.1rem;
}
.modal-close:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
  transform: rotate(90deg);
}

@keyframes modalOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalContentIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== ENHANCED FORM INPUTS ===== */
.form-input,
.form-control,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
  background: rgba(8, 8, 14, 0.8) !important;
  border: 1px solid rgba(99, 102, 241, 0.1) !important;
  border-radius: 12px !important;
  color: #e2e8f0 !important;
  transition: all 0.25s ease !important;
  font-size: 0.875rem;
}
.form-input:focus,
.form-control:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  border-color: rgba(99, 102, 241, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08), 0 0 20px rgba(99, 102, 241, 0.06) !important;
  outline: none !important;
}

/* ===== ENHANCED BUTTONS ===== */
.btn {
  border-radius: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #7c3aed) !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25) !important;
}
.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.4) !important;
  transform: translateY(-2px) !important;
  filter: brightness(1.05);
}
.btn-primary:active {
  transform: translateY(0) scale(0.98) !important;
}
.btn-success {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25) !important;
}
.btn-success:hover {
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.4) !important;
  transform: translateY(-2px) !important;
}

/* ===== ENHANCED SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}
::-webkit-scrollbar-track {
  background: transparent !important;
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.15) !important;
  border-radius: 8px !important;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.3) !important;
}

/* ===== ENHANCED PAGINATION ===== */
.pagination .page-btn {
  border-radius: 10px !important;
  border: 1px solid rgba(99, 102, 241, 0.08) !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}
.pagination .page-btn:hover {
  background: rgba(99, 102, 241, 0.08) !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
  color: #a5b4fc !important;
  transform: translateY(-1px);
}
.pagination .page-btn.active {
  background: rgba(99, 102, 241, 0.15) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  color: #a5b4fc !important;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}

/* ===== ENHANCED TOASTS ===== */
.toast {
  border-radius: 14px !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3) !important;
  animation: toastSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100px) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

/* ===== ENHANCED REFERRAL LINK BOX ===== */
.referral-link-box {
  border-radius: 14px !important;
  background: rgba(8, 8, 14, 0.6) !important;
  border: 1px solid rgba(99, 102, 241, 0.1) !important;
  transition: all 0.3s ease;
}
.referral-link-box:hover {
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.06);
}

/* ===== BALANCE PAGE ACTION CARDS ===== */
.stat-card[onclick],
.stat-card[style*="cursor:pointer"],
.stat-card[style*="cursor: pointer"] {
  cursor: pointer;
}
.stat-card[onclick]:hover,
.stat-card[style*="cursor:pointer"]:hover,
.stat-card[style*="cursor: pointer"]:hover {
  border-color: rgba(99, 102, 241, 0.25) !important;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.25),
    0 0 30px rgba(99, 102, 241, 0.1) !important;
}

/* ===== ASIC CARDS (STORE) ENHANCEMENTS ===== */
.asic-card {
  border-radius: 16px !important;
  background: rgba(15, 15, 24, 0.7) !important;
  border: 1px solid rgba(99, 102, 241, 0.06) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.asic-card:hover {
  transform: translateY(-6px) !important;
  border-color: rgba(99, 102, 241, 0.15) !important;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(99, 102, 241, 0.06) !important;
}
.asic-spec {
  border-radius: 12px !important;
  background: rgba(8, 8, 14, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}
.asic-card:hover .asic-spec {
  border-color: rgba(99, 102, 241, 0.06);
}
.asic-card-icon {
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12)) !important;
  transition: all 0.3s ease;
}
.asic-card:hover .asic-card-icon {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.2);
}

/* ===== DASHBOARD PAGE TRANSITIONS ===== */
.dashboard-page.active {
  animation: pageEnter 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== STATS GRID STAGGER ===== */
.stats-grid .stat-card:nth-child(1) { animation-delay: 0s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.05s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.1s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.15s; }

/* ===== CHART CARD IMPROVEMENTS ===== */
.chart-container {
  border-radius: 12px;
}

/* ===== BOUNTY SIDEBAR BUTTON ENHANCEMENT ===== */
.sidebar-bounty-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.sidebar-bounty-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2) !important;
}

/* ===== SELECTION COLOR ===== */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
}

/* ===== LOADING SPINNER ENHANCEMENT ===== */
.spinner {
  border-color: rgba(99, 102, 241, 0.1) !important;
  border-top-color: #818cf8 !important;
}

/* ===== RESPONSIVE FIXES FOR ENHANCEMENTS ===== */
@media (max-width: 768px) {
  .dashboard-main::before,
  .dashboard-main::after {
    display: none;
  }
  .stat-card .stat-value {
    font-size: 1.5rem !important;
  }
  .quick-btn-row {
    flex-wrap: wrap;
  }
  .quick-btn {
    min-width: 45%;
  }
}

/* ===== STORE CALCULATOR ===== */
.quick-btn-row { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.quick-btn { flex: 1; background: rgba(99, 102, 241, 0.1); border: 1px solid rgba(99, 102, 241, 0.2); border-radius: 6px; color: #a5b4fc; font-size: 0.7rem; font-weight: 700; padding: 0.3rem 0; cursor: pointer; transition: all 0.2s; text-align: center; }
.quick-btn:hover { background: rgba(99, 102, 241, 0.2); color: #fff; border-color: rgba(99, 102, 241, 0.4); transform: translateY(-1px); }
.calc-result-box { display: none; margin-top: 1rem; padding: 1rem; background: rgba(16, 185, 129, 0.05); border: 1px solid rgba(16, 185, 129, 0.15); border-radius: 12px; backdrop-filter: blur(8px); animation: fadeIn 0.3s ease; }
.calc-result-box.invalid { background: rgba(239, 68, 68, 0.05); border-color: rgba(239, 68, 68, 0.15); }
.calc-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.calc-row:last-child { margin-bottom: 0; }
.calc-label { color: var(--text-muted); font-size: 0.8125rem; font-weight: 500; }
.calc-val { color: #34d399; font-weight: 700; font-size: 0.9rem; }
.calc-result-box.invalid .calc-val { color: #f87171; }

