/* 强制菜单默认折叠 - 添加在顶部以优先级更高 */
.nav-item-has-subnav:not(.open) .nav-subnav {
    display: none !important;
}
.nav-subnav {
    display: none !important;
}
.nav-item-has-subnav.open .nav-subnav {
    display: block !important;
}

/* 全局菜单字体粗细控制 - 高优先级规则 */
html body .sidebar-main .nav-drawer > li > a,
html body .sidebar-main .nav-drawer > li > a i,
html body .sidebar-main .nav-drawer li.nav-item a,
html body .sidebar-main .nav-drawer .nav-subnav > li > a,
html body .sidebar-main .nav-drawer .nav-item-has-subnav > a,
html body .sidebar-main a,
html body .nav-drawer li a,
html body .nav-item a,
html body .nav-subnav li a {
    font-weight: normal !important;
    text-shadow: none !important;
}

/* 确保子菜单不使用粗体 */
html body .nav-drawer .nav-subnav li a,
html body .nav-drawer .nav-subnav li.active a,
html body .nav-item-has-subnav.open .nav-subnav li a {
    font-weight: normal !important;
}

/* 确保任何激活的菜单项也不使用粗体 */
html body .nav-drawer > li.active > a,
html body .nav-drawer .nav-subnav > li.active > a,
html body .nav-drawer > .active > a {
    font-weight: normal !important;
}

/* 侧边栏显示修复 */
nav.sidebar-main {
    display: block !important;
    width: 100% !important;
}

.sidebar-main {
    width: 100%;
    height: 100%;
    background-color: #fff;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px 0;
}

.nav-drawer {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
}

.nav-drawer li {
    position: relative;
    width: 100%;
    float: none;
    display: block;
}

.nav-drawer li a {
    display: block;
    padding: 10px 15px 10px 45px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: normal !important; /* 确保菜单文字不加粗 */
    transition: all 0.3s ease;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 20px; /* 明确设置行高 */
}

.nav-drawer li a:hover {
    background-color: rgba(0,0,0,0.05);
    color: #0066cc;
}

.nav-drawer > li > a > i {
    position: absolute;
    left: 15px;
    top: 50%; /* 使用百分比定位 */
    transform: translateY(-50%); /* 使用变换来垂直居中 */
    font-size: 18px;
    line-height: 1;
}

.nav-drawer .nav-subnav {
    list-style: none;
    padding-left: 0;
    background-color: rgba(0,0,0,0.02);
    width: 100%;
    display: flex;
    flex-direction: column;
    display: none; /* 默认隐藏子菜单 */
}

.nav-drawer .nav-subnav > li {
    width: 100%;
}

.nav-drawer .nav-subnav > li > a {
    padding-left: 60px;
    font-size: 13px;
    color: #666;
    width: 100%;
    line-height: 20px; /* 确保与父菜单项相同的行高 */
    font-weight: normal !important; /* 确保子菜单文字不加粗 */
}

.nav-item-has-subnav .nav-subnav {
    display: none;
}

.nav-item-has-subnav.open .nav-subnav {
    display: flex;
    flex-direction: column;
}

/* 覆盖可能导致两列的样式 */
.nav, .nav-drawer, .nav-item, .nav-item-has-subnav, .nav-subnav {
    float: none !important;
    display: block !important;
    width: 100% !important;
    column-count: 1 !important;
    columns: 1 !important;
    column-width: auto !important;
    column-span: none !important;
    grid-template-columns: none !important;
    flex-wrap: nowrap !important;
    max-width: 100% !important;
}

/* 修复Bootstrap覆盖 */
.sidebar-main .nav {
    display: block !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    padding-left: 0 !important;
    margin-bottom: 0 !important;
    list-style: none !important;
}

.sidebar-main .nav li {
    position: relative !important;
    display: block !important;
    width: 100% !important;
}

.sidebar-main .nav > li > a {
    position: relative !important;
    display: block !important;
    padding: 10px 15px 10px 45px !important;
    width: 100% !important;
    font-weight: normal !important; /* 确保菜单文字不加粗 */
}

/* 确保图标显示正确 */
.mdi {
    display: inline-block;
    font: normal normal normal 24px/1 "Material Design Icons";
    font-size: inherit;
    text-rendering: auto;
    line-height: inherit;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 阻止默认样式干扰 */
body {
    margin: 0;
    padding: 0;
    background-color: #fff !important;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3498db #f5f5f5;
}

body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: #f5f5f5;
}

body::-webkit-scrollbar-thumb {
    background-color: #3498db;
    border-radius: 4px;
}

/* 强制清除所有可能导致菜单列布局的样式 */
.sidebar-main .row,
.sidebar-main .col,
.sidebar-main .col-1, .sidebar-main .col-2, .sidebar-main .col-3, 
.sidebar-main .col-4, .sidebar-main .col-5, .sidebar-main .col-6,
.sidebar-main .col-7, .sidebar-main .col-8, .sidebar-main .col-9,
.sidebar-main .col-10, .sidebar-main .col-11, .sidebar-main .col-12,
.sidebar-main .col-auto, .sidebar-main .col-lg, .sidebar-main .col-lg-auto, 
.sidebar-main .col-md, .sidebar-main .col-md-auto, .sidebar-main .col-sm,
.sidebar-main .col-sm-auto, .sidebar-main .col-xl, .sidebar-main .col-xl-auto {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 强制使用单列布局 */
.sidebar-main {
    display: block !important;
}

.sidebar-main * {
    float: none !important;
}

/* 所有侧边栏菜单都不使用粗体 */
.sidebar-main ul, .sidebar-main li, .sidebar-main a {
    font-weight: normal !important;
} 