/* ==========================================================================
   Modern UI Design System - 工资计算器 PC 端
   品牌色: #2563eb (蓝) | 侧边栏: #1e293b (深石板) | 背景: #f8fafc (浅灰)
   字体栈: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif
   ========================================================================== */

/* ==========================================================================
   1. 设计令牌 (CSS 变量)
   ========================================================================== */
:root {
    /* 品牌色 - 使用沉稳的蓝色系，避免紫色AI感 */
    --brand: #2563eb;
    --brand-hover: #1d4ed8;
    --brand-active: #1e40af;
    --brand-light: #eff6ff;
    --brand-soft: rgba(37, 99, 235, 0.08);
    --brand-glow: rgba(37, 99, 235, 0.20);

    /* 功能色 */
    --success: #16a34a;
    --success-hover: #15803d;
    --success-soft: rgba(22, 163, 74, 0.10);
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --danger-soft: rgba(220, 38, 38, 0.10);
    --warning: #d97706;
    --warning-hover: #b45309;
    --warning-soft: rgba(217, 119, 6, 0.10);
    --info: #0891b2;
    --info-soft: rgba(8, 145, 178, 0.10);
    --secondary: #64748b;
    --secondary-soft: rgba(100, 116, 139, 0.10);

    /* 强调色 (统计卡片) */
    --accent-purple: #7c3aed;
    --accent-cyan: #0891b2;
    --accent-orange: #d97706;
    --accent-red: #dc2626;

    /* 中性色 */
    --bg: #f8fafc;
    --surface: #ffffff;
    --sidebar-bg: #1e293b;
    --sidebar-bg-2: #334155;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --sidebar-active: rgba(37, 99, 235, 0.15);

    /* 文字 */
    --text-1: #0f172a;
    --text-2: #334155;
    --text-3: #64748b;
    --text-muted: #94a3b8;
    --text-inv: #ffffff;
    --text-inv-2: rgba(255, 255, 255, 0.70);
    --text-inv-3: rgba(255, 255, 255, 0.45);

    /* 边框与分割 */
    --border: #e2e8f0;
    --border-2: #f1f5f9;
    --divider: rgba(0, 0, 0, 0.05);

    /* 圆角 - 适度减小，避免过度圆润 */
    --radius-sm: 4px;
    --radius: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-pill: 999px;

    /* 阴影 - 减弱强度，更自然 */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 6px 16px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 10px 28px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.05);
    --shadow-brand: 0 4px 12px rgba(37, 99, 235, 0.18);

    /* 尺寸 */
    --sidebar-w: 210px;
    --topbar-h: 56px;
    --content-max: 1400px;

    /* 过渡 */
    --t-fast: 0.12s ease;
    --t: 0.2s ease;
    --t-slow: 0.3s ease;

    /* 字体 */
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 深色主题覆盖 */
[data-theme="dark"],
.theme-dark {
    --bg: #0f1117;
    --surface: #1a1d2e;
    --sidebar-bg: #14161f;
    --sidebar-bg-2: #1f2230;
    --text-1: #f3f4f6;
    --text-2: #d1d5db;
    --text-3: #9ca3af;
    --text-muted: #6b7280;
    --border: #2d3142;
    --border-2: #262a38;
    --divider: rgba(255, 255, 255, 0.08);
    --brand-light: #23243a;
    --brand-soft: rgba(99, 91, 255, 0.18);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   2. 重置与基础
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-1);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--t), color var(--t);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-1);
    line-height: 1.4;
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 15px; }
h6 { font-size: 14px; }

p { margin: 0 0 12px; }

a {
    color: var(--brand);
    text-decoration: none;
    transition: color var(--t-fast);
}
a:hover { color: var(--brand-hover); text-decoration: none; }

img { max-width: 100%; vertical-align: middle; }

button {
    font-family: inherit;
    cursor: pointer;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c7cdd6; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8b0bd; }

/* ==========================================================================
   3. 应用布局系统
   ========================================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg);
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background-color: var(--sidebar-bg);
    color: var(--text-inv);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform var(--t-slow);
    overflow: hidden;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    transition: margin-left var(--t-slow);
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    height: var(--topbar-h);
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--shadow-xs);
}

.app-content {
    flex: 1;
    padding: 24px;
    max-width: var(--content-max);
    width: 100%;
    margin: 0 auto;
}

/* 侧边栏折叠态 (PC) */
.app-layout.sidebar-collapsed .app-sidebar {
    width: 72px;
}
.app-layout.sidebar-collapsed .app-main {
    margin-left: 72px;
}
.app-layout.sidebar-collapsed .sidebar-logo span,
.app-layout.sidebar-collapsed .sidebar-item-label,
.app-layout.sidebar-collapsed .sidebar-section-title,
.app-layout.sidebar-collapsed .sidebar-user-info {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
}

/* ==========================================================================
   4. 侧边栏组件
   ========================================================================== */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--topbar-h);
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-logo .logo-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-logo span {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-inv);
    letter-spacing: 0.3px;
    transition: opacity var(--t);
}

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

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

.sidebar-section-title {
    padding: 16px 12px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-inv-3);
    white-space: nowrap;
    transition: opacity var(--t);
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: var(--radius);
    color: var(--text-inv-2);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
    white-space: nowrap;
    position: relative;
}

.sidebar-item .sidebar-item-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    opacity: 0.7;
}

.sidebar-item .sidebar-item-label {
    flex: 1;
    transition: opacity var(--t);
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item .sidebar-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    background: var(--danger);
    color: #fff;
}

.sidebar-item:hover {
    background-color: var(--sidebar-hover);
    color: var(--text-inv);
    text-decoration: none;
}

.sidebar-item.active {
    background-color: var(--sidebar-active);
    color: var(--text-inv);
    font-weight: 600;
}

.sidebar-item.active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    background: var(--brand);
    border-radius: 0 3px 3px 0;
}

.sidebar-user {
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    background-color: var(--sidebar-bg-2);
}

.sidebar-user .sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), #8b7bff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    flex-shrink: 0;
}

.sidebar-user-info {
    min-width: 0;
    flex: 1;
    transition: opacity var(--t);
}

.sidebar-user-info .sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-inv);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-info .sidebar-user-role {
    font-size: 12px;
    color: var(--text-inv-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .sidebar-user-action {
    color: var(--text-inv-3);
    font-size: 18px;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background var(--t-fast), color var(--t-fast);
    flex-shrink: 0;
}
.sidebar-user .sidebar-user-action:hover {
    background: var(--sidebar-hover);
    color: var(--text-inv);
}

/* 移动端遮罩 */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, 0.5);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--t);
}
.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ==========================================================================
   5. 顶部操作栏
   ========================================================================== */
.topbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar-title h1,
.topbar-title h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-1);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-title .topbar-subtitle {
    font-size: 12px;
    color: var(--text-3);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* 汉堡菜单按钮 (移动端) */
.topbar-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--t-fast);
}
.topbar-hamburger:hover { background: var(--brand-soft); }
.topbar-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-1);
    border-radius: 2px;
    margin: 0 auto;
    transition: var(--t);
}

/* 主题切换按钮 */
.theme-switch {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
}
.theme-switch:hover {
    background: var(--brand-soft);
    color: var(--brand);
}
.theme-switch .theme-icon-light,
.theme-switch .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-switch .theme-icon-light,
.theme-dark .theme-switch .theme-icon-light { display: inline; }
.theme-switch .theme-icon-dark { display: inline; }
[data-theme="dark"] .theme-switch .theme-icon-dark,
.theme-dark .theme-switch .theme-icon-dark { display: none; }

/* ==========================================================================
   6. 卡片 (Modern)
   ========================================================================== */
.card-modern {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow var(--t), transform var(--t), border-color var(--t);
}

.card-modern:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--border-2);
}

.card-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-2);
    flex-wrap: wrap;
}

.card-header-modern .card-title-modern {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header-modern .card-title-modern .card-title-icon {
    color: var(--brand);
    font-size: 18px;
}

.card-header-modern .card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.card-body {
    padding: 4px 0;
}

.card-body > p:first-child { margin-top: 0; }
.card-body > p:last-child { margin-bottom: 0; }

.card-footer-modern {
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-2);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* 卡片网格 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* ==========================================================================
   7. 统计卡片 (Modern) - 顶部彩色强调条
   ========================================================================== */
.stats-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card-modern {
    position: relative;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px 20px 18px;
    overflow: hidden;
    transition: box-shadow var(--t), transform var(--t);
    cursor: default;
}

.stat-card-modern:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.stat-card-modern.clickable,
.stat-card-modern a {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

/* 顶部彩色强调条 */
.stat-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-accent.purple { background: linear-gradient(90deg, var(--accent-purple), #8b7bff); }
.stat-accent.cyan { background: linear-gradient(90deg, var(--accent-cyan), #22d3ee); }
.stat-accent.orange { background: linear-gradient(90deg, var(--accent-orange), #fbbf24); }
.stat-accent.red { background: linear-gradient(90deg, var(--accent-red), #f87171); }
.stat-accent.green { background: linear-gradient(90deg, var(--success), #34d399); }
.stat-accent.blue { background: linear-gradient(90deg, var(--info), #38bdf8); }

.stat-card-modern .stat-icon-modern {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 10px;
}
.stat-card-modern .stat-icon-modern.purple { background: var(--brand-soft); color: var(--accent-purple); }
.stat-card-modern .stat-icon-modern.cyan { background: rgba(6,182,212,0.12); color: var(--accent-cyan); }
.stat-card-modern .stat-icon-modern.orange { background: var(--warning-soft); color: var(--accent-orange); }
.stat-card-modern .stat-icon-modern.red { background: var(--danger-soft); color: var(--accent-red); }
.stat-card-modern .stat-icon-modern.green { background: var(--success-soft); color: var(--success); }
.stat-card-modern .stat-icon-modern.blue { background: var(--info-soft); color: var(--info); }

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.stat-card-modern .stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}
.stat-card-modern .stat-trend.up { background: var(--success-soft); color: var(--success); }
.stat-card-modern .stat-trend.down { background: var(--danger-soft); color: var(--danger); }

/* ==========================================================================
   8. 按钮 (Modern)
   ========================================================================== */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    transition: background var(--t-fast), border-color var(--t-fast),
                color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
    user-select: none;
}

.btn-modern:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.btn-modern:active {
    transform: translateY(1px);
}

.btn-modern:disabled,
.btn-modern.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-modern.btn-sm-modern {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-modern.btn-lg-modern {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-modern.btn-block-modern {
    width: 100%;
    display: flex;
}

/* 图标按钮 */
.btn-icon-modern {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: all var(--t-fast);
}
.btn-icon-modern:hover {
    background: var(--brand-soft);
    color: var(--brand);
    border-color: var(--brand-soft);
}

/* Primary - 紫色 */
.btn-primary-modern {
    background-color: var(--brand);
    color: #fff;
    box-shadow: 0 2px 6px rgba(99, 91, 255, 0.25);
}
.btn-primary-modern:hover {
    background-color: var(--brand-hover);
    color: #fff;
    box-shadow: 0 6px 16px rgba(99, 91, 255, 0.35);
    transform: translateY(-1px);
    text-decoration: none;
}
.btn-primary-modern:active { transform: translateY(0); }

/* Success - 绿色 */
.btn-success-modern {
    background-color: var(--success);
    color: #fff;
    box-shadow: 0 2px 6px rgba(22, 179, 100, 0.22);
}
.btn-success-modern:hover {
    background-color: var(--success-hover);
    color: #fff;
    box-shadow: 0 6px 16px rgba(22, 179, 100, 0.3);
    transform: translateY(-1px);
    text-decoration: none;
}

/* Danger - 红色 */
.btn-danger-modern {
    background-color: var(--danger);
    color: #fff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.22);
}
.btn-danger-modern:hover {
    background-color: var(--danger-hover);
    color: #fff;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
    text-decoration: none;
}

/* Warning - 橙色 */
.btn-warning-modern {
    background-color: var(--warning);
    color: #fff;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.22);
}
.btn-warning-modern:hover {
    background-color: var(--warning-hover);
    color: #fff;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
    text-decoration: none;
}

/* Secondary - 灰色 (描边) */
.btn-secondary-modern {
    background-color: var(--surface);
    color: var(--text-2);
    border-color: var(--border);
}
.btn-secondary-modern:hover {
    background-color: var(--bg);
    border-color: var(--text-muted);
    color: var(--text-1);
    text-decoration: none;
}

/* Info - 蓝色 */
.btn-info-modern {
    background-color: var(--info);
    color: #fff;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.22);
}
.btn-info-modern:hover {
    background-color: #0284c7;
    color: #fff;
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.3);
    transform: translateY(-1px);
    text-decoration: none;
}

/* 幽灵按钮 (文字按钮) */
.btn-ghost-modern {
    background-color: transparent;
    color: var(--text-2);
}
.btn-ghost-modern:hover {
    background-color: var(--brand-soft);
    color: var(--brand);
    text-decoration: none;
}

/* 链接按钮 */
.btn-link-modern {
    background: transparent;
    color: var(--brand);
    padding: 6px 8px;
}
.btn-link-modern:hover {
    color: var(--brand-hover);
    text-decoration: underline;
    background: transparent;
}

/* 按钮组 */
.btn-group-modern {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* ==========================================================================
   9. 表格 (Modern)
   ========================================================================== */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    background-color: var(--surface);
}

.table-modern-wrap {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 20px;
}

.table-modern-wrap .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-modern thead th {
    background-color: var(--bg);
    font-weight: 600;
    color: var(--text-3);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.table-modern tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-2);
    color: var(--text-2);
    vertical-align: middle;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-modern tbody tr {
    transition: background-color var(--t-fast);
}

.table-modern tbody tr:hover {
    background-color: var(--brand-soft);
}

.table-modern tbody tr:hover td {
    color: var(--text-1);
}

/* 表格内操作区 */
.table-modern .row-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

/* 表格数字对齐 */
.table-modern .text-right,
.table-modern th.text-right { text-align: right; }
.table-modern .text-center,
.table-modern th.text-center { text-align: center; }

.table-modern .cell-strong {
    font-weight: 600;
    color: var(--text-1);
}

.table-modern .cell-amount {
    font-weight: 600;
    color: var(--success);
    font-variant-numeric: tabular-nums;
}

/* 空表格行 */
.table-modern .empty-row td {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
}

/* ==========================================================================
   10. 表单 (Modern)
   ========================================================================== */
.form-modern {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group-modern {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group-modern label,
.form-group-modern .form-label-modern {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.form-group-modern .form-required {
    color: var(--danger);
    margin-left: 2px;
}

.form-group-modern .form-hint {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.form-control-modern {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-1);
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
    outline: none;
    line-height: 1.5;
}

.form-control-modern::placeholder {
    color: var(--text-muted);
}

.form-control-modern:hover {
    border-color: var(--text-muted);
}

.form-control-modern:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
    background-color: var(--surface);
}

.form-control-modern:disabled {
    background-color: var(--bg);
    color: var(--text-muted);
    cursor: not-allowed;
}

textarea.form-control-modern {
    min-height: 88px;
    resize: vertical;
    line-height: 1.6;
}

select.form-control-modern {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
    cursor: pointer;
}

/* 输入框带图标 */
.form-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-group .form-input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

.form-input-group .form-control-modern {
    padding-left: 38px;
}

/* 表单行 (横向排列) */
.form-row-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

/* 复选框 / 单选框 */
.form-check-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-2);
    user-select: none;
}

.form-check-modern input[type="checkbox"],
.form-check-modern input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
}

/* 开关 */
.form-switch-modern {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
}
.form-switch-modern input { opacity: 0; width: 0; height: 0; }
.form-switch-modern .slider {
    position: absolute;
    inset: 0;
    background: var(--text-muted);
    border-radius: var(--radius-pill);
    transition: var(--t-fast);
    cursor: pointer;
}
.form-switch-modern .slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: var(--t-fast);
    box-shadow: var(--shadow-sm);
}
.form-switch-modern input:checked + .slider { background: var(--brand); }
.form-switch-modern input:checked + .slider::before { transform: translateX(18px); }

/* ==========================================================================
   11. 徽章 / 标签 (Modern) - 圆角999px，半透明背景
   ========================================================================== */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.badge-modern.badge-purple-modern { background: var(--brand-soft); color: var(--brand); }
.badge-modern.badge-success-modern { background: var(--success-soft); color: var(--success); }
.badge-modern.badge-danger-modern { background: var(--danger-soft); color: var(--danger); }
.badge-modern.badge-warning-modern { background: var(--warning-soft); color: var(--warning-hover); }
.badge-modern.badge-info-modern { background: var(--info-soft); color: var(--info); }
.badge-modern.badge-secondary-modern { background: var(--secondary-soft); color: var(--secondary); }
.badge-modern.badge-cyan-modern { background: rgba(6,182,212,0.12); color: var(--accent-cyan); }

/* 状态点徽章 */
.badge-modern .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* 实心徽章 */
.badge-modern.badge-solid.badge-purple-modern { background: var(--brand); color: #fff; }
.badge-modern.badge-solid.badge-success-modern { background: var(--success); color: #fff; }
.badge-modern.badge-solid.badge-danger-modern { background: var(--danger); color: #fff; }
.badge-modern.badge-solid.badge-warning-modern { background: var(--warning); color: #fff; }
.badge-modern.badge-solid.badge-info-modern { background: var(--info); color: #fff; }

/* 标签 (小号徽章) */
.tag-modern {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    background: var(--brand-soft);
    color: var(--brand);
}

.tag-modern .tag-remove {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--t-fast);
}
.tag-modern .tag-remove:hover { opacity: 1; }

/* ==========================================================================
   12. 模态框 (Modern)
   ========================================================================== */
.modal-modern {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-modern.show {
    display: flex;
    animation: modalFadeIn var(--t);
}

.modal-modern .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content-modern {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 40px);
    background-color: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp var(--t-slow);
    z-index: 1;
}

.modal-content-modern.modal-sm { max-width: 400px; }
.modal-content-modern.modal-lg { max-width: 720px; }
.modal-content-modern.modal-xl { max-width: 960px; }

.modal-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-2);
    flex-shrink: 0;
}

.modal-header-modern .modal-title-modern {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header-modern .modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-3);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-fast), color var(--t-fast);
}
.modal-header-modern .modal-close:hover {
    background: var(--bg);
    color: var(--text-1);
}

.modal-body-modern {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer-modern {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-2);
    flex-shrink: 0;
    flex-wrap: wrap;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   13. 下拉菜单 (Modern)
   ========================================================================== */
.dropdown-modern {
    position: relative;
    display: inline-block;
}

.dropdown-modern .dropdown-toggle-modern {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--t-fast);
}
.dropdown-modern .dropdown-toggle-modern:hover {
    border-color: var(--text-muted);
    background: var(--bg);
}
.dropdown-modern .dropdown-toggle-modern .dropdown-caret {
    font-size: 11px;
    color: var(--text-muted);
    transition: transform var(--t-fast);
}
.dropdown-modern.open .dropdown-toggle-modern .dropdown-caret {
    transform: rotate(180deg);
}

.dropdown-menu-modern {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 1500;
    animation: dropdownFade var(--t-fast);
}

.dropdown-modern.open .dropdown-menu-modern { display: block; }

.dropdown-menu-modern.dropdown-menu-left { left: 0; right: auto; }

.dropdown-item-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
    white-space: nowrap;
}

.dropdown-item-modern:hover {
    background: var(--brand-soft);
    color: var(--brand);
    text-decoration: none;
}

.dropdown-item-modern .dropdown-item-icon {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    font-size: 15px;
}

.dropdown-item-modern.danger { color: var(--danger); }
.dropdown-item-modern.danger:hover { background: var(--danger-soft); color: var(--danger); }

.dropdown-divider-modern {
    height: 1px;
    background: var(--border-2);
    margin: 5px 0;
}

.dropdown-menu-modern .dropdown-header-modern {
    padding: 8px 12px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   14. 警告框 (Modern)
   ========================================================================== */
.alert-modern {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert-modern .alert-icon {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1.5;
}

.alert-modern .alert-content {
    flex: 1;
    min-width: 0;
}

.alert-modern .alert-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.alert-modern .alert-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 2px;
    transition: opacity var(--t-fast);
}
.alert-modern .alert-close:hover { opacity: 1; }

.alert-modern.alert-success-modern {
    background: var(--success-soft);
    border-color: rgba(22, 179, 100, 0.25);
    color: #0c6b3d;
}
.alert-modern.alert-danger-modern {
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.25);
    color: #a02020;
}
.alert-modern.alert-warning-modern {
    background: var(--warning-soft);
    border-color: rgba(245, 158, 11, 0.25);
    color: #92590a;
}
.alert-modern.alert-info-modern {
    background: var(--info-soft);
    border-color: rgba(14, 165, 233, 0.25);
    color: #0a5a7a;
}

[data-theme="dark"] .alert-modern.alert-success-modern,
.theme-dark .alert-modern.alert-success-modern { color: #6ee7b7; }
[data-theme="dark"] .alert-modern.alert-danger-modern,
.theme-dark .alert-modern.alert-danger-modern { color: #fca5a5; }
[data-theme="dark"] .alert-modern.alert-warning-modern,
.theme-dark .alert-modern.alert-warning-modern { color: #fcd34d; }
[data-theme="dark"] .alert-modern.alert-info-modern,
.theme-dark .alert-modern.alert-info-modern { color: #7dd3fc; }

/* ==========================================================================
   15. 空状态
   ========================================================================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state .empty-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 14px;
    font-weight: 300;
}

.empty-state .empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 6px;
}

.empty-state .empty-text {
    font-size: 14px;
    color: var(--text-3);
    margin-bottom: 18px;
    max-width: 360px;
}

.empty-state .empty-action {
    margin-top: 4px;
}

/* ==========================================================================
   16. 记录卡片 (Modern)
   ========================================================================== */
.records-list-modern {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.record-card-modern {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    padding: 16px 18px;
    transition: box-shadow var(--t), transform var(--t), border-color var(--t);
}

.record-card-modern:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* 记录状态色边框 */
.record-card-modern.rc-status-pending { border-left-color: var(--warning); }
.record-card-modern.rc-status-approved { border-left-color: var(--success); }
.record-card-modern.rc-status-rejected { border-left-color: var(--danger); }

.record-card-modern .record-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.record-card-modern .record-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.record-card-modern .record-status {
    flex-shrink: 0;
}

.record-card-modern .record-body {
    color: var(--text-3);
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.record-card-modern .record-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--border-2);
    font-size: 12px;
    color: var(--text-muted);
}

.record-card-modern .record-amount {
    font-size: 17px;
    font-weight: 700;
    color: var(--success);
    font-variant-numeric: tabular-nums;
}

.record-card-modern .record-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.record-card-modern .record-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.record-card-modern .record-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.record-card-modern .record-tags {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* ==========================================================================
   17. 账本卡片 (Modern)
   ========================================================================== */
.book-cards-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.book-card-modern {
    position: relative;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    transition: box-shadow var(--t), transform var(--t), border-color var(--t);
    overflow: hidden;
}

.book-card-modern::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), #8b7bff);
    opacity: 0;
    transition: opacity var(--t);
}

.book-card-modern:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}

.book-card-modern:hover::before { opacity: 1; }

.book-card-modern .book-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.book-card-modern .book-icon-modern {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--brand-soft), var(--brand-light));
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.book-card-modern .book-title-modern {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 2px;
    line-height: 1.4;
}

.book-card-modern .book-type-modern {
    font-size: 12px;
    color: var(--text-muted);
}

.book-card-modern .book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 14px 0;
    padding: 12px 14px;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 13px;
}

.book-card-modern .book-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.book-card-modern .book-meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.book-card-modern .book-meta-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
}

.book-card-modern .book-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.book-card-modern .book-actions .btn-modern {
    flex: 1;
    min-width: 90px;
}

/* ==========================================================================
   18. 图表容器
   ========================================================================== */
.chart-container {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow var(--t);
}

.chart-container:hover {
    box-shadow: var(--shadow-md);
}

.chart-container .chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.chart-container .chart-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-container .chart-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.chart-container .chart-canvas-wrap {
    position: relative;
    width: 100%;
}

.chart-container canvas {
    max-width: 100%;
    max-height: 320px;
}

.chart-container .chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-2);
}

.chart-container .chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-3);
}

.chart-container .chart-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* 图表网格行 */
.charts-row-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* ==========================================================================
   19. 搜索栏 & 筛选 (Modern)
   ========================================================================== */
.search-bar-modern {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-modern {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-modern .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

.search-modern input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-1);
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    outline: none;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.search-modern input::placeholder { color: var(--text-muted); }

.search-modern input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

/* 筛选栏 */
.filters-modern {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.filters-modern .filter-item-modern {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
    flex: 1;
}

.filters-modern .filter-item-modern label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
}

.filters-modern .filter-actions-modern {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

/* ==========================================================================
   20. 分页 (Modern)
   ========================================================================== */
.pagination-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.pagination-modern .page-item {
    list-style: none;
}

.pagination-modern .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--t-fast);
    cursor: pointer;
}

.pagination-modern .page-link:hover {
    background: var(--brand-soft);
    border-color: var(--brand-soft);
    color: var(--brand);
    text-decoration: none;
}

.pagination-modern .page-item.active .page-link {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 2px 6px rgba(99, 91, 255, 0.3);
}

.pagination-modern .page-item.disabled .page-link {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-info {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ==========================================================================
   21. 加载 & 骨架屏
   ========================================================================== */
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-2);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}

.loading-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 12px;
}

.skeleton-modern {
    background: linear-gradient(90deg, var(--border-2) 25%, var(--bg) 50%, var(--border-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius-sm);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================================================
   22. 工具类
   ========================================================================== */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-brand { color: var(--brand); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.text-1 { color: var(--text-1); }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }
.text-sm { font-size: 12px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 24px; }

.bg-surface { background-color: var(--surface); }
.bg-brand { background-color: var(--brand); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-pill { border-radius: var(--radius-pill); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.w-full { width: 100%; }
.w-auto { width: auto; }
.cursor-pointer { cursor: pointer; }
.overflow-hidden { overflow: hidden; }
.position-relative { position: relative; }
.no-wrap { white-space: nowrap; }

/* ==========================================================================
   23. 旧 Class 兼容层 (外观现代化，结构不变)
   说明: 覆盖 style.css 中的旧样式，使其呈现现代外观，
        同时保持原有 HTML 结构和 class 名称完全兼容。
   ========================================================================== */

/* 容器 */
.container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 20px;
}

/* 旧版卡片 -> 现代外观 */
.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow var(--t), transform var(--t);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card h3 {
    margin-bottom: 16px;
    color: var(--text-1);
    font-size: 16px;
    font-weight: 600;
}

/* 旧版统计卡片 -> 现代外观 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.stat-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    text-align: center;
    transition: box-shadow var(--t), transform var(--t);
    position: relative;
    overflow: hidden;
}

.stat-card.clickable-stat {
    cursor: pointer;
}

.stat-card.clickable-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all var(--t);
}

.stat-link:hover {
    text-decoration: none;
    color: inherit;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    transition: all var(--t);
}

.stat-link:hover .stat-value {
    color: var(--brand-hover);
    transform: scale(1.05);
}

.stat-label {
    color: var(--text-3);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: all var(--t);
}

.stat-link:hover .stat-label {
    color: var(--text-1);
}

/* 旧版按钮 -> 现代外观 (保持原有 class 名) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast),
                color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
    vertical-align: middle;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    letter-spacing: normal;
    text-transform: none;
    min-width: auto;
}

.btn:hover { text-decoration: none; }

.btn:active {
    transform: translateY(1px);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    min-width: auto;
}

.btn-primary {
    background-color: var(--brand);
    color: #fff;
    box-shadow: 0 2px 6px rgba(99, 91, 255, 0.25);
}
.btn-primary:hover {
    background-color: var(--brand-hover);
    color: #fff;
    box-shadow: 0 6px 16px rgba(99, 91, 255, 0.35);
    transform: translateY(-1px);
}
.btn-primary:focus {
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.btn-success {
    background-color: var(--success);
    color: #fff;
    box-shadow: 0 2px 6px rgba(22, 179, 100, 0.22);
}
.btn-success:hover {
    background-color: var(--success-hover);
    color: #fff;
    box-shadow: 0 6px 16px rgba(22, 179, 100, 0.3);
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.22);
}
.btn-danger:hover {
    background-color: var(--danger-hover);
    color: #fff;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}
.btn-danger:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35);
}

.btn-warning {
    background-color: var(--warning);
    color: #fff;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.22);
}
.btn-warning:hover {
    background-color: var(--warning-hover);
    color: #fff;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

.btn-info {
    background-color: var(--info);
    color: #fff;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.22);
}
.btn-info:hover {
    background-color: #0284c7;
    color: #fff;
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--text-2);
    border-color: var(--border);
}
.btn-secondary:hover {
    background-color: var(--bg);
    border-color: var(--text-muted);
    color: var(--text-1);
}

/* 链接色 */
a {
    color: var(--brand);
}
a:hover {
    color: var(--brand-hover);
}

/* 旧版导航栏 -> 现代深色外观 */
.navbar {
    background-color: var(--sidebar-bg);
    color: var(--text-inv);
    padding: 0;
    box-shadow: var(--shadow-sm);
    position: relative;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
}

.navbar-brand {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-inv);
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 32px;
}

.navbar-brand:hover {
    color: var(--text-inv);
    text-decoration: none;
}

.nav-link {
    color: var(--text-inv-2);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--t-fast);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    display: inline-block;
    white-space: nowrap;
    font-size: 14px;
}

.nav-link:hover {
    color: var(--text-inv);
    background-color: var(--sidebar-hover);
    text-decoration: none;
}

.nav-link.active {
    color: var(--text-inv);
    background-color: var(--sidebar-active);
}

/* 旧版下拉菜单 -> 现代外观 */
.dropdown-menu {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 1000;
    margin-top: 6px;
    padding: 6px;
    border: 1px solid var(--border);
}

.dropdown-item {
    padding: 9px 12px;
    text-decoration: none;
    color: var(--text-2);
    display: block;
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: all var(--t-fast);
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: var(--brand-soft);
    color: var(--brand);
    text-decoration: none;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-2);
    margin: 5px 0;
}

.dropdown-menu .nav-link {
    color: var(--text-2);
    padding: 9px 12px;
    font-size: 14px;
    display: block;
    margin: 0;
    background-color: transparent;
}

.dropdown-menu .nav-link:hover {
    background-color: var(--brand-soft);
    color: var(--brand);
}

/* 旧版表格 -> 现代外观 */
.table,
.salary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    font-size: 14px;
}

.table th,
.table td,
.salary-table th,
.salary-table td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-2);
    white-space: nowrap;
}

.table th,
.salary-table th {
    background-color: var(--bg);
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    border-bottom: 1px solid var(--border);
}

.table tbody tr,
.salary-table tbody tr {
    transition: background-color var(--t-fast);
}

.table tbody tr:hover,
.salary-table tbody tr:hover {
    background-color: var(--brand-soft);
}

/* 旧版表单 -> 现代外观 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-2);
    font-weight: 600;
    font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-1);
    background-color: var(--surface);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    box-sizing: border-box;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

/* 旧版徽章 -> 现代外观 */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.badge-success {
    background: var(--success-soft);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-soft);
    color: var(--warning-hover);
}

.badge-info {
    background: var(--info-soft);
    color: var(--info);
}

.badge-pending {
    background: var(--warning-soft);
    color: var(--warning-hover);
}

.badge-approved {
    background: var(--success);
    color: #fff;
}

.badge-rejected {
    background: var(--danger);
    color: #fff;
}

/* 旧版状态标签 */
.status-pending {
    background-color: var(--warning-soft);
    color: var(--warning-hover);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
}

.status-approved {
    background-color: var(--success);
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
}

.status-rejected {
    background-color: var(--danger);
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
}

/* 旧版警告框 -> 现代外观 */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: var(--success-soft);
    color: #0c6b3d;
    border-color: rgba(22, 179, 100, 0.25);
}

.alert-danger {
    background-color: var(--danger-soft);
    color: #a02020;
    border-color: rgba(239, 68, 68, 0.25);
}

.alert-warning {
    background-color: var(--warning-soft);
    color: #92590a;
    border-color: rgba(245, 158, 11, 0.25);
}

.alert-info {
    background-color: var(--info-soft);
    color: #0a5a7a;
    border-color: rgba(14, 165, 233, 0.25);
}

/* 旧版账本卡片 -> 现代外观 */
.book-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin: 20px 0;
}

.book-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    transition: box-shadow var(--t), transform var(--t);
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.book-card h3 {
    margin-bottom: 10px;
    color: var(--text-1);
    font-size: 16px;
}

.book-card .book-meta {
    display: flex;
    justify-content: space-between;
    margin: 14px 0;
    font-size: 13px;
    color: var(--text-3);
}

.book-card .btn {
    flex: 1;
    min-width: auto;
    font-size: 13px;
    padding: 8px 12px;
}

/* 旧版记录卡片 -> 现代外观 */
.record-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    padding: 16px 18px;
    margin-bottom: 14px;
    transition: box-shadow var(--t), transform var(--t);
}

.record-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.record-amount {
    font-weight: 700;
    color: var(--success);
}

/* 旧版图表盒 -> 现代外观 */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.chart-box {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    transition: box-shadow var(--t);
}

.chart-box:hover {
    box-shadow: var(--shadow-md);
}

.chart-box h4 {
    color: var(--text-1);
    margin-bottom: 15px;
    font-size: 15px;
    font-weight: 600;
}

.chart-box canvas {
    max-height: 280px;
}

/* 旧版分页 -> 现代外观 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 24px 0;
    list-style: none;
    gap: 4px;
    flex-wrap: wrap;
}

.pagination li {
    margin: 0;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--t-fast);
}

.pagination a:hover {
    background-color: var(--brand-soft);
    border-color: var(--brand-soft);
    color: var(--brand);
    text-decoration: none;
}

.pagination .active a {
    background-color: var(--brand);
    color: #fff;
    border-color: var(--brand);
    box-shadow: 0 2px 6px rgba(99, 91, 255, 0.3);
}

/* 旧版搜索栏 -> 现代外观 */
.search-container input[type="text"] {
    border: 1px solid var(--border);
    border-radius: var(--radius-pill) 0 0 var(--radius-pill);
    box-shadow: none;
}

.search-container input[type="text"]:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.search-container .btn-primary {
    border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
    margin-left: -1px;
    min-width: 80px;
    text-transform: none;
    letter-spacing: normal;
}

.search-results {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
}

.search-result-item:hover {
    background-color: var(--brand-soft);
}

.search-result-item:hover .book-name {
    color: var(--brand);
}

/* 旧版筛选区 -> 现代外观 */
.filter-item .form-control,
.filters .form-group .form-control {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    height: 40px;
}

.filter-item .form-control:focus,
.filters .form-group .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

/* 旧版登录框 -> 现代外观 */
.login-box {
    max-width: 420px;
    margin: 50px auto;
    padding: 36px 32px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.login-box h1 {
    text-align: center;
    color: var(--text-1);
    margin-bottom: 8px;
    font-size: 24px;
}

.login-box h2 {
    text-align: center;
    color: var(--text-3);
    margin-bottom: 24px;
    font-size: 15px;
    font-weight: 400;
}

/* ==========================================================================
   24. 响应式
   ========================================================================== */

/* 平板 */
@media (max-width: 1024px) {
    :root {
        --sidebar-w: 200px;
    }

    .app-content {
        padding: 20px;
    }

    .cards-grid,
    .book-cards-modern,
    .book-cards {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    .charts-row-modern,
    .charts-row {
        grid-template-columns: 1fr;
    }

    .stats-grid-modern,
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* 移动端: 侧边栏可折叠 (汉堡菜单) */
@media (max-width: 768px) {
    :root {
        --sidebar-w: 260px;
    }

    .app-sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .app-layout.sidebar-collapsed .app-sidebar {
        width: var(--sidebar-w);
    }

    .app-layout.sidebar-collapsed .app-main {
        margin-left: 0;
    }

    .app-layout.sidebar-collapsed .sidebar-logo span,
    .app-layout.sidebar-collapsed .sidebar-item-label,
    .app-layout.sidebar-collapsed .sidebar-section-title,
    .app-layout.sidebar-collapsed .sidebar-user-info {
        opacity: 1;
        width: auto;
    }

    /* 显示汉堡菜单 */
    .topbar-hamburger {
        display: flex;
    }

    .app-topbar {
        padding: 0 16px;
    }

    .app-content {
        padding: 16px;
    }

    .topbar-title h1,
    .topbar-title h2 {
        font-size: 16px;
    }

    .topbar-actions .btn-modern .btn-text-hide {
        display: none;
    }

    /* 统计卡片单列 */
    .stats-grid-modern,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-value {
        font-size: 22px;
    }

    .stat-card-modern {
        padding: 16px 14px 14px;
    }

    /* 卡片网格单列 */
    .cards-grid,
    .book-cards-modern,
    .book-cards {
        grid-template-columns: 1fr;
    }

    /* 模态框全宽 */
    .modal-modern {
        padding: 12px;
    }

    .modal-content-modern,
    .modal-content-modern.modal-lg,
    .modal-content-modern.modal-xl {
        max-width: 100%;
    }

    .modal-header-modern,
    .modal-body-modern,
    .modal-footer-modern {
        padding: 16px;
    }

    /* 表格横向滚动 */
    .table-modern-wrap .table-scroll {
        overflow-x: auto;
    }

    /* 顶部操作栏按钮组换行 */
    .topbar-actions {
        gap: 6px;
    }

    /* 筛选区单列 */
    .filters-modern {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-modern .filter-item-modern {
        min-width: 100%;
    }

    .filters-modern .filter-actions-modern {
        margin-left: 0;
        justify-content: stretch;
    }

    .filters-modern .filter-actions-modern .btn-modern {
        flex: 1;
    }

    /* 表单行单列 */
    .form-row-modern {
        grid-template-columns: 1fr;
    }

    /* 记录卡片紧凑 */
    .record-card-modern .record-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .stats-grid-modern,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .app-content {
        padding: 12px;
    }

    .card-modern,
    .card,
    .chart-container,
    .chart-box {
        padding: 16px;
    }

    .btn-modern,
    .btn {
        padding: 9px 14px;
        font-size: 13px;
    }

    .modal-header-modern .modal-title-modern {
        font-size: 15px;
    }

    .modal-footer-modern {
        flex-direction: column-reverse;
    }

    .modal-footer-modern .btn-modern {
        width: 100%;
    }

    .topbar-title .topbar-subtitle {
        display: none;
    }
}

/* ==========================================================================
   25. 打印样式
   ========================================================================== */
@media print {
    .app-sidebar,
    .app-topbar,
    .sidebar-overlay,
    .theme-switch,
    .topbar-actions,
    .btn-modern,
    .btn,
    .pagination-modern,
    .pagination {
        display: none !important;
    }

    .app-main {
        margin-left: 0;
    }

    .app-content {
        padding: 0;
        max-width: 100%;
    }

    .card-modern,
    .card,
    .table-modern-wrap,
    .chart-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ==========================================================================
   End of Modern UI Design System
   ========================================================================== */
