/* 控制台新布局（11-23 老板定：一个 Agent 面板为主，像 Grok / ChatGPT）
   - 中间只有对话：3D 形象默认收起（html.stage-off），右上角「形象」按钮再打开
   - 右边客户会话抽屉：平时收起，点「客户会话」或卡片上的「打开对话」才滑出来（里面就是 workbench.html）
   - 左栏顶上「＋ 新对话」和「最近」
   最后加载，只做布局，不改各面板自己的样式。 */

/* ---- 中间：对话占满，居中一列 ---- */
html.stage-off .core-stage,
html.stage-off .stage-live-wrap { display: none !important; }
html.stage-off .core-wrap { display: block !important; grid-template-columns: minmax(0, 1fr) !important; height: 100% !important; min-height: 0 !important; }
html.stage-off .core-chat { max-width: 880px !important; margin: 0 auto !important; width: 100% !important; height: 100% !important; min-height: 0; display: flex !important; flex-direction: column !important; }
html.stage-off #totalStream { flex: 1 1 auto !important; min-height: 0 !important; height: auto !important; max-height: none !important; overflow-y: auto !important; }
html.stage-off .core-head, html.stage-off .total-composer, html.stage-off .chips, html.stage-off .quote-bar { flex: 0 0 auto; }
html.stage-off .core-head { padding-top: 6px; }
.stage-toggle { cursor: pointer; }
.stage-toggle.on { border-color: var(--eng-red, #c8102e); color: var(--eng-red-bright, #ff4d64); }

/* ---- 左栏：新对话 / 最近 ---- */
.nav-new { display: flex; align-items: center; gap: 8px; width: 100%; margin: 4px 0 6px; padding: 9px 12px; border: 1px solid var(--eng-line, rgba(255,255,255,.12)); border-radius: 10px; background: transparent; color: var(--eng-text, #ececec); font-weight: 600; font-size: 13.5px; cursor: pointer; text-align: left; }
.nav-new:hover { background: rgba(255,255,255,.04); }
.nav-recent-head { font-size: 11px; color: var(--eng-text-3, #77777f); padding: 10px 12px 4px; letter-spacing: .04em; }
.nav-recent { display: flex; flex-direction: column; gap: 1px; margin-bottom: 6px; max-height: 32vh; overflow: auto; }
/* 竖排限高的列表里，按钮默认会被压缩成半截字：每行固定高度，放不下就在列表里滚 */
.nav-recent button { flex: 0 0 auto; display: block; width: 100%; text-align: left; background: transparent; border: 0; color: var(--eng-text-2, #b5b5bc); padding: 6px 12px; border-radius: 8px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.nav-recent button:hover { background: rgba(255,255,255,.04); color: var(--eng-text, #ececec); }
.nav-recent button.on { background: rgba(255,255,255,.07); color: var(--eng-text, #ececec); }
.nav-recent .nr-empty { padding: 4px 12px; font-size: 12px; color: var(--eng-text-3, #77777f); }

/* ---- 右边：客户会话抽屉 ---- */
.wb-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 9500; display: flex; flex-direction: column;
  background: var(--eng-bg-2, #0f0f11); border-left: 1px solid var(--eng-line, rgba(255,255,255,.12)); box-shadow: -18px 0 40px rgba(0,0,0,.35);
  transform: translateX(105%); transition: transform .22s ease; }
.wb-drawer.open { transform: none; }
.wbd-head { height: 48px; flex: 0 0 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--eng-line, rgba(255,255,255,.12)); }
.wbd-head b { flex: 1; font-size: 14px; }
.wbd-head a, .wbd-head button { border: 1px solid var(--eng-line, rgba(255,255,255,.14)); background: transparent; color: var(--eng-text-2, #b5b5bc); border-radius: 8px; padding: 3px 10px; font-size: 12px; cursor: pointer; text-decoration: none; }
.wb-drawer iframe { flex: 1; width: 100%; border: 0; background: transparent; }
@media (min-width: 1280px) {
  /* 大屏：抽屉打开时把对话往左让一让，不挡字 */
  html.wbd-open.stage-off .core-chat { width: auto !important; max-width: min(880px, calc(100% - 460px)) !important; margin-right: 460px !important; margin-left: auto !important; }
}
/* 页头上「当前对话：运营值班」这一行（12-01） */
.core-thread { font-size: 12px; color: var(--eng-text-2, #b5b5bc); margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ＋→Bot 选择：分组 + 搜索（12-01） */
.pm-bots-hd { flex-wrap: wrap; }
.pm-bots-q { flex: 1 0 100%; box-sizing: border-box; margin: 0 4px 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line, rgba(255,255,255,.1)); background: var(--bg, #0b0b0d); color: var(--text, #ececec); font: inherit; font-size: 12.5px; }
.pm-bots-group { font-size: 11px; color: var(--text-3, #77777f); padding: 8px 8px 2px; letter-spacing: .04em; }
.pm-bots-list [hidden] { display: none !important; }
