/* Custom CSS for Expense Tracker */

:root {
  --primary-blue: #3b82f6;
  --primary-blue-dark: #2563eb;
  --success-green: #10b981;
  --warning-amber: #f59e0b;
  --danger-red: #ef4444;
}

.dark {
  color-scheme: dark;
}

/* Tab System */
.tab-content {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease-in-out;
}

.tab-content.hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.tab-button.active {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

/* Form Styling */
input:focus, 
select:focus, 
textarea:focus {
  outline: none;
  ring: 2px;
  ring-color: rgba(59, 130, 246, 0.5);
  border-color: var(--primary-blue);
}

/* Button Hover Effects */
button {
  transition: all 0.2s ease-in-out;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* Card Animations */
.bg-white, .dark .bg-gray-800 {
  transition: all 0.3s ease-in-out;
}

.bg-white:hover, .dark .bg-gray-800:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Toast Animation */
.toast-show {
  transform: translateX(0) !important;
}

/* Table Styling */
table tr:hover {
  background-color: rgba(59, 130, 246, 0.05);
}

.dark table tr:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

/* Chart Container */
canvas {
  max-height: 300px;
}

/* Responsive Grid */
@media (max-width: 768px) {
  .grid-cols-1.md\\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .grid-cols-1.md\\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .grid-cols-1.lg\\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-4 {
    grid-template-columns: 1fr;
  }
}

/* Loading Animation */
.loading {
  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.4), transparent);
  animation: loading 1.5s infinite;
}

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

/* Category Icons */
.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  margin-right: 8px;
}

.category-food { background-color: #fef3c7; color: #d97706; }
.category-transportation { background-color: #ddd6fe; color: #7c3aed; }
.category-shopping { background-color: #fce7f3; color: #db2777; }
.category-entertainment { background-color: #dcfce7; color: #16a34a; }
.category-healthcare { background-color: #fee2e2; color: #dc2626; }
.category-utilities { background-color: #e0f2fe; color: #0369a1; }
.category-travel { background-color: #fef9c3; color: #ca8a04; }
.category-other { background-color: #f3f4f6; color: #6b7280; }

/* Dark mode category icons */
.dark .category-food { background-color: rgba(217, 119, 6, 0.2); }
.dark .category-transportation { background-color: rgba(124, 58, 237, 0.2); }
.dark .category-shopping { background-color: rgba(219, 39, 119, 0.2); }
.dark .category-entertainment { background-color: rgba(22, 163, 74, 0.2); }
.dark .category-healthcare { background-color: rgba(220, 38, 38, 0.2); }
.dark .category-utilities { background-color: rgba(3, 105, 161, 0.2); }
.dark .category-travel { background-color: rgba(202, 138, 4, 0.2); }
.dark .category-other { background-color: rgba(107, 114, 128, 0.2); }

/* Smooth transitions for all elements */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.dark ::-webkit-scrollbar-track {
  background: #374151;
}

.dark ::-webkit-scrollbar-thumb {
  background: #6b7280;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}