/* =====================================================
   LOGIN — split screen, foto armada, animasi masuk
===================================================== */

:root {
    --login-navy: #0a1f44;
    --login-navy-deep: #061530;
    --login-blue: #0f3e91;
    --login-accent: #3b82f6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    background: #f1f5f9;
}

.login-wrap {
    display: grid;
    grid-template-columns: 1.15fr 1fr;

    min-height: 100vh;
}

/* =====================================================
   PANEL KIRI
===================================================== */

.login-visual {
    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 40px 44px;

    overflow: hidden;

    background: var(--login-navy-deep);

    /* animasi masuk */
    animation: visualIn .8s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes visualIn {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* foto bus sebagai latar */
.visual-photo {
    position: absolute;
    inset: 0;

    background-image: url('../images/bus-login.jpg');
    background-size: cover;
    background-position: 62% 58%;

    /* loop halus: napas pelan */
    animation: slowZoom 28s ease-in-out infinite alternate;
}

@keyframes slowZoom {
    from { transform: scale(1) translate3d(0, 0, 0); }
    to   { transform: scale(1.09) translate3d(-1.2%, -1%, 0); }
}

/* lapisan biru + putih blur */
.visual-veil {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(to top, rgba(6, 21, 48, .93) 0%, rgba(10, 31, 68, .62) 42%, rgba(15, 62, 145, .34) 100%),
        linear-gradient(to right, rgba(6, 21, 48, .3), transparent 40%);

    backdrop-filter: saturate(115%);
    -webkit-backdrop-filter: saturate(115%);
}

/* orb mengapung, loop lembut */
.visual-orb {
    position: absolute;

    border-radius: 50%;
    pointer-events: none;

    background: radial-gradient(circle at 32% 32%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 68%);

    filter: blur(1px);
    opacity: .35;
}

.orb-a {
    top: 12%;
    left: 8%;

    width: 190px;
    height: 190px;

    animation: floatA 17s ease-in-out infinite;
}

.orb-b {
    top: 58%;
    right: 6%;

    width: 280px;
    height: 280px;

    opacity: .22;

    animation: floatB 23s ease-in-out infinite;
}

.orb-c {
    bottom: 8%;
    left: 34%;

    width: 130px;
    height: 130px;

    opacity: .18;

    animation: floatA 20s ease-in-out infinite reverse;
}

@keyframes floatA {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(14px, -22px, 0) scale(1.06); }
}

@keyframes floatB {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(-20px, 18px, 0) scale(1.08); }
}

/* scrim kiri: jaga teks tetap terbaca di atas foto terang */
.login-visual::after {
    content: '';

    position: absolute;
    inset: 0;
    z-index: 1;

    background: linear-gradient(100deg, rgba(6, 21, 48, .82) 0%, rgba(6, 21, 48, .45) 45%, rgba(6, 21, 48, .12) 78%);

    pointer-events: none;
}

/* isi panel kiri */
.visual-content {
    position: relative;
    z-index: 2;

    margin-top: auto;
    margin-bottom: auto;

    max-width: 460px;
}

.visual-brand {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 34px;

    animation: riseIn .7s cubic-bezier(.22, 1, .36, 1) .15s both;
}

.visual-mark {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 11px;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    color: #fff;
    font-size: 19px;
}

.visual-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.visual-brand-copy strong {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.visual-brand-copy small {
    color: rgba(255, 255, 255, .6);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.visual-title {
    margin: 0 0 16px;

    color: #fff;
    font-size: clamp(28px, 3.1vw, 40px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.8px;

    animation: riseIn .7s cubic-bezier(.22, 1, .36, 1) .25s both;
}

.visual-title span {
    color: rgba(255, 255, 255, .82);
}

.visual-sub {
    margin: 0 0 28px;

    max-width: 380px;

    color: rgba(255, 255, 255, .88);
    font-size: 13.5px;
    line-height: 1.65;

    animation: riseIn .7s cubic-bezier(.22, 1, .36, 1) .35s both;
}

.visual-points {
    display: flex;
    flex-direction: column;
    gap: 10px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.visual-points li {
    display: flex;
    align-items: center;
    gap: 9px;

    color: rgba(255, 255, 255, .92);
    font-size: 12.5px;
    font-weight: 500;

    animation: riseIn .6s cubic-bezier(.22, 1, .36, 1) both;
}

.visual-points li:nth-child(1) { animation-delay: .45s; }
.visual-points li:nth-child(2) { animation-delay: .53s; }
.visual-points li:nth-child(3) { animation-delay: .61s; }

.visual-points i {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 19px;
    height: 19px;

    background: rgba(59, 130, 246, .28);
    border-radius: 50%;

    color: #93c5fd;
    font-size: 10px;
}

.visual-foot {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    gap: 7px;

    margin-top: 40px;

    color: rgba(255, 255, 255, .45);
    font-size: 11px;
    font-weight: 600;

    animation: riseIn .7s cubic-bezier(.22, 1, .36, 1) .7s both;
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   PANEL KANAN
===================================================== */

.login-panel {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;

    padding: 40px 24px;

    background:
        radial-gradient(circle at 82% 10%, rgba(15, 62, 145, .09), transparent 46%),
        radial-gradient(circle at 8% 92%, rgba(59, 130, 246, .09), transparent 44%),
        #f4f7fb;
}

/* garis halus vertikal supaya panel tidak terasa kosong */
.login-panel::before {
    content: '';

    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(rgba(15, 62, 145, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 62, 145, .04) 1px, transparent 1px);

    background-size: 46px 46px;

    mask-image: radial-gradient(ellipse at center, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 78%);

    pointer-events: none;
}

/* ---------- strip status di atas kartu ---------- */

.login-strip {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    gap: 14px;

    width: 100%;
    max-width: 384px;

    padding: 10px 14px;

    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 12px;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    animation: riseIn .7s cubic-bezier(.22, 1, .36, 1) .1s both;
}

.strip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.strip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;

    width: 26px;
    height: 26px;

    border-radius: 7px;

    font-size: 12px;
}

.strip-icon-bus { background: #e0edff; color: #1d4ed8; }
.strip-icon-gear { background: #e7f7ee; color: #15803d; }
.strip-icon-hist { background: #fef3e2; color: #b45309; }

.strip-copy {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.strip-copy strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.15;

    font-variant-numeric: tabular-nums;
}

.strip-copy small {
    color: #64748b;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .3px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.strip-sep {
    flex: 0 0 1px;

    width: 1px;
    height: 24px;

    background: #e2e8f0;
}

.login-card {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 384px;

    padding: 30px 28px 26px;

    background: #fff;
    border: 1px solid #e8eef6;
    border-radius: 16px;

    box-shadow:
        0 1px 2px rgba(15, 23, 42, .04),
        0 18px 44px -24px rgba(15, 62, 145, .28);

    animation: riseIn .7s cubic-bezier(.22, 1, .36, 1) .2s both;
}

.card-head {
    margin-bottom: 26px;
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    margin-bottom: 18px;

    background: var(--login-blue);
    border-radius: 12px;

    color: #fff;
    font-size: 20px;

    box-shadow: 0 8px 20px -6px rgba(15, 62, 145, .5);

    animation: iconPop .6s cubic-bezier(.34, 1.56, .64, 1) .35s both;
}

@keyframes iconPop {
    from { opacity: 0; transform: scale(.7) rotate(-8deg); }
    to   { opacity: 1; transform: scale(1) rotate(0); }
}

.card-head h1 {
    margin: 0 0 6px;

    color: #0f172a;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.card-head p {
    margin: 0;

    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

/* ---------- alert ---------- */

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    margin-bottom: 18px;
    padding: 11px 13px;

    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;

    color: #991b1b;
    font-size: 12.5px;
    line-height: 1.5;

    animation: shakeIn .4s ease both;
}

.login-alert i {
    margin-top: 1px;
    font-size: 13px;
}

@keyframes shakeIn {
    0%   { opacity: 0; transform: translateX(-6px); }
    55%  { transform: translateX(4px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* ---------- field ---------- */

.login-field {
    margin-bottom: 16px;

    animation: riseIn .6s cubic-bezier(.22, 1, .36, 1) both;
}

.login-field:nth-of-type(1) { animation-delay: .3s; }
.login-field:nth-of-type(2) { animation-delay: .38s; }

.login-field label {
    display: block;

    margin-bottom: 7px;

    color: #334155;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2px;
}

.login-input {
    position: relative;

    display: flex;
    align-items: center;

    height: 44px;

    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;

    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-input:focus-within {
    border-color: var(--login-blue);
    box-shadow: 0 0 0 4px rgba(15, 62, 145, .1);
}

.login-input > i {
    flex-shrink: 0;

    padding: 0 10px 0 13px;

    color: #94a3b8;
    font-size: 14px;

    transition: color .18s ease;
}

.login-input:focus-within > i {
    color: var(--login-blue);
}

.login-input input {
    flex: 1;
    min-width: 0;
    height: 100%;

    padding: 0 12px 0 0;

    background: none;
    border: none;
    outline: none;

    color: #0f172a;
    font-family: inherit;
    font-size: 13.5px;
}

.login-input input::placeholder {
    color: #aab4c4;
}

.login-eye {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 32px;

    margin-right: 5px;

    background: none;
    border: none;
    border-radius: 7px;

    color: #94a3b8;
    font-size: 14px;

    cursor: pointer;

    transition: color .15s ease, background .15s ease;
}

.login-eye:hover {
    background: #f1f5f9;
    color: var(--login-blue);
}

/* ---------- ingat saya ---------- */

.login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 20px;

    animation: riseIn .6s cubic-bezier(.22, 1, .36, 1) .46s both;
}

.login-check {
    display: flex;
    align-items: center;
    gap: 8px;

    min-height: 28px;
    padding: 4px 2px;
    margin-left: -2px;

    color: #475569;
    font-size: 12.5px;
    font-weight: 500;

    cursor: pointer;
    user-select: none;
}

.login-help {
    padding: 4px 2px;

    background: none;
    border: none;

    color: var(--login-blue);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition: color .15s ease;
}

.login-help:hover {
    color: #1554c0;
    text-decoration: underline;
}

.login-check input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;

    margin: 0;

    accent-color: var(--login-blue);
    cursor: pointer;
}

/* ---------- tombol ---------- */

.login-submit {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 100%;
    height: 46px;

    background: linear-gradient(135deg, var(--login-blue), #1554c0);
    border: none;
    border-radius: 10px;

    color: #fff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .2px;

    cursor: pointer;
    overflow: hidden;

    box-shadow: 0 8px 20px -8px rgba(15, 62, 145, .6);

    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;

    animation: riseIn .6s cubic-bezier(.22, 1, .36, 1) .54s both;
}

/* kilau melintas, loop */
.login-submit::after {
    content: '';

    position: absolute;
    top: 0;
    left: -60%;

    width: 45%;
    height: 100%;

    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .3), transparent);

    transform: skewX(-18deg);

    animation: sheen 4.5s ease-in-out infinite;
}

@keyframes sheen {
    0%, 55%  { left: -60%; }
    85%      { left: 120%; }
    100%     { left: 120%; }
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px -8px rgba(15, 62, 145, .7);
    filter: brightness(1.05);
}

.login-submit:active {
    transform: translateY(0);
}

.login-submit:disabled {
    cursor: wait;
    filter: saturate(.8);
}

.submit-spinner {
    display: none;

    width: 15px;
    height: 15px;

    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;

    animation: spin .7s linear infinite;
}

.login-submit.is-loading .submit-spinner {
    display: block;
}

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

/* ---------- catatan ---------- */

.login-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    margin: 20px 0 0;

    color: #5b6472;
    font-size: 11.5px;
    font-weight: 500;

    animation: riseIn .6s cubic-bezier(.22, 1, .36, 1) .62s both;
}

.login-foot {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;

    margin-top: 22px;

    animation: riseIn .6s cubic-bezier(.22, 1, .36, 1) .7s both;
}

.foot-line {
    width: 46px;
    height: 2px;

    margin-bottom: 6px;

    background: linear-gradient(90deg, transparent, #cbd7e6, transparent);
    border-radius: 2px;
}

.login-copy {
    margin: 0;

    color: #5b6472;
    font-size: 11px;
    font-weight: 600;
}

.login-ver {
    display: flex;
    align-items: center;
    gap: 5px;

    margin: 0;

    color: #8a94a6;
    font-size: 10px;
    font-weight: 500;

    font-variant-numeric: tabular-nums;
}

.ver-dot {
    width: 5px;
    height: 5px;

    background: #22c55e;
    border-radius: 50%;

    box-shadow: 0 0 0 3px rgba(34, 197, 94, .16);
}

/* =====================================================
   RESPONSIF
===================================================== */

@media (max-width: 900px) {
    .login-wrap {
        grid-template-columns: 1fr;
    }

    /* panel foto jadi header tipis di atas */
    .login-visual {
        min-height: 168px;

        padding: 24px;
    }

    .visual-content {
        margin: 0;
        max-width: none;
    }

    .visual-brand { margin-bottom: 16px; }
    .visual-title { font-size: 21px; margin-bottom: 0; }

    .visual-sub,
    .visual-points,
    .visual-foot {
        display: none;
    }

    .login-panel {
        padding: 28px 22px 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
