.sidebar-menu .task-sidebar-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

.sidebar-menu .task-sidebar-label > .badge {
    margin-top: 0;
    margin-right: 0;
    flex: none;
}

.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span.task-sidebar-label {
    display: inline-flex !important;
}

.task-navigation-header {
    position: sticky;
    top: 0;
}

.task-navigation-header .task-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 50px;
}

.task-navigation-header .navbar-nav > li > .task-nav-link {
    padding-top: 13px;
    padding-bottom: 13px;
}

.task-navigation-header .task-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    background: #475569;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.task-navigation-header .task-count--attention {
    background: #dc2626;
    color: #fff;
    animation: task-count-pulse 3.5s ease-in-out infinite;
}

@keyframes task-count-pulse {
    0%, 60%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    25% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.28); }
}

.task-navigation-header .task-header-user-icon {
    display: none;
}

@media (max-width: 767px) {
    .task-navigation-header .navbar {
        display: flex;
        align-items: center;
    }

    .task-navigation-header .sidebar-toggle {
        flex: 0 0 44px;
        text-align: center;
        padding-left: 0;
        padding-right: 0;
    }

    .task-navigation-header .navbar-custom-menu {
        flex: 1 1 auto;
        min-width: 0;
        margin-right: 4px;
    }

    .task-navigation-header .navbar-custom-menu > .navbar-nav {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        float: none;
        margin: 0;
    }

    .task-navigation-header .task-header-item,
    .task-navigation-header .task-header-impersonation {
        flex: 0 0 auto;
    }

    .task-navigation-header .navbar-custom-menu .navbar-nav > li > a {
        padding-left: 9px;
        padding-right: 9px;
    }

    .task-navigation-header .task-nav-label,
    .task-navigation-header .task-header-control-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .task-navigation-header .task-header-impersonation .navbar-btn {
        margin-right: 3px !important;
    }

    .task-navigation-header .navbar-custom-menu .user-menu {
        flex: 0 1 auto;
        min-width: 0;
    }

    .task-navigation-header .user-menu > a {
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 50px;
        min-width: 0;
    }

    .task-navigation-header .task-header-user-icon {
        display: inline-block;
        flex: 0 0 auto;
    }

    .task-navigation-header .task-header-user-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .task-navigation-header .user-menu .label {
        flex: 0 0 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .task-navigation-header .task-count--attention {
        animation: none;
    }
}
