/*
 * WebbMTS Mobile Shell
 * Mobile/tablet-only shell styles. Desktop shell stays in ui-core.css.
 */

/* =========================================
    MOBILE SHELL (new UI backbone)
   ========================================= */
.wmts-mobile-topbar-btn {
    display: none;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    border: 1px solid var(--topbar-settings-icon-border);
    background: var(--topbar-settings-icon-bg);
    color: var(--topbar-settings-icon-color);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.wmts-mobile-topbar-btn:hover {
    background: var(--topbar-account-hover-bg);
    border-color: var(--topbar-account-hover-border);
}

.wmts-mobile-topbar-icon {
    font-family: "Segoe Fluent Icons", "Segoe MDL2 Assets", "Segoe UI Symbol", sans-serif;
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wmts-mobile-topbar-btn .wmts-topbar-gear-icon.wmts-mobile-topbar-icon {
    width: 18px;
    height: 18px;
}

.wmts-mobile-topbar-btn .wmts-topbar-gear-icon.wmts-mobile-topbar-icon.wmts-svg-icon-wrap svg {
    width: 18px;
    height: 18px;
}

.wmts-mobile-topbar-btn .wmts-mobile-search-icon.wmts-svg-icon-wrap svg {
    width: 18px;
    height: 18px;
}

.wmts-mobile-menu-btn .wmts-mobile-menu-icon {
    width: 100%;
    height: 100%;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.wmts-mobile-menu-btn .wmts-mobile-menu-icon.wmts-svg-icon-wrap svg {
    width: 20px;
    height: 20px;
    display: block;
}

.wmts-mobile-sidebar-scrim {
    display: none;
}

.wmts-mobile-context-fab {
    display: none;
    position: fixed;
    right: 18px;
    bottom: 86px;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 1px solid var(---border);
    background: var(---bg);
    color: var(---text);
    font-size: 26px;
    line-height: 1;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(2, 8, 23, 0.35);
    z-index: 1106;
    cursor: pointer;
}

.wmts-mobile-context-fab:hover {
    background: var(---bg-hover);
    border-color: var(---border-hover);
}

#wmts-mobile-ptr-indicator {
    display: none;
}

@media (max-width: 1199px) {
    body[data-ui-shell="mobile"] #wmts-mobile-ptr-indicator {
        position: fixed;
        top: 54px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1300;
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        min-height: 34px;
        min-width: 176px;
        padding: 6px 10px;
        border-radius: 999px;
        border: 1px solid color-mix(in srgb, var(--topbar-border) 88%, transparent);
        background: color-mix(in srgb, var(--topbar-bg) 94%, transparent);
        backdrop-filter: blur(6px);
        color: var(--text-secondary);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.02em;
        opacity: 0;
        pointer-events: none;
        box-shadow: 0 8px 20px rgba(2, 8, 23, 0.28);
        transition: opacity 150ms ease, transform 160ms ease, border-color 160ms ease;
    }

    body[data-ui-shell="mobile"] #wmts-mobile-ptr-indicator.is-visible {
        opacity: 1;
        transform: translateX(-50%) translateY(4px);
    }

    body[data-ui-shell="mobile"] #wmts-mobile-ptr-indicator .wmts-mobile-ptr-icon {
        width: 14px;
        height: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        flex: 0 0 14px;
        font-family: "Segoe Fluent Icons", "Segoe MDL2 Assets", "Segoe UI Symbol", sans-serif;
        font-size: 14px;
        line-height: 1;
    }

    body[data-ui-shell="mobile"] #wmts-mobile-ptr-indicator .wmts-mobile-ptr-icon.wmts-svg-icon-wrap svg {
        width: 14px;
        height: 14px;
        display: block;
    }

    body[data-ui-shell="mobile"] #wmts-mobile-ptr-indicator .wmts-mobile-ptr-label {
        min-width: 96px;
        white-space: nowrap;
        color: inherit;
    }

    body[data-ui-shell="mobile"] #wmts-mobile-ptr-indicator .wmts-mobile-ptr-progress {
        position: relative;
        width: 46px;
        height: 4px;
        border-radius: 999px;
        background: color-mix(in srgb, var(--text-muted) 26%, transparent);
        overflow: hidden;
        margin-left: auto;
        flex: 0 0 46px;
    }

    body[data-ui-shell="mobile"] #wmts-mobile-ptr-indicator .wmts-mobile-ptr-progress-fill {
        position: absolute;
        inset: 0;
        transform-origin: left center;
        transform: scaleX(0);
        background: linear-gradient(90deg, var(--brand-primary) 0%, color-mix(in srgb, var(--brand-primary) 60%, #fff 40%) 100%);
        transition: transform 120ms ease;
    }

    body[data-ui-shell="mobile"] #wmts-mobile-ptr-indicator.is-ready {
        color: var(--text-primary);
        border-color: color-mix(in srgb, var(--brand-primary) 56%, transparent);
    }

    body[data-ui-shell="mobile"] #wmts-mobile-ptr-indicator.is-refreshing {
        color: var(--text-primary);
        border-color: color-mix(in srgb, var(--brand-primary) 44%, transparent);
    }

    body[data-ui-shell="mobile"] #wmts-mobile-ptr-indicator.is-refreshing .wmts-mobile-ptr-icon {
        color: var(--brand-primary);
        animation: wmts-ptr-spin 820ms linear infinite;
    }

    body[data-ui-shell="mobile"] #wmts-mobile-ptr-indicator.is-done {
        color: var(--text-primary);
        border-color: color-mix(in srgb, var(--success-primary) 54%, transparent);
    }

    body[data-ui-shell="mobile"] #wmts-mobile-ptr-indicator.is-error {
        color: var(--text-primary);
        border-color: color-mix(in srgb, var(--danger-primary) 54%, transparent);
    }

    @keyframes wmts-ptr-spin {
        from { transform: rotate(0deg); }
        to { transform: rotate(-360deg); }
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-quickadjust-inline-topbar {
        display: none;
    }

    body[data-ui-shell="mobile"].wmts-mobile-inline-fullscreen .wmts-global-topbar,
    body[data-ui-shell="mobile"].wmts-mobile-inline-fullscreen #wmts-topbar-tabs,
    body[data-ui-shell="mobile"].wmts-mobile-inline-fullscreen #main-dashboard .tab-container,
    body[data-ui-shell="mobile"].wmts-mobile-inline-fullscreen .wmts-mobile-sidebar-scrim {
        display: none !important;
    }

    body[data-ui-shell="mobile"].wmts-mobile-inline-fullscreen #main-dashboard .tab-content {
        padding-top: 8px !important;
        padding-bottom: 12px !important;
    }

    body[data-ui-shell="mobile"].wmts-mobile-inline-fullscreen #view-inventory .module-kpi-strip {
        display: none !important;
    }

    body[data-ui-shell="mobile"].wmts-mobile-inline-fullscreen #view-inventory #inv-local-view-quickadjustments {
        padding-top: 62px;
    }

    body[data-ui-shell="mobile"].wmts-mobile-inline-fullscreen #view-inventory #inv-local-view-quickadjustments .quickcheck-adjust-toolbar {
        display: none !important;
    }

    body[data-ui-shell="mobile"].wmts-mobile-inline-fullscreen #view-inventory #inv-local-view-quickadjustments .wmts-quickadjust-inline-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1120;
        height: 56px;
        display: flex !important;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        background: var(--topbar-bg);
        border-bottom: 1px solid var(--topbar-border);
        box-shadow: 0 6px 16px rgba(2, 8, 23, 0.24);
    }

    body[data-ui-shell="mobile"].wmts-mobile-inline-fullscreen #view-inventory #inv-local-view-quickadjustments .wmts-quickadjust-inline-topbar .admin-input {
        flex: 1 1 auto;
        min-width: 0;
    }

    body[data-ui-shell="mobile"].wmts-mobile-inline-fullscreen #view-inventory #inv-local-view-quickadjustments .wmts-quickadjust-exit-btn {
        display: inline-flex;
    }

    body[data-ui-shell="mobile"].wmts-mobile-inline-fullscreen #view-inventory #inv-local-view-quickadjustments .quickcheck-adjust-btn {
        width: 76px;
        height: 76px;
        font-size: 34px;
        border-radius: 12px;
        line-height: 1;
    }

    body[data-ui-shell="mobile"] .module-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    body[data-ui-shell="mobile"] .module-kpi-card {
        min-width: 0;
    }

    body[data-ui-shell="mobile"] .wmts-kpi-card-body {
        min-width: 0;
    }

    body[data-ui-shell="mobile"] .module-kpi-value {
        max-width: 100%;
        font-size: clamp(16px, 5.2vw, 24px);
        line-height: 1.05;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    body[data-ui-shell="mobile"],
    body[data-ui-shell="mobile"] #main-dashboard,
    body[data-ui-shell="mobile"] #main-dashboard .card,
    body[data-ui-shell="mobile"] #main-dashboard .tab-content {
        overscroll-behavior-x: none;
    }

    body[data-ui-shell="mobile"].wmts-mobile-edge-swipe-active,
    body[data-ui-shell="mobile"].wmts-mobile-edge-swipe-active #main-dashboard,
    body[data-ui-shell="mobile"].wmts-mobile-edge-swipe-active #main-dashboard .tab-content {
        overscroll-behavior: none;
    }

    body[data-ui-shell="mobile"] #main-dashboard .card {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr);
    }

    body[data-ui-shell="mobile"] #main-dashboard .tab-container {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(86vw, 320px);
        min-height: 100dvh;
        z-index: 1110;
        transform: translateX(-104%);
        transition: transform 0.22s ease;
        box-shadow: 10px 0 22px rgba(2, 8, 23, 0.42);
    }

    body[data-ui-shell="mobile"].wmts-mobile-sidebar-open #main-dashboard .tab-container {
        transform: translateX(0);
    }

    body[data-ui-shell="mobile"] .sidebar-collapse-btn,
    body[data-ui-shell="mobile"] .card.sidebar-collapsed .sidebar-collapse-btn {
        display: none !important;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-sidebar-scrim {
        display: block;
        position: fixed;
        inset: 0;
        border: 0;
        background: rgba(2, 8, 23, 0.5);
        z-index: 1102;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    body[data-ui-shell="mobile"].wmts-mobile-sidebar-open .wmts-mobile-sidebar-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    body[data-ui-shell="mobile"] .wmts-global-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        z-index: 1104;
        padding: 0 12px;
        gap: 8px;
        box-shadow: 0 6px 16px rgba(2, 8, 23, 0.24);
    }

    body[data-ui-shell="mobile"] .wmts-mobile-topbar-btn {
        display: inline-flex;
    }

    body[data-ui-shell="mobile"] #wmts-topbar-title {
        flex: 1 1 auto;
        min-width: 0;
        margin-right: auto;
        font-size: 16px;
    }

    body[data-ui-shell="mobile"] .wmts-topbar-profile-wrap {
        display: inline-flex !important;
        order: 7;
        margin-left: 0;
    }

    body[data-ui-shell="mobile"] #wmts-topbar-context-add {
        order: 3;
        margin-right: 0;
        min-height: 36px;
        height: 36px;
        padding: 0 10px;
        border-radius: 10px;
        display: inline-flex;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-search-btn {
        order: 4;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-search-clear-btn {
        order: 5;
        display: none !important;
        position: relative;
        border-color: color-mix(in srgb, var(--danger-primary) 44%, var(--topbar-settings-icon-border));
        background: color-mix(in srgb, var(--danger-primary) 16%, var(--topbar-settings-icon-bg));
        color: color-mix(in srgb, var(--danger-primary) 88%, #ffffff 12%);
    }

    body[data-ui-shell="mobile"] .wmts-mobile-search-clear-btn.is-visible {
        display: inline-flex !important;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-search-clear-btn .wmts-mobile-search-clear-icon.wmts-svg-icon-wrap svg {
        width: 16px;
        height: 16px;
        display: block;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-search-clear-btn .wmts-mobile-search-clear-icon {
        transform: translateX(-2px);
    }

    body[data-ui-shell="mobile"] .wmts-mobile-search-clear-btn .wmts-mobile-search-clear-x {
        position: absolute;
        right: 4px;
        top: 2px;
        font-size: 12px;
        line-height: 1;
        font-weight: 800;
        color: inherit;
        pointer-events: none;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-settings-btn {
        order: 6;
    }

    body[data-ui-shell="mobile"] .wmts-topbar-account-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        padding: 0;
        border-radius: 10px;
        gap: 0;
        border: 1px solid var(--topbar-settings-icon-border);
        background: var(--topbar-settings-icon-bg);
    }

    body[data-ui-shell="mobile"] .wmts-topbar-account-icon,
    body[data-ui-shell="mobile"] .wmts-topbar-profile-meta {
        display: none !important;
    }

    body[data-ui-shell="mobile"] .wmts-topbar-profile-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        border-radius: 8px;
    }

    body[data-ui-shell="mobile"] #wmts-topbar-search-wrap {
        display: none !important;
        position: fixed;
        top: 64px;
        left: 12px;
        right: 12px;
        margin: 0;
        z-index: 1112;
        flex: 1 1 auto;
        min-inline-size: 0;
    }

    body[data-ui-shell="mobile"] #wmts-topbar-search-wrap.is-open {
        display: flex !important;
    }

    body[data-ui-shell="mobile"] #wmts-topbar-search-wrap .wmts-topbar-search-icon {
        display: inline-flex !important;
        z-index: 2;
        color: var(--text-muted, #8fa8c3);
    }

    body[data-ui-shell="mobile"] #wmts-topbar-search-wrap .wmts-topbar-search-input {
        padding-left: 34px !important;
        padding-right: 12px !important;
    }

    body[data-ui-shell="mobile"] #wmts-topbar-tabs {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0 !important;
        padding: 0 0 env(safe-area-inset-bottom);
        background: var(--surface-panel-alt);
        border-top: 1px solid var(--app-border);
        box-shadow: 0 -14px 28px rgba(2, 8, 23, 0.42), 0 -2px 0 rgba(255, 255, 255, 0.04);
        z-index: 1104;
        overflow-x: hidden;
        overflow-y: hidden;
        -ms-overflow-style: none;
        scrollbar-width: none;
        scroll-padding-inline: 12px;
        touch-action: none;
        overscroll-behavior-x: none;
        overscroll-behavior-y: none;
    }

    body[data-ui-shell="mobile"] #wmts-topbar-tabs::-webkit-scrollbar {
        display: none;
    }

    body[data-ui-shell="mobile"] #wmts-topbar-tabs .sub-tab-container,
    body[data-ui-shell="mobile"] #wmts-topbar-tabs .sub-tab-container.network-subtabs {
        width: 100%;
        min-width: 100%;
        justify-content: flex-start !important;
        min-height: 50px;
        display: flex !important;
        padding: 0;
        gap: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        overflow-x: auto;
        overflow-y: hidden;
        align-items: stretch;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        overscroll-behavior-x: contain;
        overscroll-behavior-y: none;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    body[data-ui-shell="mobile"] #wmts-topbar-tabs .sub-tab-container::-webkit-scrollbar,
    body[data-ui-shell="mobile"] #wmts-topbar-tabs .sub-tab-container.network-subtabs::-webkit-scrollbar {
        display: none;
    }

    body[data-ui-shell="mobile"] #wmts-topbar-tabs .sub-tab {
        min-height: 50px;
        border-radius: 6px !important;
        padding: 6px 6px;
        margin: 0;
        min-width: calc(100% / 6);
        flex: 1 0 calc(100% / 6);
        white-space: normal;
        line-height: 1.1;
        text-align: center;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        word-break: break-word;
        overflow-wrap: anywhere;
        touch-action: manipulation;
    }

    body[data-ui-shell="mobile"] #wmts-topbar-tabs .wmts-tab-glider {
        top: 0;
        height: 100%;
        border-radius: 6px;
        box-shadow: 0 4px 10px color-mix(in srgb, var(--tab-active-glow) 70%, transparent);
    }

    body[data-ui-shell="mobile"] #wmts-topbar-tabs .wmts-tab-glider::before {
        border-radius: 6px;
    }

    body[data-ui-shell="mobile"] #wmts-topbar-tabs .wmts-mobile-bottom-settings-tab {
        min-width: calc(100% / 6);
        width: auto;
        flex: 1 0 calc(100% / 6);
        padding: 0;
        margin-left: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body[data-ui-shell="mobile"] #main-dashboard .tab-content {
        grid-column: 1;
        grid-row: 1;
        padding-top: 70px;
        padding-bottom: calc(108px + env(safe-area-inset-bottom));
        padding-left: 8px;
        padding-right: 8px;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        z-index: 1103;
        padding: 0;
        box-sizing: border-box;
        background: var(--surface-panel-alt);
        border-bottom: 1px solid var(--app-border);
        box-shadow: 0 10px 20px rgba(2, 8, 23, 0.3);
        overflow-x: hidden;
        overflow-y: hidden;
        -ms-overflow-style: none;
        scrollbar-width: none;
        transform: translateY(-14px);
        opacity: 0;
        animation: wmts-mobile-top-dropdown-in 180ms ease forwards;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active .sub-tab-container,
    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active .sub-tab-container.network-subtabs {
        width: max-content;
        min-width: 100%;
        max-width: 100%;
        min-height: 50px;
        display: inline-flex !important;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start !important;
        background: transparent;
        border: 0;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        overscroll-behavior-x: contain;
        overscroll-behavior-y: none;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin: 0 !important;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active::-webkit-scrollbar {
        display: none;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active .sub-tab-container::-webkit-scrollbar,
    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active .sub-tab-container.network-subtabs::-webkit-scrollbar {
        display: none;
    }

    body[data-ui-shell="mobile"].wmts-mobile-top-dropdown-open #main-dashboard .tab-content {
        padding-top: 122px;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active .sub-tab {
        min-height: 50px;
        border-radius: 6px !important;
        padding: 0 14px;
        margin: 0;
        min-width: calc(100% / 6);
        flex: 1 0 calc(100% / 6);
        white-space: normal;
        line-height: 1.1;
        text-align: center;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    body[data-ui-shell="mobile"] #network-top-settings-subtabs .wmts-inline-switcher-row.wmts-network-settings-row {
        margin-bottom: 0 !important;
    }

    body[data-ui-shell="mobile"] #network-top-settings-subtabs .wmts-inline-switcher-controls.wmts-network-settings-controls {
        display: none !important;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active #network-scripts-shared-subtabs-wrap {
        margin: 0 !important;
        padding: 0 !important;
    }

    body[data-ui-shell="mobile"] #network-sub-view-scripts .network-toolbar > div > button.btn-close,
    body[data-ui-shell="mobile"] #network-sub-view-scripts-workflows .network-toolbar > div > button.btn-close,
    body[data-ui-shell="mobile"] #network-sub-view-scripts-hosts > div > div > button.btn-close {
        display: none !important;
    }

    /* Network Hosts: force host-group tabs to a fixed 6-wide strip in top dropdown. */
    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active #network-host-group-tabs-wrap.sub-tab-container,
    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active #network-host-group-tabs-wrap.sub-tab-container.network-subtabs {
        overflow-x: hidden !important;
        touch-action: manipulation;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active #network-host-group-tabs {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        width: 100%;
        min-width: 0;
        gap: 0;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active #network-host-group-tabs .sub-tab {
        width: 100%;
        min-width: 0 !important;
        flex: none !important;
        padding: 0 6px;
    }

    body[data-ui-shell="mobile"] #view-events #events-main-subtabs {
        display: none !important;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active .wmts-tab-glider {
        top: 0;
        height: 100%;
        border-radius: 6px;
        box-shadow: none;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-top-dropdown-active .wmts-tab-glider::before {
        content: none !important;
        display: none !important;
    }

    @keyframes wmts-mobile-top-dropdown-in {
        from {
            transform: translateY(-14px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* =========================================
   INVENTORY MOBILE OVERHAUL (mobile shell only)
   ========================================= */
@media (max-width: 1199px) {
    body[data-ui-shell="mobile"] #view-inventory #sub-view-assets table thead,
    body[data-ui-shell="mobile"] #view-inventory #sub-view-logs table thead,
    body[data-ui-shell="mobile"] #view-inventory #inv-local-view-quickadjustments table thead,
    body[data-ui-shell="mobile"] #view-inventory #inv-local-view-qrcodes table thead {
        display: none !important;
    }

    body[data-ui-shell="mobile"] #view-inventory #low-stock-container table,
    body[data-ui-shell="mobile"] #view-inventory #regular-stock-container table,
    body[data-ui-shell="mobile"] #view-inventory #sub-view-logs table,
    body[data-ui-shell="mobile"] #view-inventory #inv-local-view-quickadjustments table,
    body[data-ui-shell="mobile"] #view-inventory #inv-local-view-qrcodes table {
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
        background: transparent;
    }

    body[data-ui-shell="mobile"] #view-inventory #low-asset-body,
    body[data-ui-shell="mobile"] #view-inventory #asset-body,
    body[data-ui-shell="mobile"] #view-inventory #log-table-body,
    body[data-ui-shell="mobile"] #view-inventory #quickcheck-adjust-table-body,
    body[data-ui-shell="mobile"] #view-inventory #quickcheck-table-body {
        display: grid;
        gap: 10px;
    }

    body[data-ui-shell="mobile"] #view-inventory #low-asset-body > tr,
    body[data-ui-shell="mobile"] #view-inventory #asset-body > tr {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 12px;
        border: 1px solid var(--app-border);
        border-radius: 12px;
        background: color-mix(in srgb, var(--surface-panel) 88%, transparent);
        box-shadow: 0 10px 20px rgba(2, 8, 23, 0.18);
    }

    body[data-ui-shell="mobile"] #view-inventory #low-asset-body > tr.inv-batch-row-wrap,
    body[data-ui-shell="mobile"] #view-inventory #asset-body > tr.inv-batch-row-wrap {
        display: none !important;
    }

    body[data-ui-shell="mobile"] #view-inventory #low-asset-body > tr td,
    body[data-ui-shell="mobile"] #view-inventory #asset-body > tr td {
        border: 0 !important;
        padding: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-inventory #low-asset-body > tr .col-cat,
    body[data-ui-shell="mobile"] #view-inventory #asset-body > tr .col-cat,
    body[data-ui-shell="mobile"] #view-inventory #low-asset-body > tr .col-acq,
    body[data-ui-shell="mobile"] #view-inventory #asset-body > tr .col-acq,
    body[data-ui-shell="mobile"] #view-inventory #low-asset-body > tr .col-exp,
    body[data-ui-shell="mobile"] #view-inventory #asset-body > tr .col-exp,
    body[data-ui-shell="mobile"] #view-inventory #low-asset-body > tr .col-qty,
    body[data-ui-shell="mobile"] #view-inventory #asset-body > tr .col-qty,
    body[data-ui-shell="mobile"] #view-inventory #low-asset-body > tr .col-value,
    body[data-ui-shell="mobile"] #view-inventory #asset-body > tr .col-value,
    body[data-ui-shell="mobile"] #view-inventory .inventory-row-arrow-gap,
    body[data-ui-shell="mobile"] #view-inventory .inv-row-arrow,
    body[data-ui-shell="mobile"] #view-inventory .inv-asset-sub,
    body[data-ui-shell="mobile"] #view-inventory .inv-batch-count,
    body[data-ui-shell="mobile"] #view-inventory .inv-status-badge {
        display: none !important;
    }

    body[data-ui-shell="mobile"] #view-inventory #low-asset-body > tr .col-name,
    body[data-ui-shell="mobile"] #view-inventory #asset-body > tr .col-name {
        flex: 1 1 auto;
        min-width: 0;
    }

    body[data-ui-shell="mobile"] #view-inventory #low-asset-body > tr .col-name .inv-asset-cell,
    body[data-ui-shell="mobile"] #view-inventory #asset-body > tr .col-name .inv-asset-cell {
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory #low-asset-body > tr .inv-asset-title,
    body[data-ui-shell="mobile"] #view-inventory #asset-body > tr .inv-asset-title {
        font-size: 13px;
        font-weight: 800;
    }

    body[data-ui-shell="mobile"] #view-inventory #low-asset-body > tr .col-act,
    body[data-ui-shell="mobile"] #view-inventory #asset-body > tr .col-act {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-width: 38px;
    }

    body[data-ui-shell="mobile"] #view-inventory #low-asset-body > tr .wmts-table-action-icon,
    body[data-ui-shell="mobile"] #view-inventory #asset-body > tr .wmts-table-action-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 999px;
    }

    body[data-ui-shell="mobile"] #view-inventory #log-table-body > tr {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 4px 10px;
        padding: 10px 12px;
        border: 1px solid var(--app-border);
        border-radius: 12px;
        background: color-mix(in srgb, var(--surface-panel) 88%, transparent);
        box-shadow: 0 10px 20px rgba(2, 8, 23, 0.18);
    }

    body[data-ui-shell="mobile"] #view-inventory #log-table-body > tr > td {
        padding: 0 !important;
        border: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-inventory #log-table-body > tr > td:nth-child(1) {
        grid-column: 1 / -1;
        font-size: 11px !important;
        color: var(--text-muted) !important;
    }

    body[data-ui-shell="mobile"] #view-inventory #log-table-body > tr > td:nth-child(2) {
        font-size: 12px;
        font-weight: 700;
    }

    body[data-ui-shell="mobile"] #view-inventory #log-table-body > tr > td:nth-child(3) {
        grid-column: 1 / -1;
        font-size: 12px;
        color: var(--text-secondary);
    }

    body[data-ui-shell="mobile"] #view-inventory #log-table-body > tr > td:nth-child(4) {
        justify-self: end;
    }

    body[data-ui-shell="mobile"] #view-inventory #log-table-body > tr > td:nth-child(5) {
        grid-column: 1 / -1;
        font-size: 12px;
    }

    body[data-ui-shell="mobile"] #view-inventory #quickcheck-adjust-table-body > tr {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 10px 12px;
        border: 1px solid var(--app-border);
        border-radius: 12px;
        background: color-mix(in srgb, var(--surface-panel) 88%, transparent);
    }

    body[data-ui-shell="mobile"] #view-inventory #quickcheck-adjust-table-body > tr > td {
        border: 0 !important;
        padding: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-inventory #quickcheck-adjust-table-body > tr > td:first-child {
        flex: 1 1 auto;
        min-width: 0;
    }

    body[data-ui-shell="mobile"] #view-inventory .quickcheck-adjust-actions {
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .quickcheck-adjust-btn {
        width: 26px;
        height: 26px;
        border-radius: 6px;
        font-size: 14px;
    }

    body[data-ui-shell="mobile"] #view-inventory #quickcheck-table-body > tr {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
        padding: 12px;
        border: 1px solid var(--app-border);
        border-radius: 12px;
        background: color-mix(in srgb, var(--surface-panel) 88%, transparent);
        box-shadow: 0 10px 20px rgba(2, 8, 23, 0.18);
    }

    body[data-ui-shell="mobile"] #view-inventory #quickcheck-table-body > tr > td {
        border: 0 !important;
        padding: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-inventory #quickcheck-table-body > tr > td:nth-child(1) {
        grid-column: 1 / -1;
        font-size: 13px;
    }

    body[data-ui-shell="mobile"] #view-inventory #quickcheck-table-body > tr > td:nth-child(2) {
        justify-self: end;
        font-size: 12px;
        color: var(--text-secondary);
    }

    body[data-ui-shell="mobile"] #view-inventory #quickcheck-table-body > tr > td:nth-child(3),
    body[data-ui-shell="mobile"] #view-inventory #quickcheck-table-body > tr > td:nth-child(4) {
        display: grid;
        gap: 6px;
        justify-items: center;
        font-size: 11px;
        color: var(--text-secondary);
    }

    body[data-ui-shell="mobile"] #view-inventory #quickcheck-table-body > tr > td:nth-child(5) {
        grid-column: 1 / -1;
    }

    body[data-ui-shell="mobile"] #view-inventory #quickcheck-table-body > tr > td:nth-child(5) > button {
        width: 100%;
    }

    body[data-ui-shell="mobile"] #view-inventory .quickcheck-qr-img {
        width: 108px;
        height: 108px;
        border-radius: 8px;
        border: 1px solid var(--app-border);
        background: #fff;
        padding: 4px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inventory-mobile-cards {
        display: none;
        gap: 10px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-empty {
        padding: 12px;
        border: 1px solid var(--app-border);
        border-radius: 12px;
        color: var(--text-muted);
        background: color-mix(in srgb, var(--surface-panel) 86%, transparent);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-card,
    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-log-card,
    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-card,
    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-qr-card {
        border: 1px solid var(--table-border-strong);
        border-radius: 12px;
        background: var(--table-row-bg-strong) !important;
        box-shadow: none;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-card {
        display: grid;
        gap: 10px;
        padding: 12px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-card.is-low {
        border-color: var(--table-immediate-border, #8a3a3a);
        background: color-mix(in srgb, var(--table-immediate-bg, rgba(131, 48, 48, 0.25)) 88%, transparent);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-main h4 {
        margin: 0;
        font-size: 13px;
        font-weight: 800;
        color: var(--text-primary);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-meta {
        margin-top: 6px;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        font-size: 11px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-head {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-thumb {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        object-fit: cover;
        border: 1px solid var(--table-border-strong);
        background: var(--surface-panel-alt);
        box-shadow: 0 8px 16px rgba(2, 8, 23, 0.25);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-head-meta {
        min-width: 0;
        flex: 1 1 auto;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-category {
        display: inline-block;
        margin-top: 2px;
        font-size: 11px;
        color: var(--text-secondary);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-status {
        padding: 2px 8px;
        border-radius: 999px;
        border: 1px solid var(--app-border);
        background: var(--surface-panel-alt);
        color: var(--text-muted);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-card.is-low .wmts-inv-mobile-status {
        color: var(--status-danger-text, #ff6b6b);
        border-color: color-mix(in srgb, var(--status-danger-text, #ff6b6b) 45%, transparent);
        background: color-mix(in srgb, var(--status-danger-bg, rgba(255, 107, 107, 0.18)) 80%, transparent);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-actions .wmts-table-action-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 999px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-viewonly {
        font-size: 11px;
        color: var(--text-muted);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-batch-pill {
        font-size: 11px;
        color: var(--text-secondary);
        border: 1px solid var(--app-border);
        border-radius: 999px;
        padding: 2px 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-batches {
        border-top: 1px solid var(--app-border);
        padding-top: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-batches > summary {
        cursor: pointer;
        font-size: 12px;
        font-weight: 700;
        color: var(--text-secondary);
        list-style: none;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-batches > summary::-webkit-details-marker {
        display: none;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-batches > summary::after {
        content: "▾";
        margin-left: 8px;
        opacity: 0.8;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-batches:not([open]) > summary::after {
        content: "▸";
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-batches-list {
        display: grid;
        gap: 8px;
        margin-top: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-batch-row {
        border: 1px solid var(--table-border-strong);
        border-radius: 10px;
        background: color-mix(in srgb, var(--surface-panel-alt) 90%, transparent);
        padding: 8px;
        display: grid;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-batch-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-batch-meta strong {
        font-size: 12px;
        font-weight: 700;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-batch-meta span {
        font-size: 11px;
        color: var(--text-secondary);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-batch-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-qty-control {
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-log-card {
        padding: 10px 12px;
        display: grid;
        gap: 6px;
    }
    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-log-row {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px 10px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-log-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        font-size: 11px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-log-time {
        color: var(--text-muted);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-log-action {
        border: 1px solid var(--app-border);
        border-radius: 999px;
        padding: 2px 8px;
        font-weight: 700;
        color: var(--text-secondary);
        background: var(--surface-panel-alt);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-log-asset {
        margin: 0;
        font-size: 13px;
        font-weight: 800;
        color: var(--text-primary);
        flex: 1 1 140px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-log-user {
        font-size: 11px;
        color: var(--text-secondary);
        white-space: nowrap;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-log-change {
        font-size: 12px;
        display: flex;
        align-items: center;
        gap: 6px;
        margin-left: auto;
        white-space: nowrap;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-log-old {
        color: var(--status-danger-text, #ff6b6b);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-log-new {
        color: var(--status-ok-text, #35d399);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-card {
        padding: 10px 12px;
        display: grid;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-row {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-row > h4,
    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-row > strong {
        margin: 0;
        min-width: 0;
        flex: 1 1 auto;
        font-size: 13px;
        font-weight: 800;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-controls {
        margin-left: auto;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-total {
        min-width: 30px;
        text-align: right;
        font-size: 13px;
        font-weight: 800;
        color: var(--text-primary);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-head h4 {
        margin: 0;
        font-size: 13px;
        font-weight: 800;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-head span {
        font-size: 12px;
        color: var(--text-secondary);
        font-weight: 700;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-batches {
        display: grid;
        gap: 8px;
        padding-top: 6px;
        border-top: 1px solid var(--app-border);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-batch {
        display: grid;
        gap: 6px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-batch-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-batch-meta strong {
        font-size: 12px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-batch-meta span {
        font-size: 11px;
        color: var(--text-secondary);
        font-weight: 700;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-card .quickcheck-adjust-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 20px;
        line-height: 1;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-qr-card {
        padding: 12px;
        display: grid;
        gap: 10px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-qr-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-qr-head h4 {
        margin: 0;
        font-size: 13px;
        font-weight: 800;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-qr-head span {
        font-size: 11px;
        color: var(--text-secondary);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-qr-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-qr-item {
        border: 1px solid var(--app-border);
        border-radius: 10px;
        padding: 8px;
        display: grid;
        justify-items: center;
        gap: 6px;
        background: color-mix(in srgb, var(--surface-panel-alt) 90%, transparent);
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-qr-item a {
        font-size: 11px;
        color: var(--text-secondary);
        text-decoration: none;
    }

    body[data-ui-shell="mobile"] #view-inventory .inv-qty-btn,
    body[data-ui-shell="mobile"] #view-inventory .quickcheck-adjust-btn {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }

    body[data-ui-shell="mobile"] #view-inventory #sub-view-logs #log-date {
        color-scheme: dark;
        padding-right: 34px;
        background-position: right 10px center;
    }

    body[data-ui-shell="mobile"] #view-inventory #sub-view-logs #log-date::-webkit-calendar-picker-indicator {
        opacity: 0.95;
        cursor: pointer;
        filter: invert(0.9) sepia(0.08) saturate(0.6);
    }

    /* Device Management mobile table/card layout */
    body[data-ui-shell="mobile"] #view-devices .devices-list-toolbar,
    body[data-ui-shell="mobile"] #view-devices .devices-jobs-toolbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-devices .devices-list-toolbar .devices-list-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-devices .devices-list-toolbar .devices-list-actions > * {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }

    body[data-ui-shell="mobile"] #view-devices .devices-list-toolbar .devices-list-actions > .wmts-check-toggle {
        flex-basis: 100%;
    }

    /* Device Add/Edit modals: collapse by mobile shell mode, not viewport width */
    body[data-ui-shell="mobile"] :is(#device-create-modal, #device-edit-modal) .modal-content {
        width: min(96vw, 620px) !important;
        max-width: min(96vw, 620px) !important;
    }

    body[data-ui-shell="mobile"] :is(#device-create-modal, #device-edit-modal) .modal-body .modal-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    body[data-ui-shell="mobile"] :is(#device-create-modal, #device-edit-modal) .modal-item {
        min-width: 0 !important;
    }

    body[data-ui-shell="mobile"] :is(#device-create-modal, #device-edit-modal) .modal-item > :is(.admin-input, .table-select),
    body[data-ui-shell="mobile"] :is(#device-create-modal, #device-edit-modal) :is(#device-create-model, #device-create-batch, #device-edit-model, #device-edit-batch) + .wmts-menu-select,
    body[data-ui-shell="mobile"] :is(#device-create-modal, #device-edit-modal) :is(#device-create-model, #device-create-batch, #device-edit-model, #device-edit-batch) + .wmts-menu-select .wmts-menu-btn {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    /* Events Add/Edit Pack modals */
    body[data-ui-shell="mobile"] :is(#event-create-modal, #event-edit-modal) .event-pack-modal-content {
        width: min(96vw, 620px) !important;
        max-width: min(96vw, 620px) !important;
    }

    body[data-ui-shell="mobile"] :is(#event-create-modal, #event-edit-modal) .event-pack-modal-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    body[data-ui-shell="mobile"] #event-create-modal .event-pack-asset-header {
        align-items: stretch;
    }

    body[data-ui-shell="mobile"] #event-create-modal .event-pack-asset-header > .btn-close {
        width: 100%;
    }

    body[data-ui-shell="mobile"] :is(#event-create-modal, #event-edit-modal) .event-pack-modal-grid .modal-item > :is(.admin-input, .table-select),
    body[data-ui-shell="mobile"] #event-create-modal :is(#event-template-select, #event-batch-select) + .wmts-menu-select,
    body[data-ui-shell="mobile"] #event-create-modal :is(#event-template-select, #event-batch-select) + .wmts-menu-select .wmts-menu-btn {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    /* Device model modal mobile layout */
    body[data-ui-shell="mobile"] #device-model-modal .device-model-modal-content {
        width: min(96vw, 620px) !important;
        max-width: min(96vw, 620px) !important;
    }

    body[data-ui-shell="mobile"] #device-model-modal .device-model-modal-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    body[data-ui-shell="mobile"] #device-model-modal .device-model-batch-add-row {
        grid-template-columns: 1fr !important;
    }

    body[data-ui-shell="mobile"] #device-model-modal .device-model-batch-add-row > button {
        width: 100%;
    }

    body[data-ui-shell="mobile"] #device-model-modal .device-model-photo-row {
        display: grid;
        grid-template-columns: 100px minmax(0, 1fr);
        gap: 8px;
        align-items: center;
    }

    body[data-ui-shell="mobile"] #device-model-modal .device-model-image-preview {
        width: 100px;
        height: 76px;
    }

    body[data-ui-shell="mobile"] #device-model-modal .device-model-photo-row > .select-file-btn {
        width: 100%;
    }

    body[data-ui-shell="mobile"] #device-model-modal .device-model-batch-table-wrap {
        display: none;
    }

    body[data-ui-shell="mobile"] #device-model-modal .device-model-batch-mobile-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #device-model-modal .device-model-batch-mobile-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
        padding: 10px;
        border-radius: 10px;
        border: 1px solid var(--table-border-strong);
        background: var(--table-row-bg-strong);
    }

    body[data-ui-shell="mobile"] #device-model-modal .device-model-batch-mobile-main {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        min-width: 0;
    }

    body[data-ui-shell="mobile"] #device-model-modal .device-model-batch-mobile-kv {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    body[data-ui-shell="mobile"] #device-model-modal .device-model-batch-mobile-kv > span {
        color: var(--text-muted);
        font-size: 10px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        font-weight: 600;
    }

    body[data-ui-shell="mobile"] #device-model-modal .device-model-batch-mobile-kv > strong {
        color: var(--text-primary);
        font-size: 14px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body[data-ui-shell="mobile"] #add-inventory-modal .inventory-modal-batches-table-wrap .batch-edit-table thead,
    body[data-ui-shell="mobile"] #edit-inventory-modal .inventory-modal-batches-table-wrap .batch-edit-table thead {
        display: none;
    }

    body[data-ui-shell="mobile"] #add-inventory-modal .inventory-modal-batches-table-wrap .batch-edit-table,
    body[data-ui-shell="mobile"] #edit-inventory-modal .inventory-modal-batches-table-wrap .batch-edit-table {
        border: 0 !important;
        background: transparent !important;
    }

    body[data-ui-shell="mobile"] #add-inventory-modal .inventory-modal-batches-table-wrap .wmts-mobile-card-list,
    body[data-ui-shell="mobile"] #edit-inventory-modal .inventory-modal-batches-table-wrap .wmts-mobile-card-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #add-inventory-modal .inventory-modal-batches-table-wrap .wmts-mobile-card-row,
    body[data-ui-shell="mobile"] #edit-inventory-modal .inventory-modal-batches-table-wrap .wmts-mobile-card-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: stretch;
    }

    body[data-ui-shell="mobile"] #add-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell-name,
    body[data-ui-shell="mobile"] #edit-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell-name {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    body[data-ui-shell="mobile"] #add-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell-qty,
    body[data-ui-shell="mobile"] #edit-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell-qty {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    body[data-ui-shell="mobile"] #add-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell-acq,
    body[data-ui-shell="mobile"] #edit-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell-acq {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    body[data-ui-shell="mobile"] #add-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell-exp,
    body[data-ui-shell="mobile"] #edit-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell-exp {
        grid-column: 1;
        grid-row: 4;
    }

    body[data-ui-shell="mobile"] #add-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell-action,
    body[data-ui-shell="mobile"] #edit-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell-action {
        grid-column: 2;
        grid-row: 4;
        display: flex;
        justify-content: flex-end;
        align-items: flex-end;
        min-height: 28px;
    }

    body[data-ui-shell="mobile"] #add-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell,
    body[data-ui-shell="mobile"] #edit-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell {
        min-width: 0;
    }

    body[data-ui-shell="mobile"] #add-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell :is(input, select),
    body[data-ui-shell="mobile"] #edit-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell :is(input, select) {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    body[data-ui-shell="mobile"] #add-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell-action::before,
    body[data-ui-shell="mobile"] #edit-inventory-modal .inventory-modal-batches-table-wrap .inventory-batch-cell-action::before {
        display: none !important;
        content: none !important;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-sub-view-logs > div:first-child {
        display: grid !important;
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        gap: 8px;
        align-items: center;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-log-search-input {
        grid-column: 1 / -1;
        width: 100% !important;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-log-date,
    body[data-ui-shell="mobile"] #view-devices #devices-log-action-filter {
        width: 100% !important;
        min-width: 0;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-log-date {
        color-scheme: dark;
        color: var(--text-primary) !important;
        -webkit-text-fill-color: var(--text-primary) !important;
        padding-right: 34px !important;
        background-position: right 10px center;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-log-date::-webkit-calendar-picker-indicator {
        opacity: 0.95;
        cursor: pointer;
        filter: invert(0.9) sepia(0.08) saturate(0.6);
    }

    body[data-ui-shell="mobile"] #view-devices #devices-log-date::-webkit-datetime-edit,
    body[data-ui-shell="mobile"] #view-devices #devices-log-date::-webkit-datetime-edit-text,
    body[data-ui-shell="mobile"] #view-devices #devices-log-date::-webkit-datetime-edit-month-field,
    body[data-ui-shell="mobile"] #view-devices #devices-log-date::-webkit-datetime-edit-day-field,
    body[data-ui-shell="mobile"] #view-devices #devices-log-date::-webkit-datetime-edit-year-field {
        color: var(--text-primary) !important;
        -webkit-text-fill-color: var(--text-primary) !important;
        opacity: 1 !important;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-log-action-filter {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        padding-right: 34px !important;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-sub-view-logs > div:first-child > .wmts-menu-select {
        width: 100% !important;
        min-width: 0;
        display: flex;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-sub-view-logs > div:first-child > .wmts-menu-select .wmts-menu-btn {
        width: 100% !important;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-right: 34px !important;
    }

    body[data-ui-shell="mobile"] #device-job-modal #device-job-modal-status-select + .wmts-menu-select,
    body[data-ui-shell="mobile"] #device-job-modal #device-job-modal-status-select + .wmts-menu-select .wmts-menu-btn {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    body[data-ui-shell="mobile"] #view-devices table thead {
        display: none;
    }

    body[data-ui-shell="mobile"] #view-devices table {
        display: block;
        width: 100%;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        margin: 0;
    }

    body[data-ui-shell="mobile"] #view-devices table tbody {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-devices table tbody > tr {
        display: grid;
        gap: 8px;
        padding: 10px 12px;
        border: 1px solid var(--table-border-strong);
        border-radius: 12px;
        background: var(--table-row-bg-strong) !important;
    }

    body[data-ui-shell="mobile"] #view-devices table tbody > tr:nth-child(even) {
        background: var(--table-row-even-strong) !important;
    }

    body[data-ui-shell="mobile"] #view-devices table tbody > tr > td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        min-width: 0;
        border: 0 !important;
        background: transparent !important;
        padding: 0 !important;
        font-size: 12px;
        line-height: 1.3;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    body[data-ui-shell="mobile"] #view-devices table tbody > tr > td::before {
        content: attr(data-label);
        flex: 0 0 112px;
        min-width: 112px;
        max-width: 112px;
        font-size: 10px;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--table-muted-strong);
        font-weight: 700;
        line-height: 1.25;
    }

    body[data-ui-shell="mobile"] #view-devices table tbody > tr > td[colspan] {
        display: block;
        text-align: center;
        color: var(--text-secondary);
        padding: 4px 0 !important;
    }

    body[data-ui-shell="mobile"] #view-devices table tbody > tr > td[colspan]::before {
        display: none;
        content: none;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-table-body > tr {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 10px;
        row-gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-table-body > tr > td {
        display: block;
        min-width: 0;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-table-body > tr > td::before {
        display: block;
        min-width: 0;
        max-width: none;
        margin-bottom: 2px;
        font-size: 10px;
        line-height: 1.2;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-table-body > tr > td:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-table-body > tr > td:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-table-body > tr > td:nth-child(3) {
        grid-column: 1;
        grid-row: 2;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-table-body > tr > td:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-logs-table-body > tr > td[data-label="Summary"],
    body[data-ui-shell="mobile"] #view-devices #devices-logs-table-body > tr > td[data-label="SUMMARY"] {
        display: block;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-logs-table-body > tr > td[data-label="Summary"]::before,
    body[data-ui-shell="mobile"] #view-devices #devices-logs-table-body > tr > td[data-label="SUMMARY"]::before {
        display: block;
        min-width: 0;
        max-width: none;
        margin-bottom: 2px;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-table-body > tr > td[data-label="Action"]::before,
    body[data-ui-shell="mobile"] #view-devices #devices-table-body > tr > td[data-label="ACTION"]::before {
        display: none;
        content: none;
    }

    body[data-ui-shell="mobile"] #view-devices #device-models-table-body > tr > td[data-label="Action"]::before,
    body[data-ui-shell="mobile"] #view-devices #device-models-table-body > tr > td[data-label="ACTION"]::before {
        display: none;
        content: none;
    }

    body[data-ui-shell="mobile"] #view-devices #device-warranty-templates-body > tr > td[data-label="Action"]::before,
    body[data-ui-shell="mobile"] #view-devices #device-warranty-templates-body > tr > td[data-label="ACTION"]::before {
        display: none;
        content: none;
    }

    body[data-ui-shell="mobile"] #view-devices table tbody > tr > td strong {
        font-size: 13px;
    }

    body[data-ui-shell="mobile"] #view-devices table tbody > tr > td:last-child .wmts-table-action-icon {
        margin-left: auto;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-log-pagination {
        justify-content: center !important;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-detail-view .devices-detail-header {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: flex-start;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-detail-view .devices-detail-header-left,
    body[data-ui-shell="mobile"] #view-devices #devices-detail-view .devices-detail-header-actions {
        width: 100%;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-detail-view .devices-detail-layout {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-detail-view .devices-detail-side {
        order: -1;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-sub-view-settings .devices-settings-actions {
        width: 100%;
        margin-left: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-sub-view-settings .devices-settings-actions > button {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }

    body[data-ui-shell="mobile"] #view-devices .wmts-sortable-handle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        touch-action: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }

    body[data-ui-shell="mobile"] #view-devices table tbody > tr,
    body[data-ui-shell="mobile"] #view-devices table tbody > tr > td,
    body[data-ui-shell="mobile"] #view-devices .module-kpi-card,
    body[data-ui-shell="mobile"] #view-devices .sub-tab,
    body[data-ui-shell="mobile"] #view-devices .devices-detail-card,
    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-card,
    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-log-card,
    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-card,
    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-qr-card {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }

    body[data-ui-shell="mobile"] #view-devices table tbody > tr,
    body[data-ui-shell="mobile"] #view-devices .module-kpi-card,
    body[data-ui-shell="mobile"] #view-devices .devices-detail-card {
        touch-action: pan-y;
    }

    body[data-ui-shell="mobile"] .module-kpi-card,
    body[data-ui-shell="mobile"] .wmts-inv-mobile-asset-card,
    body[data-ui-shell="mobile"] .wmts-inv-mobile-log-card,
    body[data-ui-shell="mobile"] .wmts-inv-mobile-adjust-card,
    body[data-ui-shell="mobile"] .wmts-inv-mobile-qr-card {
        -webkit-tap-highlight-color: transparent;
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        touch-action: pan-y;
    }

    body[data-ui-shell="mobile"] #view-devices .module-kpi-strip,
    body[data-ui-shell="mobile"] #view-devices .module-kpi-grid,
    body[data-ui-shell="mobile"] #view-devices .sub-tab-container,
    body[data-ui-shell="mobile"] #view-devices .sub-tab-container *:not(input):not(textarea):not(select),
    body[data-ui-shell="mobile"] #view-devices table tbody > tr,
    body[data-ui-shell="mobile"] #view-devices table tbody > tr > td {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }

    body[data-ui-shell="mobile"] #view-devices table tbody tr[onclick]:hover td,
    body[data-ui-shell="mobile"] #view-devices table tbody tr[onclick]:active td,
    body[data-ui-shell="mobile"] #view-devices tbody tr:hover td,
    body[data-ui-shell="mobile"] #view-devices tbody tr:active td {
        box-shadow: none !important;
    }

    body[data-ui-shell="mobile"] #view-devices table tbody tr[onclick]:focus,
    body[data-ui-shell="mobile"] #view-devices table tbody tr[onclick]:focus-visible {
        outline: none !important;
    }

    body[data-ui-shell="mobile"] .sortable-table-mobile .wmts-sortable-item {
        transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
        touch-action: manipulation;
    }

    body[data-ui-shell="mobile"] .wmts-sortable-list.wmts-mobile-sortable-active .wmts-sortable-item {
        touch-action: none;
    }

    body[data-ui-shell="mobile"] .wmts-sortable-list.wmts-mobile-sortable-active .wmts-sortable-item.is-touch-dragging {
        opacity: 0.92;
        transform: scale(1.02);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
        z-index: 8;
    }

    body[data-ui-shell="mobile"] .sortable-table-mobile .wmts-sortable-handle {
        cursor: grab;
    }

    body[data-ui-shell="mobile"] .sortable-table-mobile .wmts-sortable-item {
        cursor: grab;
    }

    body[data-ui-shell="mobile"] .sortable-table-mobile .wmts-sortable-item,
    body[data-ui-shell="mobile"] .sortable-table-mobile .wmts-sortable-item * {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
        -webkit-user-drag: none;
    }

    body[data-ui-shell="mobile"] #view-inventory .inventory-assets-toolbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-inventory .inventory-assets-filter-group,
    body[data-ui-shell="mobile"] #view-inventory .inventory-assets-action-group {
        display: contents;
    }

body[data-ui-shell="mobile"] #view-inventory .inventory-assets-filter-group > *,
body[data-ui-shell="mobile"] #view-inventory .inventory-assets-action-group > * {
    flex: 1 1 calc(33.333% - 6px);
    min-width: 0;
}

html.wmts-touch-sorting,
body.wmts-touch-sorting {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none !important;
}

    body[data-ui-shell="mobile"] #view-inventory .inventory-assets-filter-group .wmts-check-toggle {
        flex-basis: 100%;
        width: 100%;
        order: 1;
    }

    body[data-ui-shell="mobile"] #view-inventory #filter-main,
    body[data-ui-shell="mobile"] #view-inventory #filter-category-select,
    body[data-ui-shell="mobile"] #view-inventory .inventory-reset-btn {
        order: 2;
    }

    body[data-ui-shell="mobile"] #view-inventory .inventory-reset-btn {
        justify-content: center;
        align-items: center;
        order: 3;
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 0;
        padding-left: 12px;
        padding-right: 12px;
    }

    body[data-ui-shell="mobile"] #view-inventory #filter-main,
    body[data-ui-shell="mobile"] #view-inventory #filter-category-select {
        flex: 1 1 0 !important;
    }

    body[data-ui-shell="mobile"] #view-inventory #filter-category-select {
        min-width: 96px !important;
    }

    body[data-ui-shell="mobile"] #view-inventory .inventory-assets-filter-group .table-select,
    body[data-ui-shell="mobile"] #view-inventory .inventory-assets-action-group .table-select {
        width: 100%;
        min-width: 0;
    }

    body[data-ui-shell="mobile"] #view-inventory #inv-toolbar {
        width: 100%;
        order: 3;
    }

    body[data-ui-shell="mobile"] #view-inventory #inv-toolbar > button {
        width: 100%;
    }

    /* Quick Check In/Out mobile card-style tables */
    body[data-ui-shell="mobile"] #view-events table thead {
        display: none;
    }

    body[data-ui-shell="mobile"] #view-events table {
        display: block;
        width: 100%;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        margin: 0;
    }

    body[data-ui-shell="mobile"] #view-events table tbody {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-events table tbody > tr {
        display: grid;
        gap: 8px;
        padding: 10px 12px;
        border: 1px solid var(--table-border-strong);
        border-radius: 12px;
        background: var(--table-row-bg-strong) !important;
    }

    body[data-ui-shell="mobile"] #view-events table tbody > tr > td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        min-width: 0;
        border: 0 !important;
        background: transparent !important;
        padding: 0 !important;
        font-size: 12px;
        line-height: 1.3;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    body[data-ui-shell="mobile"] #view-events table tbody > tr > td::before {
        content: attr(data-label);
        flex: 0 0 108px;
        min-width: 108px;
        max-width: 108px;
        font-size: 10px;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--table-muted-strong);
        font-weight: 700;
        line-height: 1.25;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(1),
    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(3),
    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(5) {
        display: block;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(1)::before,
    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(3)::before,
    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(5)::before {
        display: block;
        min-width: 0;
        max-width: none;
        margin-bottom: 2px;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(4) {
        display: block;
        text-align: center;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(4)::before {
        display: block;
        min-width: 0;
        max-width: none;
        margin-bottom: 6px;
        text-align: left;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(4) img {
        margin: 0 auto !important;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(5) > div {
        justify-content: flex-start !important;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr {
        grid-template-columns: minmax(0, 1fr) 112px;
        column-gap: 12px;
        row-gap: 4px;
        align-items: start;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(3) {
        grid-column: 1;
        grid-row: 3;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        text-align: right;
        display: block;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        text-align: center;
        align-self: start;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 4px;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(5) {
        grid-column: 2;
        grid-row: 3;
        justify-self: end;
        align-self: end;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(2)::before,
    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(4)::before,
    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(5)::before {
        display: none !important;
        content: none !important;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(5) > div {
        justify-content: flex-end !important;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr > td:nth-child(4) img {
        width: 88px !important;
        height: 88px !important;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr.wmts-events-mobile-pack-row > td {
        display: block !important;
        padding: 0 !important;
        width: 100%;
        grid-column: 1 / -1 !important;
        background: transparent !important;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr.wmts-events-mobile-pack-row {
        grid-template-columns: minmax(0, 1fr) !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-events #events-table-body > tr.wmts-events-mobile-pack-row > td::before {
        display: none !important;
        content: none !important;
    }

    body[data-ui-shell="mobile"] #view-events .wmts-events-mobile-pack-card {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 8px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding: 10px 12px;
        border: 1px solid var(--table-border-strong);
        border-radius: 12px;
        background: var(--table-row-bg-strong) !important;
        box-shadow: 0 10px 20px rgba(2, 8, 23, 0.18);
    }

    body[data-ui-shell="mobile"] #view-events .wmts-events-mobile-pack-left {
        flex: 1 1 auto;
        min-width: 0;
        text-align: left;
        justify-self: start;
    }

    body[data-ui-shell="mobile"] #view-events .wmts-events-mobile-pack-right {
        flex: 0 0 auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-self: end;
        margin-left: auto;
        text-align: right;
        gap: 6px;
    }

    body[data-ui-shell="mobile"] #view-events .wmts-events-mobile-pack-label {
        font-size: 10px;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--table-muted-strong);
        font-weight: 700;
        line-height: 1.25;
    }

    body[data-ui-shell="mobile"] #view-events .wmts-events-mobile-pack-name {
        font-size: 15px;
        font-weight: 700;
        line-height: 1.25;
        margin-top: 2px;
    }

    body[data-ui-shell="mobile"] #view-events .wmts-events-mobile-pack-meta,
    body[data-ui-shell="mobile"] #view-events .wmts-events-mobile-meta-line {
        font-size: 11px;
        color: #95a5a6;
        line-height: 1.25;
        margin-top: 4px;
    }

    body[data-ui-shell="mobile"] #view-events .wmts-events-mobile-pack-assets-label {
        margin-top: 8px;
    }

    body[data-ui-shell="mobile"] #view-events .wmts-events-mobile-pack-assets {
        font-size: 12px;
        line-height: 1.3;
        margin-top: 2px;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    body[data-ui-shell="mobile"] #view-events .wmts-events-mobile-pack-qr {
        width: 88px;
        height: 88px;
        border: 1px solid #455a64;
        border-radius: 6px;
        background: #fff;
        padding: 2px;
        cursor: pointer;
        display: block;
    }

    body[data-ui-shell="mobile"] #view-events .wmts-events-mobile-pack-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        margin-top: 2px;
    }

    body[data-ui-shell="mobile"] #main-dashboard .tab-content #view-events #events-table-body > tr.wmts-events-mobile-pack-row:nth-child(odd) > td,
    body[data-ui-shell="mobile"] #main-dashboard .tab-content #view-events #events-table-body > tr.wmts-events-mobile-pack-row:nth-child(even) > td,
    body[data-ui-shell="mobile"] #main-dashboard .tab-content #view-helpdesk #helpdesk-ticket-table-body > tr:nth-child(odd) > td,
    body[data-ui-shell="mobile"] #main-dashboard .tab-content #view-helpdesk #helpdesk-ticket-table-body > tr:nth-child(even) > td,
    body[data-ui-shell="mobile"] #main-dashboard .tab-content #view-helpdesk #helpdesk-mailbox-table-body > tr:nth-child(odd) > td,
    body[data-ui-shell="mobile"] #main-dashboard .tab-content #view-helpdesk #helpdesk-mailbox-table-body > tr:nth-child(even) > td {
        background: transparent !important;
    }

    /* Helpdesk mobile overhaul */
    body[data-ui-shell="mobile"] #view-helpdesk .admin-section > h2 {
        display: none;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-list-view > div[style*="margin-bottom:12px"] {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: stretch !important;
        margin-bottom: 8px !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-list-view > div[style*="margin-bottom:12px"] > .search-input {
        min-width: 0 !important;
        width: 100%;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-list-view > div[style*="margin-bottom:12px"] > div[style*="justify-content:flex-end"] {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-bulk-status,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-bulk-assigned,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-bulk-transfer {
        display: none !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-list-view > div[style*="margin-bottom:12px"] > div[style*="justify-content:flex-end"] > .btn-close,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-list-view > div[style*="margin-bottom:12px"] > div[style*="justify-content:flex-end"] .wmts-menu-select {
        display: none !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-add-ticket-btn,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-list-view > div[style*="margin-bottom:12px"] .btn-close {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        flex: 1 1 auto !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-list-view table thead,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes table thead {
        display: none !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-list-view table,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes table {
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-list-view table tbody,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes table tbody,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-list-view table tr,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes table tr {
        background: transparent !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body {
        display: flex;
        flex-direction: column;
        gap: 10px;
        background: transparent !important;
        padding: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body > tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
        padding: 10px 12px;
        border: 1px solid var(--table-border-strong);
        border-radius: 12px;
        background: var(--table-row-bg-strong) !important;
        box-shadow: none;
        overflow: hidden;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body > tr > td {
        border: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        min-width: 0;
        font-size: 12px;
        line-height: 1.3;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td::before,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body > tr > td::before {
        display: block;
        margin-bottom: 3px;
        font-size: 10px;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--table-muted-strong);
        font-weight: 700;
        line-height: 1.2;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body {
        gap: 12px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(2) {
        margin-bottom: 2px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(8) {
        margin-top: 2px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(1) {
        display: none;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(2) {
        grid-column: 1;
        grid-row: 1;
        font-size: 14px;
        font-weight: 700;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(2)::before {
        content: "Ticket";
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(3) {
        grid-column: 1;
        grid-row: 2;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(3)::before {
        content: "Subject";
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(4) {
        grid-column: 1;
        grid-row: 3;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(4)::before {
        content: "Submitted By";
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(5) {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        text-align: right;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(5)::before {
        content: "Status";
        text-align: right;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(6) {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        text-align: right;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(6)::before {
        content: "Priority";
        text-align: right;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(7) {
        grid-column: 2;
        grid-row: 3;
        justify-self: end;
        text-align: right;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(7)::before {
        content: "Assigned";
        text-align: right;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(8) {
        grid-column: 1;
        grid-row: 4;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(8)::before {
        content: "Last Message";
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(9) {
        grid-column: 2;
        grid-row: 4;
        align-self: end;
        justify-self: end;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(9)::before {
        display: none;
        content: none;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr > td:nth-child(9) .btn-close {
        min-height: 32px;
        padding: 0 10px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .wmts-helpdesk-ticket-actions {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-top: 2px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .wmts-helpdesk-ticket-actions .wmts-helpdesk-mobile-edit-trigger {
        display: inline-flex !important;
        width: 32px;
        min-width: 32px;
        padding: 0;
        justify-content: center;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .wmts-helpdesk-ticket-actions .wmts-helpdesk-mobile-edit-trigger .wmts-table-action-glyph {
        font-family: "Segoe Fluent Icons", "Segoe MDL2 Assets", "Segoe UI Symbol", sans-serif;
        font-size: 14px;
        line-height: 1;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-select-all {
        display: none !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes > div[style*="margin-bottom:10px"] {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes > div[style*="margin-bottom:10px"] > div {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes > div[style*="margin-bottom:10px"] .search-input,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes > div[style*="margin-bottom:10px"] button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body > tr {
        grid-template-columns: minmax(0, 1fr);
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body > tr > td:nth-child(1)::before {
        content: "Mailbox";
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body > tr > td:nth-child(2)::before {
        content: "Host";
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body > tr > td:nth-child(3)::before {
        content: "User";
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body > tr > td:nth-child(4)::before {
        content: "Status";
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body > tr > td:nth-child(5)::before {
        content: "Last Polled";
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body > tr > td:nth-child(6)::before {
        content: "Last Error";
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body > tr > td:nth-child(7)::before {
        content: "Action";
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-subtabs {
        margin-bottom: 8px !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-form .helpdesk-form-config-stack,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-ticket .helpdesk-ticket-admin-grid,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-priority .helpdesk-ticket-admin-grid,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-replysetup .modal-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-form .helpdesk-form-link-row,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-ticket .helpdesk-inline-row,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-priority .helpdesk-inline-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #helpdesk-custom-field-modal .helpdesk-custom-field-modal-grid {
        grid-template-columns: 1fr !important;
    }

    body[data-ui-shell="mobile"] #helpdesk-custom-field-modal .helpdesk-custom-field-modal-spacer {
        display: none;
    }

    body[data-ui-shell="mobile"] #helpdesk-custom-field-modal .helpdesk-custom-field-option-add-row {
        grid-template-columns: 1fr;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-detail-toolbar {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 8px;
        align-items: start;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-detail-toolbar > .wmts-helpdesk-ticket-back-btn {
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-detail-toolbar > .wmts-helpdesk-ticket-back-btn .wmts-helpdesk-ticket-back-label {
        display: none;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-detail-toolbar > .wmts-helpdesk-ticket-back-btn .wmts-table-action-glyph {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-detail-toolbar > .wmts-helpdesk-ticket-back-btn .wmts-helpdesk-ticket-back-icon.wmts-svg-icon-wrap svg {
        width: 18px;
        height: 18px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-detail-toolbar-actions {
        display: flex;
        justify-content: end;
        flex-wrap: wrap;
        gap: 8px;
        width: auto;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-detail-toolbar-actions .wmts-menu-select.wmts-menu-select-icon {
        width: 56px;
        min-width: 56px;
        height: 38px;
        min-height: 38px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-detail-toolbar-actions .wmts-helpdesk-ticket-edit-btn {
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-meta-grid {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-meta-column {
        grid-template-columns: minmax(88px, max-content) minmax(0, 1fr);
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-meta-column span {
        text-align: left;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-meta-responses-card {
        margin-top: 8px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-meta-responses-body {
        max-height: 180px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-detail-flags,
    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-detail-footer-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-detail-footer-actions > button {
        width: 100%;
        margin-left: 0 !important;
    }

    body[data-ui-shell="mobile"] #helpdesk-ticket-edit-modal .wmts-helpdesk-ticket-edit-modal-content {
        max-width: min(94vw, 620px);
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-messages,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-subject-description {
        overflow-x: hidden;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-reply-attachments-toolbar {
        grid-template-columns: 1fr;
        display: grid;
        gap: 8px;
        align-items: stretch;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-reply-attachments-toolbar > .select-file-btn {
        width: 100%;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-ticket .wmts-sortable-panel,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-priority .wmts-sortable-panel,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-form .wmts-sortable-panel {
        padding: 8px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-form .helpdesk-form-table {
        --helpdesk-form-mobile-toggle-col: 116px;
        --helpdesk-form-mobile-action-col: 52px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-form .helpdesk-form-table-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) var(--helpdesk-form-mobile-toggle-col) var(--helpdesk-form-mobile-action-col);
        gap: 8px;
        align-items: center;
        padding: 8px 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-form .helpdesk-form-table-head > div:nth-child(2),
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-form .helpdesk-form-table-head > div:nth-child(4) {
        display: none;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-form .helpdesk-form-table-head > div:nth-child(1) {
        font-size: 0;
        text-align: left;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-form .helpdesk-form-table-head > div:nth-child(1)::before {
        content: "Label";
        font-size: 11px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-form .helpdesk-form-table-head > div:nth-child(3) {
        grid-column: 2;
        font-size: 0;
        text-align: center;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-form .helpdesk-form-table-head > div:nth-child(3)::before {
        content: "Enabled / Required";
        font-size: 10px;
        white-space: nowrap;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-form .helpdesk-form-table-head > div:nth-child(5) {
        font-size: 0;
        text-align: right;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-form .helpdesk-form-table-head > div:nth-child(5)::before {
        content: "Action";
        font-size: 11px;
        white-space: nowrap;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable {
        display: grid;
        gap: 0;
        background: var(--table-row-bg-strong);
        border-radius: 0 0 var(--module-radius) var(--module-radius);
        padding: 0;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-table-row.wmts-sortable-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) var(--helpdesk-form-mobile-toggle-col) var(--helpdesk-form-mobile-action-col);
        grid-template-rows: auto auto;
        gap: 8px;
        align-items: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 8px 10px;
        border: 0;
        border-radius: 0;
        background: var(--wmts-sortable-row-bg, var(--table-row-bg-strong));
        overflow: hidden;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell {
        display: flex;
        align-items: center;
        width: 100%;
        min-width: 0;
        padding: 0;
        justify-content: flex-start !important;
        text-align: left !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell::before {
        display: none;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(1) .wmts-sortable-item-main {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-width: 0;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(1) strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(1) .wmts-sortable-item-meta {
        display: none;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(2) {
        display: none;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(1) {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(3),
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(4) {
        justify-content: center !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(3) {
        grid-column: 2;
        grid-row: 1;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(3) .wmts-check-toggle,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(4) .wmts-check-toggle {
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        gap: 6px !important;
        margin: 0 auto !important;
        justify-content: center;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(3) .wmts-check-toggle > span,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(4) .wmts-check-toggle > span {
        white-space: nowrap;
        font-size: 11px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(3) .wmts-check-toggle:hover,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(4) .wmts-check-toggle:hover {
        box-shadow: none !important;
        border-color: transparent !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-cell:nth-child(5) {
        grid-column: 3;
        grid-row: 1 / span 2;
        justify-content: flex-end !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-actions {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: space-between;
        gap: 8px;
        width: var(--helpdesk-form-mobile-action-col);
        min-height: 56px;
        min-width: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable .helpdesk-form-actions .wmts-table-action-icon {
        margin: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable.sortable-table-mobile .wmts-sortable-item,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-form-layout-sortable.sortable-table-mobile .wmts-sortable-item * {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-ticket .wmts-sortable-panel,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-priority .wmts-sortable-panel {
        padding: 0;
        border: 1px solid var(--table-border-strong);
        border-radius: 12px;
        background: var(--table-wrap-bg, var(--surface-panel-alt));
        overflow: hidden;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-ticket .wmts-sortable-panel > .wmts-sortable-header,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-admin-view-priority .wmts-sortable-panel > .wmts-sortable-header {
        border-radius: 0;
        padding: 8px 10px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-status-sortable,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-priority-sortable {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-sortable-list .wmts-sortable-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-sortable-list .wmts-sortable-item-main {
        flex: 1 1 auto;
        min-width: 0;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-sortable-list .wmts-sortable-item-main .wmts-sortable-item-meta {
        white-space: nowrap;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-sortable-list .wmts-sortable-actions {
        flex: 0 0 auto;
        min-width: 0;
        max-width: 52%;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 6px;
    }

    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-sortable-list .wmts-sortable-actions > .table-select,
    body[data-ui-shell="mobile"] #view-helpdesk .helpdesk-ticket-sortable-list .wmts-sortable-actions > button {
        min-width: 0;
        margin-right: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-status-sortable .wmts-sortable-actions > .table-select {
        width: 112px;
        min-width: 112px;
        max-width: 112px;
    }

    /* Network Hosts mobile cards */
    body[data-ui-shell="mobile"] #view-network #network-sub-view-hosts #network-host-bulk-toolbar {
        display: none !important;
    }

    body[data-ui-shell="mobile"] #view-network #network-sub-view-hosts table thead {
        display: none !important;
    }

    body[data-ui-shell="mobile"] #view-network #network-sub-view-hosts table {
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        background: transparent !important;
        padding: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr {
        display: grid;
        gap: 8px;
        padding: var(--wmts-mobile-card-padding);
        border: 1px solid var(--wmts-mobile-card-row-border, var(--wmts-mobile-card-border));
        border-radius: var(--wmts-mobile-card-radius);
        background: var(--wmts-mobile-card-row-bg, var(--wmts-mobile-card-bg)) !important;
        box-shadow: var(--wmts-mobile-card-row-shadow, var(--wmts-mobile-card-shadow));
    }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td {
        border: 0 !important;
        background: transparent !important;
        padding: 0 !important;
        min-width: 0;
        font-size: 12px;
        line-height: 1.3;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(1) {
        display: none !important;
    }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td[colspan] {
        display: block;
    }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td[colspan]::before {
        display: none !important;
        content: none !important;
    }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(n+2):not([colspan])::before {
        display: block;
        margin-bottom: 2px;
        font-size: 10px;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--table-muted-strong);
        font-weight: 700;
        line-height: 1.25;
    }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(2)::before { content: "Host"; }
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(3)::before { content: "Address"; }
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(4)::before { content: "Group"; }
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(5)::before { content: "Function"; }
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(6)::before { content: "Status"; }
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(7)::before { content: "MAC Address"; }
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(8)::before { content: "Location"; }
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(9)::before { content: "Last Check"; }
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(10)::before { content: "Action"; }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(10) {
        display: flex;
        justify-content: flex-end;
    }

    /* Hosts mobile cards: fixed right stack (status -> last check -> function, actions bottom-right) */
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr {
        position: relative;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "host"
            "address"
            "group"
            "location";
        row-gap: 8px;
        padding-right: 142px;
        min-height: 170px;
    }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(2) { grid-area: host; }
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(3) { grid-area: address; }
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(4) { grid-area: group; }
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(8) { grid-area: location; }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(7) {
        display: none !important;
    }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(5),
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(6),
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(9),
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(10) {
        position: absolute;
        right: 12px;
        width: 124px;
        text-align: right;
    }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(6) { top: 10px; }
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(9) { top: 48px; }
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(5) { top: 94px; }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(10) {
        bottom: 10px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 6px;
    }

    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(6)::before,
    body[data-ui-shell="mobile"] #view-network #network-hosts-body > tr > td:nth-child(10)::before {
        display: none !important;
        content: none !important;
    }

    /* Network Script Library + Workflows mobile cards */
    body[data-ui-shell="mobile"] #view-network #network-sub-view-scripts table thead,
    body[data-ui-shell="mobile"] #view-network #network-sub-view-scripts-workflows table thead {
        display: none !important;
    }

    body[data-ui-shell="mobile"] #view-network #network-sub-view-scripts table,
    body[data-ui-shell="mobile"] #view-network #network-sub-view-scripts-workflows table {
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body[data-ui-shell="mobile"] #view-network #script-manager-table-body,
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        background: transparent !important;
        padding: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr,
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr {
        display: grid;
        gap: 8px;
        padding: var(--wmts-mobile-card-padding);
        border: 1px solid var(--wmts-mobile-card-row-border, var(--wmts-mobile-card-border));
        border-radius: var(--wmts-mobile-card-radius);
        background: var(--wmts-mobile-card-row-bg, var(--wmts-mobile-card-bg)) !important;
        box-shadow: var(--wmts-mobile-card-row-shadow, var(--wmts-mobile-card-shadow));
    }

    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td,
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td {
        border: 0 !important;
        background: transparent !important;
        padding: 0 !important;
        min-width: 0;
        font-size: 12px;
        line-height: 1.3;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td[colspan],
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td[colspan] {
        display: block;
    }

    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td[colspan]::before,
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td[colspan]::before {
        display: none !important;
        content: none !important;
    }

    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:not([colspan])::before,
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:not([colspan])::before {
        display: block;
        margin-bottom: 2px;
        font-size: 10px;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--table-muted-strong);
        font-weight: 700;
        line-height: 1.25;
    }

    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(1)::before { content: "Name"; }
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(2)::before { content: "Shell"; }
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(3)::before { content: "Source"; }
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(4)::before { content: "Schedule"; }
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(5)::before { content: "Last Run"; }
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(6)::before { content: "Status"; }
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(7)::before { content: "Actions"; }

    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(1)::before { content: "Workflow"; }
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(2)::before { content: "Steps"; }
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(3)::before { content: "Last Run"; }
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(4)::before { content: "Status"; }
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(5)::before { content: "Actions"; }

    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(7),
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(5) {
        display: flex;
        justify-content: flex-end;
    }

    /* Script Library mobile cards: custom right-column stack */
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "name status"
            "shell lastrun"
            "source schedule"
            ". actions";
        align-items: start;
        column-gap: 12px;
    }

    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(1) { grid-area: name; }
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(2) { grid-area: shell; }
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(3) { grid-area: source; }
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(4) { grid-area: schedule; }
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(5) { grid-area: lastrun; }
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(6) { grid-area: status; }
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(7) { grid-area: actions; }

    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(6) {
        justify-self: end;
        text-align: right;
    }

    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(4),
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(5),
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(7) {
        justify-self: end;
        text-align: right;
    }

    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(6)::before,
    body[data-ui-shell="mobile"] #view-network #script-manager-table-body > tr > td:nth-child(7)::before {
        display: none !important;
        content: none !important;
    }

    /* Script Workflows mobile cards: fixed right stack (status -> last run -> actions) */
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr {
        position: relative;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "workflow"
            "steps";
        align-items: start;
        row-gap: 8px;
        padding-right: 142px;
        min-height: 132px;
    }

    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(1) { grid-area: workflow; }
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(2) { grid-area: steps; }
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(3),
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(4),
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(5) {
        position: absolute;
        right: 12px;
        width: 124px;
        text-align: right;
    }
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(4) { top: 10px; }
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(3) { top: 50px; }
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(5) {
        bottom: 10px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 6px;
    }

    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(4)::before,
    body[data-ui-shell="mobile"] #view-network #workflow-manager-table-body > tr > td:nth-child(5)::before {
        display: none !important;
        content: none !important;
    }

    /* Network Function Manager + Auto Discovery + Credential Manager mobile cards */
    body[data-ui-shell="mobile"] #view-network #network-sub-view-functions table thead,
    body[data-ui-shell="mobile"] #view-network #network-sub-view-discovery table thead,
    body[data-ui-shell="mobile"] #view-network #network-sub-view-scripts-hosts table thead {
        display: none !important;
    }

    body[data-ui-shell="mobile"] #view-network #network-sub-view-functions table,
    body[data-ui-shell="mobile"] #view-network #network-sub-view-discovery table,
    body[data-ui-shell="mobile"] #view-network #network-sub-view-scripts-hosts table {
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body[data-ui-shell="mobile"] #view-network :is(#network-functions-body, #network-discovery-body, #script-host-table-body) {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        background: transparent !important;
        padding: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-network :is(#network-functions-body, #network-discovery-body, #script-host-table-body) > tr > td[colspan] {
        display: block;
    }

    body[data-ui-shell="mobile"] #view-network :is(#network-functions-body, #network-discovery-body, #script-host-table-body) > tr > td[colspan]::before {
        display: none !important;
        content: none !important;
    }

    /* Global mobile card system (device style baseline) */
    body[data-ui-shell="mobile"] {
        --wmts-mobile-card-bg: var(--table-row-bg-strong);
        --wmts-mobile-card-border: var(--table-border-strong);
        --wmts-mobile-card-radius: 12px;
        --wmts-mobile-card-padding: 10px 12px;
        --wmts-mobile-card-shadow: none;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-data-card {
        border: 1px solid var(--wmts-mobile-card-row-border, var(--wmts-mobile-card-border));
        border-radius: var(--wmts-mobile-card-radius);
        padding: var(--wmts-mobile-card-padding);
        background: var(--wmts-mobile-card-row-bg, var(--wmts-mobile-card-bg)) !important;
        box-shadow: var(--wmts-mobile-card-row-shadow, var(--wmts-mobile-card-shadow));
    }

    /* Optional state variants available globally (not required to be used everywhere) */
    body[data-ui-shell="mobile"] .wmts-mobile-data-card.is-ok {
        --wmts-mobile-card-row-border: var(--table-ok-border, #2ca36f);
        --wmts-mobile-card-row-bg: color-mix(in srgb, var(--table-ok-bg, #1f4d3a) 84%, var(--wmts-mobile-card-bg) 16%);
        --wmts-mobile-card-row-shadow: 0 10px 20px color-mix(in srgb, var(--table-ok-border, #2ca36f) 20%, transparent);
    }

    body[data-ui-shell="mobile"] .wmts-mobile-data-card.is-warn {
        --wmts-mobile-card-row-border: var(--table-warning-border, #9e7a2f);
        --wmts-mobile-card-row-bg: color-mix(in srgb, var(--table-warning-bg, #4b3b1f) 84%, var(--wmts-mobile-card-bg) 16%);
        --wmts-mobile-card-row-shadow: 0 10px 20px color-mix(in srgb, var(--table-warning-border, #9e7a2f) 24%, transparent);
    }

    body[data-ui-shell="mobile"] .wmts-mobile-data-card.is-danger {
        --wmts-mobile-card-row-border: var(--table-immediate-border, #a84a52);
        --wmts-mobile-card-row-bg: color-mix(in srgb, var(--table-immediate-bg, #4a2326) 86%, var(--wmts-mobile-card-bg) 14%);
        --wmts-mobile-card-row-shadow: 0 10px 20px color-mix(in srgb, var(--table-immediate-border, #a84a52) 24%, transparent);
    }

    body[data-ui-shell="mobile"] :is(
        .wmts-mobile-card-list,
        #view-devices table tbody,
        #view-inventory .wmts-inventory-mobile-cards,
        #view-helpdesk #helpdesk-ticket-table-body,
        #view-helpdesk #helpdesk-mailbox-table-body
    ) {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        background: transparent !important;
        padding: 0 !important;
    }

    body[data-ui-shell="mobile"] :is(
        .wmts-mobile-card-row,
        #view-devices table tbody > tr,
        #view-inventory .wmts-inv-mobile-asset-card,
        #view-inventory .wmts-inv-mobile-log-card,
        #view-inventory .wmts-inv-mobile-adjust-card,
        #view-inventory .wmts-inv-mobile-qr-card,
        #view-helpdesk #helpdesk-ticket-table-body > tr,
        #view-helpdesk #helpdesk-mailbox-table-body > tr
    ) {
        display: grid;
        gap: 8px;
        padding: var(--wmts-mobile-card-padding);
        border: 1px solid var(--wmts-mobile-card-row-border, var(--wmts-mobile-card-border));
        border-radius: var(--wmts-mobile-card-radius);
        background: var(--wmts-mobile-card-row-bg, var(--wmts-mobile-card-bg)) !important;
        box-shadow: var(--wmts-mobile-card-row-shadow, var(--wmts-mobile-card-shadow));
    }

    body[data-ui-shell="mobile"] #view-devices table tbody > tr:nth-child(even) {
        background: var(--table-row-bg-strong) !important;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-card.is-low {
        --wmts-mobile-card-row-border: var(--table-immediate-border, #8a3a3a);
        --wmts-mobile-card-row-bg: color-mix(in srgb, var(--table-immediate-bg, rgba(131, 48, 48, 0.25)) 88%, var(--wmts-mobile-card-bg) 12%);
        --wmts-mobile-card-row-shadow: 0 10px 20px color-mix(in srgb, var(--table-immediate-border, #8a3a3a) 24%, transparent);
    }

    /* Extra-specific lock to ensure helpdesk data cards cannot diverge from global card style */
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-list-view #helpdesk-ticket-table-body > tr,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes #helpdesk-mailbox-table-body > tr {
        border: 1px solid var(--wmts-mobile-card-row-border, var(--wmts-mobile-card-border)) !important;
        border-radius: var(--wmts-mobile-card-radius) !important;
        padding: var(--wmts-mobile-card-padding) !important;
        background: var(--wmts-mobile-card-row-bg, var(--wmts-mobile-card-bg)) !important;
        box-shadow: var(--wmts-mobile-card-row-shadow, var(--wmts-mobile-card-shadow)) !important;
    }

    body[data-ui-shell="mobile"] :is(
        .wmts-mobile-card-cell,
        #view-devices table tbody > tr > td,
        #view-helpdesk #helpdesk-ticket-table-body > tr > td,
        #view-helpdesk #helpdesk-mailbox-table-body > tr > td
    ) {
        border: 0 !important;
        background: transparent !important;
        padding: 0 !important;
        min-width: 0;
        font-size: 12px;
        line-height: 1.3;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    body[data-ui-shell="mobile"] :is(
        .wmts-mobile-card-cell--labeled::before,
        #view-devices table tbody > tr > td::before,
        #view-helpdesk #helpdesk-ticket-table-body > tr > td::before,
        #view-helpdesk #helpdesk-mailbox-table-body > tr > td::before
    ) {
        display: block;
        margin-bottom: 2px;
        font-size: 10px;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--table-muted-strong);
        font-weight: 700;
        line-height: 1.25;
    }

    body[data-ui-shell="mobile"] .wmts-mobile-card-cell--labeled[data-label]::before {
        content: attr(data-label);
    }

    body[data-ui-shell="mobile"] .wmts-mobile-card-cell[data-label="Actions"] {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 6px;
    }

    body[data-ui-shell="mobile"] #helpdesk-mobile-ticket-edit-modal .wmts-helpdesk-mobile-edit-modal {
        max-width: 460px;
    }

    body[data-ui-shell="mobile"] #helpdesk-mobile-ticket-edit-modal .wmts-helpdesk-mobile-edit-ticket {
        font-size: 13px;
        color: var(--text-secondary);
        margin-bottom: 8px;
    }

    /* Deep-override: keep data-card surfaces identical across mobile modules */
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-ticket-table-body > tr,
    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-mailbox-table-body > tr,
    body[data-ui-shell="mobile"] #view-devices table tbody > tr,
    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-card,
    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-log-card,
    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-adjust-card,
    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-qr-card {
        border-color: var(--table-border-strong) !important;
        background: var(--table-row-bg-strong) !important;
        box-shadow: none !important;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-table-body > tr.table-row-warning {
        border-color: var(--table-warning-border) !important;
        background: var(--table-warning-bg) !important;
        box-shadow: none !important;
    }

    body[data-ui-shell="mobile"] #view-devices #devices-table-body > tr.table-row-warning:hover,
    body[data-ui-shell="mobile"] #view-devices #devices-table-body > tr.table-row-warning:active {
        background: var(--table-warning-hover-bg) !important;
    }

    body[data-ui-shell="mobile"] #view-inventory .wmts-inv-mobile-asset-card.is-low {
        border-color: var(--table-immediate-border, #8a3a3a) !important;
        background: color-mix(in srgb, var(--table-immediate-bg, rgba(131, 48, 48, 0.25)) 88%, transparent) !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes #helpdesk-mailbox-table-body > tr.helpdesk-mailbox-card-row {
        display: block !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes #helpdesk-mailbox-table-body > tr.helpdesk-mailbox-card-row > td {
        padding: 0 !important;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes .helpdesk-mailbox-card {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "main meta"
            "main actions";
        align-items: start;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes .helpdesk-mailbox-card-meta {
        justify-items: end;
        align-content: start;
    }

    body[data-ui-shell="mobile"] #view-helpdesk #helpdesk-sub-view-mailboxes .helpdesk-mailbox-card-actions {
        justify-self: end;
    }
}





