/* Index.css - 页面布局框架 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow: hidden;
}

/* ===== 全局背景（整张图铺满 header + nav + main） ===== */
body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    font-family: system-ui, sans-serif;

    /* 背景图片 */
    position: relative;
    isolation: isolate;
    background-image: url('/img/projecta/yelan.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ===== 页眉 ===== */
header {
    position: relative;
    z-index: 1;
    color: white;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-bottom: 1px solid #e8ecf1;

}

.logo {
    font-size: 20px;
    font-weight: 600;
}

.logo-img {
    width: 24px;
    height: 24px;
}

.user-info {
    font-size: 15px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 12px;
    border-radius: 999px;
}

/* ===== 中间区域：左导航 + 右内容 ===== */
.layout-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ===== 右侧内容区 ===== */
main {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* ===== 左侧导航 ===== */
nav {
    width: 240px;
    padding: 12px 0;
    border-right: 1px solid #e8ecf1;
    flex-shrink: 0;
    overflow-y: auto;
    background: transparent;
}

/* ===== 导航项 ===== */
.nav-item {
    display: block;
    padding: 12px 20px;
    margin: 2px 12px;
    cursor: pointer;
    color: #c8cdd5;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 450;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 500;
    box-shadow: none;
}

/* ===== 导航组（二级菜单） ===== */
.nav-group {
    margin: 2px 0;
}

.nav-group-title {
    padding: 12px 20px;
    margin: 2px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #b0b8c1;
    font-weight: 500;
    font-size: 14px;
    border-radius: 8px;
    user-select: none;
    transition: all 0.2s ease;
}

.nav-group-title:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.nav-arrow {
    font-size: 10px;
    transition: transform 0.25s ease;
    opacity: 0.5;
}

.nav-group.open .nav-arrow {
    transform: rotate(90deg);
    opacity: 1;
}

.nav-submenu {
    display: none;
    padding: 4px 0;
}

.nav-group.open .nav-submenu {
    display: block;
}

.nav-submenu .nav-item {
    padding-left: 52px;
    font-size: 13px;
    color: #9ca3af;
}

.nav-submenu .nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.nav-submenu .nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-shadow: none;
}