/* ============================================================
   内容工厂 — 场景化内容生产流水线
   ============================================================ */

/* --- 场景选择页 --- */
.cf-scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.cf-scene-card {
  position: relative;
  border-radius: 12px;
  padding: 24px 20px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
  color: #fff;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.cf-scene-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.cf-scene-card:active {
  transform: translateY(0);
}
.cf-scene-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 500;
}
.cf-scene-card p {
  margin: 0;
  font-size: 12px;
  opacity: 0.85;
}
.cf-scene-card .cf-scene-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.cf-scene-more {
  background: #f5f6fa;
  border: 2px dashed #d0d0d0;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 120px;
}

/* --- 流水线全屏页 --- */
.cf-fullscreen body.content-factory-mode .main-sidebar {
  display: none;
}
.cf-fullscreen body.content-factory-mode .main-content {
  margin-left: 0;
  width: 100%;
}

.cf-pipeline {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

/* --- 顶部：返回 + 场景名 --- */
.cf-pipeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.cf-back-btn {
  background: none;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  color: #555;
  transition: background 0.15s;
}
.cf-back-btn:hover {
  background: #f0f0f0;
}
.cf-scene-title {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}

/* --- 步骤条 --- */
.cf-step-bar {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 0 4px;
}
.cf-step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex: 1;
  position: relative;
  z-index: 1;
}
.cf-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  border: 2px solid #d0d0d0;
  background: white;
  color: #999;
  transition: all 0.2s;
}
.cf-step-node.completed .cf-step-circle {
  background: #52c41a;
  border-color: #52c41a;
  color: white;
}
.cf-step-node.active .cf-step-circle {
  background: #F18D24;
  border-color: #F18D24;
  color: white;
  box-shadow: 0 0 0 4px rgba(241,141,36,0.2);
}
.cf-step-node.future .cf-step-circle {
  background: #f5f5f5;
  border-color: #d9d9d9;
  color: #bbb;
}
.cf-step-label {
  font-size: 11px;
  color: #888;
  text-align: center;
}
.cf-step-node.active .cf-step-label {
  color: #F18D24;
  font-weight: 500;
}
.cf-step-node.completed .cf-step-label {
  color: #52c41a;
}
.cf-step-line {
  flex: 0 0 24px;
  height: 2px;
  background: #e0e0e0;
  margin: 0 4px;
  margin-bottom: 22px;
}
.cf-step-line.completed {
  background: #52c41a;
}

/* --- 步骤面板 --- */
.cf-panel {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}
.cf-panel h3 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 500;
}
.cf-panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}
.cf-btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #d0d0d0;
  background: white;
  color: #333;
  transition: all 0.15s;
}
.cf-btn:hover {
  background: #f5f5f5;
}
.cf-btn-primary {
  background: #F18D24;
  border-color: #F18D24;
  color: white;
}
.cf-btn-primary:hover {
  background: #d47a1e;
  border-color: #d47a1e;
}
.cf-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- 各步骤内组件 --- */
.cf-textarea {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  resize: vertical;
  font-family: inherit;
  outline: none;
}
.cf-textarea:focus {
  border-color: #F18D24;
  box-shadow: 0 0 0 2px rgba(241,141,36,0.12);
}
.cf-muted {
  color: #999;
  font-size: 12px;
}
.cf-result-box {
  margin-top: 16px;
}
.cf-result-box video {
  width: 100%;
  max-width: 480px;
  border-radius: 8px;
}
.cf-result-box img {
  max-width: 100%;
  border-radius: 8px;
}

/* --- 加载/空/错误状态 --- */
.cf-status {
  padding: 20px;
  text-align: center;
  color: #888;
  font-size: 13px;
}
.cf-status.warn {
  color: #d46b08;
  background: #fff7e6;
  border-radius: 8px;
}
.cf-status.error {
  color: #e74c3c;
  background: #fff2f0;
  border-radius: 8px;
}

/* --- 草稿提示弹窗 --- */
.cf-draft-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.cf-draft-toast button {
  padding: 4px 12px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  cursor: pointer;
}
.cf-draft-toast .cf-draft-yes {
  background: #F18D24;
  color: white;
}
.cf-draft-toast .cf-draft-no {
  background: #666;
  color: white;
}

/* --- 高级设置（复用批次B的 pro-* class） --- */
/* pro-advanced-panel / pro-advanced-toggle 等已在 style.css 中定义 */

/* ============================================================
   生产中心统一调度网关 — 状态卡片 UI（PCG-005）
   主色 F18D24 + 蓝点缀；橙底避黑字（深灰字）
   ============================================================ */

/* 面板 */
.gt-panel {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  padding: 18px;
  margin-top: 20px;
}
.gt-panel-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  color: #333;
}

/* 生成按钮栅格（自适应：≥1200=4列，768~1199=2列，<768=1列） */
.gt-btn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.gt-gen-btn {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #F18D24;
  background: #fff7ef;
  color: #b35e10;          /* 橙底避黑字 */
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gt-gen-btn:hover { background: #F18D24; color: #fff; }
.gt-gen-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* 状态卡片栅格（自适应断点同上） */
.gt-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* 单卡片 */
.gt-card {
  border: 1px solid #e8e8e8;
  border-left-width: 4px;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gt-card.gt-pending    { border-left-color: #bfbfbf; }
.gt-card.gt-generating { border-left-color: #1890ff; }   /* 生成中=蓝 */
.gt-card.gt-done       { border-left-color: #52c41a; }   /* 已完成=绿 */
.gt-card.gt-failed     { border-left-color: #ff4d4f; }   /* 失败=红 */

.gt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.gt-cap { color: #555; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.gt-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
}
.gt-pending    .gt-badge { background: #bfbfbf; }
.gt-generating .gt-badge { background: #1890ff; }
.gt-done       .gt-badge { background: #52c41a; }
.gt-failed     .gt-badge { background: #ff4d4f; }

.gt-body { flex: 1; font-size: 12px; color: #666; overflow: hidden; }
.gt-thumb {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 6px;
}
.gt-media { width: 100%; }
.gt-copy {
  white-space: pre-wrap;
  font-size: 12px;
  color: #444;
  background: #fafafa;
  border-radius: 6px;
  padding: 8px;
  max-height: 140px;
  overflow: auto;
}
.gt-err {
  font-size: 11px;
  color: #cf1322;
  background: #fff2f0;
  border-radius: 6px;
  padding: 6px 8px;
}
.gt-actions { display: flex; justify-content: flex-end; }
.gt-btn {
  padding: 5px 14px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  cursor: pointer;
}
.gt-retry { background: #ff4d4f; color: #fff; }
.gt-retry:hover { background: #d9363e; }

/* 断点：平板两列 */
@media (max-width: 1199px) {
  .gt-btn-grid, .gt-card-grid { grid-template-columns: repeat(2, 1fr); }
}
/* 断点：手机单列 */
@media (max-width: 767px) {
  .gt-btn-grid, .gt-card-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   提示词预览抽屉（网关全覆盖升级 T01 / REQ-B2/B3）
   复用生产中心主色 F18D24；弹窗内承载于 #modal-body
   ============================================================ */
.ppd { font-size: 13px; color: #333; }
.ppd-meta {
  font-size: 12px;
  color: #888;
  background: #f7f8fa;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 14px;
}
.ppd-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  margin-bottom: 12px;
  user-select: none;
}
.ppd-field { margin-bottom: 14px; }
.ppd-label {
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}
.ppd-textarea {
  width: 100%;
  padding: 10px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  resize: vertical;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.ppd-textarea:focus {
  border-color: #F18D24;
  box-shadow: 0 0 0 2px rgba(241,141,36,0.12);
}
.ppd-preview-wrap { margin-bottom: 16px; }
.ppd-preview {
  background: #fbfbfb;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
  color: #444;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow: auto;
  margin: 0;
}
.ppd-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.ppd-actions .gt-btn {
  padding: 8px 22px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #d0d0d0;
  background: #fff;
  color: #333;
  transition: all 0.15s;
}
.ppd-actions .gt-btn:hover { background: #f5f5f5; }
.ppd-actions .gt-confirm {
  background: #F18D24;
  border-color: #F18D24;
  color: #fff;
}
.ppd-actions .gt-confirm:hover { background: #d47a1e; border-color: #d47a1e; }

/* createProductionButton 单按钮容器：在 .gt-btn-grid 中作为一格，卡片单列显示 */
.gt-production { min-width: 0; }
.gt-production .gt-card-grid { grid-template-columns: 1fr; margin-top: 8px; }
