/* Finance Pro - Custom Styles */

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Properties */
:root {
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    --backdrop-blur: blur(16px);
}

.dark {
    --glass-bg: rgba(17, 24, 39, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Glass Morphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Navigation Styles */
.nav-btn {
    @apply px-4 py-2 rounded-lg font-medium transition-all duration-300 text-gray-600 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400 hover:bg-indigo-50 dark:hover:bg-indigo-900/30 relative;
}

.nav-btn.active {
    @apply text-indigo-600 dark:text-indigo-400 bg-indigo-50 dark:bg-indigo-900/50;
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 1px;
}

.mobile-nav-btn {
    @apply flex items-center w-full px-4 py-3 rounded-lg font-medium transition-all duration-300 text-gray-600 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400 hover:bg-indigo-50 dark:hover:bg-indigo-900/30;
}

.mobile-nav-btn i {
    @apply w-6 text-center mr-3;
}

.mobile-nav-btn.active {
    @apply text-indigo-600 dark:text-indigo-400 bg-indigo-50 dark:bg-indigo-900/50;
}

/* Card Styles */
.card {
    @apply glass rounded-2xl p-6 transition-all duration-300 hover:shadow-xl;
}

.stat-card {
    @apply card cursor-pointer transform hover:scale-105 hover:-translate-y-1;
}

.chart-card {
    @apply card;
}

/* Button Styles */
.btn-primary {
    @apply bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 text-white px-6 py-3 rounded-xl font-medium transition-all duration-300 transform hover:scale-105 active:scale-95 shadow-lg hover:shadow-xl;
}

.btn-secondary {
    @apply bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-200 px-6 py-3 rounded-xl font-medium transition-all duration-300 transform hover:scale-105 active:scale-95;
}

.btn-danger {
    @apply bg-gradient-to-r from-red-500 to-pink-600 hover:from-red-600 hover:to-pink-700 text-white px-6 py-3 rounded-xl font-medium transition-all duration-300 transform hover:scale-105 active:scale-95 shadow-lg hover:shadow-xl;
}

.btn-success {
    @apply bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white px-6 py-3 rounded-xl font-medium transition-all duration-300 transform hover:scale-105 active:scale-95 shadow-lg hover:shadow-xl;
}

/* Form Styles */
.form-input {
    @apply w-full px-4 py-3 glass rounded-xl text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition-all duration-300;
}

.form-select {
    @apply form-input appearance-none cursor-pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Page Transitions */
.page {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideUp 0.5s ease-out;
}

/* Progress Bar */
.progress-bar {
    @apply w-full bg-gray-200 dark:bg-gray-700 rounded-full h-3 relative overflow-hidden;
}

.progress-fill {
    @apply h-full rounded-full transition-all duration-500 relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Loading States */
.skeleton {
    @apply bg-gray-200 dark:bg-gray-700 rounded animate-pulse;
}

.skeleton-text {
    @apply skeleton h-4 mb-2;
}

.skeleton-title {
    @apply skeleton h-6 mb-3;
}

.skeleton-avatar {
    @apply skeleton w-10 h-10 rounded-full;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.3);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        @apply p-4;
    }
    
    .stat-card {
        @apply hover:scale-100 hover:translate-y-0;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .page {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
        background: white !important;
    }
}

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

/* Focus States */
.focus\:ring-primary:focus {
    ring-color: #6366f1;
}

/* Custom Animations */
@keyframes pulse-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.6);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* Utility Classes */
.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}