/* ============ 设计变量 ============ */
:root {
  --bg: #f4f5f9;
  --panel: #ffffff;
  --panel-2: #fafbfd;
  --line: #e9ebf2;
  --line-strong: #dcdfe9;
  --text: #171a26;
  --text-2: #4b5162;
  --muted: #878da1;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-soft: #eef0ff;
  --green: #0ea472;
  --green-soft: #e6f7f1;
  --amber: #d97706;
  --amber-soft: #fef3e2;
  --red: #e5484d;
  --red-soft: #fdecec;
  --cyan: #0891b2;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 20, 40, 0.04), 0 10px 28px -18px rgba(16, 20, 40, 0.28);
  --sidebar-w: 248px;
  --font: "Inter", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: #dcd9ff; }

/* ============ 布局 ============ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  background: #10121c;
  color: #cfd3e2;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  border-right: 1px solid #1b1e2c;
}
.brand { display: flex; gap: 11px; align-items: center; padding: 4px 8px 22px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #5b5bf0, #8b5cf6);
  display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(99, 102, 241, 0.9);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { color: #fff; font-size: 15.5px; letter-spacing: 0.2px; }
.brand-text span { font-size: 11px; color: #7c839c; margin-top: 3px; letter-spacing: 0.4px; }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; color: #a8aec4; cursor: pointer;
  transition: background 0.16s, color 0.16s;
  position: relative;
}
.nav-item:hover { background: #191c2b; color: #e6e8f2; }
.nav-item.active { background: linear-gradient(135deg, #262a4a, #1e2140); color: #fff; }
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: #7c7cff;
}
.nav-ico { width: 17px; height: 17px; display: inline-grid; place-items: center; opacity: 0.9; }
.nav-ico svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.nav-badge {
  margin-left: auto; font-style: normal; font-size: 10px; font-weight: 600;
  background: rgba(124, 92, 246, 0.22); color: #c4b5fd;
  padding: 1px 7px; border-radius: 20px; border: 1px solid rgba(150, 120, 255, 0.25);
}
.sidebar-foot { display: flex; flex-direction: column; gap: 10px; }
.brand-card {
  background: #171a28; border: 1px solid #232637; border-radius: 12px; padding: 11px 13px;
}
.brand-card-label { font-size: 10.5px; color: #6d748e; letter-spacing: 0.5px; }
.brand-card-name { color: #fff; font-size: 13.5px; font-weight: 600; margin-top: 3px; }
.brand-card-meta { font-size: 11px; color: #767d96; margin-top: 2px; }
.user-chip { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 11px; }
.user-chip:hover { background: #171a28; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #6d7bff, #a78bfa);
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; overflow: hidden; }
.user-meta strong { color: #eef0f8; font-size: 12.5px; font-weight: 600; }
.user-meta span { color: #767d96; font-size: 11px; }

.main { display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 28px 16px; background: rgba(244, 245, 249, 0.86);
  backdrop-filter: blur(8px); border-bottom: 1px solid transparent;
  flex-shrink: 0;
}
.topbar-left h1 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -0.3px; }
.topbar-left p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.live-dot {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2);
  background: var(--panel); border: 1px solid var(--line); padding: 6px 11px; border-radius: 20px;
}
.live-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(14, 164, 114, 0.15); }
.live-dot.live i { background: #0ea5e9; box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18); }
.view { flex: 1; overflow-y: auto; padding: 4px 28px 40px; scroll-behavior: smooth; }
.view > * { animation: fadeUp 0.34s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============ 通用组件 ============ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--text-2);
  padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.16s; white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn:hover { border-color: #c6cad8; color: var(--text); background: #fff; }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; border: none; box-shadow: 0 6px 16px -8px rgba(79, 70, 229, 0.7);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.soft { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.btn.soft:hover { background: #e3e6ff; }
.btn.danger { color: var(--red); border-color: #f3c9c9; background: #fff; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.block { width: 100%; justify-content: center; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px 0;
}
.panel-head h3 { margin: 0; font-size: 14px; font-weight: 620; letter-spacing: -0.1px; }
.panel-head .sub { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.panel-body { padding: 16px 18px; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; }
.section-title h2 { margin: 0; font-size: 15px; font-weight: 640; }
.section-title .link { font-size: 12.5px; color: var(--brand); cursor: pointer; }

.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(4, 1fr); }

.kpi-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 17px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 28px; font-weight: 680; letter-spacing: -0.8px; margin: 7px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.kpi-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 11.5px; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.flat { color: var(--muted); }
.kpi-spark { position: absolute; right: 14px; bottom: 12px; opacity: 0.9; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: #f1f2f7; color: var(--text-2); font-weight: 500;
}
.tag.brand { background: var(--brand-soft); color: var(--brand); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.red { background: var(--red-soft); color: var(--red); }

.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 550;
  padding: 3px 9px; border-radius: 20px;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.draft { background: #f0f1f6; color: #6b7280; }
.badge.adopted, .badge.approved { background: var(--amber-soft); color: var(--amber); }

/* 工作区切换器 */
.ws-box { position: relative; margin: 12px 16px 4px; }
.ws-current { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); font-size: 12.5px; font-weight: 560; cursor: pointer; color: var(--text); }
.ws-current:hover { border-color: var(--brand); }
.ws-caret { color: var(--muted); font-size: 11px; }
.ws-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.12); z-index: 60; max-height: 320px; overflow: auto; padding: 6px; }
.ws-item { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 7px; cursor: pointer; background: none; border: none; font-size: 12.5px; color: var(--text); }
.ws-item:hover { background: var(--panel-2); }
.ws-item .sub { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.ws-item.current { background: var(--brand-soft); }
.ws-new { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; color: var(--brand); font-weight: 560; }
.badge.published { background: var(--green-soft); color: var(--green); }
.badge.done { background: var(--green-soft); color: var(--green); }
.badge.running { background: #e8f4fd; color: #0284c7; }
.badge.failed { background: var(--red-soft); color: var(--red); }
.badge.mock { background: #f0f1f6; color: #6b7280; }
.badge.live { background: var(--green-soft); color: var(--green); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 12.5px; color: var(--text-2); cursor: pointer;
  transition: all 0.15s; user-select: none;
}
.chip:hover { border-color: #c3c7d6; }
.chip.on { background: var(--brand-soft); border-color: #c7c9ff; color: var(--brand); font-weight: 550; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }

.seg {
  display: inline-flex; background: #eef0f5; border-radius: 9px; padding: 3px; gap: 2px;
}
.seg button {
  border: none; background: transparent; padding: 5px 12px; border-radius: 7px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer;
}
.seg button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }

/* 表单 */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.form-row label { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.form-row .hint { font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 9px 12px; font-size: 13px; font-family: inherit; color: var(--text);
  background: #fff; outline: none; transition: border 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 550; font-size: 11.5px; color: var(--muted);
  padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.table td { padding: 12px; border-bottom: 1px solid #f2f3f8; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: #fafbfe; }
.table .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.table .q-text { max-width: 420px; }
.table .q-text span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* 进度条 */
.progress { height: 6px; background: #eef0f5; border-radius: 20px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 0.6s ease; }
.progress.green > i { background: linear-gradient(90deg, #10b981, #34d399); }
.progress.amber > i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* 平台条 */
.platform-row { display: grid; grid-template-columns: 92px 1fr 52px; align-items: center; gap: 12px; padding: 7px 0; }
.platform-name { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.platform-name .dot { width: 8px; height: 8px; border-radius: 50%; }
.platform-val { font-size: 12.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* 空状态 */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 20px; text-align: center; color: var(--muted); gap: 10px;
}
.empty svg { width: 40px; height: 40px; stroke: #c3c7d6; fill: none; stroke-width: 1.5; }
.empty strong { color: var(--text-2); font-size: 13.5px; }
.empty p { margin: 0; font-size: 12.5px; max-width: 320px; }

/* 骨架 */
.skeleton { background: linear-gradient(90deg, #eef0f5 25%, #f6f7fb 37%, #eef0f5 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Toast */
.toast-wrap { position: fixed; top: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 999; }
.toast {
  background: #171a26; color: #fff; padding: 11px 16px; border-radius: 10px;
  font-size: 13px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.24s ease both; display: flex; align-items: center; gap: 9px; max-width: 380px;
}
.toast.success { border-left: 3px solid #34d399; }
.toast.error { border-left: 3px solid #f87171; }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* Modal */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 18, 30, 0.42); backdrop-filter: blur(2px);
  display: grid; place-items: center; z-index: 200; animation: fadeIn 0.2s ease both; padding: 20px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 16px; width: 520px; max-width: 100%; max-height: 86vh;
  overflow: auto; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.4);
  animation: modalIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { padding: 18px 20px 0; display: flex; justify-content: space-between; align-items: flex-start; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 640; }
.modal-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 0 20px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.icon-btn {
  border: none; background: #f3f4f8; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; cursor: pointer; color: var(--muted);
}
.icon-btn:hover { background: #e9ebf2; color: var(--text); }

/* 内容工作台 */
.content-layout { display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: start; }
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.type-card {
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 11px;
  cursor: pointer; transition: all 0.15s; background: #fff;
}
.type-card:hover { border-color: #c3c7d6; background: #fcfcff; }
.type-card.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.08); }
.type-card strong { display: block; font-size: 12.5px; font-weight: 600; }
.type-card span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.type-card.on span { color: #6b6ee0; }

.result-panel { min-height: 560px; }
.result-empty { padding: 70px 30px; }
.score-ring { position: relative; width: 76px; height: 76px; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .score-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 20px; font-weight: 700; letter-spacing: -0.5px;
}
.score-row { display: flex; align-items: center; gap: 16px; }
.score-bars { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.score-bar { display: grid; grid-template-columns: 76px 1fr 34px; align-items: center; gap: 10px; font-size: 11.5px; color: var(--text-2); }
.score-bar .val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

.adapt-list { display: flex; flex-direction: column; gap: 8px; }
.adapt-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; }
.adapt-item .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.adapt-item strong { font-size: 12px; font-weight: 600; display: block; }
.adapt-item p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }

/* Markdown */
.md { font-size: 13.5px; line-height: 1.78; color: #2a2f3d; }
.md h1 { font-size: 21px; font-weight: 680; margin: 4px 0 14px; letter-spacing: -0.4px; }
.md h2 { font-size: 16px; font-weight: 640; margin: 26px 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.md h3 { font-size: 14px; font-weight: 620; margin: 18px 0 8px; }
.md p { margin: 9px 0; }
.md blockquote {
  margin: 12px 0; padding: 11px 14px; background: var(--brand-soft);
  border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; color: #4348a8; font-size: 13px;
}
.md ul, .md ol { margin: 10px 0; padding-left: 22px; }
.md li { margin: 5px 0; }
.md strong { font-weight: 650; color: #1c2030; }
.md code { background: #f3f4f8; padding: 1px 5px; border-radius: 5px; font-size: 12px; font-family: "JetBrains Mono", Consolas, monospace; }
.md pre { background: #14161f; color: #d6dbef; padding: 14px 16px; border-radius: 10px; overflow: auto; font-size: 11.5px; line-height: 1.6; }
.md pre code { background: none; padding: 0; color: inherit; font-size: 11.5px; }
.md table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12.5px; }
.md th, .md td { border: 1px solid var(--line); padding: 8px 11px; text-align: left; }
.md th { background: var(--panel-2); font-weight: 600; }
.md hr { border: none; border-top: 1px solid var(--line); margin: 22px 0; }

/* 内容列表卡 */
.content-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.content-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  cursor: pointer; transition: all 0.16s; box-shadow: var(--shadow);
}
.content-card:hover { transform: translateY(-2px); border-color: #cfd3e4; box-shadow: 0 14px 30px -18px rgba(16, 20, 40, 0.4); }
.content-card .cc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.content-card strong { font-size: 13px; font-weight: 600; display: block; line-height: 1.45; min-height: 38px; }
.content-card .cc-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.cc-score { font-size: 12px; font-weight: 700; color: var(--brand); }

/* 平台卡 */
.platform-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.platform-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 15px; }
.platform-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.platform-card-top .name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.platform-card-top .dot { width: 9px; height: 9px; border-radius: 50%; }
.platform-card .pc-rate { font-size: 24px; font-weight: 700; letter-spacing: -0.6px; }
.platform-card .pc-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 8px; }

/* 回答详情 */
.answer-block { border: 1px solid var(--line); border-radius: 11px; margin-bottom: 12px; overflow: hidden; }
.answer-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 13px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.answer-head .plat { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.answer-body { padding: 13px 14px; font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; color: #3a4050; max-height: 260px; overflow: auto; }
.mark { background: #fff3c4; border-radius: 3px; padding: 0 2px; font-weight: 600; }

.drawer-mask { position: fixed; inset: 0; background: rgba(16, 18, 30, 0.38); z-index: 200; animation: fadeIn 0.2s both; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 94vw;
  background: #fff; z-index: 201; display: flex; flex-direction: column;
  box-shadow: -24px 0 60px -30px rgba(0, 0, 0, 0.4); animation: drawerIn 0.26s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes drawerIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; }
.drawer-head h3 { margin: 0; font-size: 15px; font-weight: 640; }
.drawer-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted); max-width: 420px; }
.drawer-body { flex: 1; overflow: auto; padding: 16px 20px 30px; }

/* 竞品 */
.compare-row { display: grid; grid-template-columns: 110px 1fr 56px; align-items: center; gap: 12px; padding: 9px 0; }
.compare-bar { height: 26px; border-radius: 7px; background: #f1f2f7; overflow: hidden; position: relative; }
.compare-bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; transition: width 0.7s ease; }
.compare-row.self .compare-bar > i { background: linear-gradient(90deg, #4f46e5, #7c3aed); }
.compare-row .compare-name { font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.compare-row.me .compare-name { font-weight: 650; color: var(--brand); }
.compare-val { font-size: 12.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

.spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  display: inline-block; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.issue-list { display: flex; flex-direction: column; }
.issue-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f2f3f8; }
.issue-item:last-child { border-bottom: none; }
.issue-rank { width: 22px; height: 22px; border-radius: 6px; background: #f1f2f7; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.issue-item .body { flex: 1; min-width: 0; }
.issue-item .body p { margin: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-item .body span { font-size: 11px; color: var(--muted); }

/* 团队 */
.member-cell { display: flex; align-items: center; gap: 10px; }
.member-cell .avatar { width: 30px; height: 30px; font-size: 12px; }
.member-cell .info strong { display: block; font-size: 12.5px; font-weight: 600; }
.member-cell .info span { font-size: 11px; color: var(--muted); }

.usage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.usage-card { border: 1px solid var(--line); border-radius: 12px; padding: 15px; }
.usage-card .u-label { font-size: 12px; color: var(--muted); }
.usage-card .u-value { font-size: 21px; font-weight: 680; margin: 6px 0 10px; letter-spacing: -0.5px; }
.usage-card .u-foot { font-size: 11px; color: var(--muted); margin-top: 7px; display: flex; justify-content: space-between; }

/* 设置 */
.provider-row {
  display: grid; grid-template-columns: 150px 1fr 92px; gap: 14px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid #f2f3f8;
}
.provider-row:last-child { border-bottom: none; }
.provider-id { display: flex; align-items: center; gap: 9px; }
.provider-id .dot { width: 9px; height: 9px; border-radius: 50%; }
.provider-id strong { font-size: 12.5px; font-weight: 600; display: block; }
.provider-id span { font-size: 10.5px; color: var(--muted); }
.switch { position: relative; width: 38px; height: 22px; border-radius: 20px; background: #dcdfe9; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(16px); }

.chart-tip { font-size: 11.5px; color: var(--muted); }

/* 活动流 */
.activity-item { display: flex; gap: 11px; padding: 9px 0; }
.activity-dot { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; background: var(--brand-soft); color: var(--brand); }
.activity-dot svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.activity-item .txt { font-size: 12.5px; color: var(--text-2); }
.activity-item .time { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* 工具 */
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }
.two-col { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; align-items: start; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: start; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* 滚动条 */
.view::-webkit-scrollbar, .drawer-body::-webkit-scrollbar, .modal::-webkit-scrollbar { width: 8px; }
.view::-webkit-scrollbar-thumb, .drawer-body::-webkit-scrollbar-thumb, .modal::-webkit-scrollbar-thumb { background: #d6d9e4; border-radius: 8px; }
.view::-webkit-scrollbar-track { background: transparent; }

/* 响应式 */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .content-layout { grid-template-columns: 340px 1fr; }
  .platform-cards, .content-cards { grid-template-columns: repeat(2, 1fr); }
  .two-col, .three-col { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  :root { --sidebar-w: 70px; }
  .brand-text, .nav-item span:not(.nav-ico), .nav-badge, .brand-card, .user-meta { display: none; }
  .nav-item { justify-content: center; }
  .content-layout { grid-template-columns: 1fr; }
  .view { padding: 4px 16px 30px; }
  .topbar { padding: 16px; }
  .usage-grid { grid-template-columns: 1fr; }
}
