/* Box-sizing global */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* * {
    border: solid 1px red;
} */

/* Reset básico */
html,
body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Card principal */
.login-card {
    border-radius: 1rem;
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    height: 70vh;
    margin: auto;
    box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.2);
    /* display e height ajustados por media-queries */
}

@media (min-width: 768px) {
    .login-wrapper {
        height: 100vh;
    }
}

/* Painel esquerdo azul */
.left-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-left: 3.125rem;
    background:
        rgba(13, 31, 81, 0.99) url('https://objectstorage.sa-saopaulo-1.oraclecloud.com/n/grstsekotgo6/b/static/o/imagens%2Fbg-card-login.png') no-repeat center/cover;
    background-blend-mode: multiply;
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
    padding-bottom: 6.25rem;
    position: relative;
    height: 100%;
}

/* Logo */
.left-panel .logo {
    max-width: 12.5rem;
    width: auto;
    height: auto;
    margin-top: 3.125rem;
    margin-bottom: 2.5rem;
}

/* Wrapper da logo */
.logo-wrapper {
    position: absolute;
    top: 0;
    left: 3.125rem;
}

/* Texto do painel */
.text-content {
    margin-top: 12.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    width: 100%;
}

/* Container de login */
.login-container {
    max-width: 100%;
    height: 100vh;
    padding: 1.25rem;
    margin: 0;
}

/* Row e col genéricos */
.login-row {
    display: flex;
    justify-content: center;
}

.login-col {
    max-width: 31.25rem;
    width: 100%;
}

/* Corpo do card */
.login-card-body {
    padding: 4.375rem;
}

/* Títulos do formulário */
.col-md-6.bg-white h5 {
    color: #001748;
}

/* Inputs */
.login-page .form-control {
    border-radius: 0;
}

.login-page .form-control:focus {
    outline: none;
    box-shadow: 0 0 0 0.125rem rgba(13, 31, 81, 0.3);
    border-color: #0D1F51;
}

/* Input group */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
    border: 0.0625rem solid #CCC;
    border-radius: 0.625rem;
    overflow: hidden;
}

.input-group .login-input {
    border: none;
    border-radius: 0.625rem 0 0 0.625rem;
    padding: 0.625rem 0.9375rem;
    width: 100%;
}

.input-group .login-input::placeholder {
    color: #999;
    font-style: italic;
}

.input-group .login-icon {
    position: absolute;
    right: 0.625rem;
    color: #888;
    pointer-events: none;
}

/* Botão ENTRAR */
.login-card .login-btn-page {
    background-color: #001748;
    color: #FFF;
    border: none;
    border-radius: 0.625rem;
}

.login-card .login-btn-page:hover {
    background: #0D1F51;
    color: #FFF;
}

/* Erros */
.alert-danger {
    border-radius: 0.625rem;
}

.login-error-list {
    list-style: none;
    padding: 0;
}

.login-error {
    font-size: 0.9rem;
    color: #FF0000;
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-gif {
    width: 9.375rem;
    height: auto;
}

/* Background geral */
body.login-page {
    background-color: #050B18;
    background-image: url('https://objectstorage.sa-saopaulo-1.oraclecloud.com/n/grstsekotgo6/b/static/o/imagens%2Fbanner-axcred.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: cover;
    transition: background-image 0.5s ease-in-out;
}

/* === LAYOUT MOBILE ESPECÍFICO === */
@media (max-width: 767.98px) {

    .login-card {
        position: relative !important;
        overflow: visible !important;
    }

    .login-card .left-panel {
        position: relative !important;
        z-index: 1 !important;

        border-top-left-radius: 2rem !important;
        border-top-right-radius: 2rem !important;
        border-bottom-left-radius: 0rem !important;
        border-bottom-right-radius: 0rem !important;
    }

    /* Texto do painel */
    .text-content {
        margin-top: 0rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        text-align: left;
        width: 100%;
    }

    /* Card em fluxo normal, sem sombra nem borda */
    .login-card .bg-white.d-flex {
        justify-content: flex-start !important;
        display: block !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .left-panel {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: center !important;
        height: 20rem !important;
        /* ~40px */
        min-height: 0 !important;
        padding: 0 !important;
        /* padding só nas laterais */
        border-radius: 0 !important;
        background:
            rgba(13, 31, 81, 0.99) url('https://objectstorage.sa-saopaulo-1.oraclecloud.com/n/grstsekotgo6/b/static/o/imagens%2Fbg-card-login.png') no-repeat center/cover !important;
        background-size: cover !important;
    }

    /* Esconde texto de boas-vindas no header */
    .left-panel .text-content {
        display: none !important;
    }

    /* Logo enxuta e centralizada verticalmente */
    .logo-wrapper {
        position: static !important;
        top: auto !important;
        left: auto !important;
        width: auto;
        display: flex !important;
        justify-content: center;
        align-items: center;
        margin-bottom: 80px;
    }

    .logo-wrapper .logo {
        max-width: 15rem !important;
        /* ajuste o tamanho que preferir */
        margin: 0 auto !important;
    }

    .logo {
        max-width: 2rem !important;
        height: auto !important;
        margin: 0 !important;
    }

    .container.vh-100 {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        height: 100vh !important;
        min-height: 100vh !important;
        padding: 0 !important;
    }



    .login-card>.col-md-7.left-panel {
        position: relative;
        z-index: 1;
    }

    .login-card>.col-md-5.bg-white,
    .login-container {
        position: relative !important;
        z-index: 2 !important;
        /* sobe sobre o azul */
        margin: -6rem auto 1rem !important;
        /* auto nas laterais */
        width: 100% !important;
        /* garante um padding lateral */
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1) !important;
        border-top-left-radius: 1rem !important;
        margin-top: -1.5rem;
        border-top-left-radius: 5rem !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 2rem !important;
        border-bottom-right-radius: 2rem !important;
    }

    /* White-card logo abaixo, compacto */
    .login-container {
        z-index: 99;
        height: auto !important;
        max-height: none !important;
        position: relative !important;
        margin: 0.25rem 1rem 1rem !important;
        /* espaço limpo abaixo do header */
        background: #FFF !important;
        border-top-left-radius: 1rem !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        padding: 0.75rem 1rem !important;
        max-height: none !important;
        overflow: visible !important;
        box-shadow: 0 -0.125rem 0.3125rem rgba(0, 0, 0, 0.1) !important;
    }

    /* Formulário mais enxuto */
    .login-card-body {
        padding: 0.5rem 0 !important;
    }

    /* Bloco mobile-only de boas-vindas dentro do card branco */
    .login-card-body .text-content {
        margin: 0.5rem !important;
    }
}

/* Loader oculto por padrão */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.99);
    display: none;
    /* invisível até ser exibido pelo JS */
    justify-content: center;
    /* centraliza o GIF */
    align-items: center;
    z-index: 9999;
    /* acima de tudo */
}

/* Ajuste de tamanho do GIF */
.loader-gif {
    width: 40rem;
    height: 40rem;
}