/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 200px;
    background-color: #343a40;
    color: white;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

/* 侧边栏标题 */
.sidebar h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #ffc107;
    user-select: none;
}

/* 菜单列表 */
#menu-list {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px; /* 预留滚动条空间 */
}

/* 菜单项基础样式 */
#menu-list li {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    user-select: none;
    color: #e9ecef;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* 鼠标悬停 */
#menu-list li:hover {
    background-color: #495057;
    color: #ffc107;
    box-shadow: inset 5px 0 0 #ffc107;
}

/* 选中菜单项高亮 */
#menu-list li.active {
    background-color: #ffc107;
    color: #212529;
    font-weight: 700;
    box-shadow: inset 5px 0 0 #212529;
}

/* 退出按钮 */
#logout-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: auto;
    user-select: none;
    box-shadow: 0 4px 8px rgb(220 53 69 / 0.4);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#logout-btn:hover {
    background-color: #c82333;
    box-shadow: 0 6px 14px rgb(200 35 51 / 0.6);
}

/* 主内容区，留出侧边栏宽度 */
#main-content {
    margin-left: 200px;
    height: 100vh;
}


/* iframe充满主内容区 */
#page-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* 小屏适配，保持左侧竖菜单 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        width: 140px;
        height: 100vh;
        padding: 15px 10px;
        flex-direction: column;
        overflow-y: auto;
    }

    .sidebar h3 {
        display: block;
    }

    #logout-btn {
        display: block;
        margin-top: auto;
    }

    #menu-list {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        padding-right: 4px;
    }

    #menu-list li {
        white-space: normal;
    }

    #main-content {
        margin-left: 140px;
        height: 100vh;
        margin-top: 0;
    }

    #page-frame {
        height: 100%;
    }

}
.user-info {
    padding: 12px 10px;
    background-color: #212529;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #ffc107;
    font-weight: normal;  /* 不加粗 */
    font-size: 0.9rem;
    user-select: none;
    line-height: 1.5;     /* 行高稍微宽点，分开更清晰 */
}

.user-info div {
    margin-bottom: 6px;   /* 每行之间留空 */
}

.notice-bar {
    background-color: #fff8e1;
    color: #d17b00;
    padding: 8px 16px;
    font-size: 14px;
    border-bottom: 1px solid #ffe0b2;
}
