body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fcfcfc;
    margin: 0;
}

body:not(.dashboard-body) {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container { width: 350px; }

.card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.brand-title { color: #b60f0f; font-weight: 800; letter-spacing: 2px; margin-bottom: 5px; }

input, select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 12px;
    background-color: #d32f2f;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

button:hover { background-color: #b71c1c; }

.hidden { display: none !important; }

.badge {
    background: #fff3e0;
    color: #ef6c00;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 15px;
    display: inline-block;
}

.dashboard-body { 
    display: flex; 
    background: #f0f2f5; 
    min-height: 100vh; 
}

.sidebar { 
    width: 220px; 
    background: #d32f2f; 
    color: white; 
    padding: 20px 10px; 
    transition: 0.3s; 
    display: flex; 
    flex-direction: column; 
    height: 100vh; 
    position: fixed; /* Kunci di layar */
    left: 0; 
    top: 0; 
    box-sizing: border-box; 
    z-index: 1000;
}

.sidebar.collapsed { width: 70px; }

.sidebar.collapsed .menu-group-label, 
.sidebar.collapsed li span { display: none; }

.sidebar.collapsed li { justify-content: center; padding: 15px 0; }
.sidebar.collapsed .brand { font-size: 14px; letter-spacing: 1px; }

.brand { 
    font-weight: 800; 
    letter-spacing: 2px; 
    text-align: center; 
    cursor: pointer; 
    margin-bottom: 20px; 
    transition: 0.3s;
}

.menu-group-label { 
    font-size: 10px; 
    color: #ff9999; 
    padding: 15px 10px 5px; 
    text-transform: uppercase; 
    font-weight: 800;
}

.sidebar ul { list-style: none; padding: 0; margin: 0; flex-grow: 1; overflow-y: auto; overflow-x: hidden; }

.sidebar ul li { 
    font-size: 13px; 
    padding: 12px 15px; 
    transition: 0.2s; 
    color: white; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    border-radius: 8px; 
    margin-bottom: 5px;
}

.sidebar ul li:hover { background: rgba(255,255,255,0.1); }
.sidebar ul li.active { background: #b71c1c; font-weight: bold; }
.sidebar ul li .icon { min-width: 25px; font-size: 16px; text-align: center; }
.sidebar ul li span { margin-left: 10px; white-space: nowrap; }

/* Logout di Dasar Sidebar */
.logout-section { padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.2); margin-top: auto; }
.btn-logout-sidebar { 
    width: 100%; background: #333; color: white; border: none; padding: 10px; 
    border-radius: 8px; cursor: pointer; font-weight: bold; display: flex; align-items: center; justify-content: center;
}
.sidebar.collapsed .btn-logout-sidebar span { display: none; }

.main-content { 
    margin-left: 220px; /* Jarak pas sidebar lebar */
    padding: 25px; 
    transition: 0.3s; 
    flex: 1; 
    min-height: 100vh; 
}

.main-content.expanded { margin-left: 70px; }

header { display: flex; justify-content: space-between; margin-bottom: 20px; border-bottom: 2px solid #ddd; padding-bottom: 10px; }

.pos-container { display: flex; gap: 20px; }
.menu-grid { flex: 2; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1


@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        padding: 15px !important;
    }

    .grid-dashboard {
        grid-template-columns: 1fr !important; /* Paksa satu kolom */
        gap: 15px !important;
    }

    .sidebar {
        display: none;
    }

    .card-insight h3 { font-size: 13px; }
    .highlight-text { font-size: 15px; }
    
    .white-box {
        overflow-x: auto !important;
        display: block;
        width: 100%;
    }
}