/* --- Responsive Design --- */

/* Tablet and smaller laptops */
@media (max-width: 1024px) {
    .app-container {
        margin: 0.5rem !important;
        width: auto !important;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem;
    }

    .search-box-simple {
        width: 100% !important;
    }

    .actions-group {
        justify-content: flex-end;
        width: 100%;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .app-header {
        padding: 0.5rem;
    }

    .toolbar {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .search-box-simple {
        padding: 0.4rem;
    }

    /* On mobile, stack actions appropriately or keep scrolling row */
    .actions-group {
        justify-content: space-between;
        /* Spread specific actions */
        width: 100%;
    }

    /* Force Table Scroll */
    .device-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll on iOS */
    }

    .vehicle-table th,
    .vehicle-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .vehicle-table th {
        white-space: nowrap;
    }

    /* Make Add Button smaller/icon only if needed, but text is fine */
    .btn-black {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    /* Modal Adjustments for Mobile */
    .modal-content {
        width: 95% !important;
        margin: 0 auto;
        padding: 1rem !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    .options-grid {
        grid-template-columns: 1fr !important;
        /* Stack grid buttons */
    }

    /* Hide non-critical columns on extremely small screens? 
       User asked for ALL columns, so horizontal scroll is safer than hiding. */
}