:root {
    --primary: #080c73;
    --primary-light: #1722c5;
    --orange: #ffad00;
    --orange-dark: #ff7a00;
    --text: #11182c;
    --muted: #778096;
    --border: #e7eaf2;
    --surface: #ffffff;
    --page: #f4f6fb;
    --danger: #dc334b;
    --shadow: 0 25px 80px rgba(16, 24, 64, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--page);
    font-family: "Inter", Arial, sans-serif;
    transition: color 0.25s ease, background 0.25s ease;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(430px, 44%) minmax(0, 1fr);
}

/* VISUAL KIRI */
.login-visual {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 48px clamp(36px, 5vw, 82px);
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 82%, rgba(255, 174, 0, 0.23), transparent 27%),
        linear-gradient(145deg, #060a5d 0%, #1018a3 50%, #1724d6 100%);
}

.login-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, transparent 56%, rgba(255, 255, 255, 0.06));
    pointer-events: none;
}

.brand {
    position: relative;
    z-index: 2;
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    text-decoration: none;
}

.brand-image {
    display: block;
    width: 255px;
    height: auto;
    object-fit: contain;
}

.mobile-logo-box {
    overflow: hidden;
    border-radius: 14px;
    background: #101176;
}

.brand-image-mobile {
    width: 220px;
}

.brand-logo {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(145deg, var(--orange), var(--orange-dark));
    box-shadow: 0 12px 25px rgba(255, 145, 0, 0.3);
    font-size: 24px;
    font-weight: 900;
}

.brand-text strong,
.brand-text small {
    display: block;
}

.brand-text strong {
    font-size: 19px;
    letter-spacing: -0.7px;
}

.brand-text strong span {
    color: var(--orange);
}

.brand-text small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 7px;
    letter-spacing: 0.45px;
}

.brand-light {
    color: #ffffff;
}

.brand-light .brand-text small {
    color: rgba(255, 255, 255, 0.65);
}

.visual-content {
    position: relative;
    z-index: 2;
    max-width: 590px;
    margin: auto 0;
}

.visual-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #ffd368;
    background: rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.visual-content h1 {
    max-width: 570px;
    margin: 23px 0 20px;
    font-size: clamp(40px, 4.4vw, 66px);
    line-height: 1.04;
    letter-spacing: -3px;
}

.visual-content > p {
    max-width: 520px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    line-height: 1.75;
}

.visual-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 25px;
}

.visual-features span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 10px;
    font-weight: 600;
}

.visual-features i {
    color: #ffcb3d;
}

.visual-statistics {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.visual-statistics article {
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(8px);
}

.visual-statistics strong,
.visual-statistics span {
    display: block;
}

.visual-statistics strong {
    font-size: 19px;
}

.visual-statistics span {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.63);
    font-size: 9px;
}

.visual-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}

.circle-one {
    width: 315px;
    height: 315px;
    top: 15%;
    right: -105px;
}

.circle-two {
    width: 175px;
    height: 175px;
    left: -70px;
    bottom: 18%;
}

.visual-grid {
    position: absolute;
    width: 230px;
    height: 230px;
    right: 7%;
    bottom: 12%;
    opacity: 0.14;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, transparent, #000);
}

/* FORM KANAN */
.login-form-section {
    position: relative;
    min-width: 0;
    display: grid;
    place-items: center;
    padding: 50px clamp(28px, 7vw, 120px);
    background: var(--surface);
}

.login-card {
    position: relative;
    width: min(100%, 455px);
}

.mobile-header {
    display: none;
    margin-bottom: 38px;
}

.theme-button {
    position: fixed;
    z-index: 10;
    top: 22px;
    right: 25px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    background: var(--surface);
    cursor: pointer;
    transition: 0.2s ease;
}

.theme-button:hover {
    color: var(--primary-light);
    border-color: rgba(23, 34, 197, 0.35);
    transform: translateY(-2px);
}

.login-heading {
    margin-bottom: 25px;
}

.heading-label {
    color: var(--orange-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.login-heading h2 {
    margin: 9px 0;
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -1.2px;
}

.login-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.demo-notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 19px;
    padding: 11px 13px;
    border: 1px solid #dfe5ff;
    border-radius: 11px;
    color: #384586;
    background: #f2f5ff;
    font-size: 9px;
    line-height: 1.5;
}

.demo-notice i {
    margin-top: 1px;
    color: var(--primary-light);
}

.login-form {
    display: grid;
    gap: 17px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.field-label {
    font-size: 11px;
    font-weight: 750;
}

.input-wrapper {
    height: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: rgba(23, 34, 197, 0.55);
    box-shadow: 0 0 0 4px rgba(23, 34, 197, 0.08);
}

.input-wrapper > i {
    width: 17px;
    flex: 0 0 auto;
    color: #939bad;
    text-align: center;
    font-size: 13px;
}

.input-wrapper input {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-size: 11px;
}

.input-wrapper input::placeholder {
    color: #a6adbc;
}

.input-wrapper.has-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(220, 51, 75, 0.07);
}

.password-button {
    flex: 0 0 auto;
    padding: 5px;
    border: 0;
    color: #8a92a4;
    background: transparent;
    cursor: pointer;
}

.field-message {
    min-height: 0;
    color: var(--danger);
    font-size: 9px;
}

.field-message:not(:empty) {
    min-height: 12px;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    font-size: 10px;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    cursor: pointer;
}

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

.custom-checkbox {
    width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: transparent;
    background: var(--surface);
    font-size: 8px;
}

.remember-option input:checked + .custom-checkbox {
    color: #ffffff;
    border-color: var(--primary-light);
    background: var(--primary-light);
}

.forgot-button {
    display: inline-flex;
    align-items: center;
    padding: 4px 0;
    border: 0;
    color: var(--primary-light);
    background: transparent;
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
    text-decoration: none;
}

.forgot-button:hover {
    color: var(--orange-dark);
    text-decoration: underline;
}

.login-button,
.register-button {
    width: 100%;
    height: 51px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.login-button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 14px 25px rgba(8, 12, 115, 0.2);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(8, 12, 115, 0.27);
}

.register-button {
    border: 1px solid var(--border);
    color: var(--text);
    background: var(--surface);
    text-decoration: none;
}

.register-button:hover {
    color: var(--primary-light);
    border-color: rgba(23, 34, 197, 0.45);
    transform: translateY(-2px);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 21px 0;
    color: var(--muted);
    font-size: 9px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--border);
}

.security-text {
    margin: 20px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 8px;
}

.security-text i {
    margin-right: 5px;
    color: #159447;
}

.login-toast {
    position: fixed;
    z-index: 50;
    right: 24px;
    bottom: 24px;
    max-width: min(360px, calc(100vw - 30px));
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    background: var(--surface);
    box-shadow: var(--shadow);
    font-size: 10px;
    font-weight: 650;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: 0.25s ease;
}

.login-toast i {
    color: var(--orange-dark);
}

.login-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* DARK MODE */
body.dark-mode {
    --text: #f3f5fb;
    --muted: #9ca5b8;
    --border: #2a3042;
    --surface: #131724;
    --page: #0d101a;
}

body.dark-mode .demo-notice {
    color: #b7c0ff;
    border-color: #29316a;
    background: #181d3b;
}

/* TABLET */
@media (max-width: 1050px) {
    .login-page {
        grid-template-columns: minmax(320px, 38%) minmax(0, 1fr);
    }

    .login-visual {
        padding: 38px 30px;
    }

    .brand-image {
        width: 225px;
    }

    .visual-content h1 {
        font-size: 40px;
        letter-spacing: -2px;
    }

    .visual-statistics {
        grid-template-columns: 1fr;
    }

    .visual-statistics article:nth-child(n + 2) {
        display: none;
    }

    .visual-features {
        display: grid;
    }
}

/* TABLET KECIL DAN MOBILE */
@media (max-width: 800px) {
    .login-page {
        display: block;
    }

    .login-visual {
        display: none;
    }

    .login-form-section {
        min-height: 100vh;
        padding: 58px 25px;
    }

    .mobile-header {
        display: block;
    }

    .theme-button {
        position: absolute;
        top: 0;
        right: 0;
    }
}

@media (max-width: 560px) {
    .login-form-section {
        align-items: start;
        padding: 25px 18px 35px;
    }

    .login-card {
        padding-top: 18px;
    }

    .mobile-header {
        margin-bottom: 44px;
    }

    .brand-image-mobile {
        width: 200px;
    }

    .theme-button {
        top: 17px;
    }

    .login-heading h2 {
        font-size: 27px;
    }

    .input-wrapper {
        height: 48px;
    }

    .login-button,
    .register-button {
        height: 49px;
    }

    .login-toast {
        right: 14px;
        bottom: 14px;
        left: 14px;
        max-width: none;
    }
}

@media (max-width: 365px) {
    .login-form-section {
        padding-right: 13px;
        padding-left: 13px;
    }

    .form-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .brand-image-mobile {
        width: 180px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
}

.server-error {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 16px;
    padding: 11px 12px;
    border: 1px solid rgba(220, 38, 38, .18);
    border-radius: 11px;
    background: rgba(254, 226, 226, .72);
    color: #b42318;
    font-size: 11px;
    line-height: 1.45;
}

.dark-mode .server-error {
    border-color: rgba(248, 113, 113, .25);
    background: rgba(127, 29, 29, .28);
    color: #fecaca;
}

.server-info {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 16px;
    padding: 11px 12px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 11px;
    background: rgba(219, 234, 254, .72);
    color: #1d4ed8;
    font-size: 11px;
    line-height: 1.45;
}

.dark-mode .server-info {
    border-color: rgba(147, 197, 253, .25);
    background: rgba(30, 64, 175, .28);
    color: #bfdbfe;
}

.login-form.is-submitting .login-button {
    opacity: .7;
    pointer-events: none;
}

.login-form.is-submitting .register-button {
    opacity: .7;
    pointer-events: none;
}
