:root {
  --bg: #060a12;
  --bg-2: #0a1020;
  --panel: #0c1322;
  --panel-2: #111a2c;
  --line: #1b2439;
  --line-2: #26334f;
  --fg: #e9eff9;
  --muted: #7e8ca8;
  --muted-2: #56637d;
  --accent: #2dd4bf;
  --accent-soft: rgba(45, 212, 191, .1);
  --accent-ink: #04241f;
  --ok: #4cc38a;
  --warn: #e0a44e;
  --bad: #e5645c;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --r: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(120% 70% at 12% -12%, #12203a 0%, transparent 58%),
    var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 34px 20px 56px; }

/* ── 头部 ── */
.top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}

.top h1 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.sub { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.sub b { color: var(--fg); font-weight: 600; }
.clock { color: var(--muted-2); font-size: 12.5px; padding-top: 3px; }

.topbar {
  height: 2px; border-radius: 2px; background: var(--line);
  overflow: hidden; margin: 0 0 18px; opacity: 0; transition: opacity .25s;
}
.topbar.on { opacity: 1; }
.topbar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #1c8f85, var(--accent));
  transition: width .3s ease;
}

/* ── 卡片 ── */
.grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.col .card { margin-bottom: 0; }

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 42%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  margin-bottom: 14px;
  min-width: 0;
}

.grid .card { margin-bottom: 0; }

.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}

.label {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 500;
}

.note-mini { font-size: 11.5px; color: var(--muted-2); }
.counter { color: var(--muted); font-size: 12.5px; font-family: var(--mono); }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dot-sep { color: var(--line-2); }

.link {
  background: none; border: 0; color: var(--muted); font: inherit;
  font-size: 12.5px; cursor: pointer; padding: 2px 3px; border-radius: 6px;
}
.link:hover { color: var(--accent); }
.link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── 仪表盘 ── */
.gauge-card { display: flex; flex-direction: column; }

.gauge { position: relative; width: 100%; max-width: 300px; margin: 2px auto 4px; aspect-ratio: 1; }
.gauge-svg { display: block; width: 100%; height: 100%; overflow: visible; }

.g-track { fill: none; stroke: #151f36; stroke-width: 7; stroke-linecap: round; }

.g-prog {
  fill: none; stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 0 100;
  transition: stroke-dasharray .5s cubic-bezier(.4, 0, .2, 1);
}

#ticks line { stroke: #22304d; stroke-width: 1.4; stroke-linecap: round; }
#ticks line.major { stroke: #36466b; stroke-width: 1.8; }
#labels text {
  fill: #4d5b78; font-size: 10px; font-family: var(--mono);
  text-anchor: middle; dominant-baseline: middle;
}

.needle { transform-origin: 150px 150px; transition: transform .55s cubic-bezier(.34, 1.2, .64, 1); }
.thumb-halo { fill: #0c1322; stroke: var(--accent); stroke-width: 1.6; }
.thumb { fill: var(--accent); }

.gauge-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; padding-bottom: 8px;
}

.gauge-num {
  font-size: 47px; font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  text-shadow: 0 0 22px rgba(45, 212, 191, .18);
}
.gauge-num.idle { color: var(--muted-2); font-weight: 600; font-size: 38px; text-shadow: none; }

.gauge-unit { margin-top: 7px; font-size: 11.5px; color: var(--muted); letter-spacing: .05em; }

.verdict-row { text-align: center; margin: -6px 0 14px; }

.gauge-verdict {
  display: inline-block;
  font-size: 12px; color: var(--muted-2);
  border: 1px solid var(--line); border-radius: 20px; padding: 3px 12px;
}
.gauge-verdict.ok { color: var(--ok); border-color: rgba(76,195,138,.3); }
.gauge-verdict.warn { color: var(--warn); border-color: rgba(224,164,78,.3); }
.gauge-verdict.bad { color: var(--bad); border-color: rgba(229,100,92,.3); }

.stats2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 16px; }

.stat {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px;
  padding: 10px 12px; display: flex; align-items: baseline;
  justify-content: space-between; gap: 8px;
}
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 15px; font-weight: 600; }

/* ── 按钮 ── */
.btn {
  appearance: none; border: 0; border-radius: 11px;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 600; font-size: 14px;
  padding: 12px 18px; min-height: 44px; cursor: pointer;
  transition: opacity .15s, transform .06s, box-shadow .2s;
}

.gauge-card .btn { margin-top: auto; width: 100%; }
.btn:hover { opacity: .92; box-shadow: 0 6px 20px -8px rgba(45,212,191,.6); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .4; cursor: default; box-shadow: none; transform: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line-2); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }
.btn.subtle { color: var(--muted); }
.btn.sm { min-height: 38px; padding: 8px 14px; font-size: 13px; }

.check {
  display: flex; align-items: center; gap: 9px;
  color: var(--muted); font-size: 13px; margin: 0 0 14px; cursor: pointer;
}
.check input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }

/* ── 报告 ── */
.report-card { display: flex; flex-direction: column; }
.report { flex: 1; }
.muted-p { color: var(--muted-2); font-size: 13.5px; margin: 0; }

.verdict-line { font-size: 17px; font-weight: 600; line-height: 1.5; margin: 0 0 4px; }
.verdict-sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.verdict-good { color: var(--ok); }
.verdict-mid { color: var(--warn); }
.verdict-bad { color: var(--bad); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.tile {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 12px;
}
.tile .k { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.tile .v { font-size: 17px; font-weight: 600; font-family: var(--mono); }

.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-line {
  display: grid; grid-template-columns: minmax(0, 1fr) 74px 52px;
  gap: 10px; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.cat-line:last-child { border-bottom: 0; }
.cat-line .nm { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-line .ms { color: var(--muted); text-align: right; font-family: var(--mono); font-size: 12.5px; }
.cat-line .st { text-align: right; font-size: 11.5px; }
.st.good { color: var(--ok); } .st.mid { color: var(--warn); } .st.bad { color: var(--bad); }

/* ── 分类勾选 ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--muted); font: inherit; font-size: 13.5px;
  border-radius: 10px; padding: 9px 13px; min-height: 40px; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--line-2); color: var(--fg); }
.chip.on { border-color: rgba(45,212,191,.5); color: var(--fg); background: var(--accent-soft); }
.chip .tick { width: 12px; color: var(--accent); font-size: 12px; }
.chip .cnt { color: var(--muted-2); font-size: 11.5px; font-family: var(--mono); }

.sub-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 12px; }
.actions-row { margin-top: 12px; }

textarea {
  width: 100%; resize: vertical; min-height: 92px;
  background: var(--bg-2); color: var(--fg);
  border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 14px; font-family: var(--mono); font-size: 13px; line-height: 1.7;
}
textarea:focus { outline: 0; border-color: var(--accent); }
textarea::placeholder { color: var(--muted-2); }

/* ── 结果分组 ── */
.groups { display: flex; flex-direction: column; }

.group { border-bottom: 1px solid var(--line); }
.group:last-child { border-bottom: 0; }

.group-head {
  width: 100%; display: grid; grid-template-columns: 16px minmax(0,1fr) auto auto;
  gap: 10px; align-items: center; text-align: left;
  background: none; border: 0; color: inherit; font: inherit;
  padding: 13px 2px; cursor: pointer;
}
.group-head:hover .g-name { color: var(--accent); }
.group-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }

.chev { color: var(--muted); font-size: 13px; transition: transform .2s; }
.group.closed .chev { transform: rotate(-90deg); }
.g-name { font-weight: 600; font-size: 14px; transition: color .15s; }
.g-count { color: var(--muted-2); font-size: 12px; font-family: var(--mono); }
.g-sum { color: var(--muted); font-size: 12.5px; font-family: var(--mono); }
.g-sum .dead { color: var(--bad); }

.group-body { display: block; padding-bottom: 6px; }
.group.closed .group-body { display: none; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 104px 62px 18px;
  align-items: center; gap: 10px;
  padding: 10px 2px; border-top: 1px solid rgba(27,36,57,.65);
}
.group-body .row:first-child { border-top: 0; }
.row:hover { background: rgba(255,255,255,.012); }

.row .name { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-weight: 500; font-size: 14px; }
.row .name .label2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .val { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13.5px; text-align: right; }
.row .val.dim { color: var(--muted-2); }
.sup { color: var(--muted-2); font-size: 10px; vertical-align: super; }

.bar { display: block; height: 3px; border-radius: 2px; background: #101a2e; overflow: hidden; }
.bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #1c8f85, var(--accent));
  transition: width .5s cubic-bezier(.4,0,.2,1);
}

.tag {
  font-size: 11.5px; text-align: center; padding: 3px 0; border-radius: 20px;
  color: var(--muted-2); border: 1px solid var(--line); white-space: nowrap; overflow: hidden;
}
.tag.ok { color: var(--ok); border-color: rgba(76,195,138,.3); background: rgba(76,195,138,.06); }
.tag.warn { color: var(--warn); border-color: rgba(224,164,78,.3); background: rgba(224,164,78,.06); }
.tag.bad { color: var(--bad); border-color: rgba(229,100,92,.3); background: rgba(229,100,92,.06); }

.row .drop {
  background: none; border: 0; color: var(--muted-2); font-size: 15px;
  cursor: pointer; padding: 0; line-height: 1; opacity: 0; transition: opacity .15s;
}
.row:hover .drop { opacity: 1; }
.row .drop:hover { color: var(--bad); }

@keyframes pulse { 0%,100% { opacity: .4 } 50% { opacity: 1 } }
.row.pending .name .label2 { animation: pulse 1.5s ease-in-out infinite; }

.empty { color: var(--muted-2); font-size: 13.5px; margin: 6px 0 10px; }

/* ── 杂项 ── */
.tiny { color: var(--muted-2); font-size: 12px; line-height: 1.6; margin: 14px 0 0; }
.tiny.inline { margin: 0; }

.foot { padding: 0 2px; }
.foot p { color: var(--muted-2); font-size: 12.5px; margin: 0; }
.foot b { color: var(--muted); font-weight: 600; }

@media (max-width: 880px) {
  .wrap { padding: 26px 14px 44px; }
  .grid { grid-template-columns: 1fr; }
  .gauge { max-width: 250px; }
  .gauge-num { font-size: 44px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: minmax(0, 1fr) 60px 78px 52px 16px; gap: 8px; }
  .row .val { font-size: 12.5px; }
  .tag { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .g-prog, .needle, .bar i, .topbar i, .chev { transition: none; }
  .row.pending .name .label2 { animation: none; }
}
