:root {
    --auth-navy: #172033;
    --auth-gold: #d4af37;
    --auth-gold-dark: #b8860b;
    --auth-page: #f5f5f2;
    --auth-card: #ffffff;
    --auth-text: #172033;
    --auth-muted: #6b7280;
    --auth-border: #dfe3e8;
    --auth-danger: #b42318;
    --auth-success: #137a4c;
}

* {
    box-sizing: border-box;
}

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

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--auth-text);
    background: var(--auth-page);
}

button,
input,
a {
    font: inherit;
}

.recovery-page {
    min-height: 100dvh;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 32px 18px;
}

.recovery-background {
    position: fixed;
    inset: 0;
    z-index: -1;

    background:
        radial-gradient(
            circle at top right,
            rgba(212, 175, 55, 0.12),
            transparent 32%
        ),
        linear-gradient(
            145deg,
            #ffffff,
            #f4f3ee
        );
}

.recovery-grid,
.recovery-glow {
    display: none;
}

.recovery-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 22px;

    color: var(--auth-navy);
    text-decoration: none;
}

.recovery-brand-icon {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    color: #17150d;
    background:
        linear-gradient(
            135deg,
            #ead16e,
            var(--auth-gold)
        );
}

.recovery-brand strong {
    display: block;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1rem;
}

.recovery-brand small {
    display: none;
}

.recovery-wrapper {
    width: 100%;
    max-width: 430px;
}

.recovery-card {
    width: 100%;
    padding: 32px;

    border: 1px solid rgba(23, 32, 51, 0.08);
    border-radius: 20px;

    background: var(--auth-card);

    box-shadow:
        0 18px 45px rgba(23, 32, 51, 0.09);

    animation: cardIn 0.35s ease both;
}

.recovery-icon,
.recovery-success-icon {
    width: 48px;
    height: 48px;

    margin: 0 auto 18px;

    display: grid;
    place-items: center;

    border-radius: 15px;

    font-size: 1.1rem;
}

.recovery-icon {
    color: var(--auth-navy);

    background: rgba(212, 175, 55, 0.14);
    border: 1px solid rgba(212, 175, 55, 0.22);
}

.recovery-success-icon {
    color: var(--auth-success);

    background: rgba(19, 122, 76, 0.10);
    border: 1px solid rgba(19, 122, 76, 0.18);
}

.recovery-heading {
    margin: 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.8rem;
    line-height: 1.15;
    text-align: center;

    color: var(--auth-navy);
}

.recovery-description {
    margin: 10px auto 24px;

    color: var(--auth-muted);

    font-size: 0.94rem;
    line-height: 1.55;
    text-align: center;
}

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

.recovery-field {
    display: grid;
    gap: 8px;
}

.recovery-field label {
    color: var(--auth-navy);

    font-size: 0.88rem;
    font-weight: 700;
}

.recovery-input-wrap {
    position: relative;
}

.recovery-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 15px;

    transform: translateY(-50%);

    color: #98a1af;
    pointer-events: none;
}

.recovery-field input {
    width: 100%;
    min-height: 52px;

    padding: 13px 15px 13px 44px;

    border: 1px solid var(--auth-border);
    border-radius: 12px;
    outline: none;

    color: var(--auth-text);
    font-size: 16px;

    background: #ffffff;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.recovery-field input:focus {
    border-color: var(--auth-gold);

    box-shadow:
        0 0 0 4px rgba(212, 175, 55, 0.12);
}

.recovery-button {
    width: 100%;
    min-height: 52px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 13px 18px;

    border: 0;
    border-radius: 12px;

    cursor: pointer;

    color: #18160f;
    font-size: 0.92rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;

    background:
        linear-gradient(
            135deg,
            #e7cb62,
            var(--auth-gold)
        );

    box-shadow:
        0 10px 22px rgba(184, 134, 11, 0.18);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.recovery-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 13px 27px rgba(184, 134, 11, 0.24);
}

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

.recovery-button.is-loading {
    pointer-events: none;
    opacity: 0.75;
}

.recovery-button.is-loading i {
    animation: spin 0.8s linear infinite;
}

.recovery-back {
    margin-top: 18px;
    text-align: center;
}

.recovery-back a {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--auth-navy);

    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.recovery-back a:hover {
    color: var(--auth-gold-dark);
}

.recovery-errors {
    padding: 11px 13px;

    border: 1px solid rgba(180, 35, 24, 0.18);
    border-radius: 10px;

    color: var(--auth-danger);
    background: rgba(180, 35, 24, 0.05);

    font-size: 0.84rem;
    line-height: 1.45;
}

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

.recovery-help {
    color: var(--auth-muted);

    font-size: 0.78rem;
    line-height: 1.45;
}

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

.recovery-footer {
    margin: 16px 0 0;

    color: var(--auth-muted);

    font-size: 0.72rem;
    text-align: center;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 520px) {
    .recovery-page {
        justify-content: flex-start;

        padding:
            max(22px, env(safe-area-inset-top))
            14px
            max(22px, env(safe-area-inset-bottom));
    }

    .recovery-brand {
        margin-bottom: 18px;
    }

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

    .recovery-heading {
        font-size: 1.6rem;
    }

    .recovery-description {
        margin-bottom: 21px;
        font-size: 0.9rem;
    }

    .recovery-icon,
    .recovery-success-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 15px;
    }

    .recovery-field input,
    .recovery-button {
        min-height: 50px;
    }
}

@media (max-width: 360px) {
    .recovery-card {
        padding: 23px 16px;
    }

    .recovery-heading {
        font-size: 1.48rem;
    }

    .recovery-description {
        font-size: 0.86rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
