div.root-menu{
    width: 220px;
    border-right: 2px solid #ccc;
    position: fixed;
    top: 45px;
    bottom: 0px;
    z-index: 100;
    /* padding: 5px; */
    box-sizing: border-box;
    background: #f6f6f6;
    box-shadow: 0 0 10px rgba(0,0,0,.03);
    transition: .5s all;
}

div.root-menu h1{
    height: 40px;
    margin: 0px;
    padding: 0px;
    background: #F2F2F2;
    font-size: 16px;
    text-align: center;
    line-height: 38px;
    color: #444;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid #ddd;
}

div.root-menu h1 i{
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
}

div.root-menu-container{
    width: 100%;
    height: 100%;
    /* border: 1px solid rgb(203, 212, 221); */
    box-sizing: border-box;
    background: #fff;
    border-radius: 2px;
    position: relative;
}

div.root-menu-section{
    position: relative;
    z-index: 2;
}

div.root-menu-section h3{
    padding: 0px 10px;
    margin: 0px;
    font-size: 14px;
    height: 35px;
    line-height: 35px;
    font-weight: normal;
    /* background:linear-gradient(#f9f9f9, #efefef); */
    background: #FAFAFA;
    border-width: 0px 0px 1px;
    border-color: rgba(224,224,244, 1);
    border-style: solid;
    box-sizing: border-box;
}

div.root-menu-container div.root-menu-section:first-child h3{
    border-width: 0px;
}

div.root-menu-section h3{
    padding-left: 10px;
    position: relative;
    cursor: pointer;
}

div.root-menu-section h3 i.fa {
    margin-right: 7px;
    color: rgb(250, 202, 72);
    font-size: 14px;
}

div.root-menu-section h3:hover i.root-menu-angle{
    color: rgb(250, 202, 72);
}

div.root-menu-section h3 i.anticon-down, 
div.root-menu-section h3 i.anticon-up{
    position: absolute;
    right: 10px;
    top: 10px;
    color: #666;
    font-size: 9px;
}

div.root-menu-section h3 span{
    width: 100%;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: absolute;
    padding-left: 60px;
    margin-left: -60px;
}

div.root-menu-section ul{
    padding: 0px 2px 0 15px;
    margin: 0px;
    font-size: 14px;
    height: 100%;
}

div.root-menu-section ul li{
    list-style: none;
    /* position: relative; */

    border-left: 1px dotted rgb(207, 207, 207);
    /* margin-top: 1px; */
}

div.root-menu-section ul{
    display: none;
}

div.root-menu-section ul li{
    /* padding: 5px; */
    line-height: 31px;
    margin-top: -1px;
}

div.root-menu-section ul li span.menu-line{
    display: inline-block;
    width: 10px;
    height:15px;
    border-bottom: 1px dotted rgb(207, 207, 207);
    position: relative;
    top: -5px;
    margin-left: 1px;
    color: rgb(190, 190, 190);
    font-size: 8px;
    position: relative;
    flex-shrink: 0; /* 防止被压缩 */
}

div.root-menu-section ul li span.menu-line i,
div.root-menu-section ul li span.menu-line-last i{
    margin-left: -7px;
    margin-top: 9px;
    background: #fff;
    position: absolute;
}

div.root-menu-section ul li:last-child{
    border: none;
}

div.root-menu-section ul li span.menu-line-last{
    border-width: 0 0 1px 1px;
    border-style: dotted;
    border-color: rgb(207, 207, 207);
    display: inline-block;
    width: 10px;
    height:15px;
    position: relative;
    top: -5px;
    color: rgb(190, 190, 190);
    font-size: 8px;
    position: relative;
    flex-shrink: 0; /* 防止被压缩 */
}

div.root-menu-expend {
    height: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

div.root-menu-view{
    width: 100%;
    height: 100%;
    overflow: auto;
    box-sizing: border-box;
    margin-top: -35px;
    padding-top: 35px;
}

div.root-menu-scroll{
    width: 100%;
    height: 100%;
    overflow: auto;
}

div.root-menu-expend ul.root-menu-children-expend{
    display: block;
}

div.root-menu-section ul li i.menu-item-type{
    /* position: absolute; */
    /* top: 8px; */
    color: rgb(250, 202, 72);
    /* margin-left: -17px; */
    margin-right: 5px;
}

div.root-menu-section ul li i.menu-item-table{
    color: #1890ff;
}

div.root-menu-section i.root-menu-angle{
    position: absolute;
    right: 7px;
    top: 8px;
}


div.root-menu-expend ul a{
    color: #232323;
    /* padding-left: 17px; */
    padding: 5px 0px 5px 0px;
}

/* 非底层项（有子节点）的单行文字容器：防止挤压menu-line */
div.root-menu-expend ul a .menu-text-single {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

div.root-menu-expend ul a.root-menu-active{
    /* background: rgba(18, 125, 212, .2) */
    color: #1890ff;
}

div.root-menu-expend ul a.root-menu-active span.root-menu-active-high{
    width: 100%;
    height: 30px;
    position: absolute;
    left: 0px;
    background: rgba(18, 125, 212, .12);
}

div.root-menu-expend ul a:hover{
    color: rgb(18, 125, 212);
}
div.root-menu-expend ul a:focus{
    outline: none;
    text-decoration: none;
}

div.root-menu-expend2 {
    height: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

div.root-menu-expend2 ul.root-menu-children-expend{
    display: block;
    padding: 0px 5px 0 12px
}

/* 5. 修正高亮 span 样式（避免影响右组宽度） */
div.root-menu-expend2 ul a .root-menu-active-high {
  display: inline-block;
  width: 0; /* 高亮span若无需显示，设为0宽，不占用右组空间 */
  height: 30px;
}

div.root-menu-expend2 ul a:hover{
    color: rgb(18, 125, 212);
}
div.root-menu-expend2 ul a:focus{
    outline: none;
    text-decoration: none;
}

/* 1. 强化 a 标签 Flex 布局：分组对齐 */
div.root-menu-expend2 ul a.root-menu-active2,
div.root-menu-expend2 ul a.root-menu-link2,
div.root-menu-expend2 ul a.root-menu-link {
  display: flex !important;
  align-items: center !important; /* 垂直居中（解决之前的上下对齐） */
  justify-content: space-between !important; /* 关键：左组居左，右组居右 */
  width: calc(100% - 12px);
  box-sizing: border-box;
  white-space: unset;
}

/* 2. 左组：占据左侧所有空间，文本正常显示 */
div.root-menu-expend2 ul a .menu-left-group {
  display: flex;
  align-items: center;
  flex: 1; /* 占满左侧剩余空间，确保右组靠最右 */
  margin-right: 10px; /* 与右组保持间距，避免拥挤 */
}

/* 3. 右组：固定宽度，确保所有图标位置统一 */
div.root-menu-expend2 ul a .menu-right-group {
  display: flex;
  align-items: center;
  width: 24px; /* 固定宽度（图标16px + 间距8px），确保所有行对齐 */
  justify-content: flex-end; /* 图标靠右（避免宽度固定后图标居中） */
  position: absolute;
  right: 12px;
}


div.root-menu-expend2 ul a.root-menu-active2 { /* 两个类都要加，确保所有菜单样式统一 */
    color: #1890ff;
    background-color: aliceblue;
    font-weight: 600;
}

div.root-menu-expend2 ul a .menu-line,
div.root-menu-expend2 ul a .menu-line-last {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  margin-left: 1px;
}

div.root-menu-expend2 ul a{
    color: #232323;
    white-space:nowrap;
    /* padding-left: 17px; */
    padding: 5px 5px 5px 0px;
}

/* 3. 文件夹/表格图标：右侧间距 + 不换行 */
div.root-menu-expend ul a .menu-item-type {
  white-space: nowrap;
  margin-right: 6px; /* 与文本的间距 */
  display: inline-flex;
  align-items: center;
}

/* 4. 文本容器：占满剩余空间 + 换行对齐 */
div.root-menu-expend2 ul a .menu-text-wrapper {
  flex: 1;
  line-height: 1.8;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
  margin-left: 6px; /* 与 menu-line 保持间距 */
}

div.root-menu-expend2 ul a .menu-text-wrapper .block {
    width: 100%;
    height: 6px;
}

/* 4. 文本容器：占满剩余空间 + 换行对齐 */
div.root-menu-expend2 ul a .menu-text-wrapper2 {
  flex: 1;
  line-height: 3.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
  margin-left: 6px; /* 与 menu-line 保持间距 */
  font-weight: 600;;
}

/* 4. 保留状态图标原有样式（微调间距） */
div.root-menu-expend ul a .root-menu-status-icon, div.root-menu-expend2 ul a .root-menu-status-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 取消 margin-left（右组已控制间距） */
  margin: 0;
  overflow: hidden;
  cursor: default;
  font-weight: 600;
  color: #ddd;
  flex-shrink: 0; /* 禁止图标被压缩 */
}



div.root-menu-scroll{
    position: relative;
}

div.apps-tree-container{
    position: relative;
}

div.apps-tree-container div.root-menu{
    width: 100%;
    position: relative;
    top: 0px;
    height: 100%;
}

div.apps-tree-container div.root-menu h1{
    display: none;
}

div.apps-tree-container div.root-menu-view{
    padding-top: 0px;
    margin-top: 0px;

}
div.apps-tree{
    height: 100%;
}

div.apps-tree-container{
    height: 100%;;
}
div.apps-tree-container div.root-menu-section h3{
    display: none;
}

div.apps-tree-container div.root-menu{
    border-right: none;
}

div.apps-tree-container div.root-menu h3.root-menu-active{
    height: 30px;
    line-height: 30px;
    background: #fff;
    border-color: #f5f5ff;
}


div.root-menu-hide{
    width: 40px;
}

div.root-menu-hide h1 label{
    display: none;
}

div.root-menu-hide h1 i{
    right: 13px;
}

div.root-menu-hide div.root-menu-container{
    background: #ececec;
}

div.root-menu-hide div.root-menu-section{
    display: none;
}


/* 基础重置 */
.new-sidebar * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 侧边栏主容器 - 核心：固定总高度，不超出屏幕 */
.new-sidebar {
  width: 240px;
  background-color: #ffffff;
  border-right: 1px solid #e8e8e8;
  position: fixed;
  top: 45px; /* 顶部导航高度，固定 */
  left: 0;
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden; /* 关键：隐藏溢出，总高度不变 */
}

/* 折叠状态 */
.new-sidebar.new-collapsed {
  width: 60px;
}

/* 侧边栏头部 - 固定高度56px */
.new-sidebar-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: #F2F2F2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0; /* 不被挤压 */
}

.new-sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  transition: all 0.3s ease;
}

.new-sidebar.new-collapsed .new-sidebar-title {
  opacity: 0;
  width: 0;
}

.new-toggle-icon {
  font-size: 18px;
  cursor: pointer;
  color: #333;
  transition: all 0.2s ease;
}

.new-toggle-icon:hover {
  transform: scale(1.1);
}

/* 核心：内容区域 - 固定高度，全局滚动（总高度不变） */
.new-sidebar-content {
  overflow-y: auto; /* 全局滚动，总高度不变 */
  overflow-x: hidden;
  padding: 8px 0;
  /* 美化全局滚动条 */
}

.new-sidebar-content::-webkit-scrollbar {
  width: 4px;
}

.new-sidebar-content::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.new-sidebar-content::-webkit-scrollbar-thumb {
  background: #d9d9d9;
  border-radius: 2px;
}

/* 菜单分组 - 每个分组独立，不挤压外层 */
.new-menu-section {
  margin: 0 8px 8px;
  border-radius: 4px;
  background-color: #fafafa;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* 菜单分组标题 - 固定高度48px */
.new-menu-section-title {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.new-menu-section-title.new-active {
  color: var(--system-primary-color);
  background-color: var(--system-item-backgroundColor);
  font-weight: 600;
}

.new-menu-section-title:hover {
  background-color: var(--system-item-backgroundColor);
}

.new-menu-section-title i.fa {
  font-size: 16px;
  margin-right: 12px;
  color: #1890ff;
}

.new-section-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.new-section-expand-icon {
  font-size: 12px;
  color: #666;
  position: absolute;
  right: 16px;
}

/* 子菜单容器 - 核心：子层留白/滚动，不影响外层 */
.new-menu-section-content {
  padding: 0 4px;
  /* 子菜单展开时仅在该容器内留白，过多则内部滚动 */
  max-height: none; /* 不限制高度，由全局滚动处理 */
}

/* 子菜单样式 - 未展开时隐藏+禁止点击 */
.new-submenu {
  list-style: none;
  padding-left: 16px;
  max-height: 0;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none; /* 禁止点击 */
}

/* 展开时显示+允许点击，仅在自身容器内留白 */
.new-submenu.new-show {
  max-height: 2000px; /* 足够大的高度，留白效果 */
  opacity: 1;
  padding: 4px 0 4px 24px;
  pointer-events: auto; /* 允许点击 */
}

.new-submenu-item {
  margin: 2px 0;
  border-radius: 4px;
}

/* 菜单项样式 */
.new-menu-item {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.new-menu-item:hover {
  background-color: #f5f8fa;
  color: var(--system-primary-color);
  padding-left: 18px;
}

.new-menu-item.new-active {
  background-color: var(--system-item-backgroundColor);
  color: var(--system-primary-color);
  font-weight: 600;
  border-left: 4px solid var(--system-primary-color);
  text-decoration: none;
  margin-left: 2px;
}

.new-menu-icon {
  font-size: 14px;
  margin-right: 10px;
  color: #ff9524;
}

.new-menu-item:hover .new-menu-icon,
.new-menu-item.new-active .new-menu-icon {
  color: var(--system-primary-color);
}

.new-expand-icon {
  font-size: 12px;
  margin-right: 8px;
  color: #8c8c8c;
}

.new-menu-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 折叠状态适配 */
.new-sidebar.new-collapsed .new-menu-section-title .new-section-text,
.new-sidebar.new-collapsed .new-menu-item .new-menu-text,
.new-sidebar.new-collapsed .new-expand-icon {
  opacity: 0;
  width: 0;
}

.new-sidebar.new-collapsed .new-menu-section-title i.fa,
.new-sidebar.new-collapsed .new-menu-item .new-menu-icon {
  margin-right: 0;
}

.new-sidebar.new-collapsed .new-menu-section-title,
.new-sidebar.new-collapsed .new-menu-item {
  justify-content: center;
  padding: 0;
}

/* 拖拽手柄 */
.new-sidebar-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  background-color: transparent;
  z-index: 10;
}

.new-sidebar-resizer:hover {
  background-color: rgba(24, 144, 255, 0.1);
}

.new-resize-icon {
  display: none;
}

div.root-menu-sg-container .root-menu-section  ul li{
    line-height: 2.8;
    margin-top: -1px;
}

div.root-menu-sg-container .root-menu-expend ul a.root-menu-active2{
    background: #EAEFFF;
    color: var(--system-primary-color);
    font-weight: 600;
    border-radius: 5px;
}

div.root-menu-sg-container .root-menu-expend ul a.root-menu-active{
    background: var(--system-item-backgroundColor);
    color: var(--system-primary-color);
    font-weight: 600;
    border-radius: 5px;
}

div.root-menu-sg-container .root-menu-expend ul a.root-menu-active span.root-menu-active-high{
    background: unset;
}

div.root-menu-sg-container .root-menu-expend ul a:hover{
    color: var(--system-primary-color);
}

div.root-menu-section ul li i.menu-item-type2{
    color: var(--system-primary-color);
    margin-right: 5px;
}

/* 最顶层标题样式 */
div.root-menu-sg-container h1.root-menu-top-title {
    height: 50px;
    margin: 0px;
    padding: 0px 15px;
    background: #F2F2F2;
    font-size: 16px;
    font-weight: bold;
    text-align: left;
    line-height: 50px;
    color: #1890ff;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
}

div.root-menu-sg-container h1.root-menu-top-title .root-menu-top-icon {
    flex-shrink: 0;
}

/* 图片图标样式 */
div.root-menu-expend ul a .menu-item-icon {
    display: inline-block;
    flex-shrink: 0;
    object-fit: contain;
}

/* 确保所有a标签支持flex布局（包括有子节点和叶子节点） */
div.root-menu-expend ul a.root-menu-active,
div.root-menu-expend ul a.root-menu-active2,
div.root-menu-expend ul a.root-menu-link2,
div.root-menu-expend ul a.root-menu-link {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

div.root-menu-expend ul a.root-menu-link {
    white-space: nowrap;
}

/* 叶子节点文本容器：支持两行文字显示 + note备注 */
div.root-menu-expend ul a .menu-text-wrapper {
    display: flex;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
    gap: 8px;
}

/* 文本内容：支持两行显示，增加行高 */
div.root-menu-expend ul a .menu-text-wrapper .menu-text-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    /* -webkit-line-clamp: 2; */
    -webkit-box-orient: vertical;
    word-break: break-word;
    word-wrap: break-word;
    line-height: 1.8;
    /* white-space: normal; */
}

/* note备注徽章样式：与第二行对齐 */
div.root-menu-expend ul a .menu-text-wrapper .menu-note-badge {
    display: inline-flex;
    align-items: flex-end;
    background-color: #c0cfff63;
    color: var(--system-primary-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    height: fit-content;
    margin-top: auto;
}