:root {
    color-scheme: light;
    --ink: #12213a;
    --muted: #66758a;
    --line: #dce4ec;
    --blue: #1559b7;
    --blue-dark: #0e458f;
    --focus: rgba(16, 155, 212, .17);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
    margin: 0;
    min-width: 320px;
    background: #f5f8fb;
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid #80b9ff; outline-offset: 3px; }
[hidden] { display: none !important; }

.login-page {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(440px, .95fr);
    min-height: 100vh;
    min-height: 100dvh;
    animation: page-enter .55s ease-out both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.eyebrow-line { display: inline-block; width: 24px; height: 1px; background: currentColor; }

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 34px clamp(34px, 6vw, 112px);
    background: radial-gradient(ellipse at 50% 52%, #10bfd40e, transparent 54%), radial-gradient(circle at 100% 0%, #edf6ff, transparent 37%), #f7f9fc;
}
.auth-wrap { width: min(100%, 430px); margin: auto; animation: card-enter .65s .08s ease-out both; }
.auth-eyebrow { color: var(--blue); }
.auth-wrap h2 {
    margin: 18px 0 9px;
    font-size: clamp(35px, 3.1vw, 47px);
    line-height: 1.12;
    letter-spacing: -.055em;
    font-weight: 730;
}
.auth-wrap h2 span { color: #21a1ac; }
.auth-subtitle { margin: 0 0 34px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.login-card {
    padding: 31px;
    border: 1px solid #e2edf5;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 21px 55px rgba(18, 41, 68, .09), 0 2px 8px rgba(18, 41, 68, .03);
}
.form-message {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #f6c9c8;
    border-radius: 12px;
    background: #fff4f3;
    color: #9f3030;
    font-size: 13px;
    line-height: 1.5;
}
.form-message svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.field { margin-bottom: 22px; }
.field-label { display: block; margin-bottom: 9px; color: #273750; font-size: 13px; font-weight: 700; }
.input-wrap { position: relative; }
.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    color: #8291a5;
    pointer-events: none;
    transition: color .22s ease;
}
.input-wrap:focus-within .input-icon { color: var(--blue); }
.input {
    display: block;
    width: 100%;
    height: 54px;
    min-width: 0;
    padding: 0 48px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: 0;
    background: #fbfcfe;
    color: var(--ink);
    font-size: 14px;
    transition: border-color .22s ease, box-shadow .22s ease, background .22s ease;
}
.input::placeholder { color: #9aa7b7; }
.input:hover { border-color: #b9c8d8; }
.input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px var(--focus), inset 0 1px 4px rgba(21,89,183,.045); }
.input[aria-invalid="true"] { border-color: #cc5b58; }
.toggle-password {
    position: absolute;
    right: 7px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #66758a;
}
.toggle-password:hover { background: #edf3f8; color: var(--blue); }
.toggle-password svg { width: 19px; height: 19px; }
.caps-warning { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: #996016; font-size: 12px; }
.caps-warning svg { width: 15px; height: 15px; }
.form-options { display: flex; justify-content: flex-end; margin: -2px 0 25px; }
.text-link { color: var(--blue); font-size: 13px; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    min-height: 54px;
    padding: 12px 20px;
    border: 1px solid #1354ad;
    border-radius: 12px;
    background: linear-gradient(115deg, #1963ca, #1473c3, #087b9f);
    background-size: 200% 100%;
    background-position: 0% 50%;
    color: #fff;
    box-shadow: 0 9px 20px rgba(21, 89, 183, .17);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .13em;
    transition: transform .22s ease, box-shadow .22s ease, background-position .4s ease;
}
.submit-button:hover:not(:disabled) { transform: translateY(-2px); background-position: 100% 50%; box-shadow: 0 13px 23px rgba(21,89,183,.23), 0 0 18px rgba(16,191,212,.15); }
.submit-button:active:not(:disabled) { transform: translateY(0) scale(.985); }
.submit-button:disabled { cursor: wait; opacity: .85; transform: none; }
.submit-arrow { width: 17px; height: 17px; transition: transform .22s ease; }
.submit-button:hover:not(:disabled) .submit-arrow { transform: translateX(3px); }
.submit-button.is-loading .submit-arrow { display: none; }
.submit-button.is-loading::before { content: ""; width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
.register { margin: 23px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.register .text-link { margin-left: 3px; }
.auth-footer { width: min(100%, 430px); margin: 30px auto 0; color: #8492a3; font-size: 11px; line-height: 1.5; text-align: center; }

@keyframes page-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes card-enter { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
    .login-page { display: block; }
    .auth-panel { min-height: 0; justify-content: flex-start; padding: 32px 22px 26px; }
    .auth-wrap { margin: 0 auto; }
    .auth-footer { margin-top: 28px; }
}
@media (max-width: 520px) {
    .auth-panel { padding: 25px 16px 22px; }
    .auth-wrap h2 { margin-top: 12px; font-size: 34px; }
    .auth-subtitle { margin-bottom: 22px; font-size: 14px; }
    .login-card { padding: 22px 18px; border-radius: 20px; }
    .field { margin-bottom: 18px; }
    .form-options { margin-bottom: 20px; }
    .auth-footer { margin-top: 22px; }
}
@media (max-width: 350px) {
    .auth-panel { padding-inline: 12px; }
    .login-card { padding-inline: 14px; }
    .auth-wrap h2 { font-size: 31px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* === LI AURORA ROUTE BOOST START === */

/*
 * Premium aurora/data-current treatment for:
 * Pelajar -> IKTBNBM Hub
 * Pengajar -> IKTBNBM Hub
 * IKTBNBM Hub -> Industri
 */

.hub-routes {
    overflow: visible;
    pointer-events: none;
}

/* Semua layer kekal smooth bila SVG scale */
.hub-routes path {
    fill: none;
    vector-effect: non-scaling-stroke;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =========================================================
   1. AURORA HALO
   Lapisan paling lebar dan berkabus
   ========================================================= */
.hub-routes .route-aurora {
    stroke: #26e8f2;
    stroke-width: 22px;
    opacity: .22;
    filter:
        blur(7px)
        drop-shadow(0 0 13px rgba(39, 231, 242, .72))
        drop-shadow(0 0 28px rgba(0, 186, 255, .42));
    animation: liAuroraBreathe 4.8s ease-in-out infinite;
}

/* =========================================================
   2. OUTER GLOW
   Cahaya lembut sekeliling arus
   ========================================================= */
.hub-routes .route-glow {
    stroke: #39e7f2;
    stroke-width: 11px;
    opacity: .36;
    filter:
        blur(3px)
        drop-shadow(0 0 10px rgba(66, 236, 246, .9))
        drop-shadow(0 0 20px rgba(44, 169, 255, .55));
    animation: liGlowBreathe 3.7s ease-in-out infinite;
}

/* =========================================================
   3. AURORA RIBBON
   Jalur warna utama
   ========================================================= */
.hub-routes .route-ribbon {
    stroke: #58dff3;
    stroke-width: 6px;
    opacity: .62;
    filter:
        drop-shadow(0 0 5px rgba(99, 235, 255, .85))
        drop-shadow(0 0 11px rgba(41, 191, 255, .55));
}

/* =========================================================
   4. BRIGHT CORE
   Teras putih-cyan yang crisp
   ========================================================= */
.hub-routes .route-core {
    stroke: #d9fcff;
    stroke-width: 2.4px;
    opacity: .96;
    filter:
        drop-shadow(0 0 3px #8ff7ff)
        drop-shadow(0 0 7px rgba(61, 225, 255, .9));
}

/* =========================================================
   5. MOVING DATA STREAM
   Segmen cahaya yang bergerak seperti arus
   ========================================================= */
.hub-routes .route-stream {
    stroke: #ffffff;
    stroke-width: 3.4px;
    opacity: .92;
    stroke-dasharray: 9 19;
    stroke-dashoffset: 0;
    filter:
        drop-shadow(0 0 4px #d9ffff)
        drop-shadow(0 0 9px #45e8ff)
        drop-shadow(0 0 16px rgba(35, 176, 255, .72));
    animation: liCurrentFlow 2.35s linear infinite;
}

/* =========================================================
   6. FAST ENERGY PARTICLES
   Titik/denyutan kecil ikut laluan
   ========================================================= */
.hub-routes .route-flow {
    stroke: #9dffff;
    stroke-width: 4.8px;
    opacity: .88;
    stroke-dasharray: 1 15;
    stroke-dashoffset: 0;
    filter:
        drop-shadow(0 0 5px #ffffff)
        drop-shadow(0 0 11px #54f2ff)
        drop-shadow(0 0 18px rgba(0, 183, 255, .8));
    animation: liParticleFlow 1.65s linear infinite;
}

/* =========================================================
   VARIASI WARNA MENGIKUT HUBUNGAN
   Masih satu family warna supaya tidak nampak gaming
   ========================================================= */

.route-student .route-aurora,
.route-student .route-glow,
.route-student .route-ribbon {
    stroke: #28e5d2;
}

.route-student .route-core,
.route-student .route-flow {
    stroke: #d7fff9;
}

.route-teacher .route-aurora,
.route-teacher .route-glow,
.route-teacher .route-ribbon {
    stroke: #55d9ff;
}

.route-teacher .route-core,
.route-teacher .route-flow {
    stroke: #e1f8ff;
}

.route-industry .route-aurora,
.route-industry .route-glow,
.route-industry .route-ribbon {
    stroke: #64baff;
}

.route-industry .route-core,
.route-industry .route-flow {
    stroke: #e1efff;
}

/* =========================================================
   PERBEZAAN TIMING
   Supaya semua arus tidak bergerak serentak
   ========================================================= */

.route-student .route-stream,
.route-student .route-flow {
    animation-delay: -.35s;
}

.route-teacher .route-stream,
.route-teacher .route-flow {
    animation-delay: -.95s;
}

.route-industry .route-stream,
.route-industry .route-flow {
    animation-delay: -1.45s;
}

/* =========================================================
   KEYFRAMES
   ========================================================= */

@keyframes liCurrentFlow {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -100;
    }
}

@keyframes liParticleFlow {
    from {
        stroke-dashoffset: 0;
        opacity: .45;
    }
    45% {
        opacity: 1;
    }
    to {
        stroke-dashoffset: -100;
        opacity: .45;
    }
}

@keyframes liAuroraBreathe {
    0%, 100% {
        opacity: .16;
        stroke-width: 19px;
    }
    50% {
        opacity: .34;
        stroke-width: 25px;
    }
}

@keyframes liGlowBreathe {
    0%, 100% {
        opacity: .28;
    }
    50% {
        opacity: .52;
    }
}

/* =========================================================
   Sedikit energy pada central hub bila network aktif
   ========================================================= */

.lihub-card,
.hub-card,
.digital-hub {
    transition:
        box-shadow .6s ease,
        border-color .6s ease;
}

/* Tablet: kurangkan bloom supaya performance ringan */
@media (max-width: 1100px) {
    .hub-routes .route-aurora {
        stroke-width: 17px;
        filter:
            blur(6px)
            drop-shadow(0 0 10px rgba(39, 231, 242, .58));
    }

    .hub-routes .route-glow {
        stroke-width: 9px;
    }

    .hub-routes .route-ribbon {
        stroke-width: 5px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .hub-routes .route-aurora,
    .hub-routes .route-glow,
    .hub-routes .route-stream,
    .hub-routes .route-flow {
        animation: none !important;
    }

    .hub-routes .route-stream {
        stroke-dasharray: none;
        opacity: .6;
    }

    .hub-routes .route-flow {
        display: none;
    }
}

/* === LI AURORA ROUTE BOOST END === */

/* === IKTBNBM RIGHT LOGO POSITION START === */

/* Logo rasmi IKTBNBM pada panel login kanan */
.iktbnbm-right-logo {
    display: block !important;

    /* Pastikan tidak lagi melekat di penjuru kanan */
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    inset: auto !important;
    transform: none !important;

    /* Kecilkan dan center */
    width: clamp(135px, 11vw, 175px) !important;
    max-width: 38% !important;
    height: auto !important;

    margin:
        clamp(18px, 2.2vh, 28px)
        auto
        clamp(28px, 3.5vh, 42px)
        !important;

    object-fit: contain;
    object-position: center;

    /* Kekalkan imej tajam */
    image-rendering: auto;
}

/* Skrin sederhana */
@media (max-width: 1366px) {
    .iktbnbm-right-logo {
        width: clamp(125px, 12vw, 160px) !important;
        margin-bottom: 28px !important;
    }
}

/* Tablet / mobile */
@media (max-width: 768px) {
    .iktbnbm-right-logo {
        width: 125px !important;
        max-width: 48% !important;
        margin: 14px auto 22px !important;
    }
}

/* === IKTBNBM RIGHT LOGO POSITION END === */

/* === LOGIN BUTTON COLOR TUNE START === */

#submitButton,
.login-button,
button[type="submit"] {
    background: linear-gradient(90deg, #156CF7 0%, #1E7BFF 38%, #16CFF3 100%) !important;
    color: #ffffff !important;
    box-shadow:
        0 10px 24px rgba(21, 108, 247, 0.22),
        0 4px 10px rgba(22, 207, 243, 0.16) !important;
    border: none !important;
}

#submitButton:hover,
.login-button:hover,
button[type="submit"]:hover {
    background: linear-gradient(90deg, #0F63EA 0%, #1A78FF 40%, #22D9F7 100%) !important;
    box-shadow:
        0 14px 30px rgba(21, 108, 247, 0.28),
        0 6px 14px rgba(22, 207, 243, 0.22) !important;
    transform: translateY(-1px);
}

#submitButton:active,
.login-button:active,
button[type="submit"]:active {
    transform: translateY(0) scale(.985);
}

#submitButton .arrow,
.login-button .arrow,
button[type="submit"] .arrow {
    color: #FF7A24 !important;
}

/* === LOGIN BUTTON COLOR TUNE END === */

