/* SPMB Auth — brand-led split layout, moodguide biru langit */

:root {
    /* Moodguide: Biru Langit utama, Biru Gelap pendukung */
    --auth-primary: #59a5d7;
    --auth-primary-dark: #3d8fc4;
    --auth-primary-soft: #e3f2fa;
    --auth-sky: #59a5d7;
    --auth-sky-soft: #e3f2fa;
    --auth-deep: #1e3a5f;
    --auth-text: #102033;
    --auth-muted: #595959;
    --auth-line: #d8e3eb;
    --auth-line-strong: #bdccda;
    --auth-surface: #f1f2f6;
    --auth-card: #ffffff;
    --auth-danger: #b42318;
    --auth-radius: 0.85rem;
    --auth-radius-control: 0.65rem;
    --auth-shadow: 0 24px 60px -34px rgba(89, 165, 215, 0.4);
    --auth-font: "Plus Jakarta Sans", system-ui, sans-serif;
    --auth-transition: 0.18s ease;

    --primary: var(--auth-primary);
    --primary-hover: var(--auth-primary-dark);
    --accent: var(--auth-sky);
    --text: var(--auth-text);
    --text-muted: var(--auth-muted);
    --card-bg: var(--auth-card);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    font-family: var(--auth-font);
    color: var(--auth-text);
    background: var(--auth-surface);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--auth-deep);
    text-decoration: none;
    transition: color var(--auth-transition);
}

a:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

/* —— Shell —— */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--auth-surface);
}

.auth-brand-panel {
    display: none;
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(ellipse 85% 65% at 12% 18%, rgba(255, 255, 255, 0.28), transparent 55%),
        radial-gradient(ellipse 70% 50% at 88% 82%, rgba(30, 58, 95, 0.28), transparent 50%),
        linear-gradient(160deg, #3d8fc4 0%, #59a5d7 52%, #7bb8e0 100%);
}

.auth-brand-panel__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    padding: 3rem 3.25rem;
    max-width: 34rem;
}

.auth-brand-mark {
    display: inline-flex;
    align-items: center;
    margin-bottom: 2rem;
    text-decoration: none;
}

.auth-brand-mark__logo {
    display: block;
    width: min(100%, 280px);
    height: auto;
    filter: brightness(0) invert(1);
}

.auth-brand-panel__eyebrow {
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.auth-brand-panel__title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.75rem, 2.4vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
}

.auth-brand-panel__tagline {
    margin: 0;
    max-width: 28rem;
    font-size: 1.02rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
}

.auth-form-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem 1.15rem 1.75rem;
    background:
        linear-gradient(180deg, #f7fafc 0%, var(--auth-surface) 55%, #e8eef4 100%);
}

.auth-form-panel__mobile-brand {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 440px;
    margin-bottom: 1.25rem;
}

.auth-form-panel__mobile-logo {
    display: block;
    width: min(100%, 220px);
    height: auto;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 1.65rem 1.35rem 1.45rem;
    background: var(--auth-card);
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
}

.auth-card--wide {
    max-width: 560px;
}

.auth-copyright {
    margin: 1.35rem 0 0;
    font-size: 0.78rem;
    color: var(--auth-muted);
    text-align: center;
}

/* —— Card content —— */
.auth-card__title,
.auth-panel__title,
.auth-glass__title,
.auth-card > h2,
.auth-card > .fw-bold:first-child {
    margin: 0 0 0.35rem;
    font-size: clamp(1.35rem, 3vw, 1.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--auth-text);
}

.auth-card__subtitle,
.auth-panel__subtitle,
.auth-glass__subtitle,
.auth-card > .text-secondary {
    margin: 0 0 1.4rem;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--auth-muted);
}

.auth-field,
.auth-card .mb-3 {
    margin-bottom: 1.05rem;
}

.auth-field .form-label,
.auth-card .form-label {
    margin-bottom: 0.4rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--auth-text);
}

.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.auth-label-row .form-label {
    margin-bottom: 0;
}

.auth-label-row a {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.form-control,
.form-select {
    min-height: 50px;
    padding: 0.7rem 0.95rem;
    border: 1px solid var(--auth-line-strong);
    border-radius: var(--auth-radius-control);
    background: #fff;
    color: var(--auth-text);
    font-size: 1rem;
    box-shadow: none;
    transition:
        border-color var(--auth-transition),
        box-shadow var(--auth-transition);
}

.form-control::placeholder {
    color: #8a97a8;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(89, 165, 215, 0.28);
    background: #fff;
    color: var(--auth-text);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--auth-danger);
}

.invalid-feedback {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--auth-danger);
}

.is-invalid + .invalid-feedback,
.invalid-feedback:not(:empty) {
    display: block;
}

.auth-input-group {
    position: relative;
}

.auth-input-group .form-control {
    padding-right: 3rem;
}

.auth-input-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    transition: color var(--auth-transition);
}

.auth-input-toggle:hover {
    color: var(--auth-primary-dark);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
    min-height: auto;
    padding-left: 0;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    min-height: 44px;
    margin: 0.15rem 0 1.35rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius-control);
    background: var(--auth-sky-soft);
    cursor: pointer;
    user-select: none;
    transition:
        border-color var(--auth-transition),
        background-color var(--auth-transition);
}

.auth-remember:hover {
    border-color: color-mix(in srgb, var(--auth-sky) 55%, var(--auth-line));
    background: #dff0fa;
}

.auth-remember .form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    border: 1.5px solid var(--auth-line-strong);
    float: none;
    flex-shrink: 0;
    cursor: pointer;
}

.auth-remember .form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-remember .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(89, 165, 215, 0.28);
    border-color: var(--auth-primary);
}

.auth-remember__text {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--auth-deep);
    line-height: 1.35;
}

.form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    border: 1.5px solid var(--auth-line-strong);
    float: none;
    flex-shrink: 0;
}

.form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(89, 165, 215, 0.28);
    border-color: var(--auth-primary);
}

.form-check-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--auth-muted);
    cursor: pointer;
}

.btn-primary {
    --bs-btn-bg: var(--auth-primary);
    --bs-btn-border-color: var(--auth-primary);
    --bs-btn-hover-bg: var(--auth-primary-dark);
    --bs-btn-hover-border-color: var(--auth-primary-dark);
    --bs-btn-active-bg: var(--auth-primary-dark);
    --bs-btn-active-border-color: var(--auth-primary-dark);
    --bs-btn-disabled-bg: var(--auth-primary);
    --bs-btn-disabled-border-color: var(--auth-primary);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    min-height: 52px;
    padding: 0.75rem 1.1rem;
    border-radius: var(--auth-radius-control);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 24px -14px rgba(89, 165, 215, 0.75);
    transition:
        background-color var(--auth-transition),
        border-color var(--auth-transition),
        opacity var(--auth-transition),
        transform var(--auth-transition);
}

.btn-primary:hover:not(:disabled) {
    background: var(--auth-primary-dark);
    border-color: var(--auth-primary-dark);
    transform: translateY(-1px);
}

.btn-primary:disabled,
.btn-primary.disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

.btn-primary .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    vertical-align: -0.1em;
}

.auth-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--auth-muted);
}

.auth-links a {
    font-weight: 700;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-password-checklist {
    list-style: none;
    margin: 0 0 1.35rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius-control);
    background: #fbfcfd;
}

.auth-password-checklist li {
    position: relative;
    padding: 0.28rem 0 0.28rem 1.55rem;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color var(--auth-transition);
}

.auth-password-checklist li::before {
    content: "";
    position: absolute;
    top: 0.55rem;
    left: 0.15rem;
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 50%;
    border: 2px solid currentColor;
    box-sizing: border-box;
}

.auth-password-checklist li.is-unmet {
    color: var(--auth-danger);
}

.auth-password-checklist li.is-met {
    color: var(--auth-sky);
}

.auth-password-checklist li.is-met::before {
    background: var(--auth-sky);
    border-color: var(--auth-sky);
    box-shadow: inset 0 0 0 2px #fff;
}

.auth-early-badge {
    display: inline-flex;
    align-items: center;
    margin: 0 0 0.85rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--auth-sky) 18%, #fff);
    border: 1px solid color-mix(in srgb, var(--auth-sky) 45%, var(--auth-line));
    color: var(--auth-deep);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-countdown {
    margin: 1rem 0 0.25rem;
    padding: 1rem;
    border: 1px dashed color-mix(in srgb, var(--auth-sky) 45%, var(--auth-line));
    border-radius: var(--auth-radius-control);
    background: var(--auth-sky-soft);
    text-align: center;
}

.auth-countdown__label {
    margin: 0 0 0.35rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--auth-muted);
}

.auth-countdown__value {
    margin: 0;
    font-size: clamp(1.05rem, 3.2vw, 1.35rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--auth-deep);
    line-height: 1.45;
}

.auth-otp-boxes {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.35rem;
}

.auth-otp-box {
    width: 100%;
    min-height: 52px;
    padding: 0.4rem 0.2rem;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0;
    border-radius: var(--auth-radius-control);
}

.auth-otp-resend {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--auth-line);
}

.auth-otp-resend__hint {
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--auth-muted);
}

.auth-otp-resend__timer {
    margin-top: 0.65rem !important;
    text-align: center;
}

.btn-outline-secondary {
    --bs-btn-color: var(--auth-deep);
    --bs-btn-border-color: var(--auth-line-strong);
    --bs-btn-hover-bg: var(--auth-sky-soft);
    --bs-btn-hover-border-color: var(--auth-sky);
    --bs-btn-hover-color: var(--auth-deep);
    min-height: 46px;
    font-weight: 700;
}

.auth-footer-note,
.auth-card > .text-center {
    margin: 1.15rem 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--auth-muted);
}

.alert {
    border-radius: var(--auth-radius-control);
    border: 1px dashed color-mix(in srgb, var(--auth-primary) 40%, var(--auth-line));
    font-size: 0.9rem;
    line-height: 1.45;
}

.alert-warning {
    background: var(--auth-primary-soft);
    color: var(--auth-primary-dark);
}

.auth-notice-link {
    font-size: 0.85rem;
    color: var(--auth-muted);
}

.auth-notice-link a {
    color: var(--auth-deep);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.auth-notice-link a:hover {
    color: var(--auth-primary-dark);
}

.form-text {
    color: var(--auth-muted);
    font-size: 0.8rem;
}

@media (min-width: 480px) {
    .auth-card {
        padding: 2rem 1.85rem 1.75rem;
    }
}

@media (min-width: 992px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    }

    .auth-brand-panel {
        display: block;
        min-height: 100vh;
    }

    .auth-form-panel {
        padding: 2.5rem 2rem;
        background: var(--auth-surface);
    }

    .auth-form-panel__mobile-brand {
        display: none;
    }

    .auth-card {
        max-width: 460px;
    }

    .auth-card--wide {
        max-width: 560px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-primary:hover:not(:disabled) {
        transform: none;
    }
}

/* —— Maintenance (centered, single composition) —— */
.auth-maintenance-body {
    min-height: 100%;
    margin: 0;
    background: #F1F2F6;
}

.auth-maintenance {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2.5rem 1.25rem 4.5rem;
    color: #1E3A5F;
    background:
        radial-gradient(ellipse 70% 55% at 50% -10%, rgba(89, 165, 215, 0.28), transparent 60%),
        radial-gradient(ellipse 55% 45% at 100% 100%, rgba(30, 58, 95, 0.12), transparent 55%),
        radial-gradient(ellipse 40% 35% at 0% 80%, rgba(89, 165, 215, 0.14), transparent 50%),
        linear-gradient(180deg, #EEF5FA 0%, #F1F2F6 48%, #E8EEF4 100%);
}

.auth-maintenance__glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(40px);
    pointer-events: none;
    opacity: 0.55;
}

.auth-maintenance__glow--one {
    width: 18rem;
    height: 18rem;
    top: 12%;
    left: 8%;
    background: rgba(89, 165, 215, 0.35);
    animation: auth-maintenance-drift 12s ease-in-out infinite alternate;
}

.auth-maintenance__glow--two {
    width: 14rem;
    height: 14rem;
    right: 10%;
    bottom: 16%;
    background: rgba(30, 58, 95, 0.22);
    animation: auth-maintenance-drift 15s ease-in-out infinite alternate-reverse;
}

.auth-maintenance__stage {
    position: relative;
    z-index: 1;
    width: min(100%, 38rem);
    text-align: center;
    animation: auth-maintenance-rise 0.55s ease both;
}

.auth-maintenance__logo {
    display: block;
    width: min(100%, 15rem);
    height: auto;
    margin: 0 auto 1.75rem;
    filter: drop-shadow(0 18px 28px rgba(30, 58, 95, 0.18));
}

.auth-maintenance__eyebrow {
    margin: 0 0 0.65rem;
    color: #59A5D7;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-maintenance__title {
    margin: 0 0 1rem;
    color: #1E3A5F;
    font-size: clamp(1.55rem, 4vw, 2.15rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-wrap: balance;
}

.auth-maintenance__message {
    margin: 0 auto;
    max-width: 34rem;
    color: #595959;
    font-size: 1.02rem;
    line-height: 1.65;
    text-wrap: pretty;
}

.auth-maintenance__contacts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin-top: 1.5rem;
}

.auth-maintenance__contacts > div {
    min-width: 10rem;
    padding: 0.75rem 1rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(30, 58, 95, 0.1);
    text-align: left;
}

.auth-maintenance__contacts span {
    display: block;
    margin-bottom: 0.15rem;
    color: #595959;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-maintenance__contacts strong {
    color: #1E3A5F;
    font-size: 0.95rem;
}

.auth-maintenance__copyright {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1.25rem;
    z-index: 1;
    margin: 0;
    color: #595959;
    font-size: 0.8rem;
    text-align: center;
}

@keyframes auth-maintenance-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes auth-maintenance-drift {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(18px, -14px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-maintenance__stage,
    .auth-maintenance__glow--one,
    .auth-maintenance__glow--two {
        animation: none;
    }
}
