* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: #F2F3F5; color: #1A1A1A;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px; line-height: 1.6;
}
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; background: #F2F3F5; padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.admin { max-width: 1080px; margin: 0 auto; padding: 20px 16px 60px; }

h1, h2, h3 { margin: 0; }
.topbar {
  background: #07C160; color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar .title { font-size: 17px; font-weight: 600; }
.topbar .sub { font-size: 12px; opacity: .9; }
.linkbtn { color: #fff; font-size: 13px; background: rgba(255,255,255,.18); padding: 5px 12px; border-radius: 20px; border: none; cursor: pointer; }

.pad { padding: 14px; }
.card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.card .t { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.muted { color: #888; font-size: 13px; }
.small { font-size: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row + .row { margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stats-row { margin-bottom: 12px; }
/* 批量导入课程行：模板按钮固定宽，文件选择框占满剩余空间 */
#impTpl { width: auto; display: inline-block; padding: 10px 20px; margin-top: 0; white-space: nowrap; }
#impFile { flex: 1; min-width: 0; margin-top: 0; }
.stat { background: #fff; border-radius: 12px; padding: 14px; text-align: center; }
.stat .n { font-size: 22px; font-weight: 700; color: #07C160; }
.stat .l { font-size: 12px; color: #888; margin-top: 2px; }
.stat.click { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.stat.click:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.badge { display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 5px; border-radius: 9px; background: #FA5151; color: #fff; font-size: 11px; line-height: 17px; text-align: center; }
.tabs button.on .badge { background: #fff; color: #07C160; }

label { display: block; font-size: 13px; color: #666; margin: 10px 0 5px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #DDD; border-radius: 10px;
  font-size: 15px; background: #fff; font-family: inherit;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #07C160; }

.btn {
  display: block; width: 100%; padding: 12px; border: none; border-radius: 24px;
  background: #07C160; color: #fff; font-size: 16px; cursor: pointer; margin-top: 14px;
}
.btn:active { opacity: .85; }
.btn.ghost { background: #fff; color: #444; border: 1px solid #DDD; }
.btn.mini { display: inline-block; width: auto; padding: 6px 14px; font-size: 13px; margin: 0; border-radius: 16px; white-space: nowrap; }
.btn.danger { background: #FA5151; }
.btn.sm { padding: 8px; font-size: 14px; margin-top: 8px; }

.tabs { display: flex; background: #fff; border-radius: 10px; padding: 4px; margin-bottom: 12px; }
.tabs button {
  flex: 1; padding: 9px; border: none; background: transparent; font-size: 14px;
  border-radius: 8px; cursor: pointer; color: #666;
}
.tabs button.on { background: #07C160; color: #fff; }

.banner { background: #FFF7E6; border: 1px solid #FFE0A3; color: #B26A00; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }
.okbox { background: #E8F8EE; border: 1px solid #B7E7C7; color: #0A6B36; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }
.errbox { background: #FDECEC; border: 1px solid #F5B7B7; color: #A02020; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }

.list-item {
  background: #fff; border-radius: 12px; padding: 13px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between; cursor: pointer;
}
.list-item .nm { font-size: 15px; font-weight: 500; }
.list-item .mt { font-size: 12px; color: #999; margin-top: 3px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: #E8F8EE; color: #07C160; display: inline-block; }
.tag.gray { background: #EEE; color: #888; }
.tag.red { background: #FDECEC; color: #FA5151; }
.tag.orange { background: #FFF3E0; color: #E08A00; }
.tag.blue { background: #EAF2FF; color: #2A6FD6; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  display: flex; border-top: 1px solid #E5E5E5; z-index: 20;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -1px 10px rgba(0, 0, 0, .05);
}
.tabbar div {
  flex: 1; min-height: 60px; padding: 8px 0 7px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 13px; color: #999; cursor: pointer;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.tabbar div svg { width: 27px; height: 27px; display: block; }
.tabbar div span { line-height: 1.15; letter-spacing: .3px; }
.tabbar div.on { color: #07C160; font-weight: 600; }
.tabbar div.on svg { stroke-width: 2.1; }
.tabbar div:active { background: #F5F5F5; }

.opt { border: 1px solid #DDD; border-radius: 10px; padding: 11px 12px; margin-bottom: 9px; background: #fff; cursor: pointer; white-space: pre-wrap; word-break: break-word; }
.opt.sel { border-color: #07C160; background: #E8F8EE; }
.opt.right { border-color: #07C160; background: #E8F8EE; }
.opt.wrong { border-color: #FA5151; background: #FDECEC; }
/* 题干与解析保留原文换行：题库里 OD 表、案例材料、计算步骤都靠换行排版，
   默认折叠会挤成一团无法阅读 */
.qstem { font-size: 16px; line-height: 1.7; margin-bottom: 12px; white-space: pre-wrap; word-break: break-word; }
.plain { white-space: pre-wrap; word-break: break-word; }
.bar { height: 4px; background: #E8E8E8; border-radius: 2px; overflow: hidden; margin-bottom: 12px; }
.bar i { display: block; height: 100%; background: #07C160; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; font-size: 13px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #F0F0F0; vertical-align: middle; }
th { background: #FAFAFA; color: #666; font-weight: 600; }
tr:last-child td { border-bottom: none; }

.chk {
  display: block; font-size: 13px; color: #333; margin: 8px 0; cursor: pointer;
}
.chk input { width: auto; margin-right: 8px; vertical-align: middle; }
.checks { max-height: 260px; overflow: auto; }

.qnos { display: flex; flex-wrap: wrap; gap: 8px; }
.qno {
  display: inline-block; width: 34px; height: 34px; line-height: 34px; text-align: center;
  border: 1px solid #DDD; border-radius: 8px; font-size: 13px; color: #888; cursor: pointer;
}
.qno.done { border-color: #07C160; color: #07C160; background: #E8F8EE; }
.qno.cur { border-color: #07C160; background: #07C160; color: #fff; }

.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex;
  align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
.modal .box { background: #fff; border-radius: 14px; padding: 18px; width: 100%; max-width: 560px; max-height: 86vh; overflow: auto; }
.modal h3 { font-size: 16px; margin-bottom: 12px; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 20px;
  font-size: 14px; z-index: 99;
}
.hide { display: none !important; }
.center { text-align: center; }
.empty { text-align: center; color: #AAA; padding: 40px 10px; font-size: 14px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; }
.pager button { padding: 6px 14px; border: 1px solid #DDD; background: #fff; border-radius: 8px; cursor: pointer; }

/* ---------- 院校专业维护 · 主从布局（左清单 + 右详情） ---------- */
.opt-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 12px; align-items: start; }
@media (max-width: 760px) { .opt-wrap { grid-template-columns: 1fr; } }
.opt-list-card { padding: 0; overflow: hidden; }
.opt-head { padding: 12px 12px 10px; }
.opt-head .t { margin-bottom: 8px; }
.opt-head .t .muted { font-weight: 400; font-size: 12px; }
.opt-search {
  width: 100%; box-sizing: border-box; border: 1px solid #E3E6EA; border-radius: 8px;
  padding: 8px 10px; font-size: 13px; background: #F7F9FA; margin-bottom: 8px;
}
.opt-search:focus { outline: none; border-color: #07C160; background: #fff; }
.opt-addrow { display: flex; gap: 6px; }
.opt-addrow input, .opt-addrow select {
  flex: 1; min-width: 0; width: auto; border: 1px solid #E3E6EA; border-radius: 8px;
  padding: 7px 8px; font-size: 13px; margin-top: 0; display: block;
}
.opt-addrow input:first-child { flex: 1.4; }
.opt-addrow .btn { width: auto; margin-top: 0; padding: 7px 16px; font-size: 13px; flex: none; border-radius: 8px; }
.opt-items { max-height: 460px; overflow: auto; border-top: 1px solid #F0F2F4; }
.opt-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 14px; cursor: pointer; border-bottom: 1px solid #F4F5F7;
}
.opt-item:hover { background: #F7FAF8; }
.opt-item.on { background: #E8F8EE; box-shadow: inset 3px 0 0 #07C160; }
.opt-item .n { font-size: 14px; color: #222; font-weight: 500; }
.opt-item .c { font-size: 12px; color: #999; margin-top: 2px; }
.opt-sec { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #E6E9EC; }
.opt-sec .st { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.opt-sec .st .muted { font-weight: 400; font-size: 12px; margin-left: 6px; }
.opt-chk-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px;
  max-height: 300px; overflow: auto; padding: 2px;
}
@media (max-width: 760px) { .opt-chk-grid { grid-template-columns: 1fr; } }
.opt-group-t { grid-column: 1 / -1; font-size: 12px; color: #07C160; font-weight: 600; margin-top: 6px; }

/* ---------- 数据看板 · 分组小标题 ---------- */
.dash-sec { font-size: 12px; color: #8a949e; font-weight: 600; letter-spacing: 1px; margin: 16px 2px 8px; }
.dash-sec-tip { font-weight: 400; letter-spacing: 0; color: #b8c0c8; margin-left: 8px; }

/* 题目报错入口：题干下方一行小字，不打扰做题 */
.rplink {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #eee;
  font-size: 13px;
  color: #AAA;
  text-align: right;
  cursor: pointer;
  user-select: none;
}
.rplink:active { color: #FA5151; }

/* ========== 管理后台 v2：左侧边栏布局（2026-10-04） ========== */
.login-wrap { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; }
.login-box { width: 100%; max-width: 380px; }
.login-brand { text-align: center; font-size: 17px; font-weight: 700; margin-bottom: 14px; color: #222; }

.admin-shell { display: flex; min-height: 100vh; background: #F6F7F9; }
.side {
  width: 212px; flex-shrink: 0; background: #fff; border-right: 1px solid #ECEEF1;
  display: flex; flex-direction: column; padding: 20px 12px 16px;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { font-size: 16px; font-weight: 700; color: #1A1A1A; padding: 4px 10px 18px; line-height: 1.4; }
.side-brand span { display: block; font-size: 12px; font-weight: 400; color: #9AA0A8; }
.side-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.side-item {
  display: flex; align-items: center; justify-content: space-between;
  text-align: left; padding: 10px 12px; margin: 0; border: none; background: none;
  font-size: 14px; color: #444; border-radius: 8px; cursor: pointer; width: 100%;
  font-family: inherit;
}
.side-item:hover { background: #F5F6F8; }
.side-item.on { background: #E8F8EE; color: #06A64F; font-weight: 600; box-shadow: inset 3px 0 0 #07C160; }
.side-item .badge { margin-left: 8px; }
.side-item.on .badge { background: #07C160; }
.side-foot { border-top: 1px solid #F0F0F2; padding: 12px 4px 0; }
.side-user { font-size: 12px; color: #9AA0A8; padding: 0 8px; word-break: break-all; }

.main { flex: 1; min-width: 0; padding: 0 26px 50px; }
.pagehead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 2px 14px; flex-wrap: wrap; }
.pagehead h2 { font-size: 19px; font-weight: 700; }
.pagehead-extra { font-size: 13px; color: #8A9099; }
.panel { max-width: 1080px; }

/* 清爽化：卡片带轻阴影、表头浅色、行悬停反馈 */
.admin-shell .card { box-shadow: 0 1px 3px rgba(16,24,40,.05); border-radius: 12px; padding: 16px; }
.admin-shell .stat { box-shadow: 0 1px 3px rgba(16,24,40,.05); padding: 16px 12px; }
.admin-shell .stat .n { color: #07A64F; }
.admin-shell th { background: #FAFBFC; color: #7A8087; font-weight: 500; font-size: 12.5px; }
.admin-shell td { font-size: 13.5px; }
.admin-shell tr:hover td { background: #FAFBFC; }

@media (max-width: 900px) {
  .admin-shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; gap: 8px; }
  .side-brand { padding: 0 6px; }
  .side-brand span { display: inline; margin-left: 6px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .side-item { width: auto; padding: 8px 10px; }
  .side-foot { border: none; padding: 0; margin-left: auto; display: flex; align-items: center; gap: 8px; }
  .side-foot .btn { width: auto; margin-top: 0; }
  .main { padding: 0 14px 40px; }
}

/* 弹窗右上角关闭按钮（学习日志等） */
.modal .box { position: relative; }
.modal-close {
  position: absolute; top: 14px; right: 16px; width: 30px; height: 30px;
  border: none; background: #F2F3F5; border-radius: 50%;
  font-size: 14px; color: #888; cursor: pointer; line-height: 30px;
  padding: 0; display: flex; align-items: center; justify-content: center;
  font-family: inherit;
}
.modal-close:hover { background: #E6E8EB; color: #333; }

/* 数据看板：紧凑小卡（只作用于看板，不影响学员管理等页的 .stat） */
.dash-wrap .grid4 { gap: 8px; }
.dash-wrap .dash-sec { margin: 12px 2px 6px; }
.dash-wrap .stat { padding: 9px 8px; border-radius: 10px; }
.dash-wrap .stat .n { font-size: 18px; }
.dash-wrap .stat .l { font-size: 11px; margin-top: 1px; }
