/* 智能研判 Agent：对话式智能体界面 */
#rightPanel,
#resizeHandler { display: none !important; }
/* 知识库问答：看板切换为「知识库命中报告」视图 */
.ac-kb-list { display: flex; flex-direction: column; gap: 9px; }
.ac-kb-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 10px 12px; cursor: pointer; transition: border-color .18s, box-shadow .18s;
}
.ac-kb-card:hover { border-color: #7dd3fc; box-shadow: 0 3px 12px rgba(2, 132, 199, .08); }
.ac-kb-card .kb-top { display: flex; align-items: center; gap: 7px; }
.ac-kb-card .kb-no {
  flex: none; width: 17px; height: 17px; border-radius: 5px;
  background: #e0f2fe; color: #0369a1; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.ac-kb-card .kb-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-kb-card .sc { flex: none; padding: 1px 7px; border-radius: 99px; background: #eff6ff; color: #1d4ed8; font-size: 10.5px; font-weight: 700; }
.ac-kb-card .kb-meta { margin-top: 4px; font-size: 10.5px; color: #94a3b8; }
.ac-kb-card .kb-sec { margin-top: 3px; font-size: 10.5px; color: #0369a1; }
.ac-kb-card .kb-txt {
  margin-top: 6px; padding: 7px 9px; border-radius: 7px; background: #f8fafc;
  font-size: 11px; line-height: 1.65; color: #475569;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
#risWorkarea { display: flex !important; align-items: stretch; min-height: 0; }
#leftPanel {
  width: auto !important;
  max-width: none !important;
  flex: 1 1 auto !important;
  min-width: 0;
  border-right: none !important;
}
#agentCanvas.hidden { display: none !important; }
#agentCanvas {
  flex: 0 0 430px;
  width: 430px;
  min-width: 330px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f8fafc;
  border-left: 1px solid #e2e8f0;
}
.ac-head { flex: none; padding: 12px 16px 10px; background: #fff; border-bottom: 1px solid #eef2f7; }
.ac-head-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ac-title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: #0f172a; }
.ac-live { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.ac-sub { margin-top: 4px; font-size: 11px; color: #94a3b8; }
.ac-collapse { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e2e8f0; background: #fff; border-radius: 6px; width: 24px; height: 22px; color: #64748b; cursor: pointer; transition: all .18s; }
.ac-collapse:hover { border-color: #7dd3fc; color: #0369a1; background: #f0f9ff; }
.ris-canvas-chev { display: inline-flex !important; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0 !important; color: #64748b; }
.ris-canvas-chev.active { color: #0369a1; background: #eff6ff; border-color: #bfdbfe; }
.ac-body { flex: 1; overflow: auto; padding: 12px 14px 20px; }
.ac-empty { padding: 40px 16px; text-align: center; color: #94a3b8; font-size: 12px; line-height: 1.8; }
.ac-empty .ico { font-size: 34px; margin-bottom: 8px; }
.ac-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 11px; padding: 11px 12px; margin-bottom: 10px; }
@keyframes acIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ac-card-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ac-card-title { font-size: 12px; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 5px; }
.ac-card-sub { font-size: 10.5px; color: #94a3b8; }
.ac-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 10px; }
.ac-kpi { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 9px; text-align: center; }
.ac-kpi .v { font-size: 20px; font-weight: 800; color: #0284c7; line-height: 1.2; }
.ac-kpi .k { margin-top: 2px; font-size: 10.5px; color: #64748b; }
.ac-kpi:nth-child(2) .v { color: #7c3aed; }
.ac-kpi:nth-child(3) .v { color: #16a34a; }
.ac-bars { display: flex; flex-direction: column; gap: 7px; }
.ac-bar-row { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: #475569; }
.ac-bar-row .l { width: 58px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-track { flex: 1; height: 7px; border-radius: 4px; background: #eef2f7; overflow: hidden; }
.ac-fill { height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg,#38bdf8,#0284c7); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.ac-fill.top { background: linear-gradient(90deg,#fb923c,#dc2626); }
.ac-bar-row .v { flex: none; min-width: 74px; text-align: right; font-weight: 600; color: #0f172a; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ac-list { display: flex; flex-direction: column; gap: 6px; }
.ac-item { display: flex; align-items: flex-start; gap: 7px; padding: 7px 8px; border-radius: 8px; background: #f8fafc; font-size: 11.5px; line-height: 1.55; color: #334155; }
.ac-item .rank { width: 16px; height: 16px; border-radius: 4px; background: #e0f2fe; color: #0369a1; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; }
.ac-item .tx { flex: 1; min-width: 0; }
.ac-item .tag { flex: none; font-size: 9.5px; padding: 1px 5px; border-radius: 4px; background: #fee2e2; color: #b91c1c; }
.ac-item .tag.amber { background: #fef3c7; color: #b45309; }
.ac-item .tag.green { background: #dcfce7; color: #15803d; }
.ac-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ac-btn { padding: 5px 10px; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; color: #475569; font-size: 10.5px; cursor: pointer; font-family: inherit; }
.ac-btn:hover { border-color: #0284c7; color: #0369a1; background: #f0f9ff; }
.ac-btn.primary { background: #0284c7; border-color: #0284c7; color: #fff; }
.ac-mini-report { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 10px; box-shadow: 0 2px 10px rgba(15,23,42,.05); }
.ac-mini-report .rm-title { text-align: center; font-family: "SimSun", serif; font-size: 16px; font-weight: 700; color: #c00; letter-spacing: 2px; }
.ac-mini-report .rm-sub { text-align: center; font-size: 9px; color: #64748b; margin-top: 4px; }
.ac-mini-report .rm-line { height: 5px; background: #eef2f7; border-radius: 3px; margin: 7px 0; }
.ac-mini-report .rm-line.s { width: 72%; }
.ac-mini-report .rm-line.m { width: 88%; }
.ac-mini-report .rm-sec { font-size: 10px; font-weight: 700; color: #0f172a; margin-top: 8px; }
.ac-mini-report .rm-p { height: 4px; background: #f1f5f9; border-radius: 2px; margin: 5px 0; }
.ac-mini-report .rm-p.s { width: 84%; }
.ac-progress { height: 5px; border-radius: 4px; background: #e0f2fe; overflow: hidden; margin-top: 8px; }
.ac-progress .bar { height: 100%; width: 0; background: #0284c7; border-radius: 4px; transition: width .35s; }
@media (max-width: 1100px) {
html:not([data-fit]) #agentCanvas { flex-basis: 360px; width: 360px; }
}
@media (max-width: 820px) {
html:not([data-fit]) #agentCanvas { display: none; }
}
#leftPanel .ris-chat-history { padding-left: 28px; padding-right: 28px; }
#leftPanel:not(.is-empty) .ris-input-area { max-width: none; width: 100%; }

/* 研判工作区：收起后右上角浮动展开入口 */
#risWorkarea { position: relative; }

.ris-clear-btn.active { color: #0369a1; background: #eff6ff; border-color: #bfdbfe; }
.aa-canvas-hint { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 8px; padding: 9px 11px; border: 1px solid #dbeafe; background: linear-gradient(90deg,#f0f9ff,#fff); border-radius: 9px; font-size: 12px; line-height: 1.65; color: #475569; }
.aa-canvas-hint .ico { flex: none; }
.aa-canvas-hint b { color: #0369a1; }
.aa-canvas-hint.success { border-color: #bbf7d0; background: linear-gradient(90deg,#f0fdf4,#fff); }
.aa-canvas-hint.success b { color: #15803d; }
/* ===== 欢迎区整体视觉 ===== */
.ris-left-panel.is-empty .ris-chat-history {
  background:
    radial-gradient(560px 260px at 28% 12%, rgba(2,132,199,.07), transparent 68%),
    radial-gradient(520px 260px at 74% 30%, rgba(99,102,241,.06), transparent 70%);
}
.ris-welcome { position: relative; }
/* 欢迎区首行即在线状态徽章（标题与描述已收敛到顶部 header） */
.ris-welcome > .aa-hero-badge:first-child { margin-top: 0; }
.aa-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  border: 1px solid #dbeafe;
  box-shadow: 0 1px 4px rgba(2,132,199,.07);
  color: #0369a1;
  font-size: 12px;
  font-weight: 500;
}
.aa-hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.15); animation: aaDotBreath 2.2s ease-in-out infinite; }
@keyframes aaDotBreath { 0%,100% { box-shadow: 0 0 0 3px rgba(34,197,94,.15); } 50% { box-shadow: 0 0 0 5px rgba(34,197,94,.08); } }
.aa-caps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}
.aa-cap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4.5px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  border: 1px solid #e6edf6;
  color: #475569;
  font-size: 11.5px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}

/* 欢迎区分区标题（常用研判场景 / 今日热门事件 同款） */
.ris-preset-title, .aa-hot-hd {
  display: flex; align-items: center; gap: 8px;
  width: min(720px, 86vw); margin: 26px auto 11px;
  font-size: 13px; font-weight: 700; color: #334155;
  text-align: left; letter-spacing: .02em;
}
.ris-preset-title::before, .aa-hot-hd::before {
  content: ''; flex: none; width: 4px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, #0284c7, #6366f1);
}

/* 常用研判场景：图标块 + 标题/描述两行 */
.ris-preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; width: min(720px, 86vw); margin: 0 auto; text-align: left; }
.ris-preset-card {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto;
  column-gap: 10px; row-gap: 2px; align-items: center;
  padding: 11px 12px; text-align: left;
  background: rgba(255,255,255,.86);
  border: 1px solid #e6edf6; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
  cursor: pointer; font-family: inherit;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ris-preset-card:hover { border-color: #7dd3fc; box-shadow: 0 8px 20px rgba(2,132,199,.12); transform: translateY(-2px); }
.ris-preset-card:active { transform: translateY(0); }
.ris-preset-ico {
  grid-row: 1 / span 2;
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1.1;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  border: 1px solid #e0eaff;
  transition: transform .2s;
}
.ris-preset-card:hover .ris-preset-ico { transform: scale(1.08); }
.ris-preset-t { font-size: 13px; font-weight: 700; color: #0f172a; }
.ris-preset-d { font-size: 11px; line-height: 1.45; color: #64748b; }

/* 欢迎区入场动画（交错） */
.ris-left-panel.is-empty .ris-welcome > * { animation: aaWelIn .5s cubic-bezier(.2,.8,.2,1) both; }
.ris-left-panel.is-empty .ris-welcome > *:nth-child(1) { animation-delay: .02s; }
.ris-left-panel.is-empty .ris-welcome > *:nth-child(2) { animation-delay: .07s; }
.ris-left-panel.is-empty .ris-welcome > *:nth-child(3) { animation-delay: .12s; }
.ris-left-panel.is-empty .ris-welcome > *:nth-child(4) { animation-delay: .17s; }
.ris-left-panel.is-empty .ris-welcome > *:nth-child(5) { animation-delay: .22s; }
.ris-left-panel.is-empty .ris-welcome > *:nth-child(6) { animation-delay: .27s; }
.ris-left-panel.is-empty .ris-welcome > *:nth-child(7) { animation-delay: .32s; }
.ris-left-panel.is-empty .ris-welcome > *:nth-child(8) { animation-delay: .37s; }
@keyframes aaWelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ris-preset-card, .aa-hot-card { animation: aaWelIn .45s cubic-bezier(.2,.8,.2,1) both; }
.ris-preset-card:nth-child(1) { animation-delay: .3s; }
.ris-preset-card:nth-child(2) { animation-delay: .34s; }
.ris-preset-card:nth-child(3) { animation-delay: .38s; }
.ris-preset-card:nth-child(4) { animation-delay: .42s; }
.ris-preset-card:nth-child(5) { animation-delay: .46s; }
.ris-preset-card:nth-child(6) { animation-delay: .5s; }
.ris-preset-card:nth-child(7) { animation-delay: .54s; }
.ris-preset-card:nth-child(8) { animation-delay: .58s; }
.ris-preset-card:nth-child(9) { animation-delay: .62s; }
.aa-hot-card:nth-child(1) { animation-delay: .42s; }
.aa-hot-card:nth-child(2) { animation-delay: .46s; }
.aa-hot-card:nth-child(3) { animation-delay: .5s; }
.aa-hot-card:nth-child(4) { animation-delay: .54s; }
.aa-hot-card:nth-child(5) { animation-delay: .58s; }
.aa-hot-card:nth-child(6) { animation-delay: .62s; }

.aa-msg { display: flex; gap: 12px; margin: 18px 0; align-items: flex-start; }
.aa-msg-user { justify-content: flex-end; }
.aa-user-bubble {
  max-width: min(680px, 84%);
  padding: 11px 15px;
  border-radius: 14px 14px 4px 14px;
  background: #0284c7;
  color: #fff;
  font-size: 14px;
  line-height: 1.7;
  box-shadow: 0 4px 14px rgba(2,132,199,.18);
}
.aa-avatar {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0284c7, #6366f1);
  color: #fff; font-size: 12px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(2,132,199,.22);
}
.aa-body { flex: 1; min-width: 0; max-width: 820px; }
.aa-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; color: #0f172a; font-size: 13px; font-weight: 700; }
.aa-meta .aa-mode { padding: 1px 7px; border-radius: 999px; background: rgba(99,102,241,.1); color: #4f46e5; font-size: 10.5px; font-weight: 600; }
.aa-meta .aa-time { color: #94a3b8; font-size: 11px; font-weight: 400; }

.aa-steps { display: flex; flex-direction: column; gap: 7px; margin: 2px 0 10px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }
.aa-steps:empty { display: none; margin: 0; padding: 0; border: none; background: none; }
.aa-step { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: #64748b; line-height: 1.55; }
.aa-step .ic { flex: none; width: 14px; height: 14px; margin-top: 1px; display: flex; align-items: center; justify-content: center; }
.aa-step.running { color: #0369a1; }
.aa-step.done { color: #475569; }
.aa-step.done .ic::after { content: '✓'; color: #22c55e; font-weight: 700; font-size: 12px; }
.aa-step.failed .ic::after { content: '✕'; color: #ef4444; font-weight: 700; font-size: 12px; }
.aa-spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #bae6fd; border-top-color: #0284c7; animation: aaSpin .7s linear infinite; }
@keyframes aaSpin { to { transform: rotate(360deg); } }
.aa-step-text b { color: #0f172a; font-weight: 600; }
.aa-step-text em { font-style: normal; color: #94a3b8; }

.aa-answer { color: #1e293b; font-size: 14px; line-height: 1.85; }
.aa-answer p { margin: 0 0 10px; }
.aa-answer strong { color: #0f172a; }
.aa-streaming::after { content: '▍'; color: #0284c7; animation: aaBlink .9s steps(1) infinite; margin-left: 1px; }
@keyframes aaBlink { 50% { opacity: 0; } }

.aa-rich { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.aa-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.aa-stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; }
.aa-stat .v { font-size: 20px; font-weight: 700; color: #0284c7; line-height: 1.2; }
.aa-stat .k { margin-top: 3px; font-size: 11.5px; color: #64748b; }
.aa-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  padding: 12px 14px;
}
.aa-card-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.aa-card-title { font-size: 13px; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 6px; }
.aa-card-sub { font-size: 11px; color: #94a3b8; }
.aa-findings { display: flex; flex-direction: column; gap: 6px; }
.aa-finding { display: flex; gap: 7px; font-size: 13px; line-height: 1.7; color: #334155; }
.aa-finding .n { flex: none; width: 17px; height: 17px; border-radius: 5px; background: rgba(2,132,199,.1); color: #0369a1; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 2px; }

.aa-bars { display: flex; flex-direction: column; gap: 7px; }
.aa-bar-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #475569; }
.aa-bar-row .lab { width: 82px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aa-bar-track { flex: 1; height: 9px; border-radius: 5px; background: #eef2f7; overflow: hidden; }
.aa-bar-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, #38bdf8, #0284c7); transition: width .7s ease; }
.aa-bar-row .val { width: 38px; text-align: right; flex: none; color: #0f172a; font-weight: 600; }

.aa-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.aa-table th { text-align: left; padding: 6px 8px; color: #64748b; font-weight: 600; background: #f8fafc; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.aa-table td { padding: 6px 8px; border-bottom: 1px solid #f1f5f9; color: #334155; }
.aa-table tr:last-child td { border-bottom: none; }
.aa-pill { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; }
.aa-pill.red { background: rgba(239,68,68,.1); color: #dc2626; }
.aa-pill.amber { background: rgba(245,158,11,.12); color: #d97706; }
.aa-pill.green { background: rgba(34,197,94,.12); color: #16a34a; }
.aa-pill.blue { background: rgba(2,132,199,.1); color: #0369a1; }

.aa-cites { display: flex; flex-direction: column; gap: 6px; }
.aa-cite { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; cursor: pointer; }
.aa-cite:hover { border-color: #7dd3fc; background: #f0f9ff; }
.aa-cite .ic { font-size: 14px; }
.aa-cite .t { flex: 1; font-size: 12px; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aa-cite .m { font-size: 10.5px; color: #94a3b8; flex: none; }

.aa-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.aa-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 7px; border: 1px solid #cbd5e1; background: #fff; color: #334155; font-size: 12px; cursor: pointer; font-family: inherit; }
.aa-btn:hover { border-color: #0284c7; color: #0369a1; background: #f0f9ff; }
.aa-btn.primary { background: #0284c7; border-color: #0284c7; color: #fff; }
.aa-btn.primary:hover { background: #0369a1; }
.aa-followups { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.aa-follow { padding: 5px 10px; border-radius: 999px; border: 1px dashed #cbd5e1; background: #fff; color: #64748b; font-size: 11.5px; cursor: pointer; font-family: inherit; }
.aa-follow:hover { border-color: #0284c7; color: #0369a1; }

.aa-report-card { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid #bae6fd; background: linear-gradient(135deg,#f0f9ff,#fff); border-radius: 11px; }
.aa-report-ico { width: 38px; height: 38px; border-radius: 9px; background: #0284c7; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.aa-report-main { flex: 1; min-width: 0; }
.aa-report-title { font-size: 13px; font-weight: 700; color: #0f172a; }
.aa-report-meta { margin-top: 3px; font-size: 11px; color: #64748b; }
.aa-progress { height: 5px; border-radius: 4px; background: #e0f2fe; overflow: hidden; margin-top: 8px; }
.aa-progress .bar { height: 100%; width: 0; border-radius: 4px; background: #0284c7; transition: width .35s ease; }

.aa-toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 100000; background: rgba(15,23,42,.9); color: #fff; font-size: 12px; padding: 8px 16px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
@media (max-width: 720px) {
html:not([data-fit]) .aa-stats { grid-template-columns: 1fr; }
}

/* Agent 右侧执行轨迹 */
.ac-trace-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 11px; padding: 11px 12px; margin-bottom: 10px; position: relative; overflow: hidden; }
.ac-trace-card::after { display: none; }
.ac-trace-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; z-index: 1; }
.ac-trace-title { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #0f172a; }
.ac-pulse { width: 7px; height: 7px; border-radius: 50%; background: #0284c7; box-shadow: 0 0 0 0 rgba(2,132,199,.35); animation: acPulse 1.4s infinite; }
@keyframes acPulse { 0% { box-shadow: 0 0 0 0 rgba(2,132,199,.35); } 70% { box-shadow: 0 0 0 7px rgba(2,132,199,0); } 100% { box-shadow: 0 0 0 0 rgba(2,132,199,0); } }
.ac-trace-state { font-size: 10px; color: #0369a1; background: #e0f2fe; border-radius: 999px; padding: 2px 7px; }
.ac-trace-state.done { color: #15803d; background: #dcfce7; }
.ac-trace-sub { margin-top: 4px; font-size: 10px; color: #94a3b8; position: relative; z-index: 1; }
.ac-timeline { margin-top: 9px; position: relative; padding-left: 3px; }
.ac-timeline::before { content: ''; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, #38bdf8, #818cf8, #38bdf8); background-size: 100% 160%; animation: acLine 2.2s linear infinite; opacity: .55; }
@keyframes acLine { to { background-position: 0 160%; } }
.ac-tstep { display: flex; gap: 8px; position: relative; z-index: 1; padding: 5px 0; }
.ac-tdot { width: 14px; height: 14px; flex: none; border-radius: 50%; background: #fff; border: 2px solid #bae6fd; display: flex; align-items: center; justify-content: center; margin-left: 2px; }
.ac-tstep.running .ac-tdot { border-color: #0284c7; box-shadow: 0 0 0 3px rgba(2,132,199,.12); }
.ac-tstep.done .ac-tdot { border-color: #22c55e; background: #f0fdf4; }
.ac-tstep.done .ac-tdot::after { content: '✓'; color: #16a34a; font-size: 9px; font-weight: 800; }
.ac-tmain { flex: 1; min-width: 0; }
.ac-tlabel { font-size: 11.5px; color: #334155; font-weight: 600; line-height: 1.4; }
.ac-tstep.running .ac-tlabel { color: #0369a1; }
.ac-tdetail { font-size: 10px; color: #94a3b8; line-height: 1.5; margin-top: 1px; }
.ac-trace-progress { height: 3px; border-radius: 2px; background: #eef2f7; margin-top: 9px; overflow: hidden; }
.ac-trace-bar { height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg,#38bdf8,#6366f1,#38bdf8); background-size: 200% 100%; animation: acBarFlow 1.4s linear infinite; transition: width .3s; }
@keyframes acBarFlow { to { background-position: -200% 0; } }
.ac-skeleton { background: #fff; border: 1px solid #e2e8f0; border-radius: 11px; padding: 14px; overflow: hidden; position: relative; }
.ac-skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); transform: translateX(-100%); animation: acShimmer 1.4s infinite; }
@keyframes acShimmer { to { transform: translateX(100%); } }
.ac-skeleton-hd { height: 16px; width: 38%; background: #eef2f7; border-radius: 5px; margin-bottom: 12px; }
.ac-skeleton-line { height: 9px; background: #eef2f7; border-radius: 5px; margin: 8px 0; }
.ac-skeleton-line.s { width: 62%; }
.ac-skeleton-line.m { width: 84%; }
.ac-skeleton-note { font-size: 10.5px; color: #94a3b8; margin-top: 10px; }

/* Agent 报告预览 */
.ac-doc-page { background: #fff; border: 1px solid #e2e8f0; border-radius: 4px; padding: 18px 18px 22px; box-shadow: 0 2px 10px rgba(15,23,42,.06); font-family: "FangSong","仿宋",serif; color: #1e293b; }
.ac-doc-flag { text-align: center; font-size: 10px; color: #b91c1c; font-weight: 700; letter-spacing: 2px; }
.ac-doc-title { text-align: center; font-family: "SimSun",serif; font-size: 22px; color: #c00; font-weight: 700; letter-spacing: 2px; margin: 8px 0 4px; }
.ac-doc-sub { text-align: center; font-size: 10.5px; color: #475569; }
.ac-doc-meta { text-align: center; font-size: 9.5px; color: #94a3b8; margin: 5px 0 12px; }
.ac-doc-sec { font-family: "SimHei","黑体"; font-size: 11px; font-weight: 700; margin-top: 11px; color: #0f172a; }
.ac-doc-page p { font-size: 10.5px; line-height: 1.8; margin: 5px 0; color: #334155; }
.ac-doc-table { width: 100%; border-collapse: collapse; font-size: 9px; margin: 5px 0; }
.ac-doc-table th, .ac-doc-table td { border: 1px solid #cbd5e1; padding: 3px 4px; text-align: left; }
.ac-doc-table th { background: #f1f5f9; }
.ac-doc-sign { text-align: right; font-size: 10px; color: #475569; line-height: 1.7; margin-top: 14px; }

/* Agent 报告预览弹窗（复用 ris-docmodal 外壳，版式对齐 AI 报告历史列表预览） */
/* Agent 报告：复用 AI 报告页 arx-page A4 版式（样式由 ai-report-beijing.js 注入） */
/* 画布内缩小展示，预览弹窗内原始 794px 全尺寸 */
.ac-arx-zoom { zoom: .46; }
#agentCanvas .arx-wrap { border-radius: 8px; }
/* 画布内报告固定高度，内部滚动，不撑长整卡 */
.ac-rpt-view { height: 360px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; background: #e6ebf2; }
.ac-rpt-view .arx-wrap { padding: 16px 0 20px; gap: 16px; }
/* 预览弹窗：关闭按钮靠右 */
.ac-preview-mask .ris-docmodal-close { margin-left: auto; }
.ac-preview-mask .ris-docmodal-body { background: #e6ebf2; padding: 18px; }
.ac-preview-mask .ris-docmodal { width: min(920px, 94vw); }

/* ===== 平台操作：工具标签 / 确认卡 / 成功卡 / 研判建议 ===== */
.aa-tool {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 5px;
  background: rgba(99,102,241,.09);
  color: #4f46e5;
  font-size: 10px;
  font-family: ui-monospace, Consolas, monospace;
  line-height: 17px;
  vertical-align: 1px;
}
.aa-confirm, .aa-success {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  padding: 12px 14px;
}
.aa-confirm { border-color: #bfdbfe; background: linear-gradient(180deg,#f8fbff,#fff); }
.aa-success { border-color: #bbf7d0; background: linear-gradient(180deg,#f4fdf8,#fff); }
.aa-confirm-hd, .aa-success-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; font-weight: 700; color: #0f172a; margin-bottom: 9px;
}
.aa-confirm-hd span { font-size: 10.5px; font-weight: 400; color: #94a3b8; }
.aa-success-hd { color: #15803d; }
.aa-confirm-rows { display: flex; flex-direction: column; }
.aa-confirm-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 6px 0; border-bottom: 1px dashed #eef2f7;
  font-size: 12.5px; line-height: 1.6;
}
.aa-confirm-row:last-child { border-bottom: none; }
.aa-confirm-row span { width: 78px; flex: none; color: #94a3b8; }
.aa-confirm-row b { flex: 1; min-width: 0; color: #1e293b; font-weight: 600; }
.aa-confirm-note {
  margin-top: 8px; padding: 7px 9px; border-radius: 7px;
  background: #f8fafc; border: 1px solid #eef2f7;
  font-size: 11px; color: #64748b; line-height: 1.6;
}
.aa-advice { display: flex; gap: 8px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed #eef2f7; }
.aa-advice:last-child { border-bottom: none; }
.aa-advice .tx { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.7; color: #334155; }
.aa-advice-tag {
  flex: none; margin-top: 1px; padding: 1px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; white-space: nowrap;
}
.aa-advice-tag.blue { background: rgba(2,132,199,.1); color: #0369a1; }
.aa-advice-tag.red { background: rgba(239,68,68,.1); color: #dc2626; }
.aa-advice-tag.green { background: rgba(34,197,94,.12); color: #16a34a; }

/* ===== 欢迎区：今日热门事件（位于常用研判场景下方） ===== */
.aa-hot-block { width: min(720px, 86vw); margin: 0 auto 6px; text-align: left; }
.aa-hot-hd { margin: 26px auto 11px; }
.aa-hot-hd b { font-size: 13px; }
.aa-hot-hd .live { display: inline-flex; align-items: center; gap: 4px; padding: 1.5px 8px; border-radius: 999px; background: rgba(239,68,68,.08); color: #dc2626; font-size: 10px; font-weight: 600; }
.aa-hot-hd .live i { width: 5px; height: 5px; border-radius: 50%; background: #ef4444; animation: aaHotPulse 1.4s ease-in-out infinite; }
.aa-hot-hd .tip { margin-left: auto; font-size: 10.5px; color: #94a3b8; font-weight: 400; }
@keyframes aaHotPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
.aa-hot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.aa-hot-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 10px; text-align: left;
  border: 1px solid #e6edf6; border-radius: 12px; padding: 11px 26px 11px 12px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
  cursor: pointer; font-family: inherit; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.aa-hot-card::after {
  content: '›'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 15px; color: #cbd5e1; opacity: 0; transition: all .2s;
}
.aa-hot-card:hover { transform: translateY(-2px); border-color: #93c5fd; box-shadow: 0 8px 20px rgba(2,132,199,.13); }
.aa-hot-card:hover::after { opacity: 1; color: #0284c7; right: 8px; }
.aa-hot-card:active { transform: translateY(0); }
.aa-hot-card .rk {
  flex: none; width: 23px; height: 23px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
}
.aa-hot-card .rk.r1 { background: linear-gradient(135deg, #ef4444, #f97316); box-shadow: 0 3px 8px rgba(239,68,68,.3); }
.aa-hot-card .rk.r2 { background: linear-gradient(135deg, #f97316, #fbbf24); box-shadow: 0 3px 8px rgba(249,115,22,.25); }
.aa-hot-card .rk.r3 { background: linear-gradient(135deg, #f59e0b, #fde047); box-shadow: 0 3px 8px rgba(245,158,11,.22); }
.aa-hot-card .rk.rn { background: #e2e8f0; color: #64748b; }
.aa-hot-card .mn { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.aa-hot-card .nm { font-size: 12.5px; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aa-hot-card .mt { display: flex; align-items: center; gap: 6px; }
.aa-hot-card .hv { font-size: 10.5px; color: #64748b; }
.aa-hot-card .tr { font-size: 10.5px; font-weight: 600; }
.aa-hot-card .tr.up { color: #dc2626; }
.aa-hot-card .tr.flat { color: #94a3b8; }
@media (max-width: 900px) {
html:not([data-fit]) .ris-preset-grid, html:not([data-fit]) .aa-hot-grid { grid-template-columns: repeat(2, minmax(0,1fr)); width: min(520px, 92vw); }
html:not([data-fit]) .ris-preset-title, html:not([data-fit]) .aa-hot-hd, html:not([data-fit]) .aa-hot-block { width: min(520px, 92vw); }
}

/* ===== 工作区：模块交错入场 ===== */
.ac-mod { animation: acModIn .55s cubic-bezier(.2,.8,.2,1) both; }
@keyframes acModIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* KPI 涨跌 */
.ac-kpi { position: relative; overflow: hidden; }
.ac-kpi::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg,#38bdf8,#7c3aed); opacity: .55; }
.ac-kpi-delta { margin-top: 3px; font-size: 9.5px; font-weight: 700; }
.ac-kpi-delta.up { color: #dc2626; }
.ac-kpi-delta.down { color: #16a34a; }

/* 趋势曲线 */
.ac-trend { width: 100%; height: auto; display: block; }
.ac-trend .tg-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: acTrendDraw 1.1s .15s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes acTrendDraw { to { stroke-dashoffset: 0; } }

/* 环形占比 */
.ac-donut-wrap { display: flex; align-items: center; gap: 14px; }
.ac-donut { width: 96px; height: 96px; flex: none; }
.ac-donut circle { transition: stroke-dasharray .8s cubic-bezier(.2,.8,.2,1); }
.ac-donut-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dl-row { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #334155; }
.dl-row .dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.dl-row .dl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-row .dv { color: #64748b; font-variant-numeric: tabular-nums; }

/* 热搜榜 */
.ac-heat { display: flex; flex-direction: column; }
.h-row { display: flex; align-items: center; gap: 9px; padding: 7px 2px; border-bottom: 1px dashed #eef2f7; }
.h-row:last-child { border-bottom: none; }
.h-rank { flex: none; width: 20px; height: 20px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; color: #fff; }
.h-rank.r1 { background: linear-gradient(135deg, #ef4444, #f97316); }
.h-rank.r2 { background: linear-gradient(135deg, #f97316, #fbbf24); }
.h-rank.r3 { background: linear-gradient(135deg, #f59e0b, #fde047); }
.h-rank.rn { background: #eef2f7; color: #64748b; }
.h-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.h-t { font-size: 12px; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-meta { display: flex; align-items: center; gap: 5px; }
.h-plat { font-size: 10px; color: #94a3b8; }
.h-val { flex: none; display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #334155; font-variant-numeric: tabular-nums; }
.h-tr { font-size: 11px; font-weight: 800; }
.h-tr.up { color: #dc2626; }
.h-tr.down { color: #16a34a; }
.h-tr.flat { color: #94a3b8; }

/* 事件卡 */
.ac-evc { display: flex; flex-direction: column; gap: 7px; }
.ev-c { border: 1px solid #eef2f7; border-radius: 9px; padding: 8px 10px; background: #fbfcfe; transition: border-color .2s; }
.ev-c:hover { border-color: #bfdbfe; }
.ev-t { font-size: 12px; font-weight: 600; color: #1e293b; }
.ev-m { display: flex; align-items: center; gap: 7px; margin-top: 5px; }
.ev-v { font-size: 11px; font-weight: 700; color: #0284c7; font-variant-numeric: tabular-nums; }
.ev-tr { font-size: 10.5px; font-weight: 600; }
.ev-tr.up { color: #dc2626; }
.ev-tr.down { color: #16a34a; }
.ev-tr.flat { color: #94a3b8; }

/* 时间轴 */
.ac-tl { display: flex; flex-direction: column; }
.tl-row { position: relative; display: flex; gap: 9px; padding: 0 0 13px 16px; }
.tl-row:last-child { padding-bottom: 2px; }
.tl-row::before { content: ''; position: absolute; left: 4px; top: 12px; bottom: -2px; width: 2px; background: #e8edf5; }
.tl-row:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2.5px solid #0284c7; box-shadow: 0 0 0 3px rgba(2,132,199,.12); }
.tl-t { flex: none; width: 86px; font-size: 10.5px; color: #0284c7; font-weight: 700; line-height: 1.55; }
.tl-x { flex: 1; min-width: 0; font-size: 11.5px; color: #334155; line-height: 1.55; }

/* 事件档案头卡 */
.ac-evhero {
  border-radius: 12px; padding: 13px 14px; color: #fff;
  background: linear-gradient(120deg, #0f2c52 0%, #164e8a 55%, #2563eb 100%);
  box-shadow: 0 8px 22px rgba(22,78,138,.28); position: relative; overflow: hidden;
}
.ac-evhero::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.08); }
.ac-evhero .eh-top { display: flex; align-items: center; gap: 8px; }
.ac-evhero .eh-name { font-size: 14.5px; font-weight: 700; letter-spacing: .3px; flex: 1; min-width: 0; }
.ac-evhero .aa-pill { background: rgba(255,255,255,.18); color: #fff; }
.ac-evhero .aa-pill.red { background: rgba(248,113,113,.3); }
.ac-evhero .aa-pill.amber { background: rgba(251,191,36,.32); }
.ac-evhero .aa-pill.green { background: rgba(74,222,128,.3); }
.ac-evhero .eh-range { margin-top: 6px; font-size: 10.5px; opacity: .85; }
.ac-evhero .eh-stats { display: flex; gap: 6px; margin-top: 11px; }
.ac-evhero .eh-stats span { flex: 1; text-align: center; background: rgba(255,255,255,.1); border-radius: 8px; padding: 7px 4px; font-size: 9.5px; opacity: .95; display: flex; flex-direction: column; gap: 2px; }
.ac-evhero .eh-stats b { font-size: 13.5px; font-weight: 800; letter-spacing: .2px; }

/* 线索处置台 */
.ac-clues { display: flex; flex-direction: column; }
.cl-row { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px dashed #eef2f7; }
.cl-row:last-child { border-bottom: none; }
.cl-row .aa-pill { flex: none; width: 40px; text-align: center; }
.cl-n { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-s { flex: none; font-size: 10.5px; color: #94a3b8; }

/* ===== 聊天气泡轻量"思考中"状态行（详细轨迹只在右侧看板呈现） ===== */
.aa-thinking {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 11px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(99,102,241,.08), rgba(14,165,233,.08));
  border: 1px solid rgba(99,102,241,.16);
  transition: opacity .25s, transform .25s;
}
.aa-thinking .aa-think-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #6366f1, #0ea5e9);
  animation: aaThinkPulse 1.1s ease-in-out infinite;
}
@keyframes aaThinkPulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(99,102,241,.35); }
  50% { opacity: .55; transform: scale(.8); box-shadow: 0 0 0 4px rgba(99,102,241,0); }
}
.aa-thinking .aa-think-text { font-size: 12px; color: #64748b; white-space: nowrap; }
.aa-thinking .aa-think-text.swap { animation: aaThinkSwap .3s ease; }
@keyframes aaThinkSwap { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.aa-thinking.out { opacity: 0; transform: translateY(-3px); }

/* 思考胶囊下方的综合研判摘要段 */
.aa-sum { display: block; margin: 6px 0 0; font-size: 13.5px; color: #334155; }

/* ===== 知识库（RAG）可视化：检索横幅 + 引用相关度徽章 ===== */
.aa-kb-strip {
  display: flex; align-items: center; gap: 8px;
  margin: 2px 0 10px; padding: 8px 12px;
  background: linear-gradient(90deg, #eff6ff, #f8fafc);
  border: 1px solid #bfdbfe; border-radius: 10px;
  font-size: 12px;
}
.aa-kb-strip .ic { font-size: 14px; flex: none; }
.aa-kb-strip .tx { flex: 1; color: #334155; min-width: 0; }
.aa-kb-strip .tx b { color: #1d4ed8; font-weight: 700; }
.aa-kb-strip a { color: #2563eb; font-weight: 600; text-decoration: none; white-space: nowrap; flex: none; }
.aa-kb-strip a:hover { text-decoration: underline; }
/* 左气泡引用卡：相关度徽章 */
.aa-cite .sc {
  flex: none; margin-left: 2px; padding: 1px 7px; border-radius: 99px;
  background: #eff6ff; color: #1d4ed8; font-size: 10.5px; font-weight: 700;
}
/* 右侧看板「知识库命中」：相关度徽章 + 文档元信息 */
.ac-item .sc {
  flex: none; align-self: center; padding: 1px 7px; border-radius: 99px;
  background: #eff6ff; color: #1d4ed8; font-size: 10.5px; font-weight: 700;
}
.ac-item .tx i { display: block; font-style: normal; font-size: 10.5px; color: #94a3b8; margin-top: 2px; }
.ac-item[onclick] { cursor: pointer; }
.ac-item[onclick]:hover { background: #f0f9ff; }
