* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: #172033;
    overflow-x: hidden;
    background: #061d36;
}

button,
input {
    font-family: inherit;
}

.login-page {
    min-height: 100vh;
    width: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #061d36;
}

.login-shell {
    position: relative;
    width: min(1536px, 100vw);
    min-height: 100vh;
    display: grid;
    grid-template-columns: 59.3% 40.7%;
    overflow: hidden;
    background: #061d36;
}

/* =========================================================
   LEFT VISUAL
========================================================= */

.login-visual {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #092d51;
}

.visual-image {
    position: absolute;
    inset: 0;
    background-image: url("/images/login-bg-ok.jpg");
    background-size: cover;
    background-position: center;
    transform: scale(1.015);
    animation: slowZoom 18s ease-in-out infinite alternate;
}

.visual-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(3, 25, 49, .04) 0%,
            rgba(3, 25, 49, .02) 55%,
            rgba(3, 25, 49, .25) 100%
        );
    pointer-events: none;
}

.visual-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(3px);
}

.glow-one {
    width: 260px;
    height: 260px;
    left: -120px;
    top: -100px;
    background: rgba(37, 99, 235, .14);
}

.glow-two {
    width: 300px;
    height: 300px;
    right: -170px;
    bottom: -160px;
    background: rgba(14, 165, 233, .10);
}

/* =========================================================
   RIGHT PANEL
========================================================= */

.login-panel {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 42px;
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(37, 99, 235, .07),
            transparent 28%
        ),
        #ffffff;
}

.login-card {
    width: 100%;
    max-width: 520px;
    animation: panelAppear .75s ease-out both;
}

.login-header {
    margin-bottom: 38px;
}

.login-header h1 {
    margin: 0 0 13px;
    color: #10264a;
    font-size: clamp(27px, 2vw, 34px);
    font-weight: 800;
    letter-spacing: -.8px;
    line-height: 1.2;
}

.wave {
    display: inline-block;
    transform-origin: 70% 70%;
    animation: wave 2.3s infinite;
}

.login-header p {
    margin: 0;
    max-width: 430px;
    color: #64748b;
    font-size: 16px;
    line-height: 1.7;
}

/* =========================================================
   FORM
========================================================= */

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #13264b;
    font-size: 15px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    z-index: 2;
    left: 21px;
    top: 50%;
    transform: translateY(-50%);
    color: #8b9ab5;
    font-size: 20px;
    pointer-events: none;
    transition: color .2s ease;
}

.form-input {
    width: 100%;
    height: 64px;
    padding: 0 58px;
    border: 1.5px solid #d7dfec;
    border-radius: 13px;
    outline: none;
    background: #fff;
    color: #16284d;
    font-size: 16px;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.form-input::placeholder {
    color: #8a97b0;
}

.form-input:hover {
    border-color: #bdc9db;
}

.form-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}

.input-wrapper:focus-within .input-icon {
    color: #2563eb;
}

.password-toggle {
    position: absolute;
    z-index: 3;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #8b9ab5;
    cursor: pointer;
    font-size: 19px;
    transition: .2s ease;
}

.password-toggle:hover {
    background: #eff6ff;
    color: #2563eb;
}

/* =========================================================
   OPTIONS
========================================================= */

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 3px 0 28px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
    user-select: none;
}

.remember input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox {
    width: 21px;
    height: 21px;
    border: 1.5px solid #9aabc3;
    border-radius: 5px;
    background: #fff;
    position: relative;
    transition: .2s ease;
}

.remember input:checked + .checkbox {
    background: #2563eb;
    border-color: #2563eb;
}

.remember input:checked + .checkbox::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 3px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: #165dff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* =========================================================
   LOGIN BUTTON
========================================================= */

.login-button {
    width: 100%;
    height: 66px;
    border: 0;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: linear-gradient(135deg, #1457ff, #0f45d8);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow:
        0 12px 25px rgba(22, 86, 255, .22);
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.login-button i {
    transition: transform .2s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 17px 32px rgba(22, 86, 255, .30);
}

.login-button:hover i {
    transform: translateX(5px);
}

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

.login-button.loading {
    pointer-events: none;
    opacity: .85;
}

.login-button.loading span {
    font-size: 0;
}

.login-button.loading span::after {
    content: "Memproses...";
    font-size: 16px;
}

.login-button.loading i {
    display: none;
}

/* =========================================================
   FOOTER
========================================================= */

.login-footer {
    margin-top: 42px;
    text-align: center;
}

.footer-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    color: #8a96ad;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.3px;
}

.footer-heading span {
    width: 28px;
    height: 1px;
    background: #ccd6e5;
}

.login-footer p {
    margin: 12px 0 4px;
    color: #8c99b0;
    font-size: 13px;
}

.login-footer small {
    color: #9ca8bc;
    font-size: 12px;
}

/* =========================================================
   MOBILE BRAND
========================================================= */

.mobile-brand {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.mobile-brand img {
    width: 52px;
    height: 62px;
    object-fit: contain;
}

.mobile-brand div {
    display: flex;
    flex-direction: column;
}

.mobile-brand span {
    color: #66748d;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .6px;
}

.mobile-brand strong {
    color: #10264a;
    font-size: 18px;
    letter-spacing: 1px;
}

/* =========================================================
   VALIDATION
========================================================= */

.validation-summary {
    margin-bottom: 18px;
    color: #dc2626;
    font-size: 13px;
}

.validation-summary:empty {
    display: none;
}

/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes slowZoom {
    from {
        transform: scale(1.015);
    }

    to {
        transform: scale(1.06);
    }
}

@keyframes panelAppear {
    from {
        opacity: 0;
        transform: translateX(22px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wave {
    0%, 60%, 100% {
        transform: rotate(0deg);
    }

    70% {
        transform: rotate(12deg);
    }

    80% {
        transform: rotate(-8deg);
    }

    90% {
        transform: rotate(10deg);
    }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1050px) {
    .login-shell {
        grid-template-columns: 56% 44%;
    }

    .login-panel {
        padding: 35px 30px;
    }

    .login-card {
        max-width: 440px;
    }
}

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

    .login-visual {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 35px 25px;
    }

    .mobile-brand {
        display: flex;
    }

    .login-card {
        max-width: 500px;
    }
}

@media (max-width: 480px) {
    .login-panel {
        padding: 28px 20px;
    }

    .login-header {
        margin-bottom: 30px;
    }

    .login-header h1 {
        font-size: 26px;
    }

    .login-header p {
        font-size: 14px;
    }

    .form-input {
        height: 58px;
        font-size: 14px;
    }

    .login-button {
        height: 60px;
        font-size: 16px;
    }

    .login-options {
        align-items: flex-start;
    }

    .forgot-password {
        white-space: nowrap;
    }
}

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