/* ============================================
   TELAS DE AUTENTICAÇÃO (login, cadastro, reset)
============================================ */

/* Esconde header fixo e footer nas telas auth */
body.auth-page header,
body:has(.auth-main) header {
    /* não vamos esconder — o header fica visível para o usuário voltar.
       Comentário pra você entender a intenção. */
}

/* Container principal */
.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 1rem 3rem 1rem;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at top, #172A45 0%, #0A192F 70%);
}

/* Grid futurista de fundo */
.auth-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 215, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 215, 0, 0.04) 1px, transparent 1px);
    background-size: 45px 45px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

/* Card central */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    background: rgba(15, 31, 56, 0.85);
    border: 1px solid rgba(255, 215, 0, 0.18);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 215, 0, 0.05) inset;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: cardIn 0.5s ease-out;
}

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

/* Header do card */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    height: 48px;
    width: auto;
    margin-bottom: 1rem;
}

.auth-header h1 {
    color: var(--text-light);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Alert geral */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.auth-alert.error {
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: #FCA5A5;
}

.auth-alert.success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86EFAC;
}

.auth-alert i {
    margin-top: 2px;
}

/* Formulário */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-group label i {
    color: var(--accent-gold);
    font-size: 0.8rem;
    width: 14px;
    text-align: center;
}

.form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(10, 25, 47, 0.6);
    border: 1.5px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.25s ease;
    outline: none;
}

.form-group input::placeholder {
    color: #64748B;
}

.form-group input:focus {
    border-color: var(--accent-gold);
    background: rgba(10, 25, 47, 0.9);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.12);
}

.form-group input.invalido {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-group input.valido {
    border-color: #22C55E;
}

/* Input com ícone à direita (olho de senha) */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    padding-right: 2.75rem;
}

.toggle-senha {
    position: absolute;
    right: 0.6rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.toggle-senha:hover {
    color: var(--accent-gold);
}

/* Mensagem de erro por campo */
.field-error {
    color: #FCA5A5;
    font-size: 0.78rem;
    min-height: 1em;
    line-height: 1.3;
}

/* Força de senha */
.forca-senha {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    height: 4px;
}

.forca-senha span {
    flex: 1;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 3px;
    transition: background 0.25s;
}

.forca-senha[data-nivel="1"] span:nth-child(1) { background: #EF4444; }
.forca-senha[data-nivel="2"] span:nth-child(-n+2) { background: #F59E0B; }
.forca-senha[data-nivel="3"] span:nth-child(-n+3) { background: #3B82F6; }
.forca-senha[data-nivel="4"] span { background: #22C55E; }

/* Botão principal */
.btn-auth-submit {
    background: var(--accent-gold);
    color: var(--primary-blue);
    padding: 0.95rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.2);
}

.btn-auth-submit:hover:not(:disabled) {
    background: var(--gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(255, 215, 0, 0.3);
}

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

/* Rodapé do form */
.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-footer a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--gold-hover);
    text-decoration: underline;
}

/* Honeypot: campo armadilha invisível para bots */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Responsivo */
@media (max-width: 576px) {
    .auth-main {
        padding: 110px 0.75rem 2rem 0.75rem;
        align-items: flex-start;
    }

    .auth-card {
        padding: 1.75rem 1.25rem;
        border-radius: 14px;
        max-width: 100%;
    }

    .auth-header h1 {
        font-size: 1.35rem;
    }

    .auth-logo img {
        height: 40px;
    }

    .form-group input {
        font-size: 0.9rem;
        padding: 0.8rem 0.9rem;
    }

    .btn-auth-submit {
        font-size: 0.95rem;
        padding: 0.85rem 1.25rem;
    }
}

/* ============================================
   CHECKBOX DE ACEITE DOS TERMOS
============================================ */
.form-checkbox {
    margin-top: 0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
}

/* Esconde o input padrão do navegador */
.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Caixinha customizada */
.checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(148, 163, 184, 0.4);
    border-radius: 6px;
    background: rgba(10, 25, 47, 0.6);
    position: relative;
    transition: all 0.2s ease;
    margin-top: 1px;
}

/* Hover */
.checkbox-label:hover .checkbox-custom {
    border-color: rgba(255, 215, 0, 0.5);
}

/* Foco via teclado (acessibilidade) */
.checkbox-label input[type="checkbox"]:focus-visible + .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

/* Estado marcado */
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* Checkmark (o V) */
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid var(--primary-blue);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

/* Erro no checkbox */
.checkbox-label input[type="checkbox"].invalido + .checkbox-custom,
.form-checkbox.tem-erro .checkbox-custom {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* Texto */
.checkbox-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.termos-link {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.termos-link:hover {
    color: var(--gold-hover);
    text-decoration: underline;
}

.termos-link i {
    font-size: 0.7rem;
    margin-left: 1px;
    vertical-align: middle;
}

/* Alerta de aviso (amarelo) */
.auth-alert.warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #FCD34D;
}

/* Linha de "Esqueci minha senha" */
.auth-extras {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.4rem;
}

.auth-link-esqueci {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link-esqueci:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

/* ============================================
   RECUPERAÇÃO DE SENHA — ETAPAS
============================================ */
.reset-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.reset-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.12);
    border: 1.5px solid rgba(148, 163, 184, 0.25);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.reset-step.ativo {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.reset-step.concluido {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--primary-blue);
}

.reset-step-line {
    width: 40px;
    height: 2px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.reset-step-line.preenchida {
    background: var(--accent-gold);
}

/* Bloco de confirmação da etapa 2 */
.reset-info {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 0.5rem;
}

.reset-info-titulo {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
}

.reset-info-lista {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.reset-info-lista li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.reset-info-lista li i {
    color: var(--accent-gold);
    width: 16px;
    text-align: center;
    font-size: 0.85rem;
}

.reset-info-obs {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.reset-info-obs a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
}

.reset-info-obs a:hover {
    text-decoration: underline;
}

/* Rodapé do form com ícone à esquerda */
.auth-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.auth-footer a i {
    font-size: 0.75rem;
}