/* ===== 成绩管理系统 基础样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; background: #f3f5f8; color: #26303c; font-size: 14px; }

/* ---- 登录页 ---- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh;
    background: linear-gradient(160deg, #e8f1fb 0%, #f6f8fb 60%, #eaf7f4 100%); }
.login-card { width: 380px; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(30,60,120,.12); padding: 32px 30px 22px; }
.login-brand { text-align: center; margin-bottom: 20px; }
.login-brand h1 { font-size: 24px; color: #1d4ed8; }
.login-brand p { color: #7a8699; margin-top: 4px; }
.login-tabs { display: flex; background: #eef1f6; border-radius: 8px; padding: 4px; margin-bottom: 18px; }
.tab-btn { flex: 1; border: 0; background: transparent; padding: 8px 0; border-radius: 6px; cursor: pointer; color: #5a6678; font-size: 14px; }
.tab-btn.active { background: #fff; color: #1d4ed8; font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.login-card label { display: block; font-size: 13px; color: #57647a; margin: 12px 0 4px; }
.login-card input[type=text], .login-card input[type=password] { width: 100%; padding: 9px 12px; border: 1px solid #d5dbe6; border-radius: 8px; font-size: 14px; }
.login-card input:focus { outline: none; border-color: #4d84f0; }
.btn-primary { background: #1d4ed8; color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; font-size: 14px; cursor: pointer; }
.btn-primary:hover { background: #1e40af; }
.btn-block { width: 100%; margin-top: 20px; padding: 11px 0; }
.login-tip { text-align: center; color: #9aa5b5; font-size: 12px; margin-top: 14px; }
.alert-error { background: #fdecec; color: #c0392b; border: 1px solid #f5c6c6; border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; font-size: 13px; }

/* ---- 初始化引导 ---- */
.setup-body { display: flex; align-items: flex-start; justify-content: center; min-height: 100vh; padding: 40px 16px;
    background: linear-gradient(160deg, #e8f1fb 0%, #f6f8fb 60%, #eaf7f4 100%); }
.setup-card { width: 720px; max-width: 96vw; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(30,60,120,.12); padding: 30px 34px 34px; }
.setup-head { text-align: center; margin-bottom: 22px; }
.setup-head h1 { font-size: 22px; color: #1d4ed8; }
.setup-head p { color: #7a8699; margin-top: 6px; }
.setup-steps { display: flex; margin-bottom: 22px; border-bottom: 1px solid #eef1f6; padding-bottom: 14px; }
.step { flex: 1; text-align: center; color: #9aa5b5; font-size: 13px; position: relative; }
.step.active { color: #1d4ed8; font-weight: 600; }
.step.done { color: #22a06b; }
.setup-card h3 { font-size: 16px; margin: 6px 0 12px; }
.setup-card label { display: block; font-size: 13px; color: #57647a; margin: 14px 0 4px; }
.setup-card textarea { width: 100%; padding: 9px 12px; border: 1px solid #d5dbe6; border-radius: 8px; font-size: 14px; min-height: 70px; }
.setup-card input[type=text], .setup-card input[type=password], .setup-card input[type=number] { padding: 8px 10px; border: 1px solid #d5dbe6; border-radius: 8px; font-size: 14px; }
.setup-card input.small { width: 160px; }
.setup-card input.tiny { width: 80px; }
.row-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.row-label { font-size: 13px; color: #57647a; }
.checkbox-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.check-item { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.btn-plain { background: #fff; color: #1d4ed8; border: 1px solid #c9d6f5; border-radius: 8px; padding: 8px 14px; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-block; }
.exam-status-cell { display: flex; align-items: center; gap: 7px; flex-wrap: nowrap; }
.exam-status-cell > span { font-size: 12px; color: #5b6472; white-space: nowrap; }
.exam-status-form { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.status-icon-btn { width: 22px; height: 22px; padding: 0; border-radius: 6px; font-size: 11px;
    line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 22px; box-sizing: border-box; }
.status-icon-btn.play { color: #15803d; border: 1px solid #bbf7d0; background: #f0fdf4; }
.status-icon-btn.play.active { color: #166534; border-color: #86efac; background: #dcfce7; }
.status-icon-btn.stop { color: #dc2626; border: 1px solid #fecaca; background: #fef2f2; }
.status-icon-btn.stop.active { color: #991b1b; border-color: #fca5a5; background: #fee2e2; }
.status-icon-btn:hover { filter: brightness(.96); }
@media (max-width: 480px) {
    .status-icon-btn { width: 24px; height: 24px; font-size: 12px; }
}
.setup-actions { display: flex; gap: 12px; margin-top: 24px; justify-content: flex-end; }
.setup-done { text-align: center; padding: 40px 0; }
.setup-done h2 { color: #22a06b; margin-bottom: 12px; }
.setup-done p { color: #57647a; margin-bottom: 20px; }
.tip { color: #7a8699; font-size: 13px; }
.setup-card .tip { margin: 8px 0 12px; }

/* ---- 后台框架 ---- */
.dash-body { min-height: 100vh; }
.dash-wrap { display: flex; min-height: 100vh; }
.dash-side { width: 200px; flex-shrink: 0; background: #1c2b3f; color: #cfd8e4; display: flex; flex-direction: column; }
.dash-logo { padding: 20px 18px; font-size: 16px; font-weight: 700; color: #fff; border-bottom: 1px solid #2c3d54; }
.dash-side nav { flex: 1; padding: 12px 0; }
.dash-side nav a { display: block; padding: 11px 18px; color: #aebbd0; text-decoration: none; font-size: 14px; }
.dash-side nav a:hover { background: #253750; color: #fff; }
.dash-side nav a.on { background: #1d4ed8; color: #fff; }
.dash-user { padding: 14px 18px; border-top: 1px solid #2c3d54; font-size: 13px; }
.dash-user a { color: #8fb4ff; margin-left: 8px; text-decoration: none; }
.dash-main { flex: 1; min-width: 0; padding: 22px 26px; }
.dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dash-head h2 { font-size: 19px; }
.dash-role { background: #eef1f6; color: #57647a; border-radius: 20px; padding: 4px 12px; font-size: 12px; }
.card { background: #fff; border-radius: 12px; padding: 20px 22px; box-shadow: 0 2px 10px rgba(30,60,120,.06); }
.card h3 { font-size: 15px; margin-bottom: 12px; color: #26303c; }
.info-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.info-table td { padding: 8px 10px; border: 1px solid #eef1f6; }
.info-table td:first-child, .info-table td:nth-child(3) { color: #57647a; width: 90px; background: #fafbfd; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-box { text-align: center; background: #fafbfd; border: 1px solid #eef1f6; border-radius: 10px; padding: 16px 0; }
.stat-box b { display: block; font-size: 26px; color: #1d4ed8; }
.stat-box span { color: #7a8699; font-size: 13px; }

/* ---- 数据表格与后台组件 ---- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar select, .filter-bar input[type=text], .filter-bar input[type=password], .filter-bar input[type=number], .filter-bar input[type=date], .filter-bar input[type=file] {
    padding: 7px 10px; border: 1px solid #d5dbe6; border-radius: 8px; font-size: 14px; background: #fff;
}
.card select, .card input[type=text], .card input[type=password], .card input[type=number], .card input[type=date], .card input[type=file], .card textarea {
    padding: 7px 10px; border: 1px solid #d5dbe6; border-radius: 8px; font-size: 14px; background: #fff;
}
.card textarea { width: 100%; min-height: 70px; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.data-table th { background: #eef1f6; color: #374151; padding: 7px 8px; text-align: center; border: 1px solid #e2e8f0; white-space: nowrap; }
.data-table td { padding: 6px 8px; border: 1px solid #eef1f6; vertical-align: middle; }
.data-table tr:nth-child(even) { background: #fafbfd; }
.data-table.compact td { padding: 4px 8px; font-size: 12.5px; }
.table-scroll { overflow-x: auto; }
.cell-num { text-align: right; white-space: nowrap; }
.cell-sm { font-size: 12px; color: #4b5563; }
.muted { color: #9aa5b5; }
.btn-danger { background: #fff; color: #c0392b; border: 1px solid #f0c4c4; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; cursor: pointer; }
.btn-danger:hover { background: #fdecec; }
.alert-ok { background: #ecfdf3; color: #0e7c4b; border: 1px solid #b7e6cf; border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; font-size: 13px; }
.page-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid #eef1f6; padding-bottom: 8px; flex-wrap: wrap; }
.page-tabs a { padding: 6px 14px; border-radius: 8px; font-size: 13.5px; color: #57647a; text-decoration: none; }
.page-tabs a.on { background: #1d4ed8; color: #fff; }
.badge { border: 0; border-radius: 20px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.badge-on { background: #ecfdf3; color: #0e7c4b; }
.badge-off { background: #f1f3f6; color: #6b7280; }
.badge-warn { background: #fff7e6; color: #b45309; }
.score-input { width: 62px; text-align: right; padding: 4px 5px !important; }
.score-table td { padding: 4px 5px; }
/* 学生成绩明细：数据列统一居中，字号与表头一致；考试名称单独左对齐 */
.score-table th, .score-table td { text-align: center; }
.score-table td.exam-cell { text-align: left; }
.score-table td.cell-num, .score-table td.cell-sm { text-align: center; }
.score-table .total-num { font-size: 13px; font-variant-numeric: tabular-nums; }
.score-table .rk-badge, .score-table .comb-badge { font-size: 13px; }
.score-table td.cell-num { font-variant-numeric: tabular-nums; }
.raw-score-cell { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.conv { font-size: 11px; color: #6b7280; white-space: nowrap; }
.rk { color: #9aa5b5; }
.paper-box summary { cursor: pointer; color: #1d4ed8; font-size: 12.5px; }
.exam-edit-box { margin-top: 22px; padding: 14px; border: 1px solid #dbe3ef; border-radius: 10px; background: #f8fafc; }
.exam-edit-box h3 { margin-top: 0; margin-bottom: 10px; }
.paper-item { display: inline-flex; align-items: center; gap: 4px; margin: 2px 8px 2px 0; font-size: 12.5px; }
.paper-item input { width: 56px; }
.check-item { font-size: 13px; }
.chart { width: 100%; height: 260px; }
.chart.tall { height: 340px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } }
h4 { margin: 12px 0 4px; font-size: 14px; }

/* ---- 登录界面配置 ---- */
.login-logo { width: 76px; height: 76px; object-fit: contain; margin: 0 auto 10px; display: block; }
.logo-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.logo-img { width: 90px; height: 90px; object-fit: contain; border: 1px solid #eef1f6; border-radius: 12px; background: #fff; }

/* ---- 组合编辑 ---- */
.link { color: #1d4ed8; cursor: pointer; font-size: 12.5px; }
.edit-form { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; margin-top: 8px; display: grid; gap: 8px; width: 260px; }
.edit-form label { display: block; font-size: 12px; color: #57647a; margin-bottom: 2px; }
.edit-form input[type=text], .edit-form input[type=number] { width: 100%; }
.edit-form .checkbox-grid { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.edit-form .btn-primary { margin-top: 4px; }

/* ---- 留言板 ---- */
.suggest-form textarea { width: 100%; box-sizing: border-box; }
.suggest-item { border: 1px solid #eef1f6; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.suggest-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.suggest-content { font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.suggest-reply { margin-top: 10px; background: #f0f6ff; border-left: 3px solid #1d4ed8; border-radius: 6px; padding: 8px 12px; font-size: 13.5px; line-height: 1.6; }
.suggest-ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.suggest-ops form input[type=text] { width: 240px; }

/* ---- 班级对比 ---- */
.cell-high { color: #1d4ed8; font-weight: 700; }

/* ---- 榜单分区布局 ---- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.stat-box { background: #fff; border: 1px solid #eef1f6; border-radius: 12px; padding: 14px 16px; }
.stat-box b { display: block; font-size: 12px; color: #8a94a6; font-weight: 500; margin-bottom: 6px; }
.stat-box span { font-size: 20px; font-weight: 700; color: #1c2b3f; }
.stat-box em { display: block; font-style: normal; font-size: 12.5px; color: #57647a; margin-top: 4px; }
.rank-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; margin-top: 16px; align-items: start; }
.rank-row .card { margin-top: 0; }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 10px; }
.subj-card { border: 1px solid #eef1f6; border-radius: 12px; padding: 10px 12px; background: #fafbfd; }
.subj-card h4 { margin: 0 0 8px; font-size: 14px; color: #1c2b3f; }
@media (max-width: 900px) {
    .rank-row { grid-template-columns: 1fr; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---- 导出按钮 ---- */
.btn-export { display: inline-block; margin-left: 12px; padding: 5px 12px; font-size: 12px; font-weight: 500;
    color: #1d4ed8; background: #eef4ff; border: 1px solid #cddfff; border-radius: 8px; text-decoration: none; vertical-align: middle; text-align: center; line-height: 1.5; }
.btn-export:hover { background: #dce9ff; }
h3 { display: flex; align-items: center; flex-wrap: wrap; }

/* ---- 科目排序按钮 ---- */
.btn-sort { display: inline-block; width: 22px; height: 22px; padding: 0; margin: 1px;
    font-size: 12px; line-height: 20px; text-align: center; color: #333;
    background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 4px; cursor: pointer; text-decoration: none; vertical-align: middle; }
.btn-sort.on { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.detail-sort { display: inline-flex; justify-content: center; gap: 2px; margin-top: 2px; vertical-align: middle; }
.detail-sort a { display: inline-block; width: 13px; height: 13px; line-height: 11px; padding: 0; font-size: 9px; text-align: center; color: #334155; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 3px; text-decoration: none; }
.detail-sort a.on { color: #fff; background: #1d4ed8; border-color: #1d4ed8; }
.detail-sort a:hover { background: #e2e8f0; border-color: #94a3b8; }
.btn-sort:hover { background: #e5e7eb; border-color: #9ca3af; }
td .inline-form { display: inline-block; }

/* ---- 批量升级 / 毕业归档 ---- */
.upg-wrap { padding: 12px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; }
.upg-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.upg-row label { font-size: 13px; color: #475569; }
.upg-preview { margin-top: 8px; padding: 10px 12px; background: #fff; border: 1px dashed #cbd5e1; border-radius: 6px; font-size: 13px; color: #334155; }
.upg-preview table { margin-top: 6px; }
.upg-preview .ok { color: #15803d; font-weight: 500; }
.upg-preview .no { color: #b91c1c; }
.btn-warn { background: #b45309; }
.btn-warn:hover { background: #92400e; }

/* ---- 批量操作折叠面板（弱化） ---- */
.batch-card { padding-bottom: 4px; }
.batch-ops summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #64748b;
    padding: 8px 10px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; list-style: none; }
.batch-ops summary::-webkit-details-marker { display: none; }
.batch-ops summary::before { content: '▸ '; }
.batch-ops[open] summary::before { content: '▾ '; }
.batch-hint { margin-left: 8px; font-weight: 400; color: #94a3b8; font-size: 12px; }
.upg-title { margin: 0 0 8px; font-size: 13px; color: #475569; }
.btn-weak { display: inline-block; padding: 5px 14px; font-size: 12px; font-weight: 500;
    color: #64748b; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; cursor: pointer; }
.btn-weak:hover { background: #f1f5f9; color: #334155; }
.btn-warn-outline { color: #b45309; border-color: #fcd34d; }
.btn-warn-outline:hover { background: #fffbeb; color: #92400e; }
.btn-danger-outline { color: #b91c1c; border-color: #fca5a5; }
.btn-danger-outline:hover { background: #fef2f2; }

/* ---- 学生列表批量选择 ---- */
.batch-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0 12px;
    padding: 8px 12px; background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; }
.batch-bar .inline-form { margin: 0; }
#sel_cnt { font-weight: 600; color: #334155; }
.hidden { display: none !important; }
tr.row-sel { background: #eff6ff !important; }
.row-sel td:first-child input { outline: 2px solid #3b82f6; }

/* ---- 右上角个人设置入口 ---- */
.head-link { font-size: 13px; color: #3b82f6; text-decoration: none; padding: 5px 12px;
    border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; }
.head-link:hover { background: #dbeafe; }

/* ---- 账号管理权限说明 ---- */
.perm-note { margin: 14px 0 4px; padding: 12px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; }
.perm-note h4 { margin: 0 0 8px; font-size: 13px; color: #334155; }

/* ---- 批量勾选行高亮 ---- */
.srow.selected { background: #eff6ff; }
.srow.selected td:first-child { border-left: 3px solid #2563eb; }

/* ---- 表格内容居中 ---- */
.data-table.center td { text-align: center; }

/* ---- 移动端适配 ---- */
@media (max-width: 900px) {
    .dash-main { padding: 16px 14px; }
    .card { padding: 16px 14px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .checkbox-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    /* 侧边栏改顶部横向导航 */
    .dash-wrap { flex-direction: column; }
    .dash-side { width: 100%; flex-direction: row; align-items: center; }
    .dash-logo { border-bottom: 0; border-right: 1px solid #2c3d54; padding: 13px 12px; font-size: 14px; white-space: nowrap; }
    .dash-side nav { display: flex; overflow-x: auto; flex: 1; padding: 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .dash-side nav::-webkit-scrollbar { display: none; }
    .dash-side nav a { padding: 14px 12px; white-space: nowrap; }
    .dash-user { display: flex; align-items: center; padding: 0 10px; border-top: 0; flex: none; }
    .dash-user span { display: none; }
    .dash-user a { margin-left: 0; white-space: nowrap; font-weight: 600; }
    .dash-main { padding: 12px 10px; }
    .dash-head { margin-bottom: 12px; }
    .dash-head h2 { font-size: 17px; }
    .head-link { padding: 4px 10px; font-size: 12px; }
    /* 卡片内容超宽时内部横向滚动（榜单光荣榜/学生列表等） */
    .card { padding: 14px 12px; border-radius: 10px; overflow-x: auto; }
    .rank-grid > *, .stat-grid > * { min-width: 0; }
    .card table.data-table { max-width: 100%; }
    .filter-bar { gap: 8px; }
    .filter-bar select, .filter-bar input[type=text], .filter-bar input[type=password],
    .filter-bar input[type=number], .filter-bar input[type=date], .filter-bar input[type=file] { flex: 1 1 auto; min-width: 0; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .rank-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .edit-form { width: 100%; }
    .suggest-ops form input[type=text] { width: 100%; }
    .page-tabs a { padding: 5px 10px; font-size: 13px; }
    .data-table { font-size: 12px; }
    .score-table .total-num, .score-table .rk-badge, .score-table .comb-badge { font-size: 12px; }
    .score-input { width: 54px; }
    .conv { font-size: 10px; }
    .btn-export { margin-left: 8px; }
    .batch-ops summary { font-size: 12.5px; }
    .batch-bar { gap: 6px 10px; }
    .batch-bar .btn-primary, .batch-bar .btn-weak, .batch-bar .btn-danger { flex: 1 1 auto; text-align: center; }
}
@media (max-width: 480px) {
    .login-card { width: 100%; padding: 24px 20px 18px; }
    .login-brand h1 { font-size: 21px; }
    .setup-card { padding: 22px 16px; }
    .setup-steps { font-size: 12px; }
    .checkbox-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: 1fr; }
    .stat-row { grid-template-columns: 1fr; }
    .chart { height: 220px; }
    .chart.tall { height: 280px; }
    .dash-head h2 { font-size: 16px; }
    .info-table td { padding: 6px 6px; font-size: 13px; }
    .upg-row { flex-direction: column; align-items: stretch; }
    .upg-row .btn-primary, .upg-row .btn-weak { width: 100%; }
    .setup-actions { flex-direction: column; }
    .setup-actions .btn-primary { width: 100%; }
    .suggest-head { flex-wrap: wrap; }
    .dash-logo { font-size: 13px; padding: 12px 10px; }
    .dash-side nav a { padding: 13px 10px; font-size: 13px; }
    .btn-export { display: block; margin: 6px 0 0; }
    .inline-form { width: 100%; }
}
/* ---- 学生个人中心（专业版） ---- */
.stu-card { overflow: hidden; }
.stu-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.stu-avatar { width: 58px; height: 58px; border-radius: 16px; flex: none;
    background: linear-gradient(135deg, #1d4ed8, #60a5fa); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 700; box-shadow: 0 6px 14px rgba(29,78,216,.25); }
.stu-meta h2 { font-size: 20px; color: #1c2b3f; }
.stu-idbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 9px; }
.stu-idbar span { color: #7a8699; font-size: 12.5px; }
.stu-idbar b { color: #1c2b3f; font-size: 14px; font-weight: 600; margin-right: 18px; }
.stu-summary { margin-left: auto; display: flex; gap: 30px; flex-wrap: wrap; padding-right: 6px; }
.su-item { text-align: center; min-width: 64px; }
.su-item b { display: block; font-size: 22px; color: #1d4ed8; font-weight: 700; }
.su-item span { font-size: 12px; color: #7a8699; }
.stu-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.stat-card { background: #f8fafc; border: 1px solid #eef1f6; border-radius: 12px; padding: 14px 8px; text-align: center; }
.stat-card b { display: block; font-size: 22px; font-weight: 700; }
.stat-card span { font-size: 12.5px; color: #64748b; }
.sc-blue b { color: #1d4ed8; } .sc-green b { color: #0e9f6e; } .sc-orange b { color: #d97706; } .sc-gray b { color: #475569; }
.exam-cell { min-width: 168px; }
.exam-name { font-weight: 600; font-size: 13px; line-height: 1.3; }
.exam-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.exam-type { font-size: 11px; padding: 1px 8px; border-radius: 10px; color: #fff; white-space: nowrap; }
.et-moon { background: #3b82f6; } .et-mid { background: #8b5cf6; } .et-fin { background: #0e9f6e; }
.comb-badge { display: inline-block; font-size: 11.5px; color: #1d4ed8; background: #eef4ff; border: 1px solid #d6e4ff; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.total-num { color: #1d4ed8; font-size: 14px; }
.rk-badge { display: inline-block; min-width: 26px; text-align: center; font-size: 12px; font-weight: 600; border-radius: 10px; padding: 1px 7px; }
.r-good { background: #ecfdf3; color: #0e9f6e; }
.r-blue { background: #eef4ff; color: #1d4ed8; }
.r-mid { background: #fff7e6; color: #d97706; }
.r-late { background: #f1f3f6; color: #6b7280; }
.r-plain { background: #f1f3f6; color: #6b7280; }
.chart-sub { font-size: 12px; font-weight: 400; color: #9aa5b5; margin-left: 6px; }
.rate-cell { min-width: 140px; }
.rate-bar { width: 100%; height: 8px; background: #eef1f6; border-radius: 6px; overflow: hidden; }
.rate-fill { height: 100%; border-radius: 6px; transition: width .3s; }
.rf-g { background: linear-gradient(90deg, #0e9f6e, #34d399); }
.rf-b { background: linear-gradient(90deg, #1d4ed8, #60a5fa); }
.rf-o { background: linear-gradient(90deg, #d97706, #f59e0b); }
@media (max-width: 768px) {
    .stu-summary { margin-left: 0; gap: 18px; padding-top: 8px; }
    .stu-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .rate-cell { min-width: 110px; }
}
@media (max-width: 480px) {
    .stu-hero { gap: 12px; }
    .stu-avatar { width: 48px; height: 48px; font-size: 22px; border-radius: 13px; }
    .stu-meta h2 { font-size: 17px; }
    .su-item b { font-size: 19px; }
}
/* ---- 科目分析：桌面徽章入科目列 ---- */
.subject-table .subj-name { white-space: nowrap; }
.subject-table .subj-name .badge { margin-left: 8px; }
.subject-table .subj-tip { min-width: 220px; }
.dir-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px;
    font-weight: 600; margin-right: 8px; white-space: nowrap; vertical-align: middle; }
.dir-up { background: #e8f7ef; color: #16a34a; border: 1px solid #b7ebcf; }
.dir-fix { background: #fef3e7; color: #ea7317; border: 1px solid #fcd9b8; }
.dir-mid { background: #eef3fb; color: #3b82f6; border: 1px solid #d3e2fb; }
.dir-text { font-size: 12.5px; color: #475569; line-height: 1.5; }
/* ---- 整体成绩分析与建议 ---- */
.overall-card { background: linear-gradient(180deg, #fbfcff 0%, #fff 60%); }
.overall-tags { margin: 4px 0 12px; }
.overall-tags .dir-badge { font-size: 13px; padding: 4px 12px; }
.overall-points { margin: 0 0 12px; padding-left: 18px; }
.overall-points li { font-size: 13px; color: #33415a; line-height: 1.9; }
.overall-advice { display: flex; flex-direction: column; gap: 8px; }
.oa-item { display: flex; align-items: flex-start; background: #f8fafc; border: 1px solid #eef1f6;
    border-radius: 10px; padding: 9px 12px; }
.oa-item .dir-badge { flex: none; margin-top: 1px; }
.oa-item .dir-text { font-size: 13px; }
/* ---- 列表分页 ---- */
.pager { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pager a { padding: 6px 12px; border: 1px solid #d7deea; border-radius: 6px; font-size: 13px; color: #33415a; text-decoration: none; background: #fff; }
.pager a:hover { border-color: #3b82f6; color: #3b82f6; }
.pager-cur { font-size: 13px; color: #64748b; }
/* ---- 统计报表：排名分组 ---- */
.rg-block { margin-bottom: 16px; }
.rg-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.rg-name { font-size: 14px; }
.rg-sub { font-size: 12px; color: #9aa5b5; font-weight: 400; }
.data-table th { white-space: nowrap; }
.data-table td.cell-num { min-width: 44px; }
/* ---- 历史年级名次走势 ---- */
.hist-archive summary { cursor: pointer; font-size: 15px; font-weight: 600; color: #1f2b3d; list-style-position: outside; }
.hist-archive summary .chart-sub { margin-left: 8px; font-weight: 400; }
.hist-archive[open] summary { margin-bottom: 4px; }
.hist-block { margin-bottom: 14px; }
.hist-block .chart { height: 210px; }
.hist-title { font-size: 13px; font-weight: 600; color: #33415a; margin: 2px 0 6px; }
@media (max-width: 768px) {
    /* 手机端卡片化 */
    .subject-table { display: block; }
    .subject-table thead { display: none; }
    .subject-table tbody { display: block; }
    .subject-table tr { display: block; border: 1px solid #eef1f6; border-radius: 12px;
        padding: 10px 12px 12px; margin-bottom: 10px; background: #fff;
        box-shadow: 0 2px 8px rgba(16,42,78,.06); }
    .subject-table td { display: block; border: 0; padding: 0; text-align: left; }
    .subject-table td.cell-num, .subject-table td.cell-sm { background: #fff; }
    .subject-table .subj-name { display: flex; align-items: center; justify-content: space-between; }
    .subject-table .subj-name b { font-size: 15px; color: #1c2b3f; }
    .subject-table .subj-name .badge { margin-left: 8px; }
    .subject-table td:nth-child(2),
    .subject-table td:nth-child(3),
    .subject-table td:nth-child(4) {
        display: inline-block; margin-top: 8px; margin-right: 14px; }
    .subject-table td:nth-child(2)::before { content: '最新 '; color: #9aa5b5; font-size: 12px; }
    .subject-table td:nth-child(3)::before { content: '得分率 '; color: #9aa5b5; font-size: 12px; }
    .subject-table td:nth-child(4)::before { content: '较首次 '; color: #9aa5b5; font-size: 12px; }
    .subject-table td.cell-num .conv { font-size: 10px; }
    .subject-table .rate-cell { margin-top: 10px; }
    .subject-table .subj-tip { margin-top: 8px; padding: 8px 10px; background: #f8fafc;
        border-radius: 8px; border-left: 3px solid #3b82f6; font-size: 12.5px; color: #475569; line-height: 1.5; }
    .dir-badge { margin-right: 6px; }
    .dir-text { display: block; margin-top: 4px; }
}








/* ===== 榜单管理 / 统计报表（2026-11 改版 v2） ===== */
.rk-label { font-size: 13px; color: #5b6472; margin-right: -2px; }
.rk-hint { font-size: 12.5px; color: #94a0b0; line-height: 1.6; }
.rk-export-all { margin-left: auto; }
.rk-picker-form { gap: 10px; flex-wrap: wrap; }
.rk-stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); gap: 14px; }

/* ===== 榜单管理：方块瓦片布局 v3（2026-11） ===== */

/* 年级分区 */
.rk-grade { background: #fff; border-radius: 18px; padding: 20px 22px 4px; margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(16,32,64,.04), 0 10px 26px rgba(16,32,64,.05); }
.rk-grade-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 0 0 14px; border-bottom: 1px solid #edf1f7; margin-bottom: 18px; }
.rk-grade-name { font-size: 20px; font-weight: 700; color: #16233a; letter-spacing: .6px;
    display: flex; align-items: baseline; gap: 9px; padding-left: 12px; position: relative; }
.rk-grade-name::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px;
    border-radius: 3px; background: var(--gk, #2f6fed); opacity: .9; }
.rk-grade-name small { font-size: 11.5px; font-weight: 400; color: #a7b1c0; letter-spacing: .4px; }
.rk-grade-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.rk-grade-meta span { font-size: 12px; color: #78849a; background: #f5f8fc; border-radius: 20px;
    padding: 3px 12px; line-height: 1.5; white-space: nowrap; }
.rk-grade-meta b { color: #1c2b45; font-weight: 700; font-variant-numeric: tabular-nums; margin-left: 3px; }

/* 分组标题 */
.rk-sec { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600;
    color: #48566e; margin: 2px 0 14px; letter-spacing: .4px; }
.rk-sec::after { content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, #e9eef6, rgba(233,238,246,0)); }
.rk-sec-dot { width: 4px; height: 13px; border-radius: 3px; background: var(--gk, #2f6fed); }

/* 方块网格：等宽等高的方形瓦片 */
.rk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(296px, 1fr)); gap: 16px; margin-bottom: 28px; }

.rk-card { position: relative; display: flex; flex-direction: column; align-self: start;
    aspect-ratio: 1 / 1; min-height: 292px; background: #fff;
    border: 1px solid #e6ecf4; border-radius: 14px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(16,32,64,.04), 0 6px 16px rgba(16,32,64,.04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.rk-card:hover { transform: translateY(-3px); border-color: #dde5f0;
    box-shadow: 0 14px 32px rgba(16,32,64,.12); }
.rk-card::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: var(--k, #2f6fed); }

.rk-card-head { display: flex; align-items: center; gap: 7px; padding: 12px 13px 10px;
    background: var(--kb, #f8fafd); border-bottom: 1px solid #eff3f9; }
.rk-card-head h4 { display: flex; align-items: baseline; gap: 6px; margin: 0; flex: none;
    font-size: 17px; font-weight: 700; color: var(--k, #16233a); letter-spacing: .5px; }
.rk-card-head h4 em { font-style: normal; font-size: 10px; font-weight: 400; color: #8a96a9;
    background: #fff; border: 1px solid #e7edf5; border-radius: 20px; padding: 1px 7px; letter-spacing: 0; }
.rk-card-cnt { margin-left: auto; font-size: 10px; color: #97a3b5; white-space: nowrap;
    font-variant-numeric: tabular-nums; }
.rk-card-export { font-size: 10px; color: #7b8798; text-decoration: none; padding: 2px 8px;
    border-radius: 20px; border: 1px solid #e4eaf3; background: #fff; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s; }
.rk-card-export:hover { background: var(--k, #2f6fed); border-color: var(--k, #2f6fed); color: #fff; }

/* 名次行：10 行均分瓦片剩余高度 */
.rk-list { list-style: none; margin: 0; padding: 5px 9px 7px; flex: 1;
    display: flex; flex-direction: column; min-height: 0; }
.rk-line { display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-height: 0; overflow: hidden;
    padding: 0 7px; border-radius: 8px; font-size: 13.5px; }
.rk-line + .rk-line::before { content: ''; position: absolute; left: 7px; right: 7px; top: 0; height: 1px;
    background: #f2f5fa; }
.rk-line { position: relative; }
.rk-line.rk-no1 { background: linear-gradient(90deg, #fff8e7, rgba(255,248,231,0)); }

.rk-rank { width: 21px; height: 21px; line-height: 21px; flex: none; border-radius: 50%;
    text-align: center; font-size: 11px; font-weight: 600; color: #a6b1c1; background: #f3f6fb;
    font-variant-numeric: tabular-nums; }
.rk-line.rk-no1 .rk-rank { background: linear-gradient(135deg, #f7d474, #e0a92c); color: #5c4000; font-weight: 700; }
.rk-line.rk-no2 .rk-rank { background: linear-gradient(135deg, #dfe6ee, #c2ccd8); color: #414f5f; font-weight: 700; }
.rk-line.rk-no3 .rk-rank { background: linear-gradient(135deg, #f0c9a8, #d79a68); color: #6a3f22; font-weight: 700; }

.rk-name { color: #172338; font-weight: 600; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; max-width: 46%; letter-spacing: .2px; }
.rk-cls { color: #a3adbd; font-size: 11px; white-space: nowrap; font-weight: 400; }
.rk-score { margin-left: auto; font-size: 15px; font-weight: 700; color: #16233a;
    font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.rk-score em { font-style: normal; font-size: 10px; color: #acb6c4; margin-left: 4px;
    font-weight: 400; letter-spacing: 0; }

.rk-empty { color: #a9b3c0; font-size: 12px; padding: 16px 8px; text-align: center; }
.rk-card-comb .rk-card-head { background: var(--kb, #fbfaf7); }

/* 显示条数可全局设定：不是 10 条时取消正方形，按内容自适应高度，保证每一行可读 */
.rk-grid.rk-auto .rk-card { aspect-ratio: auto; min-height: 0; }
.rk-grid.rk-auto .rk-list { flex: 0 0 auto; }
.rk-grid.rk-auto .rk-line { flex: 0 0 auto; min-height: 26px; padding: 3px 7px; }

@media (max-width: 1280px) {
    .rk-grid { grid-template-columns: repeat(auto-fill, minmax(266px, 1fr)); gap: 14px; }
    .rk-card { min-height: 266px; }
}
@media (max-width: 900px) {
    .rk-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .rk-card { aspect-ratio: auto; min-height: 0; }
    .rk-line { min-height: 26px; }
    .rk-grade { padding: 18px 16px 4px; }
    .rk-grade-head { gap: 12px; }
}
.rk-foot { margin: 4px 2px 12px; line-height: 1.8; color: #94a0b0; font-size: 12.5px; }

/* 统计报表：全量表格 */
.rk-full-table { max-height: 70vh; overflow: auto; border: 1px solid #eff2f7; border-radius: 12px; }
.rk-full-table thead th { position: sticky; top: 0; z-index: 2; background: #f8fafc; font-weight: 600;
    color: #4b5768; font-size: 12.5px; letter-spacing: .3px; border-bottom: 1px solid #e8edf4; }
.rk-full-table tbody td { font-size: 13px; border-bottom: 1px solid #f4f6fa; }
.rk-full-table tbody tr.rk-top1 .cell-num b { color: #b3841a; }
.rk-full-table tbody tr.rk-top2 .cell-num b { color: #7a8492; }
.rk-full-table tbody tr.rk-top3 .cell-num b { color: #a5683c; }


/* 统计表格：固定列宽 + 上限宽度，避免姓名列被拉成一片空白 */
.rk-full-wrap { max-width: 100%; margin-left: auto; margin-right: auto; }
.rk-full-wrap.rk-class-wrap { max-width: 100%; }
.rk-full-table table.data-table { table-layout: fixed; width: 100%; }
.rk-full-table table.data-table th, .rk-full-table table.data-table td { padding-top: 9px; padding-bottom: 9px; }
.rk-full-table table.data-table.rk-class-detail { table-layout: fixed; width: 100%; min-width: 0; }
.rk-full-table table.data-table.rk-class-detail th, .rk-full-table table.data-table.rk-class-detail td { width: auto; }
.rk-full-table table.data-table.rk-class-detail th:nth-child(1), .rk-full-table table.data-table.rk-class-detail td:nth-child(1) { width: 52px; text-align: center; }
.rk-full-table table.data-table.rk-class-detail th:nth-child(2), .rk-full-table table.data-table.rk-class-detail td:nth-child(2) { width: 100px; text-align: center; }
.rk-full-table table.data-table.rk-class-detail th:nth-child(3), .rk-full-table table.data-table.rk-class-detail td:nth-child(3) { width: 90px; text-align: left; }
.rk-full-table table.data-table.rk-class-detail th:nth-child(n+4), .rk-full-table table.data-table.rk-class-detail td:nth-child(n+4) { min-width: 54px; text-align: center; }
.rk-full-table table.data-table.rk-class-detail th:nth-last-child(2), .rk-full-table table.data-table.rk-class-detail td:nth-last-child(2), .rk-full-table table.data-table.rk-class-detail th:last-child, .rk-full-table table.data-table.rk-class-detail td:last-child { width: 92px; min-width: 92px; }
.rk-full-table table.data-table.rk-class-detail th { font-size: 12px; }
.rk-full-table table.data-table.rk-class-detail th:nth-child(n+5), .rk-full-table table.data-table.rk-class-detail td:nth-child(n+5) { text-align: center; padding-left: 4px; padding-right: 4px; }
.rk-full-table table.data-table.rk-class-detail td.cell-num { padding-right: 6px; }
.rk-full-table { scrollbar-gutter: stable; }
.rk-full-table table.data-table th:nth-child(1), .rk-full-table table.data-table td:nth-child(1) { width: 64px; text-align: center; }
.rk-full-table table.data-table th:nth-child(2), .rk-full-table table.data-table td:nth-child(2) { width: 112px; text-align: left; }
.rk-full-table table.data-table th:nth-child(3), .rk-full-table table.data-table td:nth-child(3) { width: 300px; text-align: left; }
.rk-full-table table.data-table th:nth-child(4), .rk-full-table table.data-table td:nth-child(4) { width: 96px; text-align: center; }
.rk-full-table table.data-table th:nth-child(5), .rk-full-table table.data-table td:nth-child(5) { width: 96px; }
.rk-full-table table.data-table th:nth-child(6), .rk-full-table table.data-table td:nth-child(6) { width: 80px; }
.rk-full-table table.data-table th:nth-child(7), .rk-full-table table.data-table td:nth-child(7) { width: 100px; }
.rk-full-table table.data-table th:nth-child(8), .rk-full-table table.data-table td:nth-child(8) { width: 100px; }
.rk-full-table table.data-table th:nth-child(n+5) { text-align: right; padding-right: 18px; }
.rk-full-table table.data-table td.cell-num { text-align: right; padding-right: 18px; font-variant-numeric: tabular-nums; }
.rk-full-table table.data-table td:nth-child(1) { text-align: center; padding-right: 0; }
.rk-full-table table.data-table td:nth-child(2) { font-variant-numeric: tabular-nums; color: #7b8598; }

/* ===== 学生档案（后台查学生） ===== */
.stu-open-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.stu-open-id{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.stu-open-id h2{font-size:20px;margin:0}
.stu-open-nav{display:flex;align-items:center;gap:8px;color:#64748b;font-size:13px}
.stu-open-nav b{color:#1f2937}
.stu-open-id span{color:#64748b;font-size:13px}
.stu-open-id span b{color:#1f2937}
.rk-q{width:180px}


/* ===== 2026-11 全站移动端优化 ===== */
body { -webkit-text-size-adjust: 100%; }
.nav-toggle { display: none; }
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; overscroll-behavior-x: contain; }
.table-scroll table.data-table { margin-top: 0; }
.table-scroll-hint { display: none; color: #94a0b0; font-size: 12px; text-align: center;
    padding: 5px 0 1px; letter-spacing: .2px; }
.filter-item { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.filter-item > label { flex: none; white-space: nowrap; }
.filter-item > select, .filter-item > input, .filter-item > textarea { flex: 1 1 auto; min-width: 0; }

@media (max-width: 768px) {
    /* 顶栏：Logo + 菜单按钮 + 退出；导航收进抽屉，避免横向挤满 */
    .dash-side { position: sticky; top: 0; z-index: 30; width: 100%;
        flex-direction: row; flex-wrap: wrap; align-items: center;
        box-shadow: 0 4px 16px rgba(16,32,64,.16); }
    .dash-logo { flex: 1 1 auto; min-width: 0; border: 0; border-radius: 0;
        padding: 12px 14px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .nav-toggle { order: 2; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
        width: 42px; height: 40px; margin: 0 4px; padding: 0; border: 1px solid #3a4d67;
        border-radius: 9px; background: #253750; cursor: pointer; flex: none; }
    .nav-toggle span { display: block; width: 19px; height: 2px; margin: 2.5px 0;
        border-radius: 2px; background: #fff; }
    .dash-side.nav-open .nav-toggle { background: #1d4ed8; border-color: #1d4ed8; }
    .dash-user { order: 3; display: flex; align-items: center; padding: 0 12px 0 4px;
        border-top: 0; flex: none; }
    .dash-user span { display: none; }
    .dash-user a { margin-left: 0; padding: 5px 7px; font-size: 13px; white-space: nowrap; }
    .dash-side nav { order: 4; flex: 0 0 100%; display: none; flex-direction: column;
        overflow: visible; padding: 8px 0 10px; border-top: 1px solid #2c3d54;
        background: #1c2b3f; }
    .dash-side.nav-open nav { display: flex; }
    .dash-side nav a { display: block; padding: 12px 20px; font-size: 14px; white-space: nowrap; }
    .dash-side nav a.on { background: #1d4ed8; }
    .dash-main { padding: 12px 10px 24px; }
    .dash-head { margin-bottom: 12px; }
    .head-link { padding: 5px 10px; font-size: 12px; }

    /* 筛选栏：标签 + 控件成组，手机端一组一行，不再错位 */
    .filter-bar { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; width: 100%; }
    .filter-bar .filter-item { flex: 1 1 100%; flex-direction: row; justify-content: space-between;
        gap: 10px; padding: 0; }
    .filter-bar .filter-item > label { font-size: 13px; color: #5b6472; }
    .filter-bar .filter-item > select, .filter-bar .filter-item > input {
        flex: 0 1 72%; min-width: 0; max-width: 72%; }
    .filter-bar .rk-hint { flex: 1 1 100%; margin-top: 2px; }
    .filter-bar > .btn-primary, .filter-bar > .btn-export, .filter-bar > .btn-plain,
    .filter-bar > button, .filter-bar > a { flex: 1 1 auto; text-align: center; }
    .filter-bar > .btn-export { margin-left: 0; }

    /* 设置页 tab 横向滚动，避免三行挤在一起 */
    .page-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
        scrollbar-width: none; padding-bottom: 9px; }
    .page-tabs::-webkit-scrollbar { display: none; }
    .page-tabs a { flex: none; white-space: nowrap; }

    .table-scroll { margin: 0 -2px; padding-bottom: 2px; }
    .table-scroll.is-scrollable + .table-scroll-hint { display: block; }
    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding-left: 6px; padding-right: 6px; }
    .btn-export { margin-left: 6px; }
    .rk-grade { padding: 16px 12px 4px; border-radius: 14px; }
    .rk-grade-head { gap: 10px; padding-bottom: 11px; margin-bottom: 13px; }
    .rk-grade-name { font-size: 18px; }
    .rk-grade-meta span { font-size: 11px; padding: 2px 9px; }
    .rk-grid { grid-template-columns: 1fr; gap: 12px; }
    .rk-card { border-radius: 12px; }
    .rk-card-head { padding: 11px 12px 9px; }
    .rk-line { font-size: 13px; }
    .stat-row { gap: 10px; }
}

@media (max-width: 480px) {
    /* 手机上输入框用 16px，避免 iPhone 聚焦时页面自动放大 */
    .login-card input[type=text], .login-card input[type=password],
    .card input[type=text], .card input[type=password], .card input[type=number],
    .card input[type=date], .card input[type=url], .card select, .card textarea,
    .filter-bar input, .filter-bar select { font-size: 16px; }
    .card form > label { display: block; margin: 9px 0 4px; }
    .card form > input[type=text]:not(.score-input):not(.tiny):not(.small),
    .card form > input[type=password]:not(.score-input):not(.tiny):not(.small),
    .card form > input[type=url]:not(.score-input):not(.tiny):not(.small),
    .card form > input[type=number]:not(.score-input):not(.tiny):not(.small) { width: 100%; }
    .btn-primary, .btn-plain, .btn-export, .btn-danger, .btn-weak { min-height: 40px;
        display: inline-flex; align-items: center; justify-content: center; }
    .btn-export { display: flex; margin: 7px 0 0; }
    .card { padding: 14px 12px; border-radius: 10px; }
    .dash-head h2 { font-size: 17px; }
    .head-link { font-size: 12px; }
    .stu-open-bar { gap: 10px; }
    .stu-open-nav { width: 100%; justify-content: flex-start; }
    .stu-open-nav a { min-height: 36px; }
    .overall-points li { font-size: 12.5px; line-height: 1.75; }
    .oa-item { padding: 8px 10px; }
    .table-scroll-hint { font-size: 11.5px; }
}

@media (max-width: 480px) {
    .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-box { padding: 11px 10px; }
    .stat-box span { font-size: 18px; }
}

@media (max-width: 768px) {
    .stat-row.rk-stat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 481px) and (max-width: 768px) {
    .rk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .table-scroll table.data-table.center { min-width: 520px; }
}

/* 榜单管理页内的「每栏显示前 N 名」设置 */
.rk-top-setting { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
    margin-top: 12px; padding-top: 11px; border-top: 1px solid #eef1f6; }
.rk-top-setting form { margin: 0; }
.rk-top-setting .tip { margin: 0; flex: 1 1 280px; }
@media (max-width: 768px) {
    .rk-top-setting { align-items: flex-start; gap: 8px; }
    .rk-top-setting form { width: 100%; flex-wrap: wrap; }
    .rk-top-setting .tip { flex: 1 1 100%; }
}

/* 组合列表：排序输入框与保存按钮同一行 */
.sort-combo-form { display: inline-flex !important; align-items: center; gap: 4px; flex-wrap: nowrap; }
.sort-combo-form input.tiny { width: 56px; padding: 4px 6px; text-align: center; }
.sort-combo-form .btn-status { padding: 4px 9px; font-size: 12px; line-height: 1.5; white-space: nowrap; }
@media (max-width: 768px) {
    .sort-combo-form input.tiny { width: 52px; }
}

/* 组合列表：保存按钮移到科目列右侧 */
.subject-sort-row { display: flex; align-items: center; gap: 10px; }
.subject-names { flex: 1 1 auto; }
.btn-sort-save { flex: 0 0 auto; white-space: nowrap; padding: 4px 12px; font-size: 12px; line-height: 1.5; }
.sort-combo-form input.tiny { width: 58px; }
/* 组合列表：排序输入框 + 保存按钮紧挨在同一行右侧，间距 2px */
.sort-combo-form { display: inline-flex !important; align-items: center; gap: 2px; flex-wrap: nowrap; }
.sort-combo-form input.tiny { width: 52px; padding: 3px 4px; text-align: center; }
.sort-combo-form .btn-status { padding: 3px 7px; font-size: 12px; line-height: 1.5; white-space: nowrap; flex: 0 0 auto; }
/* 组合列表排序：整格不换行，输入框与保存按钮间距 = 1 个汉字宽（12px） */
.data-table td.cell-sort { white-space: nowrap; }
.data-table td.cell-sort .inline-form { display: inline-flex !important; align-items: center; gap: 12px; flex-wrap: nowrap; }
.data-table td.cell-sort input.tiny { width: 44px; padding: 3px 4px; text-align: center; flex: 0 0 auto; }
.data-table td.cell-sort .btn-status { padding: 3px 8px; font-size: 12px; line-height: 1.5; white-space: nowrap; flex: 0 0 auto; min-width: 44px; }
/* 组合列表：固定列宽，排序输入框与保存按钮在格内同一行，间隔 1 个汉字宽 */
.combs-table { table-layout: fixed; width: 100%; }
.combs-table th:nth-child(1), .combs-table td:nth-child(1) { width: 54px; }
.combs-table th:nth-child(2), .combs-table td:nth-child(2) { width: 96px; }
.combs-table th:nth-child(3), .combs-table td:nth-child(3) { width: 130px; }
.combs-table th:nth-child(4), .combs-table td:nth-child(4) { width: 86px; }
.combs-table th:nth-child(6), .combs-table td:nth-child(6) { width: 132px; }
.combs-table th:nth-child(7), .combs-table td:nth-child(7) { width: 84px; }
.combs-table td.cell-sort { white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.combs-table td.cell-sort .inline-form { display: inline-flex !important; align-items: center; gap: 12px; flex-wrap: nowrap; margin: 0; }
.combs-table td.cell-sort input.tiny { width: 44px; padding: 3px 4px; text-align: center; flex: 0 0 auto; }
.combs-table td.cell-sort .btn-status { padding: 3px 8px; font-size: 12px; line-height: 1.5; white-space: nowrap; flex: 0 0 auto; }
/* 组合列表：最小宽度保证列不被压缩，超宽时表格内部横向滚动 */
.combs-table { min-width: 880px; }
.combs-table td { white-space: normal; }
/* 方向列：文字不越界，避免压到排序格的保存按钮 */
.combs-table td.cell-dir { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 8px; }
.combs-table td.cell-sort { overflow: visible; }

/* 学生列表账号密码显示 */
.stu-pw{font-size:11px;color:#6b7280;margin-top:2px;line-height:1.2}
.stu-pw b{color:#111827;font-family:ui-monospace,Menlo,Consolas,monospace;letter-spacing:.5px}

/* 学生列表列宽锁定 */
.stu-table{table-layout:fixed; width:100% !important; min-width:960px}
.stu-table th,.stu-table td{white-space:nowrap; overflow:hidden}
.stu-table td select{max-width:92px; width:100%}
.stu-table td input.small{width:100%; max-width:112px; box-sizing:border-box}
.stu-table td .stu-pw{white-space:nowrap}

/* 教职账号表 / 权限分配 */
.staff-list{border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;margin-top:8px}
.staff-row{display:grid;grid-template-columns:60px 150px 84px minmax(0,1fr) 290px;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid #eef1f6;font-size:13px;color:#2b3444;background:#fff}
.staff-row:nth-child(odd){background:#fafbfd}
.staff-row:last-child{border-bottom:0}
.staff-head{background:#eef1f6 !important;font-weight:600;color:#374151;padding:8px 12px}
.staff-head > div:last-child{text-align:center}
.staff-perms{display:flex;flex-wrap:wrap;gap:4px;min-width:0}
.staff-ops{display:flex;align-items:center;justify-content:flex-end;gap:6px;white-space:nowrap}
.perm-tags{display:flex;flex-wrap:wrap;gap:4px}
.perm-tag{display:inline-block;padding:1px 8px;border-radius:10px;background:#eef2ff;color:#1d4ed8;font-size:11.5px;line-height:1.65;white-space:nowrap}
.perm-tag.perm-all{background:#ecfdf3;color:#0e7c4b}
.perm-tag.perm-default{background:#f3f4f6;color:#6b7280}
.staff-ops form{display:flex;align-items:center;gap:6px;margin:0;padding:0}
.staff-ops input.small{width:86px;padding:4px 6px}
.staff-ops .btn-plain,.staff-ops .btn-danger{padding:5px 9px;font-size:12px}
.perm-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 12px}
.perm-toolbar select{min-width:190px}
.perm-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:8px}
.perm-grid label{display:flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;font-size:13px;cursor:pointer;transition:border-color .15s,background .15s}
.perm-grid label:hover{border-color:#bfd0f5;background:#f8faff}
.perm-grid input{width:15px;height:15px;margin:0}
.batch-ops-card summary{font-size:14px}
@media (max-width:900px){.perm-grid{grid-template-columns:repeat(2,minmax(140px,1fr))}}

@media (max-width:1100px){.staff-row{grid-template-columns:52px 120px 72px minmax(0,1fr) 250px;gap:8px}}

/* 角色与权限 */
.role-list{border:1px solid #e2e8f0;border-radius:10px;overflow:hidden}
.role-row{display:grid;grid-template-columns:190px minmax(0,1fr) 80px 150px;gap:12px;align-items:center;padding:10px 12px;border-bottom:1px solid #eef1f6;font-size:13px;background:#fff}
.role-row:nth-child(odd){background:#fafbfd}
.role-row:last-child{border-bottom:0}
.role-head{background:#eef1f6 !important;font-weight:600;color:#374151;padding:8px 12px}
.role-head > div:last-child{text-align:center}
.role-name b{font-weight:600;color:#26303c}
.role-key{display:inline-block;margin-left:8px;font-size:11px;color:#8a97a8;background:#f1f3f7;border-radius:6px;padding:1px 6px}
.role-count{color:#57647a}
.role-ops{display:flex;gap:8px;justify-content:flex-end}
.role-ops a.btn-plain{text-decoration:none;display:inline-flex;align-items:center}
@media (max-width:1100px){.role-row{grid-template-columns:150px minmax(0,1fr) 70px 130px;gap:8px}}


/* ===== 2026-11 阳光主题 + 全站布局重构 ===== */
:root{
  --sun:#f6a11b; --sun-deep:#e07a00; --sun-soft:#fff3d6;
  --sky:#2f9fd0; --mint:#2fae8f;
  --ink:#2f2a23; --ink-2:#6b6154; --ink-3:#948878;
  --bg:#fdf9f2; --card:#ffffff; --line:#f0e6d6; --line-2:#f7efe2;
  --shadow:0 10px 28px rgba(176,124,54,.10);
  --radius:16px;
}
html{ -webkit-text-size-adjust:100%; }
body{ background:
    radial-gradient(900px 420px at 82% -8%, rgba(255,196,87,.30), transparent 62%),
    radial-gradient(700px 360px at 6% 0%, rgba(95,196,220,.16), transparent 60%),
    linear-gradient(180deg,#fff9ee 0%, #fdf9f2 320px, #fbf7ef 100%);
    color:var(--ink); font-size:14px; }
body.dash-body{ background-attachment:fixed; }
a{ color:#b96a00; }

/* 侧栏：由深色改为暖白，导航分组 */
.dash-side{ width:216px; background:rgba(255,252,246,.92); color:var(--ink-2);
    border-right:1px solid var(--line); box-shadow:4px 0 24px rgba(180,130,60,.06); }
.dash-logo{ position:relative; padding:22px 20px 18px 46px; font-size:16px; color:#5b3d13;
    border-bottom:0; letter-spacing:.5px; }
.dash-logo::before{ content:""; position:absolute; left:20px; top:24px; width:16px; height:16px; border-radius:50%;
    background:radial-gradient(circle at 35% 30%, #ffd76e, #f6a11b 62%, #e07a00);
    box-shadow:0 0 0 5px rgba(246,161,27,.12); }
.dash-logo::after{ content:""; position:absolute; left:14px; right:14px; bottom:0; height:1px;
    background:linear-gradient(90deg, transparent, rgba(224,122,0,.18), transparent); }
.dash-side nav{ padding:14px 10px 18px; overflow-y:auto; }
.nav-group-title{ padding:14px 10px 6px; font-size:11px; letter-spacing:2px; color:#b3a48f; font-weight:600; }
.dash-side nav a{ padding:10px 14px; margin:1px 0; border-radius:10px; color:#6b6154; font-size:14px;
    transition:background .15s, color .15s, transform .15s; }
.dash-side nav a:hover{ background:#fff4de; color:#a35f00; transform:translateX(1px); }
.dash-side nav a.on{ background:linear-gradient(135deg,#ffcf6b,#f7a52a); color:#5a3a00; font-weight:600;
    box-shadow:0 6px 14px rgba(246,161,27,.28); }
.dash-side nav a.on::before{ content:""; display:inline-block; width:6px; height:6px; border-radius:50%;
    background:#8a4b00; margin-right:9px; vertical-align:1px; opacity:.7; }
.dash-user{ padding:13px 16px; border-top:1px solid var(--line); font-size:12.5px; color:#8a7c69;
    background:rgba(255,248,236,.7); }
.dash-user a{ color:#b96a00; font-weight:600; }

.dash-main{ padding:24px 30px 40px; min-width:0; }
.dash-head{ margin-bottom:20px; align-items:flex-start; }
.dash-head h2{ font-size:22px; color:#33291c; letter-spacing:.5px; position:relative; padding-bottom:6px; }
.dash-head h2::after{ content:""; position:absolute; left:0; bottom:0; width:34px; height:3px; border-radius:3px;
    background:linear-gradient(90deg,#ffc247,#f28c1c); }
.head-link{ background:#fff; border:1px solid #f0dfc2; color:#a2691c; text-decoration:none;
    padding:7px 14px; border-radius:999px; font-size:12.5px; box-shadow:0 2px 8px rgba(180,120,30,.06); }
.head-link:hover{ background:#fff6e6; }

/* 卡片与标题 */
.card{ background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:22px 24px;
    box-shadow:var(--shadow); margin-bottom:18px; }
.card h3{ font-size:16px; color:#3b3226; margin-bottom:14px; letter-spacing:.3px; }
.card h4{ color:#4a4034; }
.tip{ color:var(--ink-3); font-size:12.5px; line-height:1.75; }

/* 按钮 */
.btn-primary{ background:linear-gradient(135deg,#ffb340,#f08a12); color:#fff; border:0; border-radius:10px;
    padding:9px 18px; font-weight:600; box-shadow:0 6px 14px rgba(240,138,18,.26); }
.btn-primary:hover{ background:linear-gradient(135deg,#ffa726,#e07a00); }
.btn-plain{ background:#fff; color:#a86414; border:1px solid #ecd9b9; border-radius:10px; padding:8px 14px; }
.btn-plain:hover{ background:#fff5e3; border-color:#f3c983; }
.btn-export{ background:#e8f7f4; color:#167a66; border:1px solid #bfe9df; border-radius:10px; padding:8px 14px; }
.btn-export:hover{ background:#d8f3ed; }
.btn-danger{ background:#fff5f4; color:#c0392b; border:1px solid #f3ccc8; border-radius:10px; }
.btn-weak{ background:#fff; color:#7a6c59; border:1px solid #eadfce; border-radius:10px; }
.btn-status,.status-icon-btn{ border-radius:8px; }

/* 表单 */
select,input[type=text],input[type=password],input[type=number],input[type=date],input[type=file],textarea{
    border:1px solid #e9dcc6; border-radius:10px; background:#fff; color:#3b3327; }
select:focus,input:focus,textarea:focus{ outline:none; border-color:#f2b45a; box-shadow:0 0 0 3px rgba(246,161,27,.16); }
.filter-bar{ gap:10px; align-items:center; }
.filter-bar .filter-item{ background:#fffaf1; border:1px solid #f4e8d4; border-radius:11px; padding:4px 8px 4px 12px; }
.filter-bar .filter-item>label{ color:#8a7c69; font-size:12.5px; }
.filter-bar .filter-item>select{ border:0; background:transparent; box-shadow:none; padding-left:2px; }
.filter-bar .filter-item>input{ border:0; background:transparent; box-shadow:none; }

/* 表格 */
.data-table{ border-collapse:separate; border-spacing:0; font-size:13px; }
.data-table th{ background:#fff6e6; color:#7a5a22; font-weight:600; border-bottom:1px solid #f1dfbf;
    padding:10px 10px; white-space:nowrap; }
.data-table td{ border-bottom:1px solid #faf1e2; padding:9px 10px; }
.data-table tr:nth-child(even) td{ background:#fffdf8; }
.data-table tbody tr:hover td, .data-table tr:hover td{ background:#fff7e6; }
.data-table th:first-child{ border-top-left-radius:10px; }
.data-table th:last-child{ border-top-right-radius:10px; }
.score-table th{ background:#fff3da; }
.score-input{ border:1px solid #efe1c8; border-radius:8px; }
.score-input:focus{ border-color:#f3ae4c; box-shadow:0 0 0 3px rgba(246,161,27,.15); }

/* 统计卡片 */
.stat-grid{ gap:16px; }
.stat-box{ background:linear-gradient(160deg,#fff8ea,#fff); border-color:#f6e6cb; border-radius:14px; }
.stat-box b{ color:#d97706; font-size:28px; }
.stat-box span{ color:#8d7d68; }
.rk-stat > div{ border-radius:14px; }

/* 空状态 */
.empty-state{ text-align:center; padding:44px 20px 48px; color:#8d7d68; }
.empty-state .sun{ width:54px; height:54px; margin:0 auto 14px; border-radius:50%;
    background:radial-gradient(circle at 35% 30%, #ffe08a, #f6a11b 60%, #e07a00);
    box-shadow:0 0 0 10px rgba(246,161,27,.10), 0 0 0 20px rgba(246,161,27,.05); }
.empty-state h3{ font-size:16px; color:#584a37; margin-bottom:6px; }
.empty-state p{ font-size:13px; color:#9a8a73; line-height:1.9; }
.empty-state .btn-primary{ display:inline-flex; margin-top:16px; }

/* 班级选择卡 */
.class-picker{ display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:12px; margin-top:6px; }
.class-card{ display:flex; flex-direction:column; gap:6px; padding:14px 16px; border:1px solid #f3e5cd;
    border-radius:14px; background:linear-gradient(165deg,#fffdf7,#fff8ec); text-decoration:none; color:#41372a;
    transition:transform .15s, box-shadow .15s, border-color .15s; }
.class-card:hover{ transform:translateY(-2px); border-color:#f4c374; box-shadow:0 10px 22px rgba(200,130,30,.14); }
.class-card b{ font-size:16px; color:#7a4a00; }
.class-card span{ font-size:12px; color:#94866f; }
.class-card .bar{ height:5px; border-radius:4px; background:#f4ead9; overflow:hidden; }
.class-card .bar i{ display:block; height:100%; background:linear-gradient(90deg,#ffce70,#f39a20); }
.class-card em{ font-style:normal; font-size:11.5px; color:#b08746; }

/* tab、提示、权限标签 */
.page-tabs a{ border-radius:10px; }
.page-tabs a.on{ background:linear-gradient(135deg,#ffd06b,#f5a02a); color:#5c3a00; border-color:transparent; }
.alert-ok{ background:#f0fbf6; border:1px solid #bfead9; color:#14775a; border-radius:10px; }
.alert-error{ border-radius:10px; }
.perm-tag{ background:#fff4dd; color:#a2650b; }
.perm-tag.perm-all{ background:#eaf9f2; color:#14795d; }

/* 手机端：抽屉菜单、防横向溢出、卡片与筛选 */
@media (max-width:768px){
    html,body{ overflow-x:hidden; width:100%; }
    .dash-wrap{ display:block; width:100%; max-width:100%; }
    .dash-side{ position:sticky; top:0; width:100%; background:#fffdf7; border-right:0; border-bottom:1px solid #f2e4cd;
        box-shadow:0 4px 16px rgba(180,130,50,.12); z-index:40; }
    .dash-logo{ padding:13px 14px 12px 40px; font-size:15px; color:#5b3d13; }
    .dash-logo::before{ left:16px; top:16px; width:13px; height:13px; }
    .nav-toggle{ border:1px solid #f0dcbc; background:#fff7e8; }
    .nav-toggle span{ background:#c47a12; }
    .dash-side.nav-open .nav-toggle{ background:#f7a52a; border-color:#f7a52a; }
    .dash-side.nav-open .nav-toggle span{ background:#fff; }
    .dash-user{ color:#8a7c69; }
    .dash-user a{ color:#b96a00; }
    .dash-side nav{ background:#fffdf7; border-top:1px solid #f5e9d6; padding:6px 10px 14px; }
    .dash-side nav a{ padding:12px 16px; }
    .dash-main{ padding:14px 12px 28px; }
    .dash-head h2{ font-size:19px; }
    .card{ padding:16px 14px; border-radius:14px; margin-bottom:14px; }
    .filter-bar{ gap:8px; }
    .filter-bar .filter-item{ flex:1 1 100%; padding:6px 10px; }
    .filter-bar .filter-item>select,.filter-bar .filter-item>input{ max-width:68%; text-align:right; }
    .class-picker{ grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; }
    .data-table{ font-size:12px; }
    .empty-state{ padding:34px 14px 38px; }
}
@media (max-width:480px){
    .stat-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
    .class-picker{ grid-template-columns:1fr 1fr; }
    .dash-head h2{ font-size:18px; }
}


/* 学生档案录入：两栏独立卡片 */
.entry-split{ display:grid; grid-template-columns:1.15fr .85fr; gap:18px; align-items:start; }
.entry-half{ min-width:0; background:#fffaf0; border:1px solid #f6e8d2; border-radius:13px; padding:16px 18px; }
.entry-half .inline-form{ margin:0; }
.entry-half input[type=file]{ max-width:100%; }
@media (max-width:900px){ .entry-split{ grid-template-columns:1fr; } }

/* 成绩输入框：去掉数字微调按钮，保证 3 位小数完整可见 */
.score-input{ width:70px; padding:4px 7px !important; -moz-appearance:textfield; appearance:textfield; }
.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.score-table td{ padding:5px 6px; }

/* 学生列表：桌面端可完整显示操作列 */
.stu-table{ width:1080px !important; min-width:980px; }
.stu-table td.cell-ops{ padding-left:4px; padding-right:4px; }

/* 学生端与登录页：跟随阳光主题 */
.stu-avatar{ background:linear-gradient(135deg,#ffcf6b,#ef8f1c); color:#5a3600; box-shadow:0 8px 18px rgba(240,140,20,.28); }
.stu-meta h2{ color:#3a3024; }
.stu-idbar b{ color:#4a3c2a; }
.su-item b{ color:#d97706; }
.stat-card{ background:linear-gradient(160deg,#fff9ed,#fff); border-color:#f5e6cd; }
.stat-card span{ color:#8d7d68; }
.sc-blue b{ color:#c2760c; } .sc-green b{ color:#2f9e79; } .sc-orange b{ color:#e0700a; } .sc-gray b{ color:#6b6154; }
.staff-head, .role-head{ background:#fff6e6 !important; color:#7a5a22 !important; }
.staff-row:nth-child(odd), .role-row:nth-child(odd){ background:#fffdf7; }
.login-body, .setup-body{ background: radial-gradient(900px 500px at 80% -10%, rgba(255,196,87,.35), transparent 60%), radial-gradient(700px 420px at 5% 0%, rgba(95,196,220,.18), transparent 55%), linear-gradient(180deg,#fff9ee,#fdf9f2 55%,#fbf7ef); }
.login-brand h1, .setup-head h1{ color:#a96100; }
.login-card, .setup-card{ box-shadow:0 18px 44px rgba(176,124,54,.16); border:1px solid #f2e3cc; }
.tab-btn.active{ color:#a96100; }
.login-tabs{ background:#fff4df; }

/* 手机端：账号/角色列表改为卡片，不再横向挤压 */
@media (max-width:768px){
  .staff-list,.role-list{ border:0; border-radius:0; overflow:visible; background:transparent; }
  .staff-head,.role-head{ display:none; }
  .staff-row{ display:grid; grid-template-columns:1fr auto; gap:6px 10px;
      border:1px solid #f2e3cd; border-radius:13px; background:#fffdf8;
      margin-bottom:10px; padding:12px 14px; }
  .staff-row:nth-child(odd){ background:#fffdf8; }
  .staff-row .cell-id{ display:none; }
  .staff-row .cell-user{ font-size:15px; font-weight:600; color:#5b3d13; }
  .staff-row .cell-role{ align-self:center; justify-self:end; font-size:12px;
      background:#fff3d6; color:#a15c00; border-radius:999px; padding:2px 10px; }
  .staff-row .staff-perms{ grid-column:1 / -1; }
  .staff-row .staff-ops{ grid-column:1 / -1; justify-content:flex-start; flex-wrap:wrap;
      border-top:1px dashed #f1e4cf; padding-top:9px; margin-top:2px; }
  .role-row{ display:grid; grid-template-columns:1fr; gap:8px;
      border:1px solid #f2e3cd; border-radius:13px; background:#fffdf8;
      margin-bottom:10px; padding:12px 14px; }
  .role-row:nth-child(odd){ background:#fffdf8; }
  .role-row .role-ops{ justify-content:flex-start; }
  .role-row .role-count{ color:#8d7d68; }
}

@media (max-width:768px){
  .staff-head,.role-head{ display:none !important; }
}

/* 学生列表：固定列宽，操作列完整可见 */
.stu-table{ width:1010px !important; min-width:960px; table-layout:fixed; }
.stu-table th:nth-child(1),.stu-table td:nth-child(1){ width:38px; }
.stu-table th:nth-child(2),.stu-table td:nth-child(2){ width:96px; }
.stu-table th:nth-child(3),.stu-table td:nth-child(3){ width:128px; }
.stu-table th:nth-child(4),.stu-table td:nth-child(4){ width:72px; }
.stu-table th:nth-child(5),.stu-table td:nth-child(5){ width:66px; }
.stu-table th:nth-child(6),.stu-table td:nth-child(6){ width:92px; }
.stu-table th:nth-child(7),.stu-table td:nth-child(7){ width:54px; }
.stu-table th:nth-child(8),.stu-table td:nth-child(8){ width:160px; }
.stu-table th:nth-child(9),.stu-table td:nth-child(9){ width:204px; }

.stu-table{ width:1036px !important; }
.stu-table th:nth-child(8),.stu-table td:nth-child(8){ width:140px; }
.stu-table th:nth-child(9),.stu-table td:nth-child(9){ width:238px; }
.stu-table td:last-child{ padding-left:6px; padding-right:6px; }
.stu-table td:last-child .btn-plain,.stu-table td:last-child .btn-danger{ padding:5px 8px; }

/* 学生列表操作列：空间不足时按钮换行，保证「删除」可见 */
.stu-table th:last-child,.stu-table td:last-child{ white-space:normal; overflow:visible; }
.stu-table td:last-child form{ display:inline-flex; margin:2px 4px 2px 0; }

body .stu-table{ width:1036px !important; }
body .stu-table th:nth-child(1),body .stu-table td:nth-child(1){ width:38px; }
body .stu-table th:nth-child(9),body .stu-table td:nth-child(9){ width:238px; }

.stu-table th:last-child, .stu-table td:last-child{ white-space:normal !important; overflow:visible !important; }


/* ===== 2026-11 严谨学术版：降低暖色饱和，加入学府底纹 ===== */
:root{
  --navy:#1f4e79; --navy-2:#173d5f; --navy-3:#2c6a9e;
  --gold:#a8873f; --gold-soft:#f4ead7;
  --paper:#f6f8fa; --ink:#26323d; --ink-2:#5b6875; --ink-3:#8a95a1;
  --line:#e2e8ef; --line-2:#edf1f5;
  --shadow:0 8px 24px rgba(24,55,85,.07);
}
body{
  color:var(--ink);
  background:
    linear-gradient(180deg, rgba(246,248,250,.945), rgba(246,248,250,.968)),
    url("/assets/campus.jpg") center 22% / cover no-repeat fixed;
}
body.dash-body{ background-color:var(--paper); }

/* 侧栏 */
.dash-side{ background:rgba(255,255,255,.94); border-right:1px solid var(--line);
    box-shadow:2px 0 18px rgba(24,55,85,.05); color:var(--ink-2); }
.dash-logo{ color:#24445f; }
.dash-logo::before{ background:radial-gradient(circle at 35% 30%, #dfeaf4, #1f4e79 62%, #12324c);
    box-shadow:0 0 0 5px rgba(31,78,121,.10); }
.dash-logo::after{ background:linear-gradient(90deg, transparent, rgba(31,78,121,.22), transparent); }
.nav-group-title{ color:#9aa6b2; }
.dash-side nav a{ color:#4d5b68; }
.dash-side nav a:hover{ background:#eef3f8; color:var(--navy); }
.dash-side nav a.on{ background:linear-gradient(135deg,#2b5d88,#1f4e79); color:#fff; font-weight:600;
    box-shadow:0 6px 14px rgba(31,78,121,.22); }
.dash-side nav a.on::before{ background:#d9c48a; opacity:.9; }
.dash-user{ background:rgba(247,250,252,.9); border-top:1px solid var(--line); color:#7b8794; }
.dash-user a{ color:var(--navy); }

/* 标题与链接 */
.dash-head h2{ color:#22313f; }
.dash-head h2::after{ background:linear-gradient(90deg,#1f4e79,#7fa3bf); }
.head-link{ background:#fff; border:1px solid var(--line); color:var(--navy); box-shadow:0 2px 8px rgba(24,55,85,.05); }
.head-link:hover{ background:#f2f6fa; }

/* 卡片 */
.card{ background:#fff; border:1px solid var(--line); box-shadow:var(--shadow); }
.card h3{ color:#22313f; }
.card h4{ color:#33414f; }
.tip{ color:var(--ink-3); }

/* 按钮：以深蓝为主，金色只做点缀 */
.btn-primary{ background:linear-gradient(135deg,#2b5d88,#1f4e79); box-shadow:0 6px 14px rgba(31,78,121,.20); }
.btn-primary:hover{ background:linear-gradient(135deg,#24527a,#173d5f); }
.btn-plain{ background:#fff; color:var(--navy); border:1px solid #cdd9e4; }
.btn-plain:hover{ background:#f2f6fa; border-color:#a9bed1; }
.btn-export{ background:#eef4f9; color:#255a86; border:1px solid #c9dbea; }
.btn-export:hover{ background:#e2edf6; }
.btn-danger{ background:#fdf6f6; color:#a63b3b; border:1px solid #eccfcf; }
.btn-weak{ background:#fff; color:#5b6875; border:1px solid #dbe3eb; }

/* 表单 */
select,input[type=text],input[type=password],input[type=number],input[type=date],input[type=file],textarea{
    border:1px solid #d8e1e9; border-radius:9px; background:#fff; color:#2c3945; }
select:focus,input:focus,textarea:focus{ border-color:#7aa0bf; box-shadow:0 0 0 3px rgba(31,78,121,.12); }
.filter-bar .filter-item{ background:#f8fafc; border:1px solid #e3eaf1; }
.filter-bar .filter-item>label{ color:#6d7a87; }

/* 表格 */
.data-table th{ background:#eff4f8; color:#34516a; border-bottom:1px solid #dbe5ee; }
.data-table td{ border-bottom:1px solid #eef2f6; }
.data-table tr:nth-child(even) td{ background:#fbfcfd; }
.data-table tbody tr:hover td, .data-table tr:hover td{ background:#f1f6fa; }
.score-table th{ background:#e9f1f7; }
.score-input{ border:1px solid #d8e2ea; border-radius:7px; }
.score-input:focus{ border-color:#7aa0bf; box-shadow:0 0 0 3px rgba(31,78,121,.12); }

/* 统计与空状态 */
.stat-box{ background:linear-gradient(165deg,#f7fafc,#fff); border-color:#e1e9f1; }
.stat-box b{ color:var(--navy); }
.stat-box span{ color:#7c8895; }
.empty-state{ color:#7c8895; }
.empty-state .sun{ background:radial-gradient(circle at 35% 30%, #eef4f9, #24527a 62%, #173d5f);
    box-shadow:0 0 0 10px rgba(31,78,121,.07), 0 0 0 20px rgba(31,78,121,.035); }
.empty-state h3{ color:#33414f; }
.empty-state p{ color:#8a95a1; }

/* 班级卡片 */
.class-card{ background:linear-gradient(170deg,#fbfdff,#f5f8fb); border-color:#dee7ef; color:#33414f; }
.class-card:hover{ border-color:#a9c3d8; box-shadow:0 10px 22px rgba(31,78,121,.10); }
.class-card b{ color:#234a6d; }
.class-card span{ color:#7f8c99; }
.class-card .bar{ background:#e6edf4; }
.class-card .bar i{ background:linear-gradient(90deg,#6d9cbf,#1f4e79); }
.class-card em{ color:#6f8ba1; }

/* 标签与提示 */
.page-tabs a.on{ background:linear-gradient(135deg,#2b5d88,#1f4e79); color:#fff; }
.perm-tag{ background:#eef3f8; color:#2a5a80; }
.perm-tag.perm-all{ background:#edf7f1; color:#2c7a58; }
.alert-ok{ background:#f1f8f4; border:1px solid #cfe7d9; color:#2c7a58; }
.staff-head,.role-head{ background:#eff4f8 !important; color:#34516a !important; }
.staff-row:nth-child(odd),.role-row:nth-child(odd){ background:#fbfcfd; }
.entry-half{ background:#f8fafc; border-color:#e2e9f0; }

/* 学生端与登录 */
.stu-avatar{ background:linear-gradient(135deg,#2b5d88,#1f4e79); color:#fff; box-shadow:0 8px 18px rgba(31,78,121,.20); }
.stu-meta h2,.stu-idbar b{ color:#26323d; }
.su-item b{ color:var(--navy); }
.stat-card{ background:linear-gradient(165deg,#f8fafc,#fff); border-color:#e1e9f1; }
.sc-blue b{ color:#1f4e79; } .sc-green b{ color:#2c7a58; } .sc-orange b{ color:#a8873f; }
.staff-head,.role-head{ background:#eff4f8 !important; }
.login-body, .setup-body{
    background: linear-gradient(180deg, rgba(246,248,250,.95), rgba(246,248,250,.972)),
        url("/assets/campus.jpg") center 30% / cover no-repeat fixed; }
.login-brand h1, .setup-head h1{ color:#22496b; }
.login-card, .setup-card{ box-shadow:0 18px 44px rgba(24,55,85,.13); border:1px solid #e1e9f1; }
.login-tabs{ background:#eef3f8; }
.tab-btn.active{ color:var(--navy); }

/* 手机端跟随 */
@media (max-width:768px){
  .dash-side{ background:#fff; border-bottom:1px solid var(--line); }
  .dash-logo{ color:#24445f; }
  .nav-toggle{ border:1px solid #d5e0ea; background:#f2f6fa; }
  .nav-toggle span{ background:#1f4e79; }
  .dash-side.nav-open .nav-toggle{ background:#1f4e79; border-color:#1f4e79; }
  .dash-side nav{ background:#fff; border-top:1px solid var(--line); }
  .staff-row,.role-row{ border-color:#e2e9f0; background:#fff; }
  .staff-row:nth-child(odd),.role-row:nth-child(odd){ background:#fff; }
}

html{background:#f6f8fa;}

/* 成绩明细：CSS Grid 单行陈列，列宽精确可控 */
.score-grid{ display:grid; width:100%; min-width:900px; border:1px solid #e2e8ef;
    border-radius:10px; overflow:hidden; background:#fff; }
.sg-cell{ padding:9px 6px; font-size:12px; color:#33414f; white-space:nowrap;
    overflow:hidden; text-overflow:ellipsis; box-shadow:inset -1px -1px 0 #eef2f6; }
.sg-cell.sg-head{ font-size:11.5px; font-weight:600; background:#eff4f8; color:#34516a; }
.sg-cell.num{ text-align:center; }
.sg-cell .exam-name{ font-weight:700; font-size:12px; }
.sg-cell .exam-meta{ font-size:10.5px; color:#8a95a1; margin-top:2px; }
.sg-cell .exam-meta .muted{ font-size:10px; }
.sg-cell .rk-badge{ padding:1px 4px; font-size:10.5px; }
.sg-cell .conv{ display:block; font-size:9.5px; color:#8a95a1; }
.sg-cell.col-comb{ background:#f4f9fd; }
.sg-cell.col-comb.sg-head{ background:#dfeaf5; color:#274e6d; }
.sg-cell.col-main{ background:#fbf8f1; }
.sg-cell.col-main.sg-head{ background:#f1e9d6; color:#6b5426; }
.sg-cell.col-subj.sg-head{ background:#eff4f8; color:#34516a; }
.sg-cell, .sg-cell.exam-cell{ text-align:center; }
.sg-cell .exam-meta{ justify-content:center; }
.sg-cell .exam-meta{ flex-wrap:wrap; justify-content:center; row-gap:2px; }
