/* ==========================================================================
   UNEMAT LOGIN - WINDOWS EXTRA-LARGO (SIMETRIA PERFEITA 50/50 - REVISADO)
   ========================================================================== */

body.eso-login-custom,
body.unematlogin-login-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 16px;
    box-sizing: border-box;
    font-family: var(--tblr-font-sans-serif, inherit);
    transition: background 0.3s ease;
}

/* Card Principal Ampliado - Altura aumentada de 620px para 680px para comportar todos os textos */
body.eso-login-custom .container-tight,
body.unematlogin-login-custom .container-tight {
    display: flex !important;
    flex-direction: row;
    width: 100%;
    max-width: 1240px;     
    height: 680px;         /* Aumentado de 620px para 680px */
    min-height: auto !important;
    background: var(--eso-card-bg, #ffffff) !important;
    border: 1px solid var(--eso-border, #cbd5e1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Painel Esquerdo (Formulário de Acesso do GLPI) - Simetria 50% */
body.eso-login-custom .form-panel,
body.unematlogin-login-custom .form-panel {
    flex: 1;               /* Restaurado para flex: 1 (Lados com pesos idênticos de 50%) */
    padding: 40px 48px;    
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Mescla o Card GLPI nativo ao nosso painel */
body.eso-login-custom .main-content-card,
body.unematlogin-login-custom .main-content-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* 
   FORÇAMENTO DO GRID (CRITICAL):
   Abre totalmente o grid de login nativo (col-md-5 e col-lg-5) para preencher
   horizontalmente todo o lado esquerdo, zerando as restrições e espaçamentos.
*/
body.eso-login-custom .form-panel .col-md-5,
body.eso-login-custom .form-panel .col-lg-5,
body.unematlogin-login-custom .form-panel .col-md-5,
body.unematlogin-login-custom .form-panel .col-lg-5 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Zera margens negativas e paddings internos da row nativa do bootstrap do GLPI */
body.eso-login-custom .form-panel .row,
body.unematlogin-login-custom .form-panel .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
}

/* Remove margens e sombras extras do formulário nativo */
body.eso-login-custom .form-panel .card,
body.unematlogin-login-custom .form-panel .card {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Garante que os inputs do GLPI fiquem abertos a 100% da largura útil do painel esquerdo */
body.eso-login-custom .main-content-card .form-control,
body.unematlogin-login-custom .main-content-card .form-control {
    width: 100% !important;
    font-size: 14px;
}

/* ALARGAMENTO DO RODAPÉ DO FORMULÁRIO */
body.eso-login-custom .form-panel .form-footer,
body.unematlogin-login-custom .form-panel .form-footer {
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Botão de login com a cor primária configurada - Expansão total */
body.eso-login-custom .main-content-card .btn-primary,
body.eso-login-custom .main-content-card button[type="submit"],
body.unematlogin-login-custom .main-content-card .btn-primary,
body.unematlogin-login-custom .main-content-card button[type="submit"] {
    background-color: var(--eso-primary, #1e40af) !important;
    border-color: var(--eso-primary, #1e40af) !important;
    color: #ffffff !important;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    width: 100% !important;    
    box-sizing: border-box;
}

/* Painel Direito (Fundo Branco com Imagem Central Maximizada e TIU +30%) - Simetria 50% */
body.eso-login-custom .illus-panel,
body.unematlogin-login-custom .illus-panel {
    flex: 1;               /* Restaurado para flex: 1 (Lados com pesos idênticos de 50%) */
    background-color: #ffffff !important;
    border-left: 1px solid var(--eso-border, #cbd5e1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 32px 40px;    
    height: 100%;
    box-sizing: border-box;
}

/* Bloco da Logo da Instituição (Cima) */
body.eso-login-custom .logo-wrap,
body.unematlogin-login-custom .logo-wrap {
    height: 72px;          
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

body.eso-login-custom .logo-wrap img,
body.unematlogin-login-custom .logo-wrap img {
    max-height: 66px;
    max-width: 95%;
    object-fit: contain;
}

/* IMAGEM PRINCIPAL MAXIMIZADA (CRITICAL) */
body.eso-login-custom .illus-img,
body.unematlogin-login-custom .illus-img {
    height: 370px;         /* Mantido em 370px, mas agora preenchendo as laterais ampliadas */
    width: 100%;
    max-width: 100%;
    object-fit: contain;
    margin: auto 0;
}

/* Bloco da Logo TIU (Baixo) - Expandido em 30% */
body.eso-login-custom .tiu-wrap,
body.unematlogin-login-custom .tiu-wrap {
    height: 56px;          
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
}

body.eso-login-custom .tiu-wrap img,
body.unematlogin-login-custom .tiu-wrap img {
    max-height: 48px;      
    max-width: 85%;
    object-fit: contain;
    opacity: 0.9;
}

/* 
   BLOCO DE TEXTO INFORMATIVO DE AVISOS ALARGADO (CRITICAL):
   Line-height ajustado para 1.15 para garantir que a letra "g" e descendentes 
   apareçam inteiras de forma limpa, mantendo o bloco perfeitamente compacto e legível.
*/
body.eso-login-custom .unemat-custom-rich-text,
body.unematlogin-login-custom .unemat-custom-rich-text {
    margin-top: 16px !important;  
    margin-left: 0 !important;      
    margin-right: 0 !important; 
    font-size: 13.5px !important;   
    color: #334155 !important;
    line-height: 1.15 !important;  
    width: 100% !important;
    text-align: left !important;
    box-sizing: border-box;
}

/* Remove completamente margens e heranças verticais de parágrafos */
body.eso-login-custom .unemat-custom-rich-text p,
body.unematlogin-login-custom .unemat-custom-rich-text p {
    margin: 0 0 3px 0 !important;  
    padding: 0 !important;
    line-height: 1.15 !important;  
    width: 100% !important;
}

/* Compactação de quebras de linha manuais (<br>) */
body.eso-login-custom .unemat-custom-rich-text br,
body.unematlogin-login-custom .unemat-custom-rich-text br {
    content: "";
    margin: 1px 0 !important;    
    display: block;
}

/* Responsividade Mobile (Comprime verticalmente para smartphones) */
@media (max-width: 820px) {
    body.eso-login-custom .container-tight,
    body.unematlogin-login-custom .container-tight {
        flex-direction: column;
        max-width: 440px;
        height: auto;
        margin: 16px;
    }
    body.eso-login-custom .illus-panel,
    body.unematlogin-login-custom .illus-panel {
        display: none !important; 
    }
}
