/* --- CORREÇÃO DA BARRA DE ROLAGEM (FORÇA BRUTA) --- */
html, body {
    overflow-x: hidden !important; /* Evita barra horizontal em qualquer tela */
}

/* Esconde a barra cinza inútil no PC (telas grandes) */
@media (min-width: 769px) {
    html, body {
        overflow-y: hidden !important; 
        height: 100vh !important;
    }
}

/* --- ESTRUTURA PRINCIPAL --- */
body {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important; 
    box-sizing: border-box;
    background: url('../pics/fundo-azul.png') no-repeat center center fixed !important;
    background-size: cover !important;
}

/* Container principal do GLPI */
.flex-fill {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    flex: 1; 
}

/* A CAIXA INVISÍVEL: Agora destravada para permitir que o cartão cresça */
.container-tight {
    width: 100% !important;
    max-width: 500px !important; /* DESTRAVE AQUI: Permite que o conteúdo interno expanda */
    margin: 0 auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    display: flex;
    justify-content: center;
}

/* --- CARTÃO PRINCIPAL (SERVE PARA TODAS AS TELAS) --- */
.card {
    width: 100% !important;
    max-width: 460px !important; /* O cartão agora pode chegar a 460px de largura */
    background: #FFFFFF !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 15px 35px rgba(0, 37, 84, 0.4) !important; 
    padding: 0 !important; 
    
    margin-top: 0.5rem !important; 
    margin-bottom: 1.5rem !important; 
    margin-left: auto !important;
    margin-right: auto !important;
}

/* O espaçamento real do formulário: Diminuído nas laterais para abrir espaço para o campo */
.card-body {
    padding: 3rem 2rem !important; /* Mudei de 2.5rem para 2rem para as linhas ficarem mais compridas */
}

/* Removemos a formatação do col-md-5 */
.col-md-5 {
    width: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
    padding: 0 !important; 
    box-shadow: none !important;
    margin: 0 !important;
}

/* Oculta textos secundários da logo */
.login-title, .logo-text, .text-muted.mb-4 {
    display: none !important; 
}

/* --- TIPOGRAFIA E CORES (TACLA SHOPPING) --- */
.card-header h2 {
    font-size: 1.4rem !important; 
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: #002554 !important; 
}

label, .form-label, .form-check-label {
    color: #002554 !important; 
    font-weight: 500;
}

/* --- INPUTS --- */
.form-control {
    border: none !important;
    border-bottom: 2px solid #909DAA !important; 
    border-radius: 0 !important;
    box-shadow: none !important;
    padding-left: 0;
    padding-bottom: 6px !important; 
    background-color: transparent !important;
    font-size: 1rem; 
    color: #002554 !important; 
}

.form-control:focus {
    border-bottom: 2px solid #85C7D1 !important; 
}

.form-check-input:checked {
    background-color: #85C7D1 !important; 
    border-color: #85C7D1 !important;
}

/* --- BOTÕES E LINKS --- */
.btn-primary {
    background-color: #002554 !important; 
    border-color: #002554 !important;
    color: #FFFFFF !important; 
    border-radius: 8px !important;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 12px; 
    margin-top: 1.5rem;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #85C7D1 !important; 
    border-color: #85C7D1 !important;
    color: #002554 !important; 
}

a, .form-label-description a {
    color: #909DAA !important; 
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, .form-label-description a:hover {
    color: #85C7D1 !important; 
}

.form-label-description {
    float: right;
    font-weight: normal;
}

/* --- ESTILIZAÇÃO DOS ALERTAS E MENSAGENS --- */
.alert {
    border-radius: 8px !important;
    border: none !important;
    font-weight: 500;
}

/* Alerta de Informação (Recuperar Senha) */
.alert-info {
    background-color: #E8F4F8 !important; 
    color: #002554 !important; 
}

/* Alerta de Erro (Senha Incorreta) */
.alert-danger {
    background-color: #FDF2F2 !important; 
    color: #842029 !important; 
}

/* --- RODAPÉ --- */
.text-center.text-muted {
    color: rgba(255, 255, 255, 0.7) !important; 
    margin-top: 1.5rem !important;
}

.text-center.text-muted a {
    color: #85C7D1 !important; 
    font-weight: 600; 
    opacity: 1 !important;
    text-decoration: underline; 
}

.text-center.text-muted a:hover {
    color: #FFFFFF !important; 
}

/* EXCEÇÃO: O link de copyright na tela de login */
.text-center.text-muted .text-center a {
    color: #FFFFFF !important; 
    font-weight: normal !important;
    text-decoration: none !important; 
    opacity: 0.7 !important;
}

.text-center.text-muted .text-center a:hover {
    color: #85C7D1 !important; 
    opacity: 1 !important;
}

/* ========================================= */
/* --- AJUSTES PARA CELULAR (MOBILE FIX) --- */
/* ========================================= */
@media (max-width: 768px) {
    html, body {
        overflow-y: auto !important; 
    }

    body {
        justify-content: flex-start !important; 
        padding: 3rem 1rem !important; 
    }
    
    .flex-fill {
        justify-content: flex-start !important;
    }
    
    .card {
        margin-top: 2rem !important; 
    }

    .card-body {
        padding: 2rem 1.5rem !important; 
    }
    
    .card-header h2 {
        font-size: 1.25rem !important; 
    }
}