/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeSlideIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeFromTop {
    0% {
        opacity: 0;
        transform: translateY(-40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeFromRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes subtlePop {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* General Styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f8f9fa;
    animation: fadeFromTop 0.8s ease;
}

/* Línea Roja Superior */
.login-header-bar {
    height: 10px;
    background-color: #800020;
    width: 100%;
    animation: fadeFromTop 1s ease-in-out;
}

/* Contenedor Principal */
.login-wrapper {
    display: flex;
    width: 100%;
    height: calc(100vh - 20px);
    overflow: hidden;
}

/* Columna Izquierda: Formulario */
.login-left {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    animation: fadeSlideIn 1.2s ease;
}

.login-container {
    width: 100%;
    max-width: 450px;
    text-align: center;
    background-color: #fff;
    padding: 20px 40px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    animation: subtlePop 1.3s ease;
}

/* Header */
.login-header img.logo {
    width: 200px;
    margin-bottom: -30px;
}

.login-header h1 {
    font-size: 24px;
    color: #800020;
    margin-bottom: 10px;
}

.login-header p {
    color: #6c757d;
    margin-bottom: 30px;
}

/* Mensaje de error */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Input container */
.input-container {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-bottom: 15px;
    background: #fff;
    height: 45px;
    overflow: hidden;
}

.input-container input {
    flex: 1;
    padding: 10px 40px 10px 35px;
    border: none;
    outline: none;
    font-size: 14px;
}

.input-container .input-icon {
    position: absolute;
    left: 10px;
    width: 20px;
    height: 20px;
    color: #800020;
}

.toggle-password {
    position: absolute;
    right: 10px;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #800020;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

/* Botón */
.login-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #800020, #990033);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s ease;
    animation: fadeInUp 1.4s ease;
}

.login-button:hover {
    background: linear-gradient(90deg, #990033, #800020);
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(153, 0, 51, 0.4);
}

/* Link inferior */
.create-account {
    margin-top: 10px;
    font-size: 14px;
    color: #6c757d;
}

.create-account a {
    color: #800020;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.create-account a:hover {
    color: #990033;
}

/* Imagen derecha */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #800020;
    overflow: hidden;
    animation: fadeFromRight 1.5s ease;
}

.login-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer */
.login-footer {
    text-align: center;
    padding: 10px;
    background-color: #800020;
    color: white;
    font-size: 14px;
    animation: fadeFromTop 2s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-right {
        display: none;
    }

    .login-left {
        width: 100%;
    }

    .login-container {
        padding: 20px;
    }
}