﻿/* =========================================================
   PASSWORD RECOVERY
   Visual language: same portal/login system, restrained enterprise UI.
   ========================================================= */

.recovery-shell,
.reset-shell {
    min-height: 680px;
}

.recovery-panel,
.reset-panel {
    justify-content: flex-start;
}

.recovery-heading {
    margin-top: 38px;
}

.recovery-form {
    margin-top: 30px;
}

.recovery-info {
    margin-top: 2px;
    padding: 11px 12px;
    border-right: 3px solid #0F7A3C;
    border-radius: 8px;
    background: #F6F9F7;
    color: #657269;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 10.8px;
    line-height: 1.85;
}

.recovery-info-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    border-radius: 6px;
    background: #E4F1E9;
    color: #0F7A3C;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;
}

.recovery-back-link {
    display: block;
    width: fit-content;
    margin: 14px auto 0;
    color: #7C8981;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    transition: color .18s ease;
}

    .recovery-back-link:hover {
        color: #0F7A3C;
    }

.recovery-mobile {
    display: inline-block;
    color: #0F7A3C;
    direction: ltr;
}

/*
   Forgot password and Reset password deliberately use the same animated
   Pouya visual as Login/OTP. No additional marketing copy is rendered.
*/
.recovery-visual,
.reset-visual {
    min-height: 648px;
}


/* =========================================================
   LOGIN <-> PASSWORD RECOVERY IN-CARD SWITCH
   Purely presentational: existing recovery endpoints stay unchanged.
   ========================================================= */
.auth-mode {
    width: 100%;
}

    .auth-mode[hidden] {
        display: none !important;
    }

.auth-mode-recovery {
    animation: auth-mode-in .22s ease both;
}

.recovery-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

    .recovery-fields .field {
        margin: 0;
    }

.customer-code-box-recovery {
    margin-top: 0;
}

.inline-recovery-heading {
    margin-top: 40px;
}

.inline-recovery-form {
    margin-top: 30px;
}

.recovery-back-button {
    align-self: center;
    margin-top: -2px;
    padding: 7px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #7C8981;
    font-size: 11.5px;
    font-weight: 650;
    cursor: pointer;
    transition: color .18s ease, background .18s ease;
}

    .recovery-back-button:hover {
        color: #0F7A3C;
        background: #F3F7F4;
    }

@keyframes auth-mode-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   RESET PASSWORD
   ========================================================= */

.reset-shell {
    max-width: 1140px;
}

.reset-panel {
    padding-top: 30px;
    padding-bottom: 26px;
}

.reset-heading {
    margin-top: 34px;
    margin-bottom: 0;
}

.reset-password-form {
    width: 100%;
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.reset-field-block {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.reset-field-head {
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

    .reset-field-head label {
        color: #313D35;
        font-size: 11.5px;
        font-weight: 700;
    }

.password-generate-link {
    min-height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0F7A3C;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: color .18s ease, transform .18s ease;
}

    .password-generate-link:hover {
        color: #095D2C;
        transform: translateX(-2px);
    }

    .password-generate-link svg {
        width: 14px;
        height: 14px;
    }

.reset-password-field {
    position: relative;
}

    .reset-password-field input {
        width: 100%;
        height: 50px;
        padding: 0 18px 0 112px;
        border: 1px solid #DDE5E0;
        border-radius: 11px;
        outline: 0;
        background: #FFFFFF;
        color: #17201A;
        direction: ltr;
        text-align: left;
        font-family: "Vazirmatn", Tahoma, sans-serif;
        font-size: 13px;
        box-shadow: 0 1px 2px rgba(18, 35, 24, .025);
        transition: border-color .18s ease, box-shadow .18s ease;
    }

        .reset-password-field input::placeholder {
            color: #A4AEA7;
        }

        .reset-password-field input:focus {
            border-color: #8BC3A2;
            box-shadow: 0 0 0 3px rgba(15, 122, 60, .07);
        }

    .reset-password-field.has-error input {
        border-color: #C84A4A;
        box-shadow: 0 0 0 3px rgba(200, 74, 74, .06);
    }

.password-field-actions {
    position: absolute;
    top: 50%;
    left: 11px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.password-show-action,
.password-icon-action {
    border: 0;
    background: transparent;
    color: #6F7C74;
    cursor: pointer;
    transition: color .18s ease, background .18s ease;
}

.password-show-action {
    height: 30px;
    padding: 0 7px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 650;
}

.password-icon-action {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .password-show-action:hover,
    .password-icon-action:hover,
    .password-icon-action.is-copied {
        background: #F0F5F2;
        color: #0F7A3C;
    }

    .password-icon-action svg {
        width: 14px;
        height: 14px;
    }

/* ---------------------------------------------------------
   Live feedback: thin utility row, not a large card.
   --------------------------------------------------------- */

.password-feedback {
    padding: 6px 1px 0;
}

.password-strength-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.password-strength-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

    .password-strength-track span {
        height: 3px;
        border-radius: 999px;
        background: #E2E7E4;
        transition: background .20s ease, transform .20s ease;
    }

.password-strength-label {
    min-width: 82px;
    color: #8A958E;
    font-size: 9.8px;
    font-weight: 650;
    text-align: left;
}

.password-feedback[data-strength="1"]
.password-strength-track span:nth-child(1) {
    background: #C95353;
}

.password-feedback[data-strength="2"]
.password-strength-track span:nth-child(-n+2) {
    background: #D78943;
}

.password-feedback[data-strength="3"]
.password-strength-track span:nth-child(-n+3) {
    background: #C49A39;
}

.password-feedback[data-strength="4"]
.password-strength-track span {
    background: #69A77D;
}

.password-feedback[data-strength="5"]
.password-strength-track span {
    background: #0F7A3C;
}

.password-feedback[data-strength="1"]
.password-strength-label {
    color: #B54242;
}

.password-feedback[data-strength="2"]
.password-strength-label {
    color: #B76B28;
}

.password-feedback[data-strength="3"]
.password-strength-label {
    color: #9C781E;
}

.password-feedback[data-strength="4"]
.password-strength-label,
.password-feedback[data-strength="5"]
.password-strength-label {
    color: #0F7A3C;
}

.password-rule-list {
    margin-top: 9px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

    .password-rule-list > span {
        color: #89958D;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-size: 9.6px;
        line-height: 1.6;
        transition: color .18s ease;
    }

        .password-rule-list > span i {
            width: 7px;
            height: 7px;
            flex: 0 0 7px;
            border: 1px solid #C8D0CB;
            border-radius: 50%;
            background: #FFFFFF;
            transition: border-color .18s ease, background .18s ease;
        }

        .password-rule-list > span.is-valid {
            color: #356E4B;
        }

            .password-rule-list > span.is-valid i {
                border-color: #0F7A3C;
                background: #0F7A3C;
            }

.password-rule-optional {
    color: #A0AAA4 !important;
}

    .password-rule-optional.is-valid {
        color: #5C7D68 !important;
    }

.password-match-state {
    min-height: 16px;
    color: #909A94;
    font-size: 9.8px;
    line-height: 1.6;
}

    .password-match-state.is-valid {
        color: #0F7A3C;
    }

    .password-match-state.is-invalid {
        color: #B84040;
        font-weight: 650;
    }

.reset-submit {
    margin-top: 1px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 850px) {
    .recovery-visual,
    .reset-visual {
        display: none;
    }

    .recovery-panel,
    .reset-panel {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .reset-field-head {
        align-items: flex-start;
    }

    .password-rule-list {
        gap: 5px 10px;
    }

    .password-strength-row {
        grid-template-columns: 1fr;
    }

    .password-strength-label {
        text-align: right;
    }
}
