body.fix-header.fix-sidebar {
    overflow-x: hidden;
}

#main-wrapper {
    min-height: 100vh;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(216, 224, 235, 0.92);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.top-navbar {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 18px;
    overflow: visible;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    min-width: 0;
}

.header-left {
    flex: 1 1 auto;
    gap: 12px;
}

.header-right {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 10px;
    min-width: auto;
    overflow: visible;
}

.sidebartoggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--crm-border);
    border-radius: 14px;
    background: var(--crm-surface);
    color: var(--crm-text);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.sidebartoggler:hover,
.sidebartoggler:focus {
    color: var(--crm-text);
    border-color: rgba(185, 133, 70, 0.32);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
    outline: none;
}

.header-brand {
    flex: 0 0 auto;
}

.header-brand .navbar-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    height: 44px;
    margin: 0;
    padding: 6px 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff7ec, #ffffff);
    border: 1px solid rgba(185, 133, 70, 0.16);
    overflow: visible;
}

.crm-brand-image,
.logo-img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.logo-img {
    max-height: 100%;
}

.header-page-title {
    min-width: 0;
    flex: 1 1 auto;
}

.header-page-title h4 {
    margin: 0;
    color: var(--crm-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-page-title span {
    display: block;
    margin-top: 2px;
    color: var(--crm-muted);
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-support {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(185, 133, 70, 0.16);
    background: var(--crm-accent-soft);
    color: var(--crm-accent-dark);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.header-support:hover,
.header-support:focus {
    color: var(--crm-accent-dark);
    background: #ffe8ce;
    box-shadow: 0 12px 22px rgba(183, 110, 34, 0.14);
    transform: translateY(-1px);
}

.header-right .navbar-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
    flex: 0 0 auto;
}

.header-right .nav-item,
.header-right .navbar-nav .nav-link,
.user-dropdown,
.notification-dropdown {
    min-width: 0;
    flex: 0 0 auto;
}

.header-right .navbar-nav .nav-link {
    margin: 0;
    padding: 0;
}

.user-dropdown,
.notification-dropdown {
    position: relative;
}

.notification-trigger {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--crm-border);
    background: var(--crm-surface);
    color: var(--crm-text);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.notification-dropdown,
.user-dropdown {
    align-self: center;
}

.notification-trigger:hover,
.notification-trigger:focus {
    text-decoration: none;
    color: var(--crm-text);
    border-color: rgba(185, 133, 70, 0.24);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.notification-trigger::after {
    display: none !important;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.26);
}

.notification-badge.is-hidden {
    display: none;
}

.user-profile {
    display: inline-flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 174px;
    min-height: 42px;
    padding: 6px 8px 6px 10px !important;
    border-radius: 14px;
    border: 1px solid var(--crm-border);
    background: var(--crm-surface);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
}

.user-profile::after {
    display: none !important;
}

.user-profile:hover,
.user-profile:focus {
    text-decoration: none;
    border-color: rgba(185, 133, 70, 0.24);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name,
.user-info small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-name {
    color: var(--crm-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15;
}

.user-info small {
    margin-top: 2px;
    color: var(--crm-muted);
    font-size: 10px;
    line-height: 1.15;
}

.profile-pic-shell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff0df, #edf5ff);
    border: 1px solid rgba(185, 133, 70, 0.14);
}

.profile-pic {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}

.user-dropdown .dropdown-menu {
    min-width: 230px;
    margin-top: 0;
    padding: 8px;
    border: 1px solid rgba(216, 224, 235, 0.95);
    border-radius: 18px;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
    position: fixed;
    top: calc(var(--header-height) + 10px);
    right: 16px;
    left: auto;
    bottom: auto;
    z-index: 1080;
}

.notification-dropdown .dropdown-menu,
#crmNotificationMenu.notification-menu {
    width: min(360px, calc(100vw - 32px));
    display: none;
    min-width: 340px;
    padding: 0;
    position: fixed;
    top: calc(var(--header-height) + 10px);
    right: 16px;
    left: auto;
    bottom: auto;
    overflow: hidden;
    z-index: 1080;
}

.notification-dropdown .dropdown-menu.show,
#crmNotificationMenu.notification-menu.show {
    display: flex;
    flex-direction: column;
}

#crmNotificationMenu {
    overflow: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.notification-menu-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 12px;
    background: #ffffff;
    border-bottom: 1px solid #eef2f7;
}

.notification-menu-head-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.notification-menu-head strong {
    display: block;
    color: var(--crm-text);
    font-size: 15px;
    font-weight: 800;
}

.notification-menu-head span {
    display: block;
    margin-top: 3px;
    color: var(--crm-muted);
    font-size: 11.5px;
    line-height: 1.45;
}

.notification-menu-head-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
}

.notification-head-action,
.notification-head-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.notification-head-action {
    border: 1px solid rgba(191, 219, 254, 0.9);
    padding: 0 11px;
    background: #eff6ff;
    color: #1d4ed8;
}

.notification-head-action:hover,
.notification-head-action:focus {
    background: #dbeafe;
    color: #1e40af;
}

.notification-head-action.is-hidden {
    display: none;
}

.notification-head-close {
    display: none;
    width: 32px;
    padding: 0;
    border: 1px solid var(--crm-border);
    background: #fff;
    color: var(--crm-text);
    font-size: 18px;
}

.notification-head-close:hover,
.notification-head-close:focus {
    background: #f8fafc;
}

.notification-menu-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 440px;
    padding: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

#crmNotificationList {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.notification-menu-list::-webkit-scrollbar {
    width: 8px;
}

.notification-menu-list::-webkit-scrollbar-track {
    background: transparent;
}

.notification-menu-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.notification-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    padding: 13px;
    border: 1px solid #e5edf5;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.notification-item:last-child {
    margin-bottom: 0;
}

.notification-item.is-unread {
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    box-shadow: inset 3px 0 0 #2563eb, 0 10px 26px rgba(15, 23, 42, 0.06);
}

.notification-item-main {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
}

.notification-item-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #334155;
    font-size: 15px;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.95);
}

.notification-item.is-unread .notification-item-icon::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 2px #ffffff;
}

.notification-item.is-danger .notification-item-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.notification-item.is-success .notification-item-icon {
    background: #dcfce7;
    color: #166534;
}

.notification-item.is-info .notification-item-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.notification-item.is-neutral .notification-item-icon {
    background: #f1f5f9;
    color: #334155;
}

.notification-item-copy {
    min-width: 0;
}

.notification-item-type {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notification-item-copy strong {
    display: block;
    color: var(--crm-text);
    font-size: 13.5px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.notification-item-copy p {
    margin: 5px 0 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.notification-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-left: 52px;
}

.notification-item-meta small {
    color: #64748b;
    font-size: 11px;
    line-height: 1.4;
}

.notification-read-state,
.notification-read-btn {
    flex: 0 0 auto;
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.notification-read-btn {
    border: 1px solid rgba(191, 219, 254, 0.9);
    background: #eff6ff;
    color: #1d4ed8;
}

.notification-read-btn:hover,
.notification-read-btn:focus {
    background: #dbeafe;
    color: #1e40af;
}

.notification-read-state {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

.notification-empty {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 18px 16px;
    text-align: center;
    color: var(--crm-muted);
    font-size: 12px;
}

.notification-empty strong {
    color: var(--crm-text);
    font-size: 14px;
}

.crm-notification-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.28);
    z-index: 1110;
}

.crm-notification-backdrop.is-visible {
    display: block;
}

.dropdown-user {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dropdown-user li + li {
    margin-top: 6px;
}

.dropdown-user li a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--crm-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.dropdown-user li a:hover,
.dropdown-user li a:focus {
    background: #f5f8fc;
    color: var(--crm-accent-dark);
}

.dropdown-user li a i {
    width: 16px;
    text-align: center;
    color: var(--crm-muted);
}

.crm-shell-overlay {
    position: fixed;
    inset: 0;
    z-index: 1044;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.left-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    z-index: 1046;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    min-height: 0;
    background: linear-gradient(180deg, #0f172a 0%, #13263d 100%);
    box-shadow: 20px 0 44px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.sidebar-brand {
    padding: 12px 12px 6px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #d28f47, #8f551d);
    color: #fff;
    font-size: 16px;
}

.brand-icon-logo {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    padding: 7px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 247, 236, 0.96), rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-icon-logo .crm-brand-image {
    max-height: 100%;
}

.brand-text {
    min-width: 0;
    flex: 1 1 auto;
}

.brand-text h4,
.brand-text p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-text h4 {
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
}

.brand-text p {
    color: rgba(203, 213, 225, 0.82) !important;
    font-size: 11px;
    margin-top: 2px;
}

.sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.scroll-sidebar {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(176, 191, 208, 0.5) rgba(255, 255, 255, 0.04);
    padding: 6px 8px 16px;
}

.scroll-sidebar::-webkit-scrollbar,
.sidebar-submenu::-webkit-scrollbar {
    width: 8px;
}

.scroll-sidebar::-webkit-scrollbar-track,
.sidebar-submenu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}

.scroll-sidebar::-webkit-scrollbar-thumb,
.sidebar-submenu::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(176, 191, 208, 0.45);
}

.scroll-sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-submenu::-webkit-scrollbar-thumb:hover {
    background: rgba(196, 209, 223, 0.7);
}

.scroll-sidebar,
.sidebar-nav,
#sidebarnav {
    position: relative;
    z-index: 1;
}

.sidebar-nav {
    min-height: 100%;
}

#sidebarnav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-section-title {
    padding: 12px 16px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(214, 223, 232, 0.62);
}

.sidebar-item {
    list-style: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    margin: 2px 4px;
    padding: 10px 12px !important;
    border-radius: 14px;
    color: #dce6f2 !important;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link:focus,
.sidebar-item.active > .sidebar-link,
.sidebar-item.open > .sidebar-link {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.sidebar-link .menu-icon {
    width: 18px;
    text-align: center;
    flex: 0 0 18px;
}

.sidebar-link .menu-text {
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-item .menu-arrow {
    margin-left: auto;
    transition: transform 0.22s ease;
}

.sidebar-item.open > .sidebar-link .menu-arrow,
.sidebar-item.active > .sidebar-link .menu-arrow {
    transform: rotate(90deg);
}

.sidebar-submenu {
    display: none;
    margin: 4px 4px 8px;
    padding: 4px;
    list-style: none;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.06);
    max-height: min(42vh, 360px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(176, 191, 208, 0.42) transparent;
}

.sidebar-submenu.show,
.sidebar-item.open > .sidebar-submenu,
.sidebar-item.active > .sidebar-submenu {
    display: block;
}

.sidebar-submenu li + li {
    margin-top: 4px;
}

.sidebar-submenu li a {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 10px;
    color: rgba(220, 230, 242, 0.9);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-submenu li a:hover,
.sidebar-submenu li a:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar-submenu li.active a,
.sidebar-submenu li a.active {
    background: linear-gradient(135deg, rgba(210, 143, 71, 0.22), rgba(143, 85, 29, 0.18));
    border: 1px solid rgba(210, 143, 71, 0.18);
    color: #ffffff;
}

@media (min-width: 1170px) {
    .sidebar-brand {
        flex: 0 0 auto;
    }

    .left-sidebar {
        max-height: calc(100vh - var(--header-height));
        max-height: calc(100dvh - var(--header-height));
    }

    .left-sidebar .scroll-sidebar,
    .left-sidebar .slimScrollDiv {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none !important;
        height: auto !important;
        overflow-y: auto !important;
        padding-bottom: 36px;
    }

    .left-sidebar .slimScrollDiv .scroll-sidebar {
        padding-bottom: 0;
    }

    .sidebar-nav {
        min-height: auto;
        padding-bottom: 12px;
    }

    #sidebarnav {
        padding-bottom: 12px;
    }

    .sidebar-submenu {
        max-height: none;
        overflow: visible;
    }
}

.page-wrapper {
    position: relative;
    z-index: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    padding-top: calc(var(--header-height) + 10px);
    background: transparent !important;
}

body.mini-sidebar .page-wrapper {
    margin-left: var(--sidebar-mini-width);
}

.page-titles {
    margin: 0 0 8px;
    padding: 8px 20px 2px;
    background: transparent;
}

.page-titles h3,
.page-titles h4 {
    margin-bottom: 2px;
    line-height: 1.2;
}

.page-titles .breadcrumb {
    margin-bottom: 0;
    font-size: 12px;
}

.container-fluid {
    width: 100%;
    max-width: var(--crm-page-max-width);
    min-width: 0;
    margin: 0 auto;
    padding: 0 20px 32px;
}

.container-fluid > .row,
.container-fluid [class*="col-"] {
    min-width: 0;
}

.crm-footer-bar {
    position: relative;
    margin: 18px 16px 12px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid var(--crm-border);
    background: rgba(255, 255, 255, 0.92);
    color: var(--crm-muted);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
}

.crm-help-widget {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 1085;
}

.crm-help-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
    border-radius: 999px;
    color: #f8f4ec;
    background: linear-gradient(135deg, #102133 0%, #17324c 54%, #25516b 100%);
    box-shadow: 0 16px 32px rgba(16, 33, 51, 0.28);
}

.crm-help-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
}

.crm-help-trigger-label {
    font-size: 11.5px;
    font-weight: 700;
}

.crm-help-panel {
    position: absolute;
    right: 0;
    bottom: 64px;
    width: min(360px, calc(100vw - 20px));
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--crm-border);
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.26);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: 0.22s ease;
}

.crm-help-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.crm-help-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 12px;
    background: linear-gradient(135deg, #102133 0%, #1d3d57 60%, #25516b 100%);
    color: #ffffff;
}

.crm-help-header strong,
.crm-help-header span {
    display: block;
}

.crm-help-header span {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(248, 244, 236, 0.8);
}

.crm-help-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.crm-help-body {
    max-height: 280px;
    overflow-y: auto;
    padding: 12px;
    background: linear-gradient(180deg, #fcfaf7 0%, #f5f8fb 100%);
}

.crm-help-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 12px 10px;
    background: linear-gradient(180deg, #fcfaf7 0%, #f5f8fb 100%);
}

.crm-help-input {
    display: flex;
    gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--crm-border);
    background: #ffffff;
}

.crm-help-input input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--crm-border);
    background: #fbfcfe;
    outline: none;
}

.crm-help-input button {
    min-width: 76px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--crm-accent), var(--crm-accent-dark));
    color: #ffffff;
    font-weight: 700;
}

@media (max-width: 1169px) {
    body.show-sidebar {
        overflow: hidden;
    }

    body.show-sidebar .crm-shell-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .left-sidebar {
        width: min(292px, calc(100vw - 28px));
        max-width: calc(100vw - 28px);
        top: calc(var(--header-height) - 1px);
        height: calc(100vh - (var(--header-height) - 1px));
        height: calc(100dvh - (var(--header-height) - 1px));
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        border-top-right-radius: 18px;
        border-bottom-right-radius: 18px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 16px 0 36px rgba(15, 23, 42, 0.2);
    }

    body.show-sidebar .left-sidebar {
        transform: translateX(0);
    }

    body.show-sidebar .crm-help-widget {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(16px);
    }

    .page-wrapper,
    body.mini-sidebar .page-wrapper {
        margin-left: 0;
    }

    .sidebar-close {
        display: inline-flex;
    }

    .sidebar-submenu {
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 991px) {
    .top-navbar {
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 10px 10px 10px 12px;
    }

    .header {
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }

    .header-left {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
        gap: 10px;
    }

    .header-right {
        width: auto;
        flex: 0 0 auto;
        margin-left: auto;
        justify-content: flex-end;
        gap: 6px;
        padding-right: 2px;
    }

    .header-support {
        display: none;
    }

    .header-brand .navbar-brand {
        min-width: 92px;
        height: 40px;
        padding: 5px 10px;
    }

    .header-page-title h4 {
        font-size: 15px;
    }

    .header-page-title span {
        display: none;
    }

    .header-right .navbar-nav,
    .header-right .nav-item,
    .user-dropdown,
    .notification-dropdown {
        display: flex;
        align-items: center;
    }

    .user-dropdown .dropdown-menu,
    .notification-dropdown .dropdown-menu {
        left: auto;
        right: 10px;
        top: calc(var(--header-height) + 8px);
        bottom: auto;
        min-width: 210px;
        max-height: calc(100vh - 120px);
        overflow-y: hidden;
        overflow-x: hidden;
        border-radius: 16px;
    }

    .user-dropdown .dropdown-menu {
        width: min(220px, calc(100vw - 20px));
    }

    .notification-dropdown .dropdown-menu {
        width: min(360px, calc(100vw - 20px));
    }

    .page-wrapper {
        padding-top: calc(var(--header-height) + 8px);
    }

    .page-titles {
        padding: 6px 14px 2px;
    }

    .container-fluid {
        padding-left: 14px;
        padding-right: 14px;
        padding-bottom: 24px;
    }
}

@media (max-width: 767px) {
    .top-navbar {
        gap: 7px;
        padding: 8px 9px;
    }

    .header-brand .navbar-brand {
        min-width: 82px;
        height: 38px;
        padding: 5px 9px;
        border-radius: 12px;
    }

    .header-page-title h4 {
        font-size: 14px;
    }

    .header-right {
        justify-content: flex-end;
    }

    .user-profile {
        min-width: 40px;
        min-height: 40px;
        padding: 4px !important;
        justify-content: center;
        border-radius: 12px;
        box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
    }

    .user-info {
        display: none;
    }

    .profile-pic-shell {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
    }

    .user-dropdown .dropdown-menu {
        right: 8px;
        min-width: 196px;
        width: min(212px, calc(100vw - 16px));
    }

    .notification-trigger {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .notification-dropdown .dropdown-menu {
        right: 8px;
        width: min(340px, calc(100vw - 16px));
    }

    .notification-head-close {
        display: inline-flex;
    }

    .notification-menu-list {
        max-height: min(70vh, calc(100vh - var(--header-height) - 94px));
        padding: 10px 10px calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .notification-item {
        padding: 12px;
        border-radius: 13px;
    }

    .notification-item-main {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 10px;
    }

    .notification-item-icon {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .notification-item-meta {
        margin-left: 46px;
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .notification-read-btn,
    .notification-read-state {
        min-height: 30px;
    }

    html.crm-notification-mobile-open,
    body.crm-notification-mobile-open,
    .crm-notification-mobile-open {
        overflow: hidden;
        overscroll-behavior: none;
    }

    body.crm-notification-mobile-open .crm-help-widget {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(16px);
    }

    #crmNotificationMenu.is-mobile-sheet {
        position: fixed;
        top: calc(var(--header-height) + 6px) !important;
        right: 12px !important;
        left: 12px !important;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
        width: auto !important;
        max-width: min(420px, calc(100vw - 24px)) !important;
        min-width: 0 !important;
        margin: 0 auto !important;
        height: auto !important;
        max-height: calc(100dvh - var(--header-height) - 18px - env(safe-area-inset-bottom, 0px)) !important;
        overflow: hidden !important;
        pointer-events: auto;
        box-shadow: 0 26px 50px rgba(15, 23, 42, 0.22);
        border-radius: 18px;
        z-index: 1125;
    }

    #crmNotificationMenu {
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    #crmNotificationList {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .notification-menu-head {
        gap: 10px;
        padding: 14px 14px 12px;
    }

    .notification-menu-head-actions {
        gap: 6px;
    }

    .notification-head-action,
    .notification-head-close {
        min-height: 36px;
    }

    .notification-head-action {
        padding: 0 12px;
    }

    .notification-item {
        gap: 10px;
        padding: 12px;
    }

    .notification-item-main,
    .notification-head-action,
    .notification-head-close,
    .notification-read-btn {
        position: relative;
        z-index: 1;
        pointer-events: auto;
        touch-action: manipulation;
    }

    .left-sidebar {
        width: min(286px, calc(100vw - 18px));
        max-width: calc(100vw - 18px);
        top: calc(var(--header-height) - 1px);
        border-top-right-radius: 16px;
        border-bottom-right-radius: 16px;
    }

    .scroll-sidebar {
        padding: 2px 6px calc(96px + env(safe-area-inset-bottom, 0px));
    }

    .sidebar-brand {
        padding: 6px 6px 4px;
    }

    .brand-logo {
        gap: 8px;
        padding: 8px 10px;
        border-radius: 14px;
        min-height: 0;
    }

    .brand-icon-logo {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        padding: 5px;
    }

    .brand-text h4 {
        font-size: 12px;
        line-height: 1.2;
    }

    .brand-text p {
        font-size: 9px;
        margin-top: 1px;
    }

    .sidebar-close {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .nav-section-title {
        padding: 10px 12px 4px;
        font-size: 9px;
        letter-spacing: 0.14em;
    }

    #sidebarnav > .nav-section-title:first-child {
        padding-top: 8px;
    }

    .sidebar-link {
        min-height: 38px;
        margin: 1px 2px;
        padding: 8px 11px !important;
        border-radius: 12px;
        gap: 9px;
    }

    .sidebar-link .menu-icon {
        width: 16px;
        flex: 0 0 16px;
    }

    .sidebar-link .menu-text {
        font-size: 13px;
        font-weight: 600;
    }

    .sidebar-submenu {
        margin: 3px 2px 8px;
        padding: 3px;
        border-radius: 12px;
    }

    .sidebar-submenu li a {
        min-height: 32px;
        padding: 7px 10px;
        font-size: 11.5px;
    }

    .page-titles h3,
    .page-titles h4 {
        font-size: 18px;
    }

    .page-titles .breadcrumb {
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .page-titles .breadcrumb::-webkit-scrollbar {
        display: none;
    }

    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
        padding-bottom: 18px;
    }

    .crm-help-trigger-label {
        display: none;
    }

    .crm-help-panel {
        position: fixed;
        right: 10px;
        left: 10px;
        bottom: 72px;
        width: auto;
        max-height: calc(100vh - 92px);
    }

    .crm-help-widget {
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 575px) {
    .top-navbar {
        padding: 7px 8px;
    }

    .header-left {
        gap: 7px;
    }

    .sidebartoggler {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .header-brand .navbar-brand {
        min-width: 76px;
        height: 36px;
        padding: 4px 8px;
    }

    .header-page-title h4 {
        font-size: 13px;
    }

    .left-sidebar {
        width: min(280px, calc(100vw - 14px));
        max-width: calc(100vw - 14px);
    }

    .page-wrapper {
        padding-top: calc(var(--header-height) + 6px);
    }

    .crm-footer-bar {
        margin-left: 10px;
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .top-navbar {
        gap: 6px;
        padding: 7px 7px 7px 9px;
    }

    .header-brand {
        display: none;
    }

    .header-left {
        gap: 6px;
    }

    .header-page-title h4 {
        font-size: 12px;
    }

    .header-right {
        padding-right: 0;
    }

    .left-sidebar {
        width: min(272px, calc(100vw - 12px));
        max-width: calc(100vw - 12px);
        border-top-right-radius: 14px;
        border-bottom-right-radius: 14px;
    }

    .sidebar-brand {
        padding: 5px 5px 3px;
    }

    .brand-logo {
        padding: 7px 9px;
    }

    .nav-section-title {
        padding: 9px 11px 4px;
    }

    .sidebar-link {
        min-height: 37px;
        padding: 8px 10px !important;
    }

    .user-dropdown .dropdown-menu {
        right: 6px;
        width: min(204px, calc(100vw - 12px));
    }

    .notification-dropdown .dropdown-menu {
        right: 6px;
        width: min(320px, calc(100vw - 12px));
    }
}
