﻿/* Modern UI styles for all pages, with specific styles for referrals.html */
:root {
  /* ===== PRIMARY COLORS & GRADIENTS ===== */
  --primary-gradient: linear-gradient(135deg, #1e3a8a, #7e22ce);
  --hover-gradient: linear-gradient(135deg, #1e40af, #6b21a8);
  --accent-color: #3b82f6;
  --background-dark: #0a0f20;
  --card-bg: rgba(20, 30, 50, 0.95);
  
  /* ===== APP-SPECIFIC COLORS (for trade.html compatibility) ===== */
  --app-balance: rgba(26, 43, 75, 0.95);
  --app-card: rgba(26, 43, 75, 0.95);
  --app-bgDark: rgba(12, 20, 38, 0.92);
  --app-btnDeposit: #3b82f6;
  --app-cardBorder: rgba(96, 165, 250, 0.24);
  --app-textBlue: #38bdf8;
  --app-textGray: #cbd5e1;
  --app-textMuted: #94a3b8;
  
  /* ===== RESPONSIVE BREAKPOINTS ===== */
  /* Mobile: 320px | Mobile-LG: 480px | Tablet: 768px | Desktop: 1024px | Wide: 1280px */
  
  /* ===== BACKDROP FILTERS (STANDARDIZED) ===== */
  --backdrop-blur: blur(12px);
  --app-balance: rgba(26, 43, 75, 0.95);
  --app-card: rgba(26, 43, 75, 0.95);
  --app-bgDark: rgba(12, 20, 38, 0.92);
  --app-btnDeposit: #3b82f6;
  --app-cardBorder: rgba(96, 165, 250, 0.24);
  --app-textBlue: #38bdf8;
  --app-textGray: #cbd5e1;
  --app-textMuted: #94a3b8;
  
  /* ===== RESPONSIVE BREAKPOINTS ===== */
  /* Mobile: 320px | Mobile-LG: 480px | Tablet: 768px | Desktop: 1024px | Wide: 1280px */
  
  /* ===== BACKDROP FILTERS (STANDARDIZED) ===== */
  --backdrop-blur: blur(12px);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Toast Notification Animations */
@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(400px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutToRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

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

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.animate-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-out {
  animation: fadeOut 0.3s ease-out;
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

.fade-out {
  animation: fadeOut 0.3s ease-out;
}

.slide-in-from-right-4 {
  animation: slideInFromRight 0.3s ease-out;
}

.slide-out-to-right-4 {
  animation: slideOutToRight 0.3s ease-out;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0a0f20 0%, #1a1f3a 25%, #2a1a4a 50%, #1a2f4a 75%, #0f1520 100%);
  background-attachment: fixed;
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  color: #f1f5f9;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.45;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse 80% 80% at 50% 0%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
              radial-gradient(ellipse 60% 60% at 0% 100%, rgba(126, 34, 206, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

img,
canvas,
svg {
  max-width: 100%;
}

.w-full.max-w-xs {
  max-width: 90%;
  margin: 0 auto;
}

/* ===== MODAL STYLING ===== */

/* Backdrop - beautiful blur and dim effect */
/* ===== UNIFIED MODAL SYSTEM ===== */
#upload-modal-backdrop,
#modal-backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: var(--backdrop-blur) saturate(1.2);
  -webkit-backdrop-filter: var(--backdrop-blur) saturate(1.2);
  transition: opacity 0.3s ease-out;
  animation: backdropFadeIn 0.3s ease-out;
}

#upload-modal-backdrop.hidden {
  display: none !important;
}

#upload-modal-backdrop:not(.hidden) {
  opacity: 1 !important;
}

/* Modal Container - modern card with depth */
/* ===== MODAL CONTAINER BASE ===== */
#upload-modal,
#quantity-modal,
#payment-modal,
#mpesa-modal,
.modal-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: linear-gradient(135deg, rgba(20, 30, 50, 0.98) 0%, rgba(15, 25, 45, 0.98) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 1px rgba(59, 130, 246, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  transition: all 0.3s ease-out;
  z-index: 101;
}

#upload-modal.hidden {
  display: none !important;
}

#upload-modal:not(.hidden) {
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) !important;
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Modal Header */
/* ===== MODAL HEADER ===== */
#upload-modal .flex.justify-between,
.modal-header {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(126, 34, 206, 0.05) 100%);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px 20px 0 0;
}

#upload-modal h3,
.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.5px;
}

/* Close button */
#close-upload-modal-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(226, 232, 240, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.1);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

#close-upload-modal-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  transform: rotate(90deg);
}

/* Form Container */
/* ===== MODAL BODY ===== */
#upload-form,
.modal-body {
  padding: 1.75rem;
}

#upload-form .space-y-4 > * + *,
.modal-body .space-y-4 > * + * {
  margin-top: 1.25rem;
}

/* Form Labels */
#upload-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.75rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Image Preview Box */
#image-preview-box {
  position: relative;
  width: 100%;
  min-height: 160px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.3), rgba(126, 34, 206, 0.2));
  border: 2px dashed rgba(59, 130, 246, 0.4);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

#image-preview-box::before {
  content: '📸';
  position: absolute;
  font-size: 2rem;
  opacity: 0.3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -70%);
}

#image-preview-box:hover {
  border-color: rgba(59, 130, 246, 0.7);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.5), rgba(126, 34, 206, 0.3));
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

#image-preview-box.has-image {
  border-style: solid;
  background: rgba(30, 58, 138, 0.1);
}

/* Image Preview */
#image-preview {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(10, 15, 30, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Text Input */
#caption-input {
  width: 100%;
  padding: 0.9rem 1rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  color: #f1f5f9;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

#caption-input::placeholder {
  color: #64748b;
  opacity: 0.7;
}

#caption-input:focus {
  border-color: rgba(59, 130, 246, 0.8);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* Submit Button */
#submit-proof-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: 0.3px;
}

#submit-proof-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

#submit-proof-btn:hover::before {
  left: 100%;
}

#submit-proof-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

#submit-proof-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#submit-proof-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner Animation */
#submit-proof-spinner {
  animation: spin 1s linear infinite;
}

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

/* ===== RESPONSIVE MODAL ===== */

@media (max-width: 768px) {
  #upload-modal,
  #quantity-modal,
  #payment-modal,
  #mpesa-modal,
  .modal-container {
    width: 95%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
  }

  #upload-modal .flex.justify-between {
    padding: 1rem 1.25rem;
  }

  #upload-form {
    padding: 1.5rem 1.25rem 2rem;
  }
}

@media (max-width: 480px) {
  #upload-modal {
    width: 98%;
    max-width: 380px;
    max-height: 95vh;
  }

  #upload-modal h3 {
    font-size: 1.1rem;
  }

  #upload-form label {
    font-size: 0.85rem;
  }
  
  #image-preview-box {
    min-height: 140px;
  }
  
  #submit-proof-btn {
    padding: 0.9rem 1.25rem;
    font-size: 0.9rem;
  }
}

.bg-gray-800 {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ===== UNIFIED FORM INPUT SYSTEM ===== */
.form-input,
input {
  background: var(--card-bg);
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: #f1f5f9;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  box-sizing: border-box;
}

.form-input:focus,
input:focus {
  border-color: #7e22ce;
  box-shadow: 0 0 12px rgba(126, 34, 206, 0.6);
  transform: scale(1.02);
}

.form-input::placeholder,
input::placeholder {
  color: #9ca3af;
  opacity: 0.7;
}

.form-input.error {
  border-color: #f87171;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.4);
}

.form-input.success {
  border-color: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}

button {
  position: relative;
  overflow: hidden;
  background: var(--primary-gradient);
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  background: var(--hover-gradient);
}

button:active {
  transform: scale(0.95);
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

button:active::before {
  width: 400px;
  height: 400px;
}

/* Removed unused .text-red-500 - now using unified text utilities */
.text-green-500 {
  color: #10b981;
}

.text-red-500 {
  color: #ef4444;
}

/* Removed unused selector .w-full.max-w-xs - handled by container */
.js-hidden {
  display: none !important;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

@media (min-width: 1280px) {
  html {
    font-size: 15px;
  }

  body {
    line-height: 1.45;
  }

  .container {
    max-width: 1280px;
    padding: 1.25rem 1.5rem;
  }

  .section, .mining-grid, .crypto-card, .withdraw-section {
    padding: 1.125rem;
    border-radius: 16px;
  }

  input {
    font-size: 0.95rem;
    padding: 0.65rem 0.9rem;
  }

  button {
    padding: 0.62rem 1.15rem;
    font-size: 0.95rem;
    font-weight: 600;
  }
}

/* Top bar (for admin/management pages) */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(10, 15, 30, 0.98);
  backdrop-filter: var(--backdrop-blur);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  margin-bottom: 1.5rem;
}

.avatar {
  background: var(--primary-gradient);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.avatar:hover {
  transform: rotate(360deg);
}

.user-name {
  font-weight: 600;
}

.mobile {
  font-size: 0.75rem;
  color: #9ca3af;
}

.notification {
  position: relative;
}

.red-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  border-radius: 50%;
  width: 10px;
  height: 10px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.balance-section {
  background: var(--primary-gradient);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.balance-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: glow 8s ease-in-out infinite;
}

@keyframes glow {
  0% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 0.5; }
  100% { transform: scale(1); opacity: 0.3; }
}

/* ===== UNIFIED BUTTON SYSTEM ===== */
.btn,
.balance-buttons button,
.deposit-row button,
.mining-btn,
.deposit-btn,
.withdraw-btn,
.action-btn {
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover,
.deposit-btn:hover,
.withdraw-btn:hover,
.balance-buttons button:hover,
.mining-btn:hover {
  background: var(--hover-gradient);
}

.deposit-btn,
.withdraw-btn,
.balance-buttons button,
.mining-btn {
  background: var(--primary-gradient);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
}

.btn-primary:hover {
  background: var(--hover-gradient);
}

.btn-secondary {
  background: rgba(50, 60, 80, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.5rem 1rem;
}

.btn-secondary:hover {
  background: var(--primary-gradient);
  border-color: transparent;
}

/* ===== UNIFIED CARD SYSTEM (Base Card Component) ===== */
.card-base,
.section,
.mining-grid,
.crypto-card,
.bg-app-card,
.bg-app-balance,
.bg-app-bgDark {
  background: linear-gradient(135deg, rgba(26, 43, 75, 0.95), rgba(12, 20, 38, 0.92));
  border: 1px solid rgba(96, 165, 250, 0.24);
  backdrop-filter: var(--backdrop-blur);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.42);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover,
.mining-grid:hover,
.crypto-card:hover,
.bg-app-card:hover,
.bg-app-balance:hover,
.bg-app-bgDark:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
}

/* ===== APP-SPECIFIC COLOR CLASSES (trade.html compatibility) ===== */
.bg-app-balance { background-color: var(--app-balance); }
.bg-app-card { background-color: var(--app-card); }
.bg-app-bgDark { background-color: var(--app-bgDark); }
.text-app-textBlue { color: var(--app-textBlue); }
.text-app-textGray { color: var(--app-textGray); }
.text-app-textMuted { color: var(--app-textMuted); }
.bg-app-btnDeposit { background-color: var(--app-btnDeposit); }
.bg-app-cardBorder { border-color: var(--app-cardBorder); }

/* Portfolio asset strip - horizontal scroll and responsive cards */
.asset-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.75rem 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  white-space: nowrap;
}

.asset-strip::-webkit-scrollbar {
  height: 8px;
}

.asset-strip::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

.asset-strip::-webkit-scrollbar-thumb {
  background: rgba(147, 197, 253, 0.75);
  border-radius: 999px;
}

.asset-summary-card {
  flex: 0 0 145px;
  min-width: 145px;
  max-width: 190px;
  width: 22%;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.asset-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.asset-summary-card.active-asset {
  border: 2px solid #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

@media (max-width: 1024px) {
  .asset-summary-card {
    flex: 0 0 130px;
    min-width: 130px;
    max-width: 150px;
    width: 30%;
    padding: 0.8rem;
  }

  .asset-summary-card .asset-top .coin-image {
    width: 2.25rem;
    height: 2.25rem;
  }

  .asset-summary-card .asset-symbol {
    font-size: 0.88rem;
  }

  .asset-summary-card .asset-price,
  .asset-summary-card .percentage {
    font-size: 0.78rem;
  }
}

@media (max-width: 640px) {
  .asset-summary-card {
    flex: 0 0 120px;
    min-width: 120px;
    max-width: 140px;
    width: 35%;
    padding: 0.65rem;
  }

  .asset-summary-card .asset-top .coin-image {
    width: 1.9rem;
    height: 1.9rem;
  }

  .asset-summary-card .asset-symbol {
    font-size: 0.78rem;
  }

  .asset-summary-card .asset-price,
  .asset-summary-card .percentage {
    font-size: 0.71rem;
  }
}


.withdraw-section {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* .withdraw-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  animation: glow 10s ease-in-out infinite;
} */

.withdraw-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 1rem;
}

.withdraw-section label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #e2e8f0;
  margin-bottom: 0.5rem;
  display: block;
}

/* Withdraw section inputs use unified form-input class */
.withdraw-section input {
  /* All styles inherited from .form-input and input selectors above */
}

.withdraw-section .withdraw-info {
  background: rgba(30, 40, 60, 0.95);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1.5rem;
}

.withdraw-section .info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.withdraw-section .info-row:last-child {
  border-bottom: none;
}

/* Referral page-specific styles */
body.referrals-page .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  padding-bottom: 80px;
  box-sizing: border-box;
  flex-grow: 1;
  position: relative;
  z-index: 1;
}

body.referrals-page .header {
  text-align: center;
  padding: 60px 0 40px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

body.referrals-page .header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  animation: glow 10s ease-in-out infinite;
}

body.referrals-page .header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.referrals-page .header h1::before {
  content: "👥";
  margin-right: 10px;
  font-size: 1.5rem;
}

body.referrals-page .header p {
  font-size: 1rem;
  color: #9ca3af;
  max-width: 600px;
  margin: 10px auto;
}

body.referrals-page .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 40px 0;
}

body.referrals-page .stat-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

body.referrals-page .stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  animation: glow 8s ease-in-out infinite;
}

body.referrals-page .stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

body.referrals-page .stat-card h2 {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 10px;
}

body.referrals-page .stat-card p {
  font-size: 0.9rem;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

body.referrals-page .invitation-section {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 40px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

body.referrals-page .invitation-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  animation: glow 10s ease-in-out infinite;
}

body.referrals-page .invitation-section p {
  color: #e2e8f0;
  margin-bottom: 15px;
  font-size: 1rem;
}

body.referrals-page .invitation-link-box {
  display: flex;
  align-items: center;
  background: rgba(30, 40, 60, 0.95);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.referrals-page .invitation-link-box a {
  color: var(--accent-color);
  flex-grow: 1;
  word-break: break-all;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

body.referrals-page .invitation-link-box a:hover {
  color: #93c5fd;
}

body.referrals-page .invitation-link-box button {
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  padding: 8px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.referrals-page .invitation-link-box button:hover {
  background: var(--hover-gradient);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

body.referrals-page .share-options {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

body.referrals-page .share-option {
  flex: 1;
  padding: 12px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.referrals-page .share-option:hover {
  transform: translateY(-3px);
  background: rgba(50, 60, 80, 0.95);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

body.referrals-page .share-option.whatsapp { color: #25D366; }
body.referrals-page .share-option.telegram { color: #0088cc; }
body.referrals-page .share-option.twitter { color: #1DA1F2; }
body.referrals-page .share-option.facebook { color: #1877F2; }

body.referrals-page .commission-section {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

body.referrals-page .commission-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  animation: glow 10s ease-in-out infinite;
}

body.referrals-page .commission-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 20px;
}

body.referrals-page .commission-table {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 10px;
  text-align: left;
  font-size: 0.875rem;
  color: #e2e8f0;
}

body.referrals-page .commission-table div {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.referrals-page .commission-table div:last-child {
  border-bottom: none;
}

body.referrals-page .redirect-section {
  margin-top: 20px;
}

body.referrals-page .redirect-button {
  background: var(--primary-gradient);
  border: none;
  border-radius: 12px;
  padding: 15px;
  width: 100%;
  text-align: left;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.referrals-page .redirect-button:hover {
  background: var(--hover-gradient);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.transaction-row, .mining-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 40, 60, 0.95);
  border-radius: 12px;
  padding: 0.75rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.transaction-row:hover, .mining-row:hover {
  background: rgba(50, 60, 80, 0.95);
  transform: scale(1.03);
}

.mining-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1rem;
  transition: transform 0.3s ease;
}

.mining-card:hover {
  transform: translateY(-4px);
}

.trend-card {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-section {
  margin-bottom: 1.5rem;
}

.chart-container {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.chart-container canvas {
  max-width: 100% !important;
}

/* ===== UNIFIED BUTTON GROUPS ===== */
.time-buttons button,
.tab-button {
  background: rgba(50, 60, 80, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.time-buttons button:hover,
.time-buttons button.active,
.tab-button.active,
.tab-button:hover {
  background: var(--primary-gradient);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.nav-bar {
  display: flex;
  justify-content: space-around;
  padding: 1rem;
  background: rgba(10, 15, 30, 0.98);
  backdrop-filter: var(--backdrop-blur);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 70px;
  border-top: 1px solid rgba(96, 165, 250, 0.1);
}

.nav-item {
  color: #9ca3af;
  cursor: pointer;
  text-align: center;
  flex: 1;
  transition: transform 0.3s ease, color 0.3s ease;
}

.nav-item .icon {
  font-size: 1.5rem;
  display: block;
}

.nav-item .text {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-item.active {
  color: var(--accent-color);
  border-bottom: 4px solid var(--accent-color);
  transform: scale(1.05);
}

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

.nav-item:hover {
  color: #93c5fd;
  transform: scale(1.05);
}

.warning-section {
  border: 2px solid #ef4444;
  border-radius: 16px;
  padding: 1.5rem;
  background: var(--card-bg);
  transition: transform 0.3s ease;
}

.warning-section:hover {
  transform: translateY(-4px);
}

@media (max-width: 768px) {
  .container {
    padding: 0.5rem;
  }
  .section, .mining-grid, .crypto-card, .withdraw-section {
    padding: 1rem;
  }
  .w-full.max-w-xs {
    max-width: 100%;
  }
  button {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
  .withdraw-section input {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  .withdraw-section label {
    font-size: 0.75rem;
  }
  .withdraw-section .info-row {
    font-size: 0.75rem;
  }
  .tab-button {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
  body.referrals-page .header {
    padding: 40px 0 20px;
  }
  body.referrals-page .header h1 {
    font-size: 1.75rem;
  }
  body.referrals-page .header p {
    font-size: 0.875rem;
  }
  body.referrals-page .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  body.referrals-page .stat-card {
    padding: 20px;
  }
  body.referrals-page .stat-card h2 {
    font-size: 2rem;
  }
  body.referrals-page .stat-card p {
    font-size: 0.8rem;
  }
  body.referrals-page .invitation-section {
    padding: 20px;
  }
  body.referrals-page .invitation-link-box {
    flex-direction: column;
    gap: 10px;
  }
  body.referrals-page .invitation-link-box a {
    font-size: 0.8rem;
  }
  body.referrals-page .invitation-link-box button {
    padding: 6px 12px;
    font-size: 0.875rem;
  }
  body.referrals-page .share-options {
    flex-wrap: wrap;
    gap: 8px;
  }
  body.referrals-page .share-option {
    padding: 10px;
    font-size: 0.8rem;
  }
  body.referrals-page .commission-section {
    padding: 20px;
  }
  body.referrals-page .commission-table {
    grid-template-columns: 1fr;
    font-size: 0.75rem;
  }
  body.referrals-page .redirect-button {
    padding: 12px;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .withdraw-section input {
    font-size: 0.8rem;
  }
  .withdraw-section label {
    font-size: 0.75rem;
  }
  body.referrals-page .header h1 {
    font-size: 1.5rem;
  }
  body.referrals-page .stat-card h2 {
    font-size: 1.75rem;
  }
  body.referrals-page .invitation-link-box a {
    font-size: 0.75rem;
  }
  body.referrals-page .share-option {
    font-size: 0.75rem;
  }
  body.referrals-page .commission-table {
    font-size: 0.7rem;
  }
}

/* Signup page */
:root {
  --signup-bg: linear-gradient(135deg, #020617 0%, #08122b 35%, #0a1f4c 70%, #031125 100%);
  --signup-card: rgba(23, 35, 58, 0.96);
  --signup-border: rgba(148, 163, 184, 0.14);
  --signup-input: #06142f;
  --signup-text-soft: #94a3b8;
  --signup-primary: #3267ea;
  --signup-primary-hover: #3b82f6;
}

body.signup-page {
  font-family: 'Inter', sans-serif;
  background: var(--signup-bg);
  color: #f8fafc;
}

body.signup-page .signup-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

body.signup-page .signup-frame {
  width: 100%;
  max-width: 560px;
}

body.signup-page .brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

body.signup-page .brand-badge {
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

body.signup-page .brand-logo-image {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

body.signup-page .brand-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

body.signup-page .brand-subtitle {
  text-align: center;
  color: #93c5fd;
  margin: 0 0 18px;
  font-size: 0.95rem;
}

body.signup-page .signup-card {
  background: var(--signup-card);
  border: 1px solid var(--signup-border);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
}

body.signup-page .signup-card-header {
  padding: 32px 24px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

body.signup-page .signup-heading {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.03em;
}

body.signup-page .signup-copy {
  margin: 10px 0 0;
  color: #a8bddf;
  font-size: 1rem;
}

body.signup-page .coin-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

body.signup-page .coin-badge {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 22, 43, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.signup-page .coin-badge img {
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.signup-page .signup-card-body {
  padding: 24px;
}

body.signup-page .form-message {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  line-height: 1.4;
}

body.signup-page .form-message.show {
  display: flex;
}

body.signup-page .form-message.error {
  background: rgba(127, 29, 29, 0.3);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

body.signup-page .form-message.success {
  background: rgba(21, 128, 61, 0.25);
  border: 1px solid rgba(74, 222, 128, 0.32);
  color: #dcfce7;
}

body.signup-page .field-stack {
  display: grid;
  gap: 14px;
}

body.signup-page .field-shell {
  position: relative;
}

body.signup-page .field-shell input {
  width: 100%;
  height: 64px;
  padding: 0 14px 0 48px;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  background: var(--signup-input);
  color: #f8fafc;
  font-size: 1.05rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body.signup-page .field-shell input:focus {
  border-color: rgba(96, 165, 250, 0.95);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
  transform: translateY(-1px);
}

body.signup-page .field-shell input::placeholder {
  color: #7183a0;
  opacity: 1;
}

body.signup-page .field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #7b8ba8;
  font-size: 1.15rem;
  pointer-events: none;
}

body.signup-page button.toggle-visibility {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: #93c5fd;
  padding: 0;
  border: 0;
  box-shadow: none;
  font-size: 0.88rem;
  font-weight: 600;
  overflow: visible;
}

body.signup-page button.toggle-visibility:hover,
body.signup-page button.toggle-visibility:active {
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%);
}

body.signup-page button.toggle-visibility::before {
  display: none;
}

body.signup-page .signup-submit {
  width: 100%;
  min-height: 60px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(90deg, var(--signup-primary), #3b82f6);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.3);
}

body.signup-page .signup-submit:hover {
  background: linear-gradient(90deg, #2f5fe0, var(--signup-primary-hover));
}

body.signup-page .signup-submit[disabled] {
  opacity: 0.75;
  cursor: wait;
}

body.signup-page .helper-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(30, 64, 175, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.18);
  color: #dbeafe;
}

body.signup-page .helper-icon {
  font-size: 1rem;
  line-height: 1;
  margin-top: 2px;
}

body.signup-page .signup-meta {
  padding: 22px 24px 18px;
  text-align: center;
  color: var(--signup-text-soft);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

body.signup-page .signup-meta a {
  color: #38bdf8;
  font-weight: 700;
}

body.signup-page .helpline {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.95rem;
  color: #9fb2d1;
}

@media (max-width: 640px) {
  body.signup-page .signup-card-header,
  body.signup-page .signup-card-body,
  body.signup-page .signup-meta,
  body.login-page .login-card-header,
  body.login-page .login-card-body,
  body.login-page .signup-meta {
    padding-left: 18px;
    padding-right: 18px;
  }

  body.signup-page .brand-title,
  body.signup-page .signup-heading,
  body.login-page .brand-title,
  body.login-page .login-heading {
    font-size: 1.75rem;
  }

  body.signup-page .field-shell input,
  body.login-page .field-shell input {
    height: 58px;
    font-size: 1rem;
  }
}

/* Login page */
:root {
  --login-bg: linear-gradient(135deg, #020617 0%, #08122b 35%, #0a1f4c 70%, #031125 100%);
  --login-card: rgba(23, 35, 58, 0.96);
  --login-border: rgba(148, 163, 184, 0.14);
  --login-input: #06142f;
  --login-text-soft: #94a3b8;
  --login-primary: #3267ea;
  --login-primary-hover: #3b82f6;
}

body.login-page {
  font-family: 'Inter', sans-serif;
  background: var(--login-bg);
  color: #f8fafc;
}

body.login-page .login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

body.login-page .login-frame {
  width: 100%;
  max-width: 560px;
}

body.login-page .brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

body.login-page .brand-badge {
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

body.login-page .brand-logo-image {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

body.login-page .brand-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

body.login-page .brand-subtitle {
  text-align: center;
  color: #93c5fd;
  margin: 0 0 18px;
  font-size: 0.95rem;
}

body.login-page .login-auth-card {
  background: var(--login-card);
  border: 1px solid var(--login-border);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
}

body.login-page .login-card-header {
  padding: 32px 24px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

body.login-page .login-heading {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.03em;
}

body.login-page .login-copy {
  margin: 10px 0 0;
  color: #a8bddf;
  font-size: 1rem;
}

body.login-page .coin-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

body.login-page .coin-badge {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 22, 43, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.login-page .coin-badge img {
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.login-page .login-card-body {
  padding: 24px;
}

body.login-page .auth-message {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  line-height: 1.4;
  background: rgba(127, 29, 29, 0.3);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

body.login-page .auth-message.hidden {
  display: none;
}

body.login-page .field-stack {
  display: grid;
  gap: 14px;
}

body.login-page .field-shell {
  position: relative;
}

body.login-page .field-shell input {
  width: 100%;
  height: 64px;
  padding: 0 14px 0 48px;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  background: var(--login-input);
  color: #f8fafc;
  font-size: 1.05rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body.login-page .field-shell input:focus {
  border-color: rgba(96, 165, 250, 0.95);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
  transform: translateY(-1px);
}

body.login-page .field-shell input::placeholder {
  color: #7183a0;
  opacity: 1;
}

body.login-page .field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #7b8ba8;
  font-size: 1.15rem;
  pointer-events: none;
}

body.login-page button.toggle-visibility {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: #93c5fd;
  padding: 0;
  border: 0;
  box-shadow: none;
  font-size: 0.88rem;
  font-weight: 600;
  overflow: visible;
}

body.login-page button.toggle-visibility:hover,
body.login-page button.toggle-visibility:active {
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%);
}

body.login-page button.toggle-visibility::before {
  display: none;
}

body.login-page .auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: #cbd5e1;
}

body.login-page .remember-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.login-page .remember-label input {
  width: auto;
  height: auto;
  accent-color: #3b82f6;
}

body.login-page .forgot-btn {
  color: #93c5fd;
  font-weight: 600;
}

body.login-page .login-submit {
  width: 100%;
  min-height: 60px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(90deg, var(--login-primary), #3b82f6);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.3);
}

body.login-page .login-submit:hover {
  background: linear-gradient(90deg, #2f5fe0, var(--login-primary-hover));
}

body.login-page .login-submit[disabled] {
  opacity: 0.75;
  cursor: wait;
}

body.login-page .helper-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(30, 64, 175, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.18);
  color: #dbeafe;
}

body.login-page .helper-icon {
  font-size: 1rem;
  line-height: 1;
  margin-top: 2px;
}

body.login-page .signup-meta {
  padding: 22px 24px 18px;
  text-align: center;
  color: var(--login-text-soft);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

body.login-page .signup-meta a {
  color: #38bdf8;
  font-weight: 700;
}

body.login-page .helpline {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.95rem;
  color: #9fb2d1;
}

/* Portfolio page */
body.portfolio-page {
  --portfolio-card: rgba(24, 37, 63, 0.92);
  --portfolio-card-soft: rgba(14, 26, 49, 0.92);
  --portfolio-border: rgba(96, 165, 250, 0.14);
  --portfolio-blue: #38bdf8;
  --portfolio-green: #16e0a0;
  background: var(--background-dark);
  color: #f1f5f9;
  min-height: 100vh;
  padding-bottom: 92px;
}

body.portfolio-page .dashboard-shell {
  min-height: 100vh;
}

body.portfolio-page .container {
  max-width: 1360px;
  padding-top: 16px;
  padding-bottom: 24px;
}

body.portfolio-page .main-content {
  display: grid;
  gap: 14px;
}

body.portfolio-page .section {
  background: var(--portfolio-card);
  border: 1px solid var(--portfolio-border);
  border-radius: 24px;
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.45);
  padding: 24px;
  margin-bottom: 0;
}

body.portfolio-page .section:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.5);
}

body.portfolio-page .dashboard-hero {
  background: linear-gradient(90deg, rgba(17, 29, 54, 0.96), rgba(5, 17, 48, 0.96));
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

body.portfolio-page .hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

body.portfolio-page .hero-eyebrow {
  margin: 0 0 6px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8db5ff;
}

body.portfolio-page .hero-title {
  margin: 0;
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

body.portfolio-page .hero-user-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(10, 22, 43, 0.72);
  border: 1px solid rgba(96, 165, 250, 0.12);
}

body.portfolio-page .hero-user-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

body.portfolio-page .user-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
}

body.portfolio-page .user-mobile {
  font-size: 0.98rem;
  color: #b9cae7;
}

body.portfolio-page .bell-button {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: rgba(8, 20, 41, 0.85);
  border: 1px solid rgba(96, 165, 250, 0.16);
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

body.portfolio-page .bell-button:hover,
body.portfolio-page .bell-button:active {
  transform: translateY(-1px);
  background: rgba(10, 24, 48, 0.95);
}

body.portfolio-page .bell-button::before {
  display: none;
}

body.portfolio-page .bell-count {
  position: absolute;
  top: -6px;
  right: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.portfolio-page .section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

body.portfolio-page .section-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body.portfolio-page .section-heading h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
}

body.portfolio-page .section-meta {
  color: #a5bddf;
  font-size: 1rem;
}

body.portfolio-page .live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(22, 224, 160, 0.12);
  color: var(--portfolio-green);
  border: 1px solid rgba(22, 224, 160, 0.22);
  font-size: 0.85rem;
  font-weight: 700;
}

body.portfolio-page .transaction-list {
  display: grid;
  gap: 12px;
}

body.portfolio-page .transaction-row.transaction-card-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-radius: 18px;
  border: 1px solid rgba(96, 165, 250, 0.12);
  background: var(--portfolio-card-soft);
}

body.portfolio-page .transaction-asset {
  display: flex;
  align-items: center;
  gap: 14px;
}

body.portfolio-page .transaction-logo {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  object-fit: contain;
  background: rgba(8, 22, 46, 0.8);
  padding: 8px;
}

body.portfolio-page .transaction-symbol {
  font-size: 1.55rem;
  font-weight: 700;
}

body.portfolio-page .transaction-reference,
body.portfolio-page .transaction-time {
  color: #9db1cf;
  font-size: 0.95rem;
}

body.portfolio-page .transaction-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(22, 224, 160, 0.12);
  color: var(--portfolio-green);
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
}

body.portfolio-page .amount-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

body.portfolio-page .transaction-kes {
  font-size: 2rem;
  font-weight: 800;
  color: var(--portfolio-green);
}

body.portfolio-page .balance-hero {
  background: linear-gradient(135deg, rgba(25, 70, 122, 0.96), rgba(10, 84, 119, 0.96));
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

body.portfolio-page .balance-copy {
  position: relative;
  z-index: 1;
}

body.portfolio-page .balance-title {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 12px;
}

body.portfolio-page .currency-line {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

body.portfolio-page .currency-prefix {
  font-size: 1.45rem;
  font-weight: 700;
  opacity: 0.95;
  margin-bottom: 4px;
}

body.portfolio-page .balance-amount {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 3.3rem);
  font-weight: 800;
  line-height: 1;
}

body.portfolio-page .balance-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 160px));
  gap: 12px;
  margin-top: 18px;
}

body.portfolio-page .action-btn {
  min-width: 0;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-size: 0.92rem;
}

body.portfolio-page .action-secondary {
  background: linear-gradient(90deg, #10b981, #1ecb88);
}

body.portfolio-page .balance-icons {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

body.portfolio-page .tiny-coin {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: rgba(7, 20, 43, 0.8);
  padding: 6px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body.portfolio-page .asset-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.75rem 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  white-space: nowrap;
}

body.portfolio-page .asset-summary-card {
  flex: 0 0 135px;
  min-width: 135px;
  max-width: 180px;
  margin: 0;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(96, 165, 250, 0.12);
  min-height: 112px;
  scroll-snap-align: start;
}

body.portfolio-page .asset-strip::-webkit-scrollbar {
  height: 8px;
}

body.portfolio-page .asset-strip::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

body.portfolio-page .asset-strip::-webkit-scrollbar-thumb {
  background: rgba(147, 197, 253, 0.75);
  border-radius: 999px;
}

body.portfolio-page .active-asset {
  background: linear-gradient(180deg, rgba(17, 82, 119, 0.95), rgba(20, 53, 92, 0.95));
  border-color: rgba(56, 189, 248, 0.7);
}

body.portfolio-page .asset-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

body.portfolio-page .asset-symbol {
  font-size: 1.1rem;
  font-weight: 700;
}

body.portfolio-page .asset-price {
  margin: 2px 0 0;
  color: #b8cbea;
  font-size: 0.92rem;
}

body.portfolio-page .percentage {
  font-weight: 700;
}

body.portfolio-page .chart-panel-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

body.portfolio-page .pair-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 700;
}

body.portfolio-page .pair-accent {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  font-size: 1rem;
}

body.portfolio-page .chart-price {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  margin-top: 14px;
}

body.portfolio-page .chart-change {
  margin-top: 6px;
  font-size: 1.1rem;
}

body.portfolio-page .chart-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

body.portfolio-page .chart-updated {
  color: #9fb2d1;
  font-size: 0.95rem;
}

body.portfolio-page .chart-container {
  height: 360px;
  background: rgba(18, 31, 55, 0.95);
  border: 1px solid rgba(96, 165, 250, 0.12);
}

body.portfolio-page #priceChart {
  width: 100% !important;
  height: 100% !important;
}

body.portfolio-page .coin-selector-row,
body.portfolio-page .time-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

body.portfolio-page .time-button,
body.portfolio-page .coin-button,
body.portfolio-page .mining-button {
  background: rgba(8, 20, 41, 0.88);
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: none;
}

body.portfolio-page .time-button:hover,
body.portfolio-page .coin-button:hover,
body.portfolio-page .mining-button:hover,
body.portfolio-page .time-button.active,
body.portfolio-page .coin-button.active {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  border-color: transparent;
  transform: translateY(-1px);
}

body.portfolio-page .time-button::before,
body.portfolio-page .coin-button::before,
body.portfolio-page .mining-button::before {
  display: none;
}

body.portfolio-page .service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

body.portfolio-page .service-card {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

body.portfolio-page .service-icon {
  font-size: 1.5rem;
  color: var(--portfolio-blue);
}

body.portfolio-page .trend-list {
  display: grid;
  gap: 12px;
}

body.portfolio-page .trend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--portfolio-card-soft);
  border: 1px solid rgba(96, 165, 250, 0.1);
}

body.portfolio-page .trend-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.portfolio-page .trend-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

body.portfolio-page .trend-meta .coin-name {
  font-size: 1.05rem;
  font-weight: 700;
}

body.portfolio-page .trend-meta .coin-pair {
  font-size: 0.88rem;
  color: #9db1cf;
}

body.portfolio-page .trend-values {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

body.portfolio-page .trend-values .price {
  font-weight: 700;
}

body.portfolio-page .admin-section ul,
body.portfolio-page #all-transactions > div {
  background: rgba(8, 20, 41, 0.82);
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
}

body.portfolio-page .animate-slide-in {
  animation: slideIn 0.45s ease-in-out;
}

@keyframes slideIn {
  from {
    transform: translateX(18px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}


@media (min-width: 1280px) {
  body.portfolio-page .container {
    max-width: 1220px;
  }

  body.portfolio-page .section {
    padding: 20px;
    border-radius: 20px;
  }

  body.portfolio-page .hero-title {
    font-size: 1.8rem;
  }

  body.portfolio-page .user-name {
    font-size: 1.05rem;
  }

  body.portfolio-page .balance-title,
  body.portfolio-page .section-heading h2 {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  body.portfolio-page .live-pill {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
  }

  body.portfolio-page .section-meta,
  body.portfolio-page .user-mobile,
  body.portfolio-page .transaction-reference,
  body.portfolio-page .transaction-time,
  body.portfolio-page .chart-updated {
    font-size: 0.875rem;
  }

  body.portfolio-page .transaction-symbol {
    font-size: 1.05rem;
    font-weight: 600;
  }

  body.portfolio-page .transaction-kes {
    font-size: 1.4rem;
  }

  body.portfolio-page .balance-amount {
    font-size: 2.25rem;
  }

  body.portfolio-page .chart-price {
    font-size: 1.9rem;
  }

  body.portfolio-page .chart-container {
    height: 320px;
  }

  body.portfolio-page .asset-summary-card {
    min-height: 102px;
    padding: 14px;
  }

  body.portfolio-page .asset-symbol {
    font-size: 1rem;
  }

  body.portfolio-page .asset-price {
    font-size: 0.86rem;
  }

  body.portfolio-page .service-card {
    min-height: 110px;
  }
}

@media (min-width: 1600px) {
  body.portfolio-page .container {
    max-width: 1160px;
  }
}

@media (max-width: 1100px) {
  body.portfolio-page .asset-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.portfolio-page .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0.75rem;
  }

  body.portfolio-page .section {
    padding: 14px;
    border-radius: 18px;
  }

  body.portfolio-page .chart-panel-top,
  body.portfolio-page .dashboard-hero,
  body.portfolio-page .balance-hero {
    flex-direction: column;
  }

  body.portfolio-page .hero-title {
    font-size: 1.45rem;
  }

  body.portfolio-page .hero-user-card {
    width: 100%;
    padding: 10px 12px;
  }

  body.portfolio-page .chart-controls {
    width: 100%;
    align-items: stretch;
    gap: 8px;
  }

  body.portfolio-page .time-buttons {
    justify-content: space-between;
  }

  body.portfolio-page .time-button,
  body.portfolio-page .coin-button {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  body.portfolio-page .transaction-row.transaction-card-inner,
  body.portfolio-page .trend-row {
    flex-direction: row;
    align-items: center;
  }

  body.portfolio-page .amount-info,
  body.portfolio-page .trend-values {
    align-items: flex-end;
  }
}

@media (max-width: 640px) {
  body.portfolio-page .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  body.portfolio-page .asset-strip {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    white-space: nowrap;
  }

  body.portfolio-page .asset-strip::-webkit-scrollbar {
    display: none;
  }

  body.portfolio-page .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.portfolio-page .balance-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.portfolio-page .action-btn {
    width: 100%;
    min-height: 44px;
    font-size: 0.85rem;
  }

  body.portfolio-page .section-heading h2,
  body.portfolio-page .balance-title {
    font-size: 0.9rem;
  }

  body.portfolio-page .live-pill {
    font-size: 0.72rem;
  }

  body.portfolio-page .transaction-row.transaction-card-inner {
    padding: 12px 14px;
    gap: 10px;
  }

  body.portfolio-page .transaction-symbol {
    font-size: 0.95rem;
  }

  body.portfolio-page .transaction-kes {
    font-size: 1.3rem;
  }

  body.portfolio-page .chart-price {
    font-size: 1.6rem;
  }

  body.portfolio-page .chart-container {
    height: 280px;
    padding: 0.85rem;
  }
}

.crypto-card.large .coin-image.large {
  width: 80px;
  height: 80px;
}

.featured-content {
  height: 50vh;
}

.electric-sign {
  font-size: 1.5rem;
}

.featured-icon {
  font-size: 2rem;
}

.featured-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.arrow::before {
  content: '';
  margin-right: 4px;
}

.percentage.text-green-500 .arrow::before {
  content: '↑';
}

.percentage.text-red-500 .arrow::before {
  content: '↓';
}

.transaction-row:hover, .crypto-card:hover, .trend-row:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.03);
}

/* Modal Styles - Quantity and Payment Modals */
/* ===== MODAL BACKDROP (standardized) ===== */
#modal-backdrop,
#upload-modal-backdrop {
  background-color: rgba(0, 0, 0, 0.85);
}

/* Quantity/Payment/Mpesa modals now use unified .modal-container styles */
/* No duplicate positioning needed - uses shared styles above */

/* Success Modal Styles */
#success-modal {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  z-index: 200 !important;
  transition: opacity 0.3s ease-in-out !important;
}

#success-modal.hidden {
  display: none !important;
}

#success-modal.opacity-0 {
  opacity: 0 !important;
}

#success-modal > div {
  background: linear-gradient(135deg, rgba(26, 43, 75, 0.98), rgba(12, 20, 38, 0.95));
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 20px;
  padding: 2rem;
  width: 90% !important;
  max-width: 28rem !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
  position: relative;
  transform: scale(1) !important;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out !important;
}

#success-modal.scale-95 > div {
  transform: scale(0.95) !important;
}

#success-modal .modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #93c5fd;
  transition: all 0.2s ease;
  padding: 0;
}

#success-modal .modal-close:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.4);
  color: #dbeafe;
}

#success-modal .success-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(10, 176, 119, 0.1));
  border: 2px solid rgba(16, 185, 129, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1rem;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

#success-modal h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-align: center;
}

#success-modal p {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
  text-align: center;
}

#success-modal button {
  width: 100%;
  min-height: 48px;
  background: linear-gradient(90deg, #10B981, #1ecb88);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
}

#success-modal button:hover {
  background: linear-gradient(90deg, #0da76a, #16d687);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.35);
}

#success-modal button:active {
  transform: translateY(0);
}

/* History page styles */
body.history-page {
  background-color: #0B1221;
  color: #ffffff;
}

.details-section {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, margin 0.3s ease-in-out;
  opacity: 1;
}

.details-section.hidden-details {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.history-card {
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  padding: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.history-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
  border-color: rgba(59, 130, 246, 0.24);
}

.history-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  background: rgba(8, 14, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 16px;
}

.history-card-stat {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: center;
}

.history-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #94a3b8;
}

.history-card-value {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.history-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.14);
  color: #7dd3fc;
}

@media (max-width: 640px) {
  .history-card-grid {
    grid-template-columns: 1fr;
  }
}

.tab-content {
  display: none;
}

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