@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f6f9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

/* Cabeçalho Página Inicial */
.header {
    text-align: center;
    margin-bottom: 24px;
}

.brasao {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brasao img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.header-subtitle {
    color: #0c3c9c;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.header-title {
    color: #0c3c9c;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Card Principal de Login */
.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 32px;
    width: 100%;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    text-align: left;
}

.card-session-title {
    text-align: center;
    margin-bottom: 24px;
    font-weight: 600;
    color: #0c3c9c;
    font-size: 15px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

.form-group input {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 1px solid #b8cefc;
    border-radius: 8px;
    font-size: 15px;
    background-color: #f8f9fe;
    color: #333333;
    outline: none;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: #0c3c9c;
    box-shadow: 0 0 0 3px rgba(12, 60, 156, 0.12);
    background-color: #ffffff;
}

.btn-primary {
    width: 100%;
    height: 46px;
    background-color: #0c3c9c;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s;
    margin-top: 6px;
    margin-bottom: 20px;
}

.btn-primary:hover {
    background-color: #092e7a;
}

.btn-primary:active {
    transform: scale(0.99);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.links-center {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
}

.links-center a {
    color: #0c3c9c;
    text-decoration: none;
    font-weight: 600;
}

.links-center p {
    margin-bottom: 8px;
}

/* ==========================================================================
   Estilização do Modal de Recuperação de Senha
   ========================================================================== */

/* Fundo escuro e sobreposição de tela inteira */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.hidden {
    display: none !important;
}

/* Card do Modal */
.modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    position: relative;
    box-sizing: border-box;
    text-align: left;
    animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Botão Fechar (X) no canto superior direito */
.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

/* Título e Descrições das Etapas */
.modal-header {
    margin-bottom: 12px;
    padding-right: 28px;
}

.modal-title {
    color: #0c3c9c;
    font-size: 20px;
    font-weight: 800;
}

.step-description {
    color: #64748b;
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Caixas de Alerta (Feedback) */
.modal-alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.modal-alert.error {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.modal-alert.success {
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Campo com Botão de Revelar Senha (Olhinho) */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 44px;
}

.toggle-password-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    padding: 4px;
    transition: opacity 0.2s ease;
}

.toggle-password-btn:hover {
    opacity: 1;
}

/* Barra de Força da Senha */
.strength-meter {
    margin-top: 8px;
}

.strength-bar-bg {
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 4px;
}

.strength-text {
    font-size: 12px;
    color: #64748b;
    display: block;
    margin-top: 4px;
}

/* Lista de Requisitos da Senha */
.password-requirements {
    list-style: none;
    padding: 0;
    margin: 16px 0 20px 0;
}

.req-item {
    font-size: 12.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.req-item.valid {
    color: #16a34a;
    font-weight: 600;
}

.req-item.valid .req-icon {
    color: #16a34a;
}

/* Botão Reenviar Código */
.resend-container {
    text-align: center;
    margin-top: 10px;
}

.btn-link {
    background: none;
    border: none;
    color: #0c3c9c;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
}

.btn-link:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

/* Tela de Sucesso */
.text-center {
    text-align: center;
}

.success-icon {
    width: 60px;
    height: 60px;
    background-color: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    margin: 0 auto 16px auto;
}

.success-title {
    font-size: 18px;
    color: #1e293b;
    font-weight: 800;
    margin-bottom: 8px;
}

.step-content.hidden {
    display: none !important;
}