/* 菜单项设为相对定位，红圈才能贴着它定位 */
#navleft a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* 红圈数字 */
#navleft a .nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
  flex-shrink: 0;
}

/* 数字为 0 或空时隐藏 */
#navleft a .nav-badge[data-count="0"],
#navleft a .nav-badge:empty {
  display: none;
}

/* 超过 99 显示 99+ */
#navleft a .nav-badge.is-max::after {
  content: "";
}