/* 新版管理后台样式 - 全屏布局 - demo3.html 风格 */

/* 基础变量 */
:root {
    --primary: #6B46C1;
    --primary-light: #7C6FC7;
    --primary-dark: #553C9A;
    --primary-bg: #F5F0FF;
    --primary-bg-hover: #EDE9FC;
    
    --bg-body: #F5F0FF;
    --bg-white: #FFFFFF;
    --bg-gray: #F8FAFC;
    --bg-gray-200: #E2E8F0;
    
    --text-primary: #2D3748;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    --text-light: #A0AEC0;
    
    --border-color: #E2E8F0;
    
    --sidebar-width: 260px;
    --header-height: 56px;
    
    --success: #48BB78;
    --info: #4299E1;
    --warning: #ED8936;
    --purple: #9F7AEA;
    --danger: #E53E3E;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E0;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #A0AEC0;
}

/* 基础重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
}

/* 全屏页面容器 */
.page-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    overflow: hidden;
}

/* 顶部头部 - 全屏 */
.page-header {
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    padding: 8px;
    border-radius: 8px;
}

.header-icon:hover {
    background: var(--bg-gray);
    color: var(--primary);
}

.notification-badge {
    position: relative;
}

.notification-badge::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid var(--bg-white);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.user-info:hover {
    background: var(--bg-gray);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 主体区域 - 全屏 */
.page-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 侧边栏 - 全屏 */
.page-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

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

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

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.sidebar-logo-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

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

.nav-group-label {
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 二级分类样式 - 与二级菜单项风格完全一致 */
.nav-sub-group {
    margin: 4px 0;
}
.nav-sub-label {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-sub-label .nav-icon {
    width: 20px !important;
    height: 20px !important;
}
.nav-sub-label .nav-icon svg {
    width: 18px !important;
    height: 18px !important;
}
/* 可点击的二级分类标签 */
.nav-sub-clickable {
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    transition: all 0.2s;
}
.nav-sub-clickable:hover {
    color: var(--primary-color) !important;
    background: var(--hover-bg);
}
.nav-item-sub {
    padding: 10px 20px !important;
    font-size: 14px !important;
}
.nav-item-sub .nav-icon {
    width: 20px !important;
    height: 20px !important;
}
.nav-sub-group > .nav-item-sub {
    margin: 2px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    gap: 12px;
    transition: all 0.15s;
    cursor: pointer;
    font-size: 14px;
    border-left: 3px solid transparent;
    margin: 2px 0;
}

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

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

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-item .nav-icon svg {
    width: 18px;
    height: 18px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.sidebar-card {
    background: var(--bg-gray);
    padding: 12px;
    border-radius: 8px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-logout {
    display: block;
    margin-top: 12px;
    padding: 10px;
    background: var(--bg-gray);
    border-radius: 8px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #FEE2E2;
    color: var(--danger);
}

/* 内容区域 - 全屏自适应 */
.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-body);
}

.content-toolbar {
    padding: 12px 24px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.toolbar-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.toolbar-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.content-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* 卡片 */
.card {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card + .card {
    margin-top: 16px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

.card-list {
    display: flex;
    flex-direction: column;
}

.list-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.list-item:last-child {
    border-bottom: none;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    gap: 6px;
    white-space: nowrap;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #38A169;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #DD6B20;
}

.btn-info {
    background: #3182CE;
    color: white;
}

.btn-info:hover {
    background: #2B6CB0;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #C53030;
}

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

.btn-icon {
    padding: 8px;
}

.btn-icon-only {
    padding: 6px;
}

/* 输入框 */
.input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--bg-white);
}

.input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

.input-search {
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    padding-left: 36px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
}

/* 选择框 */
.select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: var(--bg-white);
    cursor: pointer;
    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='%23718096' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.2s;
}

.select:focus {
    border-color: var(--primary);
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* 表格 */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-gray);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.table tbody tr {
    transition: background 0.15s;
}

.table tbody tr:hover {
    background: var(--primary-bg);
}

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

/* 徽章 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: var(--primary-bg);
    color: var(--primary);
}

.badge-success {
    background: #C6F6D5;
    color: #276749;
}

.badge-warning {
    background: #FEEBC8;
    color: #C05621;
}

.badge-danger {
    background: #FED7D7;
    color: #C53030;
}

.badge-info {
    background: #BEE3F8;
    color: #2B6CB0;
}

.badge-gray {
    background: var(--bg-gray);
    color: var(--text-secondary);
}

/* 状态指示器 */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.success { background: var(--success); }
.status-dot.warning { background: var(--warning); }
.status-dot.danger { background: var(--danger); }
.status-dot.info { background: var(--info); }

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar .select,
.filter-bar .input {
    min-width: 140px;
}

/* 分页 */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    padding: 16px 0;
}

.page-item {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
}

.page-item:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 12px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 2000;
    animation: slideIn 0.3s ease;
    font-size: 14px;
}

.toast-success {
    background: #C6F6D5;
    color: #276749;
    border: 1px solid #9AE6B4;
}

.toast-error {
    background: #FED7D7;
    color: #C53030;
    border: 1px solid #FEB2B2;
}

.toast-warning {
    background: #FEEBC8;
    color: #C05621;
    border: 1px solid #FBD38D;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 14px;
}

/* 加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--text-muted);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 统计卡片 */
.stat-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.primary { background: var(--primary-bg); color: var(--primary); }
.stat-icon.success { background: #C6F6D5; color: var(--success); }
.stat-icon.warning { background: #FEEBC8; color: var(--warning); }
.stat-icon.info { background: #BEE3F8; color: var(--info); }
.stat-icon.purple { background: #E9D8FD; color: var(--purple); }
.stat-icon.danger { background: #FED7D7; color: var(--danger); }

.stat-info h4 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-muted);
}

/* 网格布局 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-gray);
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.tab-item {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.tab-item:hover {
    color: var(--primary);
}

.tab-item.active {
    background: var(--bg-white);
    color: var(--primary);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 搜索框 */
.search-input {
    width: 260px;
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
}

/* 列表卡片 */
.list-card {
    background: var(--bg-white);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.15s;
}

.list-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.list-card.info { border-left-color: var(--info); }
.list-card.success { border-left-color: var(--success); }
.list-card.warning { border-left-color: var(--warning); }
.list-card.purple { border-left-color: var(--purple); }

/* 进度条 */
.progress {
    height: 8px;
    background: var(--bg-gray);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s;
}

/* 标签 */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-gray);
    color: var(--text-secondary);
}

.tag-primary {
    background: var(--primary-bg);
    color: var(--primary);
}

/* 工具提示 */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: var(--text-primary);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 图表容器 */
/* .chart-container 已统一在下方第1094行定义 */

/* 响应式 - 移动端 */
@media (max-width: 1024px) {
    .page-sidebar {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        z-index: 99;
        transition: left 0.3s;
    }
    
    .page-sidebar.show {
        left: 0;
    }
    
    .content-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        width: 100%;
    }
    
    .filter-bar {
        width: 100%;
    }
    
    .filter-bar .select,
    .filter-bar .input {
        flex: 1;
        min-width: auto;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .page-header {
        padding: 0 16px;
    }
    
    .content-main {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table th,
    .table td {
        padding: 10px 12px;
    }
}

/* 图表容器限制 - 更严格的尺寸控制 */
.chart-container {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.chart-wrapper {
    position: relative;
    height: 400px;
    width: 100%;
}

/* 饼图和环形图尺寸限制 */
.chart-wrapper[data-chart-type="pie"],
.chart-wrapper[data-chart-type="doughnut"] {
    height: 360px;
}

/* 员工信息表格 - 固定列宽 */
.table-card { overflow: hidden; }
.emp-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.emp-table th,
.emp-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.emp-table th {
    background: var(--bg-gray);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
}
.emp-table tbody tr:hover { background: var(--primary-bg); }
.emp-table tbody tr:last-child td { border-bottom: none; }
.emp-table td:last-child { text-align: center; }

/* 分析页面通用样式 */
.analysis-container {
    padding: 0;
}

.filter-panel {
    background: white;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.filter-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-item input,
.filter-item select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.stat-card {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.stat-card.success { border-left-color: var(--success); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.danger { border-left-color: var(--danger); }
.stat-card.info { border-left-color: var(--info); }

.stat-title {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-subtitle {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 4px;
}

.stat-trend {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.stat-trend.up {
    background: #C6F6D5;
    color: #276749;
}

.stat-trend.down {
    background: #FED7D7;
    color: #C53030;
}

.table-container {
    overflow-x: auto;
}

.analysis-table {
    width: 100%;
    border-collapse: collapse;
}

.analysis-table th,
.analysis-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.analysis-table th {
    background: var(--bg-gray);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

/* ==================== 人事管理页面专用样式 ==================== */

/* 页面标题栏（content-main 内的） */
.page-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}
.page-header-custom h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.page-header-custom p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

/* 部门管理 - 左右分栏 */
.dept-employees {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 16px;
    align-items: start;
}
.dept-list,
.employee-list {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}
.employee-list h3 {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--text-primary);
}
.dept-table,
.employee-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.dept-table th,
.dept-table td,
.employee-table th,
.employee-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.dept-table th,
.employee-table th {
    background: var(--bg-gray);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
}
.dept-table tbody tr,
.employee-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}
.dept-table tbody tr:hover,
.employee-table tbody tr:hover {
    background: var(--primary-bg);
}
.dept-table tbody tr.selected {
    background: var(--primary-bg);
}
.dept-table tbody tr:last-child td,
.employee-table tbody tr:last-child td {
    border-bottom: none;
}
.empty-tip {
    text-align: center;
    color: var(--text-muted);
    padding: 24px 0;
    font-size: 13px;
}
.linked-badge,
.unlinked-badge {
    display: inline-flex;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.linked-badge {
    background: #dcfce7;
    color: #15803d;
}
.unlinked-badge {
    background: #fef9c3;
    color: #a16207;
}

/* 账号管理表格 */
.user-table {
    width: 100%;
    border-collapse: collapse;
}
.user-table th,
.user-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-size: 13px;
}
.user-table th {
    background: var(--bg-gray);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
}
.user-table tbody tr:hover {
    background: var(--primary-bg);
}
.user-table tbody tr:last-child td {
    border-bottom: none;
}
.badge-super { background: #f5f3ff; color: #7c3aed; }
.badge-employee { background: #ecfdf5; color: #15803d; }
.badge-admin { background: #eff6ff; color: #2563eb; }
.badge-disabled { background: var(--bg-gray); color: var(--text-muted); }
.badge-male { background: #eff6ff; color: #2563eb; }
.badge-female { background: #fdf2f8; color: #db2777; }
.badge-hg { background: #eef2ff; color: #4f46e5; }
.badge-qy { background: #f0fdf4; color: #15803d; }

/* 员工信息分析 */
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.dist-chart {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}
.dist-chart h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.dist-row-wrap { margin-bottom: 8px; }
.dist-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 3px;
}
.dist-label {
    width: 80px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.dist-bar-bg {
    flex: 1;
    height: 8px;
    background: var(--bg-gray);
    border-radius: 4px;
    overflow: hidden;
}
.dist-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}
.dist-count {
    width: 38px;
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.dist-names {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 90px;
    margin-bottom: 4px;
}
.stat-mini {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.stat-mini .val {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.stat-mini .label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 员工信息筛选栏 */
.filters {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.filters select,
.filters input {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    background: var(--bg-white);
}

/* 员工详情弹窗 */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-bottom: 16px;
}
.detail-item {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color);
}
.dlabel {
    font-size: 12px;
    color: var(--text-muted);
    width: 80px;
    flex-shrink: 0;
}
.dvalue {
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-all;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}
.form-group {
    margin-bottom: 12px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}
.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    box-sizing: border-box;
    background: var(--bg-white);
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}
.form-full { grid-column: 1 / -1; }
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center !important;
    padding-top: 0;
}
.modal-overlay.active { display: flex; }
.modal-overlay .modal {
    background: var(--bg-white);
    border-radius: 14px;
    padding: 24px;
    width: 540px;
    max-width: 95vw;
    max-height: 80vh;
    overflow-y: auto;
    display: block;
    margin: auto;
}
.modal-overlay .modal h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 16px;
}
.modal-overlay .modal .btn { border-radius: 8px; padding: 8px 16px; font-size: 13px; }

/* 个人信息页 */
.no-data {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.no-data .icon { font-size: 48px; margin-bottom: 16px; }
.no-data h3 { font-size: 16px; font-weight: 600; margin: 0 0 8px; color: var(--text-primary); }
.no-data p { font-size: 13px; margin: 0; }
.profile-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}
.profile-banner {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    padding: 28px 24px 24px;
    color: #fff;
    text-align: center;
}
.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 12px;
    border: 3px solid rgba(255,255,255,0.4);
}
.profile-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}
.profile-sub {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 12px;
}
.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.ptag {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
}
.profile-body { padding: 20px 24px; }
.profile-body .section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 20px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.profile-body .section-title:first-child { margin-top: 0; }
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}
.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}
.info-full { grid-column: 1 / -1; }
.info-label { color: var(--text-muted); }
.info-value { color: var(--text-primary); font-weight: 500; text-align: right; }

@media (max-width: 900px) {
    .dept-employees { grid-template-columns: 1fr; }
    .analysis-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
}

/* ==================== KPI 统计报表页面样式 ==================== */
.content-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; }
.summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.summary-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
}
.summary-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
}
.summary-value.text-green { color: var(--success); }
.summary-value.text-red { color: var(--danger); }
.summary-label {
    font-size: 13px;
    color: var(--text-muted);
}
.trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 16px 8px;
    min-height: 200px;
    flex-wrap: wrap;
}
.trend-bar {
    flex: 1;
    min-width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.trend-bar .value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.trend-bar .bar {
    width: 32px;
    background: linear-gradient(180deg, #6366f1, #818cf8);
    border-radius: 6px 6px 0 0;
    min-height: 4px;
    transition: height 0.4s ease;
}
.trend-bar .label {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==================== 权限管理页面样式 ==================== */

/* 权限组列表样式 */
.perm-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 20px 24px;
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.perm-group-list {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.perm-group-list table {
    width: 100%;
    border-collapse: collapse;
}

.perm-group-list thead {
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    color: white;
}

.perm-group-list th {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.perm-group-list td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.perm-group-list tbody tr:hover {
    background: var(--primary-bg);
}

.perm-group-list tbody tr:last-child td {
    border-bottom: none;
}

.perm-count-badge {
    background: var(--primary-bg);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* 部门权限卡片样式 */
.dept-perm-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.dept-perm-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.1);
}

.dept-perm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

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

.dept-perm-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

.dept-perm-value {
    font-size: 13px;
    color: var(--text-muted);
}

.dept-perm-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    min-width: 180px;
    background: var(--bg-white);
    cursor: pointer;
}

.dept-perm-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* 用户权限选择器样式 */
.user-perm-selector {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}

.user-perm-selector .user-info-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.user-perm-selector select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
    background: var(--bg-white);
}

.quick-actions {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.quick-action-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-white);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

/* 权限网格样式 */
.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.perm-grid::-webkit-scrollbar {
    width: 8px;
}

.perm-grid::-webkit-scrollbar-track {
    background: var(--bg-gray);
    border-radius: 4px;
}

.perm-grid::-webkit-scrollbar-thumb {
    background: #CBD5E0;
    border-radius: 4px;
}

.perm-grid::-webkit-scrollbar-thumb:hover {
    background: #A0AEC0;
}

.perm-group-box {
    background: var(--bg-gray);
    border-radius: 10px;
    padding: 14px;
    border: 1px solid var(--border-color);
}

.perm-group-box .perm-group-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.perm-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
    padding: 4px;
}

.perm-items::-webkit-scrollbar {
    width: 6px;
}

.perm-items::-webkit-scrollbar-track {
    background: var(--bg-gray);
    border-radius: 3px;
}

.perm-items::-webkit-scrollbar-thumb {
    background: #CBD5E0;
    border-radius: 3px;
}

.perm-items::-webkit-scrollbar-thumb:hover {
    background: #A0AEC0;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.perm-item:hover {
    border-color: var(--primary);
}

.perm-item.checked {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

/* 权限组编辑弹窗中的 checkbox 需要显示 */
#groupModal .perm-item input {
    display: inline-block !important;
    width: 15px !important;
    height: 15px !important;
    margin: 0 6px 0 0 !important;
    cursor: pointer !important;
}

.perm-item input {
    display: none;
}

/* 用户权限项样式 */
.user-perm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.15s;
}

.user-perm-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.1);
}

.user-perm-item.effective {
    border-left: 3px solid var(--success);
}

.user-perm-item.denied {
    background: #fef2f2;
    opacity: 0.7;
}

.user-perm-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.perm-source {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.perm-source.dept { background: #e0e7ff; color: #4338ca; }
.perm-source.grant { background: #dcfce7; color: #15803d; }
.perm-source.deny { background: #fee2e2; color: #dc2626; }
.perm-source.super { background: #f5f3ff; color: #7c3aed; }
.perm-source.none { background: var(--bg-gray); color: var(--text-muted); }

.user-perm-actions {
    display: flex;
    gap: 4px;
}

.user-perm-actions button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-white);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}

.user-perm-actions button:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
}

.user-perm-actions button.active-grant {
    background: #dcfce7;
    border-color: var(--success);
}

.user-perm-actions button.active-inherit {
    background: #e0e7ff;
    border-color: var(--primary);
}

.user-perm-actions button.active-deny {
    background: #fee2e2;
    border-color: var(--danger);
}

/* 权限组编辑弹窗优化 */
#groupModal .modal {
    max-width: 600px;
    padding: 28px;
}

#groupModal .modal h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

#groupModal .form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

#groupModal .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

.select-all-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.quick-btn {
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-white);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.quick-btn:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

/* 操作按钮样式 */
.btn-icon-edit {
    padding: 6px 12px;
    background: var(--primary-bg);
    color: var(--primary);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-icon-edit:hover {
    background: var(--primary);
    color: white;
}

.btn-icon-delete {
    padding: 6px 12px;
    background: #fee2e2;
    color: var(--danger);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    margin-left: 6px;
}

.btn-icon-delete:hover {
    background: var(--danger);
    color: white;
}

/* 说明文字样式 */
.perm-hint {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--bg-gray);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.perm-hint .hint-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 空状态 */
.perm-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.perm-empty .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.perm-empty p {
    font-size: 14px;
    margin-top: 8px;
}

/* 响应式 */
@media (max-width: 768px) {
    .perm-group-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .perm-grid {
        grid-template-columns: 1fr;
    }
    
    .user-perm-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .user-perm-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* 部门权限表格样式 */
.dept-perm-table {
    width: 100%;
    border-collapse: collapse;
}

.dept-perm-table th {
    background: var(--bg-gray);
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.dept-perm-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.dept-perm-table tbody tr:hover {
    background: var(--primary-bg);
}

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

/* 权限组列表表格样式 */
.perm-group-list {
    width: 100%;
    border-collapse: collapse;
}

.perm-group-list thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.perm-group-list td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.perm-group-list tbody tr:hover {
    background: var(--primary-bg);
}

.perm-group-list tbody tr:last-child td {
    border-bottom: none;
}

/* --- 移动端自适应 (Mobile Responsive Styling) --- */
@media (max-width: 768px) {
    /* 侧边栏转换为抽屉模式 */
    .page-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    }
    
    .page-sidebar.show {
        transform: translateX(0);
    }
    
    /* 头部适配 */
    .page-header {
        padding: 0 16px;
    }
    
    /* 显示菜单汉堡按钮 */
    #menuToggle {
        display: block !important;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 8px;
        color: var(--text-secondary);
    }
    
    .header-icon {
        padding: 4px;
    }
    
    .header-title {
        font-size: 15px;
    }
    
    .user-info {
        padding: 4px;
    }
    
    .user-name {
        display: none;
    }
    
    /* 工具栏伸集 */
    .content-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .toolbar-right {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* 内容区适配 */
    .content-main {
        padding: 16px;
    }
    
    /* 搜索过滤栏块 */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-bar .select, .filter-bar .input, .filter-bar .btn {
        width: 100%;
    }
    
    .card-header {
        padding: 12px 16px;
    }
    
    /* 表格滚动优化 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        padding: 0;
    }
    
    /* 模态框适配 */
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .stat-card {
        padding: 12px;
    }
}
