/* ========== APEXVAULT MOBILE BANKING ========== */
:root {
  --bg-deep: #0a0e1a;
  --bg-card: #112240;
  --bg-card-hover: #1a2f4f;
  --border: #233554;
  --accent: #64ffda;
  --gradient-start: #00d4aa;
  --gradient-end: #00a8e8;
  --text-muted: #8892b0;
  --text-light: #ccd6f6;
  --text-white: #ffffff;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --orange: #f97316;
  --sidebar-width: 280px;
  --bottom-nav-height: 70px;
  --header-height: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-deep);
  color: var(--text-light);
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: var(--bottom-nav-height);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ========== SUCCESS ANIMATION OVERLAY ========== */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(10px);
  z-index: 5000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.success-overlay.show {
  opacity: 1;
  visibility: visible;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transform: scale(0);
  box-shadow: 0 0 40px rgba(0, 212, 170, 0.4);
}

.success-checkmark i {
  font-size: 2.5rem;
  color: var(--bg-deep);
}

.success-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeInUp 0.5s ease 0.3s forwards;
}

.success-subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeInUp 0.5s ease 0.5s forwards;
}

@keyframes successPop {
  to { transform: scale(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== KYC BADGE ========== */
.kyc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 50px;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  margin-left: auto;
}

/* ========== OVERLAYS ========== */
.login-overlay, .logout-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s;
}

.login-overlay.hidden, .logout-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.login-logo {
  font-size: 4rem;
  margin-bottom: 12px;
  animation: pulseLogo 2s ease-in-out infinite;
}

.login-brand {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 32px;
}

.login-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

.login-overlay p, .logout-overlay p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseLogo {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* ========== APP HEADER ========== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

.menu-btn, .notif-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.menu-btn:active, .notif-btn:active {
  transform: scale(0.95);
  background: var(--bg-card-hover);
}

.header-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
}

.notif-btn { position: relative; }
.notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

/* ========== SIDEBAR DRAWER ========== */
.sidebar-drawer {
  position: fixed;
  top: 0;
  left: calc(-1 * var(--sidebar-width));
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  z-index: 200;
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-drawer.open { left: 0; }

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 199;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

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

.drawer-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-large {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-deep);
  font-weight: 700;
  font-size: 1.2rem;
}

.drawer-user h4 {
  color: var(--text-white);
  font-size: 1rem;
  margin-bottom: 2px;
}

.drawer-user p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
}

.drawer-nav {
  padding: 12px 16px;
  flex: 1;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  color: var(--text-light);
  text-decoration: none;
  margin-bottom: 4px;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
}

.drawer-link i {
  width: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
}

.drawer-link.active, .drawer-link:active {
  background: rgba(100, 255, 218, 0.1);
  color: var(--accent);
}

.drawer-link.active i, .drawer-link:active i {
  color: var(--accent);
}

.drawer-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.logout-btn {
  width: 100%;
  padding: 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  color: var(--danger);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
}

.logout-btn:active {
  transform: scale(0.98);
  background: rgba(239, 68, 68, 0.2);
}

/* ========== MAIN CONTENT ========== */
.app-main {
  padding: calc(var(--header-height) + 16px) 16px 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* ========== BALANCE CARD ========== */
.balance-card {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 212, 170, 0.2);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

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

.balance-label {
  color: rgba(10, 14, 26, 0.8);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.eye-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--bg-deep);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}

.eye-btn:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.3);
}

.balance-amount {
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
  transition: filter 0.3s;
}

.balance-amount.blurred {
  filter: blur(8px);
  user-select: none;
}

.balance-amount h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--bg-deep);
  letter-spacing: -1px;
}

.balance-actions {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 12px 16px;
  backdrop-filter: blur(10px);
}

.balance-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-label {
  color: rgba(10, 14, 26, 0.7);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.stat-value {
  color: var(--bg-deep);
  font-size: 0.95rem;
  font-weight: 700;
}

.stat-value.green { color: #065f46; }
.stat-value.orange { color: #92400e; }

/* ========== QUICK ACTIONS ========== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.action-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 8px 0;
}

.pill-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.action-pill:active .pill-icon {
  transform: scale(0.92);
}

.pill-icon.deposit { background: linear-gradient(135deg, #10b981, #059669); }
.pill-icon.withdraw { background: linear-gradient(135deg, #ef4444, #dc2626); }
.pill-icon.transfer { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.pill-icon.invest { background: linear-gradient(135deg, #f59e0b, #d97706); }

.action-pill span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ========== INVEST BANNER ========== */
.invest-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.invest-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warning);
  font-size: 1.2rem;
}

.invest-banner-info h4 {
  color: var(--warning);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.invest-banner-info p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ========== SECTION BLOCKS ========== */
.section-block {
  margin-bottom: 20px;
}

.block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
}

.block-header h3 {
  color: var(--text-white);
  font-size: 1.1rem;
  font-weight: 700;
}

.block-header a {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

/* ========== ACTIVITY LIST ========== */
.activity-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
  gap: 12px;
}

.empty-state i {
  font-size: 2rem;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.9rem;
}

/* ========== BOTTOM NAVIGATION ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(10, 14, 26, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 16px;
  z-index: 100;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  transition: color 0.3s;
  flex: 1;
}

.nav-tab i {
  font-size: 1.2rem;
  margin-bottom: 2px;
  transition: transform 0.3s;
}

.nav-tab.active {
  color: var(--accent);
}

.nav-tab.active i {
  transform: translateY(-2px);
}

.nav-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border: 4px solid var(--bg-deep);
  color: var(--bg-deep);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: -28px;
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}

.nav-fab:active {
  transform: scale(0.95);
  box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

/* ========== FLOATING CONTACTS ========== */
.floating-contacts {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 16px);
  right: 16px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.3rem;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
}

.float-btn:active {
  transform: scale(1.1);
}

.email-btn {
  background: linear-gradient(135deg, #00a8e8, #0077b6);
}

.whatsapp-btn {
  background: linear-gradient(135deg, #25d366, #128c7e);
}

.glow-pulse {
  animation: whatsappGlow 2s ease-in-out infinite;
}

@keyframes whatsappGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.4), 0 0 30px rgba(37, 211, 102, 0.2);
  }
  50% {
    box-shadow: 0 0 25px rgba(37, 211, 102, 0.8), 0 0 50px rgba(37, 211, 102, 0.4);
  }
}

/* ========== MODALS ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.show .modal {
  transform: translateY(0);
}

.modal {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px 32px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal h2 {
  color: var(--text-white);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.modal > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.modal-form { display: flex; flex-direction: column; gap: 16px; }

.form-group label {
  display: block;
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group label span { color: var(--danger); }

.form-group input, .form-group select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-white);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--accent);
}

.address-box {
  display: flex;
  gap: 8px;
}

.address-box input { flex: 1; }
.address-box button {
  padding: 12px 16px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.address-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 6px;
}

.withdraw-info {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child { border-bottom: none; }
.info-row.total {
  color: var(--text-white);
  font-weight: 700;
  font-size: 1rem;
  padding-top: 12px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-cancel, .btn-confirm {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

.btn-cancel {
  background: var(--bg-deep);
  color: var(--text-light);
  border: 1px solid var(--border);
}

.btn-confirm {
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  color: var(--bg-deep);
}

.btn-cancel:active, .btn-confirm:active {
  transform: scale(0.97);
  opacity: 0.9;
}

/* ========== SECTION CONTENT ========== */
.section-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.section-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Plans Grid */
.plans-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.plan-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(100, 255, 218, 0.1);
}

.plan-card.popular::before {
  content: 'POPULAR';
  position: absolute;
  top: 12px;
  right: -30px;
  background: var(--accent);
  color: var(--bg-deep);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 30px;
  transform: rotate(45deg);
}

.plan-card h3 {
  color: var(--text-white);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.plan-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 4px;
}

.plan-price span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

.plan-profit {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 50px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.plan-features {
  list-style: none;
  margin-bottom: 20px;
}

.plan-features li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

.plan-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  border: none;
  border-radius: 12px;
  color: var(--bg-deep);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.plan-btn:active { transform: scale(0.98); opacity: 0.9; }

/* Deposit/Withdraw grids */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s;
}

.action-btn .icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(100, 255, 218, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.action-btn h4 {
  color: var(--text-white);
  font-size: 1rem;
}

.action-btn p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.action-btn:active {
  transform: scale(0.97);
  border-color: var(--accent);
}

.action-btn.unavailable {
  opacity: 0.5;
  position: relative;
  cursor: not-allowed;
}

.unavailable-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 26, 0.7);
  border-radius: 16px;
}

.unavailable-badge {
  background: var(--danger);
  color: #fff;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Withdraw limit banner */
.withdraw-limit-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.limit-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(100, 255, 218, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.limit-info { flex: 1; }
.limit-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 4px;
}
.limit-amount {
  display: block;
  color: var(--text-white);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.limit-bar {
  height: 6px;
  background: var(--bg-deep);
  border-radius: 3px;
  overflow: hidden;
}
.limit-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  border-radius: 3px;
  transition: width 0.5s;
}

/* Referral */
.referral-box {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(0, 168, 232, 0.1));
  border: 1px solid rgba(100, 255, 218, 0.2);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
}

.referral-box h3 {
  color: var(--text-white);
  margin-bottom: 8px;
}

.referral-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.referral-link {
  display: flex;
  gap: 8px;
}

.referral-link input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-white);
  font-size: 0.85rem;
}

.referral-link button {
  padding: 12px 20px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: var(--bg-deep);
  font-weight: 700;
  cursor: pointer;
}

/* Pending */
.pending-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.pending-box h4 {
  color: var(--text-white);
  margin-bottom: 8px;
}

/* History */
.history-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.history-filters::-webkit-scrollbar { display: none; }

.filter-btn {
  padding: 8px 16px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s;
}

.filter-btn.active {
  background: rgba(100, 255, 218, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.history-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

/* Transaction item */
.transaction-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 14px;
}

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

.tx-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.tx-icon.deposit { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.tx-icon.withdraw { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.tx-icon.invest { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.tx-icon.transfer { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.tx-details { flex: 1; }
.tx-details h4 {
  color: var(--text-white);
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.tx-details p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.tx-amount {
  text-align: right;
}
.tx-amount h4 {
  font-size: 1rem;
  font-weight: 700;
}
.tx-amount h4.positive { color: var(--success); }
.tx-amount h4.negative { color: var(--danger); }
.tx-amount .tx-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.tx-status.completed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}
.tx-status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* Investment item */
.investment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.investment-item:last-child { border-bottom: none; }
.investment-item h4 {
  color: var(--text-white);
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.investment-item p {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.investment-profit {
  color: var(--success);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Stats grid inside sections */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.stat-card-header span {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.stat-icon.blue { background: rgba(0, 168, 232, 0.15); color: #00a8e8; }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.stat-icon.orange { background: rgba(249, 115, 22, 0.15); color: var(--orange); }

.stat-card h3 {
  color: var(--text-white);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.stat-card > p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Responsive */
@media (min-width: 768px) {
  .app-main { padding-top: calc(var(--header-height) + 24px); }
  .balance-amount h1 { font-size: 3rem; }
  .plans-grid { flex-direction: row; }
  .plan-card { flex: 1; }
  .actions-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ========== HIDDEN CLASS ========== */
.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* ========== LOGIN/LOGOUT OVERLAY ========== */
.login-overlay, .logout-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.login-overlay.hidden, .logout-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Gradient logo text (replaces fire emoji color) */
.login-brand, .logout-overlay .login-brand {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 32px;
}

.login-logo {
  font-size: 4rem;
  margin-bottom: 12px;
  animation: pulseLogo 2s ease-in-out infinite;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* If you want to keep "AV" text instead of emoji: */
.login-logo-text {
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  animation: pulseLogo 2s ease-in-out infinite;
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.login-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.login-overlay p, .logout-overlay p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== CLICK DELAY FIX ========== */
button, a, .action-pill, .nav-tab, .nav-fab, .drawer-link, .float-btn,
.plan-card, .action-btn, .filter-btn, .filter-tab, .toggle-btn, .eye-btn,
.menu-btn, .notif-btn, .drawer-close, .logout-btn, .pill-icon, .btn-confirm,
.btn-cancel, .file-upload-box, .referral-link button, .address-box button {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  user-select: none;
}

/* ========== PROFIT TOAST (Auto-Return Notification) ========== */
.profit-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-120px);
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.95), rgba(0, 168, 232, 0.95));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 16px 24px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 212, 170, 0.35), 0 0 0 1px rgba(255,255,255,0.1);
  z-index: 100000;
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.15);
  max-width: 90vw;
}
.profit-toast.show {
  display: flex;
  animation: toastSlideDown 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes toastSlideDown {
  to { transform: translateX(-50%) translateY(0); }
}
.profit-toast .toast-icon {
  font-size: 1.4rem;
  animation: toastIconPop 0.4s ease 0.2s both;
}
@keyframes toastIconPop {
  0% { transform: scale(0) rotate(-20deg); }
  70% { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ========== TRANSFER ANIMATIONS ========== */
.transfer-coin {
  position: fixed;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--bg-deep);
  font-weight: 800;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.5);
}
.transfer-coin.animate {
  animation: coinFly 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes coinFly {
  0% { opacity: 1; transform: scale(0.5) translateY(0); }
  40% { opacity: 1; transform: scale(1.1) translateY(-30px); }
  100% { opacity: 0; transform: scale(0.6) translateY(-100px); }
}

/* Balance pop on update */
.balance-pop {
  animation: balancePop 0.5s ease;
}
@keyframes balancePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Transfer modal button loading */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ========== ACTIVE STATE INSTANT RESPONSE ========== */
.action-pill:active .pill-icon,
.nav-tab:active,
.nav-fab:active,
.drawer-link:active,
.float-btn:active,
.plan-card:active,
.action-btn:active,
.filter-btn:active,
.eye-btn:active,
.menu-btn:active,
.notif-btn:active,
.drawer-close:active,
.logout-btn:active,
.btn-confirm:active,
.btn-cancel:active {
  transform: scale(0.92);
  transition: transform 0.08s ease;
}
