body, html {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    color: white;
    overflow-x: hidden;
}

/* --- Loading Overlay --- */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #fff;
    border-top: 5px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Style untuk scrollbar agar cocok dengan dark mode */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #111214;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Style untuk SVG agar menyesuaikan ukuran dengan mudah */
.icon-base {
    width: 1.25rem;
    height: 1.25rem;
}

/* Responsive Design */
/* Mobile Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 256px;
    background-color: #1f2937;
    color: white;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 50;
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(0);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 60;
    background-color: #374151;
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: #4b5563;
}

/* Mobile Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

.sidebar-overlay.open {
    display: block;
}

/* Content Area Responsive */
.content-area {
    transition: margin-left 0.3s ease-in-out;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .content-area {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    .content-area.with-sidebar {
        margin-left: 0;
        padding-left: 0;
    }
    
    /* Header responsive */
    .header-responsive {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .header-responsive .header-content {
        width: 100%;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Card responsive */
    .card-responsive {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    /* Form responsive */
    .form-responsive {
        padding: 1rem;
    }
    
    .form-responsive input,
    .form-responsive select,
    .form-responsive textarea {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Table responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive table {
        min-width: 600px;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .content-area {
        margin-left: 200px;
        padding-left: 1rem;
    }
    
    .card-responsive {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Desktop Styles */
@media (min-width: 1025px) {
    .sidebar {
        transform: translateX(0);
    }
    
    .content-area {
        margin-left: 256px;
        padding-left: 2rem;
    }
    
    .card-responsive {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

/* Utility Classes */
.hidden-mobile {
    display: block;
}

@media (max-width: 768px) {
    .hidden-mobile {
        display: none;
    }
}

.visible-mobile {
    display: none;
}

@media (max-width: 768px) {
    .visible-mobile {
        display: block;
    }
}

/* Import Responsive Utilities */
@import url('responsive-utilities.css');