/* ===== CSS 变量 ===== */
:root {
    --primary: #4A90D9;
    --primary-dark: #3A7BC8;
    --primary-light: #6BA5E7;
    --primary-bg: #E8F1FC;
    --danger: #E74C3C;
    --danger-light: #FDECEA;
    --success: #27AE60;
    --success-light: #E8F8F0;
    --warning: #F39C12;
    --warning-light: #FEF5E7;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --text-light: #BDC3C7;
    --bg-page: #F0F2F5;
    --bg-card: #FFFFFF;
    --bg-hover: #F8F9FA;
    --border: #E5E8EB;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --sidebar-width: 220px;
    --bottom-nav-height: 56px;
    --transition: 0.25s ease;
}

/* ===== 重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: 1.6;
    overflow: hidden;
}

a { text-decoration: none; color: inherit; cursor: pointer; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }

/* ===== 应用布局 ===== */
#app {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 20px 18px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon { font-size: 28px; }
.logo-text { font-size: 18px; font-weight: 700; color: var(--primary); }

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition);
    margin-bottom: 4px;
    font-size: 14px;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }

.nav-item.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}

.nav-icon { font-size: 18px; width: 24px; text-align: center; }

.sidebar-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
}

.version-text { font-size: 12px; color: var(--text-light); }

/* ===== 主内容区 ===== */
.main-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* ===== 页面 ===== */
.page {
    display: none;
    padding: 20px 24px 80px;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease;
}

.page-active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-title { font-size: 24px; font-weight: 700; }
.page-date { font-size: 14px; color: var(--text-secondary); }

/* ===== 底部导航（移动端） ===== */
.bottom-nav {
    display: none;
}
