/* ==========================================================
   STYLING UMUM DAN RESET
   ========================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: rgb(251, 252, 251); /* Latar belakang abu-abu muda */
    line-height: 1.6;
}

/* Konten utama di sebelah sidebar */
.container {
    padding: 20px;
    margin-left: 0; 
    transition: margin-left 0.3s ease;
    max-width: 1200px;
    width: 100%;
    margin: 20px auto; /* Pusat kontainer */
}

/* Header */
h2 {
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
}

/* ==========================================================
   SIDEBAR DAN HAMBURGER MENU (RESPONSIVE)
   ========================================================== */

/* HAMBURGER MENU ICON */
.hamburger-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* SIDEBAR NAVIGATION */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px; /* Sembunyikan di luar layar (DEFAULT) */
    width: 250px;
    height: 100%;
    background-color: #333;
    padding-top: 60px;
    transition: left 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
    overflow-y: auto;
}

.sidebar.active {
    left: 0; /* Tampilkan saat class 'active' ditambahkan oleh JS */
}

/* Overlay (Background Gelap saat menu terbuka) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none; /* Sembunyikan secara default */
}

.overlay.active {
    display: block; /* Tampilkan saat class 'active' ditambahkan oleh JS */
}

.user-info {
    color: white;
    padding: 15px 20px;
    border-bottom: 1px solid #575757;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.sidebar a {
    padding: 15px 20px;
    text-decoration: none;
    font-size: 16px;
    color: #f1f1f1;
    display: block;
    transition: background-color 0.3s;
}

.sidebar a:hover, .sidebar a.active {
    background-color: #575757;
}

.sidebar .logout-link {
    background-color: #d9534f;
    margin-top: 20px;
}

.sidebar .logout-link:hover {
    background-color: #c9302c;
}

/* ==========================================================
   BUTTONS (Umum)
   ========================================================== */

.btn-kirim {
    background-color: #5cb85c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn-kirim:hover {
    background-color: #4cae4c;
}

.btn-danger {
    background-color: #d9534f;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-danger:hover {
    background-color: #c9302c;
}

/* ==========================================================
   FORMS DAN INPUTS
   ========================================================== */

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"], 
.form-group input[type="number"], 
.form-group input[type="password"],
.form-group select,
.form-group input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

/* Styling Khusus untuk Form Filter Laporan */
.filter-form {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: flex-end;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-form > div {
    flex-grow: 1;
}

/* ==========================================================
   DASHBOARD CARDS
   ========================================================== */
.card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex: 1 1 200px; /* Fleksibel untuk responsif */
    color: white;
}

.card h4 {
    margin-top: 0;
    font-size: 1em;
    opacity: 0.9;
}

.card .data-value {
    font-size: 2em;
    font-weight: bold;
    margin: 10px 0 0;
}

/* Warna Card */
.card.blue { background-color: #0275d8; }
.card.green { background-color: #5cb85c; }
.card.red { background-color: #d9534f; }
.card.orange { background-color: #f0ad4e; }

/* ==========================================================
   TABLES (Data dan Keranjang)
   ========================================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.data-table th, .data-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.data-table th {
    background-color: #f5f5f5;
    color: #333;
    font-weight: bold;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.data-table tbody tr:hover {
    background-color: #f1f1f1;
}

.total-row td {
    background-color: #e0f7fa !important;
    font-weight: bold;
    font-size: 1.1em;
    border-top: 3px solid #00bcd4 !important;
}

/* ==========================================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================================== */

/* Tablet dan Mobile (di bawah 768px) */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        margin: 10px auto;
    }
    
    /* Layout Kartu Dashboard menjadi kolom tunggal */
    .card-list {
        flex-direction: column;
    }

    .card {
        flex: 1 1 100%;
    }
    
    /* Pengecilan font pada data table untuk mobile */
    .data-table th, .data-table td {
        padding: 8px;
        font-size: 0.9em;
    }

    /* Form filter menjadi tumpukan vertikal */
    .filter-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-form > div {
        width: 100%;
    }
}

/* Mobile Kecil (di bawah 480px) */
@media (max-width: 480px) {
    .hamburger-menu {
        top: 15px;
        left: 15px;
    }
    h2 {
        font-size: 1.5em;
    }
    
    /* Table overflow horizontal agar tidak merusak layout */
    .table-responsive {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 500px; /* Untuk memastikan tabel tetap terbaca */
    }
}