/* @author Ertha Dwi Setiyawan */
:root {
    --login-navy: #0b3d6d;
    --login-navy-deep: #082f56;
    --login-blue: #176a9e;
    --login-ink: #18334b;
    --login-muted: #627589;
    --login-line: #dce5ed;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body.login-page {
    margin: 0;
    min-width: 320px;
    color: var(--login-ink);
    background: #f4f7fa;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.login-shell { min-height: 100vh; min-height: 100dvh; }
.login-brand-panel { display: none; }
.login-form-panel {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at 90% 0%, #e4f1f8 0, transparent 36%), #f4f7fa;
}
.login-card {
    width: min(100%, 470px);
    padding: 28px 24px 24px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 24px 65px rgba(18, 57, 88, .12);
}
.login-mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}
.login-mobile-brand img, .brand-head img {
    display: block;
    object-fit: contain;
    padding: 4px;
    border-radius: 9px;
    background: #fff;
}
.login-mobile-brand strong, .brand-head strong {
    display: block;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: -.025em;
}
.login-mobile-brand span, .brand-head span {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.login-mobile-brand span { color: var(--login-muted); }
.login-eyebrow {
    margin: 0 0 8px;
    color: var(--login-blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
}
.login-header { margin-bottom: 25px; }
.login-header h2 {
    margin: 0;
    color: var(--login-ink);
    font-size: clamp(25px, 4vw, 30px);
    line-height: 1.16;
    letter-spacing: -.045em;
}
.login-header > p:last-child {
    margin: 10px 0 0;
    color: var(--login-muted);
    font-size: 14px;
    line-height: 1.55;
}
.form-field { margin-bottom: 17px; }
.form-field label {
    display: block;
    margin-bottom: 7px;
    color: #29465f;
    font-size: 13px;
    font-weight: 700;
}
.form-field input, .form-field select {
    display: block;
    width: 100%;
    min-height: 45px;
    padding: 10px 13px;
    border: 1px solid var(--login-line);
    border-radius: 7px;
    outline: 0;
    color: var(--login-ink);
    background: #fbfdfe;
    font-size: 14px;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.form-field input::placeholder { color: #8a9aaa; }
.form-field input:hover, .form-field select:hover { border-color: #a9c3d6; }
.form-field input:focus, .form-field select:focus {
    border-color: var(--login-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(23, 106, 158, .12);
}
.form-field select {
    appearance: none;
    padding-right: 35px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7 5 5 5-5' fill='none' stroke='%235f7588' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 18px;
}
.password-field { position: relative; }
.password-field input { padding-right: 52px; }
.password-field button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--login-blue);
}
.password-field button:hover { background: #e9f3f9; }
.password-icon { width: 20px; height: 20px; }
.password-icon-hide, .password-field button[aria-pressed="true"] .password-icon-show { display: none; }
.password-field button[aria-pressed="true"] .password-icon-hide { display: block; }
.captcha-row { display: flex; align-items: center; gap: 11px; }
.captcha-image {
    flex: 0 1 200px;
    min-width: 150px;
    height: 57px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--login-line);
    border-radius: 7px;
    background: #fff;
}
.captcha-image img { display: block; width: calc(100% - 36px); height: 100%; object-fit: cover; }
.captcha-image button {
    align-self: stretch;
    flex: 0 0 36px;
    border: 0;
    border-left: 1px solid var(--login-line);
    background: #f5f9fc;
    color: var(--login-blue);
    font-size: 23px;
}
.captcha-image button:hover { background: #e5f1f8; }
.captcha-row > input { flex: 1 1 130px; min-width: 0; }
.login-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 7px;
    padding: 11px 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 7px;
    background: var(--login-navy);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 9px 20px rgba(11, 61, 109, .18);
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.login-submit:hover {
    background: #155d91;
    box-shadow: 0 12px 22px rgba(11, 61, 109, .23);
    transform: translateY(-1px);
}
.login-submit:active { transform: translateY(0); }
.login-submit:disabled { cursor: wait; opacity: .75; transform: none; }
.submit-arrow { font-size: 21px; line-height: 1; transition: transform .18s ease; }
.login-submit:hover .submit-arrow { transform: translateX(3px); }
.login-submit.is-loading .submit-arrow {
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255,255,255,.5);
    border-top-color: #fff;
    border-radius: 50%;
    font-size: 0;
    animation: login-spin .65s linear infinite;
}
.login-feedback {
    margin: 0 0 17px;
    padding: 11px 13px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.45;
}
.login-feedback[hidden] { display: none; }
.login-feedback.is-error { background: #fff1f0; color: #a12d25; }
.login-feedback.is-success { background: #edf8f1; color: #146b3c; }
.login-divider {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 26px 0 13px;
    color: var(--login-muted);
    font-size: 12px;
}
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--login-line); }
.app-links { display: flex; justify-content: center; gap: 10px; }
.app-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 127px;
    padding: 9px 12px;
    border: 1px solid var(--login-line);
    border-radius: 6px;
    color: #29465f;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: border-color .18s ease, color .18s ease, background-color .18s ease;
}
.app-links a:hover { border-color: #8cb5cf; color: var(--login-navy); background: #f2f8fb; }
.app-links a svg { flex: none; width: 17px; height: 17px; }
.app-links a span { margin-left: 1px; }
.login-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 9px 15px;
    margin-top: 26px;
    padding-top: 17px;
    border-top: 1px solid #edf1f4;
    color: #8494a3;
    font-size: 11px;
}
.login-footer a { color: var(--login-blue); text-decoration: none; font-weight: 600; }
.login-footer a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid #228ac6;
    outline-offset: 3px;
}

@media (min-width: 900px) {
    .login-shell { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(420px, .94fr); }
    .login-brand-panel {
        position: relative;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: hidden;
        padding: clamp(30px, 4vw, 58px);
        color: #fff;
        background: radial-gradient(circle at 92% 8%, rgba(39, 124, 177, .5), transparent 32%),
            radial-gradient(circle at 0% 100%, rgba(19, 91, 146, .75), transparent 47%), var(--login-navy-deep);
    }
    .login-brand-panel::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        opacity: .27;
        background-image: repeating-linear-gradient(120deg, transparent 0 81px, rgba(255,255,255,.075) 82px, transparent 83px);
    }
    .brand-orbit {
        position: absolute;
        width: 480px;
        height: 480px;
        right: -225px;
        top: 10%;
        border: 1px solid rgba(179, 220, 244, .18);
        border-radius: 50%;
        box-shadow: 0 0 0 72px rgba(179,220,244,.035), 0 0 0 145px rgba(179,220,244,.025);
        pointer-events: none;
    }
    .brand-head, .brand-content, .brand-foot { position: relative; z-index: 1; }
    .brand-head { display: flex; align-items: center; gap: 14px; }
    .brand-head strong { font-size: 20px; }
    .brand-head span { color: #b9d2e5; }
    .brand-content { width: min(100%, 590px); margin: auto 0; padding: 40px 0; }
    .brand-eyebrow {
        display: inline-block;
        margin: 0 0 23px;
        padding: 8px 12px;
        border: 1px solid rgba(200, 228, 246, .27);
        border-radius: 5px;
        color: #d2e8f7;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
    .brand-content h1 {
        max-width: 610px;
        margin: 0;
        font-size: clamp(38px, 3.7vw, 58px);
        line-height: 1.08;
        letter-spacing: -.05em;
        text-wrap: balance;
    }
    .brand-description {
        max-width: 500px;
        margin: 22px 0 0;
        color: #c5dceb;
        font-size: 16px;
        line-height: 1.65;
    }
    .journey {
        position: relative;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
        max-width: 500px;
        margin-top: 55px;
    }
    .journey-line {
        position: absolute;
        top: 17px;
        left: 16px;
        right: 16px;
        height: 1px;
        overflow: hidden;
        background: rgba(205, 231, 245, .3);
    }
    .journey-line::after {
        content: "";
        position: absolute;
        left: -30%;
        width: 30%;
        height: 100%;
        background: linear-gradient(90deg, transparent, #d8eefb, transparent);
        animation: journey-travel 5s linear infinite;
    }
    .journey-step { position: relative; display: grid; gap: 13px; color: #d5e9f5; font-size: 12px; font-weight: 600; }
    .journey-number {
        display: grid;
        place-items: center;
        width: 35px;
        height: 35px;
        border: 1px solid rgba(207,233,248,.42);
        border-radius: 50%;
        background: #154f7e;
        color: #fff;
        font-size: 11px;
        font-variant-numeric: tabular-nums;
        box-shadow: 0 0 0 5px rgba(15, 66, 108, .65);
    }
    .brand-foot { margin: 0; color: #a8c8de; font-size: 12px; }
    .login-form-panel { padding: 40px 26px; }
    .login-card { padding: 38px 42px 34px; }
    .login-mobile-brand { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
    .brand-orbit { animation: orbit-breathe 11s ease-in-out infinite; }
    .brand-head, .brand-content { animation: login-arrive .55s ease-out both; }
    .brand-content { animation-delay: .08s; }
    .journey-step { animation: login-arrive .45s ease-out both; }
    .journey-step:nth-of-type(2) { animation-delay: .22s; }
    .journey-step:nth-of-type(3) { animation-delay: .33s; }
    .journey-step:nth-of-type(4) { animation-delay: .44s; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@keyframes login-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes orbit-breathe { 50% { transform: scale(1.06); opacity: .6; } }
@keyframes journey-travel { to { transform: translateX(550%); } }
@keyframes login-spin { to { transform: rotate(360deg); } }

@media (max-width: 420px) {
    .login-form-panel { padding: 12px; }
    .login-card { padding: 22px 18px; }
    .login-footer { flex-direction: column; }
    .captcha-image { flex-basis: 168px; }
}

@media (max-width: 360px) {
    .captcha-row { flex-wrap: wrap; }
    .captcha-image, .captcha-row > input { flex-basis: 100%; }
}
