/* 设置中心（#gs-root 作用域内，避免和 console/app.css 打架） */
#gs-root {
  --gs-bg: #0a0a0b;
  --gs-rail: #0d0d0f;
  --gs-panel: #121214;
  --gs-panel-2: #17171a;
  --gs-line: #232327;
  --gs-text: #e9e9ec;
  --gs-dim: #8d8d96;
  --gs-dim-2: #62626b;
  --gs-accent: #7ee2a8;
  --gs-warn: #f0b45a;
  --gs-bad: #ef767a;
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  background: var(--gs-bg);
  color: var(--gs-text);
  font: 13px/1.5 "Segoe UI", "Microsoft YaHei UI", system-ui, sans-serif;
}
#gs-root.open { display: flex; }
#gs-root[data-theme="light"] {
  --gs-bg: #f6f6f7; --gs-rail: #efeff1; --gs-panel: #ffffff; --gs-panel-2: #f4f4f6;
  --gs-line: #e2e2e6; --gs-text: #17171a; --gs-dim: #6a6a72; --gs-dim-2: #9a9aa2;
}
#gs-root[data-theme="dim"] {
  --gs-bg: #101014; --gs-rail: #131317; --gs-panel: #17171c; --gs-panel-2: #1c1c22;
  --gs-line: #26262c; --gs-text: #dcdce2; --gs-dim: #8a8a94;
}
#gs-root[data-accent="blue"] { --gs-accent: #7db8ff; }
#gs-root[data-accent="violet"] { --gs-accent: #b79cff; }
#gs-root[data-accent="amber"] { --gs-accent: #f0c069; }

/* ── 左栏 ── */
#gs-root .gs-rail {
  width: 252px; flex: 0 0 252px; background: var(--gs-rail);
  border-right: 1px solid var(--gs-line);
  display: flex; flex-direction: column; padding: 14px 10px 8px;
  overflow-y: auto;
}
#gs-root .gs-brand { display: flex; align-items: center; gap: 8px; padding: 6px 10px 14px; color: var(--gs-dim); font-size: 12px; }
#gs-root .gs-brand b { color: var(--gs-text); font-weight: 600; font-size: 13px; }
#gs-root .gs-grp { margin: 12px 0 4px; padding: 0 10px; color: var(--gs-dim-2); font-size: 11px; letter-spacing: .04em; }
#gs-root .gs-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 1px 0;
  border-radius: 8px; color: var(--gs-dim); cursor: pointer; user-select: none;
  border: 1px solid transparent;
}
#gs-root .gs-item:hover { background: var(--gs-panel-2); color: var(--gs-text); }
#gs-root .gs-item.on { background: var(--gs-panel-2); color: var(--gs-text); border-color: var(--gs-line); }
#gs-root .gs-item svg { width: 15px; height: 15px; flex: 0 0 15px; opacity: .9; }
#gs-root .gs-foot { margin-top: auto; padding: 10px; color: var(--gs-dim-2); font-size: 11px; }

/* ── 右区 ── */
#gs-root .gs-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
#gs-root .gs-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 26px;
  border-bottom: 1px solid var(--gs-line);
}
#gs-root .gs-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
#gs-root .gs-head .gs-sub { color: var(--gs-dim); font-size: 12px; }
#gs-root .gs-head .gs-x {
  margin-left: auto; width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--gs-line);
  background: var(--gs-panel); color: var(--gs-dim); cursor: pointer; font-size: 15px; line-height: 1;
}
#gs-root .gs-head .gs-x:hover { color: var(--gs-text); border-color: var(--gs-dim-2); }
#gs-root .gs-body { flex: 1 1 auto; overflow-y: auto; padding: 22px 26px 40px; }

/* ── 通用块 ── */
#gs-root .card { background: var(--gs-panel); border: 1px solid var(--gs-line); border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
#gs-root .card h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
#gs-root .muted { color: var(--gs-dim); }
#gs-root .tiny { color: var(--gs-dim-2); font-size: 11px; }
#gs-root .row { display: flex; gap: 10px; align-items: center; }
#gs-root .grow { flex: 1 1 auto; }
#gs-root .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
#gs-root .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { #gs-root .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

#gs-root table.kv { width: 100%; border-collapse: collapse; }
#gs-root table.kv td { padding: 7px 0; border-bottom: 1px solid var(--gs-line); vertical-align: top; }
#gs-root table.kv td:first-child { color: var(--gs-dim); width: 180px; }
#gs-root table.kv tr:last-child td { border-bottom: 0; }
#gs-root code, #gs-root .mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12px; }

/* 统计页 */
#gs-root .gs-hero { background: var(--gs-panel); border: 1px solid var(--gs-line); border-radius: 14px; padding: 22px 24px; margin-bottom: 16px; }
#gs-root .gs-hero h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
#gs-root .kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
#gs-root .kpi .n { font-size: 30px; font-weight: 600; letter-spacing: -.01em; }
#gs-root .kpi .l { color: var(--gs-dim); font-size: 12px; }
#gs-root .kpi .d { color: var(--gs-accent); font-size: 12px; }
#gs-root .kpi .d.neg { color: var(--gs-bad); }
#gs-root .subkpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--gs-line); }
#gs-root .subkpi .n { font-size: 18px; font-weight: 600; }
#gs-root .subkpi .l { color: var(--gs-dim); font-size: 11px; }

#gs-root .heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 11px); gap: 3px; margin-top: 10px; }
#gs-root .heat i { width: 11px; height: 11px; border-radius: 2px; background: var(--gs-panel-2); display: block; }
#gs-root .heat i[data-l="1"] { background: color-mix(in srgb, var(--gs-accent) 22%, var(--gs-panel-2)); }
#gs-root .heat i[data-l="2"] { background: color-mix(in srgb, var(--gs-accent) 42%, var(--gs-panel-2)); }
#gs-root .heat i[data-l="3"] { background: color-mix(in srgb, var(--gs-accent) 66%, var(--gs-panel-2)); }
#gs-root .heat i[data-l="4"] { background: var(--gs-accent); }
#gs-root .heat-legend { display: flex; gap: 6px; align-items: center; justify-content: flex-end; color: var(--gs-dim-2); font-size: 11px; }
#gs-root .heat-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* 技能 / 卡片列表 */
#gs-root .chips { display: flex; flex-wrap: wrap; gap: 8px; }
#gs-root .chip { border: 1px solid var(--gs-line); background: var(--gs-panel-2); border-radius: 999px; padding: 4px 10px; font-size: 12px; color: var(--gs-dim); }
#gs-root .chip b { color: var(--gs-text); font-weight: 500; }
#gs-root .skill { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gs-line); }
#gs-root .skill:last-child { border-bottom: 0; }
#gs-root .skill .nm { font-weight: 600; }
#gs-root .skill .ds { color: var(--gs-dim); font-size: 12px; }
#gs-root .skill .tag { margin-left: auto; align-self: flex-start; }

/* 按钮 / 开关 */
#gs-root button.gs-btn {
  border: 1px solid var(--gs-line); background: var(--gs-panel-2); color: var(--gs-text);
  border-radius: 8px; padding: 7px 12px; font-size: 12px; cursor: pointer;
}
#gs-root button.gs-btn:hover { border-color: var(--gs-dim-2); }
#gs-root button.gs-btn.primary { background: var(--gs-accent); border-color: transparent; color: #0b0b0c; font-weight: 600; }
#gs-root .sw { position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--gs-panel-2); border: 1px solid var(--gs-line); cursor: pointer; }
#gs-root .sw i { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--gs-dim); transition: .15s; }
#gs-root .sw.on { background: color-mix(in srgb, var(--gs-accent) 30%, var(--gs-panel-2)); border-color: var(--gs-accent); }
#gs-root .sw.on i { left: 18px; background: var(--gs-accent); }

#gs-root .bar { height: 6px; border-radius: 999px; background: var(--gs-panel-2); overflow: hidden; }
#gs-root .bar i { display: block; height: 100%; background: var(--gs-accent); }

#gs-root .badge { font-size: 11px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--gs-line); color: var(--gs-dim); }
#gs-root .badge.ok { color: var(--gs-accent); border-color: color-mix(in srgb, var(--gs-accent) 45%, transparent); }
#gs-root .badge.bad { color: var(--gs-bad); border-color: color-mix(in srgb, var(--gs-bad) 45%, transparent); }
