/* --- Configurações Globais e Variáveis --- */
:root {
    --primary-color: #0a4a8f; /* Azul institucional (suposição) */
    --primary-color-dark: #073b73;
    --secondary-color: #f0f4f8; /* Cinza claro de fundo */
    --dark-text: #333;
    --light-text: #ffffff;
    --border-color: #d1d9e0;
    --success-color: #28a745;
    --error-color: #dc3545;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: var(--font-main);
    background-color: var(--secondary-color);
    color: var(--dark-text);
    line-height: 1.6;
}

/* --- Estrutura Principal do Container --- */
.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    width: 100%;
    background-color: var(--light-text);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden; /* Evita que a animação de slide vaze */
}

/* --- Seção de Branding (Esquerda) --- */
.branding-section {
    /* Imagem de fundo e overlay */
    background-image: url('../DHPP2 15X22-min1.jpg'); /* Placeholder para imagem do DHPP */
    background-size: cover;
    background-position: center center;
    position: relative; /* Para o overlay */
    color: var(--light-text);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    overflow: hidden; /* Garante que a imagem não "vaze" */
}
    
/* Overlay para garantir legibilidade */
.branding-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Overlay escuro */
    z-index: 1;
}

.branding-content {
    position: relative; /* Para ficar acima do overlay */
    z-index: 2;
}

/* Removido logo-placeholder conforme instrução */

.branding-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.branding-section p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* --- Seção do Formulário (Direita) --- */
.form-section {
    display: flex;
    flex-direction: column;
    padding: 40px 50px;
    background-color: var(--light-text);
    overflow: hidden; /* Garante que as abas não quebrem o layout */
}

/* --- Navegação das Abas --- */
.tab-nav {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.tab-link {
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    padding: 15px 20px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    color: var(--dark-text);
    opacity: 0.7;
    position: relative;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.tab-link::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    position: absolute;
    bottom: -2px; /* Alinha com a borda principal */
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.tab-link.active {
    opacity: 1;
    color: var(--primary-color);
}

.tab-link.active::after {
    width: 100%;
}

/* --- Conteúdo das Abas --- */
.tab-content-wrapper {
    flex-grow: 1;
    position: relative; /* Contexto para as 'area-interna' */
    overflow-y: auto; /* Scroll se o conteúdo for grande */
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 25px;
    text-align: left; /* Padrão, pode ser centralizado para consulta */
}

/* --- Estilos de Formulário --- */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 74, 143, 0.2);
}

/* Estilo para o botão mostrar/ocultar senha */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%; /* Ajustado para o centro vertical do input */
    transform: translateY(calc(50% + 4px)); /* Ajuste fino */
    cursor: pointer;
    color: #888;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.forgot-password {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
    
.forgot-password:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: var(--light-text);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase;
}

.btn-submit:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
}
    
/* Mensagem de destaque para cadastro */
.cadastro-info-box {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- Aba de Consulta --- */
.consulta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}
    
.consulta-grid h2 {
    text-align: center;
    grid-column: 1 / -1; /* Ocupa todas as colunas */
    margin-bottom: 30px;
}

.consulta-btn {
    background-color: var(--primary-color); /* Fundo azul institucional */
    border: none; /* Remove a borda original */
    border-radius: 8px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: var(--light-text); /* Texto claro */
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Sombra conforme estilo */
}

.consulta-btn i {
    font-size: 28px; /* Ícones maiores */
    color: var(--light-text); /* Ícones claros */
    margin-bottom: 15px;
    transition: transform 0.3s ease; /* Animação para o ícone */
}

.consulta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background-color: var(--primary-color-dark); /* Escurece no hover */
}
    
.consulta-btn:hover i {
    transform: scale(1.1); /* Aumenta um pouco o ícone no hover */
}

/* --- Área Interna de Consulta (para slide) --- */
.area-interna {
    /* Oculta por padrão */
    display: none; 
    
    /* Posicionamento para cobrir a aba */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--light-text);
    
    /* Começa fora da tela à direita */
    transform: translateX(100%); 
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    padding: 20px;
    overflow-y: auto;
}

.area-interna.active {
    display: block;
    transform: translateX(0); /* Entra na tela */
}
    
.area-interna-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}
    
.btn-voltar {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--dark-text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    margin-right: 15px;
    transition: all 0.3s ease;
    display: flex; /* Para centralizar o ícone */
    justify-content: center;
    align-items: center;
}
    
.btn-voltar:hover {
    background-color: var(--secondary-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
    
.area-interna-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}
    
/* Placeholder de conteúdo */
.placeholder-content {
    font-size: 1rem;
    color: #555;
}
    
.placeholder-content p {
    margin-bottom: 15px;
}
    
.placeholder-content input {
     width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    margin-top: 10px;
}


/* --- Responsividade --- */

/* Tablets e menores */
@media (max-width: 900px) {
    .login-container {
        grid-template-columns: 1fr; /* Empilha as seções */
    }

    .branding-section {
        min-height: 250px; /* Altura mínima para a seção de branding */
        padding: 30px;
    }
        
    .branding-section h1 {
        font-size: 1.8rem;
    }

    .branding-section p {
        font-size: 1rem;
    }

    .form-section {
        padding: 30px;
    }
        
    .tab-link {
        padding: 12px 10px;
        font-size: 0.9rem;
        flex-grow: 1; /* Faz as abas ocuparem o espaço */
        text-align: center;
    }
        
    .consulta-grid {
         grid-template-columns: repeat(2, 1fr); /* 2 colunas no tablet */
         gap: 15px;
    }

    .consulta-grid h2 {
        font-size: 1.6rem;
    }

    .password-toggle {
        transform: translateY(calc(50% + 2px)); /* Ajuste para tablets */
    }
}

/* Celulares */
@media (max-width: 600px) {
    .branding-section {
        min-height: 180px;
        padding: 20px;
    }
        
    .branding-section h1 {
        font-size: 1.5rem;
    }
        
    .branding-section p {
        font-size: 0.9rem;
    }
        
    .form-section {
        padding: 20px;
    }

    .tab-nav {
        margin-bottom: 20px;
    }
        
    .tab-link {
        font-size: 0.85rem;
        padding: 10px 5px;
    }
        
    .tab-content h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
        
    .form-actions {
        flex-direction: column;
        align-items: flex-start;
    }
        
    .forgot-password {
        margin-bottom: 15px;
    }
        
    .consulta-grid {
        grid-template-columns: 1fr; /* 1 coluna no celular */
        gap: 15px;
    }
        
    .consulta-btn {
        flex-direction: row;
        justify-content: flex-start;
        padding: 18px;
    }
        
    .consulta-btn i {
        font-size: 24px; /* Ícones um pouco menores no mobile */
        margin-bottom: 0;
        margin-right: 15px;
    }

    .cadastro-info-box {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .password-toggle {
        font-size: 0.8rem;
        right: 10px;
        transform: translateY(calc(50% + 2px)); /* Ajuste para mobile */
    }
}

/* --- Estilos do Modal (Popup) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Fundo escuro transparente */
    z-index: 1000; /* Fica acima de tudo */
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-box {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateY(0);
    animation: slideUp 0.3s ease;
}

.modal-icon {
    font-size: 50px;
    color: #f39c12; /* Cor laranja de alerta */
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.modal-text {
    font-size: 1rem;
    color: #666;
    margin-bottom: 25px;
}

.modal-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.modal-btn:hover {
    background-color: var(--primary-color-dark);
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}