/* 视频号工具台 · 页面级补充样式
   仅补充 app.css 未覆盖的少量布局/状态样式；
   全部颜色复用 app.css 的 CSS 变量，双主题兼容，不硬编码颜色 */

/* ---------- 入口卡图标底色 ---------- */
.entry-icon.is-brand { background: var(--bg-brand-light); color: var(--brand); }
.entry-icon.is-purple { background: var(--purple-light); color: var(--purple); }

/* ---------- 卡片内部留白 ---------- */
.card-pad { padding: 20px; }

/* ---------- 表单卡片内字段间距 ---------- */
.form-stack > * + * { margin-top: 16px; }

/* ---------- 上传区已选文件信息 ---------- */
.file-chip {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-all;
}
.file-chip.is-show { display: flex; }

/* ---------- 任务进度区 ---------- */
.task-progress { display: none; }
.task-progress.is-show { display: block; }
.task-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.task-progress-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}
.task-progress-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
}

/* ---------- 结果区 ---------- */
.result-section { display: none; }
.result-section.is-show { display: block; }
.result-frame-wrap { margin-top: 4px; }

/* ---------- 历史列表状态点 ---------- */
.history-refresh {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-placeholder);
}

/* ---------- 顶栏当前页导航高亮 ---------- */
.topbar-nav { display: flex; align-items: center; gap: 4px; }
.topbar-nav .btn { font-size: 13px; }

/* ---------- 登录页错误提示 ---------- */
.login-error { display: none; margin-bottom: 16px; }
.login-error.is-show { display: block; }

/* ---------- 顶栏当前登录人 ---------- */
.user-chip {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 0 4px;
  white-space: nowrap;
}

/* ---------- 横向排列表单 ---------- */
.flex-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
@media (max-width: 767px) {
  .flex-row { flex-direction: column; align-items: stretch; }
}

/* ---------- 账号管理页 ---------- */
.user-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.user-table th, .user-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-level-1);
  text-align: left;
  vertical-align: middle;
}
.user-table th {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}
.user-table .ops { display: flex; flex-wrap: wrap; gap: 6px; }
.user-table .ops .btn { padding: 3px 10px; font-size: 12px; }
.role-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-round);
  font-size: 12px;
  background: var(--bg-secondarycontainer);
  color: var(--text-secondary);
}
.role-badge.is-admin { background: var(--bg-brand-light); color: var(--brand); }
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}
.status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}
.status-dot.is-disabled::before { background: var(--error); }
@media (max-width: 767px) {
  .user-table th:nth-child(3), .user-table td:nth-child(3) { display: none; }
}

/* ---------- 通用辅助 ---------- */
.hidden { display: none !important; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }

/* ============================================================
   结果工作文档（飞书文档风 / 分镜表风）
   结果不再嵌技能独立页，而是在站内以结构化文档原生渲染
   ============================================================ */

/* ---------- 文档骨架 ---------- */
.doc { font-size: 14px; line-height: 1.7; color: var(--text-primary); }
.doc > * + * { margin-top: 20px; }
.doc-section > * + * { margin-top: 12px; }
.doc-h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.doc-h3::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--brand);
  flex: none;
}
.doc-muted { color: var(--text-secondary); font-size: 13px; }
.doc-divider { border: none; border-top: 1px solid var(--border-level-1); margin: 20px 0 0; }

/* 信息 chips（品类/价格/时长等事实条） */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-round);
  background: var(--bg-secondarycontainer);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}
.chip b { color: var(--text-primary); font-weight: 600; }
.chip.is-brand { background: var(--bg-brand-light); color: var(--brand); }
.chip.is-success { background: var(--success-light); color: var(--success); }
.chip.is-warning { background: var(--warning-light); color: var(--warning); }
.chip.is-error { background: var(--error-light); color: var(--error); }

/* ---------- 方向 Tab（脚本多方向切换） ---------- */
.variant-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px;
  background: var(--bg-secondarycontainer);
  border-radius: var(--radius-medium);
}
.variant-tab {
  flex: 1 1 0;
  min-width: 120px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-default);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s;
}
.variant-tab:hover { color: var(--text-primary); }
.variant-tab.is-active {
  background: var(--bg-container);
  color: var(--brand);
  font-weight: 600;
  box-shadow: var(--shadow-1);
}

/* ---------- 文档正文块 ---------- */
.doc-para {
  padding: 12px 14px;
  background: var(--bg-secondarycontainer);
  border-radius: var(--radius-medium);
  white-space: pre-wrap;
  word-break: break-word;
}
.doc-block {
  border: 1px solid var(--border-level-1);
  border-radius: var(--radius-medium);
  overflow: hidden;
}
.doc-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: var(--bg-secondarycontainer);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.doc-block-body { padding: 12px 14px; white-space: pre-wrap; word-break: break-word; }

/* 复制按钮（小号） */
.copy-btn {
  flex: none;
  padding: 3px 12px;
  border: 1px solid var(--border-level-2);
  border-radius: var(--radius-default);
  background: var(--bg-container);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.copy-btn:hover { color: var(--brand); border-color: var(--brand); }
.copy-btn.is-copied { color: var(--success); border-color: var(--success); }

/* 字段行（标签 + 内容） */
.field-row { display: flex; gap: 12px; align-items: flex-start; }
.field-row + .field-row { margin-top: 10px; }
.field-row .k {
  flex: none;
  width: 68px;
  padding-top: 1px;
  font-size: 12px;
  color: var(--text-placeholder);
}
.field-row .v { flex: 1; min-width: 0; word-break: break-word; }

/* ---------- 镜头卡（脚本逐镜 / 拆解分镜共用） ---------- */
.shot-list > * + * { margin-top: 12px; }
.shot-row {
  display: flex;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border-level-1);
  border-radius: var(--radius-medium);
  background: var(--bg-container);
}
.shot-frame {
  flex: none;
  width: 180px;
}
.shot-frame img {
  display: block;
  width: 100%;
  border-radius: var(--radius-default);
  cursor: zoom-in;
}
.shot-frame .frame-dl {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--brand);
  text-decoration: none;
  text-align: center;
}
.shot-info { flex: 1; min-width: 0; }
.shot-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.shot-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-default);
  background: var(--brand);
  color: var(--text-anti);
  font-size: 12px;
  font-weight: 600;
}
.shot-meta { font-size: 12px; color: var(--text-secondary); }

/* 提示词块 */
.prompt-block {
  margin-top: 10px;
  border: 1px dashed var(--border-level-2);
  border-radius: var(--radius-medium);
  overflow: hidden;
}
.prompt-block .doc-block-head { background: transparent; font-weight: 500; color: var(--text-secondary); }
.prompt-block .doc-block-body {
  padding-top: 0;
  font-size: 12px;
  color: var(--text-secondary);
  max-height: 120px;
  overflow-y: auto;
}

/* ---------- 分镜表格（模板 / 优化版 beats） ---------- */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.doc-table th, .doc-table td {
  padding: 8px 12px;
  border: 1px solid var(--border-level-1);
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.doc-table th {
  background: var(--bg-secondarycontainer);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.doc-table .time { white-space: nowrap; color: var(--text-secondary); }

/* ---------- 附件下载区（原来的产物列表，弱化收纳到底部） ---------- */
.attach-box { margin-top: 24px; }
.attach-box summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
}
.attach-box summary:hover { color: var(--brand); }
.attach-box .result-list { margin-top: 12px; }

/* ---------- 图片放大遮罩 ---------- */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  cursor: zoom-out;
  padding: 24px;
}
.img-lightbox.is-show { display: flex; }
.img-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-medium);
}

/* ---------- 移动端 ---------- */
@media (max-width: 767px) {
  .card-pad { padding: 16px; }
  .shot-row { flex-direction: column; gap: 10px; }
  .shot-frame { width: 100%; }
  .variant-tab { min-width: 90px; }
  .doc-table { font-size: 12px; }
  .doc-table th, .doc-table td { padding: 6px 8px; }
}
