:root {
  --bg: #f3f6f8;
  --panel: #ffffff;
  --ink: #1f2a33;
  --muted: #677884;
  --line: #e2e9ed;
  --brand: #4e5e6b;
  --accent: #1b8a80;
  --accent-soft: #e6f3f2;
  --violet: #6c5ce7;
  --warn: #d9822b;
  --danger: #c0392b;
  --side: #2b3640;
  --side-ink: #dbe4ea;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(31, 42, 51, .08), 0 6px 20px rgba(31, 42, 51, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", Inter, system-ui, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
button { font: inherit; cursor: pointer; }

.layout { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
  width: 232px; background: var(--side); color: var(--side-ink);
  padding: 18px 0; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 0 18px 18px; }
.sidebar__brand .logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent);
  display: grid; place-items: center; color: #fff; font-weight: 700;
}
.sidebar__brand strong { color: #fff; font-size: 15px; display: block; }
.sidebar__brand em { font-style: normal; font-size: 11px; color: #93a5b0; }
.menu-group { margin-top: 8px; }
.menu-group__title {
  padding: 10px 18px 6px; font-size: 12px; letter-spacing: .08em; color: #8fa2ad;
}
.menu-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px;
  color: var(--side-ink); border-left: 3px solid transparent; cursor: pointer;
}
.menu-item:hover { background: rgba(255,255,255,.06); }
.menu-item.is-active { background: rgba(27,138,128,.18); border-left-color: var(--accent); color: #fff; }
.menu-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* 主区 */
.main { flex: 1; padding: 22px 26px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.topbar h1 { font-size: 20px; margin: 0; }
.topbar select { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* 卡片与统计 */
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.stat .num { font-size: 28px; font-weight: 700; color: var(--brand); }
.stat .label { color: var(--muted); margin-top: 2px; }
.stat .icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; }
.section-title h2 { font-size: 16px; margin: 0; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 6px 11px; font-size: 13px; }
.btn--danger { color: var(--danger); }

/* 表格 */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
tr:last-child td { border-bottom: none; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.badge--ok { background: var(--accent-soft); color: var(--accent); }
.badge--warn { background: #fdf1e3; color: var(--warn); }

/* 表单 */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.field label { display: block; color: var(--muted); margin-bottom: 6px; font-size: 13px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.field textarea { min-height: 84px; resize: vertical; }
.field--full { grid-column: 1 / -1; }

/* 报告头部 */
.report-hero {
  background: linear-gradient(120deg, #2b3640, #3d4c58); color: #fff; border-radius: var(--radius);
  padding: 26px; display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.report-hero h2 { font-size: 26px; margin: 6px 0; }
.report-hero .sub { color: #c4d2da; }
.ring { width: 120px; height: 120px; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring__value { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.grade-box { border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 12px 18px; text-align: center; }
.grade-box .g { font-size: 24px; font-weight: 700; color: var(--warn); }

/* 四维 */
.breakdown { grid-template-columns: repeat(4, 1fr); }
.breakdown .b-score { font-size: 22px; font-weight: 700; }
.breakdown .b-note { color: var(--muted); font-size: 13px; margin-top: 6px; }

.list-find li, .list-risk li { margin-bottom: 10px; }
.list-find { color: #217a72; }
.list-risk { color: var(--warn); }

/* 条形图 */
.bar-row { display: grid; grid-template-columns: 90px 1fr 70px; align-items: center; gap: 10px; margin: 10px 0; }
.bar-track { background: #edf1f3; border-radius: 999px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--violet); }

/* 五列词库 */
.word-cols { grid-template-columns: repeat(5, 1fr); }
.word-col { background: #f7f9fa; border-radius: 12px; padding: 14px; }
.word-col h4 { margin: 0 0 10px; font-size: 13px; color: var(--brand); }
.word-col ul { list-style: none; margin: 0; padding: 0; }
.word-col li { padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }

.muted { color: var(--muted); }
.mt { margin-top: 16px; }
.empty { color: var(--muted); padding: 24px; text-align: center; }

@media (max-width: 1100px) {
  .stats, .breakdown { grid-template-columns: repeat(2, 1fr); }
  .word-cols { grid-template-columns: repeat(2, 1fr); }
}
