* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f0f2f5;
  color: #1f2329;
}
.app { max-width: 1280px; margin: 0 auto; padding: 16px; }
.topbar {
  display: flex; align-items: center; gap: 24px;
  background: #fff; border-radius: 10px; padding: 12px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-bottom: 16px;
}
.brand { font-size: 20px; font-weight: 700; color: #0e5eff; }
.badge {
  font-size: 11px; background: #ff8f1f; color: #fff;
  border-radius: 4px; padding: 2px 6px; vertical-align: middle; margin-left: 6px;
}
.nav { display: flex; gap: 8px; margin-left: auto; }
.nav-btn {
  border: none; background: transparent; padding: 8px 16px;
  border-radius: 6px; cursor: pointer; font-size: 14px; color: #555;
}
.nav-btn.active { background: #0e5eff; color: #fff; }
.view { display: none; }
.view.active { display: block; }
.layout { display: grid; gap: 16px; }
.two-col { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.panel {
  background: #fff; border-radius: 10px; padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.panel h2 { font-size: 17px; margin-bottom: 14px; }
.panel h2 small { font-size: 12px; color: #888; font-weight: 400; margin-left: 8px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
label { display: block; font-size: 13px; color: #666; margin: 10px 0 4px; }
input, select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #d9d9d9;
  border-radius: 6px; font-size: 13px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #0e5eff33; border-color: #0e5eff; }
.step { border-top: 1px dashed #eee; padding: 12px 0; }
.step h3 { font-size: 14px; margin-bottom: 4px; color: #0e5eff; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; }
.checks label { display: flex; align-items: center; gap: 4px; margin: 4px 0; }
.indicator-row { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
.indicator-row input, .indicator-row select { flex: 1; }
.icon-btn {
  border: 1px solid #d9d9d9; background: #fff; border-radius: 6px;
  width: 30px; height: 30px; cursor: pointer; color: #888; flex: 0 0 30px;
}
.actions { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.btn {
  padding: 9px 18px; border: 1px solid #d9d9d9; background: #fff;
  border-radius: 6px; cursor: pointer; font-size: 13px;
}
.btn:hover { border-color: #0e5eff; color: #0e5eff; }
.btn.primary { background: #0e5eff; border-color: #0e5eff; color: #fff; }
.btn.primary:hover { background: #2b6fff; color: #fff; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.prompt-box textarea {
  font-size: 12px; line-height: 1.6; background: #f8f9fb;
  font-family: "Consolas", "Courier New", monospace;
}
.quality-tag { font-size: 12px; padding: 4px 10px; border-radius: 12px; background: #e8f5e9; color: #2e7d32; }
.code-area {
  background: #1e1e2e; border-radius: 8px; padding: 14px; max-height: 460px; overflow: auto;
}
.code-area pre { color: #d4d4d4; font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; font-family: "Consolas", monospace; }
.review-report { margin-top: 14px; border: 1px solid #e3e3e3; border-radius: 8px; padding: 12px; }
.review-report h3 { font-size: 14px; margin-bottom: 8px; }
.review-report ul { list-style: none; font-size: 13px; }
.review-report li { padding: 4px 0; border-bottom: 1px dashed #f0f0f0; }
.verdict { margin-top: 8px; font-weight: 700; font-size: 14px; }
.verdict.pass { color: #2e7d32; }
.verdict.fail { color: #c62828; }
.hidden { display: none; }
.inline-fields { display: flex; gap: 8px; align-items: center; }
.diagnose-result { margin-top: 12px; border-left: 4px solid #0e5eff; background: #f4f7ff; padding: 12px; border-radius: 0 8px 8px 0; font-size: 13px; }
.diagnose-result h4 { margin-bottom: 6px; color: #0e5eff; }
.kpi-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: #f7f8fa; border-radius: 8px; padding: 14px; text-align: center; }
.kpi-val { display: block; font-size: 20px; font-weight: 700; color: #0e5eff; }
.kpi-label { font-size: 12px; color: #888; }
.chart-wrap { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 8px; }
.chart-wrap svg { width: 100%; height: 220px; }
.hint { font-size: 12px; color: #999; margin-top: 8px; }
.llm-status { font-size: 12px; padding: 6px 12px; border-radius: 12px; margin-bottom: 10px; display: inline-block; }
.llm-status.ok { background: #e8f5e9; color: #2e7d32; }
.llm-status.warn { background: #fff3e0; color: #e65100; }
