﻿/* ==========================================================================
   Forgot / Reset Password — enterprise UI
   wwwroot/css/forgotpassword.css
   ========================================================================== */

:root {
    --fp-primary: #1d4ed8;
    --fp-primary-dark: #1741ad;
    --fp-ink: #111827;
    --fp-muted: #6b7280;
    --fp-line: #e5e7eb;
    --fp-bg: #eef2f7;
    --fp-ok: #10b981;
    --fp-warn: #f59e0b;
    --fp-err: #dc2626;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Inter, system-ui, -apple-system, Arial, sans-serif;
    background: var(--fp-bg);
    color: var(--fp-ink);
    -webkit-font-smoothing: antialiased;
}

.fp-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px; /* reduced padding to avoid huge empty margins */
}

/* ---- Card --------------------------------------------------------------- */
.fp-card {
    width: 100%;
    max-width: 960px; /* keep a sane max width */
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(17, 24, 39, .12);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    animation: fpIn .45s cubic-bezier(.2, .8, .2, 1);
    margin: 8px; /* small outer margin so it never touches viewport edge */
}

@keyframes fpIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.fp-left {
    padding: 32px 36px; /* reduced padding to keep layout compact */
    display: flex;
    flex-direction: column;
}

.fp-brand img {
    height: 30px;
    margin-bottom: 22px;
}

.fp-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -.02em;
}

.fp-sub {
    color: var(--fp-muted);
    font-size: 13.5px;
    margin: 4px 0 18px;
}

/* ---- Stepper ------------------------------------------------------------ */
.fp-stepper {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    gap: 12px;
}

.fp-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 96px;
}

.fp-step-dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e5e7eb;
    color: #9ca3af;
    font-weight: 700;
    font-size: 15px;
    transition: all .28s cubic-bezier(.2,.9,.2,1);
    position: relative;
    box-shadow: 0 6px 20px rgba(16,24,40,0.06);
}

.fp-step-num { font-size: 15px; }

.fp-step.is-active .fp-step-dot {
    background: linear-gradient(180deg, #3161f6 0%, #143ea8 100%);
    color: #fff;
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 10px 30px rgba(49,97,246,0.18), 0 2px 6px rgba(0,0,0,0.08) inset;
}

/* subtle pulse for active step */
.fp-step.is-active .fp-step-dot::after {
    content: '';
    position: absolute;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(49,97,246,0.12) 0%, transparent 40%);
    z-index: -1;
    animation: fpPulse 1.8s infinite ease-out;
}

@keyframes fpPulse {
    0% { transform: scale(.9); opacity: .9; }
    70% { transform: scale(1.12); opacity: .2; }
    100% { transform: scale(1.2); opacity: 0; }
}

.fp-step.is-done .fp-step-dot {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.fp-step-line {
    flex: 1;
    height: 3px; /* thicker line */
    background: var(--fp-line);
    margin-top: 19px;
    border-radius: 4px;
    transition: background .25s;
}

.fp-step-label {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
    color: var(--fp-muted);
    font-weight: 700;
}

.fp-step.is-active .fp-step-label { color: var(--fp-ink); }

/* ---- Panels ------------------------------------------------------------- */
.fp-panel {
    display: none;
}

    .fp-panel.is-active {
        display: block;
        animation: fpSlide .32s ease;
    }

@keyframes fpSlide {
    from {
        opacity: 0;
        transform: translateX(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ---- Fields ------------------------------------------------------------- */
.fp-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 7px;
    color: #374151;
}

    .fp-label .req {
        color: var(--fp-err);
    }

.fp-field {
    position: relative;
}

.fp-ico {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: #9ca3af;
    pointer-events: none;
}

.fp-input {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 40px;
    border: 1.5px solid var(--fp-line);
    border-radius: 10px;
    background: #f9fafb;
    font-size: 14px;
    color: var(--fp-ink);
    transition: border-color .18s, box-shadow .18s, background .18s;
}

    .fp-input:focus {
        outline: none;
        background: #fff;
        border-color: var(--fp-primary);
        box-shadow: 0 0 0 4px rgba(29, 78, 216, .10);
    }

    .fp-input::placeholder {
        color: #b6bcc6;
    }

.fp-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    display: grid;
    place-items: center;
    cursor: pointer;
    border-radius: 8px;
}

    .fp-eye svg {
        width: 18px;
        height: 18px;
        fill: #9ca3af;
    }

    .fp-eye:hover svg {
        fill: #6b7280;
    }

    .fp-eye.is-on svg {
        fill: var(--fp-primary);
    }

.fp-hint {
    font-size: 12px;
    color: var(--fp-muted);
    margin: 8px 0 18px;
}

.fp-error {
    display: none;
    font-size: 12.2px;
    color: var(--fp-err);
    margin-top: 7px;
    animation: fpShake .3s ease;
}

    .fp-error.show {
        display: block;
    }

@keyframes fpShake {
    0%,100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* ---- Buttons ------------------------------------------------------------ */
.fp-btn {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform .12s, box-shadow .2s, background .2s;
    margin-top: 6px;
}

    .fp-btn:active {
        transform: translateY(1px);
    }

    .fp-btn:disabled {
        opacity: .75;
        cursor: not-allowed;
    }

.fp-btn-primary {
    background: var(--fp-primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(29, 78, 216, .22);
}

    .fp-btn-primary:hover:not(:disabled) {
        background: var(--fp-primary-dark);
    }

.fp-btn-ghost {
    background: transparent;
    color: var(--fp-muted);
    border: 1.5px solid var(--fp-line);
    margin-top: 10px;
}

    .fp-btn-ghost:hover {
        background: #f9fafb;
        color: var(--fp-ink);
    }

/* loading state */
.fp-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fpSpin .6s linear infinite;
}

.fp-btn.is-loading .fp-spinner {
    display: inline-block;
}

.fp-btn.is-loading .fp-btn-text {
    opacity: .85;
}

@keyframes fpSpin {
    to {
        transform: rotate(360deg);
    }
}

.fp-back {
    margin-top: auto;
    padding-top: 22px;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--fp-primary);
    font-size: 13.5px;
    font-weight: 600;
    align-self: center;
}

    .fp-back:hover {
        text-decoration: underline;
    }

.fp-link {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: var(--fp-primary);
    font-size: 12.8px;
    font-weight: 600;
}

    .fp-link:disabled {
        color: #b6bcc6;
        cursor: not-allowed;
    }

.fp-right {
    position: relative;
    background: linear-gradient(140deg, #4f46e5 0%, #7c3aed 55%, #a855f7 100%);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 44px;
    overflow: hidden;
}

/* Make Welcome Back more prominent */
.fp-right-inner h2 {
    font-size: 36px;
    margin: 0 0 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
    /* Gradient text */
    background: linear-gradient(90deg, #ffffff 0%, rgba(255,255,255,0.9) 40%, rgba(255,255,255,0.85) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 6px 22px rgba(0,0,0,0.18);
}

.fp-right-inner ul {
    margin-top: 14px;
}

.fp-right li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    margin-bottom: 14px;
    color: rgba(255,255,255,.96);
}

/* Attractive check icon */
.fp-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: grid;
    place-items: center;
    font-size: 12px;
    flex-shrink: 0;
    color: #fff;
    box-shadow: 0 6px 18px rgba(79,70,229,0.18);
}

/* Subtle floating orbs for depth */
.fp-orb-1, .fp-orb-2 {
    filter: blur(8px);
    opacity: .12;
}

/* ---- OTP boxes ---------------------------------------------------------- */
.fp-sent {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1e40af;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12.8px;
    margin-bottom: 18px;
}

/* OTP container: use full width and prevent wrapping so boxes stay on one line */
.fp-otp {
    display: flex;
    gap: 12px;
    width: 100%;
    flex-wrap: nowrap; /* keep all boxes on a single row */
    align-items: center;
    max-width: 420px; /* constrain total width so boxes stay compact */
}

.fp-otp-box {
    /* make boxes distribute evenly across available width */
    flex: 1 1 0; /* grow and shrink equally */
    min-width: 44px; /* ensure usable touch target (reduced) */
    max-width: 64px; /* smaller maximum width */
    height: 44px; /* reduced height */
    text-align: center;
    font-size: 18px; /* slightly smaller font */
    font-weight: 700;
    border: 1.5px solid var(--fp-line);
    border-radius: 10px;
    background: #f9fafb;
    color: var(--fp-ink);
    transition: all .12s;
    padding: 6px 8px; /* ensure vertical alignment */
}

.fp-otp-box:focus {
    outline: none;
    background: #fff;
    border-color: var(--fp-primary);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, .10);
}

.fp-otp-box.is-error {
    border-color: var(--fp-err);
    animation: fpShake .3s ease;
}

/* For very small screens allow horizontal scrolling rather than wrapping */
@media (max-width: 520px) {
    .fp-otp {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fp-otp-box {
        min-width: 42px;
        max-width: 56px;
        height: 40px;
        font-size: 16px;
    }
}

/* ---- Responsive tweaks -------------------------------------------------- */
@media (max-width: 980px) {
    .fp-card {
        grid-template-columns: 1fr; /* single column on smaller screens */
        max-width: 720px;
    }

    .fp-right {
        display: none;
    }

    .fp-left {
        padding: 26px 20px;
    }

    .fp-otp {
        max-width: 100%;
        gap: 10px;
    }

    .fp-otp-box {
        flex: 1 1 16%;
        min-width: 48px;
        max-width: 72px;
        height: 46px;
        font-size: 18px;
    }
}

@media (max-width: 420px) {
    .fp-left {
        padding: 18px 12px;
    }

    .fp-title {
        font-size: 22px;
    }

    .fp-otp-box {
        height: 44px;
        font-size: 16px;
    }

    .fp-btn {
        height: 44px;
        font-size: 14px;
    }
}

/* ---- end of file ---- */
