.user {
    position: relative;
}

.user .dropdown-menu {
    left: auto;
    right: 0;
    top: 100%; /* ngay bên dưới */
}

.dropdown-menu {
    width: 300px;
    background: url(../images/bg-mnuser.jpg);
    padding: 0 !important;
    border-radius: 3px !important;
}

.btn-notification > li a span {
    position: relative;
    display: inline-block;
}

.badge-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: #DB1A1F;
    border-radius: 50%;
}

.badge-count {
    all: unset;
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    /*padding: 0 3px;*/
    background: #DB1A1F;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    line-height: 17px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid #fff;
}


.notification-icon {
    color: white;
    font-size: 16px!important;
    margin-top: 9px;
}

.btn-notification > a.active > span {
    background: #8a171a;
}



#notification-list {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #ccc transparent;
}

/* Chrome, Edge, Safari */
#notification-list::-webkit-scrollbar {
    width: 6px;
}
#notification-list::-webkit-scrollbar-track {
    background: transparent;
}
#notification-list::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}


#notification-list li > a {
    all: unset; /* Hủy toàn bộ CSS (chỉ hoạt động trên trình duyệt hiện đại) */
    display: block; /* Giữ lại display block nếu cần click toàn vùng */
    padding: 0; /* Xóa padding mặc định */
    margin: 0; /* Xóa margin mặc định */
    font: inherit; /* Dùng font mặc định của bố */
    color: #8a171a !important;
    text-decoration: none; /* Bỏ gạch chân */
    background: none;
    border: none;
    cursor: pointer;
}

#notification-list li a > span {
    margin: 0 !important;
}

#notification-list li > a:hover {
    text-decoration: none !important;
    color: #DB1A1F !important;
}

.notification-header {
    font-weight: bold;
    background: #f5f5f5;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 3px 3px 0 0;
}

.notification-header .small {
    font-weight: normal !important;
    font-size: 11px !important;
    color: #8a171a !important;
    text-decoration: none !important;
}

.notification-header .small:hover {
    text-decoration: underline;
}

.notification-item {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.loading-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;      /* Căn giữa theo chiều dọc */
    justify-content: center;  /* Căn giữa theo chiều ngang */
    gap: 8px;                 /* Khoảng cách giữa icon và text */
    color: #999;
    font-size: 14px;
}

.notification-avatar {
    flex-shrink: 0 !important; /* ✅ Không bị ép nhỏ */
}

.notification-avatar .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    font-size: 24px; /* nếu dùng icon */
    text-align: center;
    color: #FFBF1B;
    background: #8a171a;
    border: 1px solid #8a171a;

    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 3px;
}

.notification-desc {
    font-size: 12px;
    color: #464646;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* ✅ Giới hạn 2 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.notification-desc.unread {
    font-weight: bold;
    font-size: 12px;
    color: #0d0d0d;
}

.notification-time {
    font-size: 11px;
    color: #777;
}

.notification-footer {
    font-weight: bold;
    background: #f5f5f5;
    padding: 8px 10px;
    text-align: center;
    border-radius: 0 0 3px 3px;
}


