:root {
    --password-reset-green: #2eb14d;
    --password-reset-green-dark: #188838;
    --password-reset-ink: #17221b;
    --password-reset-muted: #7d8880;
    --password-reset-line: #e7eee9;
    --password-reset-soft: #f5faf6;
}

.custom-modal.password-reset-modal {
    align-items: center;
    padding: 8px;
    background: rgba(13, 32, 19, .16);
}

.custom-modal.password-reset-modal .custom-modal-content {
    width: min(100%, 430px) !important;
    min-width: 0 !important;
    max-width: 430px !important;
    height: auto !important;
    max-height: calc(100dvh - 16px);
    border: 1px solid #edf2ee;
    border-radius: 22px !important;
    background: #fff !important;
    box-shadow: 0 24px 70px rgba(24, 69, 36, .17) !important;
}

.custom-modal.password-reset-modal .custom-modal-header {
    min-height: 48px;
    padding: 10px 13px 0;
    border: 0;
    background: #fff !important;
    box-shadow: none !important;
    font-family: Montserrat, Arial, sans-serif;
}

.custom-modal.password-reset-modal .custom-modal-header > span {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    color: var(--password-reset-ink) !important;
    font-size: .74rem !important;
    font-weight: 850 !important;
}

.custom-modal.password-reset-modal .custom-modal-body {
    width: 100%;
    margin: 0;
    overflow-x: hidden;
    background: #fff !important;
    box-shadow: none !important;
}

.custom-modal.password-reset-modal .custom-modal-footer { display: none; }

.custom-modal.password-reset-modal .close-modal,
.password-reset-back {
    width: 34px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f8fbf8 !important;
    color: var(--password-reset-green-dark) !important;
    box-shadow: 0 5px 14px rgba(30, 93, 47, .08) !important;
}

.custom-modal.password-reset-modal .close-modal i,
.password-reset-back i {
    color: inherit !important;
    font-size: .78rem;
}

.password-reset-header-title { color: var(--password-reset-ink) !important; }

.password-reset-shell {
    width: 100%;
    padding: 0 22px 18px;
    color: var(--password-reset-ink);
    font-family: Montserrat, Arial, sans-serif;
}

.password-reset-shell *,
.password-reset-shell *::before,
.password-reset-shell *::after { box-sizing: border-box; }

.password-reset-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.password-reset-motif {
    position: relative;
    width: 128px;
    height: 70px;
    margin: -2px auto 1px;
}

.password-reset-motif-icon {
    position: absolute;
    top: 5px;
    left: 50%;
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle, #effbf1 0, #f7fcf8 68%, transparent 70%);
    color: var(--password-reset-green);
    transform: translateX(-50%);
}

.password-reset-motif-icon > i {
    color: var(--password-reset-green) !important;
    font-size: 1.5rem;
}

.password-reset-motif-icon small {
    position: absolute;
    right: 2px;
    bottom: 3px;
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--password-reset-green);
}

.password-reset-motif-icon small i { color: #fff !important; font-size: .46rem; }

.password-reset-motif-line,
.password-reset-motif-dot { position: absolute; top: 35px; background: #85d596; }
.password-reset-motif-line { width: 20px; height: 1px; }
.password-reset-motif-line--left { left: 5px; }
.password-reset-motif-line--right { right: 5px; }
.password-reset-motif-dot { width: 3px; height: 3px; border-radius: 50%; transform: translateY(-1px); }
.password-reset-motif-dot--left { left: 31px; }
.password-reset-motif-dot--right { right: 31px; }

.password-reset-intro h2 {
    margin: 0;
    color: var(--password-reset-ink) !important;
    font-size: 1.22rem;
    font-weight: 900;
    letter-spacing: -.035em;
}

.password-reset-intro > p {
    margin: 7px 0 17px;
    color: var(--password-reset-muted) !important;
    font-size: .64rem;
    font-weight: 550;
    line-height: 1.55;
}

.password-reset-field { display: grid; gap: 7px; }

.password-reset-field > label,
.password-reset-code-label {
    margin: 0;
    color: #39453d !important;
    font-size: .66rem;
    font-weight: 850;
}

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

.password-reset-input-wrap > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 14px;
    color: var(--password-reset-green) !important;
    font-size: .78rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.password-reset-input-wrap input {
    width: 100%;
    min-height: 48px;
    padding: 0 40px;
    border: 1px solid #a9dfb4 !important;
    border-radius: 10px !important;
    outline: 0;
    background: #fff !important;
    color: var(--password-reset-ink) !important;
    font-size: .63rem;
    font-weight: 650;
    box-shadow: 0 4px 14px rgba(44, 108, 59, .035) !important;
}

.password-reset-input-wrap input:focus {
    border-color: var(--password-reset-green) !important;
    box-shadow: 0 0 0 3px rgba(46, 177, 77, .1) !important;
}

.password-reset-input-wrap input[readonly] {
    padding-right: 40px;
    cursor: default;
}

.password-reset-input-check {
    position: absolute;
    top: 50%;
    left: auto !important;
    right: 14px;
    color: var(--password-reset-green) !important;
    font-size: .73rem;
    transform: translateY(-50%);
}

.password-reset-input-wrap input.is-invalid {
    border-color: #db4b4b !important;
    background-image: none !important;
    box-shadow: 0 0 0 3px rgba(219, 75, 75, .08) !important;
}

.password-reset-error {
    display: none;
    margin: 7px 2px 0;
    color: #d94343 !important;
    font-size: .6rem;
    font-weight: 700;
    line-height: 1.4;
}

.password-reset-error.is-visible { display: block; }

.password-reset-primary,
.password-reset-secondary {
    width: 100%;
    min-height: 45px;
    margin-top: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 10px;
    font-size: .67rem;
    font-weight: 850;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.password-reset-primary {
    border: 0;
    background: linear-gradient(90deg, #39ba58, #249b43) !important;
    color: #fff !important;
    box-shadow: 0 9px 20px rgba(42, 161, 69, .2) !important;
}

.password-reset-primary i,
.password-reset-primary span { color: #fff !important; }
.password-reset-primary:disabled { opacity: .65; cursor: wait; }

.password-reset-secondary {
    border: 1px solid #a7dcb1;
    background: #fff !important;
    color: var(--password-reset-green-dark) !important;
    box-shadow: 0 6px 15px rgba(38, 112, 55, .06) !important;
}

.password-reset-secondary i,
.password-reset-secondary span { color: inherit !important; }

.password-reset-divider {
    margin: 14px 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--password-reset-green-dark);
    font-size: .56rem;
    font-weight: 850;
}

.password-reset-divider::before,
.password-reset-divider::after { height: 1px; flex: 1; background: #e9efeb; content: ""; }
.password-reset-divider span { color: var(--password-reset-green-dark) !important; }

.password-reset-info-card,
.password-reset-security-card {
    padding: 12px 13px;
    display: grid;
    gap: 10px;
    border: 1px solid #edf3ee;
    border-radius: 10px;
    background: var(--password-reset-soft) !important;
}

.password-reset-info-card p {
    margin: 0;
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 8px;
    align-items: start;
    color: #6e7971 !important;
    font-size: .57rem;
    font-weight: 600;
    line-height: 1.5;
}

.password-reset-info-card i { margin-top: 1px; color: var(--password-reset-green) !important; font-size: .7rem; }
.password-reset-info-card span { color: inherit !important; font-weight: inherit; }
.password-reset-info-card strong { color: var(--password-reset-green-dark); font-weight: 850; }

.password-reset-secure-note {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #8b958e;
    font-size: .55rem;
    font-weight: 700;
}

.password-reset-secure-note i,
.password-reset-secure-note span { color: inherit !important; }
.password-reset-secure-note strong { margin-left: 2px; color: var(--password-reset-green-dark); }

.password-reset-shell--credentials { padding-bottom: 13px; }
.password-reset-shell--credentials .password-reset-motif { height: 58px; }
.password-reset-shell--credentials .password-reset-motif-icon { width: 48px; height: 48px; }
.password-reset-shell--credentials .password-reset-motif-icon > i { font-size: 1.28rem; }
.password-reset-shell--credentials .password-reset-intro > p { margin-bottom: 12px; }
.password-reset-shell--credentials .password-reset-field { gap: 5px; }
.password-reset-shell--credentials .password-reset-input-wrap input { min-height: 42px; }

.password-reset-mini-info {
    margin: 9px 0 10px;
    padding: 9px 10px;
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 8px;
    align-items: start;
    border-radius: 9px;
    background: var(--password-reset-soft);
    color: #6f7a72;
    font-size: .55rem;
    font-weight: 600;
    line-height: 1.45;
}

.password-reset-mini-info i { margin-top: 1px; color: var(--password-reset-green) !important; }
.password-reset-mini-info span { color: inherit !important; font-weight: inherit; }

.password-reset-code-head,
.password-reset-code-meta,
.password-reset-strength-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.password-reset-code-label { display: flex; align-items: center; gap: 6px; }
.password-reset-code-label i { color: var(--password-reset-green) !important; }

.password-reset-code-grid {
    margin-top: 7px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.password-reset-code-cell {
    width: 100%;
    height: 48px;
    padding: 0 !important;
    border: 1px solid var(--password-reset-line) !important;
    border-radius: 9px !important;
    outline: 0;
    background: #fff !important;
    color: var(--password-reset-ink) !important;
    font-size: 1rem;
    font-weight: 850;
    text-align: center;
    box-shadow: none !important;
}

.password-reset-code-cell:focus,
.password-reset-code-cell.is-filled { border-color: var(--password-reset-green) !important; }
.password-reset-code-grid.is-invalid .password-reset-code-cell { border-color: #db4b4b !important; }

.password-reset-code-meta { margin: 8px 1px 10px; }
.password-reset-code-meta span,
.password-reset-code-meta button {
    color: #738078 !important;
    font-size: .54rem;
    font-weight: 650;
}

.password-reset-code-meta strong { color: var(--password-reset-green-dark); font-weight: 850; }
.password-reset-code-meta button { padding: 0; border: 0; background: transparent !important; color: var(--password-reset-green-dark) !important; }

.password-reset-password-field { margin-top: 9px; }
.password-reset-password-field .password-reset-input-wrap input { padding-left: 14px; padding-right: 43px; border-color: var(--password-reset-line) !important; }

.password-reset-toggle {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 6px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent !important;
    color: #879189 !important;
    transform: translateY(-50%);
    box-shadow: none !important;
}

.password-reset-toggle i { color: inherit !important; font-size: .7rem; }

.password-reset-strength { margin-top: 7px; }
.password-reset-strength-head span { color: #758078 !important; font-size: .53rem; font-weight: 650; }
.password-reset-strength-head strong { color: #db4b4b; font-size: .53rem; font-weight: 850; }
.password-reset-strength-track { height: 3px; margin-top: 5px; overflow: hidden; border-radius: 3px; background: #edf0ee; }
.password-reset-strength-bar { width: 0; height: 100%; border-radius: inherit; background: #db4b4b; transition: width .2s ease, background .2s ease; }

.password-reset-security-card {
    margin-top: 10px;
    grid-template-columns: 26px 1fr;
    gap: 9px;
    align-items: center;
    padding: 9px 11px;
}

.password-reset-security-card > i {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e9f8ec;
    color: var(--password-reset-green) !important;
    font-size: .72rem;
}

.password-reset-security-card strong { display: block; color: #405047; font-size: .57rem; font-weight: 850; }
.password-reset-security-card span { display: block; margin-top: 2px; color: #879189 !important; font-size: .51rem; font-weight: 600; line-height: 1.35; }

.password-reset-shell--success {
    min-height: 470px;
    padding: 16px 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.password-reset-success-visual {
    position: relative;
    width: 150px;
    height: 130px;
    margin: 5px auto 2px;
}

.password-reset-success-ring {
    position: absolute;
    top: 26px;
    left: 50%;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border: 8px solid #eef9f0;
    border-radius: 50%;
    background: linear-gradient(145deg, #61cc6c, #32aa49);
    box-shadow: 0 10px 24px rgba(45, 173, 75, .22);
    transform: translateX(-50%);
}

.password-reset-success-ring i { color: #fff !important; font-size: 1.65rem; }
.password-reset-success-spark { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #9eddab; }
.password-reset-success-spark--one { left: 26px; top: 67px; }
.password-reset-success-spark--two { right: 25px; top: 60px; }
.password-reset-success-spark--three { left: 48px; top: 19px; }
.password-reset-success-spark--four { right: 48px; top: 23px; }
.password-reset-success-visual::before,
.password-reset-success-visual::after { position: absolute; top: 69px; width: 23px; height: 1px; background: #8fd59e; content: ""; }
.password-reset-success-visual::before { left: 11px; }
.password-reset-success-visual::after { right: 11px; }

.password-reset-shell--success h2 { margin: 0; color: var(--password-reset-ink) !important; font-size: 1.48rem; font-weight: 900; letter-spacing: -.04em; }
.password-reset-success-lead { margin: 7px 0 3px; color: var(--password-reset-green-dark) !important; font-size: .72rem; font-weight: 850; }
.password-reset-success-copy { margin: 0; color: #818b84 !important; font-size: .62rem; font-weight: 600; }

.password-reset-success-card {
    width: 100%;
    margin: 17px 0 2px;
    padding: 12px;
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 10px;
    align-items: center;
    border: 1px solid #e8f0ea;
    border-radius: 11px;
    background: var(--password-reset-soft);
    text-align: left;
}

.password-reset-success-card > i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #e5f7e9;
    color: var(--password-reset-green) !important;
    font-size: 1rem;
}

.password-reset-success-card strong { display: block; color: #445149; font-size: .61rem; font-weight: 850; }
.password-reset-success-card span { display: block; margin-top: 3px; color: #7e8881 !important; font-size: .53rem; font-weight: 600; line-height: 1.45; }
.password-reset-success-actions { width: 100%; margin-top: 7px; }
.password-reset-success-actions .password-reset-primary,
.password-reset-success-actions .password-reset-secondary { margin-top: 10px; }
.password-reset-shell--success .password-reset-secure-note { margin-top: auto; padding-top: 18px; }

body.dark-mode .custom-modal.password-reset-modal .custom-modal-content,
body.dark-mode .custom-modal.password-reset-modal .custom-modal-header,
body.dark-mode .custom-modal.password-reset-modal .custom-modal-body,
body.dark-mode .password-reset-shell,
body.dark-mode .password-reset-input-wrap input,
body.dark-mode .password-reset-code-cell,
body.dark-mode .password-reset-secondary {
    background: #fff !important;
    color: var(--password-reset-ink) !important;
}

@media (max-width: 480px) {
    .custom-modal.password-reset-modal { padding: 5px; }
    .custom-modal.password-reset-modal .custom-modal-content { width: 100% !important; max-height: calc(100dvh - 10px); border-radius: 18px !important; }
    .password-reset-shell { padding-right: 17px; padding-left: 17px; }
    .password-reset-shell--success { padding-right: 22px; padding-left: 22px; }
    .password-reset-code-grid { gap: 6px; }
}

@media (max-height: 700px) {
    .custom-modal.password-reset-modal .custom-modal-body { overflow-y: auto; }
    .password-reset-shell--success { min-height: 440px; }
}

@media (prefers-reduced-motion: reduce) {
    .password-reset-shell *,
    .custom-modal.password-reset-modal * { transition: none !important; }
}
