/* ============================================================
   教师 AI 工作台 · 学校知识蒸馏模块
   VI 沿用工作台：--brand #1a6fd4 / --brand2 #0f3d78 / --brand-soft #3fa3e8
   ============================================================ */

/* ---------- 模块页头 ---------- */
.kd-head {
  background: linear-gradient(120deg, #0a2d5c, #0f3d78 60%, #1a6fd4);
  border-radius: var(--radius); padding: 22px 26px; color: #fff; margin-bottom: 20px;
}
.kd-head h2 { font-size: 21px; font-weight: 800; margin-bottom: 6px; letter-spacing: .3px; }
.kd-head p { font-size: 13.5px; line-height: 1.8; color: rgba(255, 255, 255, .82); }
.kd-head .kd-chain {
  margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: rgba(255, 255, 255, .9);
}
.kd-head .kd-chain span {
  padding: 6px 13px; border-radius: 8px;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .18);
}
.kd-head .kd-chain i { color: rgba(255, 255, 255, .55); font-style: normal; }

/* ---------- 通用卡片 / 区块标题 ---------- */
.kd-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.kd-card > h3 {
  font-size: 16px; color: var(--brand2); font-weight: 800; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.kd-card > .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; line-height: 1.7; }

.kd-sec-h {
  font-size: 14px; font-weight: 800; color: var(--brand2); margin: 22px 0 12px;
  padding-left: 10px; border-left: 3px solid var(--brand);
}
.kd-sec-h:first-child { margin-top: 0; }

/* ---------- 表单控件 ---------- */
.kd-field { margin-bottom: 14px; }
.kd-field label {
  display: block; font-size: 13px; color: var(--ink); font-weight: 700; margin-bottom: 6px;
}
.kd-field label .hint { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.kd-field input[type=text], .kd-field textarea, .kd-field select {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 13.5px; color: var(--ink); background: #fff; outline: none;
  transition: .15s; line-height: 1.7; resize: vertical; font-family: inherit;
}
.kd-field input[type=text]:focus, .kd-field textarea:focus, .kd-field select:focus {
  border-color: var(--brand-soft); box-shadow: 0 0 0 3px rgba(26, 111, 212, .13);
}
.kd-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- 按钮 ---------- */
.kd-btn {
  padding: 10px 20px; border: none; border-radius: 10px; font-size: 14px; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft)); color: #fff;
  transition: .15s; font-family: inherit;
}
.kd-btn:hover { filter: brightness(1.07); }
.kd-btn:disabled { opacity: .6; cursor: not-allowed; filter: none; }
.kd-btn.ghost {
  background: #fff; color: var(--brand2); border: 1.5px solid var(--line);
}
.kd-btn.ghost:hover { border-color: var(--brand-soft); background: #f6f9fd; }
.kd-btn.sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.kd-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- 四层知识基座 ---------- */
.kb-layers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kb-layer {
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  background: #fff; transition: .2s;
}
.kb-layer:hover { border-color: var(--brand-soft); box-shadow: 0 4px 16px rgba(26, 111, 212, .10); }
.kb-l-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.kb-l-no {
  width: 26px; height: 26px; border-radius: 8px; color: #fff; font-size: 13px; font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.kb-l-top h4 { font-size: 15px; color: var(--brand2); font-weight: 800; }
.kb-l-fn { font-size: 12px; color: var(--brand); font-weight: 600; margin-bottom: 10px; padding-left: 36px; }
.kb-l-input {
  font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-bottom: 8px;
  padding: 7px 11px; border-radius: 8px; background: #f4f8fc;
}
.kb-l-input::before { content: "内容范畴："; color: var(--brand2); font-weight: 700; }
.kb-layer textarea { min-height: 108px; }

/* 完整度 */
.kb-prog { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.kb-prog-bar { flex: 1; height: 9px; border-radius: 999px; background: #e6eef7; overflow: hidden; }
.kb-prog-fill {
  height: 100%; border-radius: 999px; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-soft)); transition: width .4s;
}
.kb-prog-tx { font-size: 13px; color: var(--brand2); font-weight: 700; flex: 0 0 auto; }
.kb-prog-detail { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.7; }

/* 经验样例卡（情境—做法—原理） */
.kb-samples { display: flex; flex-direction: column; gap: 10px; }
.kb-sample {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff;
}
.kb-sample-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kb-sample-h b { font-size: 13px; color: var(--brand2); }
.kb-sample-del {
  border: none; background: none; color: var(--danger); font-size: 12.5px; cursor: pointer;
  font-family: inherit; padding: 2px 6px; border-radius: 6px;
}
.kb-sample-del:hover { background: rgba(217, 83, 79, .1); }
.kb-sample .kd-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.kb-sample input {
  width: 100%; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 12.5px; outline: none; font-family: inherit;
}
.kb-sample input:focus { border-color: var(--brand-soft); }
.kb-empty { font-size: 13px; color: var(--muted); padding: 14px; text-align: center; background: #f7fafd; border-radius: 10px; }

/* ---------- 场景卡片矩阵 ---------- */
.sc-cats { display: flex; flex-direction: column; gap: 20px; }
.sc-cat { }
.sc-cat-h { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.sc-cat-ic {
  width: 34px; height: 34px; border-radius: 10px; color: #fff; font-size: 17px;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.sc-cat-h h4 { font-size: 15px; color: var(--brand2); font-weight: 800; }
.sc-cat-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; padding-left: 44px; line-height: 1.7; }
.sc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sc-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  cursor: pointer; transition: .18s; text-align: left; font-family: inherit;
}
.sc-item:hover { border-color: var(--brand-soft); background: #f7fbff; }
.sc-item.active { border-color: var(--brand); background: #eef5fe; box-shadow: 0 0 0 3px rgba(26, 111, 212, .11); }
.sc-i-no {
  width: 22px; height: 22px; border-radius: 6px; background: #e8f0fa; color: var(--brand2);
  font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; margin-top: 1px;
}
.sc-item.active .sc-i-no { background: var(--brand); color: #fff; }
.sc-i-tx b { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 2px; }
.sc-i-tx span { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---------- 一键输出三选一 ---------- */
.oc-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.oc-opt {
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px;
  background: #fff; cursor: pointer; transition: .2s; text-align: center; font-family: inherit;
}
.oc-opt:hover { border-color: var(--brand-soft); transform: translateY(-3px); box-shadow: var(--shadow); }
.oc-opt.active { border-color: var(--brand); background: #eef5fe; box-shadow: 0 0 0 3px rgba(26, 111, 212, .12); }
.oc-o-ic { font-size: 28px; margin-bottom: 8px; }
.oc-opt h4 { font-size: 15.5px; color: var(--brand2); font-weight: 800; margin-bottom: 6px; }
.oc-opt p { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.oc-skills { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.oc-skills span {
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
  background: #eef4fb; color: var(--brand2);
}
.oc-opt.active .oc-skills span { background: #fff; }

/* 编排流程条 */
.oc-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: 10px; background: #f4f8fc;
  border: 1px dashed var(--line); margin-bottom: 4px; font-size: 13px; color: var(--brand2);
}
.oc-bar b { padding: 5px 12px; border-radius: 7px; background: #fff; border: 1px solid var(--line); }
.oc-bar i { color: var(--brand); font-style: normal; }

/* ---------- 参赛工作流 5 步 ---------- */
.cw-steps { display: flex; gap: 8px; margin-bottom: 18px; }
.cw-step {
  flex: 1; padding: 12px 10px; border-radius: 10px; text-align: center;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  transition: .18s; font-family: inherit;
}
.cw-step:hover { border-color: var(--brand-soft); }
.cw-step.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.cw-step.done { border-color: var(--ok); background: #eaf7f0; color: #1c7a50; }
.cw-step .n {
  width: 22px; height: 22px; border-radius: 6px; margin: 0 auto 6px; font-size: 12px; font-weight: 800;
  background: #e8f0fa; color: var(--brand2); display: flex; align-items: center; justify-content: center;
}
.cw-step.active .n { background: rgba(255, 255, 255, .25); color: #fff; }
.cw-step.done .n { background: var(--ok); color: #fff; }
.cw-step .t { font-size: 12.5px; font-weight: 700; line-height: 1.4; }

.cw-panel {
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: #fff;
}
.cw-p-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cw-p-h h4 { font-size: 16px; color: var(--brand2); font-weight: 800; }
.cw-p-desc { font-size: 13px; color: var(--muted); line-height: 1.8; margin-bottom: 16px; }
.cw-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.cw-box { padding: 13px 15px; border-radius: 10px; }
.cw-box.ai { background: #eef5fe; border: 1px solid rgba(26, 111, 212, .22); }
.cw-box.th { background: #fdf6ec; border: 1px solid rgba(224, 138, 30, .26); }
.cw-box .bt { font-size: 12px; font-weight: 800; margin-bottom: 5px; }
.cw-box.ai .bt { color: var(--brand2); }
.cw-box.th .bt { color: #9a5b06; }
.cw-box .bc { font-size: 12.8px; line-height: 1.75; color: var(--ink); }
.cw-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }

/* ---------- 合校标自检 5 条 ---------- */
.sc-check {
  margin-top: 16px; padding: 16px 18px; border-radius: var(--radius);
  background: #f7fafd; border: 1.5px dashed var(--line);
}
.sc-check-h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13.5px; font-weight: 800; color: var(--brand2); margin-bottom: 12px; flex-wrap: wrap;
}
.sc-check-score {
  font-size: 12.5px; padding: 4px 12px; border-radius: 999px;
  background: #e8f0fa; color: var(--brand2); font-weight: 700;
}
.sc-check-score.pass { background: #e7f7ef; color: #1c7a50; }
.sc-check-list { display: flex; flex-direction: column; gap: 8px; }
.sc-ck {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px;
  border-radius: 9px; background: #fff; border: 1px solid var(--line); cursor: pointer;
}
.sc-ck:hover { border-color: var(--brand-soft); }
.sc-ck input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--brand); flex: 0 0 auto; cursor: pointer; }
.sc-ck .tx b { font-size: 13px; color: var(--ink); }
.sc-ck .tx span { display: block; font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 1px; }
.sc-ck-note { font-size: 12px; color: #9a5b06; line-height: 1.7; margin-top: 10px; }

/* ---------- 结果区 ---------- */
.kd-result {
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden;
}
.kd-res-h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 13px 18px; background: #f4f8fc; border-bottom: 1px solid var(--line);
}
.kd-res-h b { font-size: 14px; color: var(--brand2); }
.kd-res-body {
  padding: 18px 20px; font-size: 13.5px; line-height: 1.9; color: var(--ink);
  white-space: pre-wrap; word-break: break-word; max-height: 620px; overflow-y: auto;
}
.kd-res-empty {
  padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.9;
}
.kd-msg { font-size: 13px; color: var(--danger); min-height: 18px; margin-top: 8px; }
.kd-msg.ok { color: var(--ok); }

/* ---------- 知识基座摘要预览 ---------- */
.kb-summary {
  background: #0f2942; color: #dbe8f7; border-radius: 10px; padding: 16px 18px;
  font-size: 12.5px; line-height: 1.85; white-space: pre-wrap; word-break: break-word;
  max-height: 320px; overflow-y: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- 注入开关 ---------- */
.kb-toggle {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-radius: 10px; background: #eef5fe; border: 1px solid rgba(26, 111, 212, .2);
  margin-bottom: 14px; font-size: 13px; color: var(--brand2);
}
.kb-toggle input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.kb-toggle b { font-weight: 800; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .kb-layers { grid-template-columns: 1fr; }
  .sc-list { grid-template-columns: 1fr; }
  .oc-pick { grid-template-columns: 1fr; }
  .cw-split { grid-template-columns: 1fr; }
  .kb-sample .kd-row3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .kd-row2 { grid-template-columns: 1fr; }
  .cw-steps { flex-wrap: wrap; }
  .cw-step { flex: 1 1 30%; }
}
