/* 共享样式（浅色主题） */
* { box-sizing: border-box; }
body { margin:0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background:#f5f7f8; color:#1f2d27; }
a { color:#2f7d4f; text-decoration:none; }
.wrap { max-width: 960px; margin: 0 auto; padding: 24px 16px 60px; }
.card { background:#fff; border-radius:14px; box-shadow:0 2px 14px rgba(0,0,0,.06); padding:22px; margin-bottom:18px; }
h1 { font-size:24px; margin:0 0 6px; }
h2 { font-size:18px; margin:0 0 14px; }
.muted { color:#7a8a82; font-size:13px; }
.btn { display:inline-block; border:none; border-radius:9px; padding:10px 16px; font-size:14px; cursor:pointer; background:#2f7d4f; color:#fff; }
.btn:hover { filter:brightness(.95); }
.btn.sec { background:#eef2ef; color:#2f7d4f; }
.btn.danger { background:#d9534f; }
.btn.sm { padding:6px 10px; font-size:12px; border-radius:7px; }
.btn:disabled, .btn.disabled { opacity:.55; cursor:not-allowed; }
.imp-spec { background:#fff; border:1px dashed #d6e2da; border-radius:8px; padding:12px 14px; margin-bottom:6px; }
.imp-code { display:inline-block; background:#eef2ef; padding:2px 7px; border-radius:5px; font-size:12px; font-family: ui-monospace, Menlo, Consolas, monospace; word-break:break-all; color:#2f5141; }
input,select { width:100%; padding:9px 11px; border:1px solid #d8e0db; border-radius:8px; font-size:14px; margin-bottom:10px; background:#fff; }
label { font-size:13px; color:#4a5a52; display:block; margin-bottom:4px; }
.row { display:flex; gap:12px; flex-wrap:wrap; }
.row > * { flex:1; min-width:140px; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th,td { padding:9px 10px; text-align:left; border-bottom:1px solid #eef2ef; }
th { color:#7a8a82; font-weight:600; }
.badge { display:inline-block; padding:2px 9px; border-radius:20px; font-size:12px; }
.badge.active{background:#e3f3e8;color:#2f7d4f;}
.badge.pending{background:#fff3d6;color:#a9791a;}
.badge.suspended{background:#fde3e1;color:#c0392b;}
.tag { display:inline-block; padding:2px 8px; border-radius:6px; background:#eef2ef; color:#4a5a52; font-size:12px; margin-right:6px;}
.topbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.tabs { display:flex; gap:8px; margin-bottom:16px; }
.tabs button { border:none; background:#eef2ef; padding:8px 14px; border-radius:8px; cursor:pointer; font-size:14px; }
.tabs button.on { background:#2f7d4f; color:#fff; }
.hidden { display:none; }
.bar { height:10px; background:#eef2ef; border-radius:6px; overflow:hidden; }
.bar > i { display:block; height:100%; background:#2f7d4f; }
.up { color:#2f7d4f; } .down { color:#c0392b; } .flat{color:#7a8a82;}
/* 回收站表格优化 */
.trash-box { background:#fff8f8; border:1px solid #f3d9d9; border-radius:12px; padding:16px; margin-top:16px; }
.trash-head { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:10px; }
.trash-actions { display:flex; gap:8px; flex-wrap:wrap; }
.trash-tbl { table-layout:fixed; }
.trash-tbl th, .trash-tbl td { padding:10px 8px; vertical-align:middle; }
.trash-tbl th { white-space:nowrap; }
.trash-tbl td { white-space:nowrap; }
.trash-tbl td:nth-child(1) { width:36px; text-align:center; }
.trash-tbl td:nth-child(2) { width:auto; }
.trash-tbl td:nth-child(3), .trash-tbl td:nth-child(4), .trash-tbl td:nth-child(5) { width:56px; text-align:center; }
.trash-tbl td:nth-child(6) { width:155px; text-align:center; }
.trash-tbl td:last-child { width:170px; text-align:right; }
.trash-tbl .btn { white-space:nowrap; margin-left:4px; }
.trash-hint { margin:0 0 12px; font-size:12px; color:#8a6d6d; }
.trash-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }

.report-head { display:flex; align-items:center; gap:14px; border-bottom:3px solid var(--brand,#2f7d4f); padding-bottom:14px; margin-bottom:18px; }
.report-head .logo { width:46px; height:46px; border-radius:10px; background:var(--brand,#2f7d4f); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:20px; }
.report-head .inst { font-size:20px; font-weight:700; }
.kpi { display:flex; gap:14px; flex-wrap:wrap; margin-bottom:18px; }
.kpi .box { flex:1; min-width:120px; background:#f8faf8; border-radius:12px; padding:14px; text-align:center; }
.kpi .num { font-size:30px; font-weight:700; }

/* ---------- 中考标准提交：年级多选网格 ---------- */
.cs-grades-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(86px, 1fr)); gap:10px; }
.cs-grade-card { display:flex; align-items:center; gap:8px; padding:10px 10px 10px 12px; border:1px solid #e2e8e8; border-radius:8px; background:#fff; cursor:pointer; min-height:44px; font-size:14px; margin:0; }
.cs-grade-card input { width:auto; min-width:18px; height:18px; margin:0; accent-color:#2f7d4f; }
.cs-grade-card span { white-space:nowrap; }
.cs-grade-card:has(input:checked) { border-color:#2f7d4f; background:#f0fdf4; }

/* 美化文件选择按钮 */
.cs-file-btn { display:inline-flex; align-items:center; gap:6px; cursor:pointer; margin:0; }
.cs-file-btn input[type="file"] { position:absolute; opacity:0; width:1px; height:1px; }
.cs-file-btn span { display:inline-block; background:#eef2ef; color:#2f7d4f; padding:9px 14px; border-radius:8px; font-size:14px; }

/* ---------- 中考选考弹窗 ---------- */
.el-group { margin:12px 0; border:1px solid #e2e8e8; border-radius:12px; padding:12px; background:#fff; }
.el-title { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; font-size:15px; color:#1f2d27; gap:8px; }
.el-title span { flex:none; font-size:12px; color:#4a5a52; background:#f5f7f8; padding:3px 9px; border-radius:10px; white-space:nowrap; }
.el-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; }
.el-opt { display:flex; align-items:flex-start; gap:8px; padding:10px; border:1px solid #e2e8e8; border-radius:8px; background:#fff; cursor:pointer; margin:0; font-size:14px; color:#1f2d27; line-height:1.35; transition:all .12s; -webkit-tap-highlight-color:transparent; }
.el-opt input { width:18px; height:18px; min-width:18px; margin:1px 0 0 0; accent-color:#2f7d4f; }
.el-opt span { word-break:break-word; }
.el-opt:has(input:checked) { border-color:#2f7d4f; background:#f0fdf4; }
.el-opt:has(input:checked) span { color:#2f7d4f; font-weight:500; }

/* ---------- 城市标准审核（管理员） ---------- */

/* 审核列表状态 Tab（待审核 / 已通过 / 已驳回） */
.cs-tabbar { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:12px; border-bottom:1px solid #e8eeea; }
.cs-tab { padding:8px 14px; border:1px solid transparent; border-bottom:none; background:transparent; color:#5b6b63; font-size:13px; border-radius:8px 8px 0 0; cursor:pointer; margin-bottom:-1px; font-family:inherit; }
.cs-tab:hover { background:#f2f6f4; color:#23352b; }
.cs-tab.on { background:#fff; border-color:#e8eeea; color:#1f7a45; font-weight:600; }
.cs-tab .n { display:inline-block; min-width:18px; padding:0 5px; margin-left:6px; border-radius:9px; background:#eef2f0; color:#5b6b63; font-size:12px; font-weight:400; text-align:center; }
.cs-tab.on .n { background:#2f7d4f; color:#fff; }
.cs-tab .n.warn { background:#fdebdc; color:#b4600f; }
.cs-tab .n.danger { background:#fbe3e1; color:#b0302a; }

.cs-item { border:1px solid #e8eeea; border-radius:12px; padding:14px; margin-bottom:12px; background:#fff; }
.cs-item + .cs-item { margin-top:10px; }
.cs-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; flex-wrap:wrap; }
.cs-head h4 { margin:0; font-size:15px; font-weight:600; }
.cs-meta { color:#7a8a82; font-size:13px; margin-top:4px; }
.cs-files { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.cs-files:empty { display:none; }
.cs-json { width:100%; min-height:120px; max-height:260px; padding:10px 12px; border:1px solid #d8e0db; border-radius:8px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size:12px; line-height:1.5; resize:vertical; background:#fafcfb; white-space:pre; overflow:auto; tab-size:2; }
.cs-json:focus { outline:none; border-color:#2f7d4f; background:#fff; box-shadow:0 0 0 3px rgba(47,125,79,.08); }
.cs-json-hint { color:#7a8a82; font-size:12px; line-height:1.5; margin:0 0 8px; }
.cs-json-tools { display:flex; gap:8px; align-items:center; margin-bottom:8px; flex-wrap:wrap; }
.cs-json-err { color:#c0392b; font-size:12px; }
.cs-json-ok { color:#2f7d4f; font-size:12px; }
.cs-review-btns { display:flex; gap:8px; margin-top:12px; }
.cs-review-btns .btn { flex:0 0 auto; }
.cs-review-btns .btn:disabled { opacity:.45; cursor:not-allowed; }
.cs-nofile-warn { background:#fff4e5; border:1px solid #f0c987; color:#9a5b00; border-radius:8px; padding:8px 10px; font-size:13px; margin-bottom:10px; }
.cs-nofile { color:#c0392b; font-size:13px; }
.cs-req-label { font-weight:600; color:#b91c1c; margin:10px 0 4px; font-size:14px; }
.cs-req-label .muted { font-weight:400; color:#7a8a82; }

/* ---------- 分页 ---------- */
.pager { display:flex; justify-content:center; align-items:center; gap:8px; margin-top:18px; flex-wrap:wrap; }
.pager button { border:none; background:#eef2ef; color:#2f5141; padding:6px 12px; border-radius:7px; cursor:pointer; font-size:13px; }
.pager button:disabled { opacity:.5; cursor:not-allowed; }
.pager button.on { background:#2f7d4f; color:#fff; }
.pager .pager-info { color:#7a8a82; font-size:13px; }

/* ---------- 弹窗（成绩编辑 / 分析编辑） ---------- */
.modal-mask { position:fixed; inset:0; background:rgba(15,23,20,.45); display:flex; align-items:center; justify-content:center; z-index:1000; padding:16px; }
/* 关键：同时含 hidden 时必须隐藏。.modal-mask.hidden 是双类选择器，优先级高于 .modal-mask，确保关闭生效（之前 hidden 被 display:flex 覆盖，弹窗关不掉） */
.modal-mask.hidden { display:none; }
.modal { position:relative; background:#fff; border-radius:14px; box-shadow:0 10px 40px rgba(0,0,0,.25); width:100%; max-width:640px; max-height:90vh; overflow:auto; padding:20px 22px; }
.modal h3 { margin:0 0 14px 0; font-size:18px; display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.modal-close { position:static; flex:0 0 auto; width:30px; height:30px; border:none; background:transparent; color:#7a8a82; font-size:24px; line-height:30px; text-align:center; border-radius:8px; cursor:pointer; }
.modal-close:hover { background:#f1f5f3; color:#333; }
.btn-row { display:flex; flex-wrap:wrap; gap:8px; }
.modal .modal-actions { position:sticky; bottom:0; background:#fff; display:flex; gap:10px; justify-content:flex-end; margin-top:8px; padding-top:12px; border-top:1px solid #e8eeea; flex-wrap:wrap; }
.modal textarea { width:100%; min-height:96px; padding:10px 12px; border:1px solid #d8e0db; border-radius:8px; font-size:14px; line-height:1.6; resize:vertical; font-family:inherit; margin-bottom:14px; background:#fafcfb; }
.modal textarea:focus { outline:none; border-color:#2f7d4f; background:#fff; box-shadow:0 0 0 3px rgba(47,125,79,.08); }
.narr-field-label { font-size:13px; color:#4a5a52; font-weight:600; margin-bottom:4px; display:block; }
.disclaimer { background:#fff7ed; border:1px solid #fcd9a8; color:#9a5b00; border-radius:10px; padding:12px 14px; font-size:13px; line-height:1.6; margin-bottom:16px; }
.disclaimer-check { display:flex; align-items:flex-start; gap:8px; font-size:13px; color:#4a5a52; margin-bottom:8px; cursor:pointer; }
.disclaimer-check input { width:auto; min-width:18px; height:18px; margin:2px 0 0 0; accent-color:#2f7d4f; }
.edit-test-row { display:flex; gap:12px; flex-wrap:wrap; }
.edit-test-row > div { flex:1; min-width:140px; }

/* ---------- 手机端响应式 ---------- */
@media (max-width: 640px) {
  .wrap { padding: 14px 12px 40px; }
  .card { padding: 16px; border-radius: 12px; }
  h1 { font-size: 20px; }
  h2 { font-size: 16px; margin-bottom: 10px; }
  .tabs { gap: 4px; flex-wrap: wrap; }
  .tabs button { flex: 0 0 calc(33.333% - 3px); padding: 7px 2px; font-size: 12px; border-radius: 7px; text-align: center; }
  .cs-grades-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cs-grade-card { padding: 9px 8px 9px 10px; font-size: 13px; min-height: 42px; }
  input, select { padding: 10px 11px; font-size: 15px; } /* 防止 iOS 自动放大 */
  .btn { padding: 10px 14px; font-size: 14px; }
  /* 新增弹窗移动端 */
  .modal { padding: 16px; }
  .modal h3 { font-size: 16px; }
  .modal-close { width: 28px; height: 28px; font-size: 22px; line-height: 28px; }
  .btn-row { gap: 6px; }
  /* 顶部栏：窄屏让按钮组整体换行，而不是按钮内文字折成竖排 */
  .topbar { flex-wrap: wrap; align-items: flex-start; row-gap: 8px; }
  .topbar > div { flex-wrap: wrap; justify-content: flex-end; }
  .topbar .btn, .topbar a.btn { white-space: nowrap; }
  /* 机构设置条（当前城市 / 当前学制）：窄屏按钮换行到下一行，文字保持单行 */
  #cityBanner, #sysBanner { flex-wrap: wrap; }
  #cityBanner .btn, #sysBanner .btn { white-space: nowrap; }
  /* 选考弹窗移动端 */
  #elModalBox { padding: 16px !important; border-radius: 12px; }
  .el-grid { grid-template-columns: 1fr; }
  .el-group { padding: 10px; border-radius: 10px; }
  .el-title { font-size: 14px; }
  .el-title span { padding: 2px 7px; }
  .el-opt { padding: 12px 10px; font-size: 14px; }
}
