@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

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

body {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Layout Dashboard */
.dashboard-container { display: flex; width: 100%; min-height: 100vh; }

/* Sidebar Glassmorphism */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1000;
}
.sidebar-header { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 1.2em; font-weight: 600; letter-spacing: 1px; }
.sidebar-menu { list-style: none; padding: 20px 0; flex: 1; }
.sidebar-menu li { padding: 5px 20px; margin-bottom: 10px; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 15px; text-decoration: none;
    color: #ddd; padding: 12px 20px; border-radius: 10px; transition: 0.3s;
}
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.15); color: #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Main Content */
.main-content { flex: 1; padding: 20px; width: calc(100% - 260px); display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.menu-toggle { display: none; background: transparent; border: none; color: #fff; font-size: 1.5em; cursor: pointer; }

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); border-radius: 20px; padding: 30px; width: 100%;
}

h2, h3 { margin-bottom: 20px; font-weight: 600; }

/* Card Statistik Dashboard */
.stats-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px; border-radius: 15px; text-align: center; backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: 0.3s;
}
.stat-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.1); }
.stat-card i { font-size: 2.5em; color: #00d2ff; margin-bottom: 10px; }
.stat-card h3 { font-size: 1.5em; margin: 10px 0; font-weight: 600; color: #fff; }
.stat-card p { font-size: 0.9em; opacity: 0.8; }

/* Form Elements */
.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; font-size: 0.9em; opacity: 0.8; }
input, select {
    width: 100%; padding: 12px; background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 10px; color: #fff; outline: none; transition: 0.3s;
}
input:focus, select:focus { border-color: #00d2ff; background: rgba(255, 255, 255, 0.15); }
select option { background: #203a43; color: #fff; }

/* Buttons */
.btn {
    padding: 10px 20px; border-radius: 10px; text-decoration: none; color: #fff;
    border: none; cursor: pointer; font-weight: 600; transition: 0.3s; display: inline-block;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
.btn-primary { background: linear-gradient(135deg, #00c6ff, #0072ff); }
.btn-success { background: linear-gradient(135deg, #11998e, #38ef7d); }
.btn-secondary { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; }

/* Tombol Aksi Tabel */
.action-btn { padding: 6px 12px; border-radius: 6px; color: white; text-decoration: none; font-size: 0.85em; margin-right: 5px; display: inline-block; transition: 0.2s;}
.action-btn:hover { opacity: 0.8; }
.btn-edit { background: #ffc107; color: #000; }
.btn-delete { background: #dc3545; }
.btn-print { background: #e74c3c; margin-bottom: 15px; }

/* Table Umum */
.table-wrapper { overflow-x: auto; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
th { background: rgba(255, 255, 255, 0.1); }
tr:hover { background: rgba(255, 255, 255, 0.05); }

/* Pagination Glassmorphism */
.pagination { display: flex; justify-content: center; margin-top: 20px; gap: 5px; }
.pagination a {
    padding: 8px 15px; border-radius: 8px; text-decoration: none; color: #fff;
    background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); transition: 0.3s;
}
.pagination a:hover { background: rgba(255, 255, 255, 0.2); }
.pagination .active { background: linear-gradient(135deg, #00c6ff, #0072ff); border-color: transparent; }

/* =========================================
   MODE HP: RESPONSIVE & CARD TABLE
   ========================================= */
@media (max-width: 768px) {
    /* Sidebar tertutup otomatis di HP */
    .sidebar { position: fixed; left: -260px; height: 100vh; }
    .sidebar.active { left: 0; }
    .main-content { width: 100%; }
    .menu-toggle { display: block; }
    
    /* Overlay untuk tutup sidebar */
    .overlay {
        display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.5); z-index: 999; backdrop-filter: blur(5px);
    }
    .overlay.active { display: block; }

    /* Ubah Tabel Jadi Kartu di HP */
    .dashboard-container .table-wrapper table { border: 0; min-width: 100%; }
    .dashboard-container .table-wrapper table thead { display: none; }
    .dashboard-container .table-wrapper table tr {
        display: block; margin-bottom: 20px; background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 15px; padding: 10px;
    }
    .dashboard-container .table-wrapper table td {
        display: flex; justify-content: space-between; align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding: 12px 10px;
        text-align: right !important; font-size: 0.9em;
    }
    .dashboard-container .table-wrapper table td:last-child { border-bottom: 0; justify-content: flex-end; gap: 10px; }
    
    /* Panggil label data di HP */
    .dashboard-container .table-wrapper table td::before {
        content: attr(data-label); font-weight: 600; text-transform: uppercase;
        font-size: 0.85em; color: #00d2ff; text-align: left; flex: 1;
    }
}