/*
 * Optimus Wealth - Global Site Stylesheet
 * Uses: Bootstrap 5.3.8 (local) + Font Awesome 7.2.0 (local)
 * Brand: Forest Green / Dark Charcoal / Silver
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  --primary-color:   #ffffff;
  --secondary-color: #FE1334;
  --accent-color:    #FE1334;
  --dark-bg:         #1c1f1c;
  --silver:          #b0bec5;
  --success-color:   #43a047;
  --warning-color:   #f59e0b;
  --danger-color:    #FE1334;
  --light-bg:        #f4f6f4;
  --card-bg:         #ffffff;
  --card-shadow:     0 5px 20px rgba(0, 0, 0, 0.07);
  --card-shadow-hover: 0 12px 36px rgba(254, 19, 52, 0.18);
  --border-radius-card: 16px;
  --border-radius-btn:  8px;
  --transition-speed:   0.3s;
}

/* ============================================================
   2. GLOBAL / BASE
   ============================================================ */
html {
  overflow-x: clip;
}
body {
  max-width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--light-bg);
  color: #1a2a1a;
}

a {
  color: var(--secondary-color);
}

/* ============================================================
   3. NAVBAR
   ============================================================ */
.navbar-custom {
  background: linear-gradient(
    135deg,
    var(--dark-bg) 0%,
    #2a2e2a 60%,
    var(--secondary-color) 100%
  );
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* Public landing page navbar (white) */
.navbar-landing {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-landing .navbar-brand {
  color: var(--primary-color) !important;
}

/* ============================================================
   4. LANDING PAGE — HERO
   ============================================================ */
.hero-section {
  background: linear-gradient(
    135deg,
    rgba(28, 31, 28, 0.9) 0%,
    rgba(30, 58, 30, 0.85) 45%,
    rgba(254, 19, 52, 0.9) 100%
  ), url('https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?auto=format&fit=crop&q=80');
  background-size: cover;
  background-position: center;
  color: #ffffff;
  padding: 80px 0 70px;
  min-height: 500px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  opacity: 0.92;
}


/* ============================================================
   5. LANDING PAGE — BUTTONS
   ============================================================ */
.btn-hero-primary {
  background: var(--secondary-color);
  color: #ffffff;
  border: none;
  padding: 13px 36px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--border-radius-btn);
  transition: all var(--transition-speed) ease;
  text-decoration: none;
  display: inline-block;
}

.btn-hero-primary:hover {
  background: #f0f4ff;
  color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.btn-hero-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
  padding: 13px 36px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--border-radius-btn);
  transition: all var(--transition-speed) ease;
  text-decoration: none;
  display: inline-block;
}

.btn-hero-outline:hover {
  background: #ffffff;
  color: var(--secondary-color);
  transform: translateY(-2px);
}

/* ============================================================
   6. LANDING PAGE — STATS SECTION
   ============================================================ */
.stats-section {
  background: linear-gradient(135deg, #e8f5e9 0%, #f4f6f4 100%);
  padding: 60px 0;
  border-top: 1px solid #c8e6c9;
  border-bottom: 1px solid #c8e6c9;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 1rem;
  color: #6b7280;
  margin-top: 0.4rem;
}

/* ============================================================
   7. LANDING PAGE — FEATURE CARDS
   ============================================================ */
.feature-card {
  padding: 2rem;
  border-radius: var(--border-radius-card);
  border: 1px solid #e5e7eb;
  background: #ffffff;
  transition: all var(--transition-speed) ease;
  height: 100%;
}

.feature-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-5px);
  border-color: #c7d7fe;
}

.feature-icon {
  font-size: 2.8rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

/* ============================================================
   8. LANDING PAGE — FOOTER
   ============================================================ */
footer.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 50px 0 30px;
  margin-top: 80px;
}

footer.site-footer a {
  color: #9ca3af;
  text-decoration: none;
  transition: color var(--transition-speed);
}

footer.site-footer a:hover {
  color: #ffffff;
}

footer.site-footer .footer-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
}

footer.site-footer hr {
  border-color: #374151;
}

/* ============================================================
   9. AUTH PAGES — LOGIN & REGISTER
   ============================================================ */
.auth-body {
  background: linear-gradient(135deg, var(--dark-bg) 0%, #1c1c1c 50%, var(--secondary-color) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 40px 0;
}

.auth-card {
  background: #ffffff;
  border-radius: var(--border-radius-card);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  max-width: 480px;
  margin: 0 auto;
}

.auth-card-wide {
  max-width: 720px;
}

.auth-header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: #ffffff;
  padding: 40px 30px;
  text-align: center;
}

.auth-header .auth-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  display: block;
}

.auth-body-inner {
  padding: 40px;
}

.auth-back-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--transition-speed);
}

.auth-back-link:hover {
  color: #ffffff;
}

.btn-auth {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  border: none;
  padding: 12px;
  font-weight: 600;
  color: #ffffff;
  width: 100%;
  border-radius: var(--border-radius-btn);
  transition: all var(--transition-speed);
  letter-spacing: 0.3px;
}

.btn-auth:hover {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #0a3d0d 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(254, 19, 52, 0.45);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #dee2e6;
}

.divider span {
  padding: 0 12px;
  color: #6c757d;
  font-size: 0.9rem;
}

/* Password strength bar */
.password-strength {
  height: 5px;
  margin-top: 6px;
  border-radius: 3px;
  background: #e9ecef;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  border-radius: 3px;
  transition: all var(--transition-speed);
  width: 0;
}

.strength-weak {
  background: #ef4444;
  width: 33%;
}
.strength-medium {
  background: #f59e0b;
  width: 66%;
}
.strength-strong {
  background: #FE1334;
  width: 100%;
}

.required::after {
  content: " *";
  color: var(--danger-color);
}

/* ============================================================
   10. SHARED APP NAVBAR (authenticated pages)
   ============================================================ */
/* Already handled by .navbar-custom above */

/* ============================================================
   11. SHARED CONTENT CARD
   ============================================================ */
.content-card {
  background: #ffffff;
  border-radius: var(--border-radius-card);
  box-shadow: var(--card-shadow);
  padding: 28px;
  margin-bottom: 28px;
}

.section-title {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e9ecef;
}

/* ============================================================
   12. DEPOSIT PAGE
   ============================================================ */
.wallet-card {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.wallet-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.15);
}

.wallet-card.selected {
  border-color: var(--primary-color);
  background-color: #eff6ff;
}

.wallet-address {
  font-family: "Courier New", monospace;
  font-size: 0.88rem;
  background: #f8f9fa;
  padding: 10px 12px;
  border-radius: 6px;
  word-break: break-all;
}

.copy-btn {
  cursor: pointer;
  color: var(--primary-color);
  transition: color var(--transition-speed);
}

.copy-btn:hover {
  color: var(--secondary-color);
}

.instruction-box {
  background: #fffbeb;
  border-left: 4px solid var(--warning-color);
  padding: 15px 18px;
  margin: 20px 0;
  border-radius: 5px;
}

/* ============================================================
   13. WITHDRAW PAGE
   ============================================================ */
.balance-display {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: #ffffff;
  border-radius: var(--border-radius-card);
  padding: 30px;
  margin-bottom: 28px;
}

.balance-amount {
  font-size: 2.6rem;
  font-weight: 700;
}

.warning-box {
  background: #fffbeb;
  border-left: 4px solid var(--warning-color);
  padding: 15px 18px;
  margin: 20px 0;
  border-radius: 5px;
}

/* ============================================================
   14. INVEST PAGE
   ============================================================ */
.plan-card {
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius-card);
  padding: 28px;
  transition: all var(--transition-speed);
  height: 100%;
  background: #ffffff;
}

.plan-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.18);
  transform: translateY(-6px);
}

.plan-roi {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--success-color);
}

/* ============================================================
   15. PROFILE PAGE
   ============================================================ */
.profile-header-bg {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: #ffffff;
  padding: 60px 0 110px;
  margin-bottom: -60px;
}

.profile-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid #ffffff;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
  object-fit: cover;
}

.stat-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  color: #6c757d;
  font-size: 0.9rem;
  margin-top: 4px;
}

.info-row {
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: #374151;
}

.info-value {
  color: #6b7280;
}

/* ============================================================
   16. SETTINGS PAGE
   ============================================================ */
.profile-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
}

.upload-label {
  cursor: pointer;
  display: inline-block;
}

/* ============================================================
   17. LOAN APPLY PAGE
   ============================================================ */
.verification-method {
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.verification-method:hover {
  border-color: var(--primary-color);
  background: #f5f8ff;
}

.verification-method.selected {
  border-color: var(--primary-color);
  background: #eff6ff;
}

/* ============================================================
   18. SIDEBAR LAYOUT (Desktop + Tablet = side, Mobile = bottom)
   ============================================================ */

/* ── Sidebar wrapper ── */
.finflex-sidebar {
  width: 250px;
  min-height: 100vh;
  background: #ffffff;
  color: #374151;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.3s ease;
  border-right: 1px solid #f3f4f6;
  box-shadow: 2px 0 10px rgba(0,0,0,0.02);
}

/* ── Sidebar brand ── */
.finflex-sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
}
.finflex-sidebar .sidebar-brand .text-white {
  color: #111827 !important; /* Override white for light sidebar */
}

/* ── Sidebar user info strip ── */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid #f3f4f6;
}
.sidebar-user img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
  flex-shrink: 0;
}
.sidebar-user .user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.2;
}
.sidebar-user .user-role {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 2px;
}
.sidebar-user .fa-bell {
  color: #9ca3af !important;
}

/* ── Nav links ── */
.finflex-sidebar .nav {
  padding: 16px 12px;
  flex: 1;
}
.finflex-sidebar .nav-link {
  color: #4b5563;
  padding: 12px 16px;
  margin: 4px 0;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  text-decoration: none;
}
.finflex-sidebar .nav-link i {
  width: 20px;
  font-size: 1.1rem;
  text-align: center;
  color: #9ca3af;
  transition: color 0.2s ease;
}
.finflex-sidebar .nav-link:hover {
  background: #f9fafb;
  color: #111827;
}
.finflex-sidebar .nav-link:hover i {
  color: var(--primary-color);
}
.finflex-sidebar .nav-link.active {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(254, 19, 52, 0.25);
}
.finflex-sidebar .nav-link.active i {
  color: #ffffff;
}
.finflex-sidebar .nav-link.text-danger {
  color: #ef4444 !important;
  margin-top: auto;
}
.finflex-sidebar .nav-link.text-danger i {
  color: #ef4444 !important;
}
.finflex-sidebar .nav-link.text-danger:hover {
  background: #fef2f2;
}
.finflex-sidebar .nav-divider {
  border-color: #f3f4f6;
  margin: 12px 0;
}

/* ── Main content area pushed right ── */
.finflex-main {
  margin-left: 250px;
  min-height: 100vh;
  background: var(--light-bg);
  transition: margin-left 0.3s ease;
}
.finflex-main-inner {
  padding: 32px;
}

/* ── Floating Bottom nav bar (mobile only) ── */
.finflex-bottom-nav {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 400px;
  background: var(--primary-color);
  z-index: 1050;
  height: 64px;
  border-radius: 32px;
  box-shadow: 0 10px 25px rgba(254, 19, 52, 0.3);
  padding: 0 10px;
}
.finflex-bottom-nav .bottom-nav-inner {
  display: flex;
  height: 100%;
  justify-content: space-between;
  align-items: center;
}
.finflex-bottom-nav .bn-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0; /* Hide text by default */
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 10px 14px;
  border-radius: 20px;
  position: relative;
  height: 44px;
}
.finflex-bottom-nav .bn-item i {
  font-size: 1.25rem;
}
.finflex-bottom-nav .bn-item.active {
  background: #ffffff;
  color: var(--primary-color);
  flex: 2; /* Expand the active item */
  font-size: 0.85rem; /* Show text */
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.finflex-bottom-nav .bn-item:hover:not(.active) {
  color: #ffffff;
}
.finflex-bottom-nav .bn-item.active span {
  display: inline; /* Show text only when active */
}
.finflex-bottom-nav .bn-item span {
  display: none;
}
.finflex-bottom-nav .bn-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 16px);
  background: #ef4444;
  color: #fff;
  border-radius: 10px;
  font-size: 0.6rem;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
  border: 2px solid var(--primary-color);
}
.finflex-bottom-nav .bn-item.active .bn-badge {
  border-color: #ffffff;
  right: 8px;
}

/* ── Sidebar overlay toggle button (mobile) ── */
.sidebar-toggle-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1060;
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* ── Mobile: hide sidebar, show bottom nav ── */
@media (max-width: 767.98px) {
  .finflex-sidebar {
    transform: translateX(-100%);
    width: 260px;
  }
  .finflex-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }
  .finflex-main {
    margin-left: 0;
    padding-bottom: 100px; /* room for floating bottom nav */
  }
  .finflex-bottom-nav {
    display: block;
  }
  .sidebar-toggle-btn {
    display: flex;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1039;
  }
  .sidebar-overlay.open {
    display: block;
  }
  
  /* Additional Global Mobile Responsiveness */
  .finflex-main-inner {
    padding: 16px;
  }
  .hero-section {
    padding: 90px 0 60px;
    min-height: auto;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .content-card, .plan-card, .wallet-card {
    padding: 16px;
  }
  .auth-body-inner {
    padding: 24px 20px;
  }
  .auth-header {
    padding: 30px 20px;
  }
}

/* ── Tablet (768-991): narrow sidebar ── */
@media (min-width: 768px) and (max-width: 991.98px) {
  .finflex-sidebar {
    width: 200px;
  }
  .finflex-main {
    margin-left: 200px;
  }
  .finflex-sidebar .nav-link {
    font-size: 0.83rem;
    padding: 9px 12px;
  }
  .sidebar-user .user-name {
    font-size: 0.8rem;
  }
}

/* ── Desktop sidebar minimize toggle ── */
@media (min-width: 768px) {
  .finflex-sidebar.minimized {
    width: 64px;
    overflow: visible;
  }
  .finflex-sidebar.minimized .sidebar-brand span,
  .finflex-sidebar.minimized .user-name,
  .finflex-sidebar.minimized .user-role,
  .finflex-sidebar.minimized .nav-link span,
  .finflex-sidebar.minimized .sidebar-brand ~ * .user-role,
  .finflex-sidebar.minimized .badge {
    display: none !important;
  }
  .finflex-sidebar.minimized .nav-link {
    justify-content: center;
    padding: 10px;
    margin: 2px 4px;
  }
  .finflex-sidebar.minimized .nav-link i {
    width: auto;
    font-size: 1.1rem;
  }
  .finflex-sidebar.minimized .sidebar-user {
    justify-content: center;
  }
  .finflex-sidebar.minimized .sidebar-user img {
    margin: 0;
  }
  .finflex-sidebar.minimized .sidebar-brand {
    padding: 14px;
    justify-content: center;
  }
  .finflex-sidebar.minimized #sidebarMinimize i {
    transform: rotate(180deg);
  }
  .finflex-main.sidebar-minimized {
    margin-left: 64px;
  }
}

/* ── Legacy classes kept for compatibility ── */
.sidebar {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--dark-bg) 0%, #163516 100%);
  color: #fff;
}
.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.78);
  padding: 11px 18px;
  margin: 3px 0;
  border-radius: 8px;
  transition: all 0.3s;
  font-size: 0.95rem;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.admin-main {
  padding: 30px;
  background-color: var(--light-bg);
  min-height: 100vh;
}

.table-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}

/* ============================================================
   19. FORM LABELS
   ============================================================ */
.form-label {
  font-weight: 600;
  color: #374151;
}

/* ============================================================
   20. UTILITIES
   ============================================================ */
.text-primary-custom {
  color: var(--primary-color) !important;
}
.bg-primary-custom {
  background-color: var(--primary-color) !important;
}

.qr-code {
  max-width: 200px;
  border: 3px solid var(--primary-color);
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
  .balance-amount {
    font-size: 2rem;
  }
  .auth-body-inner {
    padding: 24px;
  }
  .sidebar {
    position: relative;
    min-height: auto;
  }
}

/* ============================================================
   21. PRELOADER
   ============================================================ */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--dark-bg) 0%, #1a2e1a 50%, var(--secondary-color) 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

.preloader.preloader-hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo {
  font-size: 3rem;
  color: #fff;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.preloader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.preloader-text {
  color: rgba(255, 255, 255, 0.8);
  margin-top: 20px;
  font-size: 0.9rem;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   22. ANIMATIONS
   ============================================================ */
.animate-fade,
.animate-slide-up,
.animate-slide-left,
.animate-slide-right,
.animate-zoom {
  opacity: 0;
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.animate-fade.animate-visible {
  opacity: 1;
}

.animate-slide-up {
  transform: translateY(30px);
}
.animate-slide-up.animate-visible {
  transform: translateY(0);
  opacity: 1;
}

.animate-slide-left {
  transform: translateX(-30px);
}
.animate-slide-left.animate-visible {
  transform: translateX(0);
  opacity: 1;
}

.animate-slide-right {
  transform: translateX(30px);
}
.animate-slide-right.animate-visible {
  transform: translateX(0);
  opacity: 1;
}

.animate-zoom {
  transform: scale(0.9);
}
.animate-zoom.animate-visible {
  transform: scale(1);
  opacity: 1;
}

/* Animation delays */
.delay-100 {
  transition-delay: 0.1s;
}
.delay-200 {
  transition-delay: 0.2s;
}
.delay-300 {
  transition-delay: 0.3s;
}
.delay-400 {
  transition-delay: 0.4s;
}
.delay-500 {
  transition-delay: 0.5s;
}

/* Removed Dark Mode and Theme Toggle Button CSS */

/* ============================================================
   24. SIDEBAR MINIMIZE (Max Bar)
   ============================================================ */
.finflex-sidebar.minimized {
  width: 70px;
}

.finflex-sidebar.minimized .sidebar-brand span,
.finflex-sidebar.minimized .user-name,
.finflex-sidebar.minimized .user-role,
.finflex-sidebar.minimized .nav-link span,
.finflex-sidebar.minimized .nav-divider {
  display: none;
}

.finflex-sidebar.minimized .sidebar-brand,
.finflex-sidebar.minimized .sidebar-user,
.finflex-sidebar.minimized .nav-link {
  justify-content: center;
  padding: 12px;
}

.finflex-sidebar.minimized .nav-link i {
  width: auto;
  margin: 0;
}

.finflex-main.sidebar-minimized {
  margin-left: 70px;
}

@media (max-width: 767.98px) {
  .finflex-sidebar.minimized {
    width: 240px;
  }
  .finflex-main.sidebar-minimized {
    margin-left: 0;
  }
}

/* Sidebar minimize button */
.sidebar-minimize-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.sidebar-minimize-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   25. INVESTMENT COUNTER
   ============================================================ */
.investment-counter {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--success-color);
}

.investment-counter.matured {
  color: var(--primary-color);
}

.counter-animate {
  display: inline-block;
}

/* ============================================================
   26. GLASSMORPHISM STAT CARDS (Dashboard)
   ============================================================ */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(76, 175, 80, 0.18);
  border-radius: var(--border-radius-card);
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}
.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}
.dashboard-stat-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: var(--border-radius-card);
  color: #fff;
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.dashboard-stat-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.dashboard-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(254, 19, 52, 0.3);
}
.dashboard-stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
}
.dashboard-stat-label {
  font-size: 0.82rem;
  opacity: 0.85;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dashboard-stat-icon {
  font-size: 2.4rem;
  opacity: 0.25;
  position: absolute;
  bottom: 14px;
  right: 18px;
}

/* ============================================================
   27. MICRO-INTERACTIONS — Button Press
   ============================================================ */
.btn:active {
  transform: scale(0.97) !important;
}
.btn-brand {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: var(--border-radius-btn);
  transition: all var(--transition-speed);
  letter-spacing: 0.2px;
}
.btn-brand:hover {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #0a3d0d 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254, 19, 52, 0.4);
}

/* ============================================================
   28. NOTIFICATION BELL
   ============================================================ */
.notif-bell-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.notif-bell-wrap .notif-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  border-radius: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
  border: 2px solid var(--dark-bg);
  animation: notif-pop 0.4s ease;
}
@keyframes notif-pop {
  0% { transform: scale(0); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 330px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  z-index: 2000;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(46,125,50,0.12);
}
.notif-dropdown.open {
  display: block;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notif-dropdown-header {
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-item {
  padding: 12px 18px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: background 0.2s;
}
.notif-item:hover { background: #f9fafb; }
.notif-item.unread { background: #f0fdf4; border-left: 3px solid var(--primary-color); }
.notif-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.notif-item-title {
  font-weight: 600;
  font-size: 0.83rem;
  color: #1a2a1a;
  margin-bottom: 2px;
}
.notif-item-body {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.4;
}
.notif-item-time {
  font-size: 0.7rem;
  color: #b0bec5;
  margin-top: 3px;
}

/* ============================================================
   29. SUPPORT PAGE
   ============================================================ */
.support-ticket-card {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 20px;
  margin-bottom: 16px;
  background: #fff;
  transition: box-shadow 0.2s;
}
.support-ticket-card:hover { box-shadow: var(--card-shadow); }
.support-ticket-card.status-open { border-left: 4px solid var(--primary-color); }
.support-ticket-card.status-closed { border-left: 4px solid var(--silver); }
.support-ticket-card.status-replied { border-left: 4px solid var(--success-color); }
.support-reply-bubble {
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 12px;
  border-left: 3px solid var(--primary-color);
  font-size: 0.9rem;
}

/* ============================================================
   30. REDESIGNED DEPOSIT PAGE
   ============================================================ */
.deposit-hero {
  background: linear-gradient(135deg, var(--dark-bg) 0%, #1a2e1a 100%);
  border-radius: var(--border-radius-card);
  padding: 28px;
  color: #fff;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.deposit-hero::after {
  content: '\f51e';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 24px;
  bottom: -10px;
  font-size: 5rem;
  opacity: 0.07;
  color: var(--accent-color);
}
.coin-tabs-wrapper {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s cubic-bezier(0.4,0,0.2,1);
}
.coin-tabs-wrapper.expanded {
  max-height: 400px;
}
.coin-tab-btn {
  flex: 1;
  padding: 14px 10px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s;
  font-weight: 600;
  font-size: 0.9rem;
}
.coin-tab-btn:hover {
  border-color: var(--primary-color);
  background: #f0fdf4;
  transform: translateY(-2px);
}
.coin-tab-btn.active {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, #e8f5e9, #f0fdf4);
  color: var(--primary-color);
  box-shadow: 0 4px 14px rgba(46,125,50,0.15);
}
.coin-tab-btn .coin-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 6px;
}
.crypto-conversion-display {
  background: #f0fdf4;
  border: 1px solid #c8e6c9;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  margin-top: 12px;
  display: none;
}
.crypto-conversion-display.show {
  display: block;
  animation: fadeInUp 0.3s ease;
}
.crypto-amount-big {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -1px;
}
.address-reveal-box {
  display: none;
  margin-top: 20px;
}
.address-reveal-box.show {
  display: block;
  animation: fadeInUp 0.4s ease;
}
.countdown-wrap {
  background: linear-gradient(135deg, #fff3e0, #fce4ec);
  border: 1px solid #ffccbc;
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  margin-top: 16px;
}
.countdown-timer {
  font-size: 2.2rem;
  font-weight: 800;
  color: #e65100;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}
.countdown-wrap.warn {
  background: linear-gradient(135deg, #fce4ec, #ffebee);
  border-color: #ef9a9a;
  animation: pulse-warn 1s infinite;
}
@keyframes pulse-warn {
  0%,100% { border-color: #ef9a9a; }
  50% { border-color: #ef4444; }
}
.qr-reveal-card {
  background: #fff;
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.qr-reveal-card img {
  max-width: 180px;
  border-radius: 8px;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.crypto-address-display {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  background: #f0fdf4;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  padding: 10px 14px;
  word-break: break-all;
  letter-spacing: 0.5px;
}
.btn-get-address {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  width: 100%;
  transition: all 0.3s;
  letter-spacing: 0.3px;
}
.btn-get-address:hover {
  background: linear-gradient(135deg, var(--secondary-color), #0a3d0d);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46,125,50,0.35);
  color: #fff;
}
.select-coin-btn {
  background: var(--dark-bg);
  color: var(--accent-color);
  border: 1.5px solid var(--accent-color);
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.25s;
}
.select-coin-btn:hover, .select-coin-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}
.deposit-step-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  flex-shrink: 0;
}

/* Removed Overrides */

/* ============================================================
   32. ADMIN — KYC Status Pills & Enhanced Users Table
   ============================================================ */
.kyc-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.kyc-pill.verified   { background: #e8f5e9; color: #ffffff; border: 1px solid #a5d6a7; }
.kyc-pill.pending    { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.kyc-pill.unverified { background: #fafafa; color: #616161; border: 1px solid #e0e0e0; }
.kyc-pill.rejected   { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* ============================================================
   PRELOADER TRANSITION
   ============================================================ */
#preloader {
  transition: opacity 0.5s ease, visibility 0.5s ease;
  opacity: 1;
  visibility: visible;
}
#preloader.preloader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ============================================================
    STAT NUMBER - use red accent
    ============================================================ */
.stat-number {
  color: var(--secondary-color);
}

/* ============================================================
   MOBILE RESPONSIVE FIXES (≤480px) — Authenticated Pages
   Text overflow, container squeeze, icon overlap prevention
   ============================================================ */
@media (max-width: 480px) {
  /* Global content padding */
  .nav-content {
    padding: 16px 12px;
    padding-bottom: calc(var(--nav-bottom-height) + 48px);
  }

  /* Table cards — reduce padding */
  .table-card {
    padding: 16px;
    margin-bottom: 16px;
  }

  /* Auth card - full width on small screens */
  .auth-card {
    max-width: calc(100% - 32px);
    margin-left: 16px;
    margin-right: 16px;
  }

  /* Welcome banner — stack flex items */
  .table-card .d-flex.justify-content-between {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .table-card .d-flex.justify-content-between > div:last-child {
    margin-top: 8px;
  }

  /* Stat cards — smaller icons and text */
  .stat-card {
    padding: 16px 10px;
    min-width: 0;
  }

  .stat-card .fa-2x {
    font-size: 1.2rem !important;
  }

  .stat-card h4 {
    font-size: 1rem;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .stat-card h6 {
    font-size: 0.7rem;
  }

  .stat-card h5 {
    font-size: 0.85rem;
  }

  /* Quick actions buttons — smaller and wrap */
  .table-card .d-flex.flex-wrap.gap-2 .btn {
    font-size: 0.78rem;
    padding: 8px 12px;
  }

  /* Profile header */
  .profile-header {
    padding: 24px 12px 20px;
  }

  .profile-avatar {
    width: 90px;
    height: 90px;
  }

  .profile-header h3 {
    font-size: 1.2rem;
    word-break: break-word;
  }

  .profile-header p {
    font-size: 0.8rem;
    word-break: break-word;
  }

  /* Profile cards */
  .profile-card {
    padding: 16px;
    margin-bottom: 16px;
  }

  /* Info rows — stack on very small screens */
  .info-row .row {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .info-row .col-5,
  .info-row .col-7 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .info-label {
    font-size: 0.75rem;
  }

  .info-value {
    font-size: 0.82rem;
    word-break: break-word;
  }

  /* Deposit hero */
  .deposit-hero {
    padding: 18px 14px;
  }

  .deposit-hero h3 {
    font-size: 1.2rem;
  }

  .deposit-hero .text-end div:last-child {
    font-size: 1.2rem !important;
  }

  /* Coin tabs — horizontal scroll on small screens */
  #coinTabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .coin-tab-btn {
    min-width: 90px;
    padding: 10px 8px;
    font-size: 0.8rem;
  }

  /* Crypto amount display */
  .crypto-amount-big {
    font-size: 1.4rem;
    word-break: break-all;
  }

  /* Countdown timer */
  .countdown-timer {
    font-size: 1.6rem;
  }

  /* Address reveal — stack columns */
  .address-reveal-box .row .col-md-7,
  .address-reveal-box .row .col-md-5 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .crypto-address-display {
    font-size: 0.75rem;
    padding: 8px 10px;
  }

  /* Invest page — balance bar */
  .inv-balance-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px;
  }

  .inv-balance-amount {
    font-size: 1.3rem;
  }

  /* Invest page — tabs */
  .inv-tabs {
    width: 100%;
  }

  .inv-tab-btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 0.8rem;
    text-align: center;
  }

  .inv-tab-btn i {
    margin-right: 0 !important;
    display: block;
    margin-bottom: 4px;
  }

  /* Invest page — section headers */
  .inv-section-title {
    font-size: 1.3rem;
  }

  .inv-section-eyebrow {
    font-size: 0.6rem;
    letter-spacing: 2px;
  }

  .inv-section-sub {
    font-size: 0.85rem;
  }

  /* Invest page — plan cards */
  .inv-plan-card {
    min-height: auto;
    padding: 28px 16px;
  }

  .inv-plan-name {
    font-size: 1.2rem;
  }

  .inv-plan-roi {
    font-size: 1.6rem;
  }

  .inv-plan-row {
    font-size: 0.78rem;
  }

  /* Invest page — stock cards */
  .inv-stock-card {
    padding: 20px 16px;
  }

  .inv-stock-price {
    font-size: 1.4rem;
  }

  .inv-stock-name {
    font-size: 0.95rem;
  }

  .inv-stock-symbol {
    font-size: 0.65rem;
  }

  /* Invest page — info banner */
  .inv-balance-bar + div,
  .inv-tabs + div > div[style*="background"] {
    flex-direction: column;
    gap: 10px;
  }

  /* Dashboard — live counter area */
  .live-counter {
    font-size: 0.85rem;
  }

  /* Dashboard — investment items */
  .border.rounded.p-2.mb-2 {
    padding: 10px !important;
  }

  .border.rounded.p-2.mb-2 .d-flex {
    flex-direction: column;
    gap: 6px;
  }

  .border.rounded.p-2.mb-2 .text-end {
    text-align: left !important;
  }

  /* Tables — smaller cells */
  .table-responsive table {
    font-size: 0.8rem;
  }

  .table th,
  .table td {
    padding: 8px 6px;
  }

  /* Badges */
  .badge {
    font-size: 0.7rem;
    padding: 4px 6px;
  }

  /* Alerts */
  .alert {
    padding: 12px;
    font-size: 0.85rem;
  }

  /* Modal dialogs */
  .modal-dialog {
    margin: 8px;
  }

  .modal-body {
    padding: 16px;
  }

  /* Page headers */
  .d-flex.justify-content-between.align-items-center.mb-4 h2 {
    font-size: 1.3rem;
  }

  /* Form controls */
  .form-control,
  .form-select {
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  .input-group-text {
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  /* Buttons */
  .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  /* Navbar brand */
  .nav-mobile-header .nav-brand-icon {
    max-width: 110px;
  }

  /* Bottom nav labels — prevent overflow */
  .nav-bottom-label {
    font-size: 0.55rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Deposit page — step 4 nested card */
  .address-reveal-box .content-card {
    padding: 16px;
  }

  /* Deposit page — instruction box */
  .instruction-box {
    padding: 12px 14px;
    font-size: 0.82rem;
  }

  /* Profile page — quick actions */
  .profile-card .d-flex.flex-wrap.gap-2 .btn {
    font-size: 0.72rem;
    padding: 6px 10px;
  }

  /* Sidebar mobile panel */
  .nav-panel-mobile {
    width: 280px;
  }

  .nav-panel-mobile .nav-label {
    font-size: 0.85rem;
  }

  /* Performance section */
  .tcurr-performance-box {
    padding: 20px 14px;
  }

  .tcurr-excellence-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Hero section adjustments */
  .hero-section .d-flex.gap-4 {
    flex-wrap: wrap;
    justify-content: center;
  }

  .legal-badge {
    font-size: 0.7rem;
    padding: 6px 10px;
  }

  /* Stat number mobile */
  .stat-number {
    font-size: 1.6rem;
  }

  /* CTA section buttons */
  .py-5.my-5 .animate-slide-up.delay-200 {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .py-5.my-5 .animate-slide-up.delay-200 .btn {
    margin-right: 0 !important;
    width: 100%;
  }
}

/* ============================================================
    MODERN FLUID MOBILE APPROACH (clamp)
    Applied: 2026-04-06
    ============================================================ */

/* Core Layout Fluidity */
:root {
    --fluid-px-container: clamp(0.5rem, 3vw, 1.5rem);
    --fluid-py-container: clamp(0.75rem, 4vw, 2rem);
    --fluid-fs-base: clamp(0.85rem, 2.5vw, 1rem);
    --fluid-fs-lg: clamp(1rem, 3vw, 1.25rem);
    --fluid-gap: clamp(0.5rem, 2vw, 1rem);
}

@media (max-width: 480px) {
    /* Fluid font sizing for small screens */
    body {
        font-size: var(--fluid-fs-base);
    }
    
    /* Ensure flex wraps gracefully ONLY when necessary */
    .d-flex:not(.flex-nowrap):not(.input-group) {
        flex-wrap: wrap;
    }
    
    /* Input Groups — keep inline but allow wrapping if truly needed */
    .input-group {
        flex-wrap: nowrap;
    }
    
    /* Fluid Paddings for Cards and Containers */
    .content-card,
    .plan-card,
    .wallet-card,
    .stat-card,
    .dashboard-stat-card,
    .inv-plan-card,
    .inv-stock-card,
    .glass-card {
        padding: var(--fluid-py-container) var(--fluid-px-container);
        margin-bottom: var(--fluid-gap);
        width: 100%;
        box-sizing: border-box;
    }

    /* Make text break instead of overflowing */
    h1, h2, h3, h4, h5, h6, .crypto-address-display, p, span {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    /* Modal fluid fixes */
    .modal-dialog {
        margin: clamp(0.25rem, 1.5vw, 0.5rem);
        max-width: calc(100% - clamp(0.5rem, 3vw, 1rem));
    }
}
