:root {
  --primary: #2C5F8A;
  --primary-dark: #1F4767;
  --accent: #C0504D;
  --ok: #2E7D4F;
  --warn: #B26A00;
  --bg: #F2F5F9;
  --card: #FFFFFF;
  --line: #E1E7EF;
  --text: #1F2937;
  --muted: #6B7280;
  --radius: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6; -webkit-text-size-adjust: 100%;
}
a { color: var(--primary); text-decoration: none; }
.wrap { max-width: 880px; margin: 0 auto; padding: 12px 14px 96px; }
.topbar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; padding: 14px 14px 16px;
}
.topbar .inner { max-width: 880px; margin: 0 auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar h1 { font-size: 1.02rem; margin: 0; font-weight: 600; letter-spacing: .5px; }
.topbar .sub { font-size: .76rem; opacity: .85; }
.topbar .spacer { flex: 1; }
.topbar a { color: #fff; font-size: .8rem; opacity: .9; border: 1px solid rgba(255,255,255,.5); padding: 4px 10px; border-radius: 20px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  margin: 0 0 14px; box-shadow: 0 1px 3px rgba(16,42,67,.07), 0 6px 18px -12px rgba(16,42,67,.2);
}
.card > h2 {
  font-size: .95rem; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; color: var(--primary-dark);
}
.card > .hint { font-size: .78rem; color: var(--muted); margin: 0 0 12px; }
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: .75rem; font-weight: 700; flex: none;
}
label { display: block; font-size: .8rem; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=number], input[type=date], input[type=password], select, textarea {
  width: 100%; padding: 11px 12px; font-size: 1rem; font-family: inherit; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; background: #FBFCFE; appearance: none;
}
textarea { min-height: 74px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(44,95,138,.28); border-color: var(--primary); background: #fff; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px; font-size: .95rem; font-weight: 600; font-family: inherit;
  color: #fff; background: var(--primary); border: none; border-radius: 10px; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.gray { background: #E8EDF3; color: #33475B; }
.btn.danger { background: var(--accent); }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: .84rem; }
.btn[disabled] { opacity: .55; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }

/* 课程 / 教材条目 */
.item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; }
.item.checked { border-color: #BFDCCB; background: #F7FCF9; }
.item.edited { border-color: #F0D6A8; background: #FFFBF3; }
.item-head { display: flex; align-items: flex-start; gap: 8px; }
.item-title { font-weight: 600; font-size: .95rem; flex: 1; }
.item-title small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.tag {
  display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 999px;
  background: #EAF1F8; color: var(--primary-dark); white-space: nowrap;
}
.tag.ok { background: #E3F3E8; color: var(--ok); }
.tag.warn { background: #FDF1DE; color: var(--warn); }
.tag.gray { background: #EEF1F5; color: var(--muted); }
.kv { display: flex; gap: 12px; flex-wrap: wrap; font-size: .86rem; color: #33475B; margin: 8px 0 0; }
.kv b { font-weight: 600; color: var(--text); }
details { margin-top: 10px; }
details > summary {
  list-style: none; cursor: pointer; font-size: .85rem; color: var(--primary);
  padding: 6px 0; display: inline-block;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "✎ "; }
details[open] > summary::before { content: "▾ "; }

/* 进度 */
.progress-wrap { margin: 4px 0 10px; }
.bar { height: 9px; background: #E4EAF2; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #4E8FC0, var(--primary)); transition: width .3s; }
.progress-label { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-bottom: 5px; }

.notice { border-radius: 10px; padding: 10px 12px; font-size: .85rem; margin-bottom: 12px; }
.notice.ok { background: #E6F5EC; color: #1E6B41; }
.notice.err { background: #FDECEC; color: #A32C2C; }
.notice.info { background: #EAF2F9; color: #235A82; }

.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(16,42,67,.08);
}
.sticky-bar .inner { max-width: 880px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.sticky-bar .txt { font-size: .78rem; color: var(--muted); flex: 1; }

/* 表格（管理端，窄屏横向滚动） */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table.data { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 640px; }
table.data th, table.data td { border: 1px solid var(--line); padding: 8px 8px; text-align: center; vertical-align: middle; }
table.data th { background: #EDF3F9; color: #22384F; font-weight: 600; white-space: nowrap; }
table.data td.left { text-align: left; }
table.data tr.unsubmitted td { background: #FFFAF3; }
table.data tr.done td { background: #F6FBF7; }
.diff-old { color: #A33; text-decoration: line-through; font-size: .8rem; }
.diff-new { color: var(--ok); font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: #fff; border-radius: 12px; padding: 12px; text-align: center; border: 1px solid var(--line); }
.stat .n { font-size: 1.5rem; font-weight: 700; color: var(--primary-dark); line-height: 1.1; }
.stat .l { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.muted { color: var(--muted); font-size: .82rem; }
.center { text-align: center; }
.mt0 { margin-top: 0; }
.mt12 { margin-top: 12px; }
.hero { text-align: center; padding: 26px 6px 6px; }
.hero .logo { font-size: 2.2rem; line-height: 1; }
.hero h2 { font-size: 1.15rem; margin: 10px 0 4px; color: var(--primary-dark); }
.hero p { font-size: .84rem; color: var(--muted); margin: 0 0 18px; }
.login-box { max-width: 420px; margin: 0 auto; }
ol.brief { font-size: .85rem; color: #33475B; padding-left: 20px; margin: 6px 0 0; }
ol.brief li { margin-bottom: 4px; }

/* 点选式问题标签：拇指友好，选中即变色 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.chip { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
  display: inline-block; padding: 9px 13px; border: 1px solid var(--line); border-radius: 20px;
  background: #fff; font-size: .84rem; line-height: 1.2; color: #33475B; transition: .12s;
  -webkit-tap-highlight-color: transparent;
}
.chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.chip input:disabled + span { opacity: .6; }
.btn.green { background: linear-gradient(135deg, #1E9E5A, #16794A); color: #fff; }
.btn.ghost { background: #fff; color: var(--primary-dark); border: 1px solid var(--line); }
.btn.ghost.sm { padding: 8px 12px; font-size: .82rem; }

/* 顶部核对清单：左“教师要做”，右“系里要核对” */
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 12px; }
.checklist .box { background: #F7FAFD; border: 1px solid #DCE6F0; border-radius: 10px; padding: 10px 12px; }
.checklist .box.mine { background: #F2FAF5; border-color: #CFE9D8; }
.checklist .box h3 { margin: 0 0 6px; font-size: .84rem; color: #2C5F8A; }
.checklist .box.mine h3 { color: #1F7A46; }
.checklist ol { margin: 0; padding-left: 18px; font-size: .8rem; color: #33475B; line-height: 1.55; }
.checklist li { margin-bottom: 3px; }
@media (max-width: 640px) { .checklist { grid-template-columns: 1fr; } }
