/* Mobile Responsiveness Improvements */

@media (max-width: 768px) {
    /* Navigation */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1000;
        background: var(--primary);
        color: white;
        border: none;
        padding: 10px;
        border-radius: 4px;
        cursor: pointer;
    }
    
    /* Tables */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    /* Forms */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    /* Cards */
    .card {
        padding: 12px;
    }
    
    /* Buttons */
    .btn, button {
        padding: 10px 16px;
        font-size: 0.9rem;
        min-height: 44px; /* Touch target size */
    }
    
    /* Inputs */
    input, select, textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 44px;
    }
    
    /* Modals */
    .modal {
        width: 95%;
        max-width: 95%;
        margin: 10px auto;
    }
    
    /* Dashboard */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Search */
    .search-bar {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Smaller screens */
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 8px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .table-row {
        padding: 12px 8px;
    }
}

/* Landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
}
