/* ===================================================================
   demo2 · 作战室静态演示 —— 1:1 移植 mdsp2 AgentRoom.css
   布局壳复刻 @chatui/core Chat 结构（尺寸实测自 1440x900 真实页面）
   =================================================================== */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.agent-room-page {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  width: 100dvw;
  display: flex;
  flex-direction: column;
  background: #f0f2f5;
  overflow: hidden;
  font-size: 16px;
  color: #11192d;
}

/* ========== 导航栏：蓝渐变标题行 + 白底过滤 Tabs（room-nav 同款） ========== */
.room-nav-wrap {
  width: 100%;
  background: #fff;
  flex: none;
}

.room-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 20px;
  min-height: 103px;
  background: linear-gradient(135deg, #1677ff 0%, #4096ff 100%);
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3);
}

.room-nav-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.room-nav-btn:hover { background: rgba(255, 255, 255, 0.15); }

.room-nav-speed {
  width: auto;
  min-width: 44px;
  padding: 0 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.room-nav-main {
  flex: 1 1 auto;
  min-width: 0;
  color: #ffffff;
}

.room-nav-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.room-nav-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 30px;
}

/* 状态 tag（antd Tag color=hex 同款：实底 + 白字） */
.room-status-tag {
  flex-shrink: 0;
  display: inline-block;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 20px;
  color: #fff;
  background: #52c41a;
}

.room-nav-sub {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  overflow-wrap: anywhere;
  line-height: 1.4;
}

/* 三条件胶囊（场景 / 设备类型 / 设备厂商） */
.room-nav-conds {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.room-nav-cond {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  font-size: 12px;
  line-height: 18px;
  border-radius: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.room-nav-cond-label {
  flex-shrink: 0;
  padding: 0 6px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.12);
}

.room-nav-cond-value {
  padding: 0 8px;
  color: #ffffff;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== 过滤 Tabs（chatui Tabs 同款：白底、激活黑粗 + 黑色短下划线） ========== */
.room-tabs-bar {
  background: #fff;
  border-bottom: 1px solid #eef1f5;
}

.room-tabs {
  display: flex;
  align-items: center;
  padding: 0 10px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.room-tabs::-webkit-scrollbar { display: none; }

.room-tab {
  flex: none;
  position: relative;
  padding: 10px 0;
  margin-right: 26px;
  font-size: 15px;
  line-height: 21px;
  color: #333333;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.room-tab.is-active {
  color: #11192d;
  font-weight: 600;
}

.room-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: #11192d;
}

/* ========== 消息区（chatui MessageContainer / MessageList 同款） ========== */
.message-container {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  background: #f5f7fa;
}

.message-list {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 12px;
  font-size: 15px;
  line-height: 1.5;
}

.message-item { margin: 8px 0; }

/* ========== 日志气泡（AgentRoom.css 移植） ========== */
.room-log {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 82%;
}

.room-log-meta {
  font-size: 11px;
  font-weight: 500;
  color: #9aa4b2;
  margin: 0 4px 3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-log-meta--agent { color: #1677ff; }

.room-log-bubble {
  max-width: 100%;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.04);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1), 0 1px 2px rgba(15, 23, 42, 0.05);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.5;
}

.room-log-bubble p { margin: 0; }

.room-log-bubble--drill {
  background: #f8fafc;
  padding: 10px 12px;
}

/* 本人回复气泡（同意/拒绝/手工操作回复）：靠右 + 头像在右 + 浅橙底深色字
   （AgentRoom.css 1394-1417 同款，chatui 主题 --brand-3 #ffe0cc） */
.room-log--right {
  align-items: flex-end;
  margin-left: auto;
}

.room-log--right .room-log-main {
  flex-direction: row-reverse;
}

.room-log--right .room-log-meta {
  text-align: right;
  margin: 0 4px 3px 0;
}

.room-log--right .room-log-bubble {
  background: #ffe0cc;
  border-color: transparent;
  color: #11192d;
}

/* AI 出字：气泡结尾闪烁光标（打字过程中显示，结束后移除 is-typing） */
.room-log-bubble.is-typing::after {
  content: '▌';
  display: inline-block;
  margin-left: 2px;
  color: #1677ff;
  font-size: 13px;
  line-height: 1;
  transform: translateY(1px);
  animation: typeCaret 0.9s steps(1) infinite;
}

@keyframes typeCaret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ---------------- 等待指示 ----------------
   左侧：下一条气泡未出，智能体「思考中」三点（chatui TypingBubble 观感）
   右侧：等待人工输入，本人一侧橙色「等待输入中」三点 */
.chat-wait-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.chat-wait-row--right {
  flex-direction: row-reverse;
}

.chat-wait {
  display: flex;
}

.chat-wait-row--right {
  margin-left: auto;
}

.chat-wait-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.04);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1), 0 1px 2px rgba(15, 23, 42, 0.05);
}

.chat-wait-text {
  font-size: 14px;
  line-height: 1.4;
  color: #11192d;
}

.chat-wait-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chat-wait-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: chatWaitDot 1.2s infinite ease-in-out;
}

.chat-wait-dots i:nth-child(2) { animation-delay: 0.2s; }
.chat-wait-dots i:nth-child(3) { animation-delay: 0.4s; }

/* 右侧（等人工输入）：本人气泡同色系 */
.chat-wait-row--right .chat-wait-bubble {
  background: #ffe0cc;
  border-color: transparent;
}

.chat-wait-row--right .chat-wait-dots i { background: #b45309; }

@keyframes chatWaitDot {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* 头像 */
.room-log-main {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.room-log-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: transparent;
  overflow: hidden;
}

.room-log-avatar img,
.room-log-avatar svg {
  display: block;
  width: 36px;
  height: 36px;
}

.room-log-avatar-txt {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 系统通知卡（LOG 头像 + 蓝渐变富卡片） */
.room-log-sys-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
  max-width: 86%;
}

/* 实施结束后的「返回链接」气泡（index.json -> endLink 配置） */
.room-log-endlink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #1677ff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.room-log-endlink:hover {
  color: #4096ff;
  text-decoration: underline;
}


.room-log-sys-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.room-log-sys-name {
  font-size: 11px;
  color: #9aa4b2;
  margin: 0 0 3px 2px;
}

.room-log-sys-cardmain {
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 1px 4px rgba(22, 119, 255, 0.08);
  max-width: 100%;
  min-width: 220px;
}

.room-log-sys-card-title {
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  margin-bottom: 2px;
}

.room-sys-text {
  font-size: 13px;
  color: #475569;
  overflow-wrap: anywhere;
}

/* ========== 推演日志格式化（DrillLogView 移植） ========== */
.drill-log-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.drill-log-badge {
  flex: none;
  display: inline-block;
  padding: 0 7px;
  border-radius: 9px;
  background: #1677ff;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0.5px;
}

.drill-log-title {
  font-size: 13px;
  font-weight: 600;
  color: #1f2733;
}

.drill-log-mention { color: #1677ff; }

.drill-log-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.55;
  color: #2c3a4b;
}

.drill-log-text {
  margin: 0;
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 12.5px;
  white-space: pre-line;
}

.drill-log-kv {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.drill-log-kv-label {
  flex: none;
  min-width: 64px;
  color: #8296ab;
}

.drill-log-kv-value {
  color: #1f2733;
  word-break: break-all;
  flex: 1;
  min-width: 0;
}

.drill-log-param {
  font-family: 'SFMono-Regular', Consolas, 'Courier New', monospace;
  font-size: 11px;
  background: #f2f6fb;
  border: 1px solid #e3eaf3;
  border-radius: 4px;
  padding: 0 4px;
  margin: 0 1px;
  color: #1d3966;
  white-space: nowrap;
}

/* 合规检查清单：逐项成行 + 蓝色高亮行（2026-11-03 蓝色版） */
.drill-log-check-intro {
  margin: 0 0 4px;
  font-size: 12.5px;
  color: #1f2733;
}

.drill-log-check-row {
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding: 3px 8px;
  margin: 3px 0;
  background: #f0f7ff;
  border-left: 3px solid #91caff;
  border-radius: 3px;
  min-width: 0;
}

.drill-log-check-label {
  flex: none;
  font-weight: 600;
  color: #0958d9;
}

.drill-log-check-rest {
  color: #1f2733;
  word-break: break-all;
  min-width: 0;
}

/* 命令 chip（摘要态，一行一条） */
.drill-log-cli-chip {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 8px;
  border: 1px solid #e3eaf3;
  border-radius: 5px;
  background: #fff;
  min-width: 0;
}

.drill-log-cli-chip .drill-log-cli-node {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: #1677ff;
}

.drill-log-cli-chip .drill-log-cli-cmd {
  font-family: inherit;
  font-size: 11.5px;
  color: #51637a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.drill-log-cli-chip .drill-log-cli-n {
  flex: none;
  font-size: 10.5px;
  color: #9aa4b2;
}

/* CLI 代码块（查看详情弹窗内展开） */
.drill-log-cli {
  border: 1px solid #e3eaf3;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.drill-log-cli-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: #eef3fa;
  border-bottom: 1px solid #e3eaf3;
}

.drill-log-cli-node {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: #1677ff;
}

.drill-log-cli-cmd {
  font-family: inherit;
  font-size: 11.5px;
  color: #51637a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drill-log-cli-out {
  margin: 0;
  padding: 8px 10px;
  max-height: 180px;
  overflow: auto;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.5;
  color: #3d4f66;
  white-space: pre;
}

/* 设备上报 / exec 原始输出块 */
.drill-log-raw {
  margin: 0;
  padding: 8px 10px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid #e3eaf3;
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.6;
  color: #3d4f66;
  white-space: pre-wrap;
  word-break: break-all;
}

/* 表格块 */
.drill-log-table-wrap {
  overflow-x: auto;
  border: 1px solid #e3eaf3;
  border-radius: 6px;
  background: #fff;
}

.drill-log-table {
  margin: 0;
  width: 100%;
  border-collapse: collapse;
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 11px;
  color: #3d4f66;
}

.drill-log-table th,
.drill-log-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #eef2f7;
  border-right: 1px solid #f2f5f9;
  text-align: left;
  white-space: normal;
  word-break: break-word;
}

.drill-log-table th {
  background: #f4f8fd;
  color: #1d3966;
  font-weight: 600;
}

.drill-log-table tr:last-child td { border-bottom: none; }
.drill-log-table th:last-child,
.drill-log-table td:last-child { border-right: none; }

/* 图片块 */
.drill-log-img-wrap {
  border: 1px solid #e3eaf3;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
  overflow: hidden;
}

.drill-log-img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 4px;
  cursor: zoom-in;
}

/* 结论块 */
.drill-log-conclusion {
  border-left: 3px solid #1677ff;
  background: #eef4ff;
  border-radius: 0 6px 6px 0;
  padding: 6px 10px;
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 12.5px;
  color: #1d3966;
}

.drill-log-conclusion-label {
  font-weight: 700;
  color: #1677ff;
  margin-right: 8px;
}

/* 枚举列表块 */
.drill-log-list {
  margin: 0;
  padding-left: 16px;
  list-style: none;
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 12px;
  line-height: 1.7;
  color: #3d4f66;
}

.drill-log-list > li {
  position: relative;
  word-break: break-all;
}

.drill-log-list > li::before {
  content: '';
  position: absolute;
  left: -11px;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9db6d6;
}

.drill-log-list-sub {
  color: #6b7f99;
  font-size: 11.5px;
  padding-left: 2px;
}

.drill-log-trunc {
  font-size: 11px;
  color: #8a9bb2;
  padding-left: 2px;
}

/* 查看详情 foot */
.drill-log-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.drill-log-more {
  padding: 0 4px;
  height: 24px;
  font-size: 12px;
  border: none;
  background: transparent;
  color: #1677ff;
  cursor: pointer;
}

.drill-log-more:hover { color: #4096ff; }

/* 查看详情弹窗（antd Modal 同款观感） */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.45);
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px 16px;
}

.modal-mask.is-open { display: flex; }

.modal-box {
  width: 640px;
  max-width: 96vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12), 0 3px 6px -4px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.modal-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 18px;
  color: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { color: rgba(0, 0, 0, 0.75); }

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #2c3a4b;
}

.modal-body > * { flex-shrink: 0; }

.modal-body .drill-log-text {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 13px;
}

.modal-body .drill-log-cli-out,
.modal-body .drill-log-table { max-height: none; }

/* 图片大图预览 */
.img-viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.img-viewer.is-open { display: flex; }

.img-viewer img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 4px;
}

/* ========== 快捷回复条（chatui QuickReplies 1:1） ==========
   实测（作战室 3701）：区宽 960 居中、padding 6px 12px、chip 间距 6px；
   chip = 白底 / border 1px transparent / radius 16 / padding 4px 12px /
          line-height 20 / font-size 14 / color #11192d / 高 30px；
   highlight = 135deg 蓝渐变实底白字（fw 500）；new = 右上 8px 红点（1px 白边） */
.quick-replies {
  flex: none;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-replies::-webkit-scrollbar { display: none; }

.quick-replies[hidden] { display: none; }

.quick-reply {
  position: relative;
  flex: none;
  margin: 0;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: #fff;
  color: #11192d;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  cursor: pointer;
  transition: 0.15s ease-in-out;
}

.quick-reply:hover { box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12); }

.quick-reply-inner {
  display: flex;
  align-items: center;
}

.quick-reply-inner .qr-icon-wrap {
  display: inline-flex;
  margin-right: 3px;
}

.quick-reply-inner .qr-icon {
  width: 15px;
  height: 15px;
  color: #1677ff;
  fill: currentColor;
}

/* chatui .QuickReply.new::after 同款红点 */
.quick-reply--new::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background: #ff0300;
  border: 1px solid #fff;
  border-radius: 50%;
  overflow: hidden;
}

/* 重要按钮（AgentRoom.css .QuickReply.highlight 同款覆盖） */
.quick-reply--highlight {
  background: linear-gradient(135deg, #1677ff, #4096ff);
  border-color: transparent;
  color: #fff;
  font-weight: 500;
}

.quick-reply--highlight .qr-icon { color: #fff; }

.quick-reply--highlight:hover {
  background: linear-gradient(135deg, #4096ff, #69b1ff);
  box-shadow: none;
}

/* ========== 底部输入框（chatui Composer 同款） ========== */
.composer {
  flex: none;
  padding: 9px 12px 6px;
  display: flex;
  align-items: flex-end;
}

.composer-input {
  flex: 1 1 auto;
  min-height: 36px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 6px;
  font-size: 15px;
  line-height: 20px;
  color: #11192d;
  outline: none;
  overflow-wrap: anywhere;
}

.composer-input:empty::before {
  content: attr(data-placeholder);
  color: #bfbfbf;
}

/* ========== 跳过动画 / 等待输入中（主程序同款悬浮元素） ========== */
/* hidden 属性会被 display 规则覆盖，这里显式补上（与主程序条件渲染一致） */
.room-skip-btn[hidden],
.room-wait-input[hidden] {
  display: none;
}

.room-skip-btn {
  position: absolute;
  top: 116px;
  right: 16px;
  z-index: 20;
  padding: 5px 12px;
  border: none;
  border-radius: 14px;
  background: rgba(22, 119, 255, 0.92);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.35);
  transition: background 0.15s ease, transform 0.15s ease;
}

.room-skip-btn:hover {
  background: #1677ff;
  transform: translateY(-1px);
}

.room-wait-input {
  position: absolute;
  right: 16px;
  bottom: 116px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 14px;
  background: #ffe0cc;
  color: #11192d;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(250, 140, 60, 0.18);
  animation: roomWaitFadeIn 0.25s ease;
}

.room-wait-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.room-wait-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fa8c16;
  animation: roomWaitBlink 1.2s infinite ease-in-out;
}

.room-wait-dots i:nth-child(2) { animation-delay: 0.2s; }
.room-wait-dots i:nth-child(3) { animation-delay: 0.4s; }

@keyframes roomWaitBlink {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}

@keyframes roomWaitFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ===================================================================
   作战室剧本卡片（移植 mdsp2 RoomCards.css，供「变更监控作战室」信息卡用）
   =================================================================== */
.rc-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-left: 3px solid #1677ff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  max-width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  color: #1f2937;
}

.rc-card--info { min-width: 300px; }
.rc-card--summary { border-left-color: #1677ff; margin-top: 12px; }

.rc-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #f0f2f5;
}

.rc-ico { font-size: 15px; line-height: 1; }

.rc-title {
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8;
}

.rc-tag {
  font-size: 11px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0 6px;
  line-height: 18px;
}

.rc-body > * + * { margin-top: 6px; }

.rc-row {
  display: flex;
  gap: 8px;
  line-height: 1.7;
}

.rc-label {
  flex-shrink: 0;
  width: 60px;
  color: #94a3b8;
}

.rc-value {
  flex: 1;
  min-width: 0;
  color: #334155;
  overflow-wrap: anywhere;
}

.rc-blue-text { color: #1677ff; }

.rc-mention {
  color: #1677ff;
  font-weight: 500;
}

.rc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.rc-chip {
  font-size: 11px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1px 7px;
  line-height: 18px;
}

.rc-chip--blue {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.rc-value .rc-chip,
.rc-value .rc-chips { display: inline-flex; }

.rc-list {
  margin: 0;
  padding-left: 16px;
  color: #475569;
  line-height: 1.7;
}

.rc-block {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #eef2f7;
}

.rc-block-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

.rc-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #eef2f7;
}

.rc-details > summary {
  font-size: 12px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}

.rc-details > summary:hover { color: #64748b; }

.rc-scroll {
  margin-top: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.rc-note {
  margin-top: 8px;
  padding: 6px 8px;
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  border-radius: 6px;
  line-height: 1.7;
}

/* 卡片消息在会话区的宽度：贴合主程序（卡片不参与气泡左右分栏） */
.message-item > .rc-card {
  width: min(640px, 100%);
}

/* ---------------- toast（antd messageApi 同款位置） ---------------- */
.toast-box {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  padding: 8px 16px;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font-size: 14px;
  line-height: 20px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  border: 1px solid #f0f2f5;
  animation: toastIn 0.18s ease;
}

.toast-box[hidden] { display: none; }

.toast-box--success { color: #389e0d; border-color: #b7eb8f; background: #f6ffed; }
.toast-box--info { color: #0958d9; border-color: #91caff; background: #e6f4ff; }
.toast-box--error { color: #cf1322; border-color: #ffa39e; background: #fff1f0; }

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ===================================================================
   antd 1:1：作战室详情 Drawer（460 右侧）+ 信息变更 Modal（520）
   口径 = AgentRoom.jsx 2856-3081 行（Drawer/Table/Descriptions/Steps/Modal/Form）
   =================================================================== */
.antd-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.45);
  display: none;
}

.antd-drawer-mask.is-open { display: block; }

.antd-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 460px;
  max-width: 100vw;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0 16px -8px rgba(0, 0, 0, 0.08), -9px 0 28px 0 rgba(0, 0, 0, 0.05);
  animation: antdDrawerIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: auto;
}

@keyframes antdDrawerIn {
  from { transform: translateX(100%); }
  to { transform: none; }
}

.antd-drawer-header {
  flex: none;
  display: flex;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.antd-drawer-close {
  flex: none;
  margin-right: 12px;
  border: none;
  background: transparent;
  padding: 0;
  color: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
}

.antd-drawer-close:hover { color: rgba(0, 0, 0, 0.88); }

.antd-drawer-title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: rgba(0, 0, 0, 0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.antd-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 24px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.88);
}

/* ---- Table（small，无分页，字段 140 / 值） ---- */
.ant-table2 {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ant-table2 th,
.ant-table2 td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
  color: rgba(0, 0, 0, 0.88);
  font-weight: 400;
  vertical-align: top;
}

.ant-table2 thead th {
  background: #fafafa;
  font-weight: 600;
}

.ant-table2-field { width: 140px; }

.ant-table2 tbody tr:hover td { background: #fafafa; }

/* ---- Descriptions（bordered small，1 列） ---- */
.ant-desc2 {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
  table-layout: fixed;
}

.ant-desc2 th,
.ant-desc2 td {
  border: 1px solid #f0f0f0;
  padding: 8px 16px;
  vertical-align: top;
  text-align: left;
}

.ant-desc2 th {
  background: #fafafa;
  color: rgba(0, 0, 0, 0.88);
  font-weight: 400;
  width: 88px;
  white-space: nowrap;
}

.ant-desc2 td {
  color: rgba(0, 0, 0, 0.88);
}

/* ---- Tag（antd v5 default / blue） ---- */
.ant-tag {
  display: inline-block;
  margin: 0 8px 4px 0;
  padding: 0 7px;
  font-size: 12px;
  line-height: 20px;
  border-radius: 4px;
  border: 1px solid #d9d9d9;
  background: #fafafa;
  color: rgba(0, 0, 0, 0.88);
  overflow-wrap: anywhere;
}

.ant-tag--blue {
  color: #1677ff;
  background: #e6f4ff;
  border-color: #91caff;
}

/* ---- Steps（vertical small） ---- */
.ant-steps2 {
  margin-top: 16px;
}

.ant-steps2-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 24px;
}

.ant-steps2-item:last-child { padding-bottom: 0; }

/* 竖向连接线：圆心到底部 */
.ant-steps2-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 11.5px;
  top: 28px;
  bottom: 4px;
  width: 1px;
  background: #f0f0f0;
}

.ant-steps2-icon {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.25);
  background: #fff;
  color: rgba(0, 0, 0, 0.25);
  font-size: 12px;
  line-height: 21px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.ant-steps2-title {
  font-size: 14px;
  line-height: 24px;
  color: rgba(0, 0, 0, 0.45);
  overflow-wrap: anywhere;
}

.ant-steps2-item.is-current .ant-steps2-icon {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
}

.ant-steps2-item.is-current .ant-steps2-title {
  color: rgba(0, 0, 0, 0.88);
  font-weight: 500;
}

.ant-steps2-item.is-finish .ant-steps2-icon {
  border-color: #1677ff;
  color: #1677ff;
}

.ant-steps2-item.is-finish .ant-steps2-title { color: rgba(0, 0, 0, 0.88); }

/* ---- Modal（信息变更，520 居中） ---- */
.antd-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
}

.antd-modal-mask.is-open { display: flex; }

.antd-modal {
  width: 520px;
  max-width: calc(100vw - 16px);
  margin: 100px 0 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
  animation: antdModalIn 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes antdModalIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: none; }
}

.antd-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
}

.antd-modal-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: rgba(0, 0, 0, 0.88);
}

.antd-modal-close {
  border: none;
  background: transparent;
  padding: 0;
  color: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
}

.antd-modal-close:hover { color: rgba(0, 0, 0, 0.88); }

.antd-modal-body { padding: 8px 24px 4px; }

.antd-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px 20px;
}

/* ---- Form（vertical）+ Input / Select / TextArea ---- */
.ant-form-item { margin-bottom: 20px; }

.ant-form-label {
  display: block;
  font-size: 14px;
  line-height: 22px;
  color: rgba(0, 0, 0, 0.88);
  margin-bottom: 8px;
}

.ant-form-item:last-child { margin-bottom: 8px; }

.ant-input,
.ant-select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.88);
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
}

.ant-input {
  height: 32px;
  padding: 4px 11px;
  line-height: 22px;
  outline: none;
  font-family: inherit;
}

.ant-input:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
}

.ant-textarea {
  height: auto;
  min-height: 56px;
  padding: 4px 11px;
  resize: vertical;
  overflow-wrap: anywhere;
}

.ant-select {
  position: relative;
  height: 32px;
  padding: 4px 11px;
  padding-right: 28px;
  line-height: 22px;
  cursor: default;
  overflow: hidden;
}

.ant-select-value {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 22px;
}

.ant-select-arrow {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0, 0, 0, 0.45);
  display: inline-flex;
  pointer-events: none;
}

.ant-form-extra {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.66;
  color: rgba(0, 0, 0, 0.45);
}

/* ---- Button（default / primary） ---- */
.antd-btn {
  height: 32px;
  padding: 4px 15px;
  font-size: 14px;
  line-height: 22px;
  border-radius: 6px;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: rgba(0, 0, 0, 0.88);
  cursor: pointer;
  transition: all 0.2s ease;
}

.antd-btn:hover {
  border-color: #1677ff;
  color: #1677ff;
}

.antd-btn-primary {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
}

.antd-btn-primary:hover {
  background: #4096ff;
  border-color: #4096ff;
  color: #fff;
}

/* 长内容断行（表格值 / 网元 Tag 通用） */
.break-anywhere { overflow-wrap: anywhere; }
