@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Warna yang lebih dipertajam */
    --primary-color: #7952b3; /* Ungu terang/terong yang lebih pekat */
    --dark-blue: #1b0f38; /* Ungu gelap yang sangat pekat */
    --darkest-blue: #0f071a; /* Ungu tergelap (hampir hitam) */
    --text-light: #f0f0f0;
    --text-muted: #ccc;
    --error-bg: #f8d7da;
    --error-color: #721c24;
}

* { 
    box-sizing: border-box; 
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: opacity 0.5s ease;
    
    /* Efek Blur pada latar belakang body yang menggunakan image */
    backdrop-filter: blur(5px); 
    -webkit-backdrop-filter: blur(5px);
}

.login-container {
    display: flex;
    width: 1000px;
    height: 600px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05); 

    /* POSISI ABSOLUT DIBUTUHKAN UNTUK ANIMASI */
    position: absolute; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    /* Memicu Animasi: */
    opacity: 0; /* Mulai dari tak terlihat */
    animation: pageFadeIn 0.8s ease-out forwards 0.2s; /* Animasi 0.8s, jeda 0.2s */
}

/* ---------------------------------- */
/* VISUAL SIDE (Pilih Role) */
/* ---------------------------------- */
.visual-side {
    width: 50%;
    /* Warna lebih solid */
    background: var(--dark-blue); 
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

/* LOGO STYLING */
.logo-container {
    justify-content: center;
    top: 30px;
    left: 30px;
}
.school-logo {
    width: 100px; /* Ukuran logo yang pas */
    height: auto;
}

.visual-side h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.role-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.btn-role {
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-role:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.btn-role.active {
    background: var(--text-light);
    color: var(--dark-blue);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* OPSI KEMBALI KE BERANDA */
.back-to-home {
    position: absolute;
    bottom: 30px; 
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
}

.btn-back-home {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-back-home:hover {
    background: var(--text-light);
    color: var(--dark-blue);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ---------------------------------- */
/* FORM SIDE (Logika Transisi HIDE & SHOW) */
/* ---------------------------------- */
.form-side {
    width: 50%;
    background: var(--darkest-blue); 
    padding: 50px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 100%; 
}

/* State Awal - Welcome Message */
#initial-state {
    text-align: center;
    padding: 0 40px; 
    transition: opacity 0.3s ease-in-out, visibility 0.3s;
}

/* CLASS HIDE: Untuk menyembunyikan state awal */
#initial-state.hidden {
    opacity: 0;
    visibility: hidden; 
    position: absolute; 
    pointer-events: none; 
}


/* State Form - Login Form (DEFAULT TERSEMBUNYI) */
#login-form-container {
    opacity: 0;
    visibility: hidden; 
    
    /* Posisikan di tengah form-side */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    
    /* Transisi untuk efek fade */
    transition: opacity 0.3s ease-in-out, visibility 0.3s;
}

/* CLASS SHOW: Untuk menampilkan form */
#login-form-container.active {
    opacity: 1;
    visibility: visible; 
    pointer-events: auto;
}


/* Input Styles */
.input-group { 
    margin-bottom: 25px; 
}
.input-group label { 
    display: block; 
    margin-bottom: 8px; 
    font-size: 14px; 
    color: var(--text-muted); 
    font-weight: 500;
}
.password-container { 
    position: relative; 
    width: 100%; 
}
.input-group input { 
    width: 100%; 
    padding: 12px 15px; 
    background: rgba(255, 255, 255, 0.08); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 8px; 
    color: var(--text-light);
    font-size: 16px; 
    transition: 0.3s; 
}
.password-container input { 
    padding-right: 45px; 
}
.input-group input:focus { 
    background: rgba(255, 255, 255, 0.15); 
    border-color: var(--primary-color); 
    outline: none; 
    box-shadow: 0 0 10px rgba(121, 82, 179, 0.5); /* Shadow mengikuti warna primary yang baru */
}

/* Tombol Toggle Password */
.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Tombol Submit */
.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, var(--primary-color), var(--dark-blue)); 
    color: white; 
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-top: 30px; 
}
.btn-submit:hover {
    background: linear-gradient(90deg, var(--dark-blue), var(--primary-color));
    box-shadow: 0 6px 25px rgba(121, 82, 179, 0.5); 
}

/* Error Message */
.error-message {
    background-color: var(--error-bg);
    color: var(--error-color);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #f5c6cb;
    font-size: 14px;
}

/* --- Tambahkan kode ini di bagian paling atas login.css --- */

/* Keyframes untuk animasi fade-in */
@keyframes pageFadeIn {
    from {
        opacity: 0;
        /* Sedikit bergeser dari atas */
        transform: translate(-50%, -48%); 
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* ---------------------------------------------------------- */

