html,
body {
    min-height: 100%;
    margin: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    color: #1f2937;
    background:
        radial-gradient(1100px 520px at -10% -12%, rgba(161, 28, 39, 0.16), transparent 62%),
        radial-gradient(900px 420px at 110% 2%, rgba(179, 19, 16, 0.12), transparent 60%),
        linear-gradient(180deg, #f7f8fb 0%, #eef2f6 100%);
    overflow-x: hidden;
}

body.forgot-password-page {
    display: flex;
    flex-direction: column;
    position: relative;
}

body.forgot-password-page::before,
body.forgot-password-page::after {
    content: '';
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: 0;
}

body.forgot-password-page::before {
    top: 9vh;
    left: -3vw;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(161, 28, 39, 0.10) 0%, rgba(161, 28, 39, 0.04) 42%, transparent 72%);
}

body.forgot-password-page::after {
    right: -2vw;
    bottom: 12vh;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(179, 19, 16, 0.08) 0%, rgba(179, 19, 16, 0.03) 40%, transparent 72%);
}

.forgot-password-page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.logo-bar {
    width: min(540px, calc(100% - 32px));
    margin: 20px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 2px 0;
}

.logo-bar img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 6px 14px rgba(161, 28, 39, 0.14));
}

.logo-bar .school-name {
    font-size: 1.45rem;
    font-weight: 700;
    color: #8d1a24;
    letter-spacing: 0.01em;
}

.forgot-password-main {
    flex: 1;
}

.center-panel {
    min-height: calc(100vh - 154px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 16px 72px;
    box-sizing: border-box;
}

.verify-box {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(228, 231, 236, 0.95);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.12), 0 4px 18px rgba(161, 28, 39, 0.08);
    padding: 34px 30px 28px;
    box-sizing: border-box;
    text-align: center;
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.verify-box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #a11c27 0%, #c91e2f 52%, #8d1822 100%);
}

.forgot-password-shell {
    width: 100%;
}

.forgot-password-heading {
    margin-bottom: 6px;
}

.verify-box h2 {
    margin: 0 0 10px;
    font-size: clamp(1.45rem, 2vw, 1.8rem);
    color: #7f1720;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.verify-message {
    margin: 0 auto 18px;
    max-width: 42ch;
    font-size: 0.98rem;
    color: #475467;
    line-height: 1.65;
}

.verify-message .email-mask {
    background: #fef2f2;
    color: #a11c27;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    display: inline-block;
    margin-top: 6px;
}

.status-box {
    width: 100%;
    margin: 0 0 14px;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.93rem;
    line-height: 1.5;
    display: none;
    box-sizing: border-box;
    border: 1px solid transparent;
}

.status-box.visible {
    display: block;
}

.status-box.success {
    background: #ecfdf3;
    color: #1f6b43;
    border-color: #abefc6;
}

.status-box.error {
    background: #fff1f1;
    color: #9f2222;
    border-color: #fecaca;
}

.status-box.info {
    background: #f2f6fb;
    color: #243447;
    border-color: #d0d5dd;
}

.inputs-section,
.forgot-password-fields {
    width: 100%;
    margin-bottom: 18px;
    text-align: left;
}

.input-group {
    width: 100%;
    margin-bottom: 18px;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-label,
.input-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.92rem;
    color: #344054;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1.5px solid #d5d9e1;
    border-radius: 12px;
    font-size: 0.98rem;
    font-family: 'Montserrat', Arial, sans-serif;
    outline: none;
    background: #ffffff;
    color: #1f2937;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.input-group input::placeholder {
    color: #98a2b3;
    font-weight: 400;
}

.input-group input:hover {
    border-color: #c6ccd6;
}

.input-group input:focus {
    border-color: #a11c27;
    box-shadow: 0 0 0 4px rgba(161, 28, 39, 0.12);
}

.inline-actions,
.forgot-password-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

.inline-actions button,
.inline-actions a,
.forgot-password-actions button,
.forgot-password-actions a {
    width: 100%;
    min-height: 50px;
    border-radius: 12px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 0.96rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.submit-btn {
    width: 100%;
    min-height: 52px;
    margin: 0;
    border: 1px solid #8d1822;
    border-radius: 12px;
    background: linear-gradient(180deg, #a11c27 0%, #8d1822 100%);
    color: #ffffff;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 18px rgba(161, 28, 39, 0.24);
}

.submit-btn:hover,
.submit-btn:focus {
    background: linear-gradient(180deg, #b71f2c 0%, #9b1924 100%);
    box-shadow: 0 14px 24px rgba(161, 28, 39, 0.30);
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(161, 28, 39, 0.22);
}

.submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.secondary-btn {
    border: 1px solid #d0d5dd;
    background: #f9fafb;
    color: #344054;
    cursor: pointer;
}

.secondary-btn:hover:not(:disabled),
.secondary-btn:focus:not(:disabled) {
    background: #f2f4f7;
    border-color: #cbd5e1;
    box-shadow: 0 8px 16px rgba(16, 24, 40, 0.06);
    transform: translateY(-1px);
}

.secondary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.text-link-btn {
    border: 1px solid #f0c4c8;
    background: #fff5f6;
    color: #8d1822;
}

.text-link-btn:hover,
.text-link-btn:focus {
    background: #fdecef;
    border-color: #e6a9b0;
    box-shadow: 0 8px 16px rgba(161, 28, 39, 0.08);
    transform: translateY(-1px);
}

.flow-section {
    width: 100%;
    margin-top: 18px;
    text-align: left;
    border-top: 1px solid #edf0f4;
    padding-top: 18px;
}

.flow-section.is-hidden {
    display: none;
}

.is-hidden {
    display: none !important;
}

.meta-copy {
    width: 100%;
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: #667085;
    line-height: 1.45;
}

.password-checklist {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    width: 100%;
    text-align: left;
    display: grid;
    gap: 8px;
}

.password-checklist li {
    font-size: 0.88rem;
    color: #4f5d6b;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.password-checklist li.valid {
    color: #1f6b43;
    font-weight: 600;
}

.password-checklist .check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    font-weight: 700;
    border-radius: 999px;
    background: #f2f4f7;
}

.password-checklist li.valid .check-icon {
    background: #dcfce7;
}

.copyright-bottom-right {
    display: block;
    margin: 0 auto 16px;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #e4e7ec;
    color: #667085;
    font-size: 0.82rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
    pointer-events: none;
}

.progress-bar-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    width: 100%;
}

.step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f2f4f7;
    color: #98a2b3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid #e4e7ec;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.step.active {
    background: #a11c27;
    color: #fff;
    border-color: #a11c27;
}

.step-connector {
    height: 2px;
    width: 28px;
    background: #e4e7ec;
    margin: 0 4px;
}

@media (min-width: 768px) {
    .inline-actions,
    .forgot-password-actions {
        flex-direction: row;
    }

    .inline-actions > *,
    .forgot-password-actions > * {
        flex: 1;
    }
}

@media (max-width: 900px) {
    .logo-bar {
        width: calc(100% - 24px);
        margin-top: 14px;
        gap: 10px;
    }

    .logo-bar img {
        width: 48px;
        height: 48px;
    }

    .logo-bar .school-name {
        font-size: 1.22rem;
    }

    .center-panel {
        padding-top: 16px;
        padding-bottom: 64px;
    }

    .verify-box {
        max-width: 100%;
        padding: 28px 24px 24px;
    }
}

@media (max-width: 600px) {
    .logo-bar {
        width: calc(100% - 18px);
        margin-top: 10px;
        gap: 8px;
    }

    .logo-bar img {
        width: 42px;
        height: 42px;
    }

    .logo-bar .school-name {
        font-size: 1.02rem;
    }

    .center-panel {
        min-height: calc(100vh - 126px);
        align-items: center;
        padding: 14px 10px 56px;
    }

    .verify-box {
        border-radius: 20px;
        padding: 22px 16px 18px;
    }

    .verify-box h2 {
        font-size: 1.3rem;
    }

    .verify-message {
        font-size: 0.92rem;
        margin-bottom: 16px;
    }

    .input-group input,
    .submit-btn,
    .inline-actions button,
    .inline-actions a,
    .forgot-password-actions button,
    .forgot-password-actions a {
        min-height: 46px;
        font-size: 0.94rem;
    }

    .status-box {
        padding: 11px 12px;
        font-size: 0.9rem;
    }

    .progress-bar-stepper {
        margin-bottom: 10px;
    }

    .step {
        width: 26px;
        height: 26px;
        font-size: 0.9rem;
    }

    .step-connector {
        width: 20px;
        margin: 0 3px;
    }
}

@media (max-width: 380px) {
    .logo-bar .school-name {
        font-size: 0.92rem;
    }

    .verify-box {
        padding: 18px 12px 16px;
    }

    .inputs-section,
    .forgot-password-fields {
        margin-bottom: 16px;
    }

    .input-group {
        margin-bottom: 16px;
    }

    .verify-box h2 {
        font-size: 1.22rem;
    }

    .copyright-bottom-right {
        font-size: 0.78rem;
        padding: 4px 9px;
    }
}