:root {
    --auth-navy: #082a5e;
    --auth-navy-deep: #061f49;
    --auth-blue: #2f6df6;
    --auth-blue-dark: #174fc0;
    --auth-ink: #0c2b61;
    --auth-muted: #7183a1;
    --auth-border: #d9e2f0;
}

* { box-sizing: border-box; }

body.password-reset-page {
    position: relative;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--auth-ink);
    background: #f4f7fc;
    font-family: 'Manrope', system-ui, sans-serif;
}

body.password-reset-page::before,
body.password-reset-page::after {
    content: '';
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
}

body.password-reset-page::before {
    width: 560px;
    height: 560px;
    right: -315px;
    top: 22%;
    border: 62px solid rgba(66, 125, 235, 0.075);
}

body.password-reset-page::after {
    width: 220px;
    height: 220px;
    left: -78px;
    bottom: 9%;
    background: rgba(83, 145, 247, 0.11);
}

.password-reset-frame {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 42px 28px;
}

.password-reset-shell {
    display: grid;
    grid-template-columns: minmax(0, 45%) minmax(0, 55%);
    width: min(1160px, 100%);
    min-height: 650px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(23, 49, 88, 0.17);
    animation: auth-card-in 0.55s ease-out both;
}

.password-reset-brand {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    padding: 54px 58px 46px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 80% 18%, rgba(58, 117, 222, 0.18), transparent 33%),
        linear-gradient(145deg, var(--auth-navy) 0%, var(--auth-navy-deep) 52%, #082c60 100%);
}

.password-reset-brand::before {
    content: '';
    position: absolute;
    z-index: -1;
    width: 142px;
    height: 112px;
    top: -6px;
    left: 8px;
    opacity: 0.28;
    background-image: radial-gradient(circle, #59a1ff 1.5px, transparent 1.7px);
    background-size: 15px 15px;
}

.auth-brand-identity { text-align: center; }

.auth-brand-mark,
.auth-mobile-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(145deg, rgba(42, 101, 205, 0.92), rgba(24, 76, 165, 0.92));
    box-shadow: 0 16px 34px rgba(0, 18, 52, 0.28);
}

.auth-brand-mark {
    width: 78px;
    height: 78px;
    border-radius: 22px;
    font-size: 34px;
}

.auth-brand-title {
    margin: 20px 0 0;
    font-size: clamp(36px, 4vw, 48px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
}

.auth-brand-subtitle {
    margin: 14px 0 0;
    color: #7fb4ff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-indent: 0.3em;
}

.auth-brand-divider {
    width: 66px;
    height: 3px;
    margin: 18px auto 0;
    border-radius: 99px;
    background: #4e84ff;
}

.auth-brand-message {
    width: min(100%, 360px);
    margin: 58px auto 0;
}

.auth-brand-message h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.27;
    letter-spacing: -0.025em;
}

.auth-brand-message h2 span {
    display: block;
    color: #4e84ff;
}

.auth-brand-message p {
    margin: 19px 0 0;
    color: #bdcce2;
    font-size: 16px;
    line-height: 1.75;
}

.auth-security-note {
    margin-top: auto;
    padding-top: 48px;
    color: #d6e3f6;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
}

.auth-security-note i { margin-right: 9px; color: #6eabff; }

.password-reset-panel {
    display: flex;
    align-items: center;
    padding: 52px 68px 36px;
    background: #fff;
}

.password-reset-content {
    width: 100%;
    max-width: 510px;
    margin: 0 auto;
}

.auth-mobile-mark {
    display: none;
    width: 58px;
    height: 58px;
    margin-bottom: 22px;
    border-radius: 16px;
    font-size: 25px;
}

.auth-heading {
    margin: 0;
    font-size: clamp(34px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.auth-subheading {
    margin: 11px 0 0;
    color: var(--auth-muted);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.65;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 22px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.auth-alert-error { border-color: #fecaca; color: #b42318; background: #fff4f2; }
.auth-alert-success { border-color: #a7f3d0; color: #067647; background: #ecfdf3; }

.auth-form { margin-top: 30px; }
.auth-field + .auth-field { margin-top: 22px; }

.auth-label {
    display: block;
    margin-bottom: 10px;
    color: #0b2859;
    font-size: 14px;
    font-weight: 800;
}

.auth-field-shell {
    display: flex;
    min-height: 62px;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(18, 47, 88, 0.025);
}

.auth-field-shell:focus-within {
    border-color: #4e78c7;
    box-shadow: 0 0 0 4px rgba(47, 109, 246, 0.1);
}

.auth-field-icon { color: #8295b4; font-size: 18px; }

.auth-input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    color: #203a64;
    background: transparent;
    font: inherit;
    font-size: 15px;
}

.auth-input::placeholder { color: #93a4bf; }

.auth-code-input {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.36em;
    text-align: center;
}

.auth-password-toggle {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 9px;
    color: #8295b4;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
}

.auth-primary,
.auth-secondary {
    display: inline-flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.auth-primary {
    width: 100%;
    margin-top: 27px;
    border: 0;
    color: #fff;
    background: linear-gradient(100deg, #143aa2 0%, var(--auth-blue-dark) 100%);
    box-shadow: 0 12px 24px rgba(21, 70, 176, 0.22);
    font-size: 16px;
}

.auth-primary:hover { filter: brightness(1.04); transform: translateY(-1px); }
.auth-primary:disabled, .auth-secondary:disabled { cursor: not-allowed; opacity: 0.55; }

.auth-secondary {
    width: 100%;
    padding: 0 16px;
    border: 1px solid var(--auth-border);
    color: #31527f;
    background: #f8fafd;
    font-size: 14px;
}

.auth-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 13px;
}

.auth-actions form { margin: 0; }

.auth-back {
    display: inline-flex;
    margin-top: 24px;
    align-items: center;
    gap: 8px;
    color: var(--auth-blue-dark);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.auth-back:hover { text-decoration: underline; }

.auth-timer {
    margin-top: 24px;
    padding: 17px 18px;
    border: 1px solid #dbe5f3;
    border-radius: 14px;
    background: #f8fafd;
}

.auth-timer-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.auth-timer-label { margin: 0; color: #4f6d9b; font-size: 10px; font-weight: 800; letter-spacing: 0.16em; }
.auth-timer-value { margin: 5px 0 0; color: var(--auth-navy); font-size: 28px; font-weight: 800; }
.auth-timer-badge { padding: 6px 10px; border-radius: 999px; color: #067647; background: #dcfae6; font-size: 11px; font-weight: 800; }
.auth-timer-badge.is-expired { color: #b42318; background: #fee4e2; }

.auth-requirements {
    margin: 16px 0 0;
    padding: 14px 16px;
    border-radius: 12px;
    color: #526b8e;
    background: #f5f8fd;
    font-size: 12px;
    line-height: 1.65;
}

.auth-footer { margin: 28px 0 0; color: #8b9ab2; font-size: 12px; }

@keyframes auth-card-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 920px) {
    .password-reset-frame { padding: 20px 16px; }
    .password-reset-shell { grid-template-columns: 1fr; min-height: 0; border-radius: 24px; }
    .password-reset-panel { order: 1; padding: 42px 36px 36px; }
    .password-reset-brand { order: 2; padding: 38px 36px; }
    .auth-brand-identity { display: none; }
    .auth-brand-message { margin-top: 0; text-align: center; }
    .auth-security-note { padding-top: 28px; text-align: center; }
    .auth-mobile-mark { display: inline-flex; }
}

@media (max-width: 520px) {
    .password-reset-frame { display: block; padding: 10px; }
    .password-reset-shell { border-radius: 20px; }
    .password-reset-panel { padding: 32px 20px 30px; }
    .password-reset-brand { padding: 32px 20px 34px; }
    .auth-heading { font-size: 33px; }
    .auth-actions { grid-template-columns: 1fr; }
    .auth-footer { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .password-reset-shell { animation: none; }
}
