/* 左侧菜单：
   1. “工作台”标题隐藏，“经营总览”直接作为一级入口；
   2. 其他有子菜单的分组默认收起；
   3. A方案：多个分组可以同时展开。 */

.side-menu .menu-group.hl-sidebar-dashboard-direct > p {
  display: none !important;
}

/* 新增直达一级入口沿用 V319 前的单行菜单结构。 */
html body .side-menu .menu-group.menu-group-direct > p {
  display: none !important;
}

.side-menu .menu-group.hl-sidebar-dashboard-direct > button {
  display: flex !important;
}

/* 让经营总览看起来就是一级菜单，不再保留“工作台”分组标题的间隔感。 */
.side-menu .menu-group.hl-sidebar-dashboard-direct {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.side-menu .menu-group.hl-sidebar-dashboard-direct > button.hl-dashboard-direct-button {
  margin-top: 0 !important;
}

.side-menu .menu-group.hl-sidebar-collapsible > p.hl-sidebar-collapse-title {
  position: relative;
  margin-bottom: 6px;
  padding-right: 28px;
  cursor: pointer !important;
  user-select: none;
}

.side-menu .menu-group.hl-sidebar-collapsible > p.hl-sidebar-collapse-title::after {
  content: '›';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transform-origin: center;
  color: #7d8695;
  font-size: 18px;
  line-height: 1;
  transition: transform .16s ease;
}

.side-menu .menu-group.hl-sidebar-collapsible:not(.hl-sidebar-collapsed) > p.hl-sidebar-collapse-title::after {
  transform: translateY(-50%) rotate(90deg);
}

.side-menu .menu-group.hl-sidebar-collapsible.hl-sidebar-collapsed > button {
  display: none !important;
}

.side-menu .menu-group.hl-sidebar-collapsible > p.hl-sidebar-collapse-title:hover {
  color: #1989dc;
}

.side-menu .menu-group.hl-sidebar-collapsible > p.hl-sidebar-collapse-title:focus-visible {
  outline: 2px solid rgba(38, 152, 238, .28);
  outline-offset: 2px;
  border-radius: 3px;
}


/* 一级菜单左侧线性图标：只作用于一级入口/一级分组标题，子菜单保持纯文字。 */
.side-menu .hl-sidebar-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-right: 9px;
  color: currentColor;
  vertical-align: middle;
}

.side-menu .hl-sidebar-menu-icon > svg {
  display: block;
  width: 19px;
  height: 19px;
  overflow: visible;
}

.side-menu .menu-group > p.hl-sidebar-has-icon {
  display: flex;
  align-items: center;
}

.side-menu .menu-group.menu-group-direct > button.hl-sidebar-has-icon,
.side-menu .menu-group.hl-sidebar-dashboard-direct > button.hl-sidebar-has-icon {
  display: flex !important;
  align-items: center;
}

/* 一级分组标题增加图标后，文字区域仍留出右侧折叠箭头空间。 */
.side-menu .menu-group.hl-sidebar-collapsible > p.hl-sidebar-collapse-title.hl-sidebar-has-icon {
  padding-right: 28px;
}


/* 经营总览一级入口：与其他一级菜单上下居中对齐 */
.side-menu .menu-group.hl-sidebar-dashboard-direct > button.hl-dashboard-direct-button,
.side-menu .menu-group.menu-group-direct > button.hl-sidebar-has-icon,
.side-menu .menu-group > p.hl-sidebar-has-icon {
  display: flex !important;
  align-items: center !important;
  min-height: 44px;
}

.side-menu .hl-sidebar-label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
}

/* 顶部新位置的侧栏收起按钮 */
#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 10px 0 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  flex: 0 0 36px;
}

#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle:hover {
  background: rgba(255, 255, 255, .12);
}

#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle:focus-visible {
  outline: 2px solid rgba(255,255,255,.45);
  outline-offset: 2px;
}

#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle svg {
  width: 19px;
  height: 19px;
  display: block;
}

.hl-shell-original-toggle-hidden {
  display: none !important;
}

/* 整个左侧栏可收起 */
body.hl-shell-sidebar-collapsed .side-menu {
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  overflow: visible !important;
}

body.hl-shell-sidebar-collapsed .side-menu {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.hl-shell-sidebar-collapsed .side-menu .menu-group {
  position: relative;
}

body.hl-shell-sidebar-collapsed .side-menu .menu-group > p,
body.hl-shell-sidebar-collapsed .side-menu .menu-group > button {
  justify-content: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  min-height: 44px;
}

body.hl-shell-sidebar-collapsed .side-menu .menu-group > p .hl-sidebar-label,
body.hl-shell-sidebar-collapsed .side-menu .menu-group > button .hl-sidebar-label {
  display: none !important;
}

body.hl-shell-sidebar-collapsed .side-menu .menu-group > p::after {
  display: none !important;
}

body.hl-shell-sidebar-collapsed .side-menu .hl-sidebar-menu-icon {
  margin-right: 0 !important;
}

body.hl-shell-sidebar-collapsed .side-menu .menu-group.hl-sidebar-collapsible > button {
  display: none !important;
}

body.hl-shell-sidebar-collapsed .side-menu .menu-group.hl-sidebar-collapsible > p.hl-sidebar-collapse-title,
body.hl-shell-sidebar-collapsed .side-menu .menu-group.hl-sidebar-dashboard-direct > button,
body.hl-shell-sidebar-collapsed .side-menu .menu-group.menu-group-direct > button {
  border-radius: 6px;
}

body.hl-shell-sidebar-collapsed .side-menu .menu-group.hl-sidebar-collapsible > p.hl-sidebar-popout-open {
  background: rgba(24, 144, 255, .12) !important;
}

/* 收起后的悬浮子菜单 */
#hl-sidebar-popout-panel.hl-sidebar-popout {
  position: fixed;
  z-index: 200000;
  width: 170px;
  max-width: calc(100vw - 20px);
  padding: 10px 0;
  background: #2f3d66;
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .28);
}

#hl-sidebar-popout-panel .hl-sidebar-popout-title {
  padding: 0 16px 10px;
  font-size: 15px;
  font-weight: 700;
}

#hl-sidebar-popout-panel .hl-sidebar-popout-list {
  display: flex;
  flex-direction: column;
}

#hl-sidebar-popout-panel .hl-sidebar-popout-item {
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

#hl-sidebar-popout-panel .hl-sidebar-popout-item:hover,
#hl-sidebar-popout-panel .hl-sidebar-popout-item.active {
  background: rgba(255, 255, 255, .1);
}


/* 左侧菜单展开宽度：当前 155px × 120% = 186px。
   收起状态仍沿用 58px，不受此规则影响。 */
:root {
  --sidebar: 186px !important;
}

body:not(.hl-shell-sidebar-collapsed) .side-menu {
  width: 186px !important;
  min-width: 186px !important;
  max-width: 186px !important;
}

/* 收窄后一级菜单适当压缩左右间距，保证图标+文字+箭头仍能完整显示。 */
body:not(.hl-shell-sidebar-collapsed) .side-menu {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

body:not(.hl-shell-sidebar-collapsed) .side-menu .menu-group > p.hl-sidebar-has-icon,
body:not(.hl-shell-sidebar-collapsed) .side-menu .menu-group.menu-group-direct > button.hl-sidebar-has-icon,
body:not(.hl-shell-sidebar-collapsed) .side-menu .menu-group.hl-sidebar-dashboard-direct > button.hl-sidebar-has-icon {
  padding-left: 6px !important;
}

body:not(.hl-shell-sidebar-collapsed) .side-menu .hl-sidebar-menu-icon {
  margin-right: 7px;
  flex-basis: 18px;
  width: 18px;
  height: 18px;
}

body:not(.hl-shell-sidebar-collapsed) .side-menu .hl-sidebar-menu-icon > svg {
  width: 18px;
  height: 18px;
}


/* 顶部品牌与左侧菜单栏共用同一列：
   展开 186px，收起 58px；三横线紧跟在菜单栏右边界。 */
:root {
  --hl-sidebar-expanded-width: 186px;
  --hl-sidebar-collapsed-width: 58px;
}

#hl-shell-sidebar-brand.hl-shell-sidebar-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  box-sizing: border-box;
  width: var(--hl-sidebar-expanded-width);
  min-width: var(--hl-sidebar-expanded-width);
  max-width: var(--hl-sidebar-expanded-width);
  margin: 0;
  padding: 0 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
  white-space: nowrap;
  flex: 0 0 var(--hl-sidebar-expanded-width);
}

body.hl-shell-sidebar-collapsed #hl-shell-sidebar-brand.hl-shell-sidebar-brand {
  width: var(--hl-sidebar-collapsed-width);
  min-width: var(--hl-sidebar-collapsed-width);
  max-width: var(--hl-sidebar-collapsed-width);
  flex-basis: var(--hl-sidebar-collapsed-width);
  padding: 0;
}

body.hl-shell-sidebar-collapsed #hl-shell-sidebar-brand .hl-shell-sidebar-brand-text {
  display: none;
}

/* 三横线从菜单栏右边界立即开始，不再留在“恒链BI”左边。 */
#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle {
  margin-left: 0 !important;
  margin-right: 8px !important;
  flex: 0 0 36px;
}

.hl-shell-original-brand-hidden,
.hl-shell-original-toggle-hidden {
  display: none !important;
}

/* 菜单栏宽度和顶部品牌统一使用同一变量。 */
body:not(.hl-shell-sidebar-collapsed) .side-menu {
  width: var(--hl-sidebar-expanded-width) !important;
  min-width: var(--hl-sidebar-expanded-width) !important;
  max-width: var(--hl-sidebar-expanded-width) !important;
}

body.hl-shell-sidebar-collapsed .side-menu {
  width: var(--hl-sidebar-collapsed-width) !important;
  min-width: var(--hl-sidebar-collapsed-width) !important;
  max-width: var(--hl-sidebar-collapsed-width) !important;
}


/* 菜单尺寸：一级、二级统一压缩到 32px，完整菜单在常用桌面高度内无需纵向滚动。 */
body:not(.hl-shell-sidebar-collapsed) .side-menu .menu-group > p,
body:not(.hl-shell-sidebar-collapsed) .side-menu .menu-group > button,
body.hl-shell-sidebar-collapsed .side-menu .menu-group > p,
body.hl-shell-sidebar-collapsed .side-menu .menu-group > button {
  min-height: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  box-sizing: border-box;
}

/* 一级菜单图标、文字在 32px 行高中垂直居中。 */
.side-menu .menu-group.hl-sidebar-dashboard-direct > button.hl-dashboard-direct-button,
.side-menu .menu-group.menu-group-direct > button.hl-sidebar-has-icon,
.side-menu .menu-group > p.hl-sidebar-has-icon {
  min-height: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  display: flex !important;
  align-items: center !important;
}

/* 二级菜单和收起后的悬浮子菜单使用同一行高。 */
.side-menu .menu-group > button {
  display: flex !important;
  align-items: center !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
body .side-menu .menu-group.hl-menu-accordion-v250.hl-menu-open-v250 > button,
body .side-menu .menu-group.hl-menu-accordion-v250.hl-menu-open-v250.hl-sidebar-collapsible > button {
  display: flex !important;
  align-items: center !important;
}
#hl-sidebar-popout-panel .hl-sidebar-popout-item {
  min-height: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  display: flex !important;
  align-items: center !important;
}


/* 顶部左侧最终定位：
   - 删除旧“|”及旧品牌/按钮残留占位；
   - 恒链BI从最左侧开始；
   - 菜单栏宽186px，三横线从约195px位置开始。 */
.hl-shell-old-header-slot-hidden,
.hl-shell-original-brand-hidden,
.hl-shell-original-toggle-hidden {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

#hl-shell-sidebar-brand.hl-shell-sidebar-brand {
  margin-left: 0 !important;
  justify-content: flex-start !important;
  padding-left: 22px !important;
  padding-right: 8px !important;
  box-sizing: border-box !important;
}

/* 186px菜单栏 + 约9px间距 = 三横线从左侧约195px开始。 */
#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle {
  margin-left: -36px !important;
  margin-right: 8px !important;
}

/* 防止旧竖线来自边框/伪元素而不是文字节点。 */
#hl-shell-sidebar-brand.hl-shell-sidebar-brand::before,
#hl-shell-sidebar-brand.hl-shell-sidebar-brand::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
}


/* 三横线按钮改成两种视觉状态（展开 / 收起） */
#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle {
  position: relative;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  flex: 0 0 40px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #1f2946 !important;
  color: #ffffff !important;
  box-shadow: none !important;
  overflow: visible;
}

#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle svg {
  width: 18px !important;
  height: 18px !important;
}

#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle:hover {
  background: #253154 !important;
}

/* 展开状态：右侧带绿色圆弧标识 */
body:not(.hl-shell-sidebar-collapsed) #hl-shell-sidebar-toggle.hl-shell-sidebar-toggle::after {
  content: '';
  position: absolute;
  right: -7px;
  top: 50%;
  width: 14px;
  height: 20px;
  transform: translateY(-50%);
  background: #16c784;
  border-radius: 0 12px 12px 0;
}

/* 展开状态位置：保持在你当前要求的更靠左位置，并按新宽度微调 */
body:not(.hl-shell-sidebar-collapsed) #hl-shell-sidebar-toggle.hl-shell-sidebar-toggle {
  margin-left: -40px !important;
  margin-right: 8px !important;
}

/* 收起状态：只保留深色方块，不显示绿色圆弧 */
body.hl-shell-sidebar-collapsed #hl-shell-sidebar-toggle.hl-shell-sidebar-toggle {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  flex-basis: 40px !important;
  margin-left: 0 !important;
  margin-right: 8px !important;
  background: #1f2946 !important;
}

body.hl-shell-sidebar-collapsed #hl-shell-sidebar-toggle.hl-shell-sidebar-toggle::after {
  content: none !important;
  display: none !important;
}


/* 侧栏展开/收起按钮最终图标：上下长线 + 中间两短线 + 方向箭头 */
#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle {
  background: transparent !important;
  border: 0 !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  color: #ffffff !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  flex-basis: 36px !important;
}

#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle:hover {
  background: rgba(255,255,255,.08) !important;
}

#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle::before,
#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle::after {
  content: none !important;
  display: none !important;
}

#hl-shell-sidebar-toggle .hl-shell-toggle-icon,
#hl-shell-sidebar-toggle .hl-shell-toggle-icon svg {
  display: block;
  width: 20px !important;
  height: 20px !important;
}

#hl-shell-sidebar-toggle .hl-toggle-arrow-right {
  display: none;
}

#hl-shell-sidebar-toggle .hl-toggle-arrow-left {
  display: inline;
}

/* 收起状态：箭头改向右，表示点击后展开 */
body.hl-shell-sidebar-collapsed #hl-shell-sidebar-toggle .hl-toggle-arrow-left {
  display: none;
}

body.hl-shell-sidebar-collapsed #hl-shell-sidebar-toggle .hl-toggle-arrow-right {
  display: inline;
}

/* 保持此前要求：按钮在当前基础上向左45px后的定位，不再额外改位置 */
#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle {
  margin-left: -36px !important;
  margin-right: 8px !important;
}


/* 空白页安全修复：
   不再把 React 菜单文字搬进自定义 span。
   收起状态直接通过字体尺寸隐藏文字，避免破坏 React DOM。 */
body.hl-shell-sidebar-collapsed .side-menu .menu-group > p,
body.hl-shell-sidebar-collapsed .side-menu .menu-group > button {
  font-size: 0 !important;
}

body.hl-shell-sidebar-collapsed .side-menu .hl-sidebar-menu-icon,
body.hl-shell-sidebar-collapsed .side-menu .hl-sidebar-menu-icon svg {
  font-size: 16px !important;
}

/* 旧版本生成的 label 包裹如果浏览器热更新残留，展开状态仍正常显示。 */
body:not(.hl-shell-sidebar-collapsed) .side-menu .hl-sidebar-label {
  display: inline !important;
}

/* 明确保证业务主区域不被侧栏补丁隐藏或压成0。 */
.app-main,
.main-content,
.workspace,
.workspace-content {
  visibility: visible;
  opacity: 1;
}


/* ===== 左栏结构最终修复 =====
   不再修改任何 side-menu 父容器宽度。
   原系统 .app-body 本身就是 grid-template-columns: var(--sidebar) minmax(0,1fr)。
   只切换 --sidebar 即可，避免把整个两栏布局压成侧栏宽度。 */
:root {
  --sidebar: 186px !important;
}

body:not(.hl-shell-sidebar-collapsed) {
  --sidebar: 186px !important;
}

body.hl-shell-sidebar-collapsed {
  --sidebar: 58px !important;
}

.app-body {
  grid-template-columns: var(--sidebar) minmax(0, 1fr) !important;
  width: 100% !important;
  min-width: 0 !important;
}

.side-menu {
  width: var(--sidebar) !important;
  min-width: var(--sidebar) !important;
  max-width: var(--sidebar) !important;
}

.page-column {
  width: 100% !important;
  min-width: 0 !important;
}

.app-main {
  width: 100% !important;
  min-width: 0 !important;
}

/* 禁止侧栏补丁给整个主布局制造横向溢出 */
.uranus-shell,
.app-body,
.page-column,
.app-main {
  max-width: 100% !important;
}

/* V011：菜单行高为现有46px的70%，即32px；一级、二级和收起浮层保持一致。 */
body:not(.hl-shell-sidebar-collapsed) .side-menu .menu-group > p,
body:not(.hl-shell-sidebar-collapsed) .side-menu .menu-group > button,
body.hl-shell-sidebar-collapsed .side-menu .menu-group > p,
body.hl-shell-sidebar-collapsed .side-menu .menu-group > button,
.side-menu .menu-group.hl-sidebar-dashboard-direct > button.hl-dashboard-direct-button,
.side-menu .menu-group.menu-group-direct > button.hl-sidebar-has-icon,
.side-menu .menu-group > p.hl-sidebar-has-icon,
#hl-sidebar-popout-panel .hl-sidebar-popout-item{
  min-height:32px!important;
  height:32px!important;
  line-height:32px!important;
}
.side-menu .menu-group.hl-sidebar-collapsible>p.hl-sidebar-collapse-title{
  margin-bottom:2px!important;
  padding-top:0!important;
  padding-bottom:0!important;
}
.side-menu .menu-group.hl-sidebar-collapsible{
  margin-bottom:4px!important;
}

/* 一级展开、普通二级、选中二级使用三种明确背景色。 */
.side-menu .menu-group.hl-sidebar-collapsible:not(.hl-sidebar-collapsed){
  background:#e9f0f6!important;
  border:1px solid #d8e3ed!important;
  border-radius:4px!important;
  padding-bottom:3px!important;
}
.side-menu .menu-group.hl-sidebar-collapsible:not(.hl-sidebar-collapsed)>p{
  background:#dce7f1!important;
  color:#304256!important;
}
.side-menu .menu-group.hl-sidebar-collapsible:not(.hl-sidebar-collapsed)>button{
  display:flex!important;
  align-items:center!important;
  background:#f3f7fa!important;
  color:#566476!important;
  border-left:3px solid transparent!important;
}
.side-menu .menu-group.hl-sidebar-collapsible:not(.hl-sidebar-collapsed)>button:hover{
  background:#e7f2fa!important;
  color:#168be5!important;
  border-left-color:#9ccff2!important;
}
.side-menu .menu-group.hl-sidebar-collapsible:not(.hl-sidebar-collapsed)>button.active{
  background:#cfe8fa!important;
  color:#087fcf!important;
  border-left-color:#168be5!important;
  font-weight:600!important;
}

/* V013：一级菜单展开时不加背景；只给二级菜单及其选中项区分颜色。 */
body .side-menu .menu-group.hl-sidebar-collapsible:not(.hl-sidebar-collapsed),
body .side-menu .menu-group.hl-menu-accordion-v250.hl-menu-open-v250{
  position:relative!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  padding-bottom:0!important;
  box-shadow:none!important;
}
body .side-menu .menu-group.hl-sidebar-collapsible:not(.hl-sidebar-collapsed)>p,
body .side-menu .menu-group.hl-menu-accordion-v250.hl-menu-open-v250>p{
  background:transparent!important;
  color:#304256!important;
  border-radius:0!important;
}
body .side-menu .menu-group.hl-sidebar-collapsible:not(.hl-sidebar-collapsed)>button,
body .side-menu .menu-group.hl-menu-accordion-v250.hl-menu-open-v250>button{
  position:static!important;
  display:flex!important;
  align-items:center!important;
  background:#f3f7fa!important;
  color:#566476!important;
  border-left:3px solid transparent!important;
}
body .side-menu .menu-group.hl-sidebar-collapsible:not(.hl-sidebar-collapsed)>button:hover,
body .side-menu .menu-group.hl-menu-accordion-v250.hl-menu-open-v250>button:hover{
  background:#e7f2fa!important;
  color:#168be5!important;
  border-left-color:#9ccff2!important;
}
body .side-menu .menu-group.hl-sidebar-collapsible:not(.hl-sidebar-collapsed)>button.active,
body .side-menu .menu-group.hl-menu-accordion-v250.hl-menu-open-v250>button.active{
  background:#cfe8fa!important;
  color:#087fcf!important;
  border-left-color:#168be5!important;
  font-weight:600!important;
}

/* 一级菜单的实际占位统一为 32px，清除旧样式在直达项和分组项上的不同外边距。 */
html body .side-menu > .menu-group.menu-group{
  margin:0!important;
  padding-top:0!important;
  padding-bottom:0!important;
  border-top:0!important;
  border-bottom:0!important;
}
html body .side-menu > .menu-group.hl-sidebar-collapsible{
  margin-top:0!important;
  margin-bottom:0!important;
}
html body .side-menu > .menu-group.hl-sidebar-collapsible > p.hl-sidebar-collapse-title,
html body .side-menu > .menu-group.menu-group-direct > button,
html body .side-menu > .menu-group.hl-sidebar-dashboard-direct > button{
  margin-top:0!important;
  margin-bottom:0!important;
}

/* 一级菜单左对齐；二级菜单及其收起浮层居中对齐。 */
html body .side-menu > .menu-group.hl-sidebar-collapsible > p.hl-sidebar-collapse-title,
html body .side-menu > .menu-group.menu-group-direct > button,
html body .side-menu > .menu-group.hl-sidebar-dashboard-direct > button{
  justify-content:flex-start!important;
  text-align:left!important;
}
html body .side-menu > .menu-group.hl-sidebar-collapsible > button,
html body #hl-sidebar-popout-panel .hl-sidebar-popout-item{
  justify-content:center!important;
  text-align:center!important;
}

/* V324: keep the V317 business bundle and expose the old BI's full 21-entry menu. */
html body .side-menu > .menu-group.hl-sidebar-native-group{
  display:none!important;
}
html body .side-menu > .menu-group.hl-sidebar-parity-group{
  margin:0!important;
  padding:0!important;
  border:0!important;
}

/* First-level rows are 1.5 times the former 32px height and share one left edge. */
html body .side-menu > .menu-group.hl-sidebar-parity-group.hl-sidebar-collapsible > p.hl-sidebar-collapse-title,
html body .side-menu > .menu-group.hl-sidebar-parity-group.menu-group-direct > button{
  box-sizing:border-box!important;
  min-height:48px!important;
  height:48px!important;
  line-height:48px!important;
  margin:0!important;
  padding-top:0!important;
  padding-bottom:0!important;
  padding-left:6px!important;
  justify-content:flex-start!important;
  text-align:left!important;
}
html body .side-menu > .menu-group.hl-sidebar-parity-group.hl-sidebar-collapsible > p.hl-sidebar-collapse-title{
  padding-right:28px!important;
}
html body .side-menu > .menu-group.hl-sidebar-parity-group.menu-group-direct > button{
  padding-right:6px!important;
}

/* Second-level rows remain compact. Keep every label on one old-BI-style left baseline;
   module count badges stay in the same flex row immediately after the label. */
html body .side-menu > .menu-group.hl-sidebar-parity-group.hl-sidebar-collapsible > button{
  box-sizing:border-box!important;
  min-height:32px!important;
  height:32px!important;
  line-height:32px!important;
  padding:0 10px 0 37px!important;
  justify-content:flex-start!important;
  text-align:left!important;
}
html body.hl-shell-sidebar-collapsed .side-menu > .menu-group.hl-sidebar-parity-group.hl-sidebar-collapsible > p.hl-sidebar-collapse-title,
html body.hl-shell-sidebar-collapsed .side-menu > .menu-group.hl-sidebar-parity-group.menu-group-direct > button{
  padding-left:0!important;
  padding-right:0!important;
  justify-content:center!important;
  text-align:center!important;
}

/* Direct entries and expandable first-level titles use the same typography. */
html body .side-menu > .menu-group.hl-sidebar-parity-group.hl-sidebar-collapsible > p.hl-sidebar-collapse-title,
html body .side-menu > .menu-group.hl-sidebar-parity-group.hl-sidebar-collapsible:not(.hl-sidebar-collapsed) > p.hl-sidebar-collapse-title,
html body .side-menu > .menu-group.hl-sidebar-parity-group.menu-group-direct > button:not(.active){
  color:#303847!important;
  font-weight:600!important;
}
html body .side-menu > .menu-group.hl-sidebar-parity-group.hl-sidebar-collapsible > p.hl-sidebar-collapse-title:hover,
html body .side-menu > .menu-group.hl-sidebar-parity-group.menu-group-direct > button:hover{
  color:#1989dc!important;
}

/* 已选中的直达一级菜单悬停时保持选中态白字，不被普通悬停颜色覆盖。 */
html body .side-menu > .menu-group.hl-sidebar-parity-group.menu-group-direct > button.active,
html body .side-menu > .menu-group.hl-sidebar-parity-group.menu-group-direct > button.active:hover{
  color:#fff!important;
}
