@media (max-width: 768px) {
    .sidebar-collapsed {
        width: 0;
        overflow: hidden;
    }
    
    .sidebar-expanded {
        width: 256px;
        position: absolute;
        height: 100%;
        z-index: 40;
    }

    .sidebar {
        width: 0;
        position: fixed;
        height: calc(100vh - 40px);
        z-index: 50;
        top: 20px;
        left: 20px;
        bottom: 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .sidebar.open {
        transform: translateX(0);
        width: calc(256px - 40px);
    }

    .main-content {
        margin-left: 0;
        padding: 10px;
    }

    .toggle-sidebar-btn {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 60;
        background-color: #fff;
        border: none;
        padding: 10px;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .rounded-xl {
        border-radius: 0.5rem;
    }
    
    .p-4 {
        padding: 0.75rem;
    }
    
    .gap-4 {
        gap: 0.75rem;
    }

    .text-6xl {
        font-size: 2rem;
    }
    
    .text-2xl {
        font-size: 1rem;
    }
    
    .p-6 {
        padding: 1rem;
    }

    .h-64 {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .text-6xl {
        font-size: 1.75rem;
    }
    
    .text-2xl {
        font-size: 0.875rem;
    }
    
    .p-6 {
        padding: 0.75rem;
    }
}

.bg-teal-100 {
    background-color: #e6fffa;
}

.text-teal-500 {
    color: #38b2ac;
}

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
}

.dark {
    --bg-color: #111827;
    --text-color: #ffffff;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #e2e8f0;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #cbd5e0;
}

/* Tampilan Desktop */
.sidebar {
    width: 256px;
    position: fixed;
    top: 20px;
    left: 20px;
    height: calc(100vh - 40px);
    z-index: 40;
    background-color: #fff;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.sidebar .m-3 {
    background: white;
    border-radius: 1rem;
    height: calc(100% - 20px);
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.sidebar .p-4.border-t {
    margin-bottom: 20px;
}

.main-content {
    margin-left: 256px;
    min-height: 100vh;
    padding: 20px;
}

/* Tampilan Mobile */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        top: 20px;
        left: 20px;
        height: calc(100vh - 40px);
    }
    
    .sidebar.open {
        width: calc(256px - 40px);
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* Penyesuaian responsif */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 50;
        transition: transform 0.3s ease-in-out;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .rounded-xl {
        border-radius: 0.5rem;
    }
    
    .p-4 {
        padding: 0.75rem;
    }
    
    .gap-4 {
        gap: 0.75rem;
    }
}

/* Penyesuaian untuk layar kecil */
@media (max-width: 640px) {
    .text-6xl {
        font-size: 2.5rem;
    }
    
    .h-64 {
        height: 200px;
    }
    
    .p-6 {
        padding: 1rem;
    }
}

/* Dark mode styles */
.dark {
    background-color: #111827;
    color: #ffffff;
}

.dark .bg-white {
    background-color: #1F2937;
}

.dark .text-gray-500 {
    color: #9CA3AF;
}

.dark .text-gray-700 {
    color: #D1D5DB;
}

.dark .text-gray-900 {
    color: #F3F4F6;
}

.dark .border-gray-100 {
    border-color: #374151;
}

.dark .border-gray-700 {
    border-color: #374151;
}

.dark .hover\:bg-teal-50:hover {
    background-color: rgba(56, 178, 172, 0.1);
}

/* Light mode styles - update dan tambahan */
.bg-white {
    background-color: #ffffff !important;
}

.bg-gray-100 {
    background-color: #F9FAFB !important;
}

/* Card styles untuk light mode */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}

/* Sidebar untuk light mode */
#sidebar {
    background-color: #ffffff;
}

.sidebar .m-3 {
    background-color: #ffffff;
    border-color: #F3F4F6;
}

/* Chart background untuk light mode */
canvas {
    background-color: #ffffff;
}

/* Text colors untuk light mode */
.text-gray-400,
.text-gray-500,
.text-gray-600,
.text-gray-700 {
    color: #374151;
}

/* Hover states untuk light mode */
.hover\:bg-teal-50:hover {
    background-color: #F0FDFA;
}

/* Container styles untuk light mode */
.bg-gray-100 {
    background-color: #F9FAFB;
}

/* Override dark mode styles ketika dalam mode terang */
:root:not(.dark) .bg-gray-800 {
    background-color: #ffffff;
}

:root:not(.dark) .dark\:bg-gray-800 {
    background-color: #ffffff;
}

:root:not(.dark) .dark\:bg-gray-900 {
    background-color: #F9FAFB;
}

:root:not(.dark) .dark\:text-gray-400 {
    color: #374151;
}

/* Dark mode colors - additional */
.dark body {
    background-color: #111827 !important;
}

.dark .bg-gray-800,
.dark .dark\:bg-gray-800 {
    background-color: #1F2937 !important;
}

.dark .bg-gray-900,
.dark .dark\:bg-gray-900 {
    background-color: #111827 !important;
}

.dark #sidebar,
.dark .sidebar .m-3 {
    background-color: #1F2937 !important;
}

.dark .bg-white {
    background-color: #1F2937 !important;
}

.dark canvas {
    background-color: #1F2937 !important;
}

.dark .shadow-sm {
    background-color: #1F2937 !important;
}

/* Memastikan semua card memiliki background gelap */
.dark [class*="bg-white"],
.dark [class*="bg-gray-100"] {
    background-color: #1F2937 !important;
}

/* Toggle button styles */
.peer:checked ~ .peer-checked\:bg-blue-500 {
    background-color: #3B82F6 !important;
}

.dark .peer:checked ~ .peer-checked\:bg-blue-500 {
    background-color: #3B82F6 !important;
}

/* Card shadows untuk dark mode */
.dark .shadow-sm,
.dark .shadow-md {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 
                0 1px 2px -1px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid #374151;
}

.dark .rounded-xl {
    border: 1px solid #374151;
}

/* Card shadows untuk light mode */
.shadow-sm,
.shadow-md {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 
                0 1px 2px -1px rgba(0, 0, 0, 0.1) !important;
}

/* Toggle switch background di mode gelap */
.dark .bg-gray-200 {
    background-color: #4B5563 !important;
}

/* Toggle switch background saat aktif di mode gelap */
.dark .peer:checked ~ .peer-checked\:after\:border-white {
    border-color: #ffffff !important;
} 