/* 督导工具箱 v1 · 电脑版样式（信息密集 / 宽屏） */
* { box-sizing: border-box; }
:root {
  --indigo: #4f46e5;
  --indigo-d: #4338ca;
  --sky: #0ea5e9;
  --bg: #f5f6fb;
  --panel: #ffffff;
  --line: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
  --green: #16a34a;
  --amber: #d97706;
  --gray: #64748b;
  --danger: #dc2626;
}
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--indigo); }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand { font-size: 18px; font-weight: 700; }
.ver { font-size: 11px; background: var(--indigo); color: #fff; border-radius: 4px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }
.switch-link { text-decoration: none; font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; }
.switch-link:hover { background: #f3f4f6; }

/* 学员选择条 */
.student-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 24px; background: #eef2ff; border-bottom: 1px solid #e0e7ff;
}
.student-bar select { min-width: 220px; }

/* 标签导航 */
.tabs { display: flex; gap: 4px; padding: 10px 24px 0; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab-btn {
  border: none; background: transparent; cursor: pointer;
  padding: 10px 16px; font-size: 14px; color: var(--muted);
  border-bottom: 2px solid transparent; font-family: inherit;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--indigo); border-bottom-color: var(--indigo); font-weight: 600; }

/* 主体 */
.view { padding: 20px 24px 60px; max-width: 1200px; margin: 0 auto; }
.module-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.module-head h2 { margin: 0; font-size: 20px; }
.muted { color: var(--muted); font-size: 13px; }

/* 按钮 */
.btn { border: none; border-radius: 8px; padding: 9px 16px; font-size: 14px; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-d); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: #f3f4f6; color: var(--text); }
.btn-ghost:hover { background: #e5e7eb; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.tbl th { background: #f9fafb; font-weight: 600; font-size: 13px; color: var(--muted); }
.tbl tbody tr:hover { background: #fafaff; }
.col-goal { max-width: 280px; }
.ops { white-space: nowrap; }
.lnk { background: none; border: none; color: var(--indigo); cursor: pointer; padding: 2px 6px; font-size: 13px; font-family: inherit; }
.lnk.danger { color: var(--danger); }

/* 头像 / 徽标 */
.avatar { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--indigo); color: #fff; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.badge-active { background: #dcfce7; color: var(--green); }
.badge-paused { background: #fef3c7; color: var(--amber); }
.badge-graduated { background: #e2e8f0; color: var(--gray); }

/* 统计 */
.stats-row { display: flex; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 20px; min-width: 110px; text-align: center; }
.stat-num { font-size: 24px; font-weight: 700; color: var(--indigo); }
.stat-label { font-size: 12px; color: var(--muted); }

/* 时间轴 */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; margin-bottom: 16px; }
.tl-dot { position: absolute; left: -21px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--indigo); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.tl-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.tl-top { display: flex; gap: 12px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.tl-date { font-weight: 600; }
.tl-type { font-size: 12px; background: #eef2ff; color: var(--indigo); border-radius: 6px; padding: 1px 8px; }
.tl-mood { font-size: 12px; color: var(--amber); margin-left: auto; letter-spacing: 1px; }
.tl-title { font-weight: 600; }
.tl-desc { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* 会话卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.sess-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.sess-top { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.sess-mood { color: var(--amber); margin-left: auto; letter-spacing: 1px; }
.sess-row { font-size: 13px; margin: 3px 0; }

/* AI / 报告 */
.ai-box, .report-box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; max-width: 640px; margin-bottom: 16px; }
.ai-result, .rep-result { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; max-width: 820px; }
.ai-src, .report-range { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.ai-result h2, .ai-result h3, .ai-result h4 { margin: 14px 0 6px; color: var(--indigo-d); }
.ai-result ul { padding-left: 20px; }
.ai-result blockquote { border-left: 3px solid var(--indigo); margin: 8px 0; padding: 4px 12px; background: #f9fafb; color: var(--muted); }

/* 报告 */
.report-cards { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 18px; }
.report-card { flex: 1; min-width: 110px; background: #f8faff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; text-align: center; }
.rc-num { font-size: 22px; font-weight: 700; color: var(--indigo); }
.rc-label { font-size: 12px; color: var(--muted); }
.report-list { list-style: none; padding: 0; margin: 0; }
.report-list li { border-bottom: 1px dashed var(--line); padding: 8px 0; }
.rl-date { font-weight: 600; margin-right: 8px; }
.rl-tag { font-size: 12px; background: #eef2ff; color: var(--indigo); border-radius: 6px; padding: 1px 8px; margin-right: 8px; }
.rl-title { font-weight: 600; }
.rl-mood { font-size: 12px; color: var(--amber); margin-left: 8px; }
.rl-desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.report-summary { background: #f8faff; border-radius: 8px; padding: 10px 14px; }

/* 发问模型 */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.model-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.model-name { font-size: 16px; font-weight: 700; color: var(--indigo-d); }
.model-scene { font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
.model-q-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.model-q { padding-left: 18px; margin: 0 0 10px; }
.model-q li { margin: 4px 0; position: relative; }
.q-copy { cursor: pointer; color: var(--sky); margin-right: 4px; user-select: none; }
.q-copy:hover { color: var(--indigo); }
.model-tips { font-size: 13px; color: var(--text); background: #f9fafb; border-radius: 8px; padding: 8px 10px; }

/* 表单 */
.fld { display: block; margin-bottom: 12px; }
.fld-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.fld.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.inp { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; }
.inp:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
select.inp { cursor: pointer; }

/* 弹窗 */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: 12px; width: 100%; max-width: 480px; max-height: 88vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600; }
.modal-close { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-body { padding: 16px 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); }

/* 提示 / 空态 */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px); background: #111827; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 60; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }
.loading, .empty, .error { padding: 30px; text-align: center; color: var(--muted); }
.error { color: var(--danger); }

/* 年谱数据打通 */
.badge-nianpu { background: #ede9fe; color: #6d28d9; }
.np-tip { background: #f5f3ff; border: 1px solid #e9e5ff; color: var(--text); border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 14px; line-height: 1.7; }
.np-tip code { background: #ece9ff; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.np-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.np-actions .btn-primary { width: auto; }
.np-probe-box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 18px; }
.np-probe-sum { font-weight: 600; margin-bottom: 8px; }
.np-tbl { border-bottom: 1px dashed var(--line); padding: 6px 0; }
.np-tbl:last-child { border-bottom: none; }
.np-tbl-head { cursor: pointer; font-size: 14px; user-select: none; }
.np-caret { color: var(--muted); display: inline-block; width: 12px; }
.np-tbl-fields { padding: 6px 0 6px 18px; }
.np-f { font-size: 13px; padding: 2px 0; }
.np-f code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; }
.np-block { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.np-block-head h3 { margin: 0 0 2px; font-size: 16px; }
.np-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.np-row-label { font-size: 13px; color: var(--muted); }
.np-row .np-table { width: auto; min-width: 240px; }
.np-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin-top: 8px; }
.np-fld-row { display: flex; flex-direction: column; gap: 4px; }
.np-fld-label { font-size: 12px; color: var(--muted); }
.np-stats { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.np-stats h3 { margin: 0 0 8px; }
.np-stat-row { font-size: 14px; padding: 4px 0; }
@media (max-width: 640px) { .np-fields { grid-template-columns: 1fr; } }

/* 学员疑惑 */
.doubt-compose { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.doubt-compose .fld { margin-bottom: 12px; }
.row-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.doubt-result { background: #f7f9ff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.doubt-result .result-head { font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.doubt-result h2, .doubt-result h3, .doubt-result h4 { margin: 12px 0 6px; }
.doubt-result ul { margin: 6px 0; padding-left: 22px; }
.doubt-result blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid var(--muted); color: var(--muted); background: transparent; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.tag-ai { background: #e6f4ff; color: #0958d9; }
.tag-rule { background: #f6ffed; color: #389e0d; }
.module-sub { margin: 18px 0 8px; }
.module-sub h3 { font-size: 15px; margin: 0; }
.doubt-list .empty { color: var(--muted); font-size: 13px; }
.doubt-items { display: flex; flex-direction: column; gap: 12px; }
.doubt-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.doubt-item-q { font-size: 14px; line-height: 1.6; }
.doubt-item-meta { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.doubt-item-ans { font-size: 13px; }
.doubt-item-ans summary { cursor: pointer; color: var(--muted); }
.doubt-item-ans h2, .doubt-item-ans h3, .doubt-item-ans h4 { margin: 10px 0 6px; }
.doubt-item-ans ul { margin: 6px 0; padding-left: 22px; }
.doubt-item-ans blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid var(--muted); color: var(--muted); }

/* 学员诊断 */
.diag-compose { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.diag-compose .fld { margin-bottom: 12px; }
.diag-compose .fld-label { display: block; font-weight: 600; margin-bottom: 6px; }
.diag-compose .inp { width: 100%; box-sizing: border-box; }
.diag-compose input[type="file"].inp { padding: 8px; }
.diag-compose .muted { display: block; font-size: 12px; margin-top: 4px; }
.diag-result { background: #f7f9ff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.diag-result .result-head { font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.diag-result h2, .diag-result h3, .diag-result h4 { margin: 12px 0 6px; }
.diag-result ul { margin: 6px 0; padding-left: 22px; }
.diag-result blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid var(--muted); color: var(--muted); background: transparent; }
.diag-list .empty { color: var(--muted); font-size: 13px; }
.diag-items { display: flex; flex-direction: column; gap: 12px; }
.diag-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.diag-item-q { font-size: 14px; line-height: 1.6; }
.diag-item-meta { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.diag-item-ans { font-size: 13px; }
.diag-item-ans summary { cursor: pointer; color: var(--muted); }
.diag-item-ans h2, .diag-item-ans h3, .diag-item-ans h4 { margin: 10px 0 6px; }
.diag-item-ans ul { margin: 6px 0; padding-left: 22px; }
.diag-item-ans blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid var(--muted); color: var(--muted); }
