@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    font-family: 'Inter', sans-serif;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

.stat-card-2 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    transition: all 0.3s ease;
}

.stat-card-3 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    transition: all 0.3s ease;
}

.stat-card-4 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    transition: all 0.3s ease;
}

.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Enhanced shadows for cards */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Smooth transitions for all interactive elements */
button, .hover\:bg-gray-50:hover, .hover\:bg-blue-200:hover, .hover\:bg-gray-200:hover {
    transition: all 0.2s ease-in-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Enhanced table styling */
table tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

/* Loading animation for charts */
canvas {
    animation: fadeIn 0.8s ease-in;
}

/* Chart container fixes */
.chart-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.chart-container canvas {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Prevent chart reflow issues */
canvas {
    animation: fadeIn 0.8s ease-in;
    max-width: 100%;
    height: auto;
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .grid {
        gap: 1rem;
    }
    
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Header responsive improvements */
@media (max-width: 1024px) {
    .gradient-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .gradient-text {
        font-size: 1.25rem;
    }
    
    header .py-6 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

@media (max-width: 640px) {
    .gradient-text {
        font-size: 1.125rem;
    }
    
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Mobile menu animations */
#mobileSearch, #mobileProfile {
    transition: all 0.3s ease-in-out;
}

#mobileSearch.hidden, #mobileProfile.hidden {
    opacity: 0;
    transform: translateY(-10px);
}

#mobileSearch:not(.hidden), #mobileProfile:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

/* Notification badge responsive */
@media (max-width: 768px) {
    .absolute.-top-1.-right-1 {
        top: -2px;
        right: -2px;
    }
}

/* Tab styles */
.tab-button {
    transition: all 0.2s ease-in-out;
}

.tab-button.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.tab-button:hover {
    color: #374151;
}

/* Toggle switch styles */
.peer:checked ~ .peer-checked\:bg-blue-600 {
    background-color: #2563eb;
}

.peer:focus ~ .peer-focus\:ring-4 {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
}

/* Modal styles */
.modal-overlay {
    backdrop-filter: blur(4px);
}

/* Enhanced table hover effects */
.transaction-row:hover {
    background-color: rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Edit button styles */
.edit-btn {
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

.edit-btn:hover {
    background-color: rgba(59, 130, 246, 0.1);
    transform: scale(1.1);
}

/* Form styles */
select, textarea {
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

select:focus, textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Dropdown specific styles */
#primary-dropdown, #sub-dropdown {
    z-index: 1000;
}

/* Ensure dropdown options are clickable */
#primary-dropdown > div, #sub-dropdown > div {
    user-select: none;
}

/* Disabled input styling */
input:disabled {
    background-color: #f9fafb;
    cursor: not-allowed;
}
