/* Global Responsive Overrides */
:root {
    --header-height: 60px;
}

/* Base Responsive Adjustments */
@media (max-width: 768px) {
    /* Improve body scrolling on mobile */
    body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    /* Adjust container padding */
    .container, 
    .main,
    .content {
        padding: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Make grids single column */
    .grid,
    .grid-container,
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Adjust card spacing */
    .card {
        margin-bottom: 1rem;
    }

    /* Allow tables to scroll horizontally */
    .table-container,
    .table-scroll,
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Font size adjustments for readability */
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.1rem !important; }
    
    /* Input and Form adjustments */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents iOS zooom */
        max-width: 100%;
    }

    /* Modal adjustments */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Sidebar/Menu adjustments if not already handled */
    .sidebar {
        z-index: 1000;
    }
}

/* Utility to hide elements on mobile if needed */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
    .show-on-mobile {
        display: block !important;
    }
}
