* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, sans-serif; }
body { background-color: #f0f2f5; display: flex; justify-content: center; min-height: 100vh; }

/* Wadah Utama ala Aplikasi HP */
.app-container { width: 100%; max-width: 480px; background-color: #ffffff; min-height: 100vh; position: relative; box-shadow: 0 0 15px rgba(0,0,0,0.1); padding-bottom: 70px; }

/* Header atas */
.header { background-color: #006064; color: white; padding: 20px; text-align: center; border-bottom-left-radius: 15px; border-bottom-right-radius: 15px; }

/* Isi Konten */
.content { padding: 20px; animation: fadeIn 0.3s ease-in-out; }
.card { background: white; border-radius: 10px; padding: 15px; margin-bottom: 15px; border: 1px solid #e0e0e0; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

/* Tombol */
.btn { display: block; width: 100%; padding: 12px; background: #00838f; color: white; text-align: center; border: none; border-radius: 8px; font-size: 14px; font-weight: bold; cursor: pointer; text-decoration: none; margin-top: 10px; }
.btn:hover { background: #006064; }

/* Form Input */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 13px; color: #333; margin-bottom: 5px; font-weight: bold; }
.form-group input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px; font-size: 14px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* --- NAVIGASI BAWAH (MOBILE FIRST) --- */
.bottom-nav { 
    position: fixed; 
    bottom: 0; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 100%; 
    max-width: 480px; 
    background: white; 
    display: flex; 
    justify-content: space-around; 
    padding: 12px 0; 
    border-top: 1px solid #e0e0e0; 
    z-index: 1000; 
    border-top-left-radius: 20px; 
    border-top-right-radius: 20px; 
    box-shadow: 0 -4px 15px rgba(0,0,0,0.03); 
}
.nav-item { 
    text-align: center; 
    color: #9e9e9e; 
    text-decoration: none; 
    font-size: 11px; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 4px; 
    transition: 0.2s; 
}
.nav-item.active { color: #00838f; font-weight: 600; }
.material-symbols-outlined { font-size: 26px; }

/* --- RESPONSIVE DESKTOP & TABLET (SIDEBAR MENU) --- */
@media (min-width: 768px) {
    body { justify-content: flex-start; }
    
    .bottom-nav { 
        top: 0; 
        left: 0; 
        bottom: 0; 
        width: 250px; 
        max-width: 250px;
        flex-direction: column; 
        justify-content: flex-start; 
        padding-top: 40px; 
        border-radius: 0; 
        border-right: 1px solid #e0e0e0; 
        box-shadow: 2px 0 10px rgba(0,0,0,0.05); 
        transform: translateX(0); /* Menghapus centering gaya mobile */
    }
    
    .nav-item { 
        flex: none; 
        flex-direction: row; 
        gap: 15px; 
        padding: 15px 30px; 
        font-size: 15px; 
        align-items: center; 
        justify-content: flex-start;
    }
    .nav-item.active {
        background: #e0f7fa; 
        border-right: 4px solid #00838f;
    }
    
    .app-container { 
        margin: 20px 20px 20px 280px; 
        max-width: calc(100% - 320px); 
        border-radius: 20px; 
        min-height: calc(100vh - 40px);
        padding-bottom: 30px; 
    }
    
    .content { display: flex; flex-wrap: wrap; gap: 20px; }
    .card { flex: 1 1 calc(50% - 20px); margin-bottom: 0; }
}
/* --- KHUSUS HALAMAN TANPA SIDEBAR (LOGIN & INDEX) --- */
@media (min-width: 768px) {
    body.auth-body {
        justify-content: center !important;
    }
    .app-container.auth-container {
        margin: 40px auto !important; /* Memaksa rata tengah otomatis */
        max-width: 600px !important; /* Membatasi lebar agar tidak terlalu melar */
    }
    .app-container.auth-container .content {
        display: block !important; /* Memaksa teks kembali turun ke bawah, tidak menyamping */
    }
}
/* ========================================= */
/* UI KOMPONEN ADMIN (DRAWER & LAYOUT)       */
/* ========================================= */

/* 1. Desain Dasar Drawer (Bawaan & Layar HP) */
.drawer-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; opacity: 0; transition: 0.3s; }
.drawer-overlay.active { display: block; opacity: 1; }
.drawer { position: fixed; top: 0; left: -280px; width: 260px; height: 100%; background: white; z-index: 2001; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 2px 0 15px rgba(0,0,0,0.2); overflow-y: auto; }
.drawer.active { left: 0; }
.drawer-header { background: #311b92; padding: 30px 20px 20px; color: white; }
.drawer-menu { list-style: none; padding: 0; margin: 0; }
.drawer-menu li a { display: flex; align-items: center; gap: 15px; padding: 15px 20px; color: #444; text-decoration: none; border-bottom: 1px solid #f5f5f5; font-size: 14px; transition: 0.2s; }
.drawer-menu li a:hover { background: #ede7f6; color: #311b92; padding-left: 25px; border-left: 4px solid #311b92; }

/* 2. KHUSUS HALAMAN ADMIN (SIDEBAR PERMANEN DI DESKTOP) */
@media (min-width: 768px) {
    /* Atur Body merapat ke kanan */
    body.admin-body { display: flex !important; justify-content: flex-end !important; background-color: #f5f5f5 !important; }
    
    /* Kunci Sidebar di Kiri */
    .drawer { left: 0 !important; box-shadow: 2px 0 10px rgba(0,0,0,0.05) !important; width: 260px !important; }
    .drawer-overlay, .menu-trigger { display: none !important; }
    
    /* Paksa Kotak Utama mengisi sisa ruang secara presisi */
    .app-container.admin-container {
        margin: 0 !important; 
        width: calc(100% - 260px) !important; /* 100% layar dikurangi lebar sidebar */
        max-width: 100% !important; 
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }
    
    /* Matikan pemisahan kolom bawaan siswa */
    .app-container.admin-container .content { display: block !important; padding: 20px 30px !important; }
    .app-container.admin-container .card { width: 100% !important; max-width: 100% !important; flex: none !important; margin-bottom: 20px !important;}
}