@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary: #6C63FF;
    --secondary: #4facfe;
    --accent: #00f2fe;
    --dark: #1e1e2f;
    --light: #f4f6f8;
    --glass: rgba(255, 255, 255, 0.95);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Ubah ke flex-start agar tidak terlalu rapat saat scroll */
    padding: 40px 20px;
    color: var(--dark);
}

/* Container Glassmorphism - LEBIH LEBAR */
.container {
    background: var(--glass);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 40px;
    width: 95%; /* Diperlebar dari 90% */
    max-width: 1400px; /* Diperbesar dari 1000px agar tabel panjang */
    box-shadow: var(--shadow);
    animation: fadeIn 0.8s ease-in-out;
    margin-bottom: 40px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

h2, h3 { text-align: center; margin-bottom: 20px; color: var(--primary); }

/* Form Styles */
.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9rem; }
input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: 0.3s;
    font-size: 0.95rem;
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 8px rgba(108, 99, 255, 0.2); }

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 1rem;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4); }
.btn-danger { background: linear-gradient(to right, #ff416c, #ff4b2b); }
.btn-warning { background: linear-gradient(to right, #f7971e, #ffd200); color: #fff; }

/* Table Styles - DIPERBAIKI AGAR LEBIH PANJANG & LEGA */
.table-responsive { 
    overflow-x: auto; 
    margin-top: 20px; 
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 10px; 
    min-width: 1000px; /* Memaksa tabel tetap lebar meski layar kecil */
}

th, td { 
    padding: 15px 20px; /* Padding lebih besar agar teks lega */
    text-align: left; 
    border-bottom: 1px solid #ddd; 
    vertical-align: middle;
    font-size: 0.95rem; /* Font sedikit lebih besar */
}

th { 
    background-color: var(--primary); 
    color: white; 
    white-space: nowrap; /* Mencegah header turun baris */
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Memberikan ruang lebih untuk kolom Nama dan Jurusan */
th:nth-child(3), td:nth-child(3) { min-width: 200px; } /* Nama Lengkap */
th:nth-child(4), td:nth-child(4) { min-width: 220px; } /* Jurusan */
th:nth-child(5), td:nth-child(5) { min-width: 100px; } /* Kelas */

tr:hover { background-color: #f1f1f1; transition: 0.2s; }

/* Utility */
.auth-box { max-width: 450px; margin: 0 auto; }
.navbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; flex-wrap: wrap; gap: 10px; }
.logout-btn { width: auto; padding: 10px 25px; font-size: 0.9rem; }
.alert { padding: 15px; border-radius: 10px; margin-bottom: 20px; text-align: center; font-weight: 500; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Responsive untuk Layar Kecil */
@media (max-width: 768px) {
    .container { width: 100%; padding: 20px; }
    th, td { padding: 10px; font-size: 0.85rem; }
    .navbar { flex-direction: column; text-align: center; }
}