/* Modern Auth Pages Design */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #2d3436;
    --accent-color: #6c5ce7;
}

body.auth-page {
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(-45deg, #00d2ff, #3a7bd5, #0052d4, #6fb1fc);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    z-index: 999999;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 15px;
    z-index: 10;
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
}

.auth-header {
    background: transparent;
    padding: 2.5rem 2rem 1rem;
    text-align: center;
}

.auth-header h3 {
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

.auth-body {
    padding: 1rem 2rem 2.5rem;
}

.form-floating>.form-control {
    border-radius: 12px;
    border: 1px solid #dfe6e9;
    padding-left: 1rem;
    background-color: #ffffff;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.form-floating>.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(108, 92, 231, 0.25);
}

/* Forzar fondo blanco para todos los campos, incluso con validación o autofill */
.auth-card .form-control,
.auth-card .form-control:not(:placeholder-shown),
.auth-card .form-control:valid,
.auth-card .form-control:invalid,
.auth-card .form-control:focus {
    background-color: #ffffff !important;
    background-image: none !important;
    /* Eliminar iconos de validación de Bootstrap si existen */
}

/* Corregir el color de fondo de autofill en navegadores basados en Webkit (Chrome, Safari, Edge) */
.auth-card .form-control:-webkit-autofill,
.auth-card .form-control:-webkit-autofill:hover,
.auth-card .form-control:-webkit-autofill:focus,
.auth-card .form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: var(--text-color) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.btn-auth {
    background: linear-gradient(135deg, #0d6efd 0%, #0043a8 100%);
    color: white !important;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-auth:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(13, 110, 231, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #1e7bfd 0%, #0056d6 100%);
}

.btn-auth:active {
    transform: translateY(-1px) scale(0.98);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Background Circles Animation */
.circles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Bajado de 1 a 0 para asegurar que esté detrás de todo */
    overflow: hidden;
    pointer-events: none !important;
    user-select: none;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: expandContract 15s infinite alternate ease-in-out;
    pointer-events: none !important;
    will-change: transform, opacity;
}

.bg-circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    right: -50px;
    animation-delay: -2s;
    background: rgba(255, 255, 255, 0.1);
}

.bg-circle-3 {
    width: 200px;
    height: 200px;
    top: 20%;
    right: 15%;
    animation-delay: -5s;
    animation-duration: 20s;
}

.bg-circle-4 {
    width: 500px;
    height: 500px;
    bottom: 10%;
    left: 10%;
    animation-delay: -7s;
    background: rgba(255, 255, 255, 0.05);
}

@keyframes expandContract {
    0% {
        transform: scale(1) translateY(0);
        opacity: 0.1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        transform: scale(1.8) translateY(-20px);
        opacity: 0.15;
    }
}

/* Hide envelopes as requested to focus on circles */
.envelopes {
    display: none;
}

.envelope:nth-child(1) {
    top: 20%;
    left: 5%;
    animation-delay: 0s;
}

.envelope:nth-child(2) {
    top: 80%;
    left: 20%;
    animation-delay: 12s;
    animation-duration: 55s;
}

.envelope:nth-child(3) {
    top: 40%;
    left: 85%;
    animation-delay: 5s;
}

.envelope:nth-child(4) {
    top: 10%;
    left: 45%;
    animation-delay: 20s;
    animation-duration: 50s;
}

.envelope:nth-child(5) {
    top: 60%;
    left: 15%;
    animation-delay: 25s;
}

.envelope:nth-child(6) {
    top: 90%;
    left: 75%;
    animation-delay: 10s;
}

.envelope:nth-child(7) {
    top: 30%;
    left: 35%;
    animation-delay: 35s;
}

.envelope:nth-child(8) {
    top: 70%;
    left: 60%;
    animation-delay: 15s;
    animation-duration: 65s;
}

.envelope:nth-child(9) {
    top: 50%;
    left: 10%;
    animation-delay: 8s;
    animation-duration: 75s;
}

.envelope:nth-child(10) {
    top: 15%;
    left: 90%;
    animation-delay: 30s;
    animation-duration: 40s;
}


/* Alert customization */
.alert-modern {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Register specific */
.register-container {
    max-width: 600px;
}