:root {
    --primary-blue: #003366;
    --dark-blue: #002347;
    --accent-blue: #004d99;
    --white: #ffffff;
    --gray-bg: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --error: #F57373;
}

body {
    font-family: 'Outfit', sans-serif;
    margin: 0;
    height: 100vh;
    overflow: hidden;
}

/* Imagen de fondo */
.img_bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.login-wrapper {
    height: 100vh;
    background: rgba(0, 35, 71, 0.4); /* Capa de color sobre el fondo general */
}

/* Contenedor del Formulario (Lado Izquierdo) */
.bg-login-container {
    background-color: var(--white);
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    z-index: 10;
}

.login-box-content {
    width: 100%;
    max-width: 400px;
}

.login-title {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 28px;
}

/* Logo */
.img_logo_login {
    width: 130px;
    height: auto;
}

/* Botones de Perfil (Interactivos) */
.btn_perfil {
    background: var(--gray-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    width: 100px;
    transition: all 0.3s ease;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.btn_perfil i {
    font-size: 20px;
    margin-bottom: 5px;
}

.btn_perfil_active {
    border-color: var(--primary-blue);
    background: rgba(0, 51, 102, 0.05);
    color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.1);
}

/* Inputs con Iconos */
.form-group-custom {
    margin-bottom: 20px;
}

.input_primary {
    width: 100%;
    height: 52px;
    padding: 0 15px 0 45px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fcfcfc;
}

.input_primary:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.05);
}

.icon_input {
    position: absolute;
    left: 16px;
    top: 18px;
    color: var(--text-muted);
    font-size: 16px;
}

/* Mensajes de Error */
.error-message {
    font-size: 12px;
    font-weight: bold;
    color: var(--error);
    margin-top: 5px;
    display: block;
}

/* Botón Entrar Principal */
.btn_primary_login {
    width: 100%;
    height: 54px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn_primary_login:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 51, 102, 0.2);
}

/* Enlaces */
.link_route, .link_route_sub {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
}

.link_route:hover, .link_route_sub:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* Footer Custom */
.footer_custom {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    font-size: 12px;
    color: var(--text-muted);
    z-index: 100;
    border-top: 1px solid var(--border-color);
}

/* Ajustes para móviles */
@media (max-width: 991px) {
    .bg-login-container {
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.95);
    }
}

/* --- PANTALLA DE CARGA (LOADER) --- */
.loading_body {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

.loading-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 51, 102, 0.15);
    text-align: center;
    width: 90%;
    max-width: 320px;
}

.loader-visual {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
}

.custom-spinner {
    width: 100%;
    height: 100%;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #003366;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#icon_loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    color: #003366;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#text_loading {
    margin: 0;
    color: #333;
    font-size: 1rem;
    font-weight: 700;
}

.loading-progress-bar {
    width: 100%;
    height: 4px;
    background: #eee;
    border-radius: 10px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-fill {
    width: 40%;
    height: 100%;
    background: #003366;
    animation: loadingMove 1.5s infinite ease-in-out;
}

@keyframes loadingMove {
    0% { margin-left: -40%; }
    100% { margin-left: 100%; }
}
