.auth-frame {
    border-radius: 32px;
    border: 2px solid rgba(255, 77, 20, 0.65);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 24px 50px rgba(20, 34, 74, 0.12);
    overflow: hidden;
}

.auth-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.auth-grid::after {
    content: '';
    position: absolute;
    top: 26px;
    bottom: 26px;
    left: 50%;
    width: 1px;
    background: rgba(255, 77, 20, 0.6);
    transform: translateX(-0.5px);
}

.auth-pane {
    padding: 34px 36px 38px;
}

.auth-pane h1,
.auth-pane h2 {
    margin: 0 0 26px;
    font-family: 'Sora', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #111b38;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.auth-title-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 12px;
    color: #ff4d14;
    background: rgba(255, 77, 20, 0.12);
    border: 1px solid rgba(255, 77, 20, 0.18);
    font-size: 0.95rem;
}

.auth-form {
    max-width: 420px;
    margin: 0 auto;
}

.form-rows {
    display: grid;
    gap: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.form-row label {
    text-align: right;
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(17, 27, 56, 0.74);
}

.form-row input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid rgba(17, 27, 56, 0.12);
    background: rgba(255, 255, 255, 0.92);
    font: inherit;
    color: #111b38;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-row input:focus {
    border-color: rgba(255, 77, 20, 0.55);
    box-shadow: 0 0 0 4px rgba(255, 77, 20, 0.12);
}

/* Pembungkus menjaga tombol mata tetap berada di dalam input pada semua layar. */
.password-field { position: relative; min-width: 0; }
.password-field input { padding-right: 48px; }
.password-toggle {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; display: grid; place-items: center;
    border: 0; border-radius: 10px; background: transparent; color: #68728b; cursor: pointer;
}
.password-toggle:hover { color: #ff4d14; background: #fff0e9; }
.password-toggle svg, .reset-close svg, .reset-modal__icon svg {
    width: 22px; height: 22px; fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.password-toggle .eye-slash { display: none; }
.password-toggle[aria-pressed="true"] .eye-slash { display: block; }
.password-toggle:focus-visible, .reset-close:focus-visible, .reset-text-button:focus-visible {
    outline: 3px solid #ff916b; outline-offset: 2px;
}
.password-toggle:disabled { cursor: wait; opacity: .5; }
.auth-progress { font-size: .85rem; line-height: 1.65; color: #485570; margin: 18px 0 0; }
.auth-form[aria-busy="true"] .auth-progress { color: #c13c0f; }
.auth-form input:disabled { opacity: .7; cursor: wait; }
.auth-honeypot { display: none; }

/* Modal menggunakan palet oranye, navy, dan putih yang sama dengan halaman login. */
.reset-modal {
    width: min(520px, calc(100vw - 28px)); max-height: calc(100dvh - 36px);
    overflow-y: auto; padding: 28px 32px; border: 1px solid #ffb399;
    border-radius: 26px; color: #111b38; background: #fffdfa;
    box-shadow: 0 28px 100px rgba(15, 26, 54, .3);
}
.reset-modal::backdrop { background: rgba(15, 26, 54, .65); backdrop-filter: blur(3px); }
.reset-modal__header { display: flex; justify-content: space-between; align-items: center; }
.reset-modal__icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: #fff0e9; color: #ff4d14; border: 1px solid #ffd3c1; }
.reset-modal__icon svg { width: 27px; height: 27px; }
.reset-close { display: grid; place-items: center; width: 38px; height: 38px; color: #68728b; border: 0; border-radius: 12px; background: #f2f3f7; cursor: pointer; }
.reset-close:hover { background: #fff0e9; color: #c13c0f; }
.reset-close:disabled { opacity: .5; cursor: wait; }
.reset-eyebrow { margin: 22px 0 7px; font-size: .7rem; font-weight: 800; letter-spacing: .15em; color: #cf461b; }
.reset-modal h2 { margin: 0 0 12px; font-size: 1.7rem; font-family: 'Sora', sans-serif; }
#reset-description { margin: 0; color: #68728b; font-size: .92rem; line-height: 1.7; }
.reset-steps { display: flex; gap: 18px; padding: 18px 0; margin: 8px 0 18px; list-style: none; border-bottom: 1px solid #eee4df; }
.reset-steps li { display: flex; align-items: center; gap: 8px; color: #7a8498; font-size: .8rem; font-weight: 700; }
.reset-steps span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #eef0f5; }
.reset-steps [aria-current="step"] { color: #b8370d; }
.reset-steps [aria-current="step"] span { background: #ff4d14; color: white; }
.reset-form { max-width: none; }
.reset-form .form-row { grid-template-columns: minmax(0, 1fr); gap: 7px; }
.reset-form .form-row label { text-align: left; font-size: .85rem; }
.reset-form .form-actions { margin-top: 18px; }
.reset-form .form-actions .btn { width: 100%; }
.reset-hint { font-size: .78rem; color: #6b7589; line-height: 1.7; margin: 12px 0; }
.reset-text-button { display: block; padding: 12px 5px; margin: 8px auto 0; border: 0; background: transparent; color: #b8370d; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 700; }
.reset-text-button:hover { text-decoration: underline; }
.reset-text-button:disabled { opacity: .5; cursor: wait; }
.reset-footer { border-top: 1px solid #eee4df; padding-top: 17px; margin: 18px 0 0; font-size: .74rem; color: #7b8293; text-align: center; }
.reset-notice { border: 1px solid #cbd7ef; border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; background: #f2f6ff; color: #334564; font-size: .85rem; line-height: 1.65; overflow-wrap: anywhere; }
.reset-notice.is-error { border-color: #f3c3bf; background: #fff2f0; color: #a62d22; }
.reset-notice.is-success { border-color: #b8d8c9; background: #f0f9f4; color: #245c42; }
.reset-modal [hidden], .auth-progress[hidden] { display: none !important; }

.form-actions {
    margin-top: 18px;
    display: grid;
    gap: 12px;
    justify-items: center;
}

.form-actions.inline {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.form-actions.inline .btn {
    min-width: 120px;
}

.form-actions .btn {
    min-height: 42px;
    border-radius: 12px;
}

.btn[disabled],
.btn.is-disabled {
    opacity: 0.72;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.btn.is-loading {
    position: relative;
    padding-right: 44px;
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-top-color: rgba(255, 255, 255, 1);
    animation: authspin 0.9s linear infinite;
}

.btn.btn-secondary.is-loading::after {
    border-color: rgba(34, 81, 209, 0.26);
    border-top-color: rgba(34, 81, 209, 0.9);
}

@keyframes authspin {
    to {
        transform: rotate(360deg);
    }
}

.btn-small {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.flash {
    width: var(--container);
    margin: 0 auto 18px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(17, 27, 56, 0.08);
    background: rgba(255, 255, 255, 0.86);
    color: #111b38;
    box-shadow: 0 14px 28px rgba(17, 27, 56, 0.06);
}

.flash[hidden] {
    display: none;
}

.flash.is-success {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
}

.flash.is-error {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.captcha-row {
    align-items: start;
}

.captcha-row label {
    padding-top: 2px;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-box span {
    font-size: 0.92rem;
    font-weight: 800;
    color: #ef4444;
    white-space: nowrap;
}

.captcha-box input {
    max-width: 120px;
}

.site-footer {
    margin-top: 52px;
    padding: 44px 36px 24px;
    border-radius: 30px;
    background: linear-gradient(180deg, #0f1a36 0%, #132348 100%);
    color: #dbe1f1;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 0.85fr 0.95fr 0.9fr 0.95fr;
    gap: 30px;
}

.site-footer h3 {
    margin: 0 0 16px;
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.site-footer a {
    color: rgba(219, 225, 241, 0.88);
    font-size: 0.94rem;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: #ffffff;
}

.site-footer .brand-copy strong {
    color: #ff5a1f;
}

.site-footer .brand-copy span {
    color: rgba(219, 225, 241, 0.8);
}

.site-footer__about {
    margin: 16px 0 0;
    font-size: 0.94rem;
    line-height: 1.7;
    color: rgba(219, 225, 241, 0.78);
    max-width: 36ch;
}

.site-footer__bottom {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: rgba(219, 225, 241, 0.72);
    font-size: 0.9rem;
}

.site-footer__bottom p {
    margin: 0;
}

@media (max-width: 1240px) {
    .site-footer__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }

    .auth-grid::after {
        left: 32px;
        right: 32px;
        top: 50%;
        bottom: auto;
        height: 1px;
        width: auto;
        transform: translateY(-0.5px);
    }
}

@media (max-width: 760px) {
    .reset-modal { padding: 22px 20px; border-radius: 22px; }
    .reset-steps { gap: 12px; }
    .reset-steps li { font-size: .75rem; }
    .auth-pane {
        padding: 26px 18px 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .form-row label {
        text-align: left;
    }

    .site-footer {
        padding: 32px 20px 18px;
        border-radius: 24px;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn.is-loading::after { animation: none; }
}
