@media (max-width: 992px) {
    .sidebar {
        width: 250px;
        left: -270px;
        height: 100vh;
        border-radius: 0;
        box-shadow: var(--shadow-sidebar-mobile);
        top: 0;
        position: fixed;
    }

    .sidebar.mobile-show {
        left: 0;
    }

    .sidebar-logo {
        width: 100px;
        margin-bottom: 2rem;
    }

    .nav-link span,
    .logout-link span {
        display: block;
    }

    .login-hero {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .main-container {
        padding: 15px;
    }

    .top-header {
        margin-bottom: 1rem;
        padding: 5px 0;
        position: sticky;
        top: 0;
        z-index: 10;
        background: white;
    }

    .table-header-actions {
        width: 100%;
        margin-top: 0;
    }

    .search-wrapper {
        flex: 1;
    }
}

@media (max-width: 640px) {
    .img-picker-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .stat-value {
        font-size: 1.5rem;
    }

    .table-title-header {
        margin-bottom: 0.5rem;
    }

    .page-title {
        margin-bottom: 0.25rem;
        font-size: 1.4rem;
    }

    .table-header-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 1rem;
    }

    .table-actions-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        width: 100%;
        margin-bottom: 0;
    }

    .search-wrapper {
        width: 100%;
        min-width: 100%;
        flex: 0 0 100%;
    }

    .custom-select-wrapper {
        width: calc(50% - 0.375rem);
        min-width: 0;
        flex: 1;
    }

    .table-actions-group .btn-primary-gradient {
        width: 100%;
        margin-top: 0.25rem;
    }

    .table-actions-group .btn-outline-custom {
        width: 100%;
    }

    .user-avatar {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    .user-name {
        font-size: 0.85rem;
    }

    .user-role {
        font-size: 0.75rem;
    }

    .user-profile {
        gap: 0.75rem;
    }

    /* Permission Page Specific Mobile Adjustments */
    .permission-tabs {
        margin-top: 0.5rem;
        padding-bottom: 5px;
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    .permission-tabs::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar for Chrome, Safari and Opera */
    }

    .permission-tabs .nav-item {
        flex: 0 0 auto;
    }

    .permission-tabs .btn-sm {
        white-space: nowrap;
        padding: 0.5rem 1rem;
    }

    .location-name {
        font-size: 0.85rem;
    }

    .location-address {
        font-size: 0.75rem;
    }

    .table-responsive {
        border-radius: 8px;
        overflow-x: auto !important;
    }
}

@media (min-width: 992px) {
    .table-container .table-responsive {
        overflow: visible;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    :root {
        --transition: none;
    }
}
