/* ==========================================================================
   BASE — Variables, Reset, Scrollbar, Animaciones
   ========================================================================== */

:root {
    /* Paleta Institucional */
    --primary-color: #581845;
    --primary-dark: #7e0f2e;
    --primary-light: #7E243B;
    --secondary-color: #D4AF37;
    --secondary-light: #F0D67A;
    --secondary-dark: #B8941E;
    --white: #ffffff;
    --gray-light: #F8F9FA;
    --gray-mid: #E2E8F0;
    --text-dark: #000000;
    --text-muted: #64748B;

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(255, 250, 250, 0.05);
    --shadow-md: 0 4px 6px -1px rgb(255, 253, 253), 0 2px 4px -1px rgb(255, 251, 251);
    --shadow-lg: 0 10px 15px -3px rgba(255, 251, 251, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgb(255, 239, 239), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(255, 255, 255, 0.25);

    /* Transiciones */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --container-padding: 1rem;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--gray-light);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98)), url('../img/fondo.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    min-height: 100vh;
    line-height: 1.5;
    color: var(--text-dark);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Cards genérico (glassmorphism compartido) */
.card,
.form-card,
.stat-card,
.login-card {
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    animation: fadeIn 0.8s ease-out;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px 0 rgba(246, 245, 245, 0.202) !important;
}

.card:hover,
.form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 40px -15px rgba(255, 254, 254, 0.807);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}