/* Custom CSS for Finanzas Personales - Dark Mode Native */

:root {
    /* Dark Theme Colors */
    --bg-dark: #0f172a;
    /* Slate 900 */
    --bg-card: rgba(30, 41, 59, 0.7);
    /* Slate 800 with 70% opacity */
    --text-primary: #f8fafc;
    /* Slate 50 */
    --text-secondary: #cbd5e1;
    /* Slate 300 */
    --accent-blue: #3b82f6;
    /* Blue 500 */
    --accent-purple: #8b5cf6;
    /* Violet 500 */
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --grad-bg: radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
}

/* Global Styles */
body {
    background-image: var(--grad-bg);
    background-color: var(--bg-dark);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Glassmorphism Classes */
.glass {
    background: rgba(15, 23, 42, 0.7);
    /* Darker glass for nav */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
}

/* Override Tailwind Defaults for Dark Mode Compatibility */
.bg-white {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

.text-gray-800,
.text-gray-900 {
    color: var(--text-primary) !important;
}

.text-gray-700,
.text-gray-600,
.text-gray-500 {
    color: var(--text-secondary) !important;
}

.bg-gray-50 {
    background-color: rgba(0, 0, 0, 0.2) !important;
}

/* Form Elements */
input,
select,
textarea {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
    outline: none !important;
}

/* Tables */
.divide-gray-200> :not([hidden])~ :not([hidden]) {
    border-color: var(--glass-border) !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Hover Effects */
.hover-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hover-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4), 0 10px 10px rgba(0, 0, 0, 0.3);
}

/* Utilities */
.text-gradient {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--grad-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}