﻿:root {
    --sag-blue: #123a73;
    --sag-bg: #f4f4f4;
    --sag-border-radius-card: 32px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
}

.login-page {
    background-color: var(--sag-bg);
    font-family: "Segoe UI", "Roboto", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-card {
    background-color: #ffffff;
    border-radius: var(--sag-border-radius-card);
    overflow: hidden;
    width: 100%;
    display: flex;
}

    .login-card .row {
        flex: 1;
        margin: 0;
    }

.left-panel {
    background-color: var(--sag-blue);
    color: #ffffff;
    padding: 60px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.right-panel {
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.card-body-login {
    width: 100%;
    max-width: 400px;
}

    .card-body-login .card-title {
        font-weight: 700;
        font-size: 2rem;
    }

.inp_login {
    width: 100%;
    border: 1px solid #dcdcdc;
    border-radius: 3rem;
    padding: 16px 56px 16px 24px;
    height: 56px;
    font-size: 1.125rem;
    outline: none;
    background-color: #fff;
}

    .inp_login:focus {
        border-color: var(--sag-blue);
        box-shadow: 0 0 0 0.2rem rgba(18, 58, 115, 0.15);
    }

.password-wrapper {
    position: relative;
}

.btn-toggle-password {
    position: absolute;
    right: 4px;
    top: 4px;
    height: 48px;
    width: 48px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7c7c7c;
    border-radius: 50%;
}

    .btn-toggle-password:hover {
        background-color: #f0f0f0;
    }

.forgot-password {
    font-size: 1.1rem;
    color: #2c63d6;
    text-decoration: none;
}

    .forgot-password:hover {
        text-decoration: underline;
    }

.form-check-input {
    width: 18px;
    height: 18px;
}

.form-check-label {
    margin-left: 4px;
}

.btn_login {
    background-color: var(--sag-blue);
    border-color: var(--sag-blue);
    border-radius: 10px;
    height: 40px;
    font-weight: 500;
    font-family: "Segoe UI", "Roboto", Arial, sans-serif;
    width: 100%;
}

    .btn_login:hover {
        background-color: #0f315f;
        border-color: #0f315f;
    }

/* Footer: centrado por defecto */
.sec_footer {
    margin-top: 24px;
    width: 100%;
    background-color: var(--sag-bg);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center; 
}

@media (min-width: 1200px) {
    .sec_footer {
        justify-content: flex-start;
        padding-left: 60px;
    }
}

.footer-logo {
    max-height: 40px;
}

@media (min-width: 1200px) {
    .sec_footer {
        justify-content: flex-start;
        padding-left: 60px;
    }
}

@media (max-width: 1199px) {
    .left-panel,
    .right-panel {
        padding: 40px 32px;
    }
}

/* Móvil general */
@media (max-width: 767px) {
    .login-page {
        background-color: #ffffff;
    }

    .login-card {
        border-radius: 0;
        flex-direction: column;
    }

    .left-panel {
        height: auto;
        padding: 20px 16px;
        min-height: 100px;
        justify-content: flex-start;
    }

    .right-panel {
        padding: 24px 16px 40px;
    }

    .sec_footer {
        padding: 16px 24px;
        justify-content: center; 
    }
}

/* Móvil pequeño (≤400px) */
@media (max-width: 400px) {
    .hero-bg {
        height: 120px;
    }

    .left-panel {
        padding: 16px 12px;
        min-height: 100px;
    }

    .right-panel {
        padding: 20px 12px 32px;
    }

    .card-body-login {
        padding: 0 12px;
    }
}

.hero-bg {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.hero-image-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* Laptop */
@media (min-width: 1200px) {
    .hero-image-layer[data-breakpoint="laptop"] {
        opacity: 1;
        background-image: url('/images/Login/IMG_SagAdmin_Bienvenida-Laptop.svg');
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1199px) {
    .hero-bg {
        height: 280px;
    }

    .hero-image-layer[data-breakpoint="tablet"] {
        opacity: 1;
        background-image: url('/images/Login/IMG_SagAdmin_Bienvenida-Tablet.svg');
        background-size: contain;
        background-position: center top;
    }
}

/* Móvil */
@media (max-width: 767px) {
    .hero-bg {
        height: 200px;
    }

    .hero-image-layer[data-breakpoint="mobile"] {
        opacity: 1;
        background-image: url('/images/Login/IMG_SagAdmin_Bienvenida-Celular.svg');
        background-size: contain;
        background-position: center top;
    }
}

/* Diseño para tablet: imagen arriba, formulario abajo */
@media (min-width: 768px) and (max-width: 1199px) {
    .login-card {
        flex-direction: column;
        max-width: 500px;
        padding: 0;
    }

    .left-panel,
    .right-panel {
        padding: 32px;
        width: 100%;
        height: auto;
    }

    .left-panel {
        order: 1;
    }

    .right-panel {
        order: 2;
    }

    .card-body-login {
        max-width: 100%;
    }

    .sec_footer {
        justify-content: left;
        padding-left: 32px;
    }
}
