/* ============================================================
   乾鸿 GEO · Agent 工作台 —— 设计系统
   视觉基线沿用原「研究与增长工作台」：暖白纸面、细线分隔、等宽数字、青绿主色
   ============================================================ */

:root {
  --bg: #f6f6f3;
  --bg-2: #f1f1ec;
  --surface: #ffffff;
  --surface-2: #fbfbf9;
  --line: #e3e2dd;
  --line-strong: #cfcec7;
  --ink: #1c1c1a;
  --ink-2: #5b5b56;
  --ink-3: #8b8b84;
  --accent: #1f6f5c;
  --accent-deep: #164f41;
  --accent-soft: #e6f2ee;
  --warn: #a8571b;
  --warn-soft: #fbf0e4;
  --danger: #a8322d;
  --danger-soft: #fbeceb;
  --blue: #2c5d8f;
  --blue-soft: #e8eff7;
  --plum: #6f4d8a;
  --plum-soft: #f0eaf5;
  --gold: #8a6a12;
  --gold-soft: #f6f0dc;
  --radius: 10px;
  --radius-lg: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --shadow: 0 1px 2px rgba(28, 28, 26, .04), 0 8px 24px -18px rgba(28, 28, 26, .35);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.012em; }
h1 { font-size: 21px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }
small { color: var(--ink-3); font-size: 12px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 12px; }
::selection { background: #cfe6de; }

.boot { min-height: 100vh; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; }

/* ---------------- 登录 ---------------- */
.gate { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.gate-aside {
  background: linear-gradient(160deg, #14352c 0%, #1f6f5c 58%, #2c8b72 100%);
  color: #eef6f2; padding: 56px 52px; display: flex; flex-direction: column; gap: 34px;
  position: relative; overflow: hidden;
}
.gate-aside::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -220px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 62%);
}
.gate-brand { display: flex; align-items: center; gap: 12px; }
.gate-brand .mark { width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,.16); display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.gate-brand strong { font-size: 17px; letter-spacing: .02em; }
.gate-brand small { color: rgba(238, 246, 242, .68); display: block; font-size: 12px; }
.gate-hero h2 { font-size: 34px; line-height: 1.28; letter-spacing: -.02em; margin-bottom: 14px; }
.gate-hero p { color: rgba(238, 246, 242, .78); font-size: 14px; max-width: 30em; }
.gate-points { display: grid; gap: 12px; margin-top: 6px; }
.gate-points div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: rgba(238,246,242,.86); }
.gate-points i { font-style: normal; width: 20px; height: 20px; border-radius: 6px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 11px; flex: none; }
.gate-foot { margin-top: auto; font-size: 12px; color: rgba(238,246,242,.55); }
.gate-panel { display: grid; place-items: center; padding: 40px 24px; }
.gate-card { width: 380px; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow); }
.gate-card h3 { font-size: 19px; margin-bottom: 4px; }
.gate-card > p { color: var(--ink-3); font-size: 13px; margin-bottom: 18px; }
.gate-tabs { display: flex; gap: 4px; background: var(--bg-2); border-radius: 9px; padding: 3px; margin-bottom: 18px; }
.gate-tabs button { flex: 1; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font-size: 13px; cursor: pointer; }
.gate-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); font-weight: 600; }
.gate-form { display: grid; gap: 12px; }
.gate-form label { display: grid; gap: 5px; font-size: 12px; color: var(--ink-2); }
.gate-form input { height: 40px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 12px; font-size: 14px; font-family: inherit; background: #fff; }
.gate-form input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.gate-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.gate-msg { min-height: 18px; font-size: 12.5px; color: var(--danger); }
.gate-hint { font-size: 12px; color: var(--ink-3); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 8px; padding: 9px 11px; }
.gate-submit { height: 40px; border: 0; border-radius: 9px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.gate-submit:hover { background: var(--accent-deep); }
.gate-submit:disabled { opacity: .55; cursor: progress; }

/* ---------------- 外壳 ---------------- */
#app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.rail {
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px; padding: 16px 12px;
  position: sticky; top: 0; height: 100vh; overflow: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; }
.brand strong { display: block; font-size: 14px; letter-spacing: .01em; }
.brand small { display: block; font-size: 11px; }
.rail-brand { padding: 0 6px; }
.rail-brand label { font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.rail-brand select { width: 100%; height: 32px; margin-top: 4px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; padding: 0 8px; font-size: 13px; }
nav { display: grid; gap: 2px; }
nav .group { font-size: 10.5px; color: var(--ink-3); padding: 12px 8px 4px; letter-spacing: .1em; text-transform: uppercase; }
nav a { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 7px; color: var(--ink-2); font-size: 13px; }
nav a:hover { background: var(--bg-2); color: var(--ink); text-decoration: none; }
nav a.on { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
nav a .idx { font-family: var(--mono); font-size: 10.5px; opacity: .55; width: 14px; }
nav a .dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
nav a .dot.ok { background: var(--accent); }
nav a .dot.off { background: var(--warn); }
.rail-foot { margin-top: auto; display: grid; gap: 8px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.credit { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--ink-2); }
.credit b { font-family: var(--mono); font-size: 15px; color: var(--ink); }
.hint { font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-links { display: flex; gap: 10px; }
.mini-link { font-size: 12px; color: var(--ink-3); background: none; border: 0; padding: 0; cursor: pointer; }
.mini-link:hover { color: var(--accent); text-decoration: underline; }
/* 回公司工作台：它是导航，不是一个动作，所以不做成按钮样式 */
.rail-back { display: block; text-decoration: none; font-size: 11.5px; margin-bottom: 2px; }
.rail-back:hover { text-decoration: none; color: var(--ink); }

.main { padding: 20px 26px 70px; width: 100%; min-width: 0; max-width: 1440px; margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar p { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--accent-soft); border-color: #c8e2da; color: var(--accent-deep); }
.pill.warn { background: var(--warn-soft); border-color: #ecd9c0; color: var(--warn); }
.pill.bad { background: var(--danger-soft); border-color: #e9c8c5; color: var(--danger); }
.pill.blue { background: var(--blue-soft); border-color: #cfe0f0; color: var(--blue); }
.pill.plum { background: var(--plum-soft); border-color: #ded0e8; color: var(--plum); }
.pill.gold { background: var(--gold-soft); border-color: #e8dcb4; color: var(--gold); }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(31,111,92,.16); }

/* ---------------- 基础组件 ---------------- */
.btn {
  height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink); font-size: 13px; font-family: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: all .14s;
}
.btn:hover { border-color: var(--ink-3); background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.ghost { background: transparent; }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 6px; }
.btn.lg { height: 38px; padding: 0 18px; font-size: 14px; }
.btn.danger { color: var(--danger); border-color: #e3b7b4; }
.btn.danger:hover { background: var(--danger-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary:disabled { background: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card + .card { margin-top: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 15px; }
.card-head small { display: block; margin-top: 2px; }
.card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kicker { font: 600 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }

.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 12px; }
.mt { margin-top: 12px; }
.mt-lg { margin-top: 20px; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.tiny { font-size: 12px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

label.f { display: grid; gap: 5px; font-size: 12px; color: var(--ink-2); }
label.f > span { display: flex; justify-content: space-between; gap: 8px; }
label.f input, label.f select, label.f textarea {
  height: 34px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 0 10px;
  font-size: 13px; font-family: inherit; background: #fff; color: var(--ink); width: 100%;
}
label.f textarea { height: auto; min-height: 88px; padding: 9px 10px; line-height: 1.65; resize: vertical; }
label.f input:focus, label.f select:focus, label.f textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
label.f small { font-size: 11.5px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0; }
legend { padding: 0 6px; font-size: 12px; color: var(--ink-2); }

.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi span { font-size: 11.5px; color: var(--ink-3); display: block; letter-spacing: .02em; }
.kpi b { font: 600 25px/1.25 var(--mono); letter-spacing: -.02em; display: block; margin-top: 2px; }
.kpi i { font-style: normal; font-size: 11.5px; color: var(--ink-3); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 11.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); letter-spacing: .02em; }
td { padding: 9px 10px; border-bottom: 1px solid #f0efeb; vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fcfcfa; }
td.num, th.num { text-align: right; font-family: var(--mono); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.table-wrap table { font-size: 12.5px; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.tag.core { background: var(--accent-soft); color: var(--accent-deep); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--danger-soft); color: var(--danger); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }

.bar { height: 7px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.bar.b > i { background: var(--blue); }
.bar.w > i { background: var(--warn); }
.bar.danger > i { background: var(--danger); }

.empty { padding: 30px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); font-size: 13px; }

/* ---------------- 总览 ---------------- */
.hero {
  background: linear-gradient(135deg, #eef5f1 0%, #e6f2ee 52%, #f4f1e6 100%);
  border: 1px solid #d9e8e1; border-radius: var(--radius-lg); padding: 26px 28px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
}
.hero .kicker { color: var(--accent-deep); }
.hero h2 { font-size: 27px; line-height: 1.3; margin: 8px 0 8px; letter-spacing: -.02em; }
.hero p { color: var(--ink-2); font-size: 13.5px; max-width: 52em; }
.hero-side { display: grid; gap: 10px; justify-items: end; }
.hero-balance { background: rgba(255,255,255,.72); border: 1px solid #cfe3da; border-radius: 12px; padding: 14px 18px; text-align: right; min-width: 168px; }
.hero-balance span { font-size: 11.5px; color: var(--ink-3); display: block; }
.hero-balance b { font: 600 30px/1.2 var(--mono); color: var(--accent-deep); }

.agent-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; position: relative; overflow: hidden; }
.agent-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.agent-card.gold::before { background: #c19a2e; }
.agent-card.blue::before { background: #3b74a8; }
.agent-card.plum::before { background: #8a67a5; }
.agent-card.off { opacity: .62; }
.agent-card.off::before { background: var(--line-strong); }
.agent-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.agent-head h3 { font-size: 16px; }
.agent-head .badge { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.agent-card p { font-size: 12.5px; color: var(--ink-2); min-height: 3.3em; }
.agent-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------------- 步骤条 / 流程 ---------------- */
.steps { display: grid; gap: 8px; }
.step { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step .n { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); width: 20px; }
.step .t { flex: 1; min-width: 0; }
.step .t b { display: block; font-size: 13.5px; font-weight: 600; }
.step .t small { display: block; }
.step.done { border-color: #cfe4db; background: #fbfefc; }
.step.done .st { color: var(--accent); }
.step .st { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.step .n.ok { color: var(--accent); }

.progress-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--surface); }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.progress-head b { font-size: 14px; }
.progress-head span { font-family: var(--mono); font-size: 20px; color: var(--accent); }
.progress-steps { display: grid; gap: 6px; margin-top: 14px; }
.progress-steps div { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-3); }
.progress-steps div.on { color: var(--ink); font-weight: 600; }
.progress-steps div.done { color: var(--accent); }
.progress-steps i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-style: normal; font-size: 9px; }
.progress-steps div.done i { background: var(--accent-soft); border-color: #bcded2; color: var(--accent-deep); }
.progress-steps div.on i { border-color: var(--accent); background: #fff; }

/* ---------------- 资料槽 ---------------- */
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.slot { border: 1px dashed var(--line-strong); border-radius: 8px; padding: 10px 11px; background: var(--surface-2); display: grid; gap: 4px; }
.slot.on { border-style: solid; border-color: #bcded2; background: #f7fcf9; }
.slot-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.slot-head strong { font-size: 12.5px; font-weight: 600; }
.slot small { font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .row { gap: 6px; }
.slot input[type=file] { display: none; }

/* ---------------- 进度与任务 ---------------- */
.task-row { display: grid; grid-template-columns: minmax(0, 1fr) 116px 108px; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid #f0efeb; }
.task-row:last-child { border-bottom: 0; }
.task-row b { font-size: 13px; font-weight: 600; display: block; }
.task-row small { font-size: 11.5px; }

/* ---------------- 监测 ---------------- */
.runs-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.run-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #fff; display: grid; gap: 6px; }
.run-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.run-card p { font-size: 12px; color: var(--ink-2); }
.run-card footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid #f2f1ec; padding-top: 8px; }
.run-card .chk { display: flex; gap: 5px; align-items: center; font-size: 12px; color: var(--ink-2); }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metric-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff; }
.metric-block header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.metric-block header b { font-family: var(--mono); font-size: 20px; color: var(--accent-deep); }
.metric-line { display: grid; grid-template-columns: 84px minmax(0, 1fr) 52px; gap: 8px; align-items: center; font-size: 12px; margin: 6px 0; }
.metric-line span:first-child { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric-line .v { text-align: right; font-family: var(--mono); color: var(--ink-2); }
.matrix td { text-align: center; }
.matrix td.q { text-align: left; font-size: 12.5px; max-width: 340px; }
.matrix .cell { display: grid; gap: 2px; justify-items: center; }
.matrix .cell small { font-size: 10.5px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 14px; }
.tabs button { border: 0; background: none; padding: 8px 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: inherit; }
.tabs button.on { color: var(--accent-deep); border-bottom-color: var(--accent); font-weight: 600; }
.answer-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 10px; overflow: hidden; }
.answer-card > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); cursor: pointer; }
.answer-card > header h4 { font-size: 13px; font-weight: 600; }
.answer-body { padding: 14px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.answer-text { white-space: pre-wrap; font-size: 13px; line-height: 1.8; max-height: 420px; overflow: auto; }
.answer-side { display: grid; gap: 12px; align-content: start; }
.answer-side h5 { margin: 0 0 6px; font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
.cite-list { display: grid; gap: 6px; font-size: 12px; }
.cite-list a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
mark { background: #fdf0c9; color: inherit; padding: 0 1px; border-radius: 2px; }

/* ---------------- 弹层 ---------------- */
.backdrop { position: fixed; inset: 0; background: rgba(24, 24, 22, .38); display: grid; place-items: center; padding: 24px; z-index: 60; }
.dialog { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); width: 560px; max-width: 100%; max-height: 88vh; overflow: auto; box-shadow: 0 24px 60px -20px rgba(0,0,0,.35); }
.dialog.wide { width: 860px; }
.dialog header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.dialog header h3 { font-size: 15px; }
.dialog .body { padding: 18px 20px; display: grid; gap: 12px; }
.dialog footer { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; background: #fff; }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 18px; line-height: 1; padding: 4px; }
.icon-btn:hover { color: var(--ink); }

/* ---------------- 提示 ---------------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 80; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 9px; font-size: 13px; max-width: min(420px, calc(100vw - 40px)); box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); animation: toast-in .18s ease-out; }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--accent-deep); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.notice { padding: 12px 14px; background: var(--warn-soft); border-left: 3px solid var(--warn); border-radius: 0 8px 8px 0; font-size: 12.5px; color: #7a4112; }
.notice.info { background: var(--blue-soft); border-left-color: var(--blue); color: #24486b; }
.notice.ok { background: var(--accent-soft); border-left-color: var(--accent); color: var(--accent-deep); }

.spinner { width: 15px; height: 15px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

pre.body, .doc {
  white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13px; line-height: 1.8;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 0;
  max-height: 460px; overflow: auto;
}
pre.prompt { white-space: pre-wrap; word-break: break-word; font: 12.5px/1.75 var(--mono); background: #fbfbf7; border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 0; max-height: 320px; overflow: auto; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.split.wide-right { grid-template-columns: 320px minmax(0, 1fr); }

/* skill 市场 */
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.skill-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 8px; }
.skill-card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.skill-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.skill-card h3 { font-size: 14.5px; }
.skill-card p { font-size: 12.5px; color: var(--ink-2); }
.skill-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-3); border-top: 1px solid #f2f1ec; padding-top: 8px; }
.points { font-family: var(--mono); font-size: 13px; color: var(--gold); }

/* 管理后台 */
.admin-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.admin-tabs button { border: 0; background: none; padding: 9px 12px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-family: inherit; }
.admin-tabs button.on { color: var(--accent-deep); border-bottom-color: var(--accent); font-weight: 600; }

/* 响应式 */
@media (max-width: 1080px) {
  .gate { grid-template-columns: 1fr; }
  .gate-aside { display: none; }
  .split, .split.wide-right { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .answer-body { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  #app { grid-template-columns: 1fr; }
  .rail { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 8px 10px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail .brand { flex: none; }
  .rail .brand small, .rail-brand label, .rail-foot { display: none; }
  .rail-brand { flex: none; width: 150px; }
  .rail-brand select { margin: 0; }
  nav { display: flex; gap: 2px; }
  nav .group { display: none; }
  nav a { white-space: nowrap; flex: none; }
  .main { padding: 14px; }
  .hero { grid-template-columns: 1fr; }
  .hero-side { justify-items: start; }
  .slots, .g3, .g4, .g2 { grid-template-columns: 1fr; }
  .task-row { grid-template-columns: 1fr; gap: 6px; }
  .metric-line { grid-template-columns: 70px 1fr 46px; }
}
