* {
    box-sizing: border-box;
}

:root {
    --recovery-primary: #2b6cb0;
    --recovery-accent: #a84854;
    --recovery-ink: #202538;
    --recovery-muted: #71788c;
    --recovery-border: #e1e4eb;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

.password-recovery-page {
    min-height: 100vh;
    color: var(--recovery-ink);
    background: #f5f7fa;
    font-family: Tahoma, Arial, sans-serif;
}

.recovery-shell {
    display: grid;
    grid-template-columns: minmax(360px, 42%) minmax(0, 1fr);
    min-height: 100vh;
}

.recovery-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 46px clamp(36px, 5vw, 76px);
    color: #fff;
    background: linear-gradient(145deg, #245f9d 0%, #4c5f91 48%, #994959 100%);
}

.recovery-aside::before,
.recovery-aside::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
}

.recovery-aside::before {
    width: 430px;
    height: 430px;
    top: -220px;
    right: -180px;
}

.recovery-aside::after {
    width: 300px;
    height: 300px;
    bottom: -170px;
    left: -130px;
}

.recovery-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: fit-content;
}

.recovery-brand img {
    width: 82px;
    height: 82px;
    object-fit: contain;
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, .16));
}

.recovery-aside-content {
    position: relative;
    z-index: 1;
    max-width: 550px;
}

.recovery-kicker {
    display: block;
    margin-bottom: 14px;
    color: #d8e8fb;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.recovery-aside h1 {
    max-width: 520px;
    margin: 0 0 20px;
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1.08;
    letter-spacing: -1.5px;
}

.recovery-aside-content p {
    max-width: 510px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 16px;
    line-height: 1.7;
}

.recovery-security-note {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 470px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .74);
    font-size: 12px;
    line-height: 1.5;
}

.recovery-security-note i {
    font-size: 22px;
}

.recovery-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px clamp(24px, 7vw, 100px);
    background: #fff;
}

.recovery-form-wrap {
    width: 100%;
    max-width: 510px;
}

.back-to-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 54px;
    color: #687086;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.back-to-login:hover,
.recovery-help a {
    color: var(--recovery-primary);
}

.recovery-icon,
.confirmation-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 22px;
    border-radius: 17px;
    color: #39455f;
    background: #eef1f6;
    font-size: 25px;
}

.recovery-form-wrap h2 {
    margin: 0 0 10px;
    font-size: 30px;
    letter-spacing: -.5px;
}

.recovery-intro {
    margin: 0 0 35px;
    color: var(--recovery-muted);
    font-size: 14px;
    line-height: 1.65;
}

.recovery-field {
    margin-bottom: 22px;
}

.recovery-field label {
    display: block;
    margin-bottom: 9px;
    color: #343a4f;
    font-size: 13px;
    font-weight: 700;
}

.recovery-input {
    position: relative;
}

.recovery-input i {
    position: absolute;
    top: 50%;
    left: 16px;
    color: #9aa0af;
    font-size: 16px;
    transform: translateY(-50%);
}

.recovery-input input {
    width: 100%;
    height: 50px;
    padding: 11px 16px 11px 46px;
    border: 1px solid var(--recovery-border);
    border-radius: 11px;
    outline: none;
    color: var(--recovery-ink);
    background: #fff;
    font-size: 14px;
    transition: border-color .18s, box-shadow .18s;
}

.recovery-input input:focus {
    border-color: #6687b1;
    box-shadow: 0 0 0 4px rgba(43, 108, 176, .09);
}

.field-validation {
    display: block;
    margin-top: 6px;
    color: #b4233d;
    font-size: 12px;
}

.field-validation:empty,
.recovery-validation.validation-summary-valid {
    display: none;
}

.recovery-validation {
    margin-bottom: 18px;
    padding: 11px 14px;
    border-radius: 9px;
    color: #9d2437;
    background: #fff1f3;
    font-size: 12px;
}

.recovery-validation ul {
    margin: 0;
    padding-left: 18px;
}

.recovery-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 50px;
    padding: 12px 20px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: #273c5c;
    box-shadow: 0 9px 20px rgba(39, 60, 92, .18);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, background .18s;
}

.recovery-submit:hover {
    color: #fff;
    background: #1e304d;
    box-shadow: 0 12px 25px rgba(39, 60, 92, .25);
    transform: translateY(-1px);
}

.recovery-submit.is-loading {
    opacity: .7;
    cursor: wait;
}

.recovery-submit.is-loading i {
    animation: recovery-spin .8s linear infinite;
}

@keyframes recovery-spin {
    to { transform: rotate(360deg); }
}

.recovery-help {
    margin: 28px 0 0;
    color: #8a90a0;
    font-size: 12px;
    text-align: center;
}

.recovery-help a {
    font-weight: 700;
    text-decoration: none;
}

.recovery-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: #a0a5b2;
    font-size: 9px;
    font-weight: 700;
}

.recovery-divider::before,
.recovery-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--recovery-border);
}

.authenticator-reset-option {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px;
    border: 1px solid var(--recovery-border);
    border-radius: 11px;
    color: #41495d;
    background: #fff;
    text-decoration: none;
    transition: border-color .18s, background .18s, transform .18s;
}

.authenticator-reset-option:hover {
    border-color: #c9ced8;
    color: #30384d;
    background: #f8f9fb;
    transform: translateY(-1px);
}

.authenticator-reset-option > span:nth-child(2) {
    flex: 1;
}

.authenticator-reset-option strong,
.authenticator-reset-option small {
    display: block;
}

.authenticator-reset-option strong {
    margin-bottom: 3px;
    font-size: 12px;
}

.authenticator-reset-option small {
    color: #858c9c;
    font-size: 10px;
}

.authenticator-reset-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    border-radius: 9px;
    color: #43546e;
    background: #eef1f5;
}

.compact-brand {
    margin-bottom: 20px;
}

.compact-brand img {
    width: 82px;
    height: 82px;
}

.confirmation-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(circle at 10% 10%, rgba(43, 108, 176, .12), transparent 28%),
        radial-gradient(circle at 90% 90%, rgba(168, 72, 84, .1), transparent 30%),
        #f5f7fa;
}

.confirmation-card {
    width: min(560px, 100%);
    padding: 46px;
    border: 1px solid #e5e7ec;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 65px rgba(29, 38, 60, .12);
    text-align: center;
}

.confirmation-brand img {
    width: 78px;
    height: 78px;
    object-fit: contain;
}

.confirmation-icon {
    margin: 30px auto 20px;
}

.confirmation-card .recovery-kicker {
    color: #6b7690;
}

.confirmation-card h1 {
    margin: 0 0 13px;
    font-size: 31px;
}

.confirmation-card > p {
    margin: 0 auto;
    color: var(--recovery-muted);
    font-size: 14px;
    line-height: 1.7;
}

.confirmation-tip {
    display: flex;
    gap: 10px;
    margin: 25px 0;
    padding: 14px;
    border-radius: 10px;
    color: #697085;
    background: #f5f6f8;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
}

.confirmation-button {
    margin-top: 8px;
}

.two-factor-aside {
    background: linear-gradient(145deg, #203d64 0%, #405a82 52%, #775264 100%);
}

.form-kicker {
    display: block;
    margin-bottom: 9px;
    color: #69758d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.two-factor-code-input input {
    height: 58px;
    padding-left: 50px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 7px;
}

.two-factor-code-input i {
    font-size: 20px;
}

.trusted-device {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 4px 0 25px;
    padding: 13px;
    border: 1px solid var(--recovery-border);
    border-radius: 10px;
    cursor: pointer;
}

.trusted-device > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.trusted-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-top: 1px;
    border: 1px solid #c8ccd5;
    border-radius: 6px;
    color: transparent;
    background: #fff;
    transition: background .15s, border-color .15s, color .15s;
}

.trusted-device > input:checked + .trusted-check {
    border-color: #314a6d;
    color: #fff;
    background: #314a6d;
}

.trusted-device strong,
.trusted-device small {
    display: block;
}

.trusted-device strong {
    margin-bottom: 3px;
    color: #3a4054;
    font-size: 12px;
}

.trusted-device small {
    color: #858b9c;
    font-size: 11px;
    line-height: 1.45;
}

.two-factor-help {
    display: flex;
    gap: 9px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--recovery-border);
    color: #858b9c;
    font-size: 11px;
    line-height: 1.55;
}

.two-factor-help i {
    color: #65718a;
    font-size: 14px;
}

.login-aside {
    background: linear-gradient(145deg, #224f82 0%, #455f87 50%, #874d5e 100%);
}

.login-aside-content {
    max-width: 590px;
}

.login-aside-content h1 {
    margin-bottom: 14px;
}

.login-security-card {
    display: flex;
    gap: 15px;
    margin-top: 38px;
    padding: 19px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 15px;
    background: rgba(255, 255, 255, .09);
    backdrop-filter: blur(8px);
}

.login-security-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    font-size: 19px;
}

.login-security-card strong,
.login-security-card span {
    display: block;
}

.login-security-card strong {
    margin: 2px 0 6px;
    font-size: 13px;
}

.login-security-card span {
    color: rgba(255, 255, 255, .72);
    font-size: 11px;
    line-height: 1.6;
}

.security-route {
    margin-top: 11px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .25px;
}

.login-form-wrap h2 {
    margin: 0 0 10px;
    font-size: 30px;
    letter-spacing: -.5px;
}

.mobile-login-brand {
    display: none;
}

.login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 9px;
}

.login-label-row label {
    margin: 0;
}

.login-label-row a {
    color: #4f6686;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    color: #858c9c;
    background: transparent;
    font-size: 16px;
    transform: translateY(-50%);
    cursor: pointer;
}

.password-toggle:hover {
    color: #35435b;
    background: #f2f4f7;
}

.recovery-input:has(.password-toggle) input {
    padding-right: 50px;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 24px;
    color: #626a7d;
    font-size: 12px;
    cursor: pointer;
}

.login-remember > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.login-remember > input:checked + .trusted-check {
    border-color: #314a6d;
    color: #fff;
    background: #314a6d;
}

.login-submit {
    background: #273c5c;
}

.mobile-security-notice {
    display: none;
}

.login-footer {
    margin: 32px 0 0;
    color: #9a9fad;
    font-size: 10px;
    text-align: center;
}

.login-footer a {
    color: #68758b;
    font-weight: 700;
    text-decoration: none;
}

.reset-aside {
    background: linear-gradient(145deg, #284f7a 0%, #4f6285 50%, #74515e 100%);
}

.reset-guidance {
    display: grid;
    gap: 12px;
    margin-top: 34px;
}

.reset-guidance > div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, .8);
    font-size: 12px;
}

.reset-guidance i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .14);
}

.reset-form-wrap h2 {
    margin: 0 0 10px;
    font-size: 30px;
}

.password-strength {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: -10px 0 21px;
}

.password-strength > span {
    height: 4px;
    border-radius: 4px;
    background: #e6e8ed;
    transition: background .2s;
}

.password-strength small {
    grid-column: 1 / -1;
    color: #8a90a0;
    font-size: 10px;
}

.password-strength[data-score="1"] > span:nth-child(1) {
    background: #b94757;
}

.password-strength[data-score="2"] > span:nth-child(-n+2) {
    background: #b58535;
}

.password-strength[data-score="3"] > span:nth-child(-n+3) {
    background: #4b7fa5;
}

.password-strength[data-score="4"] > span {
    background: #2c8b60;
}

.confirmation-success-icon {
    color: #267952;
    background: #edf8f2;
    font-size: 29px;
}

@media (max-width: 820px) {
    .recovery-shell {
        display: block;
    }

    .recovery-aside {
        min-height: auto;
        padding: 28px 24px 38px;
    }

    .recovery-aside-content {
        margin-top: 45px;
    }

    .recovery-aside h1 {
        font-size: 33px;
    }

    .recovery-security-note {
        display: none;
    }

    .recovery-form-panel {
        padding: 42px 22px 55px;
    }

    .back-to-login {
        margin-bottom: 36px;
    }

    .login-aside {
        display: none;
    }

    .login-shell {
        display: flex;
        min-height: 100vh;
    }

    .reset-aside {
        display: none;
    }

    .reset-shell {
        display: flex;
        min-height: 100vh;
    }

    .reset-form-panel {
        width: 100%;
    }

    .login-form-panel {
        width: 100%;
    }

    .mobile-login-brand {
        display: block;
        margin-bottom: 38px;
        text-align: center;
    }

    .mobile-login-brand img {
        width: 86px;
        height: 86px;
        object-fit: contain;
    }

    .mobile-security-notice {
        display: flex;
        gap: 10px;
        margin-top: 25px;
        padding: 13px;
        border: 1px solid #e1e5eb;
        border-radius: 10px;
        color: #667087;
        background: #f7f8fa;
    }

    .mobile-security-notice > i {
        color: #405675;
        font-size: 18px;
    }

    .mobile-security-notice strong,
    .mobile-security-notice span {
        display: block;
    }

    .mobile-security-notice strong {
        margin-bottom: 3px;
        color: #3e465a;
        font-size: 11px;
    }

    .mobile-security-notice span {
        font-size: 10px;
        line-height: 1.5;
    }
}

@media (max-width: 520px) {
    .confirmation-card {
        padding: 32px 22px;
        border-radius: 18px;
    }
}
