/*
 * Compact mobile layout for CybSoft Admin.
 * Desktop >= 993px and club_workplace.php are intentionally unaffected.
 */
@media (max-width: 992px) {
    html:has(body.mobile-app) {
        height: 100dvh;
        overflow: hidden;
    }

    html body.mobile-app:not(.page-admin-workplace) {
        --mobile-gutter: 6px;
        --mobile-bar-height: 38px;
        --mobile-control-height: 30px;
        --mobile-radius: 6px;
        width: 100%;
        min-width: 0;
        height: 100dvh;
        min-height: 100dvh;
        margin: 0;
        overflow: hidden;
        font-size: 13px;
        line-height: 1.35;
        -webkit-text-size-adjust: 100%;
    }

    html body.mobile-app.has-sidebar:not(.page-admin-workplace) {
        height: 100dvh;
        overflow: hidden;
    }

    html body.mobile-app:not(.page-admin-workplace) *,
    html body.mobile-app:not(.page-admin-workplace) *::before,
    html body.mobile-app:not(.page-admin-workplace) *::after {
        box-sizing: border-box;
    }

    /* Compact global frame */
    html body.mobile-app:not(.page-admin-workplace) .main-content {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        height: 100dvh !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding:
            calc(var(--mobile-bar-height) + env(safe-area-inset-top, 0px) + 4px)
            var(--mobile-gutter)
            calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        scroll-padding-block-start: calc(var(--mobile-bar-height) + 6px);
    }

    html body.mobile-app.in-tab-frame:not(.page-admin-workplace) .main-content {
        padding-top: 4px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(
        .page-content-card,
        .container,
        .doc-list,
        .doc-form,
        .report-page,
        .report-content-wrap,
        .club-stats-page
    ) {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .page-content-card,
    html body.mobile-app:not(.page-admin-workplace) .container {
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* One compact header; original page h1 remains accessible but not duplicated visually. */
    html body.mobile-app:not(.page-admin-workplace) .mobile-app-bar {
        position: fixed;
        z-index: 1190;
        inset: 0 0 auto;
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr) 34px;
        align-items: end;
        gap: 2px;
        height: calc(var(--mobile-bar-height) + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 4px 2px;
        color: var(--text, var(--text-primary, #e5e7eb));
        background: var(--bg-card, #172033);
        border-bottom: 1px solid var(--border, var(--border-color, #334155));
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-app-bar-title {
        min-width: 0;
        align-self: center;
        overflow: hidden;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.2;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-app-bar button {
        display: inline-grid;
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 7px;
        place-items: center;
        color: inherit;
        background: transparent;
        border: 0;
        border-radius: 5px;
        cursor: pointer;
        touch-action: manipulation;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-app-bar button:active {
        background: color-mix(in srgb, currentColor 12%, transparent);
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-app-bar svg {
        width: 18px;
        height: 18px;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-app-close[hidden] {
        visibility: hidden;
        pointer-events: none;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-app-close:not([hidden]) {
        color: #dc2626 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-app-close:not([hidden]):active {
        color: #fff !important;
        background: #dc2626 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) > .sidebar-toggle,
    html body.mobile-app.in-tab-frame:not(.page-admin-workplace) .tab-close-floating-btn {
        display: none !important;
    }

    html body.mobile-app.has-sidebar:not(.page-admin-workplace) .doc-toolbar > .doc-title {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        clip-path: inset(50%) !important;
        white-space: nowrap !important;
    }

    html body.mobile-app.has-sidebar:not(.page-admin-workplace) .doc-toolbar:has(> .doc-title:only-child) {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        clip-path: inset(50%) !important;
    }

    /* Existing application tabs stay in normal flow and can never hide below a header. */
    html body.mobile-app:not(.page-admin-workplace) .main-content > .tabs-bar {
        position: static !important;
        z-index: auto !important;
        min-height: 30px !important;
        margin: -4px calc(-1 * var(--mobile-gutter)) 5px !important;
        padding: 0 3px !important;
        overflow: hidden !important;
        background: var(--bg-card, #172033) !important;
        border-bottom: 1px solid var(--border, var(--border-color, #334155)) !important;
        box-shadow: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .main-content > .tabs-bar-inner {
        min-height: 30px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: thin;
    }

    html body.mobile-app:not(.page-admin-workplace) .main-content > .tabs-bar-inner .tab-btn {
        min-height: 28px !important;
        max-width: 132px !important;
        padding: 3px 6px !important;
        gap: 3px !important;
        font-size: 11px !important;
        line-height: 1.15 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .main-content > .tabs-bar-inner .tab-btn-close {
        width: 18px !important;
        min-width: 18px !important;
        height: 18px !important;
        min-height: 18px !important;
        padding: 2px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .main-content > .tabs-panes,
    html body.mobile-app:not(.page-admin-workplace) .main-content > .tabs-panes > .tab-pane {
        position: relative !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: calc(100dvh - 76px) !important;
        overflow: visible !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .main-content > .tabs-panes > .tab-pane .tab-pane-iframe {
        width: 100% !important;
        min-height: calc(100dvh - 76px) !important;
    }

    /* Drawer navigation */
    html body.mobile-app:not(.page-admin-workplace) .sidebar {
        z-index: 1220 !important;
        width: min(84vw, 320px) !important;
        max-width: 320px !important;
        height: 100dvh !important;
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        overflow-y: auto !important;
        font-size: 12px !important;
        overscroll-behavior: contain;
    }

    html body.mobile-app:not(.page-admin-workplace) .sidebar-overlay {
        position: fixed;
        z-index: 1210;
        inset: 0;
        background: rgb(2 6 23 / 64%);
    }

    html body.mobile-app:not(.page-admin-workplace) .sidebar :is(a, button) {
        min-height: 34px !important;
        padding-block: 5px !important;
        touch-action: manipulation;
    }

    /* Dense desktop-like typography and controls */
    html body.mobile-app:not(.page-admin-workplace) :is(h1, .doc-title) {
        margin: 0;
        font-size: 18px !important;
        line-height: 1.2 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) h2 {
        font-size: 15px !important;
        line-height: 1.25 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) h3 {
        font-size: 14px !important;
        line-height: 1.25 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(p, label, li, .doc-field-hint) {
        font-size: 12px;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(
        button,
        .btn,
        [role="button"],
        input[type="submit"],
        input[type="button"]
    ) {
        width: auto !important;
        min-width: 0 !important;
        min-height: var(--mobile-control-height) !important;
        padding: 4px 8px !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
        touch-action: manipulation;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(input, select, textarea) {
        max-width: 100%;
        min-height: var(--mobile-control-height);
        padding: 4px 7px !important;
        font-size: 13px !important;
        line-height: 1.25 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) textarea {
        min-height: 54px;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(a, button, input, select, textarea, [tabindex]):focus-visible {
        outline: 2px solid var(--accent, var(--focus-ring, #60a5fa)) !important;
        outline-offset: 1px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(
        .doc-toolbar,
        .report-toolbar,
        .page-toolbar,
        .doc-toolbar-actions,
        .report-actions,
        .toolbar-actions
    ) {
        position: static !important;
        inset: auto !important;
        min-width: 0 !important;
        margin: 0 0 5px !important;
        padding: 0 !important;
        gap: 4px !important;
        flex-flow: row wrap !important;
        align-items: center !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* Compact forms: one usable column, no fixed footer. */
    html body.mobile-app:not(.page-admin-workplace) :is(
        .doc-header-grid,
        .doc-header-tile,
        .doc-fields-grid,
        .form-grid,
        .settings-grid,
        .doc-admin-layout
    ) {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        min-width: 0 !important;
        gap: 6px !important;
        margin: 0 0 6px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(
        .doc-header,
        .doc-header-tile,
        .doc-table-card,
        .stats-kpi-card,
        .dashboard-kpi-card,
        .manager-op-card
    ) {
        min-width: 0 !important;
        margin: 0 0 6px !important;
        padding: 7px !important;
        border-radius: var(--mobile-radius) !important;
        box-shadow: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(.doc-header-field, .form-group) {
        min-width: 0 !important;
        margin-bottom: 5px !important;
        gap: 2px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-form-actions,
    html body.mobile-app:not(.page-admin-workplace) .mobile-sticky-actions {
        position: static !important;
        inset: auto !important;
        display: flex !important;
        width: 100% !important;
        margin: 6px 0 0 !important;
        padding: 6px 0 0 !important;
        flex-flow: row wrap !important;
        gap: 4px !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(.doc-admin-perms, .reserves-schedule-pc-cell) {
        position: static !important;
        inset: auto !important;
        box-shadow: none !important;
    }

    /* One scrollport (x+y) so thead can stick. overflow-y:visible on the wrapper
       makes the page scroll instead, and sticky headers never pin. */
    html body.mobile-app:not(.page-admin-workplace) :is(
        .doc-list-table-scroll,
        .doc-form-table-scroll,
        .report-table-wrap,
        .dashboard-table-wrap,
        .roulette-table-wrap,
        .mobile-scroll-frame
    ) {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: 0 !important;
        overflow: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
        border-radius: var(--mobile-radius) !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-table-wrap {
        position: relative !important;
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        flex-direction: column !important;
        overflow: hidden !important;
        border: 1px solid var(--border) !important;
        background: var(--bg-card) !important;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(
        .doc-list-table-scroll,
        .doc-form-table-scroll,
        .report-table-wrap,
        .dashboard-table-wrap,
        .roulette-table-wrap,
        .mobile-scroll-frame
    ) > table,
    html body.mobile-app:not(.page-admin-workplace) .report-page.report-1c table {
        display: table !important;
        width: max-content !important;
        min-width: max(100%, 640px) !important;
        table-layout: auto !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        overflow: visible !important;
        border-radius: 0 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) table > thead,
    html body.mobile-app:not(.page-admin-workplace) .doc-list .doc-list-table-scroll .doc-table thead {
        display: table-header-group !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        clip: auto !important;
        clip-path: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) table > tbody {
        display: table-row-group !important;
        width: auto !important;
    }

    html body.mobile-app:not(.page-admin-workplace) table tr:not(.collapsed-sibling),
    html body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table tbody tr.doc-list-row {
        display: table-row !important;
        position: static !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) table tr.collapsed-sibling {
        position: static !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) table tr.collapsed-sibling[style*="display: none"],
    html body.mobile-app:not(.page-admin-workplace) table tr.collapsed-sibling[style*="display:none"] {
        display: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .report-table .report-row-group {
        cursor: pointer;
        pointer-events: auto;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list .doc-list-table-scroll .doc-table tbody tr.doc-list-row {
        background: transparent;
    }

    html body.mobile-app:not(.page-admin-workplace) table td,
    html body.mobile-app:not(.page-admin-workplace) table tbody th,
    html body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table tbody td {
        display: table-cell !important;
        position: static !important;
        inset: auto !important;
        min-width: 84px !important;
        max-width: none !important;
        width: auto !important;
        padding: 5px 7px !important;
        grid-column: auto !important;
        grid-row: auto !important;
        font-size: 11px !important;
        line-height: 1.25 !important;
        text-align: left !important;
        white-space: nowrap !important;
        vertical-align: top !important;
        box-shadow: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) table th {
        font-size: 10px !important;
        font-weight: 600 !important;
        letter-spacing: 0 !important;
        text-transform: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) table thead th,
    html body.mobile-app:not(.page-admin-workplace) :is(
        .doc-list-table-scroll,
        .doc-form-table-scroll,
        .report-table-wrap,
        .dashboard-table-wrap,
        .roulette-table-wrap,
        .mobile-scroll-frame
    ) > table > thead > tr > th,
    html body.mobile-app:not(.page-admin-workplace) .report-page.report-1c table thead th {
        display: table-cell !important;
        position: sticky !important;
        z-index: 6 !important;
        top: 0 !important;
        min-width: 84px !important;
        padding: 5px 7px !important;
        white-space: nowrap !important;
        vertical-align: bottom !important;
        background: var(--bg-elevated) !important;
    }

    html body.mobile-app:not(.page-admin-workplace) table td::before {
        content: none !important;
        display: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) table :is(th, td).doc-list-col-check {
        min-width: 34px !important;
        width: 34px !important;
        padding-inline: 8px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) table :is(input[type="checkbox"], input[type="radio"]) {
        width: 16px !important;
        min-width: 16px !important;
        height: 16px !important;
        min-height: 16px !important;
        padding: 0 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(
        .doc-list-totals-bar,
        .doc-list-table-totals-wrap,
        .doc-form-totals-bar,
        tfoot,
        tfoot tr,
        tfoot td
    ) {
        position: static !important;
        inset: auto !important;
        flex: none !important;
        width: auto;
        box-shadow: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden;
        background: var(--bg-elevated, #f8fafc) !important;
        border-top: 1px solid var(--border, var(--border-color, #e2e8f0)) !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure > summary {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 36px;
        padding: 6px 10px !important;
        list-style: none;
        cursor: pointer;
        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 1.3;
        color: var(--text, #1e293b);
        background: transparent !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure > summary::-webkit-details-marker,
    html body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure > summary::marker {
        display: none;
        content: none;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure-label {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure > summary::after {
        content: "";
        width: 7px;
        height: 7px;
        flex: none;
        margin-top: -3px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure[open] > summary::after {
        margin-top: 3px;
        transform: rotate(-135deg);
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure > summary:focus-visible {
        outline: 2px solid var(--accent, #2563eb);
        outline-offset: -2px;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure .doc-list-totals-bar,
    html body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure .doc-form-totals-bar {
        width: 100% !important;
        max-height: min(40dvh, 280px);
        overflow: auto !important;
        background: transparent !important;
        border: 0 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure .doc-list-totals-bar-summary {
        padding: 4px 10px 10px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure .doc-list-totals-summary-items {
        gap: 6px 14px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure .doc-list-totals-summary-item {
        font-size: 12px !important;
        white-space: normal !important;
    }

    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure {
        background: #35394a !important;
        border-top-color: #334155 !important;
        color: #e2e8f0;
    }

    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-totals-disclosure > summary {
        color: #e2e8f0;
    }

    /* List/report frames fill the screen; the table wrapper is the only scroller.
       Reports wrap in .club-stats-page — it must stay in this flex chain or the
       expanded tree is clipped by overflow:hidden ancestors with no scrollport. */
    html body.mobile-app:not(.page-admin-workplace) .main-content:has(.doc-list),
    html body.mobile-app:not(.page-admin-workplace) .main-content:has(.report-page.report-1c) {
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .main-content:has(.doc-list) :is(.page-content-card, .container),
    html body.mobile-app:not(.page-admin-workplace) .main-content:has(.report-page.report-1c) :is(
        .page-content-card,
        .container,
        .club-stats-page,
        .report-content-wrap
    ) {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-height: none !important;
        flex: 1 1 0% !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list,
    html body.mobile-app:not(.page-admin-workplace) .report-page.report-1c {
        display: flex !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        flex: 1 1 0% !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    html body.mobile-app.in-tab-frame:not(.page-admin-workplace) .doc-list,
    html body.mobile-app.in-tab-frame:not(.page-admin-workplace) .report-page.report-1c {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .report-page.report-1c .report-content-wrap {
        display: flex !important;
        min-height: 0 !important;
        flex: 1 1 0% !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table-wrap,
    html body.mobile-app:not(.page-admin-workplace) .report-page.report-1c .doc-table-wrap {
        display: flex !important;
        min-height: 0 !important;
        flex: 1 1 0% !important;
        flex-direction: column !important;
        overflow: hidden !important;
        height: auto !important;
        max-height: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list .doc-list-table-scroll,
    html body.mobile-app:not(.page-admin-workplace) .report-page.report-1c .doc-list-table-scroll {
        min-height: 0 !important;
        max-height: none !important;
        flex: 1 1 0% !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch;
        background: var(--bg-card) !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list > :not(.doc-table-wrap),
    html body.mobile-app:not(.page-admin-workplace) .report-page.report-1c > :not(.report-content-wrap):not(.doc-table-wrap),
    html body.mobile-app:not(.page-admin-workplace) .report-page.report-1c .report-content-wrap > :not(.doc-table-wrap) {
        flex: none !important;
    }

    /* Same table colors as desktop. Override the 767px card palette, do not invent a third theme. */
    html body.mobile-app:not(.page-admin-workplace) table,
    html body.mobile-app:not(.page-admin-workplace) .doc-list .doc-list-table-scroll .doc-table {
        background: var(--bg-card);
        color: var(--text);
    }

    html body.mobile-app:not(.page-admin-workplace) table thead th,
    html body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table th {
        background: var(--bg-elevated) !important;
        color: var(--text-muted) !important;
        border-bottom: 1px solid var(--border) !important;
        box-shadow: none;
    }

    html body.mobile-app:not(.page-admin-workplace) table td,
    html body.mobile-app:not(.page-admin-workplace) .doc-list .doc-list-table-scroll .doc-table tbody td,
    html body.mobile-app:not(.page-admin-workplace) .doc-list .doc-list-table-scroll .doc-table tbody td:nth-child(2),
    html body.mobile-app:not(.page-admin-workplace) .doc-list .doc-list-table-scroll .doc-table tbody td a {
        background: transparent !important;
        color: var(--text) !important;
        border-bottom-color: var(--border) !important;
        font-weight: inherit !important;
        font-family: inherit !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table tbody tr:hover,
    html body.mobile-app:not(.page-admin-workplace) .doc-list .doc-list-table-scroll .doc-table tbody tr.doc-list-row:hover {
        background: var(--accent-dim);
    }

    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-table-wrap,
    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-list-table-scroll {
        background: #2a2d3a !important;
        border-color: #35394a !important;
    }

    html.theme-dark body.mobile-app:not(.page-admin-workplace) table,
    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table {
        background: #2a2d3a !important;
        color: #cbd5e1 !important;
    }

    html.theme-dark body.mobile-app:not(.page-admin-workplace) table thead th,
    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table th {
        background: #35394a !important;
        color: #f1f5f9 !important;
        border-bottom-color: #3d4252 !important;
        box-shadow: 0 1px 0 0 #3d4252 !important;
    }

    html.theme-dark body.mobile-app:not(.page-admin-workplace) table td,
    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-list .doc-list-table-scroll .doc-table tbody td,
    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-list .doc-list-table-scroll .doc-table tbody td:nth-child(2),
    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-list .doc-list-table-scroll .doc-table tbody td a {
        background: transparent !important;
        color: #cbd5e1 !important;
        border-bottom-color: #35394a !important;
    }

    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table td a {
        color: #93c5fd !important;
    }

    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table tbody tr:hover,
    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-list .doc-list-table-scroll .doc-table tbody tr.doc-list-row:hover {
        background: #35394a !important;
    }

    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table tbody tr.doc-list-row.selected {
        background: #3d4252 !important;
    }

    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table tbody tr.doc-list-row.selected td {
        color: #f1f5f9 !important;
    }

    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table tbody tr.doc-list-row.doc-list-row-opened {
        background: #35394a !important;
    }

    html.theme-dark body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table tbody tr.doc-list-row.doc-list-row-opened td {
        color: #e2e8f0 !important;
    }

    html:not(.theme-dark) body.mobile-app:not(.page-admin-workplace) table tr.report-row-stripe-1 td {
        background: #f1f5f9 !important;
    }

    html:not(.theme-dark) body.mobile-app:not(.page-admin-workplace) .doc-list .doc-table tbody tr:is(.selected, .doc-list-row-opened) {
        background: #e0e7ff;
    }

    html body.mobile-app:not(.page-admin-workplace) table tbody tr:hover {
        filter: none !important;
    }

    /* Filters/actions are hidden until requested, then use a compact sheet. */
    html body.mobile-app:not(.page-admin-workplace) .doc-list-filters-trigger {
        display: inline-flex !important;
        min-height: 30px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list-filters-with-menu {
        position: relative !important;
        z-index: 60;
        margin: 0 0 5px !important;
        overflow: visible !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list-filters-with-menu.is-open::before {
        display: none !important;
        content: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list-filters-dropdown,
    html body.mobile-app:not(.page-admin-workplace) .mobile-sheet-panel {
        position: fixed !important;
        z-index: 1240 !important;
        inset: auto !important;
        display: none;
        width: min(360px, calc(100vw - 12px)) !important;
        max-width: calc(100vw - 12px) !important;
        max-height: min(70dvh, 520px) !important;
        margin: 0 !important;
        padding: 7px !important;
        overflow: auto !important;
        border: 1px solid var(--border, var(--border-color, #334155)) !important;
        border-radius: 7px !important;
        background: var(--bg-card, #172033) !important;
        box-shadow: 0 8px 24px rgb(0 0 0 / 22%) !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list-filters-with-menu.is-open .doc-list-filters-dropdown,
    html body.mobile-app:not(.page-admin-workplace) .mobile-sheet-panel.is-open {
        display: block !important;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(.doc-list-search-row, .doc-list-search-form) {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        gap: 4px !important;
        flex-flow: row wrap !important;
        align-items: center !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list-search-form .doc-list-search-input {
        flex: 1 1 150px !important;
        width: auto !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list-pagination {
        position: static !important;
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 5px 0 0 !important;
        padding: 0 !important;
        flex-flow: row wrap !important;
        align-items: center !important;
        gap: 4px 8px !important;
        font-size: 11px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list-pagination-links {
        display: flex !important;
        min-width: 0;
        gap: 2px !important;
        overflow-x: auto;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-list-pagination-link {
        display: inline-grid !important;
        min-width: 28px !important;
        min-height: 28px !important;
        padding: 2px 5px !important;
        place-items: center;
        font-size: 11px !important;
    }

    /* KPI, charts and page-specific tabs */
    html body.mobile-app:not(.page-admin-workplace) :is(.stats-kpi, .dashboard-kpi) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 5px !important;
        margin: 0 0 6px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(.stats-kpi-card, .dashboard-kpi-card) {
        padding: 6px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .stats-dashboard {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 0 6px !important;
        padding: 0 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .stats-dashboard > summary {
        display: block !important;
        width: 100% !important;
        min-height: 32px !important;
        padding: 7px 9px 7px 28px !important;
        font-size: 13px !important;
        line-height: 1.3 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) details.stats-dashboard:not([open]) > .stats-dashboard-content {
        display: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) details.stats-dashboard[open] > .stats-dashboard-content {
        display: block !important;
        width: 100% !important;
        padding: 6px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(.stats-kpi-value, .dashboard-kpi-value) {
        font-size: 14px !important;
        line-height: 1.2 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-section-tabs {
        position: static !important;
        z-index: auto !important;
        display: flex;
        width: 100%;
        margin: 0 0 5px;
        padding: 0;
        gap: 3px;
        overflow-x: auto;
        background: transparent;
        border: 0;
        box-shadow: none;
        scrollbar-width: thin;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-section-tab {
        flex: 0 0 auto;
        min-height: 28px !important;
        padding: 3px 7px !important;
        color: var(--text-muted, #94a3b8);
        background: var(--bg-card, #172033);
        border: 1px solid var(--border, var(--border-color, #334155));
        border-radius: 5px;
        font-size: 11px !important;
        white-space: nowrap;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-section-tab[aria-selected="true"] {
        color: var(--text, #f8fafc);
        border-color: var(--accent, #60a5fa);
    }

    html body.mobile-app:not(.page-admin-workplace) [data-mobile-panel][hidden] {
        display: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(.chart-container, .chart-card, .dashboard-chart, .stats-chart-wrap) {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 5px !important;
        overflow: hidden !important;
    }

    html body.mobile-app:not(.page-admin-workplace) canvas {
        max-width: 100% !important;
        max-height: 46dvh;
    }

    /* Modals and pickers */
    html body.mobile-app:not(.page-admin-workplace) :is(.modal-content, .modal-box, .doc-period-modal-content) {
        width: calc(100vw - 8px) !important;
        max-width: none !important;
        max-height: calc(100dvh - 8px) !important;
        margin: auto 4px 4px !important;
        padding: 9px !important;
        overflow: auto !important;
        border-radius: 9px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(.shift-picker-panel, .doc-list-columns-dropdown) {
        position: fixed !important;
        z-index: 1250 !important;
        inset: auto 0 0 !important;
        width: 100% !important;
        max-width: none !important;
        max-height: 76dvh !important;
        padding: 7px var(--mobile-gutter) calc(7px + env(safe-area-inset-bottom, 0px)) !important;
        overflow: auto !important;
        border-radius: 9px 9px 0 0 !important;
    }

    /* Object forms: keep requisites visible and split table documents into two tabs. */
    html body.mobile-app:not(.page-admin-workplace) .main-content:has(.doc-form),
    html body.mobile-app:not(.page-admin-workplace) .main-content:has(.doc-form) :is(
        .page-content-card,
        .container.doc-form-full,
        .doc-form,
        .doc-form > form,
        .mobile-object-form,
        .doc-header-grid
    ) {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
    }

    html body.mobile-app.has-sidebar:not(.page-admin-workplace) .main-content:has(.doc-form),
    html body.mobile-app.in-tab-frame:not(.page-admin-workplace) .main-content:has(.doc-form) {
        display: block !important;
        height: 100dvh !important;
        min-height: 0 !important;
        max-height: 100dvh !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-object-form {
        display: block !important;
        padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-object-tabs {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        margin: 0 0 6px;
        padding: 2px;
        gap: 2px;
        background: var(--bg-card, #fff);
        border: 1px solid var(--border, var(--border-color, #dbe2ea));
        border-radius: 7px;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-object-tab {
        width: 100% !important;
        min-height: 30px !important;
        padding: 4px 7px !important;
        color: var(--text-muted, #64748b);
        background: transparent !important;
        border: 1px solid transparent !important;
        border-radius: 5px !important;
        font-size: 11px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-object-tab[aria-selected="true"] {
        color: var(--text, #1e293b);
        background: var(--bg-elevated, #f8fafc) !important;
        border-color: var(--accent, #eab308) !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-object-panel-hidden {
        display: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-object-table-panel:not(.mobile-object-panel-hidden) {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        height: calc(100dvh - 128px) !important;
        min-height: calc(100dvh - 128px) !important;
        max-height: calc(100dvh - 128px) !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .mobile-object-table-panel:not(.mobile-object-panel-hidden) .doc-form-table-scroll {
        min-height: 240px !important;
        flex: 1 1 auto !important;
        overflow: auto !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-form .doc-table-card .doc-table-head,
    html body.mobile-app:not(.page-admin-workplace) .doc-table-head {
        display: flex !important;
        flex-flow: row wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 4px !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 6px 8px !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-table-head .doc-table-title {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0 !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .doc-table-head :is(.btn, button, .btn-add-row, .btn-del-selected, .doc-stock-hint) {
        width: auto !important;
        max-width: none !important;
        flex: 0 0 auto !important;
        align-self: center !important;
    }

    /* Settings pages: cancel legacy mobile clipping and let the whole form scroll. */
    html body.mobile-app:not(.page-admin-workplace) .main-content:has(.settings-card-form),
    html body.mobile-app:not(.page-admin-workplace) .main-content:has(.settings-card-form) :is(
        .page-content-card,
        .container.doc-form-full,
        .doc-form,
        .settings-card-form,
        .doc-header-grid,
        .doc-header-tile
    ) {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        flex: none !important;
    }

    html body.mobile-app:not(.page-admin-workplace) .main-content:has(.settings-card-form) .settings-card-form {
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Reservations list follows the same compact table pattern as payroll reports. */
    html body.mobile-app.page-club-reserves .reserves-page-doc-list .doc-toolbar {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    html body.mobile-app.page-club-reserves :is(.reserves-display-mode, .reserves-display-mode-toggle) {
        width: auto !important;
        margin: 0 !important;
    }

    html body.mobile-app.page-club-reserves .reserves-display-mode-toggle {
        display: inline-grid !important;
        grid-template-columns: auto auto !important;
    }

    html body.mobile-app.page-club-reserves .reserves-display-mode-toggle label {
        width: auto !important;
        min-width: 58px !important;
        min-height: 28px !important;
        padding: 3px 7px !important;
        font-size: 11px !important;
    }

    html body.mobile-app.page-club-reserves .reserves-schedule-wrap {
        width: 100% !important;
        min-width: 0 !important;
        max-height: none !important;
        margin: 0 !important;
    }

    html body.mobile-app.page-club-reserves .reserves-schedule-grid-wrap {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        overflow: auto !important;
    }

    html body.mobile-app.page-club-reserves .reserves-schedule-grid {
        width: max-content !important;
        min-width: 640px !important;
        max-width: none !important;
    }

    html.reserves-display-list body.mobile-app.page-club-reserves .reserves-schedule-wrap {
        display: none !important;
    }

    html:not(.reserves-display-list) body.mobile-app.page-club-reserves .reserves-page-doc-list > .doc-table-wrap,
    html:not(.reserves-display-list) body.mobile-app.page-club-reserves .reserves-page-doc-list > .doc-list-pagination {
        display: none !important;
    }

    /* Tariff schedule uses the same mutually exclusive graph/list modes as reservations. */
    html body.mobile-app.page-club-tariff-overview .tariff-page-doc-list .doc-toolbar {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    html body.mobile-app.page-club-tariff-overview .tariff-page-doc-list .doc-toolbar > div {
        width: auto !important;
        margin: 0 !important;
    }

    html body.mobile-app.page-club-tariff-overview :is(.reserves-display-mode, .reserves-display-mode-toggle) {
        width: auto !important;
        margin: 0 !important;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-display-mode-toggle {
        display: inline-grid !important;
        grid-template-columns: auto auto !important;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-display-mode-toggle label {
        width: auto !important;
        min-width: 110px !important;
        min-height: 28px !important;
        padding: 3px 7px !important;
        font-size: 11px !important;
    }

    html.tariff-display-list body.mobile-app.page-club-tariff-overview .tariff-graph-wrap {
        display: none !important;
    }

    html:not(.tariff-display-list) body.mobile-app.page-club-tariff-overview .tariff-page-doc-list > .doc-table-wrap {
        display: none !important;
    }

    html:not(.tariff-display-list) body.mobile-app.page-club-tariff-overview .main-content:has(.tariff-page-doc-list) {
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    html:not(.tariff-display-list) body.mobile-app.page-club-tariff-overview .main-content :is(.page-content-card) {
        flex: none !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    html:not(.tariff-display-list) body.mobile-app.page-club-tariff-overview .tariff-page-doc-list {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        flex: none !important;
    }

    html:not(.tariff-display-list) body.mobile-app.page-club-tariff-overview .tariff-graph-wrap,
    html:not(.tariff-display-list) body.mobile-app.page-club-tariff-overview .reserves-schedule-section {
        display: flex !important;
        flex: none !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        margin-bottom: 8px !important;
        padding: 8px !important;
        overflow: visible !important;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-schedule-header,
    html body.mobile-app.page-club-tariff-overview .tariff-schedule-legend-row {
        flex: none !important;
        margin-bottom: 8px !important;
        gap: 6px 10px !important;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-schedule-grid-wrap {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: auto !important;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-schedule-grid {
        width: max-content !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-schedule-table {
        display: table !important;
        width: max-content !important;
        min-width: 1440px !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        border-spacing: 0 !important;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-schedule-table .reserves-schedule-pc-cell {
        width: 128px !important;
        min-width: 128px !important;
        max-width: 128px !important;
        padding: 6px 8px !important;
        white-space: normal !important;
        vertical-align: middle !important;
        text-align: left !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-schedule-table .tariff-pack-link,
    html body.mobile-app.page-club-tariff-overview .reserves-schedule-table .tariff-chart-now-pill {
        display: block !important;
        width: auto !important;
        max-width: 100% !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-schedule-table .tariff-chart-now-pill {
        margin-top: 4px !important;
        padding: 2px 6px !important;
        font-size: 10px !important;
        line-height: 1.25 !important;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-schedule-table .reserves-schedule-time-th,
    html body.mobile-app.page-club-tariff-overview .reserves-schedule-table .reserves-schedule-blocks-cell {
        width: 1312px !important;
        min-width: 1312px !important;
        max-width: 1312px !important;
        padding: 0 4px !important;
        vertical-align: middle !important;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-schedule-table thead .reserves-schedule-time-th {
        padding: 0 !important;
        overflow: hidden !important;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-schedule-time-scale {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 4px !important;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-schedule-time-scale span {
        display: block !important;
        flex: 0 0 calc(100% / 24) !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 4px 0 !important;
        overflow: hidden !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        text-align: center !important;
        white-space: nowrap !important;
        text-overflow: clip;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-schedule-blocks-cell {
        height: 36px !important;
        min-height: 36px !important;
        position: relative !important;
    }

    html body.mobile-app.page-club-tariff-overview .reserves-schedule-block {
        min-width: 0 !important;
        padding: 4px 6px !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
    }

    /* Workplace now uses the same mobile shell and compact back arrow as other pages. */
    html body.mobile-app.page-admin-workplace-mobile .workplace-container {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: calc(100dvh - var(--mobile-bar-height) - 10px) !important;
        padding: 0 !important;
        flex-direction: column !important;
        gap: 5px !important;
        overflow: visible !important;
    }

    html body.mobile-app.page-admin-workplace-mobile :is(.workplace-left, .workplace-right) {
        display: contents !important;
    }

    html body.mobile-app.page-admin-workplace-mobile .wp-mobile-nav {
        display: flex !important;
        position: static !important;
        order: -1;
        width: 100% !important;
        min-height: 30px !important;
        margin: 0 0 4px !important;
        padding: 0 !important;
        gap: 3px !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    html body.mobile-app.page-admin-workplace-mobile .wp-mobile-nav button {
        flex: 1 1 0 !important;
        min-height: 30px !important;
        padding: 4px 6px !important;
        font-size: 11px !important;
        border: 1px solid var(--border, var(--border-color, #334155)) !important;
        border-radius: 5px !important;
        background: var(--bg-card, #172033) !important;
    }

    html body.mobile-app.page-admin-workplace-mobile .wp-mobile-nav button.is-active {
        border-color: var(--accent, #60a5fa) !important;
    }

    html body.mobile-app.page-admin-workplace-mobile.wp-tab-pcs .wp-panel[data-wp-panel]:not([data-wp-panel="pcs"]),
    html body.mobile-app.page-admin-workplace-mobile.wp-tab-products .wp-panel[data-wp-panel]:not([data-wp-panel="products"]),
    html body.mobile-app.page-admin-workplace-mobile.wp-tab-cart .wp-panel[data-wp-panel]:not([data-wp-panel="cart"]) {
        display: none !important;
    }

    html body.mobile-app.page-admin-workplace-mobile .wp-panel {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: calc(100dvh - 86px) !important;
        margin: 0 !important;
        padding: 5px !important;
        overflow: visible !important;
    }

    html body.mobile-app.page-admin-workplace-mobile :is(#pcs-container, #products-container, #cart-container) {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 240px !important;
        max-height: calc(100dvh - 150px) !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    html body.mobile-app.page-admin-workplace-mobile :is(.workplace-toolbar, .workplace-toolbar-actions) {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 0 4px !important;
        padding: 0 !important;
        flex-flow: row wrap !important;
        gap: 4px !important;
    }

    /* Compact standalone/auth/support layouts */
    html body.mobile-app.auth-page,
    html body.mobile-app.support-page:has(.support-login) {
        min-height: 100dvh !important;
        padding: max(6px, env(safe-area-inset-top, 0px)) 6px max(6px, env(safe-area-inset-bottom, 0px)) !important;
        overflow-y: auto !important;
    }

    html body.mobile-app.auth-page .mobile-app-bar,
    html body.mobile-app.support-page:has(.support-login) .mobile-app-bar {
        display: none;
    }

    html body.mobile-app.auth-page :is(.auth-wrapper__content, .auth-content .card),
    html body.mobile-app.support-page:has(.support-login) :is(.support-login, .support-login-card) {
        width: 100% !important;
        max-width: 440px !important;
        margin: auto !important;
        padding: 14px !important;
    }

    html body.mobile-app :is(.manual-content, .legal-content, .privacy-content, .oferta-content) {
        max-width: 72ch !important;
        margin-inline: auto !important;
        padding-inline: 2px !important;
        overflow-wrap: anywhere;
    }

    html body.mobile-app :is(img, video, iframe) {
        max-width: 100%;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(.demo-banner, .demo-banner-info, .alert) {
        width: 100% !important;
        margin: 0 0 4px !important;
        padding: 5px 7px !important;
        border-radius: 5px !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 420px) {
    html body.mobile-app:not(.page-admin-workplace) {
        --mobile-gutter: 4px;
    }

    html body.mobile-app:not(.page-admin-workplace) :is(.stats-kpi, .dashboard-kpi) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

body:not(.mobile-app) .mobile-object-tabs,
body:not(.mobile-app) .mobile-section-tabs {
    display: none !important;
}

body:not(.mobile-app) .mobile-object-panel-hidden {
    display: revert !important;
}

@media (min-width: 993px) {
    .mobile-object-tabs,
    .mobile-section-tabs {
        display: none !important;
    }

    .mobile-object-panel-hidden {
        display: revert !important;
    }
}

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