
* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    margin: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                url("../assets/logobackground.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/* Container */
.login-container {
    width: 100%;
    max-width: 1000px; /* Dipersempit agar logo & card lebih menyatu */
    display: flex;
    align-items: center;
    justify-content: center; /* Ubah dari space-between ke center */
    gap: 80px; /* Memberikan jarak yang manis di tengah */
    padding: 20px;
    
    /* Agar posisi agak ke bawah sesuai permintaan */
    margin-top: 0;
    transform: translateY(20px);
}

/* LEFT */
.login-left {
    flex: 0 1 auto; /* Jangan paksa mengambil sisa ruang */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 0; /* Hapus padding lama */
}

.login-left .brand {
    text-align: center;
}

.login-left img {
    width: 160px; /* Ukuran tetap */
    margin-bottom: 20px;
}
.login-left h2 {
    font-weight: 600;
    margin: 0;
}

/* RIGHT */
.login-right {
    width: 400px;
    padding: 40px;
    color: #e8f4ff;
    border-radius: 18px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    
    margin-left: 0; /* Hapus margin kiri yang manual */
    
    /* Animasi tetap dipertahankan */
    animation: floatCard 6s ease-in-out infinite;
}

/* FORM GROUP */
.form-group {
    margin-bottom: 18px;
    animation: fadeUp 0.6s ease forwards;
}

.form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) {
    animation-delay: 0.2s;
}

/* LABEL */
.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #e8f4ff;
}

/* INPUT */
.form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: none;
    outline: none;

    background: rgba(255,255,255,0.85);
    font-size: 14px;

    transition:
        box-shadow 0.3s ease,
        transform 0.2s ease;
}

.form-group input:focus {
    box-shadow: 0 0 0 3px rgba(154, 209, 255, 0.35);
    transform: scale(1.01);
}



.btn-login {
    width: 100%;              /* tombol dipanjangkan */
    padding: 14px 0;

    background: linear-gradient(135deg, #9ad1ff, #6fb6f5);
    color: #ffffff;           /* teks putih */
    font-size: 15px;
    font-weight: 600;

    border: none;
    border-radius: 12px;
    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.btn-login:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}


/* LINK */
.forgot {
    display: block;
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    color: #e0f2ff;
    text-decoration: none;
}

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

/* RESPONSIVE */
@media(max-width: 900px) {
    .login-container {
        flex-direction: column;
        gap: 30px;
        margin-top: 0;
        height: auto;
    }

    .login-right {
        width: 90%; /* Card lebar di layar kecil */
        max-width: 400px;
    }
}
/* ALERT LOGIN */
/* ALERT */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert.success {
    background: rgba(40, 167, 69, 0.2);
    color: #c8f7dc;
}

.alert.error {
    background: rgba(220, 53, 69, 0.2);
    color: #ffd6db;
}

.alert ul {
    margin: 0;
    padding-left: 18px;
}

/* PAGE LOADER */
/* PAGE LOAD ANIMATION */
.page-load {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.page-load.active {
    opacity: 1;
    pointer-events: all;
}


@keyframes pageEnter {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ANIMATION LOADER */
/* INTRO LOADER */
#intro-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;

    background:
        linear-gradient(
            rgba(0,0,0,0.55),
            rgba(0,0,0,0.55)
        ),
        url("../assets/logobackground.jpg");

    background-size: cover;
    background-position: center;

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

    /* smooth exit */
    transition: opacity 0.6s ease;
}


.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    color: #fff;

    transform: translateY(-10px); /* optical centering */
    animation: fadeInScale 0.6s ease forwards;
}

.loader-content h2 {
    margin: 18px 0 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.loader-content p {
    font-size: 14px;
    opacity: 0.85;
}

.login-loading {
    position: fixed; /* Mengunci posisi pada layar */
    top: 0;
    left: 0;
    width: 100vw;    /* 100% lebar layar */
    height: 100vh;   /* 100% tinggi layar */
    z-index: 99999;  /* Pastikan angka ini paling besar agar di depan */
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Gunakan background yang agak gelap agar blur lebih terlihat kontras */
    background: rgba(0, 0, 0, 0.4); 
    
    /* Efek Blur Fullscreen */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    /* Transition */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.login-loading.active {
    opacity: 1;
    pointer-events: all;
}
.login-loading.active {
    opacity: 1;
    pointer-events: all;
}

.loading-card {
    background: white;
    padding: 2rem 3rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,.25);
    animation: fadeUp 0.4s ease;
}

.loading-logo {
    width: 60px;
    margin-bottom: 1rem;
}

.loading-card p {
    font-weight: 600;
    color: #4338ca;
    margin-bottom: 1rem;
}

/* Spinner */
.spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #4338ca;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;

    margin: 0 auto;
}
/* SPINNER */
.spinner {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(255,255,255,0.25);
    border-top: 4px solid #9ad1ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}


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

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

