/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.6;
}

/* 暗色主题 */
body.dark-theme {
    background-color: #0b1220;
    color: #cbd5e1;
}

body.dark-theme .header,
body.dark-theme .sidebar,
body.dark-theme .filters,
body.dark-theme .analysis-toolbar,
body.dark-theme .table-container,
body.dark-theme .grade-table-section,
body.dark-theme .report-filters,
body.dark-theme .report-preview,
body.dark-theme .settings-container,
body.dark-theme .overview-card,
body.dark-theme .class-card,
body.dark-theme .metric-card,
body.dark-theme .chart-card,
body.dark-theme .activity-section,
body.dark-theme .insights-section {
    background: #0f172a;
    border-color: #1e293b;
}

body.dark-theme .main-content {
    background: #0b1220;
}

body.dark-theme .logo { color: #e2e8f0; }
body.dark-theme .nav-item { color: #94a3b8; }
body.dark-theme .nav-item:hover { background: #0b1220; color: #e2e8f0; }
body.dark-theme .nav-item.active { background: #111b34; color: #93c5fd; border-right-color: #3b82f6; }

body.dark-theme li.nav-item { color: #94a3b8; }
body.dark-theme li.nav-item:hover { background: #0b1220; color: #e2e8f0; }
body.dark-theme li.nav-item.active { background: #111b34; color: #93c5fd; border-right-color: #3b82f6; }

/* 深色主题下的li元素美化样式 */
body.dark-theme li {
    background: rgba(15, 23, 42, 0.5);
}

body.dark-theme li:hover {
    background: linear-gradient(90deg, rgba(76, 121, 255, 0.2) 0%, rgba(76, 121, 255, 0.1) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-theme li:hover:before {
    background: #93c5fd;
}

body.dark-theme li.active {
    background: linear-gradient(90deg, rgba(76, 121, 255, 0.3) 0%, rgba(76, 121, 255, 0.15) 100%);
    box-shadow: 0 2px 12px rgba(76, 121, 255, 0.25);
}

body.dark-theme li.active:before {
    background: #93c5fd;
}

body.dark-theme li:before {
    background: transparent;
}

body.dark-theme .search-box input { background: #0b1220; border-color: #1e293b; color: #e2e8f0; }
body.dark-theme .search-box i { color: #94a3b8; }

body.dark-theme .btn-secondary { background: #0b1220; color: #cbd5e1; border-color: #1e293b; }
body.dark-theme .btn-secondary:hover { background: #111b34; color: #e2e8f0; }
body.dark-theme .btn-small { background: #0b1220; color: #cbd5e1; border-color: #1e293b; }

body.dark-theme .data-table th { background: #0b1220; border-color: #1e293b; color: #e2e8f0; }
body.dark-theme .data-table td { border-color: #111b34; }
body.dark-theme .data-table tr:hover { background: #0b1220; }
body.dark-theme .data-table tr.selected { background: #0b2440; }

body.dark-theme .section-header h3,
body.dark-theme .chart-header h3,
body.dark-theme .page-header h1,
body.dark-theme .setting-panel h3 { color: #e2e8f0; }

body.dark-theme .view-all { color: #93c5fd; }
body.dark-theme .activity-item:hover { background: #0b1220; }
body.dark-theme .overview-item,
body.dark-theme .suggestion-item,
body.dark-theme .user-table,
body.dark-theme .backup-controls,
body.dark-theme .backup-item,
body.dark-theme .info-item,
body.dark-theme .overview-label,
body.dark-theme .stat-change.neutral {
    background: #0b1220;
    color: #cbd5e1;
    border-color: #1e293b;
}

body.dark-theme .stat-content h3,
body.dark-theme .stat-value,
body.dark-theme .overview-value,
body.dark-theme .stat-label,
body.dark-theme .info-item span { color: #e2e8f0; }

body.dark-theme .theme-toggle:hover { background: #111b34; color: #e2e8f0; }

/* 顶部导航栏 */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    width: 36px;
    height: 36px;
    display: none;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.menu-toggle:hover { background: #f1f5f9; color: #1e293b; }

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.logo i {
    color: #4c79ff;
    margin-right: 12px;
    font-size: 24px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    transition: background-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: #64748b;
}

.search-box input {
    padding: 8px 12px 8px 36px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 300px;
    font-size: 14px;
    background: #f8fafc;
}

.search-box input:focus {
    outline: none;
    border-color: #4c79ff;
    background: #ffffff;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.notifications i {
    font-size: 20px;
    color: #64748b;
}

.notifications .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.user-profile:hover {
    background: #f1f5f9;
}

.user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-profile span {
    font-weight: 500;
}

.user-profile i {
    color: #64748b;
    font-size: 12px;
}

/* 主容器 */
.main-container {
    display: flex;
    margin-top: 64px;
    min-height: calc(100vh - 64px);
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    padding: 24px 0;
    position: fixed;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.nav-menu ul {
    list-style: none;
}

/* 通用列表项样式 */
li {
    list-style: none;
    padding: 10px 15px;
    margin: 5px 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 6px;
    position: relative;
    cursor: pointer;
}

li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    border-radius: 0 3px 3px 0;
    transition: all 0.3s ease;
}

li:hover {
    background: linear-gradient(90deg, rgba(76, 121, 255, 0.1) 0%, rgba(76, 121, 255, 0.05) 100%);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

li:hover:before {
    background: #4c79ff;
}

li.active {
    background: linear-gradient(90deg, rgba(76, 121, 255, 0.2) 0%, rgba(76, 121, 255, 0.1) 100%);
    box-shadow: 0 2px 12px rgba(76, 121, 255, 0.15);
}

li.active:before {
    background: #4c79ff;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
    font-weight: 500;
}

.nav-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.nav-item.active {
    background: #eff6ff;
    color: #4c79ff;
    border-right: 3px solid #4c79ff;
}

.nav-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 24px;
    background: #f8fafc;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1e293b;
}

.page-actions {
    display: flex;
    gap: 12px;
}

/* 按钮样式 */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: #4c79ff;
    color: white;
}

.btn-primary:hover {
    background: #3b66f6;
}

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #475569;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-small.active {
    background: #4c79ff;
    color: white;
    border-color: #4c79ff;
}

.btn-icon {
    padding: 8px;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.btn-page {
    padding: 8px 16px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
}

.btn-page:hover:not(:disabled) {
    background: #e2e8f0;
}

.btn-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    background: linear-gradient(135deg, #4c79ff, #6366f1);
}

.stat-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.stat-content p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.stat-change.positive {
    background: #dcfce7;
    color: #16a34a;
}

.stat-change.negative {
    background: #fef2f2;
    color: #dc2626;
}

.stat-change.neutral {
    background: #f1f5f9;
    color: #64748b;
}

/* 图表区域 */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-container {
    height: 300px;
    position: relative;
}

/* 活动列表 */
.activity-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.view-all {
    color: #4c79ff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.activity-item:hover {
    background: #f8fafc;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4c79ff;
    flex-shrink: 0;
}

.activity-content p {
    margin-bottom: 4px;
    color: #1e293b;
}

.activity-time {
    font-size: 12px;
    color: #64748b;
}

/* 筛选器 */
.filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #4c79ff;
}

.search-filter {
    display: flex;
    gap: 8px;
    align-items: end;
}

.search-filter input {
    width: 250px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

/* 表格样式 */
.table-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8fafc;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

/* 表头排序指示 */
.data-table th.th-sort-asc::after {
    content: ' ▲';
    color: #4c79ff;
    font-size: 12px;
}
.data-table th.th-sort-desc::after {
    content: ' ▼';
    color: #4c79ff;
    font-size: 12px;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.data-table tr:hover {
    background: #f8fafc;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status.active {
    background: #dcfce7;
    color: #16a34a;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.page-info {
    color: #64748b;
    font-size: 14px;
}

/* 成绩分析页面 */
.analysis-toolbar {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.toolbar-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.toolbar-group select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.grade-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
    min-width: 120px;
    flex: 1;
}

.stat-item h4 {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.grade-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.grade-table-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px;
}

.table-actions {
    display: flex;
    gap: 12px;
}

/* 报告页面 */
.report-filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.report-preview {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 32px;
}

.report-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 20px;
    margin-bottom: 32px;
}

.report-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.report-meta {
    display: flex;
    gap: 24px;
    color: #64748b;
    font-size: 14px;
}

.report-section {
    margin-bottom: 32px;
}

.report-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.overview-item {
    text-align: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.overview-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.overview-value {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.radar-chart-container {
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.suggestions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.suggestion-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.suggestion-subject {
    font-weight: 600;
    color: #4c79ff;
    min-width: 60px;
}

.suggestion-content p {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.report-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

/* 占位符样式 */
.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #cbd5e1;
}

.placeholder h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #475569;
}

.placeholder p {
    text-align: center;
    max-width: 400px;
}

/* 选择器样式 */
.semester-select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #374151;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .grade-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    .sidebar.open { transform: translateX(0); }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-right .search-box {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .search-filter {
        flex-direction: column;
    }
    
    .search-filter input {
        width: 100%;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page.active {
    animation: fadeIn 0.3s ease-out;
}

/* 表单元素样式 */
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: #4c79ff;
    box-shadow: 0 0 0 3px rgba(76, 121, 255, 0.1);
}

/* 复选框样式 */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #4c79ff;
}

/* 工具提示 */
[title] {
    position: relative;
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e2e8f0;
    border-top-color: #4c79ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 教师管理页面样式 */
.teacher-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.teacher-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.teacher-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* 班级管理页面样式 */
.class-overview {
    margin-bottom: 32px;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.overview-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.grade-badge {
    background: #eff6ff;
    color: #4c79ff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.class-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    transition: all 0.2s;
}

.class-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.class-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.class-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.class-type {
    background: #f0fdf4;
    color: #16a34a;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.class-info {
    margin-bottom: 16px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #64748b;
}

.info-item i {
    width: 16px;
    color: #4c79ff;
}

.class-actions {
    display: flex;
    gap: 8px;
}

/* 数据分析页面样式 */
.analysis-controls {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.control-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.control-group select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.key-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    background: linear-gradient(135deg, #4c79ff, #6366f1);
    flex-shrink: 0;
}

.metric-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #4c79ff;
    display: block;
    margin-bottom: 4px;
}

.metric-desc {
    font-size: 12px;
    color: #64748b;
}

.analytics-charts {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card.large {
    grid-column: span 3;
}

.chart-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.heatmap-container {
    padding: 20px;
}

.heatmap-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.heatmap-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.row-label {
    width: 60px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.heatmap-cell {
    flex: 1;
    padding: 8px;
    text-align: center;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

.heatmap-cell:hover {
    transform: scale(1.05);
}

.heatmap-cell.very-high {
    background: #059669;
}

.heatmap-cell.high {
    background: #10b981;
}

.heatmap-cell.medium {
    background: #f59e0b;
}

.heatmap-cell.low {
    background: #ef4444;
}

.heatmap-cell.very-low {
    background: #dc2626;
}

.heatmap-cell.critical {
    background: #991b1b;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-size: 12px;
    color: #64748b;
}

.legend-gradient {
    width: 100px;
    height: 8px;
    background: linear-gradient(to right, #ef4444, #f59e0b, #10b981);
    border-radius: 4px;
}

.ability-analysis {
    padding: 20px;
}

.ability-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.ability-label {
    width: 80px;
    font-size: 14px;
    color: #374151;
}

.ability-bar {
    flex: 1;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.ability-progress {
    height: 100%;
    background: linear-gradient(to right, #4c79ff, #6366f1);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.ability-score {
    width: 40px;
    text-align: right;
    font-size: 14px;
    font-weight: 500;
    color: #4c79ff;
}

.insights-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px;
}

.insights-badge {
    background: linear-gradient(135deg, #4c79ff, #6366f1);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.insight-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid transparent;
}

.insight-card:nth-child(1) {
    border-left-color: #10b981;
}

.insight-card:nth-child(2) {
    border-left-color: #f59e0b;
}

.insight-card:nth-child(3) {
    border-left-color: #4c79ff;
}

.insight-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.insight-icon.success {
    background: #10b981;
}

.insight-icon.warning {
    background: #f59e0b;
}

.insight-icon.info {
    background: #4c79ff;
}

.insight-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.insight-content p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

/* 系统设置页面样式 */
.settings-container {
    display: flex;
    gap: 24px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.settings-nav {
    width: 250px;
    background: #f8fafc;
    padding: 20px 0;
    border-right: 1px solid #e2e8f0;
}

.settings-nav .nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
    font-weight: 500;
}

.settings-nav .nav-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.settings-nav .nav-item.active {
    background: #eff6ff;
    color: #4c79ff;
    border-right: 3px solid #4c79ff;
}

.settings-nav .nav-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.settings-content {
    flex: 1;
    padding: 24px;
}

.setting-panel {
    display: none;
}

.setting-panel.active {
    display: block;
}

.setting-panel h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #4c79ff;
    box-shadow: 0 0 0 3px rgba(76, 121, 255, 0.1);
}

.user-management {
    margin-top: 20px;
}

.user-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.user-table {
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
}

.role-badge {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.role-badge.admin {
    background: #fef2f2;
    color: #dc2626;
}

.role-badge.teacher {
    background: #eff6ff;
    color: #4c79ff;
}

.permission-matrix {
    margin-top: 20px;
}

.permission-header {
    margin-bottom: 16px;
}

.permission-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.permission-table {
    width: 100%;
    border-collapse: collapse;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
}

.permission-table th,
.permission-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.permission-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: #374151;
}

.permission-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.backup-section {
    margin-top: 20px;
}

.backup-controls {
    display: flex;
    gap: 20px;
    align-items: end;
    margin-bottom: 32px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
}

.backup-history h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.backup-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.backup-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.backup-name {
    font-weight: 500;
    color: #1e293b;
}

.backup-time {
    font-size: 12px;
    color: #64748b;
}

.backup-actions {
    display: flex;
    gap: 8px;
}

.notification-settings {
    margin-top: 20px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4c79ff;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.setting-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.setting-info p {
    font-size: 14px;
    color: #64748b;
}

.system-info {
    margin-top: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.info-item label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 0;
}

.info-item span {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.status-indicator {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.status-indicator.online {
    background: #dcfce7;
    color: #16a34a;
}

.system-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 表格行选择样式 */
.data-table tr.selected {
    background-color: #eff6ff;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .analytics-charts {
        grid-template-columns: 1fr;
    }
    
    .chart-card.large {
        grid-column: span 1;
    }
    
    .settings-container {
        flex-direction: column;
    }
    
    .settings-nav {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 0;
    }
    
    .settings-nav .nav-item {
        white-space: nowrap;
        border-right: none;
        border-bottom: 3px solid transparent;
    }
    
    .settings-nav .nav-item.active {
        border-right: none;
        border-bottom-color: #4c79ff;
    }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    .overview-cards {
        grid-template-columns: 1fr;
    }
    
    .class-grid {
        grid-template-columns: 1fr;
    }
    
    .key-metrics {
        grid-template-columns: 1fr;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .backup-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}