/* ============================================================
   GALDNEST FINTECH DESIGN SYSTEM (2026 PREMIUM EDITION)
   Tagline: "Grow Smart. Build Your Nest."
   ============================================================ */

:root {
  /* Brand Palette */
  --primary-purple: #5215E1;
  --primary-dark: #3F0BC7;
  --primary-deep: #2A0698;
  --primary-gradient: linear-gradient(135deg, #5C1EEA 0%, #3F0BC7 100%);
  --secondary-gradient: linear-gradient(135deg, #1B2EC3 0%, #4B17EA 100%);
  --accent-purple: #7E45FF;
  --soft-lavender: #F4F0FF;
  --soft-purple-bg: #FAF8FF;
  
  /* System Neutral Shades */
  --bg-light: #F7F7FD;
  --card-bg: #FFFFFF;
  --text-dark: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --border-light: #ECECF7;
  --border-focus: #5215E1;
  
  /* Status Colors */
  --success-green: #10B981;
  --success-bg: #ECFDF5;
  --danger-red: #EF4444;
  --danger-bg: #FEF2F2;
  --warning-amber: #F59E0B;
  --warning-bg: #FFFBEB;
  --info-blue: #3B82F6;
  --info-bg: #EFF6FF;

  /* Border Radii */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(82, 21, 225, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 35px -10px rgba(63, 11, 199, 0.18);
  --shadow-floating: 0 25px 50px -12px rgba(0, 0, 0, 0.18);

  /* Typography */
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

/* SCOPE MOBILE FRAME ONLY TO NON-ADMIN PAGES */
body:not(.admin-body) {
  font-family: var(--font-family);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
  padding-bottom: 90px;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.06);
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) {
  body:not(.admin-body) {
    max-width: 600px;
  }
}

/* ADMIN BODY FULL WIDTH LAYOUT */
body.admin-body {
  font-family: var(--font-family);
  background-color: #F8FAFC !important;
  color: #0F172A !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  min-height: 100vh !important;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; border: none; outline: none; cursor: pointer; background: none; }
input, select, textarea { font-family: inherit; }

/* HERO HEADER */
.hero-header {
  background: var(--primary-gradient);
  color: #ffffff;
  padding: 28px 24px 76px 24px;
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.hero-header::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-header::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.hero-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  position: relative;
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.notification-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 10px;
  height: 10px;
  background: var(--danger-red);
  border: 2px solid var(--primary-dark);
  border-radius: 50%;
}

.hero-welcome { position: relative; z-index: 2; }
.hero-welcome p { font-size: 14px; opacity: 0.85; font-weight: 400; }
.hero-welcome h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; margin-top: 2px; }

/* SUB-PAGE BACK HEADER */
.sub-header {
  background: var(--primary-gradient);
  color: #ffffff;
  padding: 18px 20px 22px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  box-shadow: 0 6px 20px rgba(82, 21, 225, 0.2);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  transition: background 0.2s ease;
}

.back-btn:active { background: rgba(255, 255, 255, 0.3); }

.sub-header h2 { font-size: 18px; font-weight: 700; flex: 1; }

/* WALLET CARD */
.wallet-card-wrapper {
  padding: 0 20px;
  margin-top: -54px;
  position: relative;
  z-index: 10;
}

.wallet-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.avatar-3d-glow {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E0C3FC 0%, #8EC5FC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 22px rgba(142, 197, 252, 0.45);
}

.wallet-details { flex: 1; }
.wallet-header-row { display: flex; align-items: center; justify-content: space-between; color: var(--text-muted); font-size: 13px; font-weight: 500; }
.wallet-title { display: flex; align-items: center; gap: 6px; }

.eye-toggle-btn { background: none; color: var(--text-muted); font-size: 18px; padding: 4px; cursor: pointer; transition: color 0.2s; }
.eye-toggle-btn:hover { color: var(--primary-purple); }

.wallet-balance-amount { font-size: 28px; font-weight: 800; color: #000000; margin: 6px 0 14px 0; letter-spacing: -0.6px; line-height: 1.1; }

.deposit-pill-btn {
  background: var(--primary-gradient);
  color: #ffffff;
  padding: 10px 28px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(82, 21, 225, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.deposit-pill-btn:active {
  transform: scale(0.96);
}

/* BANNERS */
.banners-section { padding: 18px 20px 0 20px; display: flex; flex-direction: column; gap: 14px; }
.banner-card { border-radius: var(--radius-md); padding: 20px; color: #ffffff; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.banner-primary { background: linear-gradient(135deg, #5215E1 0%, #6322F6 100%); }
.banner-secondary { background: linear-gradient(135deg, #1B2EC3 0%, #4B17EA 100%); }
.banner-content { z-index: 2; max-width: 68%; }
.banner-content h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.3px; }
.banner-content p { font-size: 12px; opacity: 0.9; margin-bottom: 12px; line-height: 1.4; }
.banner-action-btn { background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(8px); color: #ffffff; padding: 7px 18px; border-radius: var(--radius-full); font-size: 12px; font-weight: 700; display: inline-block; transition: background 0.2s; }
.banner-action-btn:hover { background: rgba(255, 255, 255, 0.38); }
.banner-illustration { font-size: 46px; opacity: 0.95; z-index: 2; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15)); }

/* QUICK ACTIONS GRID */
.quick-actions-section { padding: 20px; }
.actions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

@media (max-width: 380px) {
  .actions-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
}

.action-tile {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 16px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.action-tile:active { transform: scale(0.93); }

.tile-icon-wrapper { width: 46px; height: 46px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.icon-purple { background: #F0EBFF; color: #7C3AED; }
.icon-pink   { background: #FFEBF2; color: #EC4899; }
.icon-blue   { background: #EBF3FF; color: #2563EB; }
.icon-green  { background: #E6F9F0; color: #10B981; }
.icon-amber  { background: #FFF7ED; color: #F97316; }
.icon-violet { background: #FEFCE8; color: #EAB308; }

.action-tile span { font-size: 11px; font-weight: 700; color: var(--text-dark); line-height: 1.2; }

/* TICKER MARQUEE */
.ticker-section { padding: 0 20px 20px 20px; }
.ticker-card { background: #F4F0FF; border: 1px solid #E4DAFF; border-radius: var(--radius-full); padding: 11px 18px; display: flex; align-items: center; gap: 10px; overflow: hidden; color: #4C1D95; font-size: 12px; font-weight: 600; box-shadow: var(--shadow-sm); }
.ticker-icon { font-size: 16px; color: #6D28D9; flex-shrink: 0; }
.ticker-marquee { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker-chevron { font-size: 14px; color: var(--text-muted); flex-shrink: 0; }

/* STICKY BOTTOM NAVIGATION */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  height: 68px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
  .bottom-nav { max-width: 600px; }
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  width: 20%;
  height: 100%;
  transition: color 0.2s ease;
}

.nav-tab.active { color: var(--primary-purple); font-weight: 800; }
.nav-tab svg { width: 22px; height: 22px; stroke-width: 2; }

/* CONTAINERS, CARDS & FORMS */
.page-container { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.content-card { background: var(--card-bg); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-md); border: 1px solid var(--border-light); }

.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.form-label { font-size: 13px; font-weight: 700; color: var(--text-dark); }
.form-input, .form-select, .form-textarea { width: 100%; padding: 12px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-light); font-family: inherit; font-size: 14px; color: var(--text-dark); background: #FAFAFA; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--border-focus); outline: none; background: #ffffff; box-shadow: 0 0 0 4px rgba(82, 21, 225, 0.1); }

/* BUTTON SYSTEM */
.btn-primary { width: 100%; padding: 12px 20px; background: var(--primary-gradient); color: #ffffff; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; text-align: center; box-shadow: 0 6px 16px rgba(82, 21, 225, 0.25); display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { background: var(--soft-lavender); color: var(--primary-purple); font-weight: 700; box-shadow: none; }
.btn-secondary:hover { background: #E4DAFF; }
.btn-danger { background: linear-gradient(135deg, #EF4444, #DC2626); color: #ffffff; box-shadow: 0 6px 16px rgba(239, 68, 68, 0.25); }
.btn-success { background: linear-gradient(135deg, #10B981, #059669); color: #ffffff; box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25); }
.btn-warning { background: linear-gradient(135deg, #F59E0B, #D97706); color: #ffffff; }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-icon { padding: 6px 10px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: var(--radius-xs); font-size: 12px; font-weight: 700; cursor: pointer; border: none; }

/* ALERTS & BADGES */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.alert-danger { background: var(--danger-bg); color: #991B1B; border: 1px solid #FCA5A5; }
.alert-success { background: var(--success-bg); color: #065F46; border: 1px solid #6EE7B7; }

.badge { padding: 5px 12px; border-radius: var(--radius-full); font-size: 11px; font-weight: 800; text-transform: uppercase; display: inline-block; letter-spacing: 0.3px; }
.badge-active, .badge-approved, .badge-completed { background: #D1FAE5; color: #065F46; }
.badge-pending, .badge-processing { background: #FEF3C7; color: #92400E; }
.badge-rejected, .badge-suspended { background: #FEE2E2; color: #991B1B; }

/* EMPTY STATES */
.empty-state { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.empty-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--soft-lavender); color: var(--primary-purple); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--text-dark); }
.empty-text { font-size: 13px; color: var(--text-muted); max-width: 280px; margin-bottom: 8px; }

/* PROGRESS BAR */
.progress-container { background: #E2E8F0; border-radius: var(--radius-full); height: 8px; width: 100%; overflow: hidden; margin: 8px 0; }
.progress-bar { background: var(--primary-gradient); height: 100%; border-radius: var(--radius-full); }

/* TOAST NOTIFICATION SYSTEM (UNIFIED GLOBAL DARK CHARCOAL PILL EDITION) */
#global-toast-container, .toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999999 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 480px;
}

.galdnest-dark-toast, .toast {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  color: #FFFFFF !important;
  padding: 13px 24px !important;
  border-radius: 999px !important; /* Large dark rounded notification matching reference */
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(-24px) scale(0.94);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  width: fit-content !important;
  max-width: 100% !important;
  text-align: center !important;
  word-break: break-word !important;
  border: none !important;
  margin: 0 auto !important;
  cursor: pointer;
}

.galdnest-dark-toast.show, .toast.show {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

.galdnest-dark-toast.hide, .toast.hide {
  opacity: 0 !important;
  transform: translateY(-20px) scale(0.94) !important;
}

.galdnest-dark-toast-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.galdnest-dark-toast-text {
  color: #FFFFFF !important;
  flex: 1;
}

/* SweetAlert2 Modal Overrides for Uniformity */
.swal2-container {
  z-index: 9999999 !important;
}

.swal2-popup {
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  color: #FFFFFF !important;
  border-radius: 999px !important;
  padding: 12px 24px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
  border: none !important;
}

.swal2-title, .swal2-html-container, .swal2-content {
  color: #FFFFFF !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  margin: 0 !important;
}

.swal2-icon, .swal2-actions {
  display: none !important;
}

/* REUSABLE MODALS SYSTEM */
.modal-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.65); backdrop-filter: blur(5px); z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.modal-backdrop.show { opacity: 1; pointer-events: auto; }
.modal-container { background: #ffffff; border-radius: var(--radius-lg); padding: 26px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-floating); transform: scale(0.92); transition: transform 0.25s ease; position: relative; }
.modal-backdrop.show .modal-container { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; border-bottom: 1px solid var(--border-light); padding-bottom: 12px; }
.modal-title { font-size: 18px; font-weight: 800; color: var(--text-dark); margin: 0; }
.modal-close-btn { background: #F1F5F9; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 18px; cursor: pointer; border: none; transition: background 0.2s; }
.modal-close-btn:hover { background: #E2E8F0; color: var(--text-dark); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; border-top: 1px solid var(--border-light); padding-top: 14px; }
