/* ============================================================
   求职灯塔对话栏（agent dock）—— 折窗 FAB + 右侧可调宽对话栏。
   配色 / 圆角 / 毛玻璃沿用站点既有风格变量。
   ============================================================ */
/* 展开时给主文档让出停靠侧空间；.top-nav 是 sticky，会随之一起收窄。
   停靠边跟随悬浮球的吸附边（agentFabSide）：球在左 → .dock-left →
   对话栏贴左、主文档让出左侧。 */
#app-root {
  transition:
    padding-right 220ms cubic-bezier(.22,.61,.36,1),
    padding-left 220ms cubic-bezier(.22,.61,.36,1);
}
#app-root.dock-open { padding-right: var(--dock-w, 0px); }
#app-root.dock-open.dock-left { padding-right: 0; padding-left: var(--dock-w, 0px); }
body.dock-resizing { cursor: col-resize; user-select: none; }
body.dock-resizing #app-root { transition: none; }

/* 折窗 FAB —— 可拖拽悬浮球。默认吸附右缘垂直居中；用户可按住拖到任意
   位置，松手后自动吸附到较近的左/右缘（AssistiveTouch 式），位置持久化。
   位置由 JS 的 agentFabStyle() 以 left/top 内联样式驱动：吸附动画走下面
   的 left/top transition，拖拽中加 .is-dragging 关闭过渡保持跟手。 */
.agent-dock-fab {
  position: fixed;
  z-index: 45; width: 48px; height: 48px;
  border: 1px solid rgba(14,14,16,0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  color: #2563eb; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px -10px rgba(14,14,16,0.28);
  cursor: pointer;
  /* 球本身就是拖拽面——阻止触屏把拖动解释成页面滚动 */
  touch-action: none;
  user-select: none; -webkit-user-select: none;
  transition:
    left 220ms cubic-bezier(.22,.61,.36,1),
    top 220ms cubic-bezier(.22,.61,.36,1),
    background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.agent-dock-fab:hover { background: #fff; transform: scale(1.06); }
.agent-dock-fab.is-dragging {
  transition: none;
  cursor: grabbing;
  transform: scale(1.08);
  box-shadow: 0 14px 30px -12px rgba(14,14,16,0.38);
}

/* 对话栏主体：fixed 贴停靠边（默认右），宽度由 --dock-w 控制。 */
.agent-dock {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: var(--dock-w, 380px); z-index: 50;
  display: flex; flex-direction: column;
  background: rgba(250,249,246,0.86);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-left: 1px solid rgba(14,14,16,0.10);
  box-shadow: -18px 0 48px -24px rgba(14,14,16,0.22);
}
/* 左停靠镜像：边框 / 阴影 / 拖宽手柄全部翻面。 */
.agent-dock.is-left {
  right: auto; left: 0;
  border-left: 0;
  border-right: 1px solid rgba(14,14,16,0.10);
  box-shadow: 18px 0 48px -24px rgba(14,14,16,0.22);
}
.agent-dock-resize {
  position: absolute; left: -3px; top: 0; bottom: 0; width: 9px;
  cursor: col-resize; z-index: 3;
}
.agent-dock.is-left .agent-dock-resize { left: auto; right: -3px; }
/* 折叠箭头指向收起方向：右停靠是 ">"（往右收），左停靠翻成 "<"。 */
.agent-dock.is-left .agent-dock-collapse svg { transform: scaleX(-1); }
.agent-dock-resize::after {
  content: ''; position: absolute; left: 3px; top: 0; bottom: 0; width: 2px;
  background: transparent; transition: background 120ms ease;
}
.agent-dock-resize:hover::after,
body.dock-resizing .agent-dock-resize::after { background: rgba(37,99,235,0.6); }

/* 顶栏 */
.agent-dock-head {
  flex: 0 0 auto; height: 56px; padding: 0 12px 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(14,14,16,0.07);
}
.agent-dock-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: #0e0e10; }
.agent-dock-title svg { color: #2563eb; }
.agent-dock-head-actions { display: flex; gap: 2px; }
.agent-dock-icon-btn {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  color: #5a5a62; background: transparent; cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.agent-dock-icon-btn:hover { background: rgba(14,14,16,0.06); color: #0e0e10; }

/* 历史会话抽屉 */
.agent-dock-sessions {
  position: absolute; top: 56px; left: 0; right: 0; max-height: 55%; overflow-y: auto;
  background: #fff; border-bottom: 1px solid rgba(14,14,16,0.08);
  z-index: 4; padding: 6px; box-shadow: 0 14px 30px -18px rgba(14,14,16,0.3);
}
.agent-dock-sessions-empty { padding: 14px; font-size: 12.5px; color: #94949c; text-align: center; }
.agent-dock-session-row { display: flex; align-items: center; border-radius: 9px; }
.agent-dock-session-row:hover { background: rgba(14,14,16,0.05); }
.agent-dock-session-row.is-active { background: rgba(37,99,235,0.10); }
.agent-dock-session-row.is-active .agent-dock-session-item { color: #1d4ed8; }
.agent-dock-session-item {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; font-size: 13px; color: #1a1a1d; cursor: pointer; text-align: left;
}
.agent-dock-session-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-dock-session-time { flex: 0 0 auto; font-size: 11px; color: #a0a0a8; }
.agent-dock-session-act {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center; color: #b0b0b8; cursor: pointer;
  opacity: 0; transition: opacity 120ms ease, color 120ms ease, background 120ms ease;
}
.agent-dock-session-act:last-child { margin-right: 4px; }
.agent-dock-session-row:hover .agent-dock-session-act { opacity: 1; }
.agent-dock-session-act:hover { color: #2563eb; background: rgba(37,99,235,0.10); }
.agent-dock-session-del:hover { color: #dc2626; background: rgba(220,38,38,0.10); }

/* 消息区 */
.agent-dock-msgs { flex: 1 1 auto; overflow-y: auto; padding: 18px 14px; display: flex; flex-direction: column; gap: 14px; }
.agent-msg { display: flex; flex-direction: column; gap: 8px; max-width: 100%; }
.agent-msg-user { align-items: flex-end; }
.agent-msg-assistant { align-items: flex-start; }
.agent-bubble {
  max-width: 90%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.6;
  word-break: break-word; white-space: pre-wrap;
}
.agent-msg-user .agent-bubble { background: #fff; border: 1px solid rgba(14,14,16,0.08); color: #1a1a1d; border-bottom-right-radius: 5px; }
.agent-msg-assistant .agent-bubble { background: #fff; border: 1px solid rgba(14,14,16,0.08); color: #1a1a1d; border-bottom-left-radius: 5px; }
.agent-bubble a { color: #1d4ed8; text-decoration: underline; }
/* 富文本（Markdown）渲染：段落 / 标题 / 列表 / 行内代码 / 表格 */
.agent-bubble > :first-child { margin-top: 0; }
.agent-bubble > :last-child { margin-bottom: 0; }
.agent-bubble p { margin: 0 0 8px; }
.agent-bubble .agent-md-h { margin: 10px 0 6px; font-size: 14px; font-weight: 700; line-height: 1.4; }
.agent-bubble .agent-md-list { margin: 4px 0 8px; padding-left: 20px; }
.agent-bubble .agent-md-list li { margin: 2px 0; }
.agent-bubble code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; background: rgba(14,14,16,0.06); padding: 1px 5px; border-radius: 4px;
}
.agent-bubble .agent-md-tablewrap { margin: 6px 0 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.agent-bubble .agent-md-table {
  border-collapse: collapse; width: 100%; font-size: 12.5px; line-height: 1.5; white-space: normal;
}
.agent-bubble .agent-md-table th,
.agent-bubble .agent-md-table td {
  border: 1px solid rgba(14,14,16,0.12); padding: 6px 9px; text-align: left; vertical-align: top;
}
.agent-bubble .agent-md-table th { background: rgba(14,14,16,0.04); font-weight: 600; }
.agent-bubble .agent-md-table tbody tr:nth-child(even) td { background: rgba(14,14,16,0.02); }
.agent-msg-time { font-size: 10.5px; color: #a8a8b0; padding: 0 4px; }
.agent-tool-note { font-size: 11.5px; color: #94949c; display: flex; align-items: center; gap: 6px; padding-left: 2px; }
.agent-tool-note::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #2563eb; opacity: .6; }
.agent-bubble-typing { display: inline-flex; gap: 4px; }
.agent-working { padding: 2px 4px 0; }   /* 正文下方“还在输出”小点：略缩进对齐气泡 */
.agent-bubble-typing span { width: 6px; height: 6px; border-radius: 50%; background: #bdbdc4; animation: agentDot 1s infinite; }
.agent-bubble-typing span:nth-child(2) { animation-delay: .15s; }
.agent-bubble-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes agentDot { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* 对话栏内的岗位卡片：复用 .job-card，单列、略缩小 */
.agent-cards { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.agent-cards .job-card--dock { width: 100%; max-width: none; min-height: auto; cursor: pointer; }
.agent-cards .job-card--dock .job-card-title { font-size: 15px; }
.agent-cards .job-card--dock .job-card-body-wrap { padding: 12px 14px; }
/* 匹配理由：agent 给的「为什么适合你」一句话，卡片底部高亮小条 */
.agent-cards .job-card-fit {
  display: flex; gap: 6px; align-items: flex-start; margin-top: 9px; padding: 7px 9px;
  font-size: 12px; line-height: 1.5; color: #1e40af;
  background: rgba(37,99,235,0.06); border: 1px solid rgba(37,99,235,0.14); border-radius: 8px;
}
.agent-cards .job-card-fit-ico { flex: none; font-size: 12px; line-height: 1.5; }

/* 对话栏内的面经 / 攻略卡片：复用首页 .guide-card，单列、压缩尺寸 */
.agent-guides { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.agent-guides .guide-card {
  width: 100%;
  max-width: none;
  min-height: auto;
  margin: 0;
  border-radius: 12px;
  gap: 9px;
  letter-spacing: 0;
}
.agent-guides .guide-card:hover { transform: translateY(-1px); }
.agent-guides .guide-card-head { padding: 9px 12px; }
.agent-guides .guide-card-logo { width: 30px; height: 30px; border-radius: 8px; padding: 4px; }
.agent-guides .guide-card-company { font-size: 12px; letter-spacing: 0; }
.agent-guides .guide-card-title {
  padding: 12px 12px 0;
  font-size: 13.5px;
  line-height: 1.45;
  letter-spacing: 0;
}
.agent-guides .guide-card-head + .guide-card-title { padding-top: 0; margin-top: -1px; }
.agent-guides .guide-card-summary {
  margin: -4px 12px 0;
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.agent-guides .guide-card-meta { padding: 0 12px 11px; gap: 5px 6px; }
.agent-guides .guide-card-source { font-size: 10.8px; padding: 2px 8px; }
.agent-guides .guide-card-date { font-size: 10px; letter-spacing: 0; }
.agent-guides .guide-card-arrow { opacity: 1; transform: translate(0, 0); }

/* 思考态 + 执行步骤时间线（Manus 风格） */
.agent-think { display: flex; flex-direction: column; gap: 9px; padding: 2px; }
.agent-think-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #6b6b73; }
.agent-think-dot { width: 7px; height: 7px; border-radius: 50%; background: #2563eb; animation: agentPulse 1.2s ease-in-out infinite; }
@keyframes agentPulse { 0%,100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }
.agent-steps { list-style: none; margin: 0; padding: 0 0 0 1px; display: flex; flex-direction: column; gap: 7px; }
.agent-step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #8a8a92; line-height: 1.4; }
.agent-step.is-running .agent-step-label { color: #38383d; }
.agent-step-ico { width: 14px; height: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.agent-step.is-running .agent-step-ico { border: 2px solid rgba(37,99,235,0.22); border-top-color: #2563eb; border-radius: 50%; animation: agentSpin .7s linear infinite; }
.agent-step.is-done .agent-step-ico::before { content: '✓'; font-size: 11px; font-weight: 700; color: #16a34a; }
@keyframes agentSpin { to { transform: rotate(360deg); } }
/* 完成后的可展开步骤回看 */
.agent-steps-done { padding-left: 1px; }
.agent-steps-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; padding: 2px 0; cursor: pointer; font-size: 11.5px; color: #94949c; }
.agent-steps-toggle:hover { color: #2563eb; }
.agent-steps-caret { display: inline-block; font-size: 10px; transition: transform 140ms ease; }
.agent-steps-caret.is-open { transform: rotate(90deg); }
.agent-steps-done .agent-steps { margin-top: 7px; }

/* 资讯卡片 */
.agent-news { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.agent-news-card { border: 1px solid rgba(14,14,16,0.08); background: #fff; border-radius: 12px; padding: 11px 13px; display: flex; flex-direction: column; gap: 5px; }
.agent-news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11px; color: #94949c; }
.agent-news-meta > span + span::before { content: '·'; margin-right: 6px; color: #c7c7cf; }
.agent-news-cat { background: rgba(37,99,235,0.10); color: #2563eb; border-radius: 5px; padding: 1px 6px; font-weight: 600; }
.agent-news-title { font-size: 13.5px; font-weight: 600; color: #1a1a1d; line-height: 1.45; text-decoration: none; }
a.agent-news-title:hover { color: #1d4ed8; text-decoration: underline; }
.agent-news-summary { font-size: 12px; color: #6b6b73; line-height: 1.55; }
.agent-news-link { font-size: 11.5px; color: #2563eb; text-decoration: none; align-self: flex-start; margin-top: 1px; }
.agent-news-link:hover { text-decoration: underline; }

/* 处理中的轻量化 ack 文案 */
.agent-ack { font-size: 13px; line-height: 1.55; color: #38383d; }
.agent-ack a { color: #1d4ed8; text-decoration: underline; }

/* 完成标记：绿色勾 + 已完成 */
.agent-done { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #16a34a; padding-left: 2px; }
.agent-done-ico { width: 15px; height: 15px; flex: none; border-radius: 50%; background: #16a34a; display: inline-flex; align-items: center; justify-content: center; }
.agent-done-ico::before { content: '✓'; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; }

/* 延展问题（follow-ups） */
.agent-followups { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 2px; }
.agent-followups-head { font-size: 11.5px; color: #94949c; padding-left: 2px; margin-bottom: 1px; }
.agent-followup {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; cursor: pointer;
  background: rgba(255,255,255,0.6); border: 1px solid rgba(14,14,16,0.10); border-radius: 11px;
  padding: 9px 12px; font-size: 12.5px; color: #38383d; transition: all 140ms ease;
}
.agent-followup:hover { border-color: #2563eb; color: #1d4ed8; background: #fff; }
.agent-followup-ico { flex: none; color: #94949c; display: inline-flex; }
.agent-followup:hover .agent-followup-ico { color: #2563eb; }
.agent-followup-q { flex: 1 1 auto; line-height: 1.45; }
.agent-followup-arrow { flex: none; color: #b8b8c0; font-size: 14px; }
.agent-followup:hover .agent-followup-arrow { color: #2563eb; }

html.dark .agent-ack { color: #c4c4cd; }
html.dark .agent-followups-head { color: #74747e; }
html.dark .agent-followup { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); color: #c4c4cd; }
html.dark .agent-followup:hover { background: rgba(255,255,255,0.08); color: #93c5fd; border-color: #2563eb; }
html.dark .agent-followup-ico, html.dark .agent-followup-arrow { color: #74747e; }
html.dark .agent-done { color: #4ade80; }

/* 空状态 / 引导 */
.agent-dock-welcome { margin: auto 0; text-align: center; padding: 8px 6px; }
.agent-dock-welcome-title { font-size: 15px; font-weight: 600; color: #0e0e10; margin-bottom: 14px; }
.agent-dock-welcome-chips { display: flex; flex-direction: column; gap: 8px; }
.agent-dock-chip {
  padding: 9px 12px; border-radius: 11px; font-size: 13px; color: #38383d; cursor: pointer;
  border: 1px solid rgba(14,14,16,0.10); background: rgba(255,255,255,0.6); transition: all 140ms ease;
}
.agent-dock-chip:hover { border-color: #2563eb; color: #1d4ed8; background: #fff; }
.agent-dock-blocker { margin: auto 0; text-align: center; padding: 12px; }
.agent-dock-blocker-title { font-size: 15px; font-weight: 600; color: #0e0e10; margin-bottom: 6px; }
.agent-dock-blocker-sub { font-size: 13px; color: #5a5a62; line-height: 1.6; margin-bottom: 14px; }
.agent-dock-blocker-btn {
  display: inline-block; padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 500;
  background: #2563eb; color: #fff; cursor: pointer; transition: background 140ms ease;
}
.agent-dock-blocker-btn:hover { background: #1d4ed8; }
.agent-dock-blocker-link { display: block; margin: 10px auto 0; font-size: 12.5px; color: #2563eb; cursor: pointer; background: none; }

/* 输入区：textarea 多行在上，下方一行放 + / Runtime / 发送 */
.agent-dock-input { flex: 0 0 auto; border-top: 1px solid rgba(14,14,16,0.07); padding: 10px 12px 12px; }
.agent-dock-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.agent-dock-file-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 4px 6px 4px 10px; border-radius: 8px; font-size: 12px; color: #38383d;
  background: rgba(37,99,235,0.08); border: 1px solid rgba(37,99,235,0.20);
}
.agent-dock-file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-dock-file-chip button { color: #8a8a92; font-size: 15px; line-height: 1; padding: 0 2px; cursor: pointer; }
/* 输入盒：包住 textarea + +/发送 行，按钮在盒内（与「简历工坊」一致），边框/聚焦环在盒上 */
.agent-dock-inputbox {
  border: 1px solid rgba(14,14,16,0.14); border-radius: 12px; background: #fff;
  padding: 8px 10px; transition: border-color 140ms ease;
}
.agent-dock-inputbox:focus-within { border-color: #2563eb; }

.agent-dock-textarea {
  display: block; width: 100%; box-sizing: border-box; resize: none;
  min-height: 54px; max-height: 168px;     /* 默认多行 */
  padding: 2px 2px; font-size: 13.5px; line-height: 1.55;
  border: 0; background: transparent; color: #0e0e10; outline: none;
  font-family: inherit;
}
.agent-dock-textarea:disabled { color: #a0a0a8; }
/* 底部操作行：+ ... Runtime ... 发送 */
.agent-dock-input-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; position: relative; }
.agent-dock-input-spacer { flex: 1 1 auto; }
.agent-dock-plus { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; color: #5a5a62; border: 1px solid rgba(14,14,16,0.12); background: #fff; transition: color 140ms ease, border-color 140ms ease; }
.agent-dock-plus:hover { color: #2563eb; border-color: #2563eb; }
.agent-dock-plus input { display: none; }
button.agent-dock-plus { padding: 0; font: inherit; }
/* 简历模式开关 pill */
.agent-dock-resume-toggle {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px;
  border-radius: 9px; cursor: pointer; font: inherit; font-size: 12.5px; color: #5a5a62;
  border: 1px solid rgba(14,14,16,0.12); background: #fff; transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}
.agent-dock-resume-toggle:hover { color: #2563eb; border-color: #2563eb; }
.agent-dock-resume-toggle.is-on { background: #2563eb; border-color: #2563eb; color: #fff; }
html.dark .agent-dock-resume-toggle { background: #192438; border-color: rgba(255,255,255,0.14); color: #c4c4cd; }
html.dark .agent-dock-resume-toggle.is-on { background: #2563eb; border-color: #2563eb; color: #fff; }
.agent-dock-file-chip svg { flex: 0 0 auto; opacity: .75; }
.agent-dock-link-chip { background: rgba(37,99,235,0.06); }
/* 链接输入弹层：浮在输入栏上方 */
.agent-link-pop {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 30;
  display: flex; align-items: center; gap: 6px; width: min(340px, 82vw);
  padding: 6px; border-radius: 11px; background: #fff;
  border: 1px solid rgba(14,14,16,0.14); box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}
.agent-link-input {
  flex: 1 1 auto; min-width: 0; font-size: 13px; padding: 7px 9px;
  border: 1px solid rgba(14,14,16,0.16); border-radius: 8px; outline: none; background: #fff; color: #1a1a1d;
}
.agent-link-input:focus { border-color: #2563eb; }
.agent-link-add {
  flex: 0 0 auto; font-size: 13px; padding: 7px 13px; border-radius: 8px;
  background: #2563eb; color: #fff; cursor: pointer; border: none;
}
.agent-link-add:hover { background: #1d4ed8; }
html.dark .agent-link-pop { background: #192438; border-color: rgba(255,255,255,0.14); }
html.dark .agent-link-input { background: #0f1729; border-color: rgba(255,255,255,0.16); color: #e6e6ec; }
.agent-dock-send { flex: 0 0 auto; height: 30px; padding: 0 14px; border: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; background: #2563eb; color: #fff; font: inherit; font-size: 12.5px; font-weight: 500; transition: background 140ms ease; }
.agent-dock-send:not(:disabled):hover { background: #1d4ed8; }
.agent-dock-send:disabled { background: #a9c2f0; cursor: not-allowed; }
.agent-dock-send.agent-dock-cancel { background: #fff; color: #b42318; border: 1px solid rgba(180,35,24,0.26); }
.agent-dock-send.agent-dock-cancel:not(:disabled):hover { background: rgba(180,35,24,0.07); }
.agent-dock-send.agent-dock-cancel:disabled { background: #f3f3f5; color: #a0a0a8; border-color: rgba(14,14,16,0.10); }

/* Runtime 选择器（位于底部操作行内） */
.agent-dock-runtime-trigger {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 9px;
  font-size: 12px; color: #38383d; cursor: pointer;
  border: 1px solid rgba(14,14,16,0.12); background: rgba(255,255,255,0.7);
}
.agent-dock-runtime-trigger:disabled { color: #a0a0a8; cursor: not-allowed; }
.agent-dock-runtime-trigger .settings-runtime-led {
  width: 7px; height: 7px; border-radius: 50%; background: #c7c7cf; flex: 0 0 auto;
}
.agent-dock-runtime-trigger .settings-runtime-led.is-on { background: #22c55e; }
.agent-dock-runtime-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; min-width: 150px; z-index: 6;
  background: #fff; border: 1px solid rgba(14,14,16,0.10); border-radius: 11px; padding: 5px;
  box-shadow: 0 16px 34px -18px rgba(14,14,16,0.34);
}
.agent-dock-runtime-empty { padding: 9px 11px; font-size: 12px; color: #94949c; }
.agent-dock-runtime-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 8px;
  font-size: 13px; color: #1a1a1d; cursor: pointer; text-align: left;
}
.agent-dock-runtime-opt:hover { background: rgba(14,14,16,0.05); }
.agent-dock-runtime-opt.is-active { background: rgba(37,99,235,0.10); color: #1d4ed8; }
.agent-dock-runtime-opt .settings-runtime-led { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex: 0 0 auto; }

/* 设置面板里的「启用」开关 */
.agent-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.agent-switch input { display: none; }
.agent-switch-track { flex: 0 0 auto; width: 42px; height: 24px; border-radius: 999px; background: rgba(14,14,16,0.18); position: relative; transition: background 180ms ease; }
.agent-switch-thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 180ms ease; }
.agent-switch input:checked + .agent-switch-track { background: #2563eb; }
.agent-switch input:checked + .agent-switch-track .agent-switch-thumb { transform: translateX(18px); }
.agent-switch-text { font-size: 12.5px; color: #5a5a62; }

/* —— Dark 主题 —— */
html.dark .agent-dock { background: rgba(18,26,44,0.88); border-left-color: rgba(255,255,255,0.10); }
html.dark .agent-dock.is-left { border-right-color: rgba(255,255,255,0.10); }
html.dark .agent-dock-fab { background: rgba(25,36,56,0.92); border-color: rgba(255,255,255,0.12); color: #93c5fd; }
html.dark .agent-dock-fab:hover { background: #1d2940; }
html.dark .agent-dock-head { border-bottom-color: rgba(255,255,255,0.10); }
html.dark .agent-dock-title { color: #f5f5f7; }
html.dark .agent-dock-icon-btn { color: #b4b4bd; }
html.dark .agent-dock-icon-btn:hover { background: rgba(255,255,255,0.07); color: #f5f5f7; }
html.dark .agent-dock-sessions { background: #192438; border-bottom-color: rgba(255,255,255,0.10); }
html.dark .agent-dock-session-item { color: #e6e6ec; }
html.dark .agent-dock-session-row:hover { background: rgba(255,255,255,0.06); }
html.dark .agent-dock-session-row.is-active { background: rgba(37,99,235,0.18); }
html.dark .agent-dock-session-row.is-active .agent-dock-session-item { color: #93c5fd; }
html.dark .agent-msg-user .agent-bubble,
html.dark .agent-msg-assistant .agent-bubble { background: #192438; border-color: rgba(255,255,255,0.10); color: #e6e6ec; }
html.dark .agent-bubble code { background: rgba(255,255,255,0.10); }
html.dark .agent-bubble .agent-md-table th,
html.dark .agent-bubble .agent-md-table td { border-color: rgba(255,255,255,0.14); }
html.dark .agent-bubble .agent-md-table th { background: rgba(255,255,255,0.06); }
html.dark .agent-bubble .agent-md-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.03); }
html.dark .agent-cards .job-card-fit { color: #93c5fd; background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.22); }
html.dark .agent-guides .guide-card { background: #192438; border-color: rgba(255,255,255,0.10); }
html.dark .agent-guides .guide-card-head {
  background:
    radial-gradient(ellipse 80% 110% at 22% 0%, rgba(255,255,255,0.08), transparent 64%),
    linear-gradient(135deg, rgba(30,64,175,0.28) 0%, rgba(37,99,235,0.20) 100%);
}
html.dark .agent-guides .guide-card-title { color: #e6e6ec; }
html.dark .agent-guides .guide-card-summary { color: #a8a8b3; border-left-color: rgba(147,197,253,0.75); }
html.dark .agent-guides .guide-card-company { color: #d7d7df; }
html.dark .agent-guides .guide-card-source { background: rgba(255,255,255,0.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); color: #d7d7df; }
html.dark .agent-guides .guide-card-date,
html.dark .agent-guides .guide-card-arrow { color: rgba(230,230,236,0.62); }
html.dark .agent-msg-time { color: #74747e; }
html.dark .agent-think-head, html.dark .agent-step { color: #9a9aa3; }
html.dark .agent-step.is-running .agent-step-label { color: #e6e6ec; }
html.dark .agent-steps-toggle { color: #74747e; }
html.dark .agent-news-card { background: #192438; border-color: rgba(255,255,255,0.10); }
html.dark .agent-news-title { color: #e6e6ec; }
html.dark .agent-news-summary { color: #a8a8b3; }
html.dark .agent-news-meta { color: #74747e; }
html.dark .agent-news-cat { background: rgba(96,165,250,0.16); color: #93c5fd; }
html.dark .agent-dock-welcome-title, html.dark .agent-dock-blocker-title { color: #f5f5f7; }
html.dark .agent-dock-chip { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); color: #c4c4cd; }
html.dark .agent-dock-chip:hover { background: rgba(255,255,255,0.08); color: #93c5fd; border-color: #2563eb; }
html.dark .agent-dock-input { border-top-color: rgba(255,255,255,0.10); }
html.dark .agent-dock-plus { background: #192438; border-color: rgba(255,255,255,0.14); color: #c4c4cd; }
html.dark .agent-dock-inputbox { background: #192438; border-color: rgba(255,255,255,0.14); }
html.dark .agent-dock-textarea { background: transparent; color: #f5f5f7; }
html.dark .agent-dock-send.agent-dock-cancel { background: rgba(248,113,113,0.10); color: #fca5a5; border-color: rgba(248,113,113,0.24); }
html.dark .agent-dock-send.agent-dock-cancel:not(:disabled):hover { background: rgba(248,113,113,0.16); }
html.dark .agent-dock-send.agent-dock-cancel:disabled { background: rgba(255,255,255,0.06); color: #74747e; border-color: rgba(255,255,255,0.10); }
html.dark .agent-dock-runtime-trigger { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.14); color: #c4c4cd; }
html.dark .agent-dock-runtime-menu { background: #192438; border-color: rgba(255,255,255,0.12); }
html.dark .agent-dock-runtime-opt { color: #e6e6ec; }
html.dark .agent-dock-runtime-opt:hover { background: rgba(255,255,255,0.06); }
html.dark .agent-switch-track { background: rgba(255,255,255,0.18); }
html.dark .agent-switch-text { color: #9a9aa2; }

/* —— 窄屏：不压缩主体，对话栏全屏覆盖 —— */
@media (max-width: 900px) {
  #app-root.dock-open { padding-right: 0 !important; }
  .agent-dock { width: 100vw !important; }
  .agent-dock-resize { display: none; }
}
