/* BIZNESPULT_FULL_MOBILE_ENTRY_V1: shared navigation, same portal permissions. */
@media (max-width: 1024px) {
    .app-layout {
        min-width: 0;
        min-height: 100dvh;
    }

    .app-layout > .main-content {
        width: 100%;
        min-width: 0;
        margin-left: 0 !important;
    }

    .app-layout .main-content > .topbar {
        display: flex !important;
        position: sticky;
        top: 0;
        z-index: 100;
        flex-shrink: 0;
        height: auto !important;
        min-height: 56px;
        padding: calc(6px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 6px max(12px, env(safe-area-inset-left, 0px)) !important;
        background: var(--bg-secondary) !important;
        border-bottom: 1px solid var(--border-color) !important;
        gap: 8px;
    }

    .topbar .mobile-menu-btn {
        display: inline-flex !important;
        width: auto;
        min-width: 80px;
        min-height: 44px;
        flex-shrink: 0;
        gap: 6px;
        padding: 8px;
        font: inherit;
    }

    .topbar-left {
        display: flex;
        align-items: center;
        flex: 1;
        min-width: 0;
        gap: 8px;
    }

    .topbar-right {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        gap: 4px;
    }

    .app-layout .topbar .page-title {
        display: block !important;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 16px;
    }

    .app-layout > .sidebar {
        left: 0;
        width: min(320px, calc(100vw - 48px));
        min-width: 0;
        height: 100vh;
        height: 100dvh;
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.2s ease, visibility 0.2s;
    }

    .app-layout > .sidebar.open {
        transform: translateX(0);
        visibility: visible;
    }

    .sidebar .sidebar-header, .sidebar .sidebar-footer {
        flex-shrink: 0;
    }

    .sidebar .sidebar-toggle {
        display: inline-flex;
        min-width: 44px;
        min-height: 44px;
        flex-shrink: 0;
    }

    .sidebar .sidebar-nav {
        min-height: 0;
        overscroll-behavior: contain;
    }

    .sidebar .nav-item {
        min-height: 44px;
        flex-shrink: 0;
    }

    .sidebar .nav-text {
        white-space: normal;
    }

    body.bp-mobile-nav-open { overflow: hidden; }

    .app-layout .page-content {
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    }

    #page-container { min-width: 0; }

    /* The existing chat/task companion always offers a route to all modules. */
    .bp-task-companion .bottom-nav { padding-bottom: env(safe-area-inset-bottom, 0px); }
    .bp-task-companion .bottom-nav .nav-item { min-width: 44px; min-height: 52px; }
    .bp-task-companion .bottom-nav .nav-fab { width: 44px; height: 44px; margin-left: 4px; margin-right: 4px; }
}
