/**
 * 学生成绩分析系统 - 主样式文件
 * 注意：其他CSS文件已在HTML中直接引用，无需@import
 */

/* VIP徽章样式 - 简约矢量风格，无边框 */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    background: transparent;
    border: none;
    animation: vipAppear 0.5s ease-out;
    margin-left: 8px;
}

/* 皇冠图标 - 左侧 */
.vip-badge i {
    font-size: 15px;
    background: linear-gradient(180deg, #F5D67B 0%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
    animation: crownShine 3s ease-in-out infinite;
}

/* VIP文字 - 右侧，加大字号 */
.vip-badge span {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.5px;
    background: linear-gradient(180deg, #F5D67B 0%, #D4AF37 50%, #C5A028 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 皇冠微光动画 */
@keyframes crownShine {
    0%, 100% {
        filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
    }
    50% {
        filter: drop-shadow(0 1px 2px rgba(212, 175, 55, 0.4));
    }
}



@keyframes vipAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 学科详细按钮样式 */
.subject-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

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

/* 可排序表格列标题样式 */
.sortable-header {
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
}

.sortable-header:hover {
    background-color: #e3f2fd !important;
    color: #1976d2 !important;
    transform: scale(1.02);
}

.sortable-header:active {
    transform: scale(0.98);
}

/* 分析标题样式 */
.analysis-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    margin-top: -12px;
    position: relative;
}

.analysis-title .function-buttons-compact {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.title-content {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

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

/* AI 综合分析按钮（右上角） */
.ai-generate-btn-top {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.ai-generate-btn-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ai-generate-btn-top:active {
    transform: translateY(0);
}

.ai-generate-btn-top i {
    font-size: 16px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(-10deg) scale(1.1);
    }

    50% {
        transform: rotate(10deg) scale(1);
    }

    75% {
        transform: rotate(-10deg) scale(1.1);
    }
}

.title-icon {
    font-size: 16px;
    color: #007bff;
    min-width: 16px;
    animation: fadeIn 0.3s ease;
}

.title-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-main {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding-right: 8px;
    border-right: 1px solid rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.title-sub {
    font-size: 13px;
    color: #495057;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}

/* 响应式设计：小屏幕时调整标签样式 */
@media (max-width: 768px) {
    .analysis-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .title-content {
        width: 100%;
        justify-content: flex-start;
    }

    .title-actions {
        width: 100%;
        justify-content: stretch;
    }

    .ai-generate-btn-top {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
    }

    .title-info {
        flex-wrap: wrap;
    }

    .title-sub {
        font-size: 12px;
    }
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 使用更高级的字体栈，Inter 是数字显示的最佳选择 */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    /* macOS字体平滑 */
    -moz-osx-font-smoothing: grayscale;
}

/* 自定义精美滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(160, 174, 192, 0.3);
    border-radius: 3px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(160, 174, 192, 0.6);
}

/* Firefox 滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(160, 174, 192, 0.3) transparent;
}

body {
    background-color: var(--background-color);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    /* 增加行高，提升阅读舒适度 */
}

/* 应用整体布局 */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* 左侧侧边栏样式 - 现代毛玻璃风格 */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.65);
    /* 增加透明度 */
    backdrop-filter: blur(25px) saturate(180%);
    /* 增强毛玻璃效果 */
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    padding: 24px 18px 30px;
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    /* 更通透的边框 */
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
    box-shadow: 8px 0 32px rgba(31, 38, 135, 0.07);
    /* 更高级的投影 */
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    padding: 24px 8px 30px;
}

.sidebar-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 18px;
}

.sidebar-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.4);
    color: #2D3748;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.75);
    color: var(--primary-color);
    box-shadow: 0 8px 16px rgba(78, 91, 240, 0.2);
}

.sidebar-toggle-btn i {
    transition: transform 0.3s ease;
}

/* 默认状态：显示展开图标，隐藏折叠图标 */
.toggle-icon-expanded {
    display: block;
}

.toggle-icon-collapsed {
    display: none;
}

.sidebar-toggle-tooltip {
    font-size: 12px;
    color: #4A5568;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    transition: opacity 0.3s ease, flex 0.3s ease, height 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 14px;
    justify-content: center;
}

.sidebar.collapsed .toggle-icon-expanded {
    display: none;
}

.sidebar.collapsed .toggle-icon-collapsed {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* 左对齐 */
    justify-content: center;
    gap: 4px;
    /* 间距 */
    width: 20px;
}

/* 三条杠样式 */
.custom-hamburger span {
    height: 2px;
    background-color: #4A5568;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.custom-hamburger .bar-long {
    width: 100%;
    /* 第一条很长 */
}

.custom-hamburger .bar-short {
    width: 60%;
    /* 第二、三条短一点 */
}

/* 悬停效果 */
.sidebar-toggle-btn:hover .custom-hamburger span {
    background-color: var(--primary-color);
}

.sidebar.collapsed .sidebar-toggle-tooltip {
    display: none;
}

.sidebar.collapsed .sidebar-content {
    opacity: 0;
    flex: 0;
    height: 0;
    pointer-events: none;
}

.sidebar.collapsed .sidebar-btn {
    justify-content: center;
}

.sidebar.collapsed .sidebar-btn .sidebar-btn-text {
    display: none;
}

.sidebar-title {
    font-size: 12px;
    font-weight: 800;
    /* 加粗 */
    color: #2D3748;
    /* 加深颜色，更清晰 */
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    /* 增加字间距 */
    padding-left: 12px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    /* 增加文字质感 */
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 12px;
    color: #1A202C;
    /* 加深为深灰色/黑色，提高对比度 */
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    width: 100%;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 6px;
    /* 增加按钮间距 */
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    /* 悬停时白色半透明 */
    color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* 悬停浮起效果 */
}

.sidebar-btn.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
    /* 激活态拟态风格 */
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(78, 91, 240, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    border: none;
    font-weight: 700;
}

.sidebar-btn.active::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 4px;
    background: var(--primary-color);
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(78, 91, 240, 0.6);
}

.sidebar-btn.active:hover {
    transform: none;
}

.sidebar-btn i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
    color: #4A5568;
    /* 图标加深 */
}

.sidebar-btn:hover i,
.sidebar-btn.active i {
    color: var(--primary-color);
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(78, 91, 240, 0.2));
}

.sidebar-subject-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-tools {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.sidebar-cloud-sync {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    padding: 12px 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    margin-top: 6px;
}

.sidebar-cloud-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.sidebar-cloud-status {
    width: 100%;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.sidebar-cloud-meta {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

.sidebar-role-switcher {
    width: 100%;
    background: rgba(255, 255, 255, 0.4);
    /* 增加透明度 */
    backdrop-filter: blur(10px);
    /* 增加毛玻璃效果 */
    border-radius: 12px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.sidebar-role-label {
    font-size: 12px;
    font-weight: 700;
    color: #2D3748;
    /* 加深颜色 */
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.sidebar-select {
    width: 100%;
    border: 1px solid rgba(143, 195, 224, 0.4);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1A202C;
    /* 深色字体 */
    background: rgba(255, 255, 255, 0.7);
    /* 半透明背景 */
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
}

.sidebar-select:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--primary-color);
}

.sidebar-select option {
    color: #1A202C;
    background: white;
}

.sidebar-tool-btn {
    width: 68%;
    justify-content: flex-start;
    min-width: 150px;
}

.sidebar-tool-btn--primary {
    background: transparent;
    color: #1A202C;
    border: none;
    box-shadow: none;
}

.sidebar-tool-btn--primary:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--primary-color);
}

.sidebar-dropdown {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}

.sidebar-dropdown .dropdown-menu {
    width: 68%;
    min-width: 160px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid rgba(143, 195, 224, 0.32);
    color: #1E4A63;
    box-shadow: 0 18px 40px rgba(82, 147, 184, 0.2);
}

.sidebar-dropdown .dropdown-item {
    color: #1E4A63;
    background: transparent;
}

.sidebar-dropdown .dropdown-item:hover {
    background: rgba(169, 205, 226, 0.6);
}

.sidebar-dropdown .dropdown-item:active {
    background: rgba(169, 205, 226, 0.78);
}

.sidebar-dropdown .dropdown-item:not(:last-child) {
    border-bottom: 1px solid rgba(143, 195, 224, 0.28);
}

/* 考试单元侧边栏样式 */
.sidebar-exam-units {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exam-unit-btn-sidebar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(229, 231, 235, 0.6);
    background: rgba(255, 255, 255, 0.4);
    /* 半透明 */
    border-radius: 10px;
    color: #4B5563;
    /* 加深 */
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    backdrop-filter: blur(4px);
}

.exam-unit-btn-sidebar:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #111827;
    border-color: #d1d5db;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.exam-unit-btn-sidebar.active {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #4f46e5 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    font-weight: 700;
}

.exam-unit-btn-sidebar.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.exam-unit-btn-sidebar i {
    font-size: 14px;
    min-width: 14px;
    text-align: center;
    opacity: 0.8;
}

.exam-unit-btn-sidebar.active i {
    opacity: 1;
}

/* 已导入考试列表样式 */
.sidebar-exam-list-section {
    margin-top: 8px;
}

.sidebar-exam-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.sidebar-exam-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(229, 231, 235, 0.6);
    border-radius: 8px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-exam-item:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--primary-color);
}

.sidebar-exam-item.active {
    background: linear-gradient(135deg, rgba(78, 91, 240, 0.1) 0%, rgba(78, 91, 240, 0.05) 100%);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-exam-item-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sidebar-exam-item-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.sidebar-exam-item-meta {
    font-size: 11px;
    color: #6B7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-exam-item-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #9CA3AF;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.sidebar-exam-item-delete:hover {
    background: #FEE2E2;
    color: #EF4444;
}

.sidebar-exam-list-empty {
    text-align: center;
    padding: 16px 12px;
    color: #9CA3AF;
    font-size: 12px;
}

/* 主内容区调整 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    /* 匹配侧边栏宽度 */
    background: var(--background-color);
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed+.main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* 侧边栏过渡效果 */
.sidebar {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

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

/* 现代化品牌卡片样式 */
.modern-brand-card {
    background: none;
    border-radius: 0;
    padding: 20px 0;
    box-shadow: none;
    position: relative;
    overflow: visible;
    border: none;
    backdrop-filter: none;
}

/* 增加微弱的背景光晕 */
.modern-brand-card::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(78, 91, 240, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.brand-card-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: white;
    /* 纯白背景 */
    border-radius: 16px;
    /* 圆角矩形 */
    box-shadow: 0 8px 20px rgba(78, 91, 240, 0.15);
    /* 柔和阴影 */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--primary-color);
    font-size: 24px;
}

.brand-icon:hover {
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 12px 25px rgba(78, 91, 240, 0.25);
}

.brand-text-section {
    flex: 1;
}

.brand-main-title {
    font-size: 32px;
    /* 加大字体 */
    font-weight: 800;
    /* 加粗 */
    background: linear-gradient(135deg, #2D3748 0%, #4E5BF0 50%, #0ABDE3 100%);
    /* 深灰 -> 品牌蓝 -> 青色 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    /* 紧凑一点 */
    position: relative;
}

.brand-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: #A0AEC0;
    letter-spacing: 2px;
    /* 宽间距 */
    text-transform: uppercase;
    /* 全大写 */
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-subtitle::before {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, #4E5BF0, #0ABDE3);
    border-radius: 2px;
}

.brand-bottom-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: none;
    position: relative;
    z-index: 1;
}

.version-info {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    background: none;
    padding: 0;
    border-radius: 0;
    letter-spacing: 0.02em;
}

.author-tag {
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
    background: none;
    padding: 0;
    border: none;
    border-radius: 0;
    letter-spacing: 0.01em;
}

/* 现代化卡片内的subtitle-container样式 */
.modern-brand-card .subtitle-container {
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

.modern-brand-card .subtitle-exam {
    font-size: 13px;
    font-weight: 500;
    color: #8b5cf6;
    background: none;
    padding: 0;
    border-radius: 0;
    border: none;
}

/* 排版样式 */
.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.subtitle-exam {
    color: var(--text-secondary);
    font-size: 12px;
}

.subtitle-version {
    color: #ffffff;
    font-size: 13px;
    margin: 0 8px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #406AFF 0%, #2196F3 100%);
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(64, 106, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.subtitle-version:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #7c8aed 0%, #8458a5 100%);
}

.subtitle-author {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 500;
}

.footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-secondary);
    font-size: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 30px;
}

/* 角色相关样式 */
/* 教务人员模式：隐藏学生级别信息和单科分析内容 */
.admin-mode #single-subject-detail-table-card,
.admin-mode #progressCard,
.admin-mode .student-details-section,
.admin-mode #singleSubjectContainer,
.admin-mode #single-subject-charts-card,
.admin-mode #gradeDistribution,
.admin-mode #examComparison {
    display: none !important;
}

/* 班主任模式：保持默认显示 */
.class-teacher-mode #single-subject-detail-table-card,
.class-teacher-mode #progressCard {
    display: block;
}

/* 任课教师模式：保持默认显示 */
.subject-teacher-mode #single-subject-detail-table-card,
.subject-teacher-mode #progressCard {
    display: block;
}

/* 年级看板样式 */
#adminDashboardContainer {
    padding: 6px 0 0;
}

/* 教务蓝色看板上提：减少与上方区域的空白 */
#selectedGradeInfo.grade-dashboard-container {
    padding-top: 0;
    margin-top: -10px;
}

#classRankingCard,
#subjectComparisonCard {
    margin-bottom: 20px;
}

#subjectComparisonCardComparison {
    margin-bottom: 20px;
}

#subjectComparisonCardComparison .card-body {
    overflow-y: auto;
}

#classRankingTableComparison .comparison-ranking-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(64, 106, 255, 0.12);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

#classRankingTableComparison .comparison-ranking-note__icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #406AFF 0%, #6F7EFC 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(64, 106, 255, 0.22);
}

#classRankingTableComparison .comparison-ranking-note__title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

#classRankingTableComparison .comparison-ranking-note__desc {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}

#classRankingTableComparison .comparison-ranking-table-shell {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

#classRankingTableComparison .comparison-ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

#classRankingTableComparison .comparison-ranking-table thead {
    background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
}

#classRankingTableComparison .comparison-ranking-table th {
    padding: 14px 12px;
    font-size: 12px;
    font-weight: 800;
    color: #334155;
    border-bottom: 1px solid rgba(64, 106, 255, 0.10);
    white-space: nowrap;
}

#classRankingTableComparison .comparison-ranking-th-sub {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
}

#classRankingTableComparison .comparison-ranking-table td {
    padding: 14px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #eef2f7;
}

#classRankingTableComparison .comparison-ranking-table tbody tr {
    transition: background 0.2s ease, transform 0.2s ease;
}

#classRankingTableComparison .comparison-ranking-table tbody tr:hover {
    background: #f8fbff;
}

#classRankingTableComparison .comparison-ranking-table tbody tr.is-first {
    background: linear-gradient(90deg, rgba(64, 106, 255, 0.08) 0%, rgba(64, 106, 255, 0.03) 100%);
}

#classRankingTableComparison .comparison-ranking-table tbody tr.is-second {
    background: linear-gradient(90deg, rgba(111, 126, 252, 0.08) 0%, rgba(111, 126, 252, 0.03) 100%);
}

#classRankingTableComparison .comparison-ranking-table tbody tr.is-third {
    background: linear-gradient(90deg, rgba(91, 140, 255, 0.08) 0%, rgba(91, 140, 255, 0.03) 100%);
}

#classRankingTableComparison .comparison-ranking-table tbody tr:last-child td {
    border-bottom: none;
}

#classRankingTableComparison .comparison-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    color: #334155;
    background: #f1f5f9;
}

#classRankingTableComparison .comparison-rank-badge.is-first {
    color: #fff;
    background: linear-gradient(135deg, #406AFF 0%, #6F7EFC 100%);
    box-shadow: 0 10px 20px rgba(64, 106, 255, 0.24);
}

#classRankingTableComparison .comparison-rank-badge.is-second {
    color: #3157d5;
    background: rgba(64, 106, 255, 0.10);
}

#classRankingTableComparison .comparison-rank-badge.is-third {
    color: #4f46e5;
    background: rgba(111, 126, 252, 0.12);
}

#classRankingTableComparison .comparison-class-cell__name {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

#classRankingTableComparison .comparison-class-cell__meta {
    margin-top: 4px;
    font-size: 11px;
    color: #64748b;
}

#classRankingTableComparison .comparison-ranking-number {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    text-align: center;
    white-space: nowrap;
}

#classRankingTableComparison .comparison-ranking-number.is-average {
    color: #406AFF;
    font-size: 15px;
}

#classRankingTableComparison .comparison-subject-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(64, 106, 255, 0.08);
    color: #3157d5;
    font-size: 12px;
    font-weight: 700;
}

#subjectComparisonChartComparison {
    height: auto !important;
    min-height: 0;
}

/* 教务视角文字总结样式 */
#adminSummaryContent {
    font-size: 18px !important;
    line-height: 2 !important;
    text-align: left !important;
}

#adminSummaryContent strong {
    font-weight: 700;
    color: #333;
    text-shadow: none;
}

#adminSummaryContent .analysis-title {
    font-size: 22px !important;
    font-weight: bold !important;
    margin-bottom: 15px !important;
    color: #333 !important;
    text-shadow: none;
}

/* 学科分析文字增强样式 */
.subject-analysis-text {
    font-size: 18px;
    line-height: 2;
    opacity: 0.95;
}

.subject-analysis-text strong {
    font-weight: 700;
    color: #2c3e50;
}

/* 多年级模式下的学科分析样式 */
.multi-grade-subject-analysis {
    font-size: 17px;
    line-height: 1.8;
    opacity: 0.95;
}

.multi-grade-subject-analysis strong {
    font-weight: 700;
    color: #2c3e50;
}

/* 学科对比图表分页按钮样式 */
#prevSubjectPageBtn:disabled,
#nextSubjectPageBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#prevSubjectPageBtn:not(:disabled):hover,
#nextSubjectPageBtn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#subjectPaginationInfo {
    min-width: 60px;
    text-align: center;
    font-size: 14px;
}

.metric-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

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

/* 排行榜表格增强 */
#classRankingTable .data-table tbody tr:hover {
    background-color: #f5f9ff;
}

#classRankingTable .data-table tbody tr:first-child {
    background-color: #fff7e6;
}

#classRankingTable .data-table tbody tr:nth-child(2) {
    background-color: #f0f7ff;
}

#classRankingTable .data-table tbody tr:nth-child(3) {
    background-color: #fff0f0;
}

/* ==================== 快速导入样式 ==================== */

/* 模式切换标签页 */
.import-mode-tabs {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: #f5f5f5;
    border-radius: 0;
    flex-shrink: 0;
    /* 标签不收缩 */
}

.mode-tab {
    flex: 1;
    padding: 15px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.mode-tab:hover {
    border-color: #406AFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(64, 106, 255, 0.25);
}

.mode-tab.active {
    background: linear-gradient(135deg, #406AFF 0%, #2196F3 100%);
    color: white;
    border-color: #406AFF;
    box-shadow: 0 4px 12px rgba(64, 106, 255, 0.4);
}

.mode-tab i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.mode-tab span {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 16px;
}

.mode-tab small {
    display: block;
    opacity: 0.7;
    font-size: 12px;
}

/* 导入模态框特殊处理 */
#importModal .modal {
    max-height: 85vh;
    overflow: hidden;
    /* 禁用外层滚动条 */
    display: flex;
    flex-direction: column;
    padding: 0;
    /* 移除padding，让子元素自行控制 */
}

#importModal .modal-header {
    padding: 20px 24px;
    flex-shrink: 0;
    border-bottom: 1px solid #e0e0e0;
}

/* 导入面板 */
.import-panel {
    animation: fadeIn 0.3s ease-in;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    /* 重要：允许flex子元素收缩 */
}

.quick-import-container {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    /* 只在内层容器启用滚动 */
    overflow-x: hidden;
    min-height: 0;
    /* 重要：允许滚动 */
}

/* 快速导入的底部按钮区域 */
#quickImportPanel .modal-footer {
    margin-top: 0;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
    flex-shrink: 0;
    /* 按钮区域不收缩 */
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    /* 按钮之间的间距 */
}

/* 高级设置面板的滚动处理 */
#advancedImportPanel {
    overflow-y: auto;
    padding: 20px;
}

.import-section {
    margin-bottom: 25px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    font-size: 15px;
}

.section-title i {
    color: #406AFF;
}

/* 文件输入增强 */
.file-input-enhanced {
    display: block;
    width: 100%;
    padding: 12px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.file-input-enhanced:hover {
    border-color: #406AFF;
    background: #f0f5ff;
}

.file-info-box {
    margin-top: 10px;
}

.multi-file-queue {
    margin-top: 12px;
    border: 1px dashed #b8c6ff;
    border-radius: 10px;
    padding: 12px;
    background: rgba(64, 106, 255, 0.04);
}

.multi-file-queue__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.multi-file-queue__title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.multi-file-queue__stats {
    font-size: 12px;
    color: #6b7cff;
}

.multi-file-queue__list {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #dfe6ff;
    border-radius: 8px;
    background: white;
}

.multi-file-queue__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f4ff;
    font-size: 13px;
}

.multi-file-queue__item:last-child {
    border-bottom: none;
}

.multi-file-queue__item-name {
    flex: 1;
    margin-right: 12px;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-file-queue__badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
}

.multi-file-queue__badge--ready {
    background: #e6f8ef;
    color: #1c7c54;
}

.multi-file-queue__badge--importing {
    background: #fff4e0;
    color: #b35b00;
}

.multi-file-queue__badge--done {
    background: #e6f0ff;
    color: #3b5bdb;
}

.multi-file-queue__badge--error {
    background: #ffe6e6;
    color: #c0392b;
}

.multi-file-queue__item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.multi-file-queue__error {
    font-size: 12px;
    color: #c0392b;
    padding: 0 12px 8px;
}

.multi-file-queue__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    padding: 8px 12px 4px;
}

.multi-file-queue__meta label {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: #4c5d8d;
    gap: 4px;
}

.multi-file-queue__input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d5ddff;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.multi-file-queue__input:focus {
    outline: none;
    border-color: #406AFF;
    box-shadow: 0 0 0 2px rgba(64, 106, 255, 0.15);
}

.multi-file-queue__tip {
    font-size: 12px;
    color: #4c5d8d;
    margin-top: 10px;
    line-height: 1.5;
}

.exam-info-dynamic-card {
    border-left: 4px solid #007bff;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    margin-top: 15px;
}

.exam-info-dynamic-card h5 {
    margin: 0 0 12px 0;
    color: #1d4ed8;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.exam-info-dynamic-message {
    font-size: 13px;
    color: #4c5d8d;
    line-height: 1.6;
    margin: 0;
}

.exam-info-dynamic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.exam-info-dynamic-grid .form-input {
    width: 100%;
}

.exam-info-dynamic-card--loading,
.exam-info-dynamic-card--info {
    border-left-color: #6366f1;
    background: #eef2ff;
}

/* 检测结果网格 */
.detection-box {
    padding: 15px;
    border-radius: 6px;
    background: #fafafa;
}

.detection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detection-item {
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid;
    background: white;
    transition: all 0.3s;
}

.detection-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.detection-item.success {
    background: #e8f5e9;
    border-color: #4caf50;
}

.detection-item.success i {
    color: #4caf50;
}

.detection-item.warning {
    background: #fff3e0;
    border-color: #ff9800;
}

.detection-item.warning i {
    color: #ff9800;
}

.detection-item.error {
    background: #ffebee;
    border-color: #f44336;
}

.detection-item.error i {
    color: #f44336;
}

.detection-item i {
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
}

.detection-item span {
    display: block;
    margin-bottom: 4px;
}

.detection-item small {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

/* 推荐设置框 */
.recommendation-box {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

.recommendation-item {
    padding: 8px 0;
    color: #1565c0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recommendation-item i {
    color: #2196f3;
}

.link-btn {
    background: none;
    border: none;
    color: #2196f3;
    cursor: pointer;
    padding: 8px 0;
    font-size: 14px;
    transition: all 0.2s;
}

.link-btn:hover {
    text-decoration: underline;
    color: #1565c0;
}

/* 预览表格容器 */
.preview-table-container {
    max-height: 300px;
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    background: white;
}

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

.preview-table th {
    background: linear-gradient(135deg, #406AFF 0%, #2196F3 100%);
    color: white;
    padding: 10px;
    text-align: left;
    font-size: 13px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.preview-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.preview-table tbody tr:hover {
    background: #f0f5ff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .import-mode-tabs {
        flex-direction: column;
    }

    .mode-tab {
        width: 100%;
    }

    .detection-grid {
        grid-template-columns: 1fr;
    }

    .quick-import-container {
        padding: 10px;
    }

    #importModal .modal {
        max-height: 90vh;
    }

    #quickImportPanel .modal-footer {
        padding: 10px 15px;
    }
}

/* ==========================================================================
   分数线设置卡片布局样式（优化方案）
   ========================================================================== */

/* 全局设置区域 - 可折叠卡片 */
.global-gradeline-settings {
    background: #ffffff;
    border: 1px solid #e4eaf0;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 20px;
    color: #102a43;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

/* 固定全局设置区域（不滚动） */
.global-gradeline-sticky {
    position: sticky;
    top: 0;
    z-index: 10;
    margin-bottom: 25px;
}

/* 导入弹窗内部使用独立滚动容器，sticky 容易导致滚动发涩 */
#importModal .global-gradeline-sticky {
    position: relative;
    top: auto;
    z-index: auto;
}

/* 全局设置卡片头部 */
.global-gradeline-settings .card-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    border-bottom: 1px solid #e0e8ef;
    margin: 0;
}

/* 全局设置内容区域 */
.global-gradeline-settings .card-content {
    background: transparent;
}

.global-gradeline-settings .card-title,
.global-gradeline-settings .card-title * {
    color: #102a43 !important;
}

.global-gradeline-settings .card-header p {
    color: #5f7285 !important;
}

.global-gradeline-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.global-gradeline-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f7fafc;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #dbe7f0;
    margin: 4px;
}

.global-gradeline-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: #365168 !important;
}

.global-gradeline-input-group input {
    padding: 8px 10px;
    border: 1px solid #cfd9e3;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    background: #ffffff;
    color: #102a43 !important;
}

.global-gradeline-input-group input:focus {
    outline: none;
    border-color: #9fb8cf;
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

/* 全局输入模式切换 */
.global-input-mode {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    background: #f7fafc;
    border: 1px solid #dbe7f0;
    border-radius: 12px;
    font-size: 12px;
}

.global-input-mode label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #365168 !important;
    font-weight: 500;
}

.global-input-mode input[type="radio"] {
    cursor: pointer;
    accent-color: #0f4c81;
}

/* 全局等级输入包裹器 */
.global-grade-input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.global-percentage-input,
.global-absolute-input {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    background: #ffffff;
    border-radius: 8px;
    padding: 8px 12px;
    border: 1px solid #dbe7f0;
    margin: 2px 0;
}

.global-grade-percentage,
.global-grade-absolute {
    flex: 0 0 120px;
    padding: 8px 12px;
    border: 1px solid #cfd9e3;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    background: #ffffff;
    color: #102a43 !important;
    min-width: 60px;
}

.global-grade-percentage:focus,
.global-grade-absolute:focus {
    outline: none;
    border-color: #9fb8cf;
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

.global-percentage-input > span:not(.global-absolute-preview),
.global-absolute-input > span:not(.global-percentage-preview) {
    color: #607086 !important;
    font-weight: 600;
}

.global-absolute-preview,
.global-percentage-preview {
    display: block;
    width: 100%;
    margin: 2px 0 0 !important;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px !important;
    font-weight: 700;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
    background: rgba(16, 58, 117, 0.14);
    box-shadow: inset 0 0 0 1px rgba(16, 58, 117, 0.12);
}

.global-absolute-preview {
    color: #0b6b3d !important;
    background: rgba(11, 107, 61, 0.12);
    box-shadow: inset 0 0 0 1px rgba(11, 107, 61, 0.14);
}

.global-percentage-preview {
    color: #134a96 !important;
    background: rgba(19, 74, 150, 0.12);
    box-shadow: inset 0 0 0 1px rgba(19, 74, 150, 0.14);
}

.apply-all-gradelines-btn {
    grid-column: 1 / -1;
    padding: 10px 20px;
    background: #102a43;
    border: 1px solid #102a43;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.apply-all-gradelines-btn:hover {
    background: #0b2036;
    border-color: #0b2036;
    box-shadow: 0 6px 14px rgba(11, 32, 54, 0.16);
}

.global-subject-selection-box {
    border: 1px dashed #d7e3ec;
    border-radius: 10px;
    background: #ffffff;
}

.global-subject-selection-item {
    color: #365168 !important;
}

.global-subject-selection-btn {
    border: 1px solid #d0dae5;
    background: #ffffff;
    color: #365168;
    border-radius: 999px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.global-subject-selection-btn:hover {
    border-color: #9fb8cf;
    background: #f8fbfd;
    color: #102a43;
}

/* 科目卡片容器 - 横向滚动 */
.subjects-gradelines-container {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    margin-bottom: 20px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
}

/* 自定义横向滚动条样式 */
.subjects-gradelines-container::-webkit-scrollbar {
    height: 8px;
}

.subjects-gradelines-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.subjects-gradelines-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.subjects-gradelines-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 科目网格布局 - 横向滚动 */
.subjects-gradelines-grid {
    display: flex;
    gap: 12px;
    padding: 10px;
    min-width: max-content;
}

.subject-gradeline-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    flex: 0 0 320px;
    /* 固定宽度，不伸缩 */
    min-width: 320px;
    padding: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.subject-gradeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.subject-gradeline-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
    transform: translateY(-2px);
}

.subject-gradeline-card:hover::before {
    opacity: 1;
}

.subject-gradeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.subject-gradeline-name {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
}

/* 总分设置行 */
.subject-total-score-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.subject-total-score-row label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    min-width: 50px;
}

.subject-total-score-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}

.subject-total-score-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.subject-total-score-row span {
    font-size: 12px;
    color: #6c757d;
}

/* 输入模式切换行 */
.subject-input-mode-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    padding: 6px 8px;
    background: #fff3cd;
    border-radius: 4px;
    font-size: 12px;
}

/* 年级特定设置卡片样式 */
.grade-specific-settings-card {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #dee2e6;
}

.grade-specific-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    outline: none;
    font-size: 13px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.grade-specific-details summary:hover {
    background: #e9ecef;
}

.grade-specific-details[open] summary {
    margin-bottom: 15px;
    background: #e3f2fd;
}

.grade-specific-grid-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.grade-specific-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    transition: all 0.2s ease;
}

.grade-specific-card:hover {
    border-color: #2c7be5;
    box-shadow: 0 2px 8px rgba(44, 123, 229, 0.1);
}

.grade-specific-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.grade-specific-header strong {
    color: #495057;
    font-size: 12px;
}

.grade-specific-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grade-specific-total,
.grade-specific-level {
    display: flex;
    align-items: center;
    gap: 6px;
}

.grade-specific-total label,
.grade-specific-level label {
    min-width: 50px;
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

.grade-specific-total-score,
.grade-specific-threshold {
    width: 80px;
    text-align: right;
    font-size: 11px;
    padding: 4px 6px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.grade-specific-total-score:focus,
.grade-specific-threshold:focus {
    outline: none;
    border-color: #2c7be5;
    box-shadow: 0 0 0 2px rgba(44, 123, 229, 0.1);
}

.grade-specific-absolute-preview {
    font-size: 10px;
    color: #28a745;
    min-width: 40px;
    font-weight: 500;
}

.subject-input-mode-row label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: #856404;
}

.subject-input-mode-row input[type="radio"] {
    cursor: pointer;
}

/* 等级分数线列布局 */
.gradeline-inputs-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gradeline-input-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.gradeline-input-label {
    font-size: 12px;
    font-weight: 600;
    min-width: 72px;
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.gradeline-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.gradeline-input-field,
.gradeline-absolute-field {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s ease;
    background: white;
}

.gradeline-input-field:focus,
.gradeline-absolute-field:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.gradeline-range-preview {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
    min-width: 96px;
}

/* 统计信息条 */
.gradelines-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #6c757d;
}

.gradelines-stats-bar strong {
    color: #2c3e50;
}

/* 提示信息 */
.gradelines-tip-box {
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #1565c0;
}

.gradelines-tip-box strong {
    font-weight: 600;
}

/* 分页控制器样式 */
.gradelines-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-top: 15px;
}

.pagination-info {
    font-size: 14px;
    color: #495057;
}

.pagination-info strong {
    color: #406AFF;
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pagination-btn {
    padding: 8px 16px;
    background: #406AFF;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn:hover:not(:disabled) {
    background: #2196F3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(64, 106, 255, 0.3);
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-current {
    font-size: 14px;
    color: #495057;
    font-weight: 600;
    padding: 8px 16px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    min-width: 100px;
    text-align: center;
}

/* 新功能提示卡片样式 */
.feature-tip-card {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transition: all 0.3s ease;
    overflow: hidden;
}

.feature-tip-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: transform 0.6s ease;
}

.feature-tip-card:hover::before {
    transform: translate(-20px, -20px) scale(1.1);
}

.feature-tip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.25);
}

.feature-tip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.feature-tip-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: bold;
}

.feature-tip-icon {
    font-size: 24px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

.feature-tip-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.8;
    z-index: 2;
    position: relative;
}

.feature-tip-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
    opacity: 1;
}

.feature-tip-content {
    position: relative;
    z-index: 1;
}

.feature-tip-content p {
    margin: 0 0 15px 0;
    line-height: 1.5;
    font-size: 14px;
    opacity: 0.95;
}

.feature-tip-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.feature-tip-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.feature-tip-btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.feature-tip-btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.feature-tip-btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.feature-tip-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 淡入动画 */
.feature-tip-card.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 淡出动画 */
.feature-tip-card.fade-out {
    animation: fadeOut 0.4s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
        margin-bottom: 0;
        padding: 0 20px;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .subjects-gradelines-grid {
        gap: 8px;
    }

    .subject-gradeline-card {
        flex: 0 0 280px;
        /* 移动端卡片更小 */
        min-width: 280px;
        padding: 12px;
    }

    .global-gradeline-content {
        grid-template-columns: 1fr;
    }

    .global-grade-percentage,
    .global-grade-absolute {
        flex-basis: 96px;
    }

    .feature-tip-card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .feature-tip-title {
        font-size: 16px;
    }

    .feature-tip-content p {
        font-size: 13px;
    }

    .feature-tip-actions {
        flex-direction: column;
    }

    .feature-tip-btn {
        justify-content: center;
    }
}

/* ===============================================
   班级筛选器样式 (Admin Dashboard Class Filter)
   =============================================== */

/* 班级筛选卡片容器 */
.class-filter-section {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 筛选器头部 */
.class-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.filter-title i {
    color: #406AFF;
    font-size: 18px;
}

.selection-count {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

/* 筛选操作按钮组 */
.filter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-actions .button-small {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-actions .button-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(64, 106, 255, 0.3);
}

/* 班级卡片网格 */
.class-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

/* 班级选择卡片 */
.class-selector-card {
    position: relative;
    border: 2px solid #e0e0e0;
    background: white;
    padding: 14px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    user-select: none;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.class-selector-card:hover {
    border-color: #406AFF;
    box-shadow: 0 3px 10px rgba(64, 106, 255, 0.2);
    transform: translateY(-2px);
}

.class-selector-card:active {
    transform: translateY(0);
}

/* 班级卡片 - 选中状态 */
.class-selector-card.selected {
    border-color: #406AFF;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f2ff 100%);
    box-shadow: 0 2px 8px rgba(64, 106, 255, 0.25);
}

.class-selector-card.selected::before {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    color: #406AFF;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
}

/* 班级名称 */
.class-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.class-selector-card.selected .class-card-name {
    color: #406AFF;
}

/* 班级平均分 */
.class-card-score {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.class-selector-card.selected .class-card-score {
    color: #5580FF;
}

/* 筛选提示信息 */
.filter-hint {
    margin-top: 12px;
    padding: 10px 14px;
    background: #f0f7ff;
    border-left: 3px solid #406AFF;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-hint i {
    color: #406AFF;
}

/* 响应式设计 */

/* 桌面端 (>1200px) - 6列 */
@media (min-width: 1200px) {
    .class-cards-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* 大平板端 (992px-1199px) - 5列 */
@media (min-width: 992px) and (max-width: 1199px) {
    .class-cards-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 平板端 (768px-991px) - 4列 */
@media (min-width: 768px) and (max-width: 991px) {
    .class-cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .class-selector-card {
        min-height: 65px;
        padding: 12px 10px;
    }
}

/* 大手机端 (576px-767px) - 3列 */
@media (min-width: 576px) and (max-width: 767px) {
    .class-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .class-selector-card {
        min-height: 60px;
        padding: 10px 8px;
    }

    .class-card-name {
        font-size: 14px;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-actions .button-small {
        flex: 1;
    }
}

/* 小手机端 (<576px) - 2列 */
@media (max-width: 575px) {
    .class-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .class-selector-card {
        min-height: 55px;
        padding: 10px 8px;
    }

    .class-card-name {
        font-size: 13px;
    }

    .class-card-score {
        font-size: 11px;
    }

    .class-filter-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-actions .button-small {
        flex: 1;
        padding: 8px 10px;
    }

    .filter-title {
        font-size: 15px;
    }
}

/* 空状态样式 */
.class-filter-empty {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 14px;
}

.class-filter-empty i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 12px;
}

/* 加载状态 */
.class-filter-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    color: #666;
    font-size: 14px;
}

.class-filter-loading i {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* ===============================================
   班级筛选器样式 (Class Filter Styles)
   =============================================== */

.class-filter-section {
    padding: 20px;
}

.class-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color, #e1e8ed);
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.filter-title i {
    color: var(--primary-color, #4a90e2);
}

.selection-count {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary, #666);
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.filter-actions .button-small {
    padding: 6px 12px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.filter-actions .button-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 班级卡片网格 */
.class-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

/* 单个班级卡片 */
.class-selector-card {
    position: relative;
    padding: 16px;
    border: 2px solid var(--border-color, #e1e8ed);
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    user-select: none;
}

.class-selector-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color, #4a90e2);
}

.class-selector-card.selected {
    background: linear-gradient(135deg, #406AFF 0%, #2196F3 100%);
    border-color: #406AFF;
    color: white;
    box-shadow: 0 6px 20px rgba(64, 106, 255, 0.4);
}

.class-selector-card.selected .class-card-name,
.class-selector-card.selected .class-card-score {
    color: white;
}

/* 卡片选中状态标记 */
.class-selector-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

/* 班级名称 */
.class-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #333);
    margin-bottom: 8px;
}

/* 班级平均分 */
.class-card-score {
    font-size: 14px;
    color: var(--text-secondary, #666);
    font-weight: 500;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .class-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    .class-selector-card {
        padding: 12px;
    }

    .class-card-name {
        font-size: 14px;
    }

    .class-card-score {
        font-size: 12px;
    }

    .class-filter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .filter-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .class-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .filter-actions .button-small {
        padding: 5px 8px;
        font-size: 12px;
    }
}

/* 空状态提示 */
.class-filter-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary, #666);
    font-size: 14px;
}

.class-filter-empty i {
    font-size: 48px;
    color: var(--border-color, #e1e8ed);
    margin-bottom: 15px;
}

/* ===============================================
 * 学科排行榜样式
 * =============================================== */

/* 学科按钮网格 */
.subject-buttons-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

/* 排行榜内容区域 */
#subjectRankingContent {
    margin-top: 30px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.section-header h4 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subject-topn-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.subject-topn-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4a5568;
}

#subjectTopNInput {
    width: 84px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
}

.subject-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.subject-ranking-btn {
    background: #fff;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.subject-ranking-btn:hover {
    border-color: #406AFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 106, 255, 0.15);
}

.subject-ranking-btn.active {
    border-color: #406AFF;
    background: linear-gradient(135deg, #406AFF 0%, #5B7CFF 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 106, 255, 0.3);
}

.subject-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.subject-btn-content i {
    font-size: 24px;
    color: #406AFF;
}

.subject-ranking-btn.active .subject-btn-content i {
    color: white;
}

.subject-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.subject-ranking-btn.active .subject-name {
    color: white;
}

.student-count {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 12px;
}

.subject-ranking-btn.active .student-count {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
}

/* 前100名统计卡片 */
.top100-stats-card {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.3);
}

.stats-header h4 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stat-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.stat-value.highlight {
    color: #FFD700;
    font-size: 20px;
}

/* 班级分布 */
.class-distribution {
    margin-top: 24px;
}

.class-distribution h5 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.distribution-chart-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    align-items: center;
}

.distribution-pie-chart {
    width: 400px;
    height: 300px;
}

.distribution-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.legend-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-name {
    font-weight: 600;
    flex: 1;
}

.legend-count {
    font-size: 14px;
    opacity: 0.9;
}

/* 响应式：小屏幕改为垂直布局 */
@media (max-width: 768px) {
    .distribution-chart-container {
        grid-template-columns: 1fr;
    }

    .distribution-pie-chart {
        width: 100%;
        height: 250px;
    }
}

/* 排名表格 */
.top100-ranking-table {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.ranking-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ranking-controls {
    display: flex;
    gap: 8px;
}

.ranking-view-fixed {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #406AFF;
    color: white;
    border: 1px solid #406AFF;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-small:hover {
    border-color: #406AFF;
    color: #406AFF;
}

.btn-small.active {
    background: #406AFF;
    color: white;
    border-color: #406AFF;
}

.ranking-content {
    padding: 24px;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ranking-table th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
}

.ranking-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.ranking-table tbody tr:hover {
    background: #f8f9ff;
}

/* 排名特殊样式 */
.rank-gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    font-weight: bold;
}

.rank-silver {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    color: white;
    font-weight: bold;
}

.rank-bronze {
    background: linear-gradient(135deg, #CD7F32 0%, #B8860B 100%);
    color: white;
    font-weight: bold;
}

.rank-top10 {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    font-weight: 600;
}

.rank-top20 {
    background: #f3e5f5;
}

.rank-cell {
    font-weight: bold;
    text-align: center;
}

.name-cell {
    font-weight: 600;
}

.class-cell {
    color: #406AFF;
    font-weight: 500;
}

.score-cell {
    font-weight: bold;
    color: #FF4062;
}

.class-rank-cell {
    color: #666;
    font-size: 12px;
}


/* 占位符样式 */
.subject-ranking-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .subject-buttons-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .subject-ranking-btn {
        padding: 12px;
    }

    .subject-topn-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .subject-btn-content i {
        font-size: 20px;
    }

    .subject-name {
        font-size: 14px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .distribution-grid {
        grid-template-columns: 1fr;
    }

    .ranking-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .ranking-controls {
        width: 100%;
        justify-content: center;
    }

    .ranking-table {
        font-size: 12px;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 8px 4px;
    }
}

/* ============================================
   软件激活区域样式
   ============================================ */

.sidebar-license {
    padding: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 8px;
    margin-top: 8px;
}

.license-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    backdrop-filter: blur(4px);
}

.license-status-icon {
    font-size: 14px;
    color: #94a3b8;
}

.license-status-text {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.license-activated {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(79, 70, 229, 0.02) 100%);
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid rgba(79, 70, 229, 0.15);
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
}

.license-activated::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.license-activated .license-status-icon {
    color: var(--primary-color);
    font-size: 14px;
}

.license-activated .license-status-text {
    color: var(--primary-color);
    font-weight: 600;
}

.license-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.license-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.license-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.license-input::placeholder {
    text-transform: none;
    letter-spacing: normal;
    color: #999;
}

.license-message {
    font-size: 12px;
    padding: 6px 0;
    min-height: 20px;
}

.license-message.success {
    color: var(--primary-color);
    font-weight: 500;
}

.license-message.error {
    color: #c62828;
}

.license-message.info {
    color: #1565c0;
}

.license-quota-info {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    border: 1px solid #e0e0e0;
}

.license-quota-info strong {
    color: #667eea;
    font-size: 15px;
}

/* 激活按钮样式优化 */
#activateLicenseBtn {
    width: 100%;
    justify-content: center;
}

#activateLicenseBtn.loading {
    opacity: 0.7;
    pointer-events: none;
}

#activateLicenseBtn.loading .sidebar-btn-text::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 表格展开/折叠按钮样式 */
.table-expand-container {
    display: flex;
    justify-content: center;
    padding: 12px 0;
    margin-top: -1px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(248,250,252,1) 30%);
}

.table-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.table-expand-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.02);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.1);
}

.table-expand-btn .expand-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.table-expand-btn .expand-text {
    letter-spacing: 0.02em;
}

.table-row-hidden {
    display: none;
}

/* 学生详细数据模块 */
.student-detail-card {
    background: #f5f7fa;
    border: none;
    box-shadow: none;
}

.student-detail-card .card-header {
    background: transparent;
    border-bottom: none;
}

.student-detail-card .card-content {
    background: #f5f7fa;
    padding: 0 20px 24px;
}

.student-detail-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-top: 12px;
}

.grade-filter-buttons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 4px;
}

.grade-filter-tab {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.grade-filter-tab:hover {
    color: #1e293b;
}

.grade-filter-tab.active {
    background: #111827;
    color: #fff;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.18);
}

.student-search-bar {
    flex: 1;
    min-width: 240px;
    max-width: 360px;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 4px 12px;
    position: relative;
    gap: 8px;
}

.student-search-icon {
    color: #94a3b8;
    display: inline-flex;
}

.student-search-input {
    border: none;
    flex: 1;
    font-size: 14px;
    padding: 6px 0;
}

.student-search-input:focus {
    outline: none;
}

.student-search-submit {
    border: none;
    background: #eef2ff;
    color: #1e3a8a;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
}

.student-search-reset {
    border: none;
    background: none;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
}

.student-search-reset:hover {
    color: #475569;
}

.student-analysis-table {
    border-collapse: separate;
    border-spacing: 0 12px;
    background: transparent;
}

.student-analysis-table thead th {
    background: transparent;
    border-bottom: none;
    color: #94a3b8;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding-bottom: 6px;
}

.student-analysis-table .score-header {
    text-align: center;
}

.student-analysis-table tbody tr {
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    border-radius: 14px;
}

.student-analysis-table tbody td {
    border-bottom: none;
    padding: 18px;
    vertical-align: middle;
}

.student-info-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.student-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.student-score-cell {
    text-align: center;
}

.student-score-value {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1;
}

.student-rank-cell {
    text-align: center;
}

.student-grade-cell {
    text-align: center;
}

.rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    background: #eef2ff;
    color: #1e3a8a;
}

.rank-pill-secondary {
    background: #f3f4f6;
    color: #475569;
}

.external-rank-cell {
    text-align: center;
}

.grade-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #111827;
}

.grade-chip-dot {
    display: none;
}

.grade-chip-neutral,
.grade-chip-positive,
.grade-chip-good,
.grade-chip-pass,
.grade-chip-critical {
    color: #111827;
}

.student-actions-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

.student-actions-cell.compact {
    gap: 8px;
}

.student-analysis-table.multi-subject-table td,
.student-analysis-table.multi-subject-table th {
    color: #1e293b;
}

.student-analysis-table .multi-total-score {
    font-weight: 700;
    color: #1d4ed8;
}

.student-action-primary {
    border: none;
    background: #1d4ed8;
    color: #fff;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.student-action-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.25);
}

.student-action-more {
    position: relative;
}

.student-action-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.student-action-more.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.student-action-more-toggle {
    border: none;
    background: #e2e8f0;
    color: #475569;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.student-action-menu {
    position: absolute;
    top: 110%;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    min-width: 160px;
    padding: 6px 0;
    display: none;
    z-index: 5;
}

.student-action-more.open .student-action-menu {
    display: block;
}

.student-action-menu-item {
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
}

.student-action-menu-item:hover {
    background: #f1f5f9;
}

.student-analysis-table tbody tr.student-row.highlight-row {
    border-left-color: #111827;
}
/* 年级整体报告导出设置 */
.grade-export-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.grade-export-option .dropdown-item {
    flex: 1;
}

.grade-export-settings-btn {
    border: none;
    background: none;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.grade-export-settings-btn i {
    font-size: 13px;
}

.grade-export-settings-btn:hover {
    color: #0f62fe;
    background-color: #f1f5f9;
}

#gradeExportSettingsModal .modal {
    max-width: 1120px;
    width: min(96vw, 1120px);
    max-height: 85vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#gradeExportSettingsModal .modal-header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    margin-bottom: 0;
}

#gradeExportSettingsModal .modal-body {
    padding: 16px 24px 10px;
    overflow-y: auto;
}

#gradeExportSettingsModal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.grade-export-settings-hint {
    font-size: 13px;
    color: #475569;
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.grade-export-fields-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.grade-export-field-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.grade-export-field-info {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.grade-export-field-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grade-export-field-info input[type="checkbox"] {
    margin-top: 2px;
}

.grade-export-field-group {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    color: #475569;
    background: #e2e8f0;
    border-radius: 999px;
    padding: 1px 6px;
    width: fit-content;
}

.grade-export-field-title {
    font-weight: 600;
    color: #1e293b;
    display: block;
    font-size: 13px;
}

.grade-export-field-description {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.4;
}

.grade-export-field-config {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 11px;
    color: #475569;
}

.grade-export-field-config input {
    width: 60px;
    padding: 3px 4px;
    border: 1px solid #cbd5f5;
    border-radius: 4px;
    text-align: right;
    font-size: 12px;
}

.grade-export-field-config input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.grade-export-field-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grade-export-field-actions button {
    width: 28px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #cbd5f5;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.grade-export-field-actions button:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.grade-export-preview-wrapper {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.grade-export-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.grade-export-preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.grade-export-preview-description {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.4;
}

.grade-export-preview-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.grade-export-preview-select {
    min-width: 220px;
    padding: 6px 10px;
    border: 1px solid #cbd5f5;
    border-radius: 6px;
    font-size: 13px;
    color: #0f172a;
    background: #fff;
}

.grade-export-preview-select:disabled {
    background: #f3f4f6;
    color: #94a3b8;
    cursor: not-allowed;
}

.grade-export-preview-table {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    overflow-x: auto;
}

.grade-export-preview-table table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: auto;
}

.grade-export-preview-table th,
.grade-export-preview-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #dfe6f3;
    border-right: 1px solid #dfe6f3;
    text-align: left;
    color: #0f172a;
}

.grade-export-preview-header-cell,
.grade-export-preview-sample-cell {
    min-width: 160px;
    max-width: 220px;
    vertical-align: top;
}

.grade-export-preview-table th:last-child,
.grade-export-preview-table td:last-child {
    border-right: none;
}

.grade-export-preview-table thead th {
    background: #edf2fb;
    font-weight: 600;
    position: relative;
}

.grade-export-preview-corner {
    width: 48px;
    background: #e0e7ff;
    text-align: center;
    font-weight: 600;
}

.grade-export-preview-column-letter {
    text-align: center;
    font-weight: 700;
    color: #1e3a8a;
}

.grade-export-preview-row-header {
    width: 48px;
    background: #eef2ff;
    text-align: center;
    font-weight: 600;
    color: #1e3a8a;
    border-right: 1px solid #c7d2fe;
}

.grade-export-preview-row-header + td {
    border-left: none;
}

.grade-export-preview-col {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    justify-content: space-between;
}

.grade-export-preview-col-main {
    min-width: 0;
    flex: 1;
}

.grade-export-preview-col-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
}

.grade-export-preview-col-desc {
    font-size: 11px;
    line-height: 1.5;
    color: #64748b;
    margin-top: 6px;
    white-space: normal;
    word-break: break-word;
}

.grade-export-preview-remove {
    border: none;
    background: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.grade-export-preview-remove:hover {
    color: #b91c1c;
}

.grade-export-preview-empty {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 13px;
}

.grade-export-preview-desc {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

.custom-target-panel {
    margin-top: 18px;
    padding: 20px;
    border-radius: 14px;
    background: #fafcff;
    border: 1px solid rgba(96, 165, 250, 0.2);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.04);
}

.custom-target-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.custom-target-panel-intro {
    flex: 1;
    min-width: 240px;
}

.custom-target-panel-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--primary-color);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.custom-target-panel-title {
    margin: 0;
    color: #1e293b;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.custom-target-panel-description {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.custom-target-panel-meta {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
}

.custom-target-panel-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.custom-target-panel-toolbar--compact {
    margin-bottom: 12px;
}

.custom-target-panels-stack {
    display: grid;
    gap: 12px;
}

.custom-target-panel--section {
    padding: 14px;
}

.custom-target-panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.custom-target-panel-heading-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.custom-target-panel-heading-hint {
    font-size: 12px;
    color: #64748b;
}

.custom-target-template-select {
    min-width: 180px;
}

.custom-target-toolbar-btn,
.custom-target-line-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.custom-target-line-rows {
    display: grid;
    gap: 8px;
}

.custom-target-line-row {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(160px, 1.2fr) minmax(140px, 0.9fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.custom-target-line-row--subject {
    grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.9fr) minmax(140px, 0.9fr) auto;
}

.custom-target-line-row:hover {
    border-color: #c7d5e3;
    background: #f8fafc;
}

.custom-target-line-field {
    min-width: 0;
}

.custom-target-line-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

.custom-target-line-help {
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.custom-target-line-threshold-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-target-panel-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
}

.custom-target-panel-toggle input {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    cursor: pointer;
}

.custom-target-line-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #365168;
    cursor: pointer;
}

.custom-target-line-toggle input {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
}

.custom-target-line-toggle-hint {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}

.custom-target-line-unit {
    color: #475569;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.custom-target-line-row--disabled {
    border-style: dashed;
    background: #f8fafc;
}

.custom-target-line-row--disabled .custom-target-line-label,
.custom-target-line-row--disabled .custom-target-line-toggle,
.custom-target-line-row--disabled .custom-target-line-toggle-hint,
.custom-target-line-row--disabled .custom-target-line-unit {
    color: #94a3b8;
}

.custom-target-panel--disabled .custom-target-panel-description,
.custom-target-panel--disabled .custom-target-panel-toggle-hint {
    color: #94a3b8;
}

.custom-target-line-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-self: stretch;
    align-items: center;
    min-width: 0;
    flex-wrap: wrap;
}

.custom-target-line-action-btn {
    padding: 6px 10px;
    min-width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 12px;
}

.custom-target-line-action-btn span {
    white-space: nowrap;
}

.custom-target-line-action-btn--danger {
    color: #dc2626;
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(254, 242, 242, 0.92);
}

.custom-target-panel-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f3f7;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.custom-target-panel-note,
.custom-target-panel-limit {
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
}

.subject-target-group + .subject-target-group {
    margin-top: 14px;
}

.subject-target-group-title {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
}

.subject-target-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.subject-target-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.subject-target-card-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.subject-target-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.subject-target-card-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

.subject-target-rank-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.subject-target-card-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.subject-target-card-metrics--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subject-target-metric {
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e8eef5;
}

.subject-target-metric-label {
    font-size: 12px;
    color: #64748b;
}

.subject-target-metric-value {
    margin-top: 6px;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.subject-target-metric-value--primary {
    color: #2563eb;
}

.subject-target-card-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #d9e4ef;
}

.subject-target-footer-title {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}

.subject-target-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subject-target-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
}

.subject-target-empty {
    font-size: 12px;
    color: #94a3b8;
}

#importStep3 .stage3-inline-callout {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 13px;
    line-height: 1.65;
}

#importStep3 .stage3-inline-callout i {
    margin-top: 2px;
}

#importStep3 .stage3-inline-callout--success {
    background: #eef7f1;
    border-color: #c7dfcf;
    color: #205b3b;
}

#importStep3 .stage3-inline-callout--neutral {
    background: #f5f9fc;
    border-color: #d7e3ec;
    color: #365168;
}

#importStep3 .stage3-settings-card,
#importStep3 .subject-grade-settings,
#importStep3 #totalScoreSettingsCard {
    background: #ffffff !important;
    border: 1px solid #e4eaf0 !important;
    border-left-width: 1px !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
    overflow: hidden;
}

#importStep3 .stage3-settings-card .card-header,
#importStep3 #totalScoreSettingsCard .card-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%) !important;
    border-bottom: 1px solid #e0e8ef !important;
    padding: 16px 18px !important;
}

#importStep3 .stage3-settings-card .card-title,
#importStep3 #totalScoreSettingsCard .card-title {
    color: #102a43 !important;
    font-weight: 700 !important;
}

#importStep3 .stage3-settings-card .card-title i,
#importStep3 #totalScoreSettingsCard .card-title i {
    color: #0f4c81 !important;
}

#importStep3 .stage3-settings-card .card-content,
#importStep3 #totalScoreSettingsCard .card-content {
    padding: 18px !important;
    background: transparent !important;
}

#importStep3 .subject-grade-settings h5 {
    margin: 0 0 14px !important;
    color: #102a43 !important;
    font-size: 17px;
    font-weight: 700;
}

#importStep3 .subject-grade-settings .form-group {
    margin-bottom: 16px !important;
}

#importStep3 .subject-grade-settings .input-mode-selector,
#importStep3 #totalScoreSettingsCard .input-mode-selector {
    background: #f7fafc !important;
    border: 1px solid #dbe7f0 !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
}

#importStep3 .subject-grade-settings .setting-row,
#importStep3 #totalScoreSettingsCard .setting-row {
    gap: 14px;
}

#importStep3 .subject-grade-settings .setting-row label,
#importStep3 #totalScoreSettingsCard .setting-row label {
    color: #365168 !important;
}

#importStep3 .subject-grade-settings .absolute-score-preview,
#importStep3 #totalScoreSettingsCard .gradeline-range-preview {
    color: #0f4c81 !important;
    font-weight: 600 !important;
}

#importStep3 .import-stage-target-section {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.25s ease;
}

#importStep3 .import-stage-target-section:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
}

#importStep3 .custom-target-panel {
    margin-top: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

#importStep3 .custom-target-panel-badge {
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    padding: 3px 9px;
}

#importStep3 .custom-target-panel-title {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
}

#importStep3 .custom-target-panel-description {
    color: var(--text-secondary);
    font-size: 13px;
}

#importStep3 .custom-target-panel-toolbar {
    gap: 8px;
    justify-content: flex-start;
}

#importStep3 .custom-target-line-rows {
    gap: 6px;
}

#importStep3 .custom-target-line-row {
    border: 1px solid #e8edf3;
    box-shadow: none;
    background: #ffffff;
    border-radius: 10px;
    padding: 10px 14px;
}

#importStep3 .custom-target-line-row:hover {
    border-color: #c7d5e3;
    background: #f8fafc;
}

#importStep3 .custom-target-panel-footer {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid #f0f3f7;
}

@media (max-width: 1180px) {
    .custom-target-line-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    }

    .custom-target-line-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    #gradeExportSettingsModal .modal {
        width: 96vw;
        max-width: none;
    }

    .grade-export-preview-header-cell,
    .grade-export-preview-sample-cell {
        min-width: 132px;
        max-width: 180px;
    }

    .custom-target-panel {
        padding: 16px;
        border-radius: 16px;
    }

    .custom-target-panel-toolbar {
        width: 100%;
        justify-content: stretch;
    }

    .custom-target-template-select,
    .custom-target-toolbar-btn {
        width: 100%;
    }

    .custom-target-line-row {
        grid-template-columns: 1fr;
    }

    .custom-target-line-row--subject {
        grid-template-columns: 1fr;
    }

    .custom-target-line-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .subject-target-card-metrics,
    .subject-target-card-metrics--three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 学生详细数据保持黑色字体，避免颜色干扰 */
.student-detail,
.key-student-detail,
.key-student-detail .detail-label,
.key-student-detail .detail-value {
    color: #000000 !important;
}

/* 现代化系统设置面板 */
.modern-settings-modal {
    width: 95%;
    max-width: 1150px;
    background: linear-gradient(145deg, #ffffff 60%, #f4f7ff 100%);
    border-radius: 20px;
    box-shadow: 0 25px 65px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.modern-settings-modal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

.modal-subtitle {
    margin-top: 6px;
    font-size: 13px;
    color: #5b647a;
}

.settings-layout {
    display: flex;
    gap: 24px;
    margin-top: 24px;
}

.settings-nav {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: linear-gradient(180deg, #071235, #0f1f4b);
    border-radius: 18px;
    padding: 18px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.settings-nav-item {
    width: 100%;
    border: none;
    background: rgba(99, 102, 241, 0.15);
    color: #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.settings-nav-item .nav-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.settings-nav-item .nav-info span {
    display: block;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.75);
    margin-top: 4px;
}

.settings-nav-item.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 15px 25px rgba(37, 99, 235, 0.35);
    border-color: rgba(255, 255, 255, 0.2);
}

.settings-nav-item.active .nav-icon {
    background: rgba(255, 255, 255, 0.2);
}

.settings-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.settings-panel {
    display: none;
    animation: fadeIn 0.2s ease;
}

.settings-panel.active {
    display: block;
}

.settings-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.settings-footer-actions {
    margin-top: 28px;
    display: flex;
    align-items: stretch;
    gap: 24px;
    padding-top: 12px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.settings-footer-actions .button.button-primary {
    min-width: 200px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 18px 30px rgba(59, 130, 246, 0.2);
}

.danger-zone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid rgba(248, 113, 113, 0.4);
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.95), rgba(255, 247, 237, 0.9));
    border-radius: 16px;
    padding: 16px 20px;
}

.danger-zone h5 {
    font-size: 14px;
    margin: 0 0 4px 0;
    color: #b91c1c;
}

.danger-zone p {
    margin: 0;
    font-size: 12px;
    color: #7f1d1d;
}

.button.button-secondary.danger {
    background: #dc2626;
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 10px 18px;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.25);
}

@media (max-width: 1024px) {
    .settings-layout {
        flex-direction: column;
    }

    .settings-nav {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .settings-nav-item {
        flex: 1 1 calc(50% - 12px);
    }

    .settings-footer-actions {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .settings-nav-item {
        flex: 1 1 100%;
    }
}
