body {
    margin: 0;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    background: #f5f7fb;
    color: #222;
}

a {
    color: #1f5fd1;
    text-decoration: none;
}

.layout-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: #f5f7fb;
}

/* =========================
   左侧导航区
   ========================= */
.sidebar {
    width: 286px;
    min-width: 286px;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 55%, #e9f1ff 100%);
    color: #1f2d3d;
    padding: 18px 14px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #d8e4f2;
}

.brand {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 22px;
    line-height: 1.1;
}

.brand a {
    color: #15396b;
}

.brand-sub {
    font-size: 12px;
    color: #5b6f88;
    margin-top: 4px;
    line-height: 1.3;
}

.nav-group {
    margin-bottom: 8px;
}

.nav-group-title {
    font-weight: bold;
    margin-bottom: 4px;
    line-height: 1.2;
    font-size: 14px;
}

.nav-group-title a,
.nav-group ul a {
    color: #1f2d3d;
}

.nav-group ul {
    margin: 0;
    padding-left: 28px;
}

.nav-group li {
    margin-bottom: 1px;
    line-height: 1.16;
    padding-left: 2px;
}

.nav-group ul a {
    font-size: 14px;
    line-height: 1.16;
    display: inline-block;
    vertical-align: top;
    white-space: nowrap;
}

/* =========================
   左侧导航当前功能高亮
   ========================= */
.nav-group li.nav-item {
    position: relative;
    border-radius: 8px;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.nav-group li.nav-item:hover {
    background: rgba(32, 180, 134, 0.06);
}

.nav-group li.nav-item-active {
    background: rgba(32, 180, 134, 0.12);
}

.nav-group ul a.nav-link {
    padding: 3px 8px;
    border-radius: 8px;
}

.nav-group ul a.nav-link-active {
    color: #18a879;
    font-weight: 700;
}

.nav-group ul a.nav-link-active:hover {
    color: #14966f;
}

.nav-group-title-active a {
    color: #15396b;
}

/* =========================
   左下用户区域
   直接复用左侧背景，不再使用白底框
   ========================= */
.sidebar-user {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(31, 45, 61, 0.12);
    box-sizing: border-box;
}

.sidebar-user,
.sidebar-user * {
    color: #111111 !important;
}

.sidebar-user-content {
    min-height: 116px;
    padding: 6px 2px 2px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.sidebar-user-content-guest {
    min-height: 88px;
    justify-content: center;
    align-items: flex-start;
}

.sidebar-user-id-link {
    display: block;
    color: #111111 !important;
    text-decoration: none;
}

.sidebar-user-id-row {
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
    word-break: break-word;
}

.sidebar-user-vip-expire {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.6;
}

.sidebar-user-upgrade-line {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.6;
}

.sidebar-user-logout-line {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.6;
}

.sidebar-user-upgrade-link,
.sidebar-user-logout-link {
    font-size: 14px;
    line-height: 1.6;
    color: #111111 !important;
    text-decoration: none;
}

.sidebar-login-trigger {
    display: inline-block;
    width: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    font-size: 18px;
    line-height: 1.5;
    font-weight: 700;
    color: #111111 !important;
    cursor: pointer;
    box-sizing: border-box;
    text-align: left;
}

.sidebar-login-trigger:hover {
    background: transparent;
    color: #15396b !important;
    text-decoration: underline;
}

/* 如果模板里还残留说明文字，直接隐藏 */
.sidebar-user-guest-text {
    display: none !important;
}

/* =========================
   右侧主内容区
   ========================= */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 24px 28px 28px;
    box-sizing: border-box;
}

/* 简单页通用容器 */
.simple-page {
    max-width: 960px;
    margin: 48px auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.footer-bar {
    margin-top: 24px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* =========================
   常见通用块
   ========================= */
.page-card {
    background: #ffffff;
    border: 1px solid #dbe5f2;
    border-radius: 12px;
    box-sizing: border-box;
}

.page-section {
    margin-bottom: 24px;
}

/* =========================
   滚动条细化
   ========================= */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(31, 45, 61, 0.18);
    border-radius: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

/* =========================
   响应式
   ========================= */
@media (max-width: 1200px) {
    .sidebar {
        width: 250px;
        min-width: 250px;
        padding: 16px 12px 14px;
    }

    .main-content {
        padding: 22px 22px 24px;
    }

    .nav-group-title {
        font-size: 13px;
    }

    .nav-group ul {
        padding-left: 24px;
    }

    .nav-group ul a {
        font-size: 13px;
    }

    .sidebar-user-content {
        min-height: 108px;
    }

    .sidebar-login-trigger {
        font-size: 17px;
    }
}

@media (max-width: 900px) {
    .layout-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        position: relative;
        top: auto;
        overflow: visible;
        padding: 18px 16px;
    }

    .main-content {
        padding: 18px 16px 22px;
    }

    .simple-page {
        margin: 28px auto;
        padding: 0 10px;
    }

    .sidebar-user {
        margin-top: 18px;
    }

    .sidebar-user-content {
        min-height: auto;
    }

    .nav-group ul a {
        white-space: normal;
    }
}