/* Default font family for entire page */
* {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
}

:root {
    --blue-color: #0d6efd;
    --blue-color-hover: #004381;
    --blue-color-bg: #005db3;
    --blue-color-100: #e7f1ff;
    --white-color: #ffffff;
    --gray-color: #dee2e6;
    --text-title: #212529;
    --text-body: #6c798f;
    --bg-button: #e9ecef;
    --bg-gray: #f8f9fa;
    --bg-button-hover: #d0d2d4;
    --theme-border: #dee2e6;
    --theme-danger: #dc3545;
}

[data-layout="twocolumn"] #page-topbar {
    display: none;
}

[data-layout="twocolumn"] .twocolumn-panel .main-content {
    margin-left: 52px !important;
}

[data-layout=twocolumn] .main-content {
    margin-left: calc(52px + 52px)
}

[data-layout="twocolumn"] .app-menu.navbar-menu {
    background: var(--blue-color-bg);
}

.topnav-hamburger.brx {
    display: none;
}

.bg-source {
    background-color: #0d6efd;
    color: #ffffff;
}

.bg-assignment {
    background-color: #8540f5;
    color: #ffffff;
}

.bg-prioritize {
    background-color: #dc3545;
    color: #ffffff;
}

.bg-status {
    background-color: #fd7e14;
    color: #ffffff;
}

.bg-characteristic {
    background-color: #198754;
    color: #ffffff;
}

.bg-more {
    background-color: #e7f1ff;
    color: #0d6efd;
}
.brx-avt.avatar-xs {
    height: 3rem;
    width: 3rem;
}

.logo.nwa-custom {
    width: 36px;
    height: 36px;
    display: flex;
    margin: 10px 6px;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-radius: 8px;
}

.nav-icon.active .logo-pagex {
    filter: invert(49%) sepia(64%) saturate(159%) hue-rotate(179deg) brightness(82%) contrast(79%);
}

.menusidebar-img {
    width: 19px;
    height: auto;
}

.chat-conversation {
    /* height: calc(100vh - 163px); */
    /* height: calc(100vh - 124px); */
    /* padding-bottom: 80px !important; */
}
.chat-conversation {
    /* width: 100%;
    height: 100%;
    overflow-y: auto; */

    /* Firefox auto-hide */
    /* scrollbar-width: thin; */
    /* scrollbar-color: transparent transparent; */
}

/* Chrome/Safari/Edge – tạo scrollbar cực nhỏ để Chrome không xoá scrollbar */
.chat-conversation::-webkit-scrollbar {
    width: 6px;              /* gần như vô hình */
}

/* Track trong suốt */
.chat-conversation::-webkit-scrollbar-track {
    background: transparent;
}

/* Thumb mặc định ẩn */
.chat-conversation::-webkit-scrollbar-thumb {
    background-color: transparent;
    transition: all ease-in-out 200ms;
}

/* Khi hover -> scrollbar lớn hơn */
.chat-conversation:hover::-webkit-scrollbar {
    width: 6px;
}

/* Khi hover -> thumb hiện ra */
.chat-conversation:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.3);
    border-radius: 8px;
}


/* Overlay khi mở dropdown */
/* .dropdown-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
} */

/* Popup dropdown dạng bottom sheet */
/* .dropdown-mobile-popup .dropdown-menu {
    position: absolute;
} */

/* Khi ở mobile (<575.98px) chuyển sang fixed popup */
/* @media (max-width: 575.98px) {

    .dropdown-mobile-popup.show .dropdown-menu {
        background: #fff !important;
        border-radius: 12px 12px 0 0 !important;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2) !important;
        display: block !important;
        overflow-y: auto !important;
        border: none !important;
    }

    .dropdown-overlay.show {
        display: block;
    }

    .dropdown-mobile-popup.show {
        z-index: 9999;
        position: relative;
    }
} */

.dropdown-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9998;
}

.dropdown-overlay.show {
    display: block;
}

/* main popup (fixed bottom) — giữ như trước */
.dropdown-menu.main-menu {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    max-height: 80vh;
    overflow: hidden;
    /* quan trọng: ẩn overflow để slide mượt */
    border-radius: 12px 12px 0 0;
    background: #fff;
    z-index: 9999;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

/* wrapper chứa cả các "panels" (main + submenus) — tạo khu vực ngang để dịch chuyển */
.dropdown-menu.main-menu .panel-wrapper {
    position: relative;
    width: 200%;
    /* main + submenu ngang nhau => 2 * 100% */
    height: 100%;
    display: flex;
    transition: transform 0.33s ease;
    transform: translateX(0);
}

/* mỗi panel chiếm 100% width và 100% height của dropdown */
.dropdown-menu.main-menu .panel {
    width: 50%;
    /* vì wrapper width=200% => 50% = 100% viewport */
    min-width: 50%;
    height: 100%;
    overflow-y: auto;
    background: #fff;
    box-sizing: border-box;
    padding: 1rem;
}

/* Khi mở submenu: dịch wrapper qua trái 50% để lộ panel submenu */
.dropdown-menu.main-menu .panel-wrapper.shift-left {
    transform: translateX(-50%);
}

/* back button style */
.panel .back-btn {
    display: inline-block;
    margin-bottom: 0.5rem;
    cursor: pointer;
    color: #333;
}

@media (max-width: 575.98px) {
    .dropdown-menu {
        transition: transform 0.3s ease;
    }

    .dropdown-menu .dropdown-menu {
        position: absolute;
        top: 0;
        left: 100%;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        background: #fff;
    }

    .dropdown-menu.submenu-active > .dropdown-menu.show {
        transform: translateX(0);
    }

    .back-item {
        border-bottom: 1px solid #eee;
    }

    .back-link {
        font-weight: 500;
    }
}

@media (min-width: 992px) {
    .brx .chat-leftsidebar {
        /* min-width: 400px;
        max-width: 400px; */
        min-width: 336px;
        max-width: 336px;
        height: 100dvh;
        /* height: calc(100vh - 8px); */
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 991.98px) {
    .chat-room-list {
        height: calc(100vh - 276.5px);
    }

    .chat-conversation {
        height: calc(100vh - 190px);
    }
}

@media (max-width: 767.98px) {
    .chip .count {
        font-size: 0.7rem;
        min-width: 18px;
        height: 18px;
        padding: 0;
        border-radius: 50%;
        background: #e5e7eb;
        color: #374151;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    [data-layout="twocolumn"] .main-content {
        margin-left: calc(51.5px) !important;
    }

    /* new responsive */
        .page-content {
        padding: calc(1.5rem) calc(1.5rem * 0.5) 0px calc(1.5rem * 0.5);
    }

    .chat-leftsidebar {
        height: calc(100vh - 94px);
    }

    .chat-conversation {
        height: calc(100vh - 258px);
    }

    [data-layout="twocolumn"] .brx-custom .twocolumn-iconview li {
        list-style: none;
        max-width: 60px !important;
    }

    [data-layout="twocolumn"] .app-menu {
        left: 0px !important;
        margin-left: 0 !important;
    }

    [data-layout="twocolumn"] .brx-custom .twocolumn-iconview {
        width: 100vw;
        top: unset;
        bottom: 0;
        left: 0;
        height: 86px;
        margin: 0;
    }

    .topnav-hamburger.brx {
        display: flex;
        height: 22px;
        padding-left: 0.25rem !important;
    }

    .brx-custom .twocolumn-iconview .simplebar-content {
        display: flex;
        justify-content: space-around;
        align-items: center;
        list-style: none;
        margin-top: 0.35em;
    }

    .dropdown.show::before {
        display: none;
    }

       .apply-filter-btn {
        display: flex;
    }

    .back-submenu-btn {
        display: block;
    }

    [data-layout="twocolumn"] .brx-custom .twocolumn-iconview .bottom-menu-group {
        flex-direction: row;
        position: relative;
        width: fit-content;
        right: 0;
        top: 0;
        bottom: auto;
        display: flex;
        left: auto;
        transform: none;
    }

    [data-layout="twocolumn"] .twocolumn-iconview li .nav-icon.active::before {
        content: none !important;
    }

    [data-layout="twocolumn"] .brx-custom .twocolumn-iconview .bottom-menu-group li {
        margin: 0 2px;
    }

    [data-layout="twocolumn"] .brx-custom .twocolumn-iconview .bottom-menu-group li .nav-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    /* Avatar on mobile */
    [data-layout="twocolumn"] .brx-custom .twocolumn-iconview .bottom-menu-group li#menu-avatar .avatar-img {
        width: 32px;
        height: 32px;
    }

    /* Mobile main menu items */
    [data-layout="twocolumn"] .simplebar-content > li #sidebarDashboards {
        width: 100%;
    }

    [data-layout="twocolumn"] .simplebar-content > li {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        /* max-width: 60px !important; */
        padding-bottom: 2px !important;
        position: relative !important;
    }

    /* Add text labels for main menu items on mobile */
    [data-layout="twocolumn"] .simplebar-content > li::after {
        content: "";
        font-size: 10px !important;
        color: rgba(255, 255, 255, 0.8) !important;
        margin-top: 3px !important;
        white-space: nowrap !important;
        font-weight: 500 !important;
        line-height: 1 !important;
        text-align: center !important;
        position: relative !important;
        z-index: 2 !important;
    }

    /* Specific labels for main menu items */
    [data-layout="twocolumn"] .twocolumn-iconview .simplebar-content > li:nth-child(2)::after {
        content: "Live chat" !important;
    }

    [data-layout="twocolumn"] .twocolumn-iconview .simplebar-content > li:nth-child(3)::after {
        content: "Page.X" !important;
    }

    [data-layout="twocolumn"] .simplebar-content > li .nav-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 24px !important;
        margin: 0 0 2px 0 !important;
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.9) !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
        position: relative !important;
        z-index: 1 !important;
    }

    [data-layout="twocolumn"] .simplebar-content > li .nav-icon:hover,
    [data-layout="twocolumn"] .simplebar-content > li .nav-icon.active {
        background: rgba(255, 255, 255, 0.15) !important;
        color: #fff !important;
        transform: scale(1.05) !important;
    }

    /* Ensure text doesn't get affected by active background */
    [data-layout="twocolumn"] .simplebar-content > li:hover::after,
    [data-layout="twocolumn"] .simplebar-content > li.active::after {
        color: rgba(255, 255, 255, 1) !important;
        z-index: 3 !important;
    }

    /* Bottom menu group on mobile */
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group {
        display: contents !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
    }

    /* Bottom menu items on mobile */
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li {
        display: flex;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        position: relative !important;
        max-width: 60px !important;
        padding-bottom: 2px !important;
    }

    /* Add text labels for bottom menu items on mobile */
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li::after {
        content: "";
        font-size: 9px !important;
        color: rgba(255, 255, 255, 0.8) !important;
        margin-top: 2px !important;
        white-space: nowrap !important;
        font-weight: 500 !important;
        line-height: 1 !important;
        text-align: center !important;
        position: relative !important;
        z-index: 2 !important;
    }

    [data-layout="twocolumn"] .twocolumn-iconview .simplebar-content .bottom-menu-group li#menu-notifications::after {
        content: "Thông báo" !important;
    }

    [data-layout="twocolumn"] .twocolumn-iconview .simplebar-content .bottom-menu-group li#menu-dark-mode::after {
        content: "Chế độ" !important;
    }

    [data-layout="twocolumn"] .twocolumn-iconview .simplebar-content .bottom-menu-group li#menu-settings::after {
        content: "Cài đặt" !important;
    }

    [data-layout="twocolumn"] .twocolumn-iconview .simplebar-content .bottom-menu-group li#menu-avatar::after {
        content: "Hồ sơ" !important;
    }

    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li .nav-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 24px !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.9) !important;
        border-radius: 8px !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
    }

    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li .nav-icon:hover,
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li .nav-icon.active {
        background: rgba(255, 255, 255, 0.15) !important;
        color: #fff !important;
        transform: scale(1.05) !important;
        box-shadow: none !important;
    }

    /* Ensure bottom menu text doesn't get affected by active background */
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li:hover::after,
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li.active::after {
        color: rgba(255, 255, 255, 1) !important;
        z-index: 3 !important;
    }

    /* Avatar image on mobile */
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li#menu-avatar .nav-icon {
        padding: 2px !important;
        border: 2px solid rgba(255, 255, 255, 0.6) !important;
        border-radius: 50% !important;
    }

    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li#menu-avatar .avatar-img {
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
    }

    /* Notification badge on mobile */
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li#menu-notifications .notification-badge {
        position: absolute !important;
        top: -2px !important;
        right: 8px !important;
        background: #dc3545 !important;
        color: #fff !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        min-width: 18px !important;
        height: 18px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 2px solid var(--vz-primary) !important;
        z-index: 1 !important;
    }

    /* Add padding to main content to avoid overlap with bottom nav */
    [data-layout="twocolumn"] .main-content {
        padding-bottom: 80px !important;
    }

    [data-layout="twocolumn"] .twocolumn-panel .main-content {
        margin-left: 0 !important;
    }

    .tag-assignment-dropdown {
        width: 100vw !important;
        max-height: 450px;
        overflow: hidden;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        padding: 0;
        transform: none !important;
        position: fixed !important;
        left: 0;
    }

    .page-filter-dropdown {
        width: 100vw !important;
        max-height: 600px;
        overflow: hidden;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        padding: 0;
        transform: none !important;
        position: fixed !important;
        left: 0;
    }

    .dropdown-menu.brx-dropdown {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .brx-dropdown .dropdown-item {
        padding: 0.7rem var(--vz-dropdown-item-padding-x);
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .page-content {
        padding: calc(1.5rem) calc(1.5rem * 0.5) 0px calc(1.5rem * 0.5);
    }

    .chat-leftsidebar {
        height: calc(100vh - 94px);
    }

    .chat-conversation {
        height: calc(100vh - 258px);
    }

    [data-layout="twocolumn"] .brx-custom .twocolumn-iconview li {
        list-style: none;
        max-width: 60px !important;
    }

    [data-layout="twocolumn"] .app-menu {
        left: 0px !important;
        margin-left: 0 !important;
    }

    [data-layout="twocolumn"] .brx-custom .twocolumn-iconview {
        width: 100vw;
        top: unset;
        bottom: 0;
        left: 0;
        height: 86px;
        margin: 0;
    }

    .topnav-hamburger.brx {
        display: flex;
        height: 22px;
        padding-left: 0.25rem !important;
    }

    .brx-custom .twocolumn-iconview .simplebar-content {
        display: flex;
        justify-content: space-around;
        align-items: center;
        list-style: none;
        margin-top: 0.35em;
    }

    .dropdown.show::before {
        display: none;
    }
}

/* Fixed Profile Sidebar Styles */
.fixed-profile-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 0;
    max-width: 350px;
    background: #fff;
    border-left: 1px solid #e9ecef;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: width 0.3s ease-in-out;
    overflow: hidden;
    z-index: 10;
}

.fixed-profile-sidebar.show {
    width: 350px;
}

.fixed-profile-sidebar .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.fixed-profile-sidebar .sidebar-body {
    height: calc(100% - 60px);
    overflow-y: auto;
}

/* Adjust chat content when fixed sidebar is open */
.chat-content.fixed-sidebar-open {
    margin-right: 350px !important;
    transition: margin-right 0.3s ease-in-out !important;
}

/* Overlay Profile Sidebar Styles (Info button) */
#userProfileCanvasExample {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    height: 100vh !important;
    width: 0 !important;
    max-width: 350px !important;
    background: #fff !important;
    border-left: 1px solid #e9ecef !important;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1) !important;
    transition: width 0.3s ease-in-out !important;
    overflow: hidden !important;
    z-index: 1055 !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#userProfileCanvasExample.show {
    width: 350px !important;
}

/* Hide Bootstrap offcanvas backdrop */
#userProfileCanvasExample + .offcanvas-backdrop {
    display: none !important;
}

/* Ensure profile sidebar content is scrollable */
#userProfileCanvasExample .offcanvas-body {
    height: 100% !important;
    overflow-y: auto !important;
}

/* Dark theme support */
[data-bs-theme="dark"] #userProfileCanvasExample {
    background: #2a3042 !important;
    border-left-color: #404553 !important;
}

[data-bs-theme="dark"] .fixed-profile-sidebar {
    background: #2a3042 !important;
    border-left-color: #404553 !important;
}

[data-bs-theme="dark"] .fixed-profile-sidebar .sidebar-header {
    background: #32394e !important;
    border-bottom-color: #404553 !important;
}

/* Responsive behavior */
@media (max-width: 991.98px) {
    /* Hide fixed sidebar on mobile */
    .fixed-profile-sidebar {
        display: none !important;
    }

    .chat-content.fixed-sidebar-open {
        margin-right: 0 !important;
    }

    /* Overlay sidebar behavior on mobile */
    #userProfileCanvasExample {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 0 !important;
        max-width: 100vw !important;
    }

    #userProfileCanvasExample.show {
        width: 100vw !important;
    }
}

/* Pages List Styles */
.fb-page-item__badge .badge {
    font-size: 12px;
    font-weight: 400;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e41e3f;
    border: none;
}

/* Dark theme support */
[data-bs-theme="dark"] .fb-header {
    background-color: #242526;
    border-bottom-color: #3e4042;
}

[data-bs-theme="dark"] .fb-header__title {
    color: #e4e6ea;
}

[data-bs-theme="dark"] .fb-pages {
    background-color: #242526;
}

[data-bs-theme="dark"] .fb-pages__title {
    color: #b0b3b8;
}

[data-bs-theme="dark"] .fb-pages__filter:hover {
    background-color: #3a3b3c;
}

[data-bs-theme="dark"] .fb-page-item:hover {
    background-color: #3a3b3c;
}

[data-bs-theme="dark"] .fb-page-item__avatar img {
    border-color: #3e4042;
}

[data-bs-theme="dark"] .fb-page-item__name {
    color: #e4e6ea;
}

[data-bs-theme="dark"] .fb-page-item__platform-icon {
    background-color: #242526;
    border-color: #242526;
}

/* Chat List Styles */
.fb-chats {
    background-color: #fff;
}

.fb-chats__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #65676b;
}

.fb-chats__menu {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.fb-chats__menu:hover {
    background-color: #f2f3f5;
}

.fb-chat-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 8px;
    border: 2px solid transparent;
}

.fb-chat-item:hover {
    background-color: #f2f3f5;
}

.fb-chat-item--selected {
    background-color: #e7f3ff;
    border-color: #1877f2;
}

.fb-chat-item__avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.fb-chat-item__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fb-chat-item__status {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background-color: #42b883;
    border: 2px solid #fff;
    border-radius: 50%;
}

.fb-chat-item__platform-icon {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.fb-chat-item__platform-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.fb-chat-item__name {
    color: #1c1e21;
    font-size: 14px;
    font-weight: 600;
}

.fb-chat-item__time {
    font-size: 12px;
    color: #65676b;
}

.fb-chat-item__message {
    font-size: 13px;
    color: #65676b;
    line-height: 1.3;
}

.fb-chat-item__tags .badge {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 12px;
}

.fb-chat-item__right {
    flex-shrink: 0;
    min-width: 80px;
}

.fb-chat-item__actions .btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Dark theme support for chat list */
[data-bs-theme="dark"] .fb-chats {
    background-color: #242526;
}

[data-bs-theme="dark"] .fb-chats__title {
    color: #b0b3b8;
}

[data-bs-theme="dark"] .fb-chats__menu:hover {
    background-color: #3a3b3c;
}

[data-bs-theme="dark"] .fb-chat-item:hover {
    background-color: #3a3b3c;
}

[data-bs-theme="dark"] .fb-chat-item--selected {
    background-color: #263951;
    border-color: #1877f2;
}

[data-bs-theme="dark"] .fb-chat-item__name {
    color: #e4e6ea;
}

[data-bs-theme="dark"] .fb-chat-item__time {
    color: #b0b3b8;
}

[data-bs-theme="dark"] .fb-chat-item__message {
    color: #b0b3b8;
}

[data-bs-theme="dark"] .fb-chat-item__platform-icon {
    background-color: #242526;
    border-color: #242526;
}

/* Mobile responsive */
@media (max-width: 575.98px) {
    .fb-header {
        padding: 0.75rem !important;
    }

    .fb-header__title {
        font-size: 1.25rem;
    }

    .fb-header__btn {
        width: 32px;
        height: 32px;
    }

    .fb-chats {
        padding: 0.75rem !important;
    }
}

/* Multi-platform Chat Sidebar */
.chat-header {
    background-color: #fff;
    border-bottom: 1px solid #e4e6ea;
}

.chat-header__title {
    color: #1c1e21;
    font-size: 1.5rem;
    font-weight: 700;
}

.chat-header__btn {
    width: 3.2em;
    height: 3.2em;
    border-radius: 0.6em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.2s ease;
}

.chat-header__btn:hover {
    transform: scale(1.05);
}

.chat-pages {
    background-color: #fff;
}

.chat-pages__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #65676b;
}

.chat-pages__filter {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.chat-pages__filter:hover {
    background-color: #f2f3f5;
}

.chat-pages__toggle {
    transition: all 0.2s ease;
}

.chat-pages__toggle:hover {
    color: #1877f2;
}

.chat-pages__toggle:hover .chat-pages__title {
    color: #1877f2 !important;
}

.chat-pages__list {
    transition: all 0.3s ease;
    max-height: 150px;
    /* Height for 3 items */
    opacity: 1;
}

.chat-conversations__list {
    /* Use flex to take remaining space */
    flex: 1;
    min-height: 0;
    /* Important for flex child to shrink */
    overflow: hidden;
}

/* SimpleBar specific styles for chat lists - prevent layout shift */
.chat-pages__list[data-simplebar] {
    max-height: 150px;
    height: 150px;
    overflow: hidden;
    position: relative;
}

/* Ensure SimpleBar wrapper works for pages list too */
.chat-pages__list[data-simplebar] .simplebar-wrapper {
    height: 100% !important;
    max-height: 150px;
}

.chat-pages__list[data-simplebar] .simplebar-content-wrapper {
    height: 100% !important;
    max-height: 150px;
    overflow: auto !important;
}

.chat-pages__list[data-simplebar] .simplebar-content {
    min-height: 100%;
}

.chat-conversations__list[data-simplebar] {
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Ensure SimpleBar wrapper takes full height */
.chat-conversations__list[data-simplebar] .simplebar-wrapper {
    height: 100% !important;
}

.chat-conversations__list[data-simplebar] .simplebar-content-wrapper {
    height: 100% !important;
    overflow: auto !important;
}

.chat-conversations__list[data-simplebar] .simplebar-content {
    min-height: 100%;
}

/* Pre-allocate space for SimpleBar structure to prevent layout shift */
.chat-pages__list[data-simplebar]::before,
.chat-conversations__list[data-simplebar]::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 11px;
    height: 100%;
    background: transparent;
    z-index: 1;
    pointer-events: none;
}

.chat-pages__list.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Prevent layout shift during SimpleBar initialization */
.chat-pages__list[data-simplebar]:not(.simplebar-ready):not(.collapsed),
.chat-conversations__list[data-simplebar]:not(.simplebar-ready) {
    visibility: hidden;
}

.chat-pages__list[data-simplebar].simplebar-ready:not(.collapsed),
.chat-conversations__list[data-simplebar].simplebar-ready {
    visibility: visible;
    animation: fadeInSmooth 0.2s ease-out;
}

/* Ensure pages list is visible when not collapsed */
.chat-pages__list[data-simplebar]:not(.collapsed) {
    display: block !important;
    visibility: visible !important;
}

@keyframes fadeInSmooth {
    from {
        opacity: 0;
        transform: translateY(2px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure lists are visible by default when not using SimpleBar */
.chat-pages__list:not(.collapsed):not([data-simplebar]) {
    opacity: 1 !important;
    display: block !important;
}

.chat-conversations__list:not([data-simplebar]) {
    opacity: 1 !important;
    display: block !important;
}

/* Flex layout for chat sections */
.chat-header {
    flex-shrink: 0;
}

.chat-pages {
    flex-shrink: 0;
}

.chat-conversations {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* overflow: hidden; */
}

.chat-conversations .chat-conversations__list {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    /* Important for SimpleBar */
}

.page-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 8px;
    position: relative;
    min-height: 48px;
    padding: 8px 3px;
}

.page-item:hover .page-item__badge .badge.rounded-pill {
    display: none;
}

.page-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: calc(100% - 7px);
    border-radius: 2px;
    transition: opacity 0.2s ease;
    border-top-right-radius: 100px;
    border-bottom-right-radius: 100px;
}

.page-item--1::before {
    background-color: #4267b2;
}

.page-item--2::before {
    background-color: #ea868f;
}

.page-item--3::before {
    background-color: #ffda6a;
}

.chat-pages__list .page-item:hover,
.chat-pages__list .page-item.page-item--active {
    background-color: #f2f3f5;
}

.page-item__avatar {
    width: 2.4em;
    height: 2.4em;
    flex-shrink: 0;
}

.page-item__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #e4e6ea;
}

.page-item__platform-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.page-item__platform-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.page-item__name {
    color: #1c1e21;
    font-size: 14px;
    line-height: 1.3333;
    font-weight: 600;
}

.page-item__badge .badge {
    font-size: 0.75rem;
    font-weight: 400;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e41e3f;
    border: none;
}

.chat-conversations {
    background-color: #fff;
}

.chat-conversations__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #65676b;
}

.chat-conversations__menu {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.chat-conversations__menu:hover {
    background-color: #f2f3f5;
}

.con-item {
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 8px;
    border: 1px solid transparent;
}

.con-item::before {
    content: "";
    position: absolute;
    left: -0.55rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: calc(100% - 7px);
    border-radius: 2px;
    transition: opacity 0.2s ease;
    border-top-right-radius: 100px;
    border-bottom-right-radius: 100px;
}

.con-item--1::before {
    background-color: #4267b2;
}

.con-item--2::before {
    background-color: #ea868f;
}

.con-item--3::before {
    background-color: #ffda6a;
}

.con-item:hover {
    background-color: #f2f3f5;
}

.con-item--selected {
    background-color: #e7f3ff;
    border-color: #0d6efd;
}

.con-item__avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.con-item__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.con-item__status {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: -15px;
    width: 8px;
    height: 8px;
    background-color: var(--theme-danger);
    border-radius: 50%;
}

.con-item__platform-icon {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.con-item__platform-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.con-item__tags .badge {
    font-size: 10px;
    font-weight: 500;
    padding: 4px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Chat Tags Management Section */
.chat-tags-section {
    display: block;
}

.chat-tags-container {
    min-height: 32px;
    /* max-height: 32px; */
    align-items: center;
    overflow: hidden;
}

.chat-tags-container .badge {
    font-size: 12px;
    font-weight: 500;
    padding: 3px 6px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: all 0.2s ease;
}

.chat-tags-container .badge:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-tags-container .badge .btn-close {
    font-size: 8px;
    width: 12px;
    height: 12px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.chat-tags-container .badge .btn-close:hover {
    opacity: 1;
}

.chat-tags-actions .btn {
    width: fit-content;
    border-radius: 6px;
    padding: 3px 6px;
    gap: 4px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background-color: white;
    border: 1px solid #dee2e6;
}

.chat-tags-actions .btn:hover {
    background-color: var(--vz-primary);;
    color: #ffffff!important;
}

/* Dark theme support for chat tags */
[data-bs-theme="dark"] .chat-tags-section {
    border-bottom-color: #3e4042;
}

[data-bs-theme="dark"] .chat-tags-actions .btn:hover {
    background-color: #3a3b3c;
    color: #e4e6ea;
}

/* Page Avatar in Chat Input */
.page-avatar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
    cursor: pointer;
}

.page-avatar-container:hover {
    border-color: #0d6efd;
    transform: scale(1.05);
}

.page-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Dark theme support for page avatar */
[data-bs-theme="dark"] .page-avatar-container {
    border-color: #495057;
}

[data-bs-theme="dark"] .page-avatar-container:hover {
    border-color: #0d6efd;
}

/* Chat Input Wrapper */
.chat-input-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.chat-input-tools {
    gap: 2px;
}

.brx-input .form-control {
    border: none;
}

.brx-input-chat {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--vz-input-bg-custom);
    background-clip: padding-box;
    border: var(--vz-border-width) solid var(--vz-input-border-custom);
    border-radius: var(--vz-border-radius);
    -webkit-transition:
        border-color 0.15s ease-in-out,
        -webkit-box-shadow 0.15s ease-in-out;
    transition:
        border-color 0.15s ease-in-out,
        -webkit-box-shadow 0.15s ease-in-out;
    transition:
        border-color 0.15s ease-in-out,
        box-shadow 0.15s ease-in-out;
    transition:
        border-color 0.15s ease-in-out,
        box-shadow 0.15s ease-in-out,
        -webkit-box-shadow 0.15s ease-in-out;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.right-chat-input {
    display: block;
    width: fit-content;
    padding: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--vz-body-color);
    border-left: none;
}

.chat-input-tools .btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
}

.chat-input-tools .btn:hover {
    background-color: #f8f9fa;
    color: #495057;
    transform: scale(1.05);
}

.chat-input-tools .btn-primary {
    /* background-color: #0073df4d; */
    border: none;
    color: white;
}

.chat-input-tools .btn-primary:hover {
    background-color: var(--blue-color-hover);
    border-color: #0a58ca;
    color: white;
}

/* Dark theme support for chat input tools */
[data-bs-theme="dark"] .chat-input-label {
    color: #adb5bd;
}

[data-bs-theme="dark"] .chat-input-tools .btn:hover {
    background-color: #3a3b3c;
    color: #e4e6ea;
}

/* Tag Assignment Dropdown */
.tag-assignment-dropdown {
    width: 300px !important;
    max-height: 400px;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0;
}

.tag-assignment-dropdown .dropdown-header {
    background-color: white;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag-assignment-dropdown .dropdown-body {
    max-height: 400px;
    padding-bottom: 60px;
    /* Space for fixed button */
}

.tag-assignment-dropdown.dropdown-submenu-content .dropdown-body {
    max-height: 400px;
    padding-bottom: 10px;
    /* Space for fixed button */
}

.tag-assignment-dropdown .dropdown-submenu-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-title);
}

.tag-assignment-dropdown .dropdown-body .simplebar-content {
    padding: 0;
}

.tag-assignment-dropdown .dropdown-body .simplebar-scrollbar::before {
    background-color: #dee2e6;
    border-radius: 3px;
    width: 6px;
}

.tag-assignment-dropdown .dropdown-body .simplebar-track.simplebar-vertical {
    width: 8px;
    right: 2px;
}

/* Dark theme scrollbar */
[data-bs-theme="dark"] .tag-assignment-dropdown .dropdown-body .simplebar-scrollbar::before {
    background-color: #495057;
}

.tag-assignment-dropdown .search-section {
    padding: 6px 16px;
}

.tag-assignment-dropdown .search-section .input-group {
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    overflow: hidden;
}

.tag-assignment-dropdown .search-section .input-group-text {
    background-color: white;
    border: none;
    padding: 8px 12px;
}

.tag-assignment-dropdown .search-section .form-control {
    border: none;
    background-color: white;
    padding: 8px 12px;
    font-size: 13px;
}

.tag-assignment-dropdown .search-section .form-control:focus {
    box-shadow: none;
}

.tag-section {
    /* padding: 12px 16px; */
    padding: 2px 16px;
}

/* .tag-section:last-child {
    margin-bottom: 20px;
} */

.tag-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    cursor: pointer;
}

.tag-section-header h6 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
}

.tag-section-header .collapse-btn {
    background: none;
    border: none;
    padding: 0;
    color: #6c757d;
    font-size: 16px;
    line-height: 1;
}

.tag-options {
    margin: 0;
}

.tag-options .form-check {
    display: flex;
    align-items: center;
    padding: 6px 0;
    margin: 0;
}

.tag-options .form-check-input {
    margin: 0 8px 0 0;
    width: 16px;
    height: 16px;
}

.tag-options .form-check-label {
    display: flex;
    align-items: center;
    flex-grow: 1;
    margin: 0;
    font-size: 13px;
    color: #212529;
    cursor: pointer;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 3px;
}

/* Collapse animation */
.collapse .ri-arrow-down-s-line {
    transition: transform 0.2s ease;
}

.collapsed .ri-arrow-down-s-line {
    transform: rotate(-90deg);
}

/* Prevent dropdown close on internal clicks */
.tag-assignment-dropdown .form-check,
.tag-assignment-dropdown .form-check-input,
.tag-assignment-dropdown .form-check-label,
.tag-assignment-dropdown input[type="text"],
.tag-assignment-dropdown .collapse-btn,
.tag-assignment-dropdown .settings-btn {
    pointer-events: auto;
}

/* Page Filter Dropdown */
.page-filter-dropdown {
    /* width: 300px !important;
    max-height: 400px; */
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0;
}

.page-filter-dropdown .dropdown-header {
    background-color: white;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.page-filter-dropdown .filter-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-title);
}

.page-filter-dropdown .dropdown-body {
    max-height: 400px;
    padding-bottom: 80px;
    /* Space for fixed button */
}

.page-filter-dropdown .dropdown-body .simplebar-content {
    padding: 0;
}

.page-filter-dropdown .dropdown-body .simplebar-scrollbar::before {
    background-color: #dee2e6;
    border-radius: 3px;
    width: 6px;
}

.page-filter-dropdown .dropdown-body .simplebar-track.simplebar-vertical {
    width: 8px;
    right: 2px;
}

.page-filter-dropdown .search-section {
    padding: 6px 16px;
}

.page-filter-dropdown .search-section .input-group {
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    overflow: hidden;
}

.page-filter-dropdown .search-section .input-group-text {
    background-color: white;
    border: none;
    padding: 8px 12px;
}

.page-filter-dropdown .search-section .form-control {
    border: none;
    background-color: white;
    padding: 8px 12px;
    font-size: 13px;
}

.page-filter-dropdown .search-section .form-control:focus {
    box-shadow: none;
}

.select-all-section {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
}

.page-group-section {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
}

.page-group-section:last-child {
    margin-bottom: 20px;
}

.page-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 4px 0;
}

.page-group-header .form-check {
    margin-bottom: 0;
    flex-grow: 1;
}

.brx .form-check-label {
    font-weight: 500;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
}

.page-group-header .collapse-btn {
    background: none;
    border: none;
    padding: 4px;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.page-group-header .collapse-btn:hover {
    color: #495057;
}

.page-options {
    padding-left: 12px;
    margin-top: 8px;
}

.page-options .form-check-input {
    position: relative;
    top: 50%;
    transform: translateY(50%);
}

.brx .form-check-input {
    border: 2px solid #27272780;
}

.page-item-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.page-item-option:last-child {
    border-bottom: none;
}

.page-item-option .form-check {
    margin-bottom: 0;
    flex-grow: 1;
}

.page-item-option .form-check-label {
    cursor: pointer;
    width: 100%;
}

.page-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.page-name {
    font-weight: 500;
    font-size: 13px;
    color: #212529;
}

.page-id {
    font-size: 11px;
    color: #6c757d;
}

.page-item__badge {
    display: flex;
    align-items: center;
    position: relative;
    min-width: 0;
}

/* Badge transition effect */
.page-item__badge .badge.rounded-pill {
    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        width 0.3s ease,
        margin 0.3s ease;
    opacity: 1;
    transform: translateX(0);
    width: auto;
    margin-right: 0;
    flex-shrink: 0;
}

.page-item:hover .page-item__badge .badge.rounded-pill,
.page-item.page-item--active .page-item__badge .badge.rounded-pill {
    opacity: 0;
    transform: translateX(10px);
    width: 0;
    margin-right: 0;
    overflow: hidden;
}

/* Page options button với slide effect */
.page-options-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    padding: 4px;
    color: #6c757d;
    cursor: pointer;
    border-radius: 4px;
}

.page-item__badge .dropdown {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 0;
    overflow: hidden;
}

.page-item:hover .page-item__badge .dropdown,
.page-item.page-item--active .page-item__badge .dropdown,
.page-item__badge .dropdown.show {
    opacity: 1;
    transform: translateX(0);
    width: auto;
    overflow: visible;
}

/* Dropdown menu z-index cao để hiển thị trên container */
.page-item .dropdown-menu {
    z-index: 9999 !important;
    position: absolute !important;
}

/* Khi dropdown active, giữ badge ẩn */
.page-item__badge .dropdown.show ~ .badge.rounded-pill,
.page-item.page-item--active .page-item__badge .badge.rounded-pill {
    opacity: 0;
    transform: translateX(10px);
    width: 0;
    margin-right: 0;
    overflow: hidden;
}

/* Page options button hover effect */
.page-options-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.page-options-btn img {
    width: 16px;
    height: 16px;
}

/* Dropdown menu cho page options */
.page-item .dropdown-menu {
    min-width: 200px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 9999 !important;
    position: absolute !important;
    transform: none !important;
    will-change: auto !important;
}

.page-item .dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    color: #495057;
    display: flex;
    align-items: center;
}

.page-item .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.page-item .dropdown-item i {
    font-size: 16px;
    color: #6c757d;
}

/* Fix overflow issue cho chat-pages__list khi dropdown mở */
.chat-pages__list {
    overflow: visible !important;
}

.chat-pages__list .page-item .dropdown.show {
    position: static;
}

.chat-pages__list .page-item .dropdown.show .dropdown-menu {
    position: fixed !important;
    z-index: 9999 !important;
}

.page-item-option:hover .page-options-btn {
    opacity: 1;
}

.page-options-btn:hover {
    color: #495057;
}

.page-filter-dropdown .fixed-bottom-section {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid #f1f3f4;
    padding: 12px 16px;
}

.page-filter-dropdown .fixed-bottom-section button {
    width: 100%;
    background: var(--bg-button);
    border: none;
    padding: 8px 12px;
    color: var(--text-title);
    font-weight: 500;
    font-size: 13px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.page-filter-dropdown .fixed-bottom-section button:hover {
    background-color: var(--bg-button-hover);
}

.collapsed .ri-arrow-down-s-line {
    transform: rotate(-90deg);
}

/* Prevent dropdown close on internal clicks */
.page-filter-dropdown .form-check,
.page-filter-dropdown .form-check-input,
.page-filter-dropdown .form-check-label,
.page-filter-dropdown input[type="text"],
.page-filter-dropdown .collapse-btn,
.page-filter-dropdown .page-options-btn {
    pointer-events: auto;
}

/* Dark theme support */
[data-bs-theme="dark"] .tag-assignment-dropdown {
    background-color: #2b3035;
    border-color: #495057;
}

[data-bs-theme="dark"] .tag-assignment-dropdown .dropdown-header {
    background-color: #2b3035;
    border-bottom-color: #495057;
    color: #e4e6ea;
}

[data-bs-theme="dark"] .tag-assignment-dropdown .search-section {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .tag-assignment-dropdown .search-section .input-group {
    border-color: #495057;
}

[data-bs-theme="dark"] .tag-assignment-dropdown .search-section .input-group-text,
[data-bs-theme="dark"] .tag-assignment-dropdown .search-section .form-control {
    background-color: #3a3b3c;
    color: #e4e6ea;
}

[data-bs-theme="dark"] .tag-options .form-check-label {
    color: #e4e6ea;
}

[data-bs-theme="dark"] .tag-assignment-dropdown .fixed-bottom-section {
    background-color: #2b3035;
    border-top-color: #495057;
}

[data-bs-theme="dark"] #createNewTagBtn {
    background-color: #3a3b3c;
    border-color: #495057;
    color: #adb5bd;
}

[data-bs-theme="dark"] #createNewTagBtn:hover {
    border-color: #0d6efd;
    background-color: #1a2332;
    color: #0d6efd;
}

/* Dark theme support for Page Filter Dropdown */
[data-bs-theme="dark"] .page-filter-dropdown {
    background-color: #2b3035;
    border-color: #495057;
}

[data-bs-theme="dark"] .page-filter-dropdown .dropdown-header {
    background-color: #2b3035;
    color: #e4e6ea;
}

[data-bs-theme="dark"] .page-filter-dropdown .search-section .input-group {
    border-color: #495057;
}

[data-bs-theme="dark"] .page-filter-dropdown .search-section .input-group-text,
[data-bs-theme="dark"] .page-filter-dropdown .search-section .form-control {
    background-color: #3a3b3c;
    color: #e4e6ea;
}

[data-bs-theme="dark"] .select-all-section,
[data-bs-theme="dark"] .page-group-section {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .page-group-header .form-check-label,
[data-bs-theme="dark"] .page-name {
    color: #e4e6ea;
}

[data-bs-theme="dark"] .page-id {
    color: #adb5bd;
}

[data-bs-theme="dark"] .page-item-option {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .page-filter-dropdown .fixed-bottom-section {
    background-color: #2b3035;
    border-top-color: #495057;
}

[data-bs-theme="dark"] .page-filter-dropdown .fixed-bottom-section button {
    color: #0d6efd;
}

[data-bs-theme="dark"] .page-filter-dropdown .fixed-bottom-section button:hover {
    background-color: #3a3b3c;
}

[data-bs-theme="dark"] .page-filter-dropdown .dropdown-body .simplebar-scrollbar::before {
    background-color: #495057;
}

/* Twocolumn nav hide class */
[data-layout="twocolumn"] .navbar-nav.twocolumn-nav-hide {
    display: none !important;
}

/* Control navbar-nav visibility for twocolumn layout */
@media (max-width: 767.98px) {
    /* Only hide navbar-nav when explicitly hidden, not by default */
    [data-layout="twocolumn"] .app-menu .navbar-nav.twocolumn-nav-hide {
        display: none !important;
    }

    /* Show navbar-nav when explicitly shown or when there are active items */
    [data-layout="twocolumn"] .app-menu .navbar-nav.twocolumn-nav-show,
    [data-layout="twocolumn"] .app-menu .navbar-nav:not(.twocolumn-nav-hide) {
        display: block !important;
    }
}

.con-item__content {
    max-width: calc(100% - 48px - 2rem);
}

.con-item__name {
    color: #1c1e21;
    font-size: 14px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
}

.con-item__time {
    font-size: 12px;
    color: #65676b;
    flex-shrink: 0;
}

.con-item__message {
    font-size: 13px;
    color: #65676b;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
}

.con-item__tags {
    max-height: 40px;
    /* overflow: hidden; */
    width: 100%;
    max-width: 100%;
}

.con-item__actions {
    flex-shrink: 0;
}

.con-item__actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.con-item__actions .icon {
    width: 16px;
    height: 16px;
    display: block;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.con-item__actions .icon:hover {
    opacity: 1;
}

/* Dark Theme Support */
[data-bs-theme="dark"] .chat-header {
    background-color: #242526;
    border-bottom-color: #3e4042;
}

[data-bs-theme="dark"] .chat-header__title {
    color: #e4e6ea;
}

[data-bs-theme="dark"] .chat-pages {
    background-color: #242526;
}

[data-bs-theme="dark"] .chat-pages__title {
    color: #b0b3b8;
}

[data-bs-theme="dark"] .chat-pages__filter:hover {
    background-color: #3a3b3c;
}

[data-bs-theme="dark"] .chat-page-item:hover {
    background-color: #3a3b3c;
}

[data-bs-theme="dark"] .chat-page-item__avatar img {
    border-color: #3e4042;
}

[data-bs-theme="dark"] .chat-page-item__name {
    color: #e4e6ea;
}

[data-bs-theme="dark"] .chat-page-item__platform-icon {
    background-color: #242526;
    border-color: #242526;
}

[data-bs-theme="dark"] .chat-conversations {
    background-color: #242526;
}

[data-bs-theme="dark"] .chat-conversations__title {
    color: #b0b3b8;
}

[data-bs-theme="dark"] .chat-conversations__menu:hover {
    background-color: #3a3b3c;
}

[data-bs-theme="dark"] .chat-conversation-item:hover {
    background-color: #3a3b3c;
}

[data-bs-theme="dark"] .chat-conversation-item--selected {
    background-color: #263951;
    border-color: #1877f2;
}

[data-bs-theme="dark"] .chat-conversation-item__name {
    color: #e4e6ea;
}

[data-bs-theme="dark"] .chat-conversation-item__time {
    color: #b0b3b8;
}

[data-bs-theme="dark"] .chat-conversation-item__message {
    color: #b0b3b8;
}

[data-bs-theme="dark"] .chat-conversation-item__platform-icon {
    background-color: #242526;
    border-color: #242526;
}

/* Mobile Responsive */
@media (max-width: 575.98px) {
    .chat-header {
        padding: 0.75rem !important;
    }

    .chat-header__title {
        font-size: 1.25rem;
    }

    .chat-header__btn {
        width: 32px;
        height: 32px;
    }

    .chat-pages {
        padding: 0rem !important;
    }

    .chat-conversations {
        padding: 0rem !important;
    }
}

/*# sourceMappingURL=custom.min.css.map */

/*# list group css */
.nav-success.nav-tabs-custom .nav-link.active {
    color: #0d6efd !important;
    background-color: #ffffff00;
}

.nav-success.nav-tabs .nav-link.active {
    color: #0d6efd !important;
    background-color: #ffffff00;
}

.nav-success .nav-link.active {
    color: #fff;
    background-color: #ffffff00;
}

.nav-success.nav-tabs-custom .nav-link.active::after {
    background-color: #0d6efd !important;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 999px;
    line-height: 1;
    color: #111827;
    text-decoration: none;
    transition: 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.9em;
}

.chip:hover {
    background: #f1f5f9;
    text-decoration: none;
}

.chip .logo {
    width: 20px;
    height: 20px;
    display: inline-block;
}

.chip .count {
    font-size: 0.9em;
    min-width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    background: #e5e7eb;
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.chip-active {
    border-color: #3b82f6;
    background: #eef5ff;
    color: #0b64e0;
}

.chip-active .count {
    background: #ef4444;
    color: #fff;
    min-width: 18px;
    height: 18px;
}

.chip-row {
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    align-items: center;
    justify-content: space-between;
}

.mini-card {
    border: 1px solid #e6e9f0;
    border-radius: 12px;
    padding: 10px 12px;
}

.mini-logo-wrap {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6e9f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mini-title {
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.mini-social {
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mini-social img {
    width: 18px;
    height: 18px;
}

.mini-kebab {
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Grid layout styles for mini-cards */
.mini-card-wrapper {
    position: relative;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.mini-card-wrapper:hover {
    background: #f8f9fa;
}

.mini-card-wrapper .card-body {
    padding: 16px;
}

.mini-card-wrapper .mini-card {
    border: none;
    padding: 0;
    background: transparent;
}

/* Mini kebab button positioning and visibility */
.mini-kebab {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
}

.mini-kebab:hover {
    background: #eef2f7;
    color: #374151;
}

/* Show kebab button on card hover */
.mini-card-wrapper:hover .mini-kebab {
    opacity: 1;
    visibility: visible;
}

/* Card checkbox styling */
.card-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 15;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.card-checkbox .form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.card-checkbox .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.card-checkbox .form-check-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Selection mode styles */
.selection-mode .card-checkbox {
    opacity: 1;
    visibility: visible;
}

.selection-mode .mini-kebab {
    display: none !important;
}

.selection-mode .mini-card-wrapper {
    cursor: pointer;
}

.selection-mode .mini-card-wrapper.selected {
    border-color: #0d6efd;
}

/* Dropdown positioning for mini-kebab */
.mini-card-wrapper .dropdown {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

/* Mini kebab dropdown menu styling */
.mini-kebab-menu {
    min-width: 200px;
    padding: 8px 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
}

.mini-kebab-menu .dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    color: #374151;
    /* transition: all 0.2s ease; */
}

.mini-kebab-menu .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #1f2937;
}

.mini-kebab-menu .dropdown-item i {
    color: #6b7280;
    width: 16px;
}

.mini-kebab-menu .dropdown-item:hover i {
    color: #374151;
}

.mini-logo-wrap {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
}

/* Search box styling */
.search-box {
    position: relative;
    min-width: 350px;
    max-width: 100%;
}

.search-box .form-control {
    min-width: 350px;
    padding-right: 45px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}

.search-box .form-control:focus {
    border-color: #86b7fe;
    outline: 0;
}

.search-box .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-box {
        min-width: 250px;
    }

    .search-box .form-control {
        min-width: 250px;
    }

    #profilePopover {
        padding: 0;
        width: 44px;
        height: 44px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .search-box {
        min-width: 200px;
    }

    .search-box .form-control {
        min-width: 200px;
    }
}

/* Selected count text styling */
.selected-count-text {
    font-size: 0.9em;
    white-space: nowrap;
}

.selected-count-text .fw-bold {
    font-weight: 600;
}

/* ===== Group Cards Styling ===== */
.group-card-wrapper {
    margin-bottom: 1rem;
}

.group-card-wrapper .group-card {
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Group preview grid */
.group-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.5rem;
    border-radius: 8px;
    overflow: visible;
    background: transparent;
    width: 100%;
    min-height: 120px;
    max-height: 120px;
}

.preview-item {
    position: relative;
    border-radius: 9px;
    overflow: visible;
    background: #e9ecef;
    width: 100%;
    aspect-ratio: 1;
    height: auto;
    min-height: 50px;
    max-height: 55px;
    border: 1px solid #cbd5e1;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 9px;
}

.preview-item .platform-icon {
    position: absolute;
    bottom: -8px;
    right: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 2px solid #ffffff;
}

.preview-item .platform-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item.more-count {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    aspect-ratio: 1;
}

/* Empty slots for maintaining grid structure */
.preview-item.empty-slot {
    background: transparent;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    aspect-ratio: 1;
}

/* Group info styling */
.group-info {
    padding-top: 8px;
}

.group-color-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.group-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.group-count .badge {
    font-size: 11px;
    padding: 2px 6px;
}

.group-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-left: auto;
}

.group-star.active {
    border: 1px solid #f59e0b;
    background: #ffffff;
    color: #f59e0b;
}

.group-star i {
    font-size: 14px;
    transition: all 0.2s ease;
}

.group-settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
}

.group-settings i {
    font-size: 16px;
    transition: all 0.2s ease;
}

.group-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* -- ko dc sua class cua layout */
/* .avatar-group {
    padding-left: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #6b7280;
} */

/* Empty placeholder for new groups */
.preview-item.empty-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    min-height: 120px;
    max-height: 120px;
    border-radius: 8px;
}

.preview-item.empty-placeholder i {
    font-size: 24px;
}

/* Responsive adjustments for group cards */
@media (max-width: 768px) {
    .group-preview-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 8px;
        padding: 10px;
        min-height: 120px;
    }

    .preview-item {
        border-radius: 6px;
        aspect-ratio: 1;
        overflow: visible;
    }

    .preview-item img {
        border-radius: 6px;
    }

    .preview-item.more-count {
        border-radius: 6px;
        aspect-ratio: 1;
    }

    .preview-item.empty-slot {
        border-radius: 6px;
        aspect-ratio: 1;
    }

    .preview-item .platform-icon {
        width: 20px;
        height: 20px;
        bottom: -6px;
        right: -6px;
        border: 1.5px solid #ffffff;
    }
}

@media (max-width: 576px) {
    .group-preview-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 6px;
        padding: 8px;
        min-height: 100px;
    }

    .preview-item {
        border-radius: 4px;
        aspect-ratio: 1;
        overflow: visible;
    }

    .preview-item img {
        border-radius: 4px;
    }

    .preview-item.more-count {
        border-radius: 4px;
        font-size: 11px;
        aspect-ratio: 1;
    }

    .preview-item.empty-slot {
        border-radius: 4px;
        aspect-ratio: 1;
    }

    .preview-item .platform-icon {
        width: 18px;
        height: 18px;
        bottom: -5px;
        right: -5px;
        border: 1px solid #ffffff;
    }

    .preview-item .platform-icon img {
        width: 10px;
        height: 10px;
    }
}

/* ===== Modal Popup Connect Platform ===== */
.modal-backdrop.show {
    opacity: 0.35;
}

.modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(16, 24, 40, 0.18);
}

.connect-wrap {
    min-height: 520px;
}

.aside {
    width: 260px;
    border-right: 1px solid #edf0f4;
    background: #fafbff;
}

.aside-header {
    padding: 16px 20px;
    font-weight: 600;
    color: #3a3a3b;
    border-bottom: 1px solid #edf0f4;
}

.menu {
    padding: 1em 1em;
}

.menu .item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 10px 12px;
    border-radius: 10px;
    color: #0f172a;
    text-decoration: none;
}

.menu .item:hover {
    background: #eef2ff;
}

.menu .item.active {
    background: #e9f1ff;
    border: 1px solid #cfe1ff;
}

.menu .item img {
    width: 20px;
    height: 20px;
}

.content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-logos {
    display: flex;
    align-items: center;
    gap: 2em;
    margin-bottom: 18px;
}

.hero-logos img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.hero-logos .swap {
    font-size: 28px;
    color: #94a3b8;
}

.hero-logos .swap img {
    width: 20px !important;
    height: 20px !important;
}

.content h5 {
    font-weight: 600;
    color: #0f172a;
}

.content p.desc {
    color: #6b7280;
    max-width: 520px;
    margin: 6px auto 22px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #dfe5f0;
    border-radius: 10px;
    padding: 10px 14px;
    background: #f7faff;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
}

.cta-btn:hover {
    background: #e8f4fd;
    border-color: #bdd7ee;
    text-decoration: none;
    color: inherit;
}

.cta-btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    transition: all 0.2s ease;
}

.help-link {
    margin-top: 14px;
    font-size: 0.9em;
}

.help-link a {
    text-decoration: underline;
}

/* Close (X) */
.btn-close-custom {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    border: none;
    background: #ffff;
}

@media (max-width: 768px) {
    .aside {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid #edf0f4;
    }

    .connect-wrap {
        min-height: auto;
    }
}

/* Hide dropdown arrow for buttons with dots icon */
.dropdown .btn.dropdown-toggle::after {
    display: none;
}

/* Modal overlay fix */
.modal {
    z-index: 1055;
}

.modal-backdrop {
    z-index: 1050;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Ensure modal content is isolated */
.modal-dialog {
    position: relative;
    z-index: 1056;
}

/* Hide main content when modal is open */
body.modal-open .main-content {
    filter: none;
}

/* Ensure modal backdrop is properly removed */
.modal-backdrop.fade {
    transition: opacity 0.15s linear;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* Force remove any stuck backdrops */
body.modal-open .modal-backdrop {
    display: block;
}

body:not(.modal-open) .modal-backdrop {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .chat-leftsidebar {
        height: calc(100svh - 8px) !important;
    }
}

@media (max-width: 575.98px) {
    .chat-leftsidebar {
        height: calc(100svh - 85px) !important;
        display: flex;
        flex-direction: column;
    }

    .chat-pages__list {
        max-height: 150px;
        /* Smaller height for mobile - 3 items */
    }

    .chat-pages__list[data-simplebar] {
        max-height: 150px;
        height: 150px;
    }

    .chat-conversations__list {
        /* Use flex instead of calc for mobile */
        flex: 1;
        min-height: 0;
    }

    .chat-conversations__list[data-simplebar] {
        height: 100%;
        overflow: hidden;
    }
}

/* Two Column Menu Bottom Items Extension */

/* Bottom menu group container */
[data-layout="twocolumn"] .twocolumn-iconview .bottom-menu-group {
    width: 100%;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
}

/* Bottom items styling */
[data-layout="twocolumn"] .twocolumn-iconview .bottom-menu-group li {
    display: block;
    visibility: visible;
    opacity: 1;
    list-style: none;
    position: relative;
}

#profilePopover {
    padding: 0;
}

/* Ensure twocolumn-iconview is flex container */
[data-layout="twocolumn"] .twocolumn-iconview {
    display: flex;
    background-color: var(--blue-color-hover);
    width: 52px;
    height: 100%;
    left: -52px;
}

/* Bottom items styling */
[data-layout="twocolumn"] .brx-custom .twocolumn-iconview .nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: var(--vz-vertical-menu-item-bg);
}

[data-layout="twocolumn"] .brx-custom .twocolumn-iconview .nav-icon.active {
    background-color: var(--vz-white);
}

[data-layout="twocolumn"] .twocolumn-iconview li .nav-icon.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    background-color: var(--vz-white);
    height: calc(100% - 18px);
    border-radius: 2px;
    transition: opacity 0.2s ease;
    border-top-right-radius: 100px;
    border-bottom-right-radius: 100px;
}

[data-layout="twocolumn"] .twocolumn-iconview .bottom-menu-group li .nav-icon.active::before {
    content: none;
}

/* Active state for bottom items */
[data-layout="twocolumn"] .twocolumn-iconview .bottom-menu-group li .nav-icon.active {
    background: var(--vz-primary);
    color: var(--vz-vertical-menu-item-active-color);
    border-color: var(--vz-primary);
}

/* Bottom items default styling */
[data-layout="twocolumn"] .twocolumn-iconview li[id^="menu-"] .nav-icon {
    background-color: var(--vz-vertical-menu-item-bg);
    z-index: 1;
}

[data-layout="twocolumn"] .twocolumn-iconview .bottom-menu-group li#menu-avatar .nav-icon {
    color: var(--vz-vertical-menu-item-active-color);
    background: none;
}

/* Specific styling for each bottom menu item */

/* Notification badge */
[data-layout="twocolumn"] .twocolumn-iconview .bottom-menu-group li#menu-notifications .notification-badge {
    position: absolute;
    top: 10px;
    right: 17px;
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--theme-danger);
    color: var(--vz-vertical-menu-item-active-color);
}

[data-layout="twocolumn"] .twocolumn-iconview .bottom-menu-group li#menu-avatar .avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.apply-filter-btn {
    display: none;
    font-weight: 400;
    font-size: 14px;
    color: var(--blue-color);
    cursor: pointer;
}

.apply-filter-btn:hover {
    color: var(--blue-color-hover);
}

.back-submenu-btn {
    display: none;
}

/* Mobile responsive for bottom items */
@media (max-width: 575.98px) {
    .d-none-mobile {
        display: none !important;
    }

    .apply-filter-btn {
        display: flex;
    }

    .back-submenu-btn {
        display: block;
    }

    [data-layout="twocolumn"] .brx-custom .twocolumn-iconview .bottom-menu-group {
        flex-direction: row;
        position: relative;
        width: fit-content;
        right: 0;
        top: 0;
        bottom: auto;
        display: flex;
        left: auto;
        transform: none;
    }

    [data-layout="twocolumn"] .twocolumn-iconview li .nav-icon.active::before {
        content: none;
    }

    [data-layout="twocolumn"] .brx-custom .twocolumn-iconview .bottom-menu-group li {
        margin: 0 2px;
    }

    [data-layout="twocolumn"] .brx-custom .twocolumn-iconview .bottom-menu-group li .nav-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    /* Avatar on mobile */
    [data-layout="twocolumn"] .brx-custom .twocolumn-iconview .bottom-menu-group li#menu-avatar .avatar-img {
        width: 32px;
        height: 32px;
    }

    /* Mobile main menu items */
    [data-layout="twocolumn"] .simplebar-content > li #sidebarDashboards {
        width: 100%;
    }

    [data-layout="twocolumn"] .simplebar-content > li {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        /* max-width: 60px !important; */
        padding-bottom: 2px !important;
        position: relative !important;
    }

    /* Add text labels for main menu items on mobile */
    [data-layout="twocolumn"] .simplebar-content > li::after {
        content: "";
        font-size: 10px !important;
        color: rgba(255, 255, 255, 0.8) !important;
        margin-top: 3px !important;
        white-space: nowrap !important;
        font-weight: 500 !important;
        line-height: 1 !important;
        text-align: center !important;
        position: relative !important;
        z-index: 2 !important;
    }

    /* Specific labels for main menu items */
    [data-layout="twocolumn"] .twocolumn-iconview .simplebar-content > li:nth-child(2)::after {
        content: "Live chat" !important;
    }

    [data-layout="twocolumn"] .twocolumn-iconview .simplebar-content > li:nth-child(3)::after {
        content: "Page.X" !important;
    }

    [data-layout="twocolumn"] .simplebar-content > li .nav-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 24px !important;
        margin: 0 0 2px 0 !important;
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.9) !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
        position: relative !important;
        z-index: 1 !important;
    }

    [data-layout="twocolumn"] .simplebar-content > li .nav-icon:hover,
    [data-layout="twocolumn"] .simplebar-content > li .nav-icon.active {
        background: rgba(255, 255, 255, 0.15) !important;
        color: #fff !important;
        transform: scale(1.05) !important;
    }

    /* Ensure text doesn't get affected by active background */
    [data-layout="twocolumn"] .simplebar-content > li:hover::after,
    [data-layout="twocolumn"] .simplebar-content > li.active::after {
        color: rgba(255, 255, 255, 1) !important;
        z-index: 3 !important;
    }

    /* Bottom menu group on mobile */
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group {
        display: contents !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
    }

    /* Bottom menu items on mobile */
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li {
        flex: 1 !important;
        display: flex;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        position: relative !important;
        max-width: 60px !important;
        padding-bottom: 2px !important;
    }

    /* Add text labels for bottom menu items on mobile */
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li::after {
        content: "";
        font-size: 9px !important;
        color: rgba(255, 255, 255, 0.8) !important;
        margin-top: 2px !important;
        white-space: nowrap !important;
        font-weight: 500 !important;
        line-height: 1 !important;
        text-align: center !important;
        position: relative !important;
        z-index: 2 !important;
    }

    [data-layout="twocolumn"] .twocolumn-iconview .simplebar-content .bottom-menu-group li#menu-notifications::after {
        content: "Thông báo" !important;
    }

    [data-layout="twocolumn"] .twocolumn-iconview .simplebar-content .bottom-menu-group li#menu-dark-mode::after {
        content: "Chế độ" !important;
    }

    [data-layout="twocolumn"] .twocolumn-iconview .simplebar-content .bottom-menu-group li#menu-settings::after {
        content: "Cài đặt" !important;
    }

    [data-layout="twocolumn"] .twocolumn-iconview .simplebar-content .bottom-menu-group li#menu-avatar::after {
        content: "Hồ sơ" !important;
    }

    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li .nav-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 24px !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.9) !important;
        border-radius: 8px !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
    }

    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li .nav-icon:hover,
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li .nav-icon.active {
        background: rgba(255, 255, 255, 0.15) !important;
        color: #fff !important;
        transform: scale(1.05) !important;
        box-shadow: none !important;
    }

    /* Ensure bottom menu text doesn't get affected by active background */
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li:hover::after,
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li.active::after {
        color: rgba(255, 255, 255, 1) !important;
        z-index: 3 !important;
    }

    /* Avatar image on mobile */
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li#menu-avatar .nav-icon {
        padding: 2px !important;
        border: 2px solid rgba(255, 255, 255, 0.6) !important;
        border-radius: 50% !important;
    }

    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li#menu-avatar .avatar-img {
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
    }

    /* Notification badge on mobile */
    [data-layout="twocolumn"] .simplebar-content .bottom-menu-group li#menu-notifications .notification-badge {
        position: absolute !important;
        top: -2px !important;
        right: 8px !important;
        background: #dc3545 !important;
        color: #fff !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        min-width: 18px !important;
        height: 18px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 2px solid var(--vz-primary) !important;
        z-index: 1 !important;
    }

    /* Add padding to main content to avoid overlap with bottom nav */
    [data-layout="twocolumn"] .main-content {
        padding-bottom: 80px !important;
    }

    [data-layout="twocolumn"] .twocolumn-panel .main-content {
        margin-left: 0 !important;
    }

    .tag-assignment-dropdown {
        width: 100vw !important;
        max-height: 450px;
        overflow: hidden;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        padding: 0;
        transform: none !important;
        position: fixed !important;
        left: 0;
    }

    .page-filter-dropdown {
        width: 100vw !important;
        max-height: 600px;
        overflow: hidden;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        padding: 0;
        transform: none !important;
        position: fixed !important;
        left: 0;
    }

    .dropdown-menu.brx-dropdown {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .brx-dropdown .dropdown-item {
        padding: 0.7rem var(--vz-dropdown-item-padding-x);
        font-size: 0.9rem;
    }
}

/* User Chat Topbar Icons Styling */
.user-chat-topbar-icons .btn {
    border: none;
    background: transparent;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.user-chat-topbar-icons .btn:hover {
    background-color: #f8f9fa;
    transform: scale(1.05);
}

.user-chat-topbar-icons .btn:focus {
    box-shadow: none;
    outline: none;
}

.user-chat-topbar-icons img {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.user-chat-topbar-icons .btn:hover img {
    opacity: 1;
}

.brx-list-inline .btn-icon {
    color: #6c798f;
}

/*# sourceMappingURL=custom.min.css.map */

.img-fluid {
    max-width: 100%;
    height: auto;
    width: 100%;
}