:root {
    --bg: #c8dedd;
    --text: #181826;
    --muted: #5a5d65;
    --accent: #ff715e;
    --accent-deep: #ef5c49;
    --field-bg: rgba(255, 255, 255, 0.84);
    --field-border: rgba(24, 24, 38, 0.18);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.24), transparent 34%),
        var(--bg);
    color: var(--text);
}

.page-reset {
    min-height: 100dvh;
}

.reset-page {
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 1rem 1rem 2.4rem;
    isolation: isolate;
}

.reset-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(24px);
    pointer-events: none;
    z-index: 0;
}

.reset-glow-a {
    width: min(44vw, 280px);
    height: min(44vw, 280px);
    top: 8%;
    left: -8%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 72%);
}

.reset-glow-b {
    width: min(48vw, 320px);
    height: min(48vw, 320px);
    right: -10%;
    bottom: 12%;
    background: radial-gradient(circle, rgba(255, 113, 94, 0.16), transparent 72%);
}

.reset-layout {
    width: min(100%, 440px);
    margin: auto;
    min-height: calc(100dvh - 3rem);
    display: grid;
    align-items: center;
    gap: 1.4rem;
    position: relative;
    z-index: 1;
}

.reset-intro,
.reset-auth,
.reset-content {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 30px;
    box-shadow: 0 20px 36px rgba(24, 24, 38, 0.08);
    backdrop-filter: blur(8px);
}

.reset-intro {
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    padding: 1.4rem 1.2rem;
}

.reset-auth,
.reset-content {
    padding: 1.3rem 1rem 1.2rem;
    text-align: center;
}

.reset-content {
    max-width: 440px;
    width: 100%;
    margin: auto;
    justify-self: center;
    align-self: center;
    display: grid;
    gap: 0.7rem;
    position: relative;
    z-index: 1;
}

.reset-logo {
    display: block;
    margin: 0 auto 0.5rem;
    width: 64px;
    height: auto;
}

.reset-kicker {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(24, 24, 38, 0.62);
}

.reset-brand {
    font-size: clamp(1.95rem, 7.2vw, 2.8rem);
    line-height: 1.03;
    font-weight: 800;
    max-width: 12ch;
}

.reset-welcome {
    max-width: 28ch;
    font-size: clamp(0.95rem, 3.6vw, 1.08rem);
    line-height: 1.35;
    color: rgba(24, 24, 38, 0.78);
}

.reset-title {
    font-size: clamp(1.55rem, 6vw, 2rem);
    font-weight: 800;
    line-height: 1.05;
}

.reset-subtitle {
    margin-top: 0.35rem;
    font-size: clamp(0.9rem, 3.4vw, 1rem);
    color: var(--muted);
    line-height: 1.35;
    max-width: 32ch;
    margin-left: auto;
    margin-right: auto;
}

.reset-form {
    margin-top: 0.85rem;
    text-align: left;
    display: grid;
    gap: 0.5rem;
}

.reset-form label {
    display: block;
    font-size: clamp(0.92rem, 3.5vw, 1rem);
    font-weight: 700;
}

.reset-field-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--field-border);
    background: var(--field-bg);
    padding: 0 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.reset-field-wrap:focus-within {
    border-color: rgba(255, 113, 94, 0.55);
    box-shadow: 0 0 0 4px rgba(255, 113, 94, 0.12);
    transform: translateY(-1px);
}

.reset-field-wrap.is-invalid {
    border-color: rgba(212, 38, 38, 0.55);
    box-shadow: 0 0 0 4px rgba(212, 58, 58, 0.08);
}

.reset-field-icon {
    font-size: 1rem;
    font-weight: 800;
    color: rgba(24, 24, 38, 0.45);
}

.reset-form input {
    width: 100%;
    border: 0;
    background: transparent;
    color: #1f222b;
    padding: 0.88rem 0;
    font-size: clamp(0.9rem, 3.2vw, 1rem);
    outline: none;
}

.password-toggle {
    border: 0;
    background: transparent;
    color: #49515c;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0.2rem 0;
    flex-shrink: 0;
}

.reset-form input::placeholder {
    color: #8a8d95;
}

.reset-helper,
.reset-error {
    font-size: clamp(0.76rem, 2.6vw, 0.88rem);
    line-height: 1.3;
}

.reset-helper {
    color: #5f6269;
}

.reset-error {
    display: none;
    color: #d53a3a;
    font-weight: 700;
}

.reset-error.show {
    display: block;
}

#reset-confirm-success {
    color: #2d7b52;
    font-weight: 700;
}

.reset-submit {
    margin-top: 0.35rem;
    width: 100%;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #171725;
    font-weight: 800;
    font-size: clamp(1rem, 3.9vw, 1.08rem);
    padding: 0.92rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.46rem;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 14px 22px rgba(255, 113, 94, 0.18);
}

.reset-submit:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    box-shadow: none;
}

.reset-submit.is-active {
    opacity: 1;
}

.reset-submit.is-submitting {
    opacity: 0.85;
}

.reset-spinner {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    display: none;
    flex: 0 0 auto;
}

.reset-submit.is-submitting .reset-spinner {
    display: inline-block;
    animation: reset-spin 0.9s linear infinite;
}

.reset-back:focus-visible,
.reset-submit:focus-visible,
.reset-alt a:focus-visible,
.reset-terms a:focus-visible {
    outline: 2.5px solid #ff715e;
    outline-offset: 3px;
}

@keyframes reset-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.reset-alt {
    margin-top: 0.95rem;
    color: #363a42;
    font-size: clamp(0.78rem, 2.7vw, 0.95rem);
    line-height: 1.45;
}

.reset-alt a,
.reset-terms a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.reset-terms {
    margin-top: 1.05rem;
    color: #3c3f47;
    font-size: clamp(0.76rem, 2.5vw, 0.88rem);
    line-height: 1.35;
    position: relative;
    z-index: 1;
}

.reset-credit {
    margin-top: auto;
    margin-left: auto;
    margin-right: auto;
    padding-top: 1.1rem;
    text-align: center;
    color: rgba(255, 113, 94, 0.95);
    font-size: clamp(0.75rem, 2.7vw, 0.9rem);
    padding-bottom: 0.5rem;
}

@media (min-width: 980px) {
    .reset-auth {
        padding: 1.6rem 1.5rem 1.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reset-submit.is-submitting .reset-spinner {
        animation: none;
    }
}

@media (max-width: 420px) {
    .reset-page {
        padding: 0.85rem 0.85rem 1.5rem;
    }

    .reset-layout {
        gap: 1rem;
        min-height: calc(100dvh - 2.2rem);
    }

    .reset-intro,
    .reset-auth,
    .reset-content {
        border-radius: 26px;
        padding: 1.05rem 0.9rem 1rem;
        gap: 0.6rem;
    }

    .reset-logo {
        width: min(54vw, 176px);
    }

    .reset-kicker {
        font-size: 0.72rem;
        letter-spacing: 0.07em;
    }

    .reset-brand,
    .reset-title {
        font-size: clamp(1.95rem, 9.8vw, 2.35rem);
        line-height: 1.04;
    }

    .reset-subtitle {
        font-size: 1rem;
        line-height: 1.45;
        max-width: 24ch;
    }

    .reset-form {
        margin-top: 0.45rem;
        gap: 0.42rem;
    }

    .reset-form label {
        font-size: 0.98rem;
    }

    .reset-field-wrap {
        min-height: 54px;
        padding-inline: 0.85rem;
        gap: 0.55rem;
    }
}

/* ── Touch optimizations ── */
.password-toggle,
.reset-submit,
.reset-back { touch-action: manipulation; }
