:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    color: #1d1d1f;
    background: #f5f5f7;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    color: #1d1d1f;
    background: linear-gradient(180deg, #f8f8fa 0%, #f1f2f4 100%);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

.recovery-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 32px 20px;
}

.recovery-card {
    width: min(100%, 500px);
    padding: clamp(30px, 5vw, 48px);
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 30px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, .03),
        0 18px 50px rgba(0, 0, 0, .08);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.recovery-step {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 10px;
    color: #86868b;
    font-size: .68rem;
    font-weight: 650;
    letter-spacing: .085em;
    line-height: 1.2;
    text-transform: uppercase;
}

.recovery-step i {
    font-size: 10px;
}

h1 {
    margin: 0;
    color: #1d1d1f;
    font-size: clamp(2rem, 7vw, 2.45rem);
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: 1.04;
    text-align: center;
}

.recovery-intro {
    max-width: 380px;
    margin: 15px auto 27px;
    color: #6e6e73;
    font-size: .94rem;
    line-height: 1.55;
    text-align: center;
}

.recovery-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 17px;
    padding: 13px 14px;
    border: 1px solid;
    border-radius: 14px;
    font-size: .82rem;
    line-height: 1.45;
}

.recovery-alert i {
    margin-top: 2px;
}

.recovery-alert.is-error {
    color: #a11d27;
    background: #fff1f2;
    border-color: #ffd5d8;
}

.recovery-alert.is-info {
    color: #355c85;
    background: #f3f7fc;
    border-color: #d7e2ef;
}

.recovery-form {
    display: grid;
    gap: 17px;
}

.recovery-form label {
    display: grid;
    gap: 8px;
    padding-left: 2px;
    color: #3a3a3c;
    font-size: .78rem;
    font-weight: 600;
}

.recovery-form input {
    width: calc(100% + 4px);
    min-height: 56px;
    margin-left: -2px;
    padding: 0 16px;
    color: #1d1d1f;
    background: #f5f5f7;
    border: 1px solid transparent;
    border-radius: 14px;
    outline: none;
    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.recovery-form input:hover {
    background: #f0f0f2;
}

.recovery-form input:focus {
    background: #fff;
    border-color: #114194;
    box-shadow: 0 0 0 4px rgba(17, 65, 148, .16);
}

.recovery-form .recovery-code {
    padding-left: calc(16px + .35em);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: .35em;
    text-align: center;
}

.recovery-form > button {
    min-height: 55px;
    color: #fff;
    background: #114194;
    border: 1px solid #114194;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(17, 65, 148, .22);
    font-weight: 650;
    transition:
        background-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.recovery-form > button:hover {
    background: #0d3477;
    box-shadow: 0 10px 22px rgba(17, 65, 148, .28);
    transform: translateY(-1px);
}

.recovery-form > button:focus-visible {
    outline: 4px solid rgba(17, 65, 148, .20);
    outline-offset: 3px;
}

.recovery-form > button:active {
    transform: translateY(0);
}

.recovery-hint,
.recovery-policy {
    color: #86868b;
    font-size: .72rem;
    line-height: 1.45;
}

.recovery-hint {
    margin: 14px 0 0;
    text-align: center;
}

.recovery-policy {
    margin: -2px 0 0;
    text-align: left;
}

.recovery-secondary-form {
    margin-top: 14px;
    text-align: center;
}

.recovery-secondary-muted {
    margin-top: 7px;
}

.recovery-secondary-form button {
    padding: 4px;
    color: #6e6e73;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: .72rem;
    font-weight: 600;
}

.recovery-secondary-form button:hover,
.recovery-secondary-form button:focus-visible {
    color: #114194;
}

.recovery-secondary-form button:disabled {
    color: #9a9aa0;
    cursor: wait;
    opacity: .8;
}

.recovery-secondary-form button:disabled:hover {
    color: #9a9aa0;
}

.recovery-back,
.recovery-back:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: max-content;
    margin: 23px auto 0;
    color: #6e6e73;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
}

.recovery-back:hover,
.recovery-back:focus-visible {
    color: #114194;
}

.recovery-support-card {
    width: min(100%, 560px);
}

.recovery-contact-list {
    display: grid;
    gap: 12px;
}

.recovery-contact-action,
.recovery-contact-action:visited {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 14px;
    min-height: 88px;
    padding: 15px 16px;
    color: #1d1d1f;
    background: rgba(247, 247, 249, .88);
    border: 1px solid #dedee3;
    border-radius: 17px;
    text-decoration: none;
    transition:
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.recovery-contact-action:hover {
    background: #fff;
    border-color: #b8bac2;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .07);
    transform: translateY(-1px);
}

.recovery-contact-action:focus-visible {
    outline: 4px solid rgba(17, 65, 148, .18);
    outline-offset: 2px;
}

.recovery-contact-action:active {
    transform: translateY(0);
}

.recovery-contact-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #34363c;
    background: #fff;
    border: 1px solid #e0e1e5;
    border-radius: 14px;
    box-shadow: 0 5px 12px rgba(0, 0, 0, .06);
    font-size: 16px;
}

.recovery-contact-copy {
    display: grid;
    min-width: 0;
    line-height: 1.25;
}

.recovery-contact-label {
    margin-bottom: 3px;
    color: #86868b;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.recovery-contact-copy strong {
    overflow-wrap: anywhere;
    color: #1d1d1f;
    font-size: .94rem;
    font-weight: 650;
}

.recovery-contact-copy > span:last-child {
    margin-top: 4px;
    color: #6e6e73;
    font-size: .72rem;
}

.recovery-contact-arrow {
    color: #86868b;
    font-size: 12px;
    transition: transform .18s ease;
}

.recovery-contact-action:hover .recovery-contact-arrow {
    color: #1d1d1f;
    transform: translateX(2px);
}

.recovery-support-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 18px 0 0;
    color: #86868b;
    font-size: .7rem;
    line-height: 1.45;
    text-align: center;
}

@media (max-width: 560px) {
    .recovery-page {
        align-items: start;
        padding: 14px 10px;
    }

    .recovery-card {
        padding: 30px 20px 25px;
        border-radius: 18px;
    }

    h1 {
        font-size: 27px;
    }

    .recovery-contact-action,
    .recovery-contact-action:visited {
        grid-template-columns: 42px minmax(0, 1fr) 14px;
        gap: 11px;
        min-height: 82px;
        padding: 13px;
    }

    .recovery-contact-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .recovery-contact-copy strong {
        font-size: .84rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .recovery-form input,
    .recovery-form > button,
    .recovery-contact-action,
    .recovery-contact-arrow {
        transition: none;
    }
}
