/* 助手的会话画布与业务页小窗共享输入框、历史列表和消息。 */
#assistant { position:relative; isolation:isolate; min-width:0; min-height:0; border-top:0; background:#fff; }
#assistant.rail-hidden { grid-template-columns:0 minmax(0,1fr); }
#assistant .pane,#assistant .message-scroll,#assistant .conversation-head,#assistant .dock { background:#fff; }
#assistant .conversation-head {
  min-height:58px; flex:0 0 auto; grid-template-columns:44px minmax(0,1fr) auto;
  gap:6px; padding:0 12px 0 8px; border-bottom:1px solid transparent; box-shadow:none;
}
.au-title-mark { width:30px; height:32px; display:grid; place-items:center; color:#575963; }
.au-title-mark svg { width:19px; height:19px; stroke-width:1.65; }
#assistant .conversation-title,#assistant #new-conv-2 { visibility:visible; }
#assistant .conversation-title { color:#20222b; font-weight:600; font-size:16px; letter-spacing:0; }
.au-actions { display:flex; align-items:center; gap:2px; }
.au-actions .icon-round { width:38px; height:38px; color:#555761; }
.au-actions .icon-round svg { width:19px; height:19px; stroke-width:1.65; }
.au-actions .icon-round[aria-expanded=true] { background:#f0f2f4; color:#242631; }
.au-quick-action { display:none; }
#assistant .welcome { justify-content:center; text-align:center; padding:42px 24px calc(54px + 7vh); }
#assistant .welcome-inner { width:min(100%,668px); }
#assistant .assistant-brand img { width:72px; height:72px; object-fit:contain; margin:0 auto 18px; }
#assistant .welcome h2 { color:#20212a; font-size:clamp(28px,2.5vw,34px); font-weight:600; letter-spacing:.01em; line-height:1.35; }
#assistant .welcome-slot { margin-top:30px; }
#assistant .composer { border:1px solid #d9dbe0; border-radius:20px; box-shadow:0 12px 32px -16px rgba(20,21,28,.18),0 1px 2px rgba(20,21,28,.04); }
#assistant .composer:focus-within { border-color:#c5c7ce; box-shadow:0 0 0 3px #f1f1f2,0 14px 34px -16px rgba(20,21,28,.22); }
#assistant .composer textarea { padding:22px 26px 8px; min-height:64px; font-size:15px; color:#242635; }
#assistant #dock-slot .composer textarea { min-height:74px; }
#assistant .composer-bar { min-height:56px; justify-content:space-between; padding:0 16px 14px 18px; }
#assistant .round-btn,#assistant .send-btn { border-radius:50%; }
#assistant #mic:not(.recording) { color:#4e515c; border-color:transparent; }
#assistant #au-insert { width:36px; height:36px; color:#464954; border-color:#dfe1e6; }
#assistant .send-btn:disabled { background:#f1f1f3; color:#898b93; }
#assistant .starters { margin-top:16px; gap:7px; }
#assistant .starter { min-height:32px; padding:0 12px; font-size:13px; font-weight:400; color:#575c68; border-color:#e6e7eb; }
#assistant .starter svg { width:14px; height:14px; color:#717885; }
#assistant .dock { padding:12px 25px 24px; border:0; }
#assistant .composer-slot { width:min(100%,720px); }
#assistant .message-article { width:min(calc(100% - 36px),768px); padding:46px 22px 54px; margin-inline:auto; }
#assistant .md { color:#292c35; font-size:15px; line-height:1.8; }
#assistant .msg-meta { color:#9b9da5; }
#assistant .rail { background:#fafafb; border-right:1px solid #ececef; }
#assistant .rail-head { padding:0 9px 0 16px; min-height:58px; }
#assistant .new-conversation { border-radius:9px; }
#assistant .history-item { border-radius:8px; }
.au-tool-menu {
  position:absolute; z-index:10; width:194px; padding:5px; border:1px solid #e3e5e9; border-radius:12px; background:white;
  box-shadow:0 9px 30px -8px rgba(20,28,40,.21);
}
.au-tool-menu button { display:flex; align-items:center; gap:11px; width:100%; min-height:38px; padding:0 11px; border:0; border-radius:7px; background:white; color:#343843; text-align:left; font-size:14px; }
.au-tool-menu button:hover,.au-tool-menu button:focus-visible { background:#f3f5f7; }
.au-tool-menu svg { width:17px; height:17px; }
.au-launch {
  position:fixed; right:22px; bottom:20px; z-index:21; display:grid; place-items:center; width:56px; height:56px;
  padding:0; border:1px solid #e5e7ec; border-radius:18px; background:white; box-shadow:0 12px 30px -12px #20242d42,0 2px 6px #20242d12;
  transition:transform .2s,box-shadow .2s;
}
.au-launch img { width:46px; height:46px; display:block; }
.au-launch:hover { transform:translateY(-2px); box-shadow:0 12px 30px -8px #20242d42; }
.au-launch[aria-expanded=true],.shell:has(.drawer.open) .au-launch { display:none; }
.au-quick-mask { position:fixed; inset:0; z-index:22; padding:0; border:0; background:rgba(27,30,38,.18); backdrop-filter:blur(1px); cursor:default; }
#assistant.au-quick {
  position:fixed; right:16px; bottom:16px; z-index:23; width:min(438px,calc(100vw - 32px)); height:min(742px,calc(100dvh - 72px));
  display:grid; grid-template-columns:0 minmax(0,1fr); overflow:hidden; border:1px solid #ececef; border-radius:20px;
  box-shadow:0 32px 72px -24px rgba(20,21,28,.38),0 4px 14px rgba(20,21,28,.06); animation:au-appear .2s cubic-bezier(.22,1,.36,1); transition:none;
}
@keyframes au-appear { from { opacity:0; transform:translateY(12px) scale(.985); } }
#assistant.au-quick .pane { grid-column:2; grid-row:1; }
#assistant.au-quick .au-quick-action { display:grid; }
#assistant.au-quick .conversation-head { padding:0 8px 0 12px; grid-template-columns:20px minmax(0,1fr) auto; gap:4px; min-height:60px; border-bottom:1px solid #f0f0f2; }
#assistant.au-quick .au-title-mark { width:20px; }
#assistant.au-quick .au-actions { gap:0; }
#assistant.au-quick .au-actions button { width:31px; height:31px; }
#assistant.au-quick .conversation-title { font-size:14px; }
#assistant.au-quick .welcome { padding:24px 15px 32px; }
#assistant.au-quick .assistant-brand img { width:55px; height:55px; margin-bottom:10px; }
#assistant.au-quick .welcome h2 { font-size:23px; }
#assistant.au-quick .welcome-slot { margin-top:20px; }
#assistant.au-quick .starters { gap:6px; margin-top:12px; }
#assistant.au-quick .starter { padding:0 8px; font-size:12px; }
#assistant.au-quick .message-article { padding:14px 15px; }
#assistant.au-quick .dock { padding:8px 12px 13px; }
#assistant.au-quick .composer textarea { min-height:48px; padding:11px 13px 4px; }
#assistant.au-quick .composer-bar { padding:4px 8px 8px 10px; }
#assistant.au-quick .rail {
  position:absolute; top:0; bottom:0; left:0; z-index:8; width:248px; transform:translateX(-102%); visibility:hidden; opacity:0;
  border-right:1px solid #e4e6ea; transition:transform .25s,opacity .2s; box-shadow:12px 0 30px -14px #20242d40;
}
#assistant.au-quick.au-show-history .rail { transform:none; visibility:visible; opacity:1; }
@media(max-width:959px) {
  #assistant:not(.au-quick) { grid-template-columns:minmax(0,1fr); }
  #assistant:not(.au-quick) .pane { grid-column:1; }
  #assistant:not(.au-quick) .rail { position:absolute; top:0; left:0; bottom:0; z-index:8; visibility:hidden; opacity:0; }
  #assistant:not(.au-quick).au-show-history .rail { transform:none; visibility:visible; opacity:1; }
}
@media(max-width:600px) {
  #assistant .conversation-head { padding-inline:8px; }
  #assistant .welcome { padding-inline:15px; }
  #assistant .dock { padding-inline:12px; }
  #assistant.au-quick { right:8px; bottom:8px; width:calc(100vw - 16px); }
  .au-launch { right:12px; bottom:12px; }
}
@media(prefers-reduced-motion: reduce) { #assistant,.au-launch,#assistant.au-quick,#assistant.au-quick .rail { animation:none; transition:none; } }

/* AgentWorkbenchView.vue：会话栏细线展开、收起和悬停反馈。 */
/* 历史按钮打开后立即固定位置，避免行内删除按钮随栏宽扫过点击点。 */
@media(min-width:960px) { #assistant:not(.au-quick) { transition:none; } }
#assistant:not(.rail-hidden):not(.au-quick) { grid-template-columns:236px minmax(0,1fr); }
#assistant .conversation-head.raised { border-bottom-color:#ececef; box-shadow:0 8px 18px -16px rgba(20,21,28,.28); }
#assistant .au-title-mark { width:40px; height:40px; padding:0; justify-self:center; border:0; border-radius:50%; background:transparent; color:#4a4b51; }
#assistant .au-title-mark:hover,#assistant .au-title-mark[aria-expanded=true] { background:#f1f1f2; }
#assistant .au-title-mark:active { transform:scale(.94); }
#assistant .au-title-mark svg { width:20px; height:20px; }
.rt-panel { fill:currentColor; stroke:none; opacity:0; transform:scaleX(0); transform-box:fill-box; transform-origin:left center; transition:transform .32s var(--ease),opacity .24s ease; }
.rt-divider { transform:translateX(-2.6px); transition:transform .32s var(--ease); }
.au-title-mark[aria-expanded=true] .rt-panel { opacity:.26; transform:scaleX(1); }
.au-title-mark[aria-expanded=true] .rt-divider { transform:none; }
.au-title-mark[aria-expanded=false]:hover .rt-panel { opacity:.16; transform:scaleX(.42); }
.au-title-mark[aria-expanded=false]:hover .rt-divider { transform:translateX(-1.2px); }
#assistant .au-actions .icon-round { width:40px; height:40px; border-radius:50%; }
#assistant .au-actions .icon-round:active { transform:scale(.94); }
#assistant.au-quick .au-actions .icon-round { width:36px; height:36px; }
#assistant .rail { background:white; }
.au-launch { right:20px; bottom:20px; width:56px; height:56px; border:1px solid #ececef; border-radius:18px; box-shadow:0 12px 30px -12px rgba(20,21,28,.3),0 2px 6px rgba(20,21,28,.06); }
.au-launch img { width:50px; height:50px; }
@media(max-width:959px) {
  #assistant:not(.rail-hidden):not(.au-quick) { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:600px) {
  #assistant.au-quick { bottom:0; right:0; width:100%; height:90dvh; max-height:calc(100dvh - 52px); border-radius:20px 20px 0 0; }
  #assistant .message-article { width:100%; padding:18px 16px 22px; }
  #assistant .welcome { padding:24px 12px 36px; }
  #assistant .welcome h2 { font-size:24px; }
  #assistant .assistant-brand img { width:54px; height:54px; margin-bottom:14px; }
}

.answer-evidence:not(:empty) { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 8px; margin:12px 0 4px; font-size:12px; }
.answer-evidence > span { color:#767e8a; margin-right:2px; }
.answer-evidence a { display:inline-block; color:#1a648a; text-decoration:none; padding:3px 9px; background:#ebf7fb; border-radius:5px; overflow-wrap:anywhere; }
.answer-evidence a:hover,.answer-evidence a:focus-visible { background:#d6f1fa; text-decoration:underline; }
.answer-evidence details { color:#657285; }
.answer-evidence details[open] { flex-basis:100%; }
.answer-evidence summary { cursor:pointer; }
.answer-evidence details div { display:flex; flex-wrap:wrap; gap:6px 8px; margin-top:6px; }

.file-icon.file-docx { background: #116d9b; }
.file-icon.file-pptx { background: #b95739; }
.file-icon.file-pdf { background: #b3372f; }

/* 附件：输入框里的待发送条、消息里的缩略图和文件卡 */
.composer-tools { display:flex; align-items:center; gap:8px; }
.composer.dropping { border-color:var(--brand); box-shadow:0 0 0 4px rgb(48 172 216 / 18%); }
.attach-strip { display:flex; flex-wrap:wrap; gap:8px; padding:14px 16px 0; }
.attach-chip { position:relative; display:flex; align-items:center; gap:10px; max-width:240px; min-height:52px; padding:6px 30px 6px 6px; border:1px solid #e3e7ee; border-radius:12px; background:#f7f9fb; }
.attach-chip img { width:40px; height:40px; flex:none; border-radius:8px; object-fit:cover; background:#e9edf2; }
.attach-chip i { display:grid; place-items:center; width:40px; height:40px; flex:none; border-radius:8px; color:var(--blue); background:var(--blue-soft); }
.attach-chip i svg { width:20px; height:20px; }
.attach-chip span { display:grid; min-width:0; line-height:1.35; }
.attach-chip b { overflow:hidden; color:#1d2633; font-size:13px; font-weight:500; text-overflow:ellipsis; white-space:nowrap; }
.attach-chip small { overflow:hidden; color:#8a94a3; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.attach-chip.uploading { opacity:.72; }
.attach-chip.uploading small { color:var(--blue); }
.attach-chip.failed { border-color:#f3c4c0; background:#fdf3f2; }
.attach-chip.failed small { color:#c0392f; }
.attach-chip button { position:absolute; top:4px; right:4px; width:22px; height:22px; padding:0; border:0; border-radius:50%; color:#8a94a3; background:transparent; font-size:16px; line-height:1; }
.attach-chip button:hover { color:#1d2633; background:#e6eaf0; }
.msg-files { display:grid; gap:8px; justify-items:end; max-width:min(84%,560px); margin-bottom:8px; }
/* 助手「找照片」找到的照片：一排缩略图，点开看大图（2026-12-04）。字和别处一样 13px 深色，不用小灰字。 */
.chat-photos { display:grid; gap:12px; margin-top:12px; }
.chat-photo-group > b { display:block; margin-bottom:6px; color:#1d2633; font-size:13px; font-weight:600; }
.chat-photo-row { display:flex; flex-wrap:wrap; gap:10px; }
.chat-photo-row a { display:grid; gap:5px; width:132px; color:#1d2633; text-decoration:none; }
.chat-photo-row img { display:block; width:132px; height:99px; object-fit:cover; border:1px solid #e3e7ee; border-radius:12px; background:#f3f5f8; transition:border-color .16s; }
.chat-photo-row a:hover img { border-color:var(--blue-line); }
.chat-photo-row span { overflow:hidden; font-size:13px; text-align:center; text-overflow:ellipsis; white-space:nowrap; }
.msg-images { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.msg-images a { display:block; overflow:hidden; border:1px solid #e3e7ee; border-radius:14px; background:#f3f5f8; }
.msg-images img { display:block; width:auto; max-width:220px; height:150px; object-fit:cover; }
.msg-images a:only-child img { max-width:min(100%,360px); height:auto; max-height:280px; }
.msg-file { display:flex; align-items:center; gap:11px; max-width:320px; padding:9px 14px 9px 10px; border:1px solid #e3e7ee; border-radius:14px; color:#1d2633; background:#fff; }
.msg-file:hover { border-color:var(--blue-line); background:var(--blue-tint); }
.msg-file > svg { width:34px; height:34px; flex:none; padding:7px; border-radius:10px; color:var(--blue); background:var(--blue-soft); }
.msg-file span { display:grid; min-width:0; line-height:1.4; }
.msg-file b { overflow:hidden; font-size:13px; font-weight:500; text-overflow:ellipsis; white-space:nowrap; }
.msg-file small { color:#8a94a3; font-size:11px; }
.msg-file.failed small { color:#b25e00; }

/* 输入框右下角的上下文用量圈：悬停或聚焦时冒出说明。 */
.ctx-ring { position: relative; width: 30px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: default; }
.ctx-ring svg { width: 20px; height: 20px; transform: rotate(-90deg); fill: none; stroke: none; }
.ctx-ring circle { fill: none; stroke-width: 2.6; }
.ctx-ring .ctx-track { stroke: #dfe3ea; }
.ctx-ring .ctx-used { stroke: #3d7be0; stroke-linecap: round; transition: stroke-dasharray .4s ease; }
.ctx-ring[data-level="high"] .ctx-used { stroke: #e08a1e; }
.ctx-ring[data-level="full"] .ctx-used { stroke: #d9483b; }
.ctx-tip { position: absolute; right: -6px; bottom: calc(100% + 8px); z-index: 30; display: none; min-width: 190px; padding: 10px 14px; border-radius: 12px;
  background: #1f2329; color: #fff; font-size: 13px; line-height: 21px; text-align: center; white-space: nowrap; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); pointer-events: none; }
.ctx-tip b { display: block; font-weight: 500; color: #aeb4bd; }
.ctx-tip span { display: block; }
.ctx-tip small { display: block; margin-top: 4px; font-size: 12px; color: #aeb4bd; }
.ctx-ring:hover .ctx-tip, .ctx-ring:focus-visible .ctx-tip { display: block; }

/* ---------- 几段会话同时答、答完的提醒（2026-12-04） ---------- */
/* 会话栏：正在答的那段末尾一个小圈在转；答完你还没看的，标题前一个点（和定时任务的新结果同一个点，样式在 chat-archive.css）。 */
.history-item.running > span:first-child { padding-right: 18px; }
.history-item.running::after { content: ""; position: absolute; right: 12px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border: 2px solid #cfe7f3; border-top-color: #1274a5; border-radius: 50%; animation: au-spin .9s linear infinite; }
.history-item.running .history-del { display: none !important; }
@keyframes au-spin { to { transform: rotate(360deg); } }
/* 油桶：有答完没看的，右上角一个橙点（不闪）；上面冒一个小气泡，点一下打开那段。 */
.au-launch.has-news::after { content: ""; position: absolute; top: -3px; right: -3px; width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: #ea9838; box-shadow: 0 2px 6px rgba(234, 152, 56, .45); }
.au-news { position: fixed; right: 22px; bottom: 90px; z-index: 21; display: flex; align-items: center; gap: 11px; max-width: min(320px, calc(100vw - 44px));
  padding: 11px 16px 11px 12px; border: 1px solid #e5e7ec; border-radius: 14px; background: #fff; color: #1d2129; font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 14px 34px -12px rgba(20, 28, 40, .28), 0 2px 6px rgba(20, 28, 40, .06); animation: au-news-in .28s ease-out; }
.au-news:hover { border-color: #b9e3f3; transform: translateY(-1px); }
.au-news i { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e4f6fc; color: #1274a5; font-style: normal; font-weight: 700; font-size: 15px; }
.au-news.failed i { background: #fdeeed; color: #b3372c; }
.au-news span { display: grid; gap: 1px; min-width: 0; }
.au-news b { font-size: 14px; font-weight: 600; }
.au-news small { overflow: hidden; color: #1d2129; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.au-news::after { content: ""; position: absolute; right: 24px; bottom: -7px; width: 12px; height: 12px; border-right: 1px solid #e5e7ec; border-bottom: 1px solid #e5e7ec; background: #fff; transform: rotate(45deg); }
@keyframes au-news-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .au-news { right: 12px; bottom: 80px; } }
@media (prefers-reduced-motion: reduce) { .history-item.running::after, .au-news { animation: none; } }
