@media (max-width: 991.98px) {
    .sidebar {
        display: none !important;
    }

    .page-container,
    .app-wrapper {
        margin-left: 0 !important;
    }
}

#mobile-bottom-menu.mobile-bottom-menu {
    --mobile-bottom-accent: var(--left-menu-theme-color, #2563eb);
    --mobile-bottom-ink: #475569;
    --mobile-bottom-muted: #64748b;
    --mobile-bottom-surface: rgba(255, 255, 255, 0.96);
    --mobile-bottom-border: #e5eaf1;
    --mobile-bottom-active-bg: color-mix(in srgb, var(--mobile-bottom-accent) 10%, #f8fafc);
    --mobile-bottom-active-border: color-mix(in srgb, var(--mobile-bottom-accent) 22%, #d9e2ec);
    z-index: 1038;
    min-height: calc(72px + env(safe-area-inset-bottom, 0px));
    padding: 8px 12px max(10px, env(safe-area-inset-bottom, 0px));
    background: var(--mobile-bottom-surface) !important;
    border-top: 1px solid var(--mobile-bottom-border) !important;
    box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.08);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
}

#mobile-bottom-menu .mobile-bottom-menu-inner {
    align-items: center;
    gap: 6px;
    height: 54px;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#mobile-bottom-menu .menu-item,
#mobile-bottom-menu #mobile-function-button,
#mobile-bottom-menu #mobile-function-button .dropdown,
#mobile-bottom-menu #mobile-function-button .home-btn,
#mobile-bottom-menu #mobile-function-button .dropdown-toggle,
#mobile-bottom-menu #mobile-chat-menu-button > *,
#mobile-bottom-menu #mobile-quick-add-button > * {
    align-items: center;
    border-radius: 14px;
    color: var(--mobile-bottom-muted) !important;
    display: flex;
    flex: 1 1 0;
    height: 48px;
    justify-content: center;
    min-width: 0;
    padding: 0 !important;
    position: relative;
    text-decoration: none !important;
    touch-action: manipulation;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .12s ease;
}

#mobile-bottom-menu #mobile-function-button,
#mobile-bottom-menu #mobile-chat-menu-button,
#mobile-bottom-menu #mobile-quick-add-button {
    flex: 1 1 0;
}

#mobile-bottom-menu #mobile-function-button:empty,
#mobile-bottom-menu #mobile-chat-menu-button:empty,
#mobile-bottom-menu #mobile-quick-add-button:empty {
    display: none;
}

#mobile-bottom-menu .menu-item,
#mobile-bottom-menu #mobile-function-button .home-btn,
#mobile-bottom-menu #mobile-function-button .dropdown-toggle,
#mobile-bottom-menu #mobile-chat-menu-button > *,
#mobile-bottom-menu #mobile-quick-add-button > * {
    border: 1px solid transparent;
}

#mobile-bottom-menu .menu-item svg,
#mobile-bottom-menu .menu-item .icon,
#mobile-bottom-menu #mobile-function-button svg,
#mobile-bottom-menu #mobile-function-button .icon,
#mobile-bottom-menu #mobile-chat-menu-button svg,
#mobile-bottom-menu #mobile-chat-menu-button .icon,
#mobile-bottom-menu #mobile-quick-add-button svg,
#mobile-bottom-menu #mobile-quick-add-button .icon {
    color: currentColor !important;
    height: 25px;
    stroke-width: 2.35;
    transform: none !important;
    transition: color .16s ease, transform .12s ease;
    width: 25px;
}

#mobile-bottom-menu .menu-item:hover,
#mobile-bottom-menu .menu-item:focus,
#mobile-bottom-menu .menu-item.active,
#mobile-bottom-menu #mobile-function-button:hover .home-btn,
#mobile-bottom-menu #mobile-function-button:focus-within .home-btn,
#mobile-bottom-menu #mobile-function-button .home-btn.active,
#mobile-bottom-menu #mobile-function-button:hover .dropdown-toggle,
#mobile-bottom-menu #mobile-function-button:focus-within .dropdown-toggle,
#mobile-bottom-menu #mobile-function-button .dropdown-toggle.active,
#mobile-bottom-menu #mobile-chat-menu-button:hover > *,
#mobile-bottom-menu #mobile-chat-menu-button:focus-within > *,
#mobile-bottom-menu #mobile-quick-add-button:hover > *,
#mobile-bottom-menu #mobile-quick-add-button:focus-within > *,
#mobile-bottom-menu #mobile-quick-add-button.show > * {
    background: var(--mobile-bottom-active-bg);
    border-color: var(--mobile-bottom-active-border);
    color: var(--mobile-bottom-accent) !important;
}

#mobile-bottom-menu .menu-item:active,
#mobile-bottom-menu #mobile-function-button .home-btn:active,
#mobile-bottom-menu #mobile-function-button .dropdown-toggle:active,
#mobile-bottom-menu #mobile-chat-menu-button > *:active,
#mobile-bottom-menu #mobile-quick-add-button > *:active {
    transform: translateY(1px);
}

#mobile-bottom-menu .dropdown-toggle::after {
    display: none;
}

#mobile-bottom-menu .notification-badge-container .badge,
#mobile-bottom-menu .badge.up {
    position: absolute;
    right: 9px;
    top: 8px;
}

#mobile-bottom-menu .quick-add-dropdown,
#mobile-bottom-menu .mobile-function-button-dropdown {
    border: 1px solid #e4e7ec;
    border-radius: 16px 16px 0 0;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    box-shadow: 0 -10px 26px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

body[data-color="1E202D"] #mobile-bottom-menu.mobile-bottom-menu {
    --mobile-bottom-ink: #e5e7eb;
    --mobile-bottom-muted: #a5adbd;
    --mobile-bottom-surface: rgba(30, 32, 45, 0.96);
    --mobile-bottom-border: rgba(255, 255, 255, 0.08);
    --mobile-bottom-active-bg: rgba(255, 255, 255, 0.08);
    --mobile-bottom-active-border: rgba(255, 255, 255, 0.12);
    box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.24);
}

body[data-color="F2F2F2"] #mobile-bottom-menu.mobile-bottom-menu {
    --mobile-bottom-accent: #2563eb;
}

/* Keep chat control inside the bottom bar (not a floating FAB). */
#mobile-bottom-menu #mobile-chat-menu-button {
    position: relative;
    overflow: visible;
}

#mobile-bottom-menu #js-init-chat-icon,
#mobile-bottom-menu .init-chat-icon {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 14px !important;
    background: transparent !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 1 !important;
    flex: 1 1 auto;
}

#mobile-bottom-menu #js-init-chat-icon.move-chat-icon,
#mobile-bottom-menu .init-chat-icon.move-chat-icon {
    right: auto !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
}

#mobile-bottom-menu #js-chat-min-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: inherit;
}

#mobile-bottom-menu #js-chat-min-icon svg,
#mobile-bottom-menu #js-chat-min-icon .icon,
#mobile-bottom-menu #js-chat-min-icon .icon-22 {
    width: 25px !important;
    height: 25px !important;
    color: currentColor !important;
}

/* Chat panel must not occupy a bottom-nav flex slot. */
#mobile-bottom-menu #js-datacore-chat-wrapper,
#mobile-bottom-menu .datacore-chat-wrapper {
    position: fixed !important;
    inset: 0 auto auto 0;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    z-index: 1060 !important;
}

#mobile-bottom-menu #js-datacore-chat-wrapper.hide,
#mobile-bottom-menu .datacore-chat-wrapper.hide {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    #mobile-bottom-menu .menu-item,
    #mobile-bottom-menu #mobile-function-button,
    #mobile-bottom-menu #mobile-function-button .home-btn,
    #mobile-bottom-menu #mobile-function-button .dropdown-toggle,
    #mobile-bottom-menu #mobile-chat-menu-button > *,
    #mobile-bottom-menu #mobile-quick-add-button > *,
    #mobile-bottom-menu svg {
        transition: none !important;
    }
}

@media all and (display-mode: standalone), all and (display-mode: minimal-ui) {
    @media (max-width: 991.98px) {
        #mobile-bottom-menu.mobile-bottom-menu {
            display: block !important;
            z-index: 1038;
        }

        .mobile-grid-menu {
            z-index: 1049;
        }
    }
}

@media (max-width: 991.98px) and (orientation: landscape) and (max-height: 575px) {
    .mobile-bottom-menu.d-lg-none,
    #mobile-bottom-menu.d-lg-none {
        display: block !important;
    }

    .scrollable-page {
        margin-bottom: 72px;
    }
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1048;
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-grid-menu {
    --mobile-drawer-accent: var(--left-menu-theme-color, #2563eb);
    --mobile-drawer-bg: #f6f8fb;
    --mobile-drawer-surface: #ffffff;
    --mobile-drawer-surface-muted: #eef2f7;
    --mobile-drawer-border: #dfe5ee;
    --mobile-drawer-ink: #111827;
    --mobile-drawer-muted: #64748b;
    --mobile-drawer-active-bg: color-mix(in srgb, var(--mobile-drawer-accent) 8%, #ffffff);
    --mobile-drawer-active-border: color-mix(in srgb, var(--mobile-drawer-accent) 34%, #dfe5ee);
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    background: var(--mobile-drawer-bg);
    z-index: 1049;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.22, 1, .36, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: var(--mobile-drawer-ink);
}

.mobile-grid-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 10px;
    background: var(--mobile-drawer-bg);
    color: var(--mobile-drawer-ink);
    flex-shrink: 0;
}

.mobile-menu-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mobile-menu-logo {
    display: block;
    width: 132px;
    height: 36px;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
}

.mobile-menu-title {
    margin: 0;
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
    letter-spacing: -0.02em;
}

.mobile-menu-close {
    background: var(--mobile-drawer-surface);
    border: 1px solid var(--mobile-drawer-border);
    color: var(--mobile-drawer-muted);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .12s ease;
}

.mobile-menu-close:hover,
.mobile-menu-close:focus {
    background: var(--mobile-drawer-active-bg);
    border-color: var(--mobile-drawer-active-border);
    color: var(--mobile-drawer-accent);
    outline: none;
}

.mobile-menu-close:active {
    transform: translateY(1px);
}

.mobile-menu-search-wrap {
    padding: 0 16px 12px;
    background: var(--mobile-drawer-bg);
    flex-shrink: 0;
}

.mobile-menu-search {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 34px;
    align-items: center;
    min-height: 50px;
    padding: 0 8px 0 14px;
    background: var(--mobile-drawer-surface);
    border: 1px solid var(--mobile-drawer-border);
    border-radius: 14px;
    color: var(--mobile-drawer-muted);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
    transition: border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}

.mobile-menu-search:focus-within {
    border-color: var(--mobile-drawer-active-border);
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.mobile-menu-search svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.4;
}

.mobile-menu-search-input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--mobile-drawer-ink);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    padding: 0 12px;
}

.mobile-menu-search-input::placeholder {
    color: var(--mobile-drawer-muted);
    font-weight: 600;
}

.mobile-menu-search-clear {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: var(--mobile-drawer-surface-muted);
    color: var(--mobile-drawer-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.86);
    transition: all 0.18s ease;
}

.mobile-menu-search-wrap.has-value .mobile-menu-search-clear {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.mobile-menu-search-clear:hover,
.mobile-menu-search-clear:focus {
    background: var(--mobile-drawer-active-bg);
    color: var(--mobile-drawer-accent);
    outline: none;
}

.mobile-menu-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--mobile-drawer-bg);
}

.mobile-menu-search-results {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 12px calc(88px + env(safe-area-inset-bottom, 0px));
    background: var(--mobile-drawer-bg);
}

.mobile-menu-search-results[hidden] {
    display: none !important;
}

.mobile-menu-search-results-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-search-result {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 10px 12px;
    border: 1px solid var(--mobile-drawer-border);
    border-radius: 12px;
    background: var(--mobile-drawer-surface);
    color: var(--mobile-drawer-ink);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background-color .15s ease, border-color .15s ease, transform .12s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-menu-search-result:hover,
.mobile-menu-search-result:focus {
    background: var(--mobile-drawer-active-bg);
    border-color: var(--mobile-drawer-active-border);
    color: var(--mobile-drawer-ink);
    outline: none;
    text-decoration: none;
}

.mobile-menu-search-result:active {
    transform: scale(0.985);
}

.mobile-menu-search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.mobile-menu-search-result-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

.mobile-menu-search-result-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-menu-search-result-label {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.mobile-menu-search-result-meta {
    font-size: 12px;
    font-weight: 600;
    color: var(--mobile-drawer-muted);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-menu-search-result-chevron {
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-search-empty {
    display: none;
    min-height: 118px;
    margin-top: 8px;
    padding: 28px 18px;
    border: 1px dashed var(--mobile-drawer-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--mobile-drawer-muted);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 10px;
    padding: 8px 14px calc(88px + env(safe-area-inset-bottom, 0px));
    background: var(--mobile-drawer-bg);
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1;
    transition: transform .24s ease, opacity .24s ease;
}

.mobile-menu-grid.search-hidden {
    display: none !important;
}

.mobile-menu-grid.submenu-active {
    opacity: 0.35;
    pointer-events: none;
    transform: translateX(-18px);
}

@media (max-width: 480px) {
    .mobile-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 8px 12px calc(88px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-menu-title {
        font-size: 22px;
    }
}

@media (max-width: 340px) {
    .mobile-menu-grid,
    .mobile-submenu-grid {
        grid-template-columns: 1fr;
    }
}

/* Visible by default — opacity:0 + animation:none (Reduce Motion) left the drawer blank for some users. */
.mobile-menu-item {
    position: relative;
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .mobile-grid-menu.active .mobile-menu-item {
        animation: slideInUp 0.35s ease both;
    }

    .mobile-grid-menu.active .mobile-menu-item:nth-child(1) { animation-delay: 0.05s; }
    .mobile-grid-menu.active .mobile-menu-item:nth-child(2) { animation-delay: 0.1s; }
    .mobile-grid-menu.active .mobile-menu-item:nth-child(3) { animation-delay: 0.15s; }
    .mobile-grid-menu.active .mobile-menu-item:nth-child(4) { animation-delay: 0.2s; }
    .mobile-grid-menu.active .mobile-menu-item:nth-child(5) { animation-delay: 0.25s; }
    .mobile-grid-menu.active .mobile-menu-item:nth-child(6) { animation-delay: 0.3s; }
}

.mobile-menu-card {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: var(--mobile-drawer-surface);
    border: 1px solid var(--mobile-drawer-border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--mobile-drawer-ink);
    transition: transform .14s ease, border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
    min-height: 104px;
    position: relative;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    text-align: left;
    overflow: hidden;
}

.mobile-menu-card::after {
    content: "";
    width: 7px;
    height: 7px;
    border-top: 2px solid #94a3b8;
    border-right: 2px solid #94a3b8;
    transform: rotate(45deg);
    position: absolute;
    right: 14px;
    top: 18px;
    margin-top: 0;
}

.mobile-menu-card:hover,
.mobile-menu-card:focus {
    transform: translateY(-1px);
    border-color: var(--mobile-drawer-active-border);
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.08);
    color: var(--mobile-drawer-ink);
    outline: none;
    text-decoration: none;
}

.mobile-menu-card:active {
    transform: translateY(0);
}

.mobile-menu-item.active .mobile-menu-card {
    background: var(--mobile-drawer-active-bg);
    border-color: var(--mobile-drawer-active-border);
}

.mobile-menu-card.has-submenu.expanded {
    border-color: var(--mobile-drawer-active-border);
    background: var(--mobile-drawer-active-bg);
}

.mobile-menu-card.has-submenu.expanded .mobile-submenu-indicator {
    background: var(--mobile-drawer-accent);
    color: #ffffff;
}

.mobile-menu-card.has-submenu.expanded .mobile-submenu-indicator i {
    transform: rotate(180deg);
}

.mobile-menu-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #64748b;
    margin-bottom: 0;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.mobile-menu-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.25;
    color: #ffffff;
}

.mobile-menu-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 10px;
    min-width: 22px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 600;
    padding: 0 4px;
    border: 2px solid #ffffff;
    animation: none;
}

.mobile-submenu-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: var(--mobile-drawer-surface-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mobile-drawer-muted);
    transition: all 0.3s ease;
}

.mobile-submenu-indicator i {
    transition: transform 0.3s ease;
}

.mobile-menu-label {
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    line-height: 1.22;
    max-width: 100%;
    min-height: 32px;
    overflow-wrap: anywhere;
    color: var(--mobile-drawer-ink);
}

@media (max-width: 767px) {
    .mobile-menu-label {
        font-size: 12px;
    }
}

.mobile-submenu-section {
    position: absolute;
    inset: 0;
    background: var(--mobile-drawer-bg);
    transform: translateX(100%);
    transition: transform .26s cubic-bezier(.22, 1, .36, 1);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.mobile-submenu-section.active {
    transform: translateX(0);
}

.mobile-submenu-header {
    display: flex;
    align-items: center;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 12px;
    background: var(--mobile-drawer-bg);
    color: var(--mobile-drawer-ink);
    gap: 12px;
    border-bottom: 1px solid var(--mobile-drawer-border);
    flex-shrink: 0;
}

.mobile-submenu-back {
    background: var(--mobile-drawer-surface);
    border: 1px solid var(--mobile-drawer-border);
    color: var(--mobile-drawer-muted);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-submenu-back:hover,
.mobile-submenu-back:focus {
    background: var(--mobile-drawer-active-bg);
    border-color: var(--mobile-drawer-active-border);
    color: var(--mobile-drawer-accent);
    outline: none;
}

.mobile-submenu-title {
    margin: 0;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.2;
    color: var(--mobile-drawer-ink);
}

.mobile-submenu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 10px;
    padding: 12px 12px calc(88px + env(safe-area-inset-bottom, 0px));
    background: var(--mobile-drawer-bg);
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
}

.mobile-submenu-item {
    text-decoration: none;
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .mobile-submenu-section.active .mobile-submenu-item {
        animation: slideInUp 0.3s ease both;
    }
}

.mobile-submenu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: var(--mobile-drawer-surface);
    border: 1px solid var(--mobile-drawer-border);
    border-radius: 14px;
    color: var(--mobile-drawer-ink);
    transition: transform .14s ease, border-color .16s ease, box-shadow .16s ease;
    min-height: 104px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    text-align: center;
}

.mobile-submenu-card:hover,
.mobile-submenu-card:focus {
    transform: translateY(-1px);
    border-color: var(--mobile-drawer-active-border);
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.08);
    color: var(--mobile-drawer-ink);
}

.mobile-submenu-icon {
    margin-bottom: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #64748b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-submenu-label {
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.22;
    overflow-wrap: anywhere;
}

.mobile-menu-empty,
.mobile-submenu-empty {
    display: none;
    grid-column: 1 / -1;
    min-height: 118px;
    padding: 28px 18px;
    border: 1px dashed var(--mobile-drawer-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--mobile-drawer-muted);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

button.mobile-menu-card {
    font: inherit;
}

body[data-color="1E202D"] .mobile-grid-menu {
    --mobile-drawer-bg: #191b25;
    --mobile-drawer-surface: #242735;
    --mobile-drawer-surface-muted: #303444;
    --mobile-drawer-border: rgba(255, 255, 255, 0.08);
    --mobile-drawer-ink: #f4f6fb;
    --mobile-drawer-muted: #a5adbd;
    --mobile-drawer-active-bg: rgba(255, 255, 255, 0.08);
    --mobile-drawer-active-border: rgba(255, 255, 255, 0.16);
}

body[data-color="1E202D"] .mobile-menu-empty,
body[data-color="1E202D"] .mobile-submenu-empty,
body[data-color="1E202D"] .mobile-menu-search-empty {
    background: rgba(255, 255, 255, 0.05);
}

body[data-color="F2F2F2"] .mobile-grid-menu {
    --mobile-drawer-accent: #2563eb;
}

.mobile-menu-icon:has([data-feather="home"]),
.mobile-menu-icon:has([data-feather="grid"]),
.mobile-menu-icon:has([data-feather="layout"]),
.mobile-menu-icon:has([data-feather="bar-chart-2"]),
.mobile-menu-icon:has([data-feather="pie-chart"]) { background: #1cc98a; }

.mobile-menu-icon:has([data-feather="calendar"]),
.mobile-menu-icon:has([data-feather="calendar-days"]),
.mobile-menu-icon:has([data-feather="calendar-check"]) { background: #6b7480; }

.mobile-menu-icon:has([data-feather="layers"]),
.mobile-menu-icon:has([data-feather="users"]),
.mobile-menu-icon:has([data-feather="user-plus"]) { background: #ff7b17; }

.mobile-menu-icon:has([data-feather="file-text"]),
.mobile-menu-icon:has([data-feather="clipboard"]),
.mobile-menu-icon:has([data-feather="book-open"]) { background: #f8b901; }

.mobile-menu-icon:has([data-feather="send"]),
.mobile-menu-icon:has([data-feather="navigation"]),
.mobile-menu-icon:has([data-feather="arrow-up-right"]) { background: #4a63ff; }

.mobile-menu-icon:has([data-feather="log-in"]),
.mobile-menu-icon:has([data-feather="clock"]),
.mobile-menu-icon:has([data-feather="check-circle"]) { background: #1dcf93; }

.mobile-menu-icon:has([data-feather="check-square"]),
.mobile-menu-icon:has([data-feather="list"]),
.mobile-menu-icon:has([data-feather="clipboard-check"]) { background: #7f67dd; }

.mobile-menu-icon:has([data-feather="ticket"]),
.mobile-menu-icon:has([data-feather="tag"]),
.mobile-menu-icon:has([data-feather="inbox"]) { background: #ff3f74; }

.mobile-menu-icon:has([data-feather="message-circle"]),
.mobile-menu-icon:has([data-feather="message-square"]),
.mobile-menu-icon:has([data-feather="mail"]) { background: #3d7af7; }

.mobile-menu-icon:has([data-feather="file"]),
.mobile-menu-icon:has([data-feather="file-plus"]) { background: #6c66f4; }

.mobile-menu-icon:has([data-feather="bookmark"]),
.mobile-menu-icon:has([data-feather="award"]) { background: #10a3ab; }

.mobile-menu-icon:has([data-feather="edit-3"]),
.mobile-menu-icon:has([data-feather="edit"]),
.mobile-menu-icon:has([data-feather="align-left"]) { background: #f59f0a; }

.mobile-menu-icon:has([data-feather="video"]),
.mobile-menu-icon:has([data-feather="camera"]),
.mobile-menu-icon:has([data-feather="phone-call"]) { background: #1eaed1; }

.mobile-menu-content::-webkit-scrollbar,
.mobile-menu-grid::-webkit-scrollbar,
.mobile-submenu-grid::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu-content::-webkit-scrollbar-thumb,
.mobile-menu-grid::-webkit-scrollbar-thumb,
.mobile-submenu-grid::-webkit-scrollbar-thumb {
    background: #cfd4dc;
    border-radius: 999px;
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(14px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu-overlay,
    .mobile-grid-menu,
    .mobile-menu-grid,
    .mobile-submenu-section,
    .mobile-menu-item,
    .mobile-submenu-item,
    .mobile-menu-card,
    .mobile-submenu-card,
    .mobile-menu-search,
    .mobile-menu-search-result,
    .mobile-menu-close {
        animation: none !important;
        transition: none !important;
    }

    .mobile-menu-item,
    .mobile-submenu-item {
        opacity: 1 !important;
    }
}
