/* ====================================
   MODERN DESIGN UPGRADE CSS
   Investment Trading Platform
   ==================================== */

:root {
  /* Modern Color Palette */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #ec4899;
  --secondary-dark: #db2777;
  --success: #10b981;
  --success-dark: #059669;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #06b6d4;
  --dark: #0f172a;
  --dark-secondary: #1e293b;
  --light: #f8fafc;
  --light-secondary: #e2e8f0;
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  --gradient-secondary: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
  --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
  --transition-fast: 0.15s ease-in-out;
  --transition-base: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
  --border-radius-sm: 0.375rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-2xl: 1.5rem;
}

/* ====================================
   GLOBAL STYLES
   ==================================== */

* {
  transition: color var(--transition-base), background-color var(--transition-base), border-color var(--transition-base);
}

body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

html[data-bs-theme="light"] body {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #1e293b;
}

/* ====================================
   TYPOGRAPHY IMPROVEMENTS
   ==================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.5px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html[data-bs-theme="light"] h1,
html[data-bs-theme="light"] h2,
html[data-bs-theme="light"] h3,
html[data-bs-theme="light"] h4,
html[data-bs-theme="light"] h5,
html[data-bs-theme="light"] h6 {
  color: var(--dark);
  background: none;
  -webkit-text-fill-color: unset;
}

p {
  font-weight: 400;
  letter-spacing: 0.3px;
}

.section-header h2 span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ====================================
   BUTTONS & LINKS
   ==================================== */

.trk-btn {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all var(--transition-base);
  border: 2px solid transparent;
}

.trk-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width var(--transition-base), height var(--transition-base);
}

.trk-btn:hover::before {
  width: 300px;
  height: 300px;
}

.trk-btn--primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.3);
}

.trk-btn--primary:hover {
  box-shadow: 0 20px 35px -5px rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}

.trk-btn--secondary {
  background: var(--gradient-secondary);
  color: white;
  box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.3);
}

.trk-btn--secondary:hover {
  box-shadow: 0 20px 35px -5px rgba(236, 72, 153, 0.5);
  transform: translateY(-2px);
}

.trk-btn--outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.trk-btn--outline:hover {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.trk-btn--outline22 {
  border: 2px solid var(--secondary);
  color: var(--secondary);
  background: transparent;
}

.trk-btn--outline22:hover {
  background: var(--secondary);
  color: white;
  box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.3);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all var(--transition-base);
}

a:hover {
  color: var(--primary-light);
  text-decoration: none;
}

/* ====================================
   HEADER & NAVIGATION
   ==================================== */

.header-section {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-base);
}

.header-section--style2 {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.95) 100%);
}

.menu a {
  position: relative;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all var(--transition-base);
}

.menu a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
}

.menu a:hover::after {
  width: 100%;
}

.logo img {
  transition: transform var(--transition-base);
}

.logo:hover img {
  transform: scale(1.05);
}

/* ====================================
   BANNER SECTION
   ==================================== */

.banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.banner--style1 {
  padding: 80px 0;
}

.banner__content-heading {
  font-size: 3.5rem;
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 30px;
  letter-spacing: -1px;
}

.banner__content-heading span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.banner__content-moto {
  font-size: 1.125rem;
  color: #cbd5e1;
  margin-bottom: 40px;
  line-height: 1.8;
}

.btn-group {
  gap: 15px;
  margin-top: 30px;
}

/* ====================================
   CARDS & CONTAINERS
   ==================================== */

.card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--border-radius-xl);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.15);
  transform: translateY(-5px);
}

html[data-bs-theme="light"] .card {
  background: rgba(248, 250, 252, 0.8);
  border-color: rgba(99, 102, 241, 0.1);
}

.card-body {
  padding: 1.75rem;
}

/* ====================================
   SERVICE ITEMS
   ==================================== */

.service__item {
  border-radius: var(--border-radius-xl);
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
  overflow: hidden;
}

.service__item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.service__item:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
  transform: translateY(-10px);
}

.service__item:hover::before {
  transform: scaleX(1);
}

.service__item-thumb img {
  transition: transform var(--transition-base);
}

.service__item:hover .service__item-thumb img {
  transform: scale(1.1);
}

/* ====================================
   PRICING CARDS
   ==================================== */

.pricing__item {
  border-radius: var(--border-radius-xl);
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}

.pricing__item-inner.active {
  background: var(--gradient-primary);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
  transform: scale(1.05);
}

.pricing__item:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.15);
  transform: translateY(-8px);
}

.pricing__list-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
}

.pricing__list-item:hover {
  padding-left: 10px;
  color: var(--primary);
}

/* ====================================
   FEATURE SECTION
   ==================================== */

.feature__item {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--border-radius-xl);
  backdrop-filter: blur(10px);
  padding: 30px;
  transition: all var(--transition-base);
}

.feature__item:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
  transform: translateY(-8px);
}

.feature__item-thumb {
  font-size: 2.5rem;
  margin-bottom: 20px;
  transition: all var(--transition-base);
}

.feature__item:hover .feature__item-thumb {
  transform: scale(1.2) rotate(-5deg);
}

/* ====================================
   TESTIMONIAL SECTION
   ==================================== */

.testimonial__item {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--border-radius-xl);
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}

.testimonial__item:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
}

.testimonial__author-thumb {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  overflow: hidden;
}

.testimonial__author-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ====================================
   DASHBOARD IMPROVEMENTS
   ==================================== */

.tiny-slide .card {
  background: rgba(30, 41, 59, 0.7);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--border-radius-lg);
  transition: all var(--transition-base);
}

.tiny-slide .card:hover {
  border-color: var(--primary);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.3);
  transform: translateY(-5px);
}

.tiny-slide .card h3 {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.75rem;
}

/* ====================================
   FORM STYLING
   ==================================== */

.form-control {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--border-radius-md);
  color: #e2e8f0;
  transition: all var(--transition-base);
  padding: 10px 15px;
}

.form-control:focus {
  background: rgba(30, 41, 59, 0.9);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
  color: white;
}

.form-control::placeholder {
  color: #94a3b8;
}

html[data-bs-theme="light"] .form-control {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(99, 102, 241, 0.2);
  color: #1e293b;
}

html[data-bs-theme="light"] .form-control:focus {
  background: white;
  border-color: var(--primary);
}

.form-label {
  color: #cbd5e1;
  font-weight: 600;
  margin-bottom: 8px;
  transition: color var(--transition-base);
}

.form-label:focus-within {
  color: var(--primary);
}

html[data-bs-theme="light"] .form-label {
  color: #1e293b;
}

/* ====================================
   ANIMATIONS
   ==================================== */

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

[data-aos] {
  animation-duration: 0.8s;
}

.floating-content {
  animation: float 3s ease-in-out infinite;
}

/* ====================================
   FOOTER IMPROVEMENTS
   ==================================== */

.footer {
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(10px);
}

.footer__link {
  position: relative;
  transition: all var(--transition-base);
}

.footer__link::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
}

.footer__link:hover::after {
  width: 100%;
}

/* ====================================
   ACCOUNT PAGE IMPROVEMENTS
   ==================================== */

.account__form .form-control {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.account__form .form-control:focus {
  background: rgba(30, 41, 59, 0.9);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.account__header h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* ====================================
   PROGRESS BARS
   ==================================== */

.progress {
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--border-radius-full);
  height: 6px;
}

.progress-bar {
  background: var(--gradient-primary);
  border-radius: var(--border-radius-full);
  transition: width 0.5s ease;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

/* ====================================
   ALERTS & BADGES
   ==================================== */

.alert {
  border-radius: var(--border-radius-lg);
  border: 1px solid;
  backdrop-filter: blur(10px);
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #86efac;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.alert-info {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.3);
  color: #67e8f9;
}

/* ====================================
   RESPONSIVE ADJUSTMENTS
   ==================================== */

@media (max-width: 768px) {
  .banner__content-heading {
    font-size: 2rem;
  }

  .banner__content-moto {
    font-size: 1rem;
  }

  .trk-btn {
    padding: 10px 20px;
    font-size: 0.875rem;
  }

  .service__item,
  .feature__item,
  .pricing__item {
    transform: none !important;
  }

  .service__item:hover,
  .feature__item:hover,
  .pricing__item:hover {
    transform: translateY(-5px) !important;
  }
}

@media (max-width: 576px) {
  .banner__content-heading {
    font-size: 1.5rem;
  }

  .btn-group {
    flex-direction: column;
  }

  .trk-btn {
    width: 100%;
  }

  h1, h2, h3, h4, h5, h6 {
    letter-spacing: 0;
  }
}

/* ====================================
   LIGHT MODE ADJUSTMENTS
   ==================================== */

html[data-bs-theme="light"] {
  --dark-text: #1e293b;
  --light-text: #e2e8f0;
}

html[data-bs-theme="light"] body {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #1e293b;
}

html[data-bs-theme="light"] .card {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(99, 102, 241, 0.15);
}

html[data-bs-theme="light"] .service__item,
html[data-bs-theme="light"] .feature__item,
html[data-bs-theme="light"] .pricing__item,
html[data-bs-theme="light"] .testimonial__item {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(99, 102, 241, 0.15);
}

html[data-bs-theme="light"] .header-section {
  background: rgba(248, 250, 252, 0.95);
  border-bottom-color: rgba(99, 102, 241, 0.1);
}

html[data-bs-theme="light"] .section-header h2 {
  color: #1e293b;
}

/* ====================================
   SCROLL ANIMATIONS
   ==================================== */

.scroll-hidden {
  opacity: 0;
  transform: translateY(50px);
}

.scroll-visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s ease-out;
}

/* ====================================
   EXTRA UTILITIES: RIPPLE, MOBILE MENU, STICKY HEADER, CTA
   ==================================== */

/* Ripple effect element inserted by JS */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
  z-index: 2;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* mobile menu open state */
.menu.open {
  display: block !important;
  max-height: 100vh;
  transition: max-height 0.4s ease;
}

/* sticky header when scrolled */
.header-section.scrolled {
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  transform: translateY(0);
  border-bottom: 1px solid rgba(99, 102, 241, 0.06);
}

/* Call To Action (CTA) section */
.cta {
  padding: 56px 0;
  background: linear-gradient(90deg, rgba(236,72,153,0.95) 0%, rgba(99,102,241,0.95) 100%);
  color: white;
  text-align: center;
  border-radius: 12px;
  margin: 40px 0;
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.18);
}

.cta h3 {
  font-size: 2rem;
  margin-bottom: 8px;
  font-weight: 800;
}

.cta p {
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.cta .trk-btn {
  margin: 6px 8px;
}

@media (max-width: 576px) {
  .cta {
    padding: 32px 12px;
    margin: 24px 0;
  }
  .cta h3 { font-size: 1.35rem; }
}

/* Menu overlay for mobile navigation */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 49;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Ensure menu appears above overlay on mobile */
.menu.open {
  position: absolute;
  top: 70px;
  right: 16px;
  left: 16px;
  z-index: 50;
  background: rgba(15,23,42,0.98);
  border-radius: 10px;
  padding: 18px;
}

/* ====================================
   ATM-STYLE CARDS (Dashboard balances)
   ==================================== */
.atm-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}

.atm-card {
  position: relative;
  color: white;
  border-radius: 16px;
  padding: 20px 22px;
  min-height: 140px;
  box-shadow: 0 12px 30px rgba(2,6,23,0.5), 0 0 1px rgba(255,255,255,0.1) inset;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(10px);
}

/* Before-pseudo element for subtle animated background */
.atm-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top-right, rgba(255,255,255,0.08), transparent);
  pointer-events: none;
}

/* entrance initial state */
.atm-card {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
}

.atm-card.scroll-visible {
  animation: scaleIn 0.6s cubic-bezier(.2,.9,.2,1) both;
}

.atm-card--primary {
  background: linear-gradient(135deg, rgba(99,102,241,0.95), rgba(236,72,153,0.95));
  box-shadow: 0 12px 30px rgba(99,102,241,0.3), 0 0 1px rgba(255,255,255,0.2) inset;
}

.atm-card--primary::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.1), transparent);
  border-radius: 50%;
  pointer-events: none;
}

.atm-card--accent {
  background: linear-gradient(135deg, rgba(6,182,212,0.95), rgba(16,185,129,0.95));
  box-shadow: 0 12px 30px rgba(6,182,212,0.3), 0 0 1px rgba(255,255,255,0.2) inset;
}

.atm-card--accent::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent);
  border-radius: 50%;
  pointer-events: none;
}

.atm-card--muted {
  background: linear-gradient(135deg, rgba(30,41,59,0.95), rgba(15,23,42,0.95));
  box-shadow: 0 12px 30px rgba(30,41,59,0.4), 0 0 1px rgba(255,255,255,0.15) inset;
}

.atm-card--muted::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.05), transparent);
  border-radius: 50%;
  pointer-events: none;
}

.atm-card .card-top {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
}

.atm-card .chip {
  width:48px;
  height:32px;
  border-radius:6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.32), rgba(255,255,255,0.08));
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
  position: relative;
}

.atm-card .chip::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  box-shadow: 8px 0 0 -2px rgba(255,255,255,0.5), 16px 0 0 -2px rgba(255,255,255,0.4);
}

.atm-card .brand {
  font-size: 0.88rem;
  opacity: 0.98;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.atm-card .balance {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.8px;
  position: relative;
  z-index: 2;
  line-height: 1.2;
}

.atm-card .balance { 
  text-shadow: 0 6px 18px rgba(2,6,23,0.35), 0 2px 4px rgba(0,0,0,0.15); 
}

.atm-card .small-meta {
  font-size: 0.82rem;
  opacity: 0.95;
}

.atm-card .atm-actions {
  display:flex;
  gap:12px;
  align-items:center;
  position: relative;
  z-index: 2;
}

.atm-card .atm-actions a {
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.atm-card .atm-actions a:hover {
  color: white;
  transform: scale(1.15);
}

.atm-card .atm-footer {
  margin-top:14px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.atm-card .atm-footer .meta-item {
  font-size: 0.81rem;
  opacity: 0.92;
  display: flex;
  align-items: center;
  gap: 4px;
}

.atm-card .quick-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  position: relative;
  z-index: 2;
}

.atm-card .quick-actions button {
  flex: 1;
  padding: 6px 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: white;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.atm-card .quick-actions button:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.atm-card .quick-actions button:active {
  transform: translateY(0);
}

.atm-card-icon {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 2.5rem;
  opacity: 0.15;
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 992px) {
  .atm-cards { grid-template-columns: repeat(2, 1fr); }
  .atm-card { padding: 18px 20px; min-height: 130px; }
}

@media (max-width: 576px) {
  .atm-cards { grid-template-columns: 1fr; }
  .atm-card { padding: 16px 18px; min-height: 120px; }
  .atm-card .balance { font-size: 1.5rem; }
  .atm-card .quick-actions { gap: 6px; }
}

/* subtle hover lift for desktop */
@media (hover: hover) and (min-width: 577px) {
  .atm-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(2,6,23,0.6), 0 0 1px rgba(255,255,255,0.15) inset;
  }
}

/* Dark mode enhancements */
[data-bs-theme="dark"] .atm-card {
  box-shadow: 0 12px 35px rgba(0,0,0,0.6), 0 0 1px rgba(255,255,255,0.1) inset;
}

/* ====================================
   MARKET PAGE STYLING
   ==================================== */

#marketTabs .nav-link {
  color: var(--dark-secondary);
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 12px 16px;
}

#marketTabs .nav-link:hover {
  color: var(--primary);
  background-color: rgba(99, 102, 241, 0.08);
  border-bottom-color: var(--primary-light);
}

#marketTabs .nav-link.active {
  color: var(--primary);
  background-color: transparent;
  border-bottom-color: var(--primary);
  box-shadow: inset 0 -2px 0 0 var(--primary);
}

#refreshBtn {
  position: relative;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

#refreshBtn:hover {
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

#refreshBtn:active {
  transform: translateY(0);
}

/* Market cards styling */
.card {
  border: 1px solid rgba(99, 102, 241, 0.2) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
}

.card:hover {
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
}

/* Individual market item cards */
#stocks .card,
#crypto .card,
#forex .card,
#index .card {
  border: 2px solid rgba(99, 102, 241, 0.15) !important;
  background: linear-gradient(135deg, #ffffff 0%, rgba(248, 250, 252, 0.5) 100%);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#stocks .card:hover,
#crypto .card:hover,
#forex .card:hover,
#index .card:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
  transform: translateX(4px);
}

/* Price and percentage badge */
.badge-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%) !important;
  color: #059669 !important;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%) !important;
  color: #dc2626 !important;
  font-weight: 600;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-primary {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%) !important;
  color: #6366f1 !important;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Loading state */
.spinner-border {
  border-width: 3px;
  width: 3rem;
  height: 3rem;
}

.spinner-border.text-primary {
  color: var(--primary) !important;
  border-color: rgba(99, 102, 241, 0.2);
  border-right-color: var(--primary);
}

/* Market page heading */
#content h3 {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #marketTabs .nav-link {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  #refreshBtn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

@keyframes fa-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.fa-spin {
  animation: fa-spin 1s linear infinite;
}

/* ====================================
   COMPREHENSIVE DARK MODE STYLING
   ==================================== */

[data-bs-theme="dark"],
html.dark-mode,
body.dark-mode {
  color-scheme: dark;
  --bs-body-bg: #0f172a;
  --bs-body-color: #e2e8f0;
  --bs-border-color: #1e293b;
  --bs-link-color: #818cf8;
  --bs-link-hover-color: #a5b4fc;
  --bs-table-bg: #1e293b;
  --bs-table-border-color: #334155;
  --bs-form-control-bg: #1e293b;
  --bs-form-control-color: #e2e8f0;
  --bs-form-control-border-color: #334155;
  --bs-form-check-bg: #1e293b;
  --bs-input-bg: #1e293b;
  --bs-input-border-color: #334155;
  --bs-input-color: #e2e8f0;
  --bs-textarea-bg: #1e293b;
  --bs-textarea-border-color: #334155;
}

/* Dark mode base styles */
html[data-bs-theme="dark"],
html.dark-mode {
  background-color: #0f172a;
  color: #e2e8f0;
}

body[data-bs-theme="dark"],
body.dark-mode {
  background-color: #0f172a;
  color: #e2e8f0;
}

/* Main content */
[data-bs-theme="dark"] main,
.dark-mode main {
  background: linear-gradient(135deg, #0f172a 0%, #1a1f3a 100%);
}

/* Text colors */
[data-bs-theme="dark"] .text-muted,
.dark-mode .text-muted {
  color: #94a3b8 !important;
}

[data-bs-theme="dark"] .text-secondary,
.dark-mode .text-secondary {
  color: #cbd5e1 !important;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6,
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6 {
  color: #f1f5f9;
}

/* Cards */
[data-bs-theme="dark"] .card,
.dark-mode .card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(99, 102, 241, 0.2) !important;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .card-body,
.dark-mode .card-body {
  background: transparent;
}

[data-bs-theme="dark"] .card-header,
.dark-mode .card-header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(30, 41, 59, 0.6) 100%) !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
  color: #e2e8f0;
}

/* Tables */
[data-bs-theme="dark"] table,
.dark-mode table {
  color: #e2e8f0;
  border-color: #334155;
}

[data-bs-theme="dark"] th,
.dark-mode th {
  background-color: rgba(99, 102, 241, 0.1);
  color: #f1f5f9;
  border-color: #334155;
}

[data-bs-theme="dark"] td,
.dark-mode td {
  border-color: #334155;
}

[data-bs-theme="dark"] tbody tr:hover,
.dark-mode tbody tr:hover {
  background-color: rgba(99, 102, 241, 0.08);
}

/* Forms */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] textarea,
.dark-mode .form-control,
.dark-mode .form-select,
.dark-mode textarea {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] textarea:focus,
.dark-mode .form-control:focus,
.dark-mode .form-select:focus,
.dark-mode textarea:focus {
  background-color: #1e293b;
  border-color: #6366f1;
  box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
  color: #e2e8f0;
}

[data-bs-theme="dark"] .form-check-input,
.dark-mode .form-check-input {
  background-color: #1e293b;
  border-color: #334155;
}

[data-bs-theme="dark"] .form-check-input:checked,
.dark-mode .form-check-input:checked {
  background-color: #6366f1;
  border-color: #6366f1;
}

/* Buttons */
[data-bs-theme="dark"] .btn-outline-primary,
.dark-mode .btn-outline-primary {
  color: #818cf8;
  border-color: #818cf8;
}

[data-bs-theme="dark"] .btn-outline-primary:hover,
.dark-mode .btn-outline-primary:hover {
  background-color: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
}

[data-bs-theme="dark"] .btn-outline-secondary,
.dark-mode .btn-outline-secondary {
  color: #ec4899;
  border-color: #ec4899;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover,
.dark-mode .btn-outline-secondary:hover {
  background-color: #ec4899;
  border-color: #ec4899;
  color: #ffffff;
}

/* Navigation */
[data-bs-theme="dark"] .navbar,
.dark-mode .navbar {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%) !important;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

[data-bs-theme="dark"] .navbar-brand,
.dark-mode .navbar-brand {
  color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .nav-link,
.dark-mode .nav-link {
  color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .nav-link:hover,
.dark-mode .nav-link:hover {
  color: #818cf8 !important;
}

[data-bs-theme="dark"] .nav-link.active,
.dark-mode .nav-link.active {
  color: #818cf8 !important;
}

/* Dropdowns */
[data-bs-theme="dark"] .dropdown-menu,
.dark-mode .dropdown-menu {
  background-color: #1e293b;
  border-color: #334155;
}

[data-bs-theme="dark"] .dropdown-item,
.dark-mode .dropdown-item {
  color: #cbd5e1;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus,
.dark-mode .dropdown-item:hover,
.dark-mode .dropdown-item:focus {
  background-color: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

[data-bs-theme="dark"] .dropdown-divider,
.dark-mode .dropdown-divider {
  border-color: #334155;
}

/* Lists */
[data-bs-theme="dark"] .list-group-item,
.dark-mode .list-group-item {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .list-group-item.active,
.dark-mode .list-group-item.active {
  background-color: #6366f1;
  border-color: #6366f1;
}

/* Badges */
[data-bs-theme="dark"] .badge-success,
.dark-mode .badge-success {
  background-color: rgba(16, 185, 129, 0.2);
  color: #86efac;
}

[data-bs-theme="dark"] .badge-danger,
.dark-mode .badge-danger {
  background-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

[data-bs-theme="dark"] .badge-warning,
.dark-mode .badge-warning {
  background-color: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

[data-bs-theme="dark"] .badge-info,
.dark-mode .badge-info {
  background-color: rgba(6, 182, 212, 0.2);
  color: #67e8f9;
}

/* Modals */
[data-bs-theme="dark"] .modal-content,
.dark-mode .modal-content {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-color: #334155;
}

[data-bs-theme="dark"] .modal-header,
.dark-mode .modal-header {
  border-color: #334155;
  background: rgba(99, 102, 241, 0.08);
}

[data-bs-theme="dark"] .btn-close,
.dark-mode .btn-close {
  filter: brightness(0) invert(1);
}

/* Pagination */
[data-bs-theme="dark"] .pagination .page-link,
.dark-mode .pagination .page-link {
  background-color: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

[data-bs-theme="dark"] .pagination .page-link:hover,
.dark-mode .pagination .page-link:hover {
  background-color: rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
  color: #818cf8;
}

[data-bs-theme="dark"] .pagination .page-link.active,
.dark-mode .pagination .page-link.active {
  background-color: #6366f1;
  border-color: #6366f1;
}

/* Tooltips */
[data-bs-theme="dark"] .tooltip-inner,
.dark-mode .tooltip-inner {
  background-color: #1e293b;
  color: #e2e8f0;
}

/* Alerts */
[data-bs-theme="dark"] .alert-primary,
.dark-mode .alert-primary {
  background-color: rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
  color: #c7d2fe;
}

[data-bs-theme="dark"] .alert-success,
.dark-mode .alert-success {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #a7f3d0;
}

[data-bs-theme="dark"] .alert-danger,
.dark-mode .alert-danger {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #fca5a5;
}

[data-bs-theme="dark"] .alert-warning,
.dark-mode .alert-warning {
  background-color: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fde047;
}

/* Spinners */
[data-bs-theme="dark"] .spinner-border,
.dark-mode .spinner-border {
  border-color: rgba(99, 102, 241, 0.2);
  border-right-color: #6366f1;
}

/* Progress bars */
[data-bs-theme="dark"] .progress,
.dark-mode .progress {
  background-color: #1e293b;
}

[data-bs-theme="dark"] .progress-bar,
.dark-mode .progress-bar {
  background: linear-gradient(90deg, #6366f1, #a5b4fc);
}

/* Code blocks */
[data-bs-theme="dark"] code,
[data-bs-theme="dark"] pre,
.dark-mode code,
.dark-mode pre {
  background-color: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}

/* ATM Cards Dark Mode */
[data-bs-theme="dark"] .atm-card,
.dark-mode .atm-card {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.4) 0%, rgba(30, 41, 59, 0.6) 100%);
  border-color: rgba(99, 102, 241, 0.3);
  color: #e2e8f0;
}

[data-bs-theme="dark"] .atm-card--primary,
.dark-mode .atm-card--primary {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-color: rgba(99, 102, 241, 0.4);
}

[data-bs-theme="dark"] .atm-card--accent,
.dark-mode .atm-card--accent {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(236, 72, 153, 0.05) 100%);
  border-color: rgba(236, 72, 153, 0.3);
}

[data-bs-theme="dark"] .atm-card--muted,
.dark-mode .atm-card--muted {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.2) 0%, rgba(71, 85, 105, 0.1) 100%);
  border-color: rgba(148, 163, 184, 0.2);
}

/* Market page dark mode */
[data-bs-theme="dark"] #marketTabs .nav-link,
.dark-mode #marketTabs .nav-link {
  color: #cbd5e1;
}

[data-bs-theme="dark"] #marketTabs .nav-link:hover,
.dark-mode #marketTabs .nav-link:hover {
  color: #818cf8;
  background-color: rgba(99, 102, 241, 0.12);
}

[data-bs-theme="dark"] #marketTabs .nav-link.active,
.dark-mode #marketTabs .nav-link.active {
  color: #818cf8;
}

/* Tradingview section dark mode */
[data-bs-theme="dark"] .tradingview-section,
.dark-mode .tradingview-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.03) 100%);
}

[data-bs-theme="dark"] .tradingview-widget-container,
.dark-mode .tradingview-widget-container {
  background-color: #1e293b;
}

/* Footer dark mode */
[data-bs-theme="dark"] footer,
.dark-mode footer {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
  border-top: 1px solid rgba(99, 102, 241, 0.2);
  color: #cbd5e1;
}

/* Links in dark mode */
[data-bs-theme="dark"] a,
.dark-mode a {
  color: #818cf8;
}

[data-bs-theme="dark"] a:hover,
.dark-mode a:hover {
  color: #a5b4fc;
}

/* Shadows in dark mode */
[data-bs-theme="dark"] .shadow,
[data-bs-theme="dark"] .shadow-sm,
[data-bs-theme="dark"] .shadow-lg,
.dark-mode .shadow,
.dark-mode .shadow-sm,
.dark-mode .shadow-lg {
  --bs-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
}

/* Menu overlay dark mode */
[data-bs-theme="dark"] .menu-overlay,
.dark-mode .menu-overlay {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
}

/* Utility backgrounds */
[data-bs-theme="dark"] .bg-light,
.dark-mode .bg-light {
  background-color: #1e293b !important;
}

[data-bs-theme="dark"] .bg-white,
.dark-mode .bg-white {
  background-color: #0f172a !important;
}

/* Borders */
[data-bs-theme="dark"] .border,
.dark-mode .border {
  border-color: #334155 !important;
}

[data-bs-theme="dark"] .border-primary,
.dark-mode .border-primary {
  border-color: rgba(99, 102, 241, 0.3) !important;
}

/* Responsive tables dark mode */
[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(odd),
.dark-mode .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(30, 41, 59, 0.5);
}

/* Toastr notifications */
[data-bs-theme="dark"] .toast,
.dark-mode .toast {
  background-color: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
}

/* Ensure consistent text rendering */
[data-bs-theme="dark"],
.dark-mode {
  accent-color: #6366f1;
}
