/* Admin Panel - Mobile Optimizations */

/* Scrollable Tables on Mobile */
.admin-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .admin-table-wrapper {
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }
    
    table {
        min-width: 600px; /* Force minimum width to enable horizontal scroll */
    }
    
    /* Make table text smaller on mobile */
    table th,
    table td {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Admin Sidebar - Mobile Collapsible */
.admin-sidebar {
    position: relative;
}

@media (max-width: 1024px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 40;
        background: white;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    /* Sidebar Overlay */
    .admin-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 39;
    }
    
    .admin-sidebar-overlay.show {
        display: block;
    }
    
    /* Hamburger Menu Button */
    .admin-menu-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 50;
        padding: 0.5rem;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        cursor: pointer;
    }
    
    .admin-menu-toggle svg {
        width: 24px;
        height: 24px;
        color: #6b7280;
    }
}

@media (min-width: 1025px) {
    .admin-menu-toggle {
        display: none;
    }
    
    .admin-sidebar-overlay {
        display: none !important;
    }
}

/* Scrollbar Styling for Tables */
.admin-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.admin-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.admin-table-wrapper::-webkit-scrollbar-thumb {
    background: #9f7aea;
    border-radius: 4px;
}

.admin-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}
