:root {
    --rp-white: #ffffff;
    --rp-blue-25: #f6fbff;
    --rp-blue-50: #eef8ff;
    --rp-blue-100: #dff1ff;
    --rp-blue-200: #b9ddff;
    --rp-blue-500: #2388d9;
    --rp-blue-600: #116fb8;
    --rp-blue-700: #075a99;
    --rp-text: #122033;
    --rp-muted: #617086;
    --rp-line: #dbeaf6;
    --rp-danger: #d64545;
    --rp-success: #16845c;
    --rp-shadow: 0 24px 70px rgba(17, 111, 184, 0.12);
}

* {
    box-sizing: border-box;
}

body.reset-password-body {
    min-height: 100vh;
    margin: 0;
    font-family: "Plus Jakarta Sans", "IBM Plex Sans Thai", sans-serif;
    color: var(--rp-text);
    background:
        linear-gradient(135deg, rgba(246, 251, 255, 0.96), rgba(238, 248, 255, 0.86)),
        linear-gradient(180deg, #ffffff 0%, #eef8ff 100%);
}

.reset-shell {
    min-height: 100vh;
    padding: 48px 22px;
    display: flex;
    align-items: center;
}

.reset-layout {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1fr);
    gap: 72px;
    align-items: center;
}

.reset-panel {
    padding: 12px 0;
}

.reset-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
    color: var(--rp-blue-700);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.reset-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rp-blue-100);
    color: var(--rp-blue-700);
    font-size: 18px;
}

.reset-hero h1 {
    max-width: 520px;
    margin: 0 0 18px;
    color: var(--rp-text);
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0;
}

.reset-hero p {
    max-width: 520px;
    margin: 0;
    color: var(--rp-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.reset-badges {
    max-width: 520px;
    margin-top: 36px;
    display: grid;
    gap: 14px;
}

.reset-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #33445a;
    font-size: 0.94rem;
    line-height: 1.45;
}

.reset-badge i {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    background: var(--rp-blue-100);
    color: var(--rp-blue-600);
}

.reset-form-panel {
    width: 100%;
    padding: 44px;
    border: 1px solid var(--rp-line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--rp-shadow);
}

.reset-form-header {
    margin-bottom: 30px;
}

.reset-form-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--rp-blue-600);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.reset-form-header h2 {
    margin: 0 0 10px;
    color: var(--rp-text);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
}

.reset-form-header p {
    margin: 0;
    color: var(--rp-muted);
    font-size: 0.98rem;
    line-height: 1.75;
}

.reset-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.reset-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reset-field label {
    color: #24354b;
    font-size: 0.92rem;
    font-weight: 700;
}

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

.reset-input-icon,
.reset-toggle-password {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #7b8ba0;
    z-index: 1;
}

.reset-input-icon {
    left: 16px;
}

.reset-toggle-password {
    right: 12px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.reset-toggle-password:hover {
    background: var(--rp-blue-50);
    color: var(--rp-blue-600);
}

.reset-input {
    width: 100%;
    min-height: 56px;
    padding: 15px 18px 15px 48px;
    border: 1px solid var(--rp-line);
    border-radius: 16px;
    background: var(--rp-white);
    color: var(--rp-text);
    font-size: 1rem;
    font-weight: 500;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.reset-input.has-trailing {
    padding-right: 58px;
}

.reset-input:focus {
    outline: none;
    border-color: var(--rp-blue-500);
    box-shadow: 0 0 0 4px rgba(35, 136, 217, 0.14);
}

.reset-help,
.reset-footer {
    color: var(--rp-muted);
    font-size: 0.88rem;
    line-height: 1.65;
}

.reset-status {
    min-height: 24px;
    font-size: 0.92rem;
    font-weight: 700;
}

.reset-status.is-loading {
    color: var(--rp-blue-600);
}

.reset-status.is-success {
    color: var(--rp-success);
}

.reset-status.is-error {
    color: var(--rp-danger);
}

.reset-inline-alert {
    display: none;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.55;
}

.reset-inline-alert.is-visible {
    display: block;
}

.reset-inline-alert.is-info {
    color: var(--rp-blue-700);
    background: var(--rp-blue-50);
    border-color: var(--rp-blue-200);
}

.reset-inline-alert.is-error {
    color: #a73333;
    background: #fff3f3;
    border-color: #f3caca;
}

.reset-inline-alert.is-success {
    color: var(--rp-success);
    background: #eefaf5;
    border-color: #ccefe0;
}

.reset-meta {
    display: flex;
    gap: 18px;
    padding: 16px 0;
    border-top: 1px solid var(--rp-line);
    border-bottom: 1px solid var(--rp-line);
}

.reset-meta-item {
    flex: 1 1 0;
}

.reset-meta-item strong {
    display: block;
    margin-bottom: 5px;
    color: #24354b;
    font-size: 0.88rem;
}

.reset-meta-item span {
    display: block;
    color: var(--rp-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.password-checklist {
    display: grid;
    gap: 10px;
    padding: 16px 0;
    border-top: 1px solid var(--rp-line);
    border-bottom: 1px solid var(--rp-line);
}

.password-rule {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--rp-muted);
    font-size: 0.92rem;
}

.password-rule i {
    width: 18px;
    text-align: center;
    color: #a6b4c4;
}

.password-rule.is-valid,
.password-rule.is-valid i {
    color: var(--rp-success);
}

.reset-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.reset-button {
    min-height: 56px;
    border: 0;
    border-radius: 16px;
    padding: 14px 18px;
    background: var(--rp-blue-600);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
    transition: background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 12px 24px rgba(17, 111, 184, 0.2);
}

.reset-button:hover:not(:disabled) {
    background: var(--rp-blue-700);
}

.reset-button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    box-shadow: none;
}

.reset-button-alt {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 50px;
    border-radius: 16px;
    border: 1px solid var(--rp-line);
    background: var(--rp-white);
    color: var(--rp-blue-700);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.reset-button-alt:hover {
    border-color: var(--rp-blue-200);
    background: var(--rp-blue-50);
    color: var(--rp-blue-700);
}

.reset-footer {
    margin-top: 18px;
}

.reset-unavailable {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.reset-unavailable-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rp-blue-100);
    color: var(--rp-blue-700);
    font-size: 22px;
}

.reset-unavailable h3 {
    margin: 0;
    color: var(--rp-text);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
}

.reset-unavailable p {
    margin: 0;
    color: var(--rp-muted);
    font-size: 0.98rem;
    line-height: 1.75;
}

.reset-expired-body {
    background:
        linear-gradient(135deg, rgba(255, 248, 248, 0.96), rgba(255, 241, 241, 0.9)),
        linear-gradient(180deg, #ffffff 0%, #fff2f2 100%);
}

.reset-expired-body .reset-brand,
.reset-expired-body .reset-form-kicker,
.reset-expired-body .reset-button-alt,
.reset-expired-body .reset-button-alt:hover {
    color: #b74343;
}

.reset-expired-body .reset-brand-mark,
.reset-expired-body .reset-unavailable-icon {
    background: #ffe8e8;
    color: #b74343;
}

.reset-expired-body .reset-form-panel,
.reset-expired-body .reset-input,
.reset-expired-body .reset-button-alt {
    border-color: #f5d4d4;
}

.reset-expired-body .reset-form-panel {
    box-shadow: 0 24px 70px rgba(183, 67, 67, 0.1);
}

.reset-expired-body .reset-button-alt:hover {
    background: #fff5f5;
}

.reset-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(18, 32, 51, 0.28);
}

.reset-dialog {
    width: min(420px, 100%);
    padding: 28px;
    border-radius: 22px;
    border: 1px solid var(--rp-line);
    background: var(--rp-white);
    box-shadow: 0 24px 70px rgba(18, 32, 51, 0.22);
    text-align: center;
}

.reset-dialog h3 {
    margin: 0 0 10px;
    color: var(--rp-text);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.3;
}

.reset-dialog p {
    margin: 0;
    color: var(--rp-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.reset-dialog-button {
    min-width: 110px;
    margin-top: 22px;
    border: 0;
    border-radius: 14px;
    padding: 11px 18px;
    background: var(--rp-blue-600);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.reset-dialog-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 3px solid var(--rp-blue-100);
    border-top-color: var(--rp-blue-600);
    animation: reset-spin 0.8s linear infinite;
}

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

@media (max-width: 980px) {
    .reset-shell {
        align-items: flex-start;
        padding: 34px 18px;
    }

    .reset-layout {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .reset-panel {
        padding: 0;
    }

    .reset-brand {
        margin-bottom: 22px;
    }

    .reset-hero h1 {
        max-width: 680px;
        font-size: 2.3rem;
    }

    .reset-hero p,
    .reset-badges {
        max-width: 680px;
    }
}

@media (max-width: 576px) {
    .reset-shell {
        padding: 24px 14px;
    }

    .reset-layout {
        gap: 26px;
    }

    .reset-brand {
        margin-bottom: 18px;
        font-size: 0.76rem;
    }

    .reset-brand-mark {
        width: 38px;
        height: 38px;
    }

    .reset-hero h1 {
        font-size: 1.9rem;
    }

    .reset-badges {
        margin-top: 24px;
    }

    .reset-form-panel {
        padding: 24px 18px;
    }

    .reset-form-header h2 {
        font-size: 1.55rem;
    }

    .reset-meta {
        flex-direction: column;
        gap: 12px;
    }

    .reset-input,
    .reset-button {
        min-height: 52px;
    }
}
