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

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

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

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

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.32);
    z-index: 1048;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.mobile-grid-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100vw;
    height: 100vh;
    background: #f3f4f6;
    z-index: 1049;
    transition: right 0.28s ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mobile-grid-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 22px 18px 14px;
    background: #f3f4f6;
    color: #101828;
    flex-shrink: 0;
}

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

.mobile-menu-logo {
    display: block;
    width: 118px;
    height: 32px;
    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: transparent;
    border: 0;
    color: #667085;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close:hover,
.mobile-menu-close:focus {
    background: #e7eaef;
    color: #344054;
}

.mobile-menu-search-wrap {
    padding: 0 18px 12px;
    background: #f3f4f6;
    flex-shrink: 0;
}

.mobile-menu-search {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 34px;
    align-items: center;
    min-height: 48px;
    padding: 0 6px 0 16px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    color: #667085;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mobile-menu-search:focus-within {
    border-color: #c8d0da;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.08);
    transform: translateY(-1px);
}

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

.mobile-menu-search-input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #101828;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 0 10px;
}

.mobile-menu-search-input::placeholder {
    color: #98a2b3;
    font-weight: 500;
}

.mobile-menu-search-clear {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #eef2f6;
    color: #667085;
    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: #e4e7ec;
    color: #344054;
}

.mobile-menu-content {
    flex: 1;
    overflow: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 10px 18px 24px;
    background: #f3f4f6;
    overflow-y: auto;
    flex: 1;
    transition: transform 0.3s ease-in-out;
}

.mobile-menu-grid.submenu-active {
    transform: translateY(-100%);
}

@media (max-width: 480px) {
    .mobile-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 10px 12px 22px;
    }

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

.mobile-menu-item {
    position: relative;
    opacity: 0;
    animation: slideInUp 0.35s ease forwards;
}

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

.mobile-menu-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 40px 14px 14px;
    background: #ffffff;
    border: 1px solid #eaecf0;
    border-radius: 18px;
    text-decoration: none;
    color: #101828;
    transition: all 0.2s ease;
    min-height: 90px;
    position: relative;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    cursor: pointer;
}

.mobile-menu-card::after {
    content: "";
    width: 8px;
    height: 8px;
    border-top: 2px solid #98a2b3;
    border-right: 2px solid #98a2b3;
    transform: rotate(45deg);
    position: absolute;
    right: 16px;
    top: 50%;
    margin-top: -4px;
}

.mobile-menu-card:hover,
.mobile-menu-card:focus {
    transform: translateY(-1px);
    border-color: #d0d5dd;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
    color: #101828;
    text-decoration: none;
}

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

.mobile-menu-item.active .mobile-menu-card {
    border-color: #d0d5dd;
}

.mobile-menu-card.has-submenu.expanded {
    border-color: #c8d0da;
    background: #f8fafc;
}

.mobile-menu-card.has-submenu.expanded .mobile-submenu-indicator {
    background: #e6eaf0;
    color: #344054;
}

.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: 56px;
    height: 56px;
    border-radius: 14px;
    background: #667085;
    margin-bottom: 0;
}

.mobile-menu-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
    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: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #eef2f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667085;
    transition: all 0.3s ease;
}

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

.mobile-menu-label {
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    line-height: 1.25;
    max-width: 100%;
    word-wrap: break-word;
    color: #101828;
}

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

.mobile-submenu-section {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    transition: top 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.mobile-submenu-section.active {
    top: 0;
}

.mobile-submenu-header {
    display: flex;
    align-items: center;
    padding: 18px 16px;
    background: #eef1f5;
    color: #101828;
    gap: 15px;
    border-bottom: 1px solid #e4e7ec;
    flex-shrink: 0;
}

.mobile-submenu-back {
    background: #ffffff;
    border: 1px solid #e4e7ec;
    color: #344054;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-submenu-title {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
}

.mobile-submenu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 14px 12px 20px;
    background: #f3f4f6;
    flex: 1;
    overflow-y: auto;
}

.mobile-submenu-item {
    text-decoration: none;
    opacity: 0;
    animation: slideInUp 0.3s ease forwards;
}

.mobile-submenu-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #eaecf0;
    border-radius: 14px;
    color: #101828;
    transition: all 0.2s ease;
    min-height: 78px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.mobile-submenu-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
    color: #101828;
}

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

.mobile-submenu-label {
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    line-height: 1.2;
}

.mobile-menu-empty,
.mobile-submenu-empty {
    display: none;
    grid-column: 1 / -1;
    min-height: 118px;
    padding: 28px 18px;
    border: 1px dashed #d0d5dd;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    color: #667085;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

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

.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;
    }
}