:root {
  --primary-dark: #012169;
  --primary-red: #E31837;
  --secondary-blue: #1A3A6B;
  --light-surface: #F4F5F7;
  --dark-surface: #0A1628;
  --dark-card: #121E33;
  --success-green: #28A745;
  --text-light: #FFFFFF;
  --text-light-secondary: #E0E6ED;
  --text-dark: #1A1A2E;
  --text-dark-secondary: #4A5568;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.font-mono { font-family: 'JetBrains Mono', monospace; }

/* Animations */
@keyframes countUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInLeft { from { transform: translateX(-100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); } 20%, 40%, 60%, 80% { transform: translateX(5px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
@keyframes confetti { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(-200px) rotate(720deg); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes cardFlip { 0% { transform: perspective(1000px) rotateY(0); } 100% { transform: perspective(1000px) rotateY(180deg); } }
@keyframes cardFlipBack { 0% { transform: perspective(1000px) rotateY(180deg); } 100% { transform: perspective(1000px) rotateY(360deg); } }

.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-slide-right { animation: slideInRight 0.3s ease-out; }
.animate-slide-left { animation: slideInLeft 0.3s ease-out; }
.animate-slide-up { animation: slideInUp 0.3s ease-out; }
.animate-shake { animation: shake 0.5s ease-out; }
.animate-wiggle { animation: wiggle 0.5s ease-in-out; }
.animate-spin-slow { animation: spin 1s linear infinite; }
.animate-pulse-custom { animation: pulse 1.5s ease-in-out infinite; }

.shimmer-bg {
  background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.08) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Card flip */
.card-3d { perspective: 1000px; }
.card-inner { transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); transform-style: preserve-3d; position: relative; }
.card-inner.flipped { transform: rotateY(180deg); }
.card-front, .card-back { backface-visibility: hidden; position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.card-back { transform: rotateY(180deg); }

/* Button press */
.btn-press { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn-press:active { transform: scale(0.97); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(1, 33, 105, 0.3); border-radius: 3px; }

/* Toggle switch */
.toggle-switch { transition: background-color 0.3s ease; }
.toggle-knob { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

/* Success checkmark SVG */
.check-draw { stroke-dasharray: 60; stroke-dashoffset: 60; animation: drawCheck 0.6s ease-out 0.2s forwards; }

/* Hide scrollbar for horizontal scroll */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Donut chart */
.donut-segment { transition: opacity 0.2s ease; }
.donut-segment:hover { opacity: 0.8; }

/* Glass effect */
.glass-card {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* OTP input */
.otp-input {
  caret-color: var(--primary-red);
}
.otp-input:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 2px rgba(227, 24, 55, 0.3);
}

/* Ripple effect */
.ripple { position: relative; overflow: hidden; }
.ripple::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}
.ripple:active::after {
  width: 200%; height: 200%;
  opacity: 1;
  transition: width 0s, height 0s, opacity 0s;
}

/* Notification badge */
.notif-badge {
  animation: pulse 2s ease-in-out infinite;
}

/* Desktop sidebar */
@media (min-width: 769px) {
  .mobile-nav { display: none !important; }
}
@media (max-width: 768px) {
  .desktop-sidebar { display: none !important; }
}