/* ==========================================================
   ESTILOS PARA MODAIS DE AUTENTICAÇÃO (LOGIN E CADASTRO)
   ========================================================== */

/* Fundo escuro semitransparente que cobre a tela toda */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* Garante que fique acima de todas as tabelas */
    backdrop-filter: blur(2px);
}

/* Caixa central do formulário */
.modal-container {
    background: #ffffff;
    width: 360px;
    padding: 24px;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    position: relative;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Botão 'X' para fechar no canto superior direito */
.btn-fechar-modal {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    line-height: 1;
}

.btn-fechar-modal:hover {
    color: #2c3e50;
}

/* Título do Modal */
.modal-container h2 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 18px;
    text-align: center;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 8px;
}

/* Grupos de campos do formulário */
.campo-grupo {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.campo-grupo label {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}

.campo-grupo input {
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.campo-grupo input:focus {
    border-color: #2f6db3;
}

/* Checkbox 'Lembrar-me' */
.campo-opcao {
    font-size: 11px;
    color: #555;
    margin-bottom: 12px;
}

.campo-opcao label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Mensagens de erro de validação do campo */
.mensagem-erro {
    font-size: 10px;
    color: #e74c3c;
    margin-top: 2px;
    min-height: 14px;
}

/* Area de Feedback Geral (Sucesso ou Erro vindo da API) */
.mensagem-feedback {
    font-size: 11px;
    text-align: center;
    margin-bottom: 10px;
    min-height: 16px;
    font-weight: 600;
}

.mensagem-feedback.sucesso {
    color: #27ae60;
}

.mensagem-feedback.erro {
    color: #e74c3c;
}

/* Botão principal de submissão (ENTRAR / CADASTRAR) */
.btn-submit {
    width: 100%;
    height: 34px;
    background: #2c3e50;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #34495e;
}

/* Rodapé do Modal com links de troca */
.modal-rodape {
    margin-top: 14px;
    text-align: center;
    font-size: 11px;
    color: #666;
}

.modal-rodape a {
    color: #2f6db3;
    text-decoration: none;
    font-weight: 600;
}

.modal-rodape a:hover {
    text-decoration: underline;
}

/* Container relativo para posicionar o botão dentro do input */
.campo-senha-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.campo-senha-wrapper input {
    width: 100%;
    padding-right: 32px;
    /* Garante que o texto digitado não fique embaixo do botão */
}

/* Botão do ícone de olho */
.btn-toggle-senha {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 2px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.btn-toggle-senha:hover {
    opacity: 0.8;
}

/* ==========================================================
   MODAL BOAS-VINDAS
   ========================================================== */

.modal-boas-vindas {
    width: 600px;
    max-width: 90vw;
}

.modal-boas-vindas p {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 14px;
    text-align: justify;
}

.botoes-modal {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

.botoes-modal button {
    min-width: 180px;
    height: 38px;
    border: none;
    border-radius: 4px;
    background: #2c3e50;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.botoes-modal button:hover {
    background: #3b556e;
}