:root {
    /* ✨ 核心修改：定义全新的“小青树”主题色 */
    --primary-color: #009688; /* 一个沉稳而充满活力的青色 (Teal) */
    --primary-gradient: linear-gradient(45deg, #4db6ac 0%, #00796b 100%); /* 从亮青到深青的渐变 */
    --primary-bg-light: #e0f2f1; /* 用于选中项的淡青色背景 */

    /* --- 以下为通用样式变量，保持不变 --- */
    --bg-light: #f4f6f9; /* 背景色微调，更柔和 */
    --bg-white: #ffffff;
    --text-dark: #212529;
    --text-secondary: #6c757d;
    --border-color: #e0e0e0;
    --radius-md: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --sidebar-width: 240px;
    --bottom-nav-height: 60px;
}

body {
    background-color: var(--bg-light);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

.app-container { display: flex; }
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    transition: margin-left 0.3s ease;
}

/* --- 导航样式 --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-white);
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    transition: width 0.3s ease;
}
.logo { display: flex; align-items: center; padding: 24px; text-decoration: none; color: var(--text-dark); }
.logo-icon { font-size: 2rem; margin-right: 12px; }
.logo-text { font-size: 1.25rem; font-weight: 600; white-space: nowrap; }
.sidebar-nav { flex-grow: 1; margin-top: 20px; }
.nav-link { display: flex; align-items: center; padding: 16px 24px; color: #555; text-decoration: none; transition: all 0.2s ease; border-left: 4px solid transparent; }
.nav-link i { width: 30px; text-align: center; font-size: 1.2rem; margin-right: 16px; }
.nav-link span { font-size: 1rem; font-weight: 500; }
.nav-link:hover { background: var(--bg-light); color: var(--primary-color); }
/* ✨ 使用新的主题色变量 */
.nav-link.active { background: var(--primary-bg-light); color: var(--primary-color); border-left-color: var(--primary-color); font-weight: 600; }
.sidebar-footer { padding: 20px 24px; border-top: 1px solid var(--border-color); display: flex; align-items: center; cursor: pointer; }
#user-avatar-sidebar { font-size: 1.5rem; margin-right: 12px; }

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    justify-content: space-around;
    align-items: center;
}
.nav-button { background: none; border: none; color: #777; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; padding: 5px 0; cursor: pointer; }
.nav-button i { font-size: 1.5rem; }
.nav-button span { font-size: 0.75rem; margin-top: 4px; }
.nav-button.active { color: var(--primary-color); }

/* --- 页面通用样式 --- */
.page-header { margin-bottom: 24px; }
.page-title { font-size: 1.8rem; font-weight: 700; margin: 0 0 8px 0; }
.page-subtitle { font-size: 1rem; color: var(--text-secondary); margin: 0; }
.loading-spinner { text-align: center; padding: 50px; }
.empty-state { text-align: center; padding: 40px; background: var(--bg-white); border-radius: var(--radius-lg); border: 1px dashed var(--border-color); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); }

/* --- Layui 样式覆盖与增强 (自动应用新主题色) --- */
.layui-card { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.layui-form-label { font-weight: 600; }
.layui-input, .layui-select, .layui-textarea { border-radius: var(--radius-md) !important; }
.layui-btn { border-radius: var(--radius-md) !important; }
.layui-layer-title { background: var(--primary-gradient) !important; color: white !important; border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; }
.layui-layer-btn .layui-layer-btn0 { background-color: var(--primary-color) !important; border-color: var(--primary-color) !important; }

/* --- 图标/颜色选择器 --- */
.icon-selector, .gradient-selector { display: flex; flex-wrap: wrap; gap: 10px; }
.icon-option, .gradient-option { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; border: 2px solid transparent; border-radius: var(--radius-md); }
.icon-option { font-size: 1.8rem; width: 48px; height: 48px; }
.gradient-option { width: 40px; height: 40px; }
.icon-option:hover, .gradient-option:hover { transform: scale(1.1); }
.icon-option.selected, .gradient-option.selected { border-color: var(--primary-color); box-shadow: 0 0 0 2px var(--primary-color); transform: scale(1.1); }

/* --- 响应式布局 --- */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding: 16px; padding-bottom: calc(var(--bottom-nav-height) + 20px); }
    .bottom-nav { display: flex; }
    .page-title { font-size: 1.5rem; }
}
