* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-variant-ligatures: none;
    background-color: var(--bg-color);
    color: var(--text-primary);
}
.app {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 300px;
    background-color: var(--bg-secondary);
    border-right: 1px solid #e2e8f0;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    padding: 1.2rem 0;
}
.logo {
    padding: 0 1rem 1rem 1rem;
    border-bottom: 1px solid #edf2f7;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.3rem;
    background-color: var(--bg-color);
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--text-muted);
}
/* 多级树形菜单 */
.tree {
    list-style: none;
    padding-left: 0;
}
.tree ul {
    list-style: none;
    padding-left: 1rem;
}
.tree li {
    margin: 0;
}
.node {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.15s;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
}
.node:hover {
    background-color: var(--bg-color);
    color: var(--text-primary);
}
/* 文件夹节点 */
.folder > .node {
    font-weight: 800;
}
/* 页面节点 */
.page > .node {
    font-weight: normal;
}
.page.active > .node {
    background-color: var(--bg-note);
    color: var(--text-primary);
    border-left-color: #2b8c4a;
}
.toggle {
    display: inline-block;
    width: 18px;
    font-size: 11px;
    color: var(--text-primary);
    text-align: center;
    flex-shrink: 0;
}
.icon {
    width: 10px;
    text-align: center;
    flex-shrink: 0;
}
.label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 子菜单折叠 */
.folder > ul {
    display: none;
}
.folder.expanded > ul {
    display: block;
}
/* 右侧内容区 */
.main {
    flex: 1;
    padding: 1.5rem;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
}
.content-area {
    flex: 1;
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    overflow: auto;
}
.content-frame {
    width: 100%;
    height: 98%;
    min-height: 70vh;
    border: none;
    border-radius: 8px;
    background-color: var(--bg-color);
}
.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background-color: var(--bg-color);
}
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #2b8c4a;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.footer-note {
    margin-top: 1rem;
    font-size: 0.7rem;
    text-align: center;
    color: var(--text-primary);
    border-top: 1px solid #edf2f7;
    padding-top: 1rem;
}
@media (max-width: 640px) {
    .sidebar { width: 260px; }
    .main { padding: 1rem; }
}
