/* Updated with premium design tokens and advanced styling */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;900&family=Open+Sans:wght@400;500;600&display=swap");

:root {
  /* Design tokens from the brief */
  --primary: #0891b2;
  --accent: #84cc16;
  --neutral-50: #f9fafb;
  --neutral-600: #4b5563;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
}

/* Enhanced animations and transitions */
.auth-form {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form.hidden {
  display: none;
}

/* Premium notification animations */
.notification-show {
  transform: translateX(0) !important;
  animation: slideInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideInBounce {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  60% {
    transform: translateX(-10px);
    opacity: 1;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Enhanced chart container with better responsiveness */
#trendChart {
  max-height: 320px;
  width: 100% !important;
  height: 100% !important;
}

/* Premium category item styling */
.category-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid transparent;
}

.category-item:hover {
  transform: translateX(8px) scale(1.02);
  background: linear-gradient(135deg, var(--neutral-50) 0%, #ffffff 100%);
  border-left-color: var(--primary);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Enhanced transaction item styling */
.transaction-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid transparent;
  position: relative;
  overflow: hidden;
}

.transaction-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.transaction-item:hover::before {
  opacity: 1;
}

.transaction-item.income {
  border-left-color: var(--success);
}

.transaction-item.expense {
  border-left-color: var(--error);
}

.transaction-item:hover {
  transform: translateX(4px) scale(1.01);
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Enhanced budget progress with gradient animations */
.budget-progress {
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.budget-progress::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Loading states with skeleton effect */
.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Added financial goals styling */
.goal-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, #ffffff 0%, var(--neutral-50) 100%);
}

.goal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.goal-progress {
  background: linear-gradient(90deg, var(--accent), #22c55e);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced form styling */
input:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* Premium button hover effects */
button {
  position: relative;
  overflow: hidden;
}

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

button:hover::before {
  width: 300px;
  height: 300px;
}

/* Responsive enhancements */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .lg\:col-span-2 {
    grid-column: span 1;
  }

  /* Mobile-optimized cards */
  .bg-white {
    border-radius: 1rem;
  }

  /* Improved mobile typography */
  .text-3xl {
    font-size: 1.875rem;
  }

  .text-2xl {
    font-size: 1.5rem;
  }
}

/* Dark mode support preparation */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1f2937;
    --text-primary: #f9fafb;
  }
}

/* Performance optimizations */
* {
  box-sizing: border-box;
}

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

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus indicators for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
