:root {
    --primary-color: #30336b;
    --accent-color: #6A006A;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Eliminar cualquier background existente */
    background-color: transparent;
}

/* Elemento para la imagen de fondo con opacidad */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/fondo_login.jpg'); /* Ajusta la ruta a tu imagen */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9; /* Ajusta la opacidad según prefieras (0 invisible, 1 completamente visible) */
    z-index: -1; /* Coloca la imagen detrás del contenido */
}

/* Capa de color sobre la imagen para mejorar el contraste */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(48, 51, 107, 0.7) 0%, rgba(48, 51, 107, 0.4) 100%);
    z-index: -1;
}

/* Ajusta el contenedor del login para que se vea bien sobre el fondo */
.login-container {
    background: rgba(199, 201, 209, 0.95); /* Añade transparencia */
    border-radius: 20px;
    overflow: hidden;
    width: 900px;
    display: flex;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2); /* Sombra para destacar sobre el fondo */
}

.login-sidebar {
    background: #30336b;
    color: white;
    padding: 40px;
    width: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-form {
    padding: 40px;
    width: 60%;
}

.form-title {
    color: var(--primary-color);
    margin-bottom: 30px;
    color: #30336b;
    /* Color text iniciar sesion*/
    font-size: 2rem;
    font-weight: 600;
}

.login-text {
    color: white;
    text-align: center;
    margin-bottom: 0;
}

.form-label {
    margin-bottom: 0.75rem;  /* Aumenta el espacio entre label e input */
    font-weight: 500;        /* Hace el texto un poco más visible */
    color: #333;            /* Color más oscuro para mejor legibilidad */
}

.form-control {
    border: none;
    border: 2px solid #30336b;
    border-radius: 10px;
    padding: 12px 10px;
    margin-bottom: 20px;
    transition: all 0.3s;
    height: 45px;
}

.form-control:focus {
    box-shadow: none;
    border-color: #30336b;
}

.btn-login {
    background: #30336b;
    color: white;
    padding: 12px 30px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    width: 100%;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    z-index: 1;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #30336b;
    transition: all 0.5s ease;
    z-index: -1;
}

.btn-login:hover::before {
    width: 100%;

}

.btn-login:hover {
    transform: translateY(-3px);
    color: white !important; /* Asegurar que el texto permanece blanco */
}

.btn-login:active {
    transform: translateY(0);
}

.form-control::placeholder {
    color: transparent;
    transition: color 0.3s ease;
    padding-left: 5px;
}

.form-control:hover::placeholder {
    color: #5e61a0	;
    padding-left: 5px;
}

.form-control:focus::placeholder {
    color: #322277;
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 5px;
}

.login-logo img {
    max-width: 150px; /* Reducido de la configuración anterior */
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        width: 90%;
    }

    .login-sidebar {
        width: 100%;
        padding: 30px;

    }

    .login-form {
        width: 100%;
        padding: 30px;
    }

    .login-logo {
        text-align: center;
        padding: 30px 0;
    }

    .login-logo img {
        max-width: 100px; /* Tamaño más pequeño para móviles */
        width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
}

.register-link {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.register-link a {
    color: #30336b;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    color: #222444;
    text-decoration: underline;
}

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 2rem !important;  /* Aumenta el espacio entre grupos de formulario */
}

.btn-primary {
    background: #30336b;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px #30336b;
    background-color: #30336b;
}

.input-group .btn-outline-secondary {
    border-color: #ced4da;
    background-color: #fff;
    color: #6c757d;
    height: 45px !important;
    padding: 0.375rem 0.75rem;
}

.input-group .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: #30336b;
}

.input-group {
    align-items: stretch;
    margin-top: 0.5rem;     /* Espacio adicional sobre el grupo de input */
}