/* =====================================================
   AUTH_PAGES.CSS — Change Password, Forgot Password,
   Verify OTP, Reset Password
   Light theme — matches CoinScanner design system
   ===================================================== */

.auth-flow-page {
    min-height: calc(100vh - 64px);
    background: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-flow-box {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1.5px solid #E2E8F0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(57,117,234,0.06);
    animation: boxIn 0.25s ease;
}

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

/* ── HEADER ──────────────────────────────────────────── */
.afb-header {
    padding: 28px 32px 22px;
    border-bottom: 1.5px solid #F1F5F9;
}

.afb-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #3975EA;
    text-decoration: none;
    margin-bottom: 16px;
    transition: gap 0.15s;
}

.afb-back:hover { gap: 9px; }

.afb-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #EFF6FF;
    border: 1.5px solid #DBEAFE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #3975EA;
    margin-bottom: 14px;
}

.afb-title {
    font-family: 'Syne', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 4px;
}

.afb-sub {
    font-size: 13px;
    color: #64748B;
    line-height: 1.5;
}

/* ── FORM BODY ───────────────────────────────────────── */
.afb-body {
    padding: 24px 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── FIELD ───────────────────────────────────────────── */
.afb-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.afb-label {
    font-size: 11px;
    font-weight: 800;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.afb-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.afb-input {
    width: 100%;
    height: 44px;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    padding: 0 44px 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: #0F172A;
    font-family: 'DM Sans', sans-serif;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.afb-input:focus {
    border-color: #3975EA;
    box-shadow: 0 0 0 3px rgba(57,117,234,0.1);
    background: #ffffff;
}

.afb-input.error-input {
    border-color: #F87171;
    box-shadow: 0 0 0 3px rgba(248,113,113,0.1);
}

.afb-eye {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #94A3B8;
    font-size: 14px;
    padding: 4px;
    transition: color 0.15s;
}

.afb-eye:hover { color: #3975EA; }

.afb-hint {
    font-size: 11px;
    color: #94A3B8;
}

/* ── PASSWORD STRENGTH ───────────────────────────────── */
.afb-strength-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: -4px;
}

.afb-strength-bar {
    height: 3px;
    border-radius: 2px;
    background: #E2E8F0;
    overflow: hidden;
}

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

.afb-strength-label {
    font-size: 10px;
    font-weight: 700;
}

/* ── FORGOT LINK ─────────────────────────────────────── */
.afb-forgot {
    font-size: 12px;
    font-weight: 700;
    color: #3975EA;
    text-decoration: none;
    text-align: right;
    display: block;
    margin-top: -8px;
}

.afb-forgot:hover { text-decoration: underline; }

/* ── BUTTONS ─────────────────────────────────────────── */
.afb-btn-primary {
    height: 46px;
    background: #3975EA;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.afb-btn-primary:hover {
    background: #2d62d4;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(57,117,234,0.3);
}

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

.afb-btn-ghost {
    height: 42px;
    background: transparent;
    color: #64748B;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.15s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.afb-btn-ghost:hover {
    border-color: #CBD5E1;
    color: #0F172A;
}

/* ── ALERT MESSAGES ──────────────────────────────────── */
.afb-alert {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.afb-alert.error {
    background: #FEF2F2;
    border: 1.5px solid #FECACA;
    color: #B91C1C;
}

.afb-alert.success {
    background: #F0FDF4;
    border: 1.5px solid #BBF7D0;
    color: #15803D;
}

/* ── OTP BOXES ───────────────────────────────────────── */
.otp-wrap {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 4px 0;
}

.otp-box {
    width: 46px;
    height: 52px;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    background: #F8FAFC;
    font-size: 22px;
    font-weight: 800;
    color: #0F172A;
    text-align: center;
    font-family: 'Syne', sans-serif;
    outline: none;
    transition: all 0.15s ease;
    caret-color: #3975EA;
}

.otp-box:focus {
    border-color: #3975EA;
    box-shadow: 0 0 0 3px rgba(57,117,234,0.1);
    background: #ffffff;
}

.otp-box.filled {
    border-color: #3975EA;
    background: #EFF6FF;
    color: #3975EA;
}

.otp-timer {
    text-align: center;
    font-size: 12px;
    color: #94A3B8;
}

.otp-resend-btn {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 700;
    color: #3975EA;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    padding: 0;
}

.otp-resend-btn:disabled {
    color: #94A3B8;
    cursor: not-allowed;
}

.otp-sent-to {
    text-align: center;
    font-size: 12px;
    color: #64748B;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    padding: 10px 14px;
}

.otp-sent-to strong {
    color: #0F172A;
    font-weight: 700;
}

/* ── SUCCESS STRIP ───────────────────────────────────── */
.afb-success-strip {
    background: #F0FDF4;
    border: 1.5px solid #BBF7D0;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #15803D;
}

/* ── MOBILE ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-flow-page { padding: 20px 12px; align-items: flex-start; padding-top: 30px; }
    .auth-flow-box  { border-radius: 16px; }
    .afb-header     { padding: 22px 20px 18px; }
    .afb-body       { padding: 18px 20px 24px; }
    .otp-box        { width: 40px; height: 46px; font-size: 20px; }
}