/* 教师教学工作台 · 基础样式
   配色：#0F4C43 深绿 / #28A88C 主绿 / #F9C629 强调黄 / #F6F7F5 底色
   原则：随堂可用 —— 大按钮（≥48px）、字号偏大、高对比度 */
:root {
  --brand: #0F4C43;
  --brand-2: #28A88C;
  --brand-3: #E6F4F0;
  --accent: #F9C629;
  --accent-soft: #FFF6D9;
  --bg: #F6F7F5;
  --card: #FFFFFF;
  --text: #1C2B27;
  --muted: #6B7A75;
  --line: #E2E6E3;
  --danger: #C0392B;
  --danger-soft: #FDECEA;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(15, 76, 67, .07);
  --shadow-lg: 0 12px 40px rgba(15, 76, 67, .16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-2); }

/* ---------- 登录 ---------- */
#view-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 12% 18%, #19705F 0, transparent 42%),
    radial-gradient(circle at 88% 8%, #2E9C86 0, transparent 38%),
    linear-gradient(160deg, #0F4C43 0%, #143E37 100%);
  padding: 24px;
}

.login-wrap { width: 100%; max-width: 880px; }

.login-brand { text-align: center; color: #fff; margin-bottom: 26px; }
.login-brand .kicker { letter-spacing: .34em; font-size: 12px; opacity: .72; margin-bottom: 10px; }
.login-brand h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: .04em; }
.login-brand p { margin: 8px 0 0; opacity: .78; font-size: 14px; }

.login-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.login-card {
  background: #fff;
  border-radius: 14px;
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.login-card h2 { margin: 0 0 4px; font-size: 19px; color: var(--brand); }
.login-card .hint { margin: 0 0 18px; font-size: 13px; color: var(--muted); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

.input, .select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(40, 168, 140, .16); }
.input::placeholder { color: #A9B4B0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: var(--brand-2);
  color: #fff;
  font-weight: 600;
  letter-spacing: .02em;
  transition: transform .06s, background .15s, opacity .15s;
}
.btn:hover { background: #23987F; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: #3B2F00; }
.btn-accent:hover { background: #EFB90F; }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--brand-3); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 7px; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #A93226; }

.login-msg { margin-top: 12px; font-size: 13px; min-height: 18px; }
.login-msg.error { color: var(--danger); }
.login-msg.ok { color: var(--brand-2); }

/* 学生候选 */
.candidate-list { display: grid; gap: 10px; margin: 10px 0 4px; }
.candidate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #FBFCFB;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.candidate:hover { border-color: var(--brand-2); background: var(--brand-3); }
.candidate .c-name { font-weight: 700; }
.candidate .c-meta { font-size: 12px; color: var(--muted); }

/* ---------- 主界面 ---------- */
#view-main { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: 62px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--brand);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar .tb-left { display: flex; align-items: center; gap: 14px; }
.topbar .logo { font-weight: 800; font-size: 17px; letter-spacing: .04em; }
.topbar .logo span { color: var(--accent); }
.topbar .tb-sub { font-size: 12px; opacity: .72; letter-spacing: .1em; }
.topbar .tb-right { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.topbar .who { opacity: .9; }

.icon-btn {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 16px;
}
.icon-btn:hover { background: rgba(255,255,255,.22); }

.layout { flex: 1 1 auto; display: grid; grid-template-columns: 296px 1fr; min-height: 0; }

/* 侧栏 */
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 16px 14px 24px;
  overflow-y: auto;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sidebar-head h2 { margin: 0; font-size: 14px; color: var(--muted); letter-spacing: .08em; font-weight: 600; }

.class-list { display: grid; gap: 10px; }
.class-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px 12px 10px;
  text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .06s;
}
.class-card:hover { border-color: var(--brand-2); box-shadow: var(--shadow); }
.class-card.active { border-color: var(--brand-2); background: var(--brand-3); }
.class-card .cc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.class-card .cc-name { font-weight: 700; font-size: 15px; }
.class-card .cc-course { margin-top: 2px; font-size: 12px; color: var(--muted); }
.class-card .cc-meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; background: #F1F4F2; color: var(--muted);
}
.pill.warn { background: var(--accent-soft); color: #8A6A00; }
.pill.ok { background: var(--brand-3); color: var(--brand); }

.sidebar-empty {
  padding: 22px 14px; border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--muted); font-size: 13px; text-align: center; line-height: 1.8;
}

/* 主区 */
.content { padding: 20px 22px 40px; overflow-y: auto; background: var(--bg); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h1 { margin: 0; font-size: 22px; color: var(--brand); letter-spacing: .01em; }
.section-head .desc { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.section-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card + .card { margin-top: 16px; }
.card-title { margin: 0 0 14px; font-size: 15px; font-weight: 700; color: var(--brand); display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ""; width: 4px; height: 15px; border-radius: 2px; background: var(--accent); }

/* 日历 */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-month { font-size: 17px; font-weight: 700; color: var(--brand); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 12px; color: var(--muted); padding: 6px 0; font-weight: 600; }
.cal-cell {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.cal-cell:hover { border-color: var(--brand-2); background: #FAFCFB; }
.cal-cell.other { background: transparent; border-color: transparent; cursor: default; }
.cal-cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent-soft); }
.cal-day { font-size: 12px; color: var(--muted); font-weight: 600; }
.cal-cell.today .cal-day { color: #8A6A00; }
.cal-item {
  font-size: 11.5px;
  line-height: 1.35;
  padding: 3px 5px;
  border-radius: 5px;
  background: var(--brand-3);
  color: var(--brand);
  border-left: 3px solid var(--brand-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-item.done { background: #EFF2F0; color: #5B6B66; border-left-color: #9FB0AA; }
.cal-item .ci-time { font-weight: 700; }

/* 班级详情 */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb button { border: 0; background: none; color: var(--brand-2); padding: 0; font-size: 13px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.stat .s-label { font-size: 12px; color: var(--muted); }
.stat .s-value { font-size: 26px; font-weight: 800; color: var(--brand); line-height: 1.2; margin-top: 2px; }
.stat .s-unit { font-size: 12px; color: var(--muted); margin-left: 4px; font-weight: 400; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  border: 0; background: none; padding: 10px 14px;
  font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent;
}
.tab.active { color: var(--brand); font-weight: 700; border-bottom-color: var(--brand-2); }
.tab[disabled] { opacity: .45; cursor: not-allowed; }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th, table.grid td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.grid th { background: #F3F6F4; color: var(--brand); font-weight: 600; font-size: 12.5px; position: sticky; top: 0; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid tr:hover td { background: #FAFCFB; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.empty-line { padding: 26px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 40, 36, .45);
  display: grid; place-items: center; z-index: 60; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal {
  width: 100%; max-width: 620px; max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 22px 22px 18px;
}
.modal h3 { margin: 0 0 4px; font-size: 18px; color: var(--brand); }
.modal-wide { max-width: 900px; }
table.grid.grid-sm { font-size: 12.5px; }
table.grid.grid-sm th, table.grid.grid-sm td { padding: 7px 9px; }
.modal .m-desc { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* toast */
#toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 90; }
.toast {
  min-width: 220px; max-width: 420px;
  padding: 12px 16px; border-radius: 9px;
  background: #16342E; color: #fff; font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  animation: slidein .18s ease-out;
}
.toast.err { background: #7E2A20; }
.toast.ok { background: #136B5A; }
@keyframes slidein { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

.badge-soft { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: #8A6A00; }
.muted { color: var(--muted); }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }

@media (max-width: 1080px) {
  .layout { grid-template-columns: 240px 1fr; }
  .login-panels { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}

/* ---------- 考勤 ---------- */
.btn-xl { min-height: 54px; padding: 0 26px; font-size: 16px; font-weight: 700; border-radius: 10px; }

.att-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.att-pick { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; min-width: 260px; }
.att-pick .k { color: var(--muted); font-size: 13px; flex: none; }
.att-pick select {
  height: 46px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; flex: 1; min-width: 0; font-size: 15px;
}

.att-info {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  font-size: 14px; margin-bottom: 10px;
}

.att-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 12px; }
.att-stat {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; display: flex; justify-content: space-between; align-items: baseline;
}
.att-stat .k { font-size: 13px; color: var(--muted); }
.att-stat .v { font-size: 22px; font-weight: 800; line-height: 1.2; }
.att-stat.ok .v { color: #1E9E7E; }
.att-stat.warn .v { color: #B8860B; }
.att-stat.info .v { color: #2B6CB0; }
.att-stat.bad .v { color: var(--danger); }
.att-stat.early .v { color: #C05621; }

.att-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.att-dirty-tag { font-size: 13px; color: var(--muted); }
.att-dirty-tag:not(:empty) { color: #B8860B; font-weight: 600; }

.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.att-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px 9px; transition: border-color .12s, background .12s;
}
.att-line { display: flex; align-items: center; gap: 8px; }
.att-seq {
  flex: none; width: 27px; height: 27px; border-radius: 50%;
  background: var(--brand-3); color: var(--brand);
  font-size: 13px; font-weight: 700; display: grid; place-items: center;
}
.att-name { flex: 1; font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.att-badge {
  flex: none; font-size: 12.5px; padding: 2px 9px; border-radius: 999px;
  background: #EDF7F3; color: #1E7F6A;
}

.att-btns { display: flex; gap: 6px; margin-top: 9px; }
.att-btn {
  flex: 1; height: 36px; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; font-size: 13px; color: var(--muted);
  transition: background .12s, border-color .12s, color .12s;
}
.att-btn:hover { border-color: var(--brand-2); color: var(--brand); }
.att-btn.on.b-late { background: #FFF3CD; border-color: var(--accent); color: #8A6D00; font-weight: 700; }
.att-btn.on.b-leave { background: #E3F2FD; border-color: #64B5F6; color: #12558F; font-weight: 700; }
.att-btn.on.b-absent { background: var(--danger-soft); border-color: #E57373; color: var(--danger); font-weight: 700; }
.att-btn.on.b-early { background: #FFEEDD; border-color: #ED8936; color: #8A4B0F; font-weight: 700; }

.att-card.st-late { border-color: #F2D28B; background: #FFFCF2; }
.att-card.st-late .att-badge { background: #FFF3CD; color: #8A6D00; }
.att-card.st-leave { border-color: #BBD8F2; background: #F4FAFF; }
.att-card.st-leave .att-badge { background: #E3F2FD; color: #12558F; }
.att-card.st-absent { border-color: #F3C0B9; background: var(--danger-soft); }
.att-card.st-absent .att-badge { background: #FBD9D4; color: var(--danger); }
.att-card.st-absent .att-name { color: #A93226; }
.att-card.st-early { border-color: #F3CFB4; background: #FFF8F2; }
.att-card.st-early .att-badge { background: #FFEEDD; color: #8A4B0F; }

@media (max-width: 1080px) {
  .att-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 780px) {
  .att-grid { grid-template-columns: 1fr; }
  .att-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 教学日志 ---------- */
.badge { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #EEF1EF; color: var(--muted); white-space: nowrap; }
.badge-ok { background: #E4F5EF; color: #1B7A5F; }
.badge-draft { background: var(--accent-soft); color: #8A6A00; }
.btn-hot { box-shadow: 0 0 0 3px rgba(249, 198, 41, .45); }

.log-wrap { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 16px; align-items: start; }
.log-side { display: flex; flex-direction: column; gap: 6px; max-height: 68vh; overflow: auto; padding-right: 4px; }
.log-item {
  text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; transition: .12s;
}
.log-item:hover { border-color: var(--brand-2); }
.log-item.active { border-color: var(--brand-2); background: var(--brand-3); }
.log-item.pending { border-style: dashed; background: #FFFDF4; }
.log-item-date { display: flex; align-items: baseline; gap: 7px; }
.log-item-date strong { font-size: 15px; letter-spacing: .5px; }
.log-item-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.log-main { min-width: 0; }

/* A4 纸面感：白底、细边、内边距 */
.paper {
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  padding: 22px 26px 24px; box-shadow: var(--shadow); max-width: 1080px;
}
.paper-title { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: 6px; margin-bottom: 12px; color: var(--brand); }
.paper-info { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: #33433E; margin-bottom: 12px; }
.log-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.log-table th, .log-table td { border: 1px solid #CBD3CF; padding: 0; vertical-align: middle; }
.log-table th { background: #F2F5F3; font-size: 12.5px; font-weight: 700; padding: 7px 6px; color: #2C3B36; }
.log-table td { height: 42px; }
.cell-input {
  width: 100%; height: 100%; border: 0; background: transparent; padding: 9px 8px; font-size: 13px; outline: none;
}
.cell-input:focus { background: #FFFCEB; box-shadow: inset 0 0 0 2px rgba(249, 198, 41, .55); }
.cell-static { padding: 9px 8px; font-size: 12.5px; color: #33433E; }
.paper-sum-label { font-size: 12.5px; color: var(--muted); margin: 12px 0 4px; }
.paper-summary { width: 100%; border: 1px solid #CBD3CF; border-radius: 4px; padding: 10px 12px; font-size: 13.5px; line-height: 1.7; resize: vertical; background: #FCFDFC; }
.log-foot { margin-top: 14px; gap: 8px; }

/* ---------- 花样点名 ---------- */
.rc-bar { margin-bottom: 12px; }
.rc-stage { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.rc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.rc-modes { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 14px; font-size: 13px; color: var(--muted); min-height: 34px;
}
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
.rc-card {
  border: 2px dashed var(--brand-2); border-radius: 14px; padding: 18px 20px; text-align: center;
  background: linear-gradient(180deg, #F3FBF8, #FFFFFF);
}
.rc-seq { font-size: 13px; color: var(--muted); letter-spacing: 1px; }
.rc-name { font-size: 46px; font-weight: 900; letter-spacing: 6px; line-height: 1.25; color: var(--brand); }
.rc-hint { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.rc-quality { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.rc-quality .btn { min-height: 44px; }

.rc-grid-box { margin-top: 14px; }
.rc-grid-title { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.rc-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.rc-cell {
  display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; padding: 7px 9px; font-size: 13px; min-height: 42px;
}
.rc-cell.called { background: #EEF1EF; color: #8C9995; }
.rc-cell.answered { background: #E4F5EF; color: #1B7A5F; border-color: #BFE3D6; }
.rc-cell-seq { font-size: 11.5px; color: var(--muted); width: 16px; text-align: right; }
.rc-cell-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-cell-tag { margin-left: auto; font-size: 11.5px; }

.qa-box { margin-top: 18px; }
.qa-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.qa-form-row { display: flex; gap: 8px; }
.qa-form-row .select { width: 200px; flex: 0 0 auto; }
.qa-list { display: flex; flex-direction: column; gap: 7px; max-height: 40vh; overflow: auto; }
.qa-item { border-left: 3px solid var(--brand-2); background: #fff; border-radius: 0 8px 8px 0; padding: 8px 12px; box-shadow: var(--shadow); }
.qa-meta { display: flex; justify-content: space-between; font-size: 12px; }
.qa-q { font-size: 13.5px; margin-top: 3px; }
.qa-a { font-size: 13px; color: #33433E; margin-top: 2px; }

@media (max-width: 980px) {
  .log-wrap { grid-template-columns: 1fr; }
  .log-side { max-height: 220px; flex-direction: row; flex-wrap: wrap; }
  .rc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media print {
  .topbar, .sidebar, .section-actions { display: none !important; }
  .layout { display: block; }
  body { background: #fff; }
}

/* ===== 通用补充 ===== */
.spacer { flex: 1 1 auto; }
.btn-lg { padding: 14px 34px; font-size: 16px; border-radius: 10px; }
.subtabs { display: flex; gap: 8px; margin: 14px 0 12px; flex-wrap: wrap; }
.subtabs .chip { padding: 8px 16px; font-size: 13.5px; }
.card-title { font-size: 15px; font-weight: 700; margin: 0 0 10px; }

/* ===== 作业列表（教师） ===== */
.hw-list { display: grid; gap: 12px; }
.hw-card { background: #fff; border: 1px solid #E4E8EC; border-radius: 12px; padding: 14px 16px; }
.hw-card:hover { border-color: #C9D6D1; box-shadow: 0 2px 10px rgba(40, 168, 140, .08); }
.hw-card-top { display: flex; align-items: center; gap: 10px; }
.hw-title { font-size: 15.5px; flex: 1; }
.hw-meta { color: #7A8794; font-size: 12.5px; margin-top: 6px; display: flex; gap: 14px; }
.hw-actions { margin-top: 10px; }
.hw-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hw-head .section-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== 题目卡片 ===== */
.q-card { background: #fff; border: 1px solid #E4E8EC; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.q-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.q-seq { font-weight: 700; color: #1E6F5C; }
.q-stem { font-size: 14.5px; line-height: 1.65; color: #22303C; white-space: pre-wrap; }
.q-opts { margin-top: 8px; display: grid; gap: 5px; }
.q-opt { font-size: 13.5px; color: #4A5865; padding: 5px 10px; border-radius: 8px; border: 1px solid #EEF1F4; }
.q-opt.right { border-color: #B9E4D4; background: #F1FAF6; color: #1E6F5C; }
.q-opt.picked { border-color: #F9C629; background: #FFFAE6; }
.q-answer { margin-top: 8px; font-size: 13px; color: #1E6F5C; background: #F1FAF6; padding: 6px 10px; border-radius: 8px; }
.q-analysis { margin-top: 6px; font-size: 13px; color: #7A8794; }
.grade-inline { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.check-list { display: flex; flex-wrap: wrap; gap: 10px; }
.check { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid #E4E8EC; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.check input { width: 16px; height: 16px; }

/* ===== 批阅名单 ===== */
.grade-list { display: grid; gap: 6px; }
.grade-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #E4E8EC; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; }
.muted-row { opacity: .55; }
.g-seq { width: 26px; color: #94A0AB; text-align: right; }

/* ===== 统计 ===== */
.bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; }
.bar-label { width: 74px; color: #7A8794; }
.bar-track { flex: 1; height: 14px; background: #F1F4F6; border-radius: 7px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #28A88C, #4FC3A1); border-radius: 7px; }
.bar-value { width: 30px; text-align: right; font-weight: 700; color: #22303C; }
.wrong-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #EEF1F4; font-size: 13px; }
.wrong-stem { flex: 1; color: #4A5865; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.miss-list { font-size: 13px; color: #4A5865; line-height: 1.9; }

/* ===== 学生端 ===== */
.stu-list { display: grid; gap: 12px; margin-top: 14px; }
.stu-card { background: #fff; border: 1px solid #E4E8EC; border-radius: 12px; padding: 14px 16px; position: relative; }
.stu-card.need-do { border-left: 4px solid #F9C629; }
.stu-title { font-size: 15.5px; }
.stu-meta { color: #7A8794; font-size: 12.5px; margin-top: 6px; }
.stu-score { position: absolute; right: 16px; top: 14px; font-size: 20px; font-weight: 800; color: #28A88C; }

.ans-list { display: grid; gap: 12px; margin-top: 12px; }
.ans-card { background: #fff; border: 1px solid #E4E8EC; border-radius: 12px; padding: 16px 18px; }
.opt-list { display: grid; gap: 8px; margin-top: 10px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #E4E8EC; border-radius: 10px; cursor: pointer; font-size: 14.5px; min-height: 48px; }
.opt:hover { border-color: #C9D6D1; background: #FAFDFC; }
.opt input { width: 18px; height: 18px; accent-color: #28A88C; flex: none; }
.opt.static { cursor: default; }
.opt.picked { border-color: #F9C629; background: #FFFAE6; }
.opt.right { border-color: #28A88C; background: #F1FAF6; }
.opt-key { font-weight: 700; color: #1E6F5C; width: 18px; flex: none; }
.opt-text { flex: 1; line-height: 1.6; }
.opt-tag { font-size: 11.5px; color: #8A6D00; background: #FFF3C4; padding: 2px 8px; border-radius: 20px; flex: none; }
.opt-tag.std { color: #1E6F5C; background: #D9F2E8; }

.ans-bar { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 16px; background: #fff; border: 1px solid #E4E8EC; border-radius: 12px; position: sticky; bottom: 12px; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.result-score { text-align: right; }
.rs-num { font-size: 40px; font-weight: 800; color: #28A88C; line-height: 1; }
.rs-total { font-size: 13px; color: #7A8794; }

@media (max-width: 980px) {
  .hw-head, .result-head { flex-direction: column; align-items: flex-start; }
  .ans-bar { flex-wrap: wrap; }
}

/* ===== 实训报告 ===== */
.sec-editor { display: grid; gap: 6px; margin: 6px 0; }
.sec-row { display: flex; align-items: center; gap: 8px; }
.sec-row .input { flex: 1; }
.sec-no { width: 20px; color: #94A0AB; font-size: 12.5px; text-align: right; }

.report-paper { background: #fff; border: 1px solid #E4E8EC; border-radius: 12px; padding: 28px 34px; margin-top: 14px; line-height: 1.9; }
.rp-title { font-size: 15px; font-weight: 700; color: #1E6F5C; margin: 16px 0 6px; }
.rp-title:first-child { margin-top: 0; }
.rp-text { font-size: 14px; color: #33414D; white-space: pre-wrap; margin: 0 0 8px; }
.rp-editor { display: grid; gap: 14px; margin-top: 12px; }
.rp-block { background: #fff; border: 1px solid #E4E8EC; border-radius: 12px; padding: 14px 18px; }
.rp-block textarea { min-height: 130px; }

/* ===== 学生画像 ===== */
.pf-table { background: #fff; border: 1px solid #E4E8EC; border-radius: 12px; overflow: hidden; margin-top: 12px; }
.pf-row { display: grid; grid-template-columns: 40px 84px 110px 60px 76px 1fr 60px; gap: 8px; align-items: center; padding: 9px 14px; border-bottom: 1px solid #F1F4F6; font-size: 13.5px; cursor: pointer; }
.pf-row:last-child { border-bottom: 0; }
.pf-row:hover { background: #F8FBFA; }
.pf-head { background: #F6F8FA; cursor: default; font-weight: 700; color: #5A6B78; font-size: 12.5px; }
.pf-head:hover { background: #F6F8FA; }
.pf-risk { background: #FFF8F7; }
.pf-total { font-weight: 700; color: #1E6F5C; }
.pf-total-big { font-size: 26px; font-weight: 800; color: #1E6F5C; }
.pf-mini { display: flex; gap: 3px; }
.pf-bar { height: 8px; background: #EEF2F4; border-radius: 6px; overflow: hidden; }
.pf-bar-fill { height: 100%; border-radius: 6px; transition: width .3s; }
.pf-mini .pf-bar { width: 18px; flex: 0 0 18px; }
.pf-flag { font-size: 12px; text-align: right; }
.lv-a { background: #E8F6F1; color: #1E6F5C; }
.lv-b { background: #EDF6F0; color: #3E7D5C; }
.lv-c { background: #FEF7E3; color: #8A6A00; }
.lv-d { background: #FDECEA; color: #C0392B; }
.lv-n { background: #F1F4F6; color: #7A8894; }
.pf-dim { padding: 10px 0; border-bottom: 1px dashed #EEF2F4; }
.pf-dim:last-child { border-bottom: 0; }
.pf-dim-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pf-dim-score { font-weight: 800; color: #1E6F5C; font-size: 16px; }
.pf-items { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: #5A6B78; }
.kp-chip { background: #F1F6F4; color: #2F6F5E; border-radius: 20px; padding: 2px 10px; font-size: 12px; }
.pf-flags { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-insight { margin: 0; line-height: 1.8; color: #33414D; }
.pf-sug { margin-top: 10px; display: grid; gap: 6px; }
.pf-sug-row { background: #F8FBFA; border-left: 3px solid #28A88C; padding: 8px 12px; border-radius: 6px; font-size: 13px; color: #33414D; }

/* ===== 教学大纲 ===== */
.ol-table { background: #fff; border: 1px solid #E4E8EC; border-radius: 12px; overflow-x: auto; margin-top: 12px; }
.ol-row { display: grid; grid-template-columns: 44px 190px 64px 1fr 1fr 110px 100px 40px; gap: 8px; align-items: start; padding: 10px 12px; border-bottom: 1px solid #F1F4F6; }
.ol-row:last-child { border-bottom: 0; }
.ol-head { background: #F6F8FA; font-weight: 700; color: #5A6B78; font-size: 12.5px; }
.ol-row .input, .ol-row textarea { font-size: 13px; }

/* ===== 教案 ===== */
.plan-list { display: grid; gap: 8px; }
.plan-row { display: grid; grid-template-columns: 104px 1fr 84px 96px; gap: 12px; align-items: center; background: #fff; border: 1px solid #E4E8EC; border-radius: 10px; padding: 10px 14px; }
.plan-date { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.plan-date .muted { font-size: 12px; }
.plan-main { display: flex; flex-direction: column; gap: 2px; }
.lp-table { background: #fff; border: 1px solid #E4E8EC; border-radius: 12px; overflow-x: auto; margin-top: 12px; }
.lp-row { display: grid; grid-template-columns: 90px 64px 1.4fr 1fr 1fr 1fr; gap: 8px; align-items: start; padding: 10px 12px; border-bottom: 1px solid #F1F4F6; }
.lp-row:last-child { border-bottom: 0; }
.lp-head { background: #F6F8FA; font-weight: 700; color: #5A6B78; font-size: 12.5px; }
.lp-row .input, .lp-row textarea { font-size: 13px; }
.pick-list { display: grid; gap: 4px; max-height: 340px; overflow-y: auto; margin-top: 8px; }
.pick-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.pick-row:hover { background: #F8FBFA; }

/* ===== 导出与备份 ===== */
.exp-list { display: grid; gap: 4px; }
.exp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border-bottom: 1px solid #F1F4F6; }
.exp-row:last-child { border-bottom: 0; }






/* ---- docx 原貌报告纸面 ---- */
.docx-paper{display:flex;flex-direction:column;align-items:center;background:#F1F3F5;padding:14px 10px;border-radius:8px}
.docx-page p{margin:0}
.docx-slot{display:block;outline:none}
.docx-slot>.docx-body{outline:none;line-height:1.5;min-height:24px}
.docx-slot>.docx-body:empty::before{content:attr(data-ph);color:#B0B7BF;font-size:13px}
.docx-slot>.docx-body:focus{background:#FCFBF3}
.docx-slot img{max-width:100%;height:auto}
.docx-page img{max-width:100%}
.docx-slot-ro{white-space:pre-wrap;line-height:1.5}

.docx-slot>.docx-body{padding-bottom:6px}

.docx-page-edit{outline:2px dashed #F9C629;outline-offset:4px;cursor:text}
.docx-page-edit:focus{outline-color:#28A88C}
.docx-paper-edit .modal,.docx-paper-edit{max-height:none}
.modal .docx-paper-edit{background:#F1F3F5}

/* ---- 国标编辑工具条 ---- */
.rte-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:#FFFDF5;border:1px solid #F0DFA8;border-radius:10px;padding:8px 10px;margin:0 0 10px;box-shadow:0 2px 6px rgba(0,0,0,.05)}
.rte-btn{min-width:30px;height:30px;padding:0 8px;border:1px solid #E0D7C0;background:#fff;border-radius:8px;font-size:13px;color:#3B4654;cursor:pointer;line-height:1}
.rte-btn:hover{background:#FFF7DF;border-color:#F9C629}
.rte-b{font-weight:700}
.rte-i{font-style:italic}
.rte-u{text-decoration:underline}
.rte-sel{height:30px;border:1px solid #E0D7C0;border-radius:8px;background:#fff;font-size:13px;padding:0 6px;color:#3B4654}
.rte-lbl{font-size:12px;color:#8A919B}
.rte-sep{width:1px;height:22px;background:#E7DCC1;margin:0 2px}
.rte-host{position:relative}
.docx-body,.rp-body{font-family:"SimSun","宋体",serif;font-size:14pt;line-height:1.6}
.docx-body p,.docx-body div{margin:0}

/* 图片缩放手柄：点中图片后出现在右下角，拖动改大小 */
.img-handle{position:fixed;width:16px;height:16px;border-radius:3px;background:#2F7CF6;border:2px solid #fff;
 box-shadow:0 1px 4px rgba(0,0,0,.28);cursor:nwse-resize;z-index:9999;display:none}
.doc-img{max-width:100%;height:auto;border-radius:2px;cursor:pointer}
/* 封面填空行：标签固定 4 字宽（两端对齐），填的值左缘成一条竖线；值带下划线，字体随行 */
.docx-lb{display:inline-block;width:4em;text-align:justify;text-align-last:justify;white-space:nowrap}
.docx-fill{font-style:normal;display:inline-block;width:9em;border-bottom:1px solid #000;
  line-height:1.45;vertical-align:baseline;padding:0 2px;text-align:left;white-space:nowrap;overflow:hidden}
.docx-fill.auto{width:auto;min-width:9em}

/* 内容超出 A4 时自动续页：续页沿用同样的版心，仅顶部加一行浅色「续页」标记 */
.docx-page-cont-mark{font-size:10.5px;color:#A7B0B8;text-align:right;margin:0 0 4px;line-height:1.2}

/* 打印 / 打印预览：只留纸面，按 A4 分页 */
@page{size:A4;margin:0}
@media print{
  body{background:#fff}
  .docx-paper{background:#fff!important;padding:0!important;border-radius:0!important}
  .docx-page{border:none!important;box-shadow:none!important;margin:0 auto!important;page-break-after:always;break-after:page}
  .docx-page:last-child{page-break-after:auto;break-after:auto}
  .docx-slot>.docx-body:empty::before{content:''}
  .editor-bar,.img-handle,.modal-mask,.modal{display:none!important}
}
/* 学期、课程名称等长内容：下划线按字数自然延伸，不裁字 */
.docx-fill[data-fill="term"],.docx-fill[data-fill="courseName"],.docx-fill[data-fill="projectName"]{width:auto;min-width:9em}
/* 报告单填写区与表格正文：国标宋体四号（14pt）、1.5 倍行距，和 Word/WPS 一致 */
.docx-slot>.docx-body{font-family:SimSun,宋体,serif;font-size:14pt;line-height:1.5}
.docx-tbl td,.docx-tbl td .docx-p{font-family:SimSun,宋体,serif;font-size:14pt;line-height:1.5}
/* 报告单顶部信息行：项目名称、时间/周次/星期/时段/地点、同组成员 —— 统一宋体四号、1.5 倍行距 */
.docx-sheet-line{font-family:SimSun,宋体,serif;font-size:14pt;line-height:1.5}
/* 报告单信息行：与下面「报告内容」同一字体字号（宋体四号 14pt、1.5 倍行距），整行强制一致 */
.docx-sheet-line,.docx-sheet-line span,.docx-sheet-line .docx-fill{
  font-family:SimSun,宋体,serif!important;font-size:14pt!important;line-height:1.5!important}
/* 与表内「报告内容」完全一致：宋体 20px 加粗，1.5 倍行距 */
.docx-sheet-line,.docx-sheet-line span,.docx-sheet-line .docx-fill{
  font-family:SimSun,宋体,serif!important;font-size:20px!important;font-weight:700!important;line-height:1.5!important}
/* 报告单填写区：空槽位不再预留 96px 空白，表格随内容上收；单元格高度由内容决定 */
.docx-slot{min-height:28px!important}
.docx-tbl td{height:auto!important}
.docx-tbl{height:auto!important}
/* 填空值与前面标签同一基线：overflow 会让行内块基线变成底边，导致字浮起来 */
.docx-fill{overflow:visible!important;vertical-align:baseline!important}
/* 信息行与表格之间留一点距离，下划线不要顶到表格边框 */
.docx-sheet-line + table{margin-top:8px}