/* ****************************************************** */
/* PERBAIKAN PENTING: Box Sizing untuk mengatasi Overflow */
/* ****************************************************** */
*, ::before, ::after {
    box-sizing: border-box;
}

/* --- 1. RESET DAN TAMPILAN DASAR --- */
body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
    margin: 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); 
    position: relative;
    overflow: hidden; 
}

/* --- Latar Belakang Keren (Background Pattern) --- */
.background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
    z-index: 0;
}


/* --- 2. CONTAINER UTAMA (Efek Glassmorphism) --- */
.login-container {
    /* PERBAIKAN 1: Padding dikurangi agar lebih ringkas */
    padding: 25px 25px; 
    background: rgba(255, 255, 255, 0.15); 
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2); /* Perbaikan box-shadow */
    width: 100%;
    /* PERBAIKAN 2: Max-width disetel ke 300px agar proporsional */
    max-width: 300px; 
    z-index: 5;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 3. JUDUL DAN TEKS --- */
.form-title {
    color: white;
    text-align: center;
    margin-bottom: 5px;
    /* PERBAIKAN 3: Ukuran Font dikurangi agar proporsional */
    font-size: 2em; 
    font-weight: 700;
}

.form-title i {
    color: #ffd700; 
    margin-right: 10px;
}

.form-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    /* Margin bawah dikurangi agar lebih rapat */
    margin-bottom: 25px; 
    font-size: 0.85em; /* Font dikurangi sedikit */
}

/* --- 4. INPUT FIELD --- */
.input-group {
    position: relative;
    /* Margin bawah dikurangi agar lebih rapat */
    margin-bottom: 15px; 
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    /* Ukuran Icon dikurangi agar proporsional */
    font-size: 1em; 
    pointer-events: none;
}

/* Styling utama untuk Input dan Select */
.input-group input,
.input-group .select-field {
    width: 100%;
    /* Padding input dikurangi */
    padding: 10px 10px 10px 40px; 
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1); 
    /* Ukuran font input dikurangi */
    font-size: 0.9em; 
    color: white; 
    outline: none;
    transition: background 0.3s, border-color 0.3s;
    appearance: none; 
    -webkit-appearance: none; 
}

/* Placeholder color */
.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Styling fokus */
.input-group input:focus,
.input-group .select-field:focus {
    border-color: #ffd700; 
    background: rgba(255, 255, 255, 0.2);
}

/* Styling untuk SELECT (Level Pengguna) */
.input-group .select-field {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 15px;
}

/* Menyamakan warna teks placeholder select */
.input-group .select-field:required:invalid {
    color: rgba(255, 255, 255, 0.6); 
}
.input-group .select-field option {
    color: #000; 
    background: #2a5298; 
}
.input-group .select-field option:disabled {
    color: #aaa; 
}


/* --- 5. TOMBOL LOGIN --- */
.login-button {
    width: 100%;
    /* Padding tombol dikurangi */
    padding: 12px; 
    border: none;
    border-radius: 8px;
    background-color: #ffd700; 
    color: #1e3c72; 
    /* Font tombol dikurangi */
    font-size: 1em; 
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.login-button i {
    margin-right: 8px;
    font-size: 1.1em;
}

.login-button:hover {
    background-color: #ffc107; 
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    transform: translateY(-2px);
}

.login-button:active {
    background-color: #e0ac00;
    transform: translateY(0);
}

/* --- 6. FOOTER RESMI PEMERINTAH --- */
.app-footer {
    position: fixed; 
    bottom: 0;
    width: 100%;
    padding: 10px 0; /* Padding footer dikurangi */
    background: rgba(0, 0, 0, 0.3); 
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: 0.7em; /* Font footer dikurangi */
    z-index: 20;
}

.app-footer p {
    margin: 3px 0;
}

/* ****************************************************** */
/* 7. MEDIA QUERIES (RESPONSIVE FIX) */
/* Mengoptimalkan tampilan untuk perangkat mobile */
/* ****************************************************** */

@media (max-width: 500px) {
    /* Menyesuaikan Container Utama */
    .login-container {
        /* Mengurangi padding horizontal agar ada ruang di sisi kiri/kanan layar HP */
        padding: 20px; 
        /* Memperkecil lebar maksimum agar tidak terlalu memenuhi layar HP */
        max-width: 100%; 
        /* Memastikan margin atas/bawah cukup agar tidak menempel */
        margin-top: 50px; 
        margin-bottom: 50px;
    }

    /* Menyesuaikan Judul */
    .form-title {
        /* Mengurangi ukuran font agar tidak meluber */
        font-size: 1.8em; 
    }

    /* Mengurangi margin bawah subtitle */
    .form-subtitle {
        margin-bottom: 20px;
    }

    /* Mengurangi ukuran font input agar tidak terlalu besar di HP */
    .input-group input,
    .input-group .select-field {
        font-size: 0.9em; 
        padding: 10px 10px 10px 40px; /* Padding input dikurangi */
    }

    .input-icon {
        font-size: 0.9em;
        left: 12px;
    }

    /* Mengurangi ukuran font tombol login */
    .login-button {
        font-size: 8em;
        padding: 10px;
    }

    /* Memastikan Footer tidak menutupi atau terlalu dekat dengan container */
    .app-footer {
        /* Jika container memiliki margin-bottom, footer akan aman di bawah */
        padding: 10px 5px; 
        font-size: 0.65em;
    }

    /* Perbaikan pada BODY untuk memastikan konten terpusat dan tidak terpotong */
    body {
        /* Mengubah min-height menjadi 100vh agar konten bisa discroll jika perlu */
        min-height: 100vh;
        /* Memungkinkan scrolling jika konten terlalu tinggi (misalnya saat keyboard muncul) */
        overflow-y: auto; 
    }
}