/* ============================================================
   workbench.css — 独立评画工作台（聊天式布局）
   ------------------------------------------------------------------
   仅作用于 body.mr-workbench（manual-review.html 独立页），
   不影响 agent.html 嵌入版。视觉元素复用学员端 manual-review.css
   的 .mr-msg/.bubble/.ph-chatbox/AudioPlayer 等，保持全站统一。
   ============================================================ */
body.mr-workbench { background: #f5f7fa; }

/* 主容器：聊天式单列，顶部留白交给 nav-fixed.css 统一控制 */
body.mr-workbench .wrap {
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 120px;               /* 给底部固定输入条留空间 */
}

/* display:flex 会盖掉 HTML hidden 属性，三个卡片用 hidden 控制显隐，必须显式补回 */
.wb-detail[hidden], .wb-card[hidden] { display: none !important; }

/* 登录 / 列表卡片 */
.wb-card { padding: 22px; }
.wb-card h2 { font-size: 18px; margin: 0 0 10px; }
.wb-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.wb-list-head h2 { font-size: 18px; margin: 0; }
.wb-list-head > div { display: flex; gap: 8px; }
.wb-list-scroll { overflow-x: auto; }

/* ---------- 详情：聊天式工作台 ---------- */
.wb-detail { display: flex; flex-direction: column; gap: 14px; }

/* 顶部标题栏（钉在内容顶部） */
.wb-detail-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 2px 10px rgba(16,24,40,.04);
}
.wb-back {
  flex: 0 0 auto; width: 32px; height: 32px;
  border: 0; border-radius: 8px; background: #f2f4f8;
  color: var(--ink-body, #475467); font-size: 24px; line-height: 1;
  cursor: pointer;
}
.wb-back:hover { background: var(--accent-soft, #e8f3ff); color: var(--accent, #1080ff); }
.wb-head-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wb-head-title strong { font-size: 15px; color: var(--ink-strong, #26324a); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-head-title span { font-size: 12px; color: var(--ink-faint, #98a2b3); }

/* 分区卡片 */
.wb-section {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  padding: 14px;
}
.wb-section-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-body, #475467);
  margin-bottom: 10px;
}
.wb-section-title .ico { width: 16px; height: 16px; background-color: var(--accent, #1080ff); }
.wb-tip { margin: 8px 0 0; }

/* 标注工具条：换行、紧凑 */
#mrTools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
#mrTools button { border: 1px solid var(--line, #e5e7eb); background: #fff; border-radius: 7px; padding: 6px 10px; font-size: 12px; cursor: pointer; color: var(--ink-body, #475467); }
#mrTools button.is-active { border-color: var(--accent, #1080ff); color: var(--accent, #1080ff); background: var(--accent-soft, #e8f3ff); }
#mrTools button.mr-color { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid transparent; }
#mrTools button.mr-color.is-active { border-color: var(--ink-strong, #26324a); }
#mrTools button.mr-btn.primary { background: var(--accent, #1080ff); color: #fff; border-color: var(--accent, #1080ff); }

/* 作品图区：居中，最大高度限制 */
.wb-canvas-holder { text-align: center; background: #f2f4f8; border-radius: 10px; padding: 10px; }
.wb-canvas-holder .mr-canvas-wrap { max-width: 100%; margin: 0 auto; }

/* 打分卡：独立页里去掉卡片边框（外层已有 wb-section） */
#mrScoreCard { border: 0; padding: 0; margin: 0; background: transparent; }
#mrScoreCard h2 { margin: 0 0 4px; }

/* 对话流：两块消息容器放入同一滚动区，统一气泡视觉 */
.wb-chat-scroll { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.wb-chat-scroll .mr-chat { max-height: none; padding: 0; gap: 12px; }
/* 学员提问块：左侧气泡（老师回复仍右侧），复用了 .mr-msg.mine */
#mrQuestions .mr-qa-item { border: 0; padding: 0; margin: 0; background: transparent; }
#mrQuestions .mr-q-pick { border: 1px solid var(--accent, #1080ff); color: var(--accent, #1080ff); background: transparent; border-radius: 6px; font-size: 11px; padding: 3px 8px; cursor: pointer; margin: 2px 0 6px; }
#mrQuestions .mr-q-pick.is-selected { background: var(--accent, #1080ff); color: #fff; }

/* ---------- 底部固定输入条（学员端同款） ---------- */
.wb-compose-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; z-index: 60;
  width: min(676px, calc(100vw - 32px));
  padding: 8px 0 max(10px, env(safe-area-inset-bottom));
}
.wb-compose-bar[hidden] { display: none; }
.wb-inputbox { background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 14px; box-shadow: 0 -4px 20px rgba(16,24,40,.08); }
.wb-inputbox textarea { min-height: 44px; max-height: 120px; }

/* 学员提问回复条：浮在输入条上方 */
.wb-reply-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 92px; z-index: 61;
  width: min(676px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--accent-soft, #e8f3ff);
  border: 1px solid #b9d8ff; border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 4px 16px rgba(16,128,255,.12);
}
.wb-reply-bar[hidden] { display: none; }
.wb-reply-label { font-size: 12px; font-weight: 600; color: var(--accent, #1080ff); white-space: nowrap; }
.wb-reply-bar input { flex: 1 1 200px; min-width: 0; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.wb-reply-bar button { flex: 0 0 auto; border: 0; border-radius: 8px; background: var(--accent, #1080ff); color: #fff; padding: 8px 12px; font-size: 13px; cursor: pointer; }
.wb-reply-bar .mr-tip { flex: 1 1 100%; margin: 0; }

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
  body.mr-workbench .wrap { padding-left: 10px; padding-right: 10px; padding-bottom: 100px; }
  .wb-compose-bar, .wb-reply-bar { width: calc(100vw - 20px); }
  .wb-detail-head { position: static; }
  .wb-chat-scroll { max-height: none; }
}
