/* ========================================
   LOGIN - PÁGINA DE AUTENTICAÇÃO
   ======================================== */

/* ── Reset e Configurações ────────────── */
* {
    box-sizing: border-box;
}

.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    width: 100%;
    background: #eef1f5;
}

/* ===== Lado da Imagem ===== */
.auth-split__image {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd, #6f42c1);
}

.auth-split__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.auth-split__image .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 110, 253, 0.3) 0%, rgba(30, 27, 75, 0.8) 100%);
}

/* ===== Lado do Login ===== */
.auth-split__login {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px 100px;
    background: #eef1f5;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 18px;
    padding: 40px 36px 32px;
    box-shadow: 0 8px 32px rgba(17, 24, 39, 0.08);
    border: 1px solid #e9ecef;
}

/* ── Logo ──────────────────────────────── */
.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo img {
    height: 56px;
    width: auto;
    margin-bottom: 8px;
}

/* ── Formulário ────────────────────────── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-form .form-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 4px;
    text-align: center;
}

/* ── Campos ────────────────────────────── */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-field label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #212529;
    letter-spacing: 0.01em;
}

.auth-field .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-field .input-wrapper .icon {
    position: absolute;
    left: 14px;
    color: #868e96;
    font-size: 1.05rem;
    pointer-events: none;
}

.auth-field input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 44px;
    border: 1.5px solid #ced4da;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #ffffff;
    color: #1a1a2e;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-field input:hover {
    border-color: #adb5bd;
}

.auth-field input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
    background: #ffffff;
}

.auth-field input::placeholder {
    color: #adb5bd;
}

.auth-field .toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #868e96;
    font-size: 1.1rem;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.auth-field .toggle-password:hover {
    color: #212529;
    background: #f1f3f5;
}

/* ── Botão ──────────────────────────────── */
.auth-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: #0d6efd;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

.auth-btn:hover {
    background: #0b5ed7;
}

.auth-btn:active {
    transform: scale(0.98);
}

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

/* ── Esqueci minha senha ────────────────── */
.auth-forgot {
    text-align: center;
    margin-top: 2px;
}

.auth-forgot a {
    font-size: 0.85rem;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-forgot a:hover {
    color: #0d6efd;
    text-decoration: underline;
}

/* ── Alertas ────────────────────────────── */
.auth-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.875rem;
}

.auth-alert.error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.auth-alert.success {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

/* ── Rodapé FORA DO CARD ────────────────── */
.auth-footer {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    font-size: 0.75rem;
    color: #adb5bd;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-footer .dev-link {
    color: #adb5bd;
    text-decoration: none;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-footer .dev-link:hover {
    color: #adb5bd;
    text-decoration: underline;
}

/* ========================================
   POPUP DO DESENVOLVEDOR
   ======================================== */
.dev-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dev-popup-content {
    background: #ffffff;
    border-radius: 20px;
    max-width: 420px;
    width: 90%;
    padding: 40px 36px 32px;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

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

.dev-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #adb5bd;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
}

.dev-popup-close:hover {
    color: #dc3545;
    transform: rotate(90deg);
}

.dev-popup-body {
    text-align: center;
}

.dev-popup-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #0d6efd;
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.2);
    margin-bottom: 16px;
}

.dev-popup-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.dev-popup-email {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 8px 0;
}

.dev-popup-email i {
    color: #0d6efd;
}

.dev-popup-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0;
}

.dev-popup-linkedin,
.dev-popup-github {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    color: #ffffff;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, transform 0.1s;
}

.dev-popup-linkedin {
    background: #0a66c2;
}

.dev-popup-linkedin:hover {
    background: #004182;
    color: #ffffff;
    transform: scale(1.02);
}

.dev-popup-github {
    background: #24292e;
}

.dev-popup-github:hover {
    background: #000000;
    color: #ffffff;
    transform: scale(1.02);
}

.dev-popup-role {
    font-size: 0.8rem;
    color: #adb5bd;
    margin-top: 12px;
    font-weight: 500;
}

/* ── Responsividade ────────────────────── */
@media (max-width: 900px) {
    .auth-split {
        grid-template-columns: 1fr;
    }

    .auth-split__image {
        display: none;
    }

    .auth-split__login {
        padding: 24px 16px 100px;
        min-height: 100vh;
        background: #eef1f5;
    }

    .auth-container {
        max-width: 100%;
        padding: 32px 24px;
    }

    .auth-footer {
        width: calc(100% - 32px);
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 28px 20px;
    }

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

    .auth-field input {
        height: 44px;
        font-size: 0.9rem;
    }

    .auth-btn {
        height: 44px;
        font-size: 0.95rem;
    }

    .auth-split__login {
        padding: 16px 12px 90px;
    }

    .auth-footer {
        width: calc(100% - 24px);
        bottom: 16px;
        font-size: 0.65rem;
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }

    .dev-popup-content {
        padding: 32px 20px 24px;
    }

    .dev-popup-avatar {
        width: 100px;
        height: 100px;
    }

    .dev-popup-name {
        font-size: 1.1rem;
    }
}

/* ========================================
   RECUPERAÇÃO DE SENHA — E-mail / Código / Nova senha
   Um único conjunto de classes ("pwreset-*") compartilhado pelas
   3 telas do fluxo (ForgotPassword, VerifyResetCode, ResetPassword),
   para manter a identidade visual e o comportamento consistentes.
   ======================================== */

.pwreset-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #eef1f5 0%, #e4e9f2 100%);
    padding: 20px;
}

.pwreset-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: var(--clr-radius-lg);
    padding: 36px 36px 32px;
    box-shadow: var(--clr-shadow-lg);
    border: 1px solid var(--clr-border-light);
}

/* ── Indicador de etapas ───────────────── */
.pwreset-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 26px;
}

.pwreset-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 76px;
}

.pwreset-step__dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    background: #eef1f5;
    color: var(--clr-text-light);
    border: 2px solid #eef1f5;
    transition: all 0.2s ease;
}

.pwreset-step__label {
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--clr-text-light);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: center;
}

.pwreset-step.active .pwreset-step__dot {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: #fff;
}

.pwreset-step.active .pwreset-step__label {
    color: var(--clr-primary);
}

.pwreset-step.done .pwreset-step__dot {
    background: var(--clr-accent);
    border-color: var(--clr-accent);
    color: #fff;
}

.pwreset-step.done .pwreset-step__label {
    color: var(--clr-accent-dark);
}

.pwreset-step__line {
    width: 28px;
    height: 2px;
    background: #e9ecef;
    margin-top: 13px;
    flex-shrink: 0;
}

.pwreset-step__line.done {
    background: var(--clr-accent);
}

/* ── Cabeçalho do card ─────────────────── */
.pwreset-card__header {
    text-align: center;
    margin-bottom: 26px;
}

.pwreset-card__icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 26px;
    background: rgba(15, 28, 61, 0.08);
    color: var(--clr-primary);
}

.pwreset-card__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--clr-primary);
    margin: 0 0 6px;
}

.pwreset-card__subtitle {
    color: var(--clr-text-muted);
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.5;
}

.pwreset-card__subtitle strong {
    color: var(--clr-text);
}

/* ── Formulário e campos ───────────────── */
.pwreset-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pwreset-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pwreset-field label {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--clr-text);
}

.pwreset-field .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pwreset-field .input-wrapper .icon {
    position: absolute;
    left: 14px;
    color: var(--clr-text-light);
    font-size: 1rem;
    pointer-events: none;
}

.pwreset-field input[type="email"],
.pwreset-field input[type="password"],
.pwreset-field input[type="text"] {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1.5px solid #e2e6ee;
    border-radius: var(--clr-radius-sm);
    font-size: 0.94rem;
    background: #f8f9fb;
    color: var(--clr-text);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.pwreset-field input.has-icon {
    padding-left: 44px;
}

.pwreset-field input:focus {
    outline: none;
    border-color: var(--clr-primary-light);
    box-shadow: 0 0 0 4px rgba(15, 28, 61, 0.08);
    background: #ffffff;
}

.pwreset-field input::placeholder {
    color: var(--clr-text-light);
}

.pwreset-field .toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--clr-text-light);
    font-size: 1.05rem;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.pwreset-field .toggle-password:hover {
    color: var(--clr-text);
    background: #f1f3f5;
}

.pwreset-field .form-text {
    font-size: 0.75rem;
    color: var(--clr-text-muted);
}

.pwreset-field .form-text.error {
    color: var(--clr-danger);
}

/* ── Campo do código (grande, numérico) ── */
.pwreset-code-input {
    width: 100%;
    text-align: center;
    height: 64px;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: 10px;
    font-family: Consolas, "SFMono-Regular", monospace;
    border: 1.5px solid #e2e6ee;
    border-radius: var(--clr-radius-md);
    background: #f8f9fb;
    color: var(--clr-primary);
    padding: 0 8px 0 18px;
}

.pwreset-code-input:focus {
    outline: none;
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
    background: #ffffff;
}

.pwreset-code-input::placeholder {
    letter-spacing: 6px;
    font-weight: 600;
    color: var(--clr-text-light);
}

/* ── Botão principal ───────────────────── */
.pwreset-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--clr-radius-sm);
    background: var(--clr-primary);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(15, 28, 61, 0.22);
}

.pwreset-btn:hover {
    background: var(--clr-primary-dark);
}

.pwreset-btn:active {
    transform: scale(0.98);
}

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

/* ── Links e reenvio ───────────────────── */
.pwreset-links {
    text-align: center;
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
}

.pwreset-links a {
    color: var(--clr-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.pwreset-links a:hover {
    text-decoration: underline;
}

.pwreset-links .divider {
    color: var(--clr-text-light);
}

.pwreset-resend {
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    text-align: center;
}

/* ── Alertas ────────────────────────────── */
.pwreset-alert {
    padding: 12px 16px;
    border-radius: var(--clr-radius-sm);
    font-size: 0.875rem;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.pwreset-alert.error {
    background: #fdecea;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.pwreset-alert.success {
    background: #e8f6ee;
    border: 1px solid #badbcc;
    color: #0f5132;
}

@media (max-width: 480px) {
    .pwreset-card {
        padding: 28px 22px;
    }

    .pwreset-card__title {
        font-size: 1.2rem;
    }

    .pwreset-field input[type="email"],
    .pwreset-field input[type="password"],
    .pwreset-field input[type="text"] {
        height: 44px;
        font-size: 0.9rem;
    }

    .pwreset-code-input {
        height: 56px;
        font-size: 1.5rem;
        letter-spacing: 7px;
    }

    .pwreset-btn {
        height: 44px;
        font-size: 0.95rem;
    }

    .pwreset-step {
        width: 64px;
    }
}