/* ═══════════════════════════════════════════════
   Sellevio Workspace — 样式
   登录后专属工作台页面
═══════════════════════════════════════════════ */

:root {
  --brand: #7C3AED;
  --brand-mid: #8B5CF6;
  --brand-light: #EDE9FE;
  --accent: #FF4D00;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --green: #10B981;
  --red: #EF4444;
  --yellow: #F59E0B;
  --blue: #3B82F6;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --transition: .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

/* ── 顶栏 ── */
.ws-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}
.ws-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--gray-900); font-weight: 700; font-size: 16px;
}
.ws-logo-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--brand) 0%, #A78BFA 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px;
}
.ws-topbar-center {
  flex: 1; display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--gray-500);
}
.ws-topbar-center i { color: var(--gray-400); }
.ws-topbar-right {
  display: flex; align-items: center; gap: 12px;
}
.ws-credits-badge {
  display: flex; align-items: center; gap: 5px;
  background: var(--brand-light); color: var(--brand);
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
}
.ws-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, #A78BFA 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px; cursor: pointer;
  position: relative;
}
.ws-avatar-menu {
  position: absolute; top: 40px; right: 0; width: 200px;
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 200;
}
.ws-avatar-menu.hidden { display: none; }
.ws-menu-header {
  padding: 12px 16px; border-bottom: 1px solid var(--gray-100);
}
.ws-menu-name { font-weight: 600; font-size: 13px; color: var(--gray-800); }
.ws-menu-email { font-size: 11px; color: var(--gray-500); margin-top: 1px; }
.ws-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; cursor: pointer; font-size: 13px; color: var(--gray-600);
  transition: background var(--transition);
  border: none; background: none; width: 100%; text-align: left;
}
.ws-menu-item:hover { background: var(--gray-50); color: var(--gray-800); }
.ws-menu-item.danger { color: var(--red); }
.ws-menu-item.danger:hover { background: #FEF2F2; }

/* ── 主布局 ── */
.ws-layout {
  display: flex;
  padding-top: 56px;
  min-height: 100vh;
}

/* ── 左侧边栏 ── */
.ws-sidebar {
  width: 240px; flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--gray-200);
  padding: 20px 12px;
  display: flex; flex-direction: column; gap: 4px;
  position: fixed; top: 56px; left: 0; bottom: 0; overflow-y: auto;
}
.ws-sidebar-section {
  font-size: 11px; font-weight: 600; color: var(--gray-400);
  letter-spacing: .08em; text-transform: uppercase;
  padding: 8px 8px 4px;
  margin-top: 8px;
}
.ws-sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: var(--gray-600); font-weight: 500;
  transition: background var(--transition), color var(--transition);
  text-decoration: none; border: none; background: none; width: 100%;
}
.ws-sidebar-item:hover { background: var(--gray-100); color: var(--gray-800); }
.ws-sidebar-item.active { background: var(--brand-light); color: var(--brand); }
.ws-sidebar-item i { width: 16px; text-align: center; flex-shrink: 0; }
.ws-sidebar-badge {
  margin-left: auto; background: var(--brand); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px;
}

/* ── 主内容区 ── */
.ws-main {
  flex: 1;
  margin-left: 240px;
  padding: 32px 40px;
  min-height: calc(100vh - 56px);
}
/* 内容居中包裹层 */
.ws-main-inner {
  max-width: 960px;
  margin: 0 auto;
}

/* ── 页面标题行 ── */
.ws-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.ws-page-title { font-size: 22px; font-weight: 800; color: var(--gray-900); }
.ws-page-sub { font-size: 13px; color: var(--gray-500); margin-top: 2px; }

/* ── 按钮 ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--brand) 0%, #A78BFA 100%);
  color: #fff; font-weight: 600; font-size: 13px;
  padding: 9px 18px; border-radius: 8px; border: none; cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  text-decoration: none;
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; color: var(--gray-700); font-weight: 500; font-size: 13px;
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--gray-200);
  cursor: pointer; transition: background var(--transition);
}
.btn-secondary:hover { background: var(--gray-50); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; color: var(--gray-500); font-size: 13px;
  padding: 6px 10px; border-radius: 6px; border: none; cursor: pointer;
  transition: color var(--transition), background var(--transition);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-700); }

/* ── 统计卡片 ── */
.ws-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 28px;
}
.stat-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
}
.stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.stat-icon.purple { background: var(--brand-light); color: var(--brand); }
.stat-icon.green  { background: #D1FAE5; color: var(--green); }
.stat-icon.blue   { background: #DBEAFE; color: var(--blue); }
.stat-icon.orange { background: #FFEDD5; color: #F97316; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-label { font-size: 12px; color: var(--gray-500); margin-top: 3px; }

/* ── 项目列表 ── */
.ws-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.ws-section-title { font-size: 15px; font-weight: 700; color: var(--gray-800); }
.ws-project-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
  margin-bottom: 32px;
}

/* 新建项目卡片 */
.project-card-new {
  background: #fff; border: 2px dashed var(--gray-200);
  border-radius: var(--radius); padding: 32px 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; cursor: pointer; min-height: 160px;
  transition: border-color var(--transition), background var(--transition);
}
.project-card-new:hover { border-color: var(--brand-mid); background: var(--brand-light); }
.project-card-new i { font-size: 24px; color: var(--gray-300); transition: color var(--transition); }
.project-card-new:hover i { color: var(--brand); }
.project-card-new span { font-size: 13px; color: var(--gray-400); font-weight: 500; }
.project-card-new:hover span { color: var(--brand); }

/* 项目卡片 */
.project-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer; transition: box-shadow var(--transition), transform var(--transition);
}
.project-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.project-card-thumb {
  height: 120px; background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: var(--gray-300); position: relative; overflow: hidden;
}
.project-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.project-card-thumb .thumb-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
}
.project-card:hover .thumb-overlay { opacity: 1; }
.project-card-body { padding: 14px 16px; }
.project-card-name { font-size: 14px; font-weight: 600; color: var(--gray-800); margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-card-meta { font-size: 12px; color: var(--gray-400); display: flex; align-items: center; gap: 8px; }
.project-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
}
.project-status.done    { background: #D1FAE5; color: #059669; }
.project-status.ing     { background: #DBEAFE; color: #2563EB; }
.project-status.draft   { background: var(--gray-100); color: var(--gray-500); }
.project-status.error   { background: #FEE2E2; color: var(--red); }

/* ── 项目卡片操作按钮栏 ── */
.project-card-actions-bar {
  padding: 0 12px 10px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.project-card-action {
  border: none;
  background: #F3F4F6;
  color: #6B7280;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.project-card-action:hover { background: #E5E7EB; color: #374151; }
.project-card-action-edit { background: #EDE9FE; color: #7C3AED; }
.project-card-action-edit:hover { background: #DDD6FE; color: #5B21B6; }
.project-card-action-retry { background: #FEF3C7; color: #D97706; }
.project-card-action-retry:hover { background: #FDE68A; color: #92400E; }
.project-card-action-delete { background: transparent; color: #F87171; opacity: 0.6; transition: opacity .15s, background .15s; }
.project-card-action-delete:hover { background: #FEE2E2; color: #DC2626; opacity: 1; }

/* ── 新建项目面板（右侧抽屉/Modal）── */
.ws-drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 300; opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.ws-drawer-overlay.active { opacity: 1; pointer-events: all; }

.ws-drawer {
  position: fixed; top: 0; right: -980px; bottom: 0; width: 960px;
  background: #fff; z-index: 400;
  box-shadow: -8px 0 48px rgba(0,0,0,.15);
  transition: right .35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow: hidden;
}
.ws-drawer.open { right: 0; }

/* 抽屉双栏布局 */
.ws-drawer-body {
  flex: 1; overflow: hidden;
  display: flex; flex-direction: row;
}
.ws-drawer-left {
  width: 380px; flex-shrink: 0;
  border-right: 1px solid var(--gray-200);
  padding: 24px 28px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 0;
}
.ws-drawer-right {
  flex: 1;
  background: var(--gray-50);
  overflow-y: auto;
  padding: 24px;
  display: flex; flex-direction: column;
}

.ws-drawer-header {
  padding: 16px 24px; border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
  background: #fff;
}
.ws-drawer-title { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.ws-drawer-close {
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: var(--gray-100); cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--gray-500); font-size: 14px; transition: background var(--transition);
}
.ws-drawer-close:hover { background: var(--gray-200); }

/* ws-drawer-body 已被双栏结构取代，保留此注释防止误删 */

/* ── 步骤条容器（直接在 ws-drawer 内，紧凑版，高度约 38px）── */
.ws-steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 7px 20px;
  background: #FAFAFA;
  border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0;
}
.ws-step {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.ws-step:last-child { flex: 0; }

/* 圆点：非激活/完成状态缩小为 18px，减少视觉噪音 */
.ws-step-num {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
  border: 1.5px solid var(--gray-300); color: var(--gray-400); background: #fff;
  transition: all var(--transition);
}
.ws-step.active .ws-step-num {
  width: 22px; height: 22px; font-size: 11px;
  border-color: var(--brand); color: var(--brand); background: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.ws-step.done .ws-step-num {
  border-color: var(--green); color: #fff; background: var(--green);
}

/* 标签：只有激活步骤显示文字，其余隐藏，节省空间 */
.ws-step-label {
  font-size: 11px; font-weight: 600; color: var(--brand);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: none; /* 默认隐藏 */
}
.ws-step.active .ws-step-label { display: block; }
.ws-step.done .ws-step-label   { display: none; }

/* 连接线 */
.ws-step-line {
  flex: 1; height: 1.5px; background: var(--gray-200); margin: 0 4px; min-width: 12px;
}
.ws-step-line.done { background: var(--green); }

/* ── Step 面板 ── */
.ws-step-panel { display: none; }
.ws-step-panel.active { display: flex; flex-direction: row; flex: 1; overflow: hidden; }

/* 图片上传区 */
.upload-area {
  border: 2px dashed var(--gray-300); border-radius: 14px;
  padding: 36px 24px; text-align: center; cursor: pointer;
  transition: all var(--transition); background: var(--gray-50);
  position: relative;
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--brand-mid); background: var(--brand-light);
}
.upload-area input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-icon { font-size: 36px; color: var(--gray-300); margin-bottom: 10px; }
.upload-area:hover .upload-icon, .upload-area.dragover .upload-icon { color: var(--brand); }
.upload-title { font-size: 15px; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.upload-sub { font-size: 12px; color: var(--gray-400); }

/* 图片预览网格 */
.img-preview-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 18px;
}
.img-preview-slot {
  aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  border: 2px dashed var(--gray-200); position: relative;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-50);
  cursor: pointer; transition: border-color var(--transition);
}
.img-preview-slot:hover { border-color: var(--brand-mid); }
.img-preview-slot img { width: 100%; height: 100%; object-fit: cover; }
/* 旧底部标签（保留兼容，不再主动使用） */
.img-preview-slot .slot-label {
  font-size: 10px; color: var(--gray-400); text-align: center;
  position: absolute; bottom: 5px; left: 0; right: 0;
}

/* 新：顶部视角名称标签 */
.img-preview-slot .slot-label-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: rgba(124, 58, 237, 0.07);
  color: var(--brand);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  padding: 4px 2px 3px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 8px 8px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  line-height: 1.2;
}

/* 新：中心上传图标 */
.img-preview-slot .slot-upload-icon {
  font-size: 20px;
  color: #C4B5FD;
  transition: color 0.18s, transform 0.18s;
  margin-top: 8px; /* 给顶部标签留空间 */
}
.img-preview-slot.upload-slot:hover .slot-upload-icon {
  color: var(--brand);
  transform: scale(1.15);
}
.img-preview-slot .slot-remove {
  position: absolute; top: 5px; right: 5px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(239,68,68,.92); color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0;
  transition: opacity .18s ease, transform .18s ease, background .15s ease;
  border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 2px 6px rgba(0,0,0,.28);
  z-index: 10;
  pointer-events: none;
}
.img-preview-slot:hover .slot-remove {
  opacity: 1;
  pointer-events: all;
}
.img-preview-slot .slot-remove:hover {
  background: rgba(220,38,38,1);
  transform: scale(1.15);
}
/* 有图片时加一层遮罩，让删除按钮更清晰 */
.img-preview-slot.has-image::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  transition: background .18s ease;
  pointer-events: none;
  border-radius: 8px;
}
.img-preview-slot.has-image:hover::after {
  background: rgba(0,0,0,.12);
}
.img-preview-slot .slot-add {
  font-size: 20px; color: var(--gray-300);
}

/* 上传中状态 */
.img-preview-slot.uploading img { opacity: .45; }
.slot-uploading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.55);
  color: var(--brand); font-size: 20px;
  z-index: 5;
}
/* 本地预览 + 上传中蒙层（blob URL 预览方案） */
.img-preview-slot.uploading-preview { border-style: solid; border-color: var(--brand-mid); }
.slot-uploading-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  background: rgba(124,58,237,.55);
  color: #fff; font-size: 16px; z-index: 6;
}
.slot-uploading-overlay span { font-size: 10px; font-weight: 600; letter-spacing: .3px; }
/* 上传错误状态 */
.img-preview-slot.upload-error { border-color: var(--red); border-style: solid; }
.img-preview-slot.upload-error img { opacity: .4; }
.slot-error-badge {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff; font-size: 11px;
  padding: 2px 7px; border-radius: 6px; z-index: 5;
  white-space: nowrap;
}

/* 表单 */
.ws-form-group { margin-bottom: 18px; }
.ws-form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--gray-700); margin-bottom: 6px;
}
.ws-form-label span { color: var(--gray-400); font-weight: 400; margin-left: 4px; }
.ws-input, .ws-select, .ws-textarea {
  width: 100%; padding: 9px 12px; font-size: 13px;
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  background: #fff; color: var(--gray-800); outline: none;
  transition: border-color var(--transition);
  font-family: inherit;
}
.ws-input:focus, .ws-select:focus, .ws-textarea:focus { border-color: var(--brand-mid); }
.ws-textarea { resize: vertical; min-height: 80px; }
.ws-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Platform 选择器 */
.platform-selector {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px;
}
.platform-chip {
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  padding: 8px 10px; cursor: pointer; text-align: center;
  font-size: 12px; font-weight: 500; color: var(--gray-600);
  transition: all var(--transition); background: #fff;
  display: flex; align-items: center; gap: 6px; justify-content: center;
}
.platform-chip:hover { border-color: var(--brand-mid); color: var(--brand); background: var(--brand-light); }
.platform-chip.selected { border-color: var(--brand); color: var(--brand); background: var(--brand-light); font-weight: 600; }
.platform-chip.soon { opacity: .45; pointer-events: none; }

/* ── AI 生成进度 ── */
.ws-progress-wrap {
  text-align: center; padding: 20px 0;
}
.ws-progress-title { font-size: 17px; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.ws-progress-sub { font-size: 13px; color: var(--gray-500); margin-bottom: 28px; }

.ws-pipeline {
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px;
}
.pipeline-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 10px; padding: 14px 18px;
  transition: all .3s ease;
}
.pipeline-item.running { background: #EFF6FF; border-color: #BFDBFE; }
.pipeline-item.done    { background: #F0FDF4; border-color: #BBF7D0; }
.pipeline-item.error   { background: #FEF2F2; border-color: #FECACA; }
.pipeline-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  background: var(--gray-200); color: var(--gray-500);
}
.pipeline-item.running .pipeline-icon { background: #DBEAFE; color: var(--blue); }
.pipeline-item.done    .pipeline-icon { background: #D1FAE5; color: var(--green); }
.pipeline-item.error   .pipeline-icon { background: #FEE2E2; color: var(--red); }
.pipeline-info { flex: 1; text-align: left; }
.pipeline-name { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.pipeline-desc { font-size: 12px; color: var(--gray-500); margin-top: 1px; }
.pipeline-status { font-size: 12px; font-weight: 500; }
.pipeline-item.running .pipeline-status { color: var(--blue); }
.pipeline-item.done    .pipeline-status { color: var(--green); }
.pipeline-item.error   .pipeline-status { color: var(--red); }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .8s linear infinite; display: inline-block; }

/* ── 结果展示 ── */
.ws-result-tabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  border-bottom: 2px solid var(--gray-200); padding-bottom: 0;
}
.ws-result-tab {
  padding: 8px 16px; font-size: 13px; font-weight: 500; cursor: pointer;
  color: var(--gray-500); border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all var(--transition); border: none; background: none;
}
.ws-result-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.ws-result-tab:hover:not(.active) { color: var(--gray-700); }

.ws-result-panel { display: none; }
.ws-result-panel.active { display: block; }

/* 事实卡 */
.fact-card {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 10px; padding: 18px;
}
.fact-card-row { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.fact-card-label {
  font-size: 11px; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .06em; min-width: 90px; padding-top: 1px;
}
.fact-card-value { font-size: 13px; color: var(--gray-800); flex: 1; }
.fact-tag {
  display: inline-flex; align-items: center;
  background: var(--brand-light); color: var(--brand);
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; margin: 2px 2px 0 0;
}
.fact-tag.green { background: #D1FAE5; color: #059669; }
.fact-tag.red   { background: #FEE2E2; color: var(--red); }
.fact-tag.gray  { background: var(--gray-100); color: var(--gray-500); }

/* 文案展示 */
.copy-section { margin-bottom: 20px; }
.copy-section-title {
  font-size: 12px; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px;
}
.copy-content {
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: 8px;
  padding: 12px 14px; font-size: 13px; color: var(--gray-800); line-height: 1.7;
  position: relative;
}
.copy-content ul { padding-left: 16px; }
.copy-content li { margin-bottom: 4px; }
.copy-copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: var(--gray-100); border: none; border-radius: 6px;
  padding: 4px 8px; font-size: 11px; color: var(--gray-500);
  cursor: pointer; transition: all var(--transition);
}
.copy-copy-btn:hover { background: var(--gray-200); color: var(--gray-700); }
.keyword-list { display: flex; flex-wrap: wrap; gap: 6px; }
.keyword-tag {
  background: var(--gray-100); color: var(--gray-600);
  font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 500;
}

/* 合规报告 */
.compliance-score-wrap {
  display: flex; align-items: center; gap: 20px; margin-bottom: 20px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 10px; padding: 16px 20px;
}
.compliance-score-circle {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
}
.score-high   { background: #D1FAE5; color: #059669; }
.score-mid    { background: #FEF3C7; color: #D97706; }
.score-low    { background: #FEE2E2; color: var(--red); }
.compliance-summary { font-size: 14px; color: var(--gray-700); }
.compliance-summary strong { font-weight: 700; display: block; margin-bottom: 4px; }

.compliance-issue {
  display: flex; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--gray-200); border-radius: 8px; margin-bottom: 8px;
  background: #fff;
}
.issue-icon { font-size: 14px; flex-shrink: 0; padding-top: 1px; }
.issue-type-error   .issue-icon { color: var(--red); }
.issue-type-warning .issue-icon { color: var(--yellow); }
.issue-type-info    .issue-icon { color: var(--blue); }
.issue-field { font-size: 12px; font-weight: 600; color: var(--gray-500); margin-bottom: 2px; }
.issue-msg   { font-size: 13px; color: var(--gray-700); }
.issue-fix   { font-size: 12px; color: var(--green); margin-top: 4px; }

/* ── 抽屉底部操作栏 ── */
.ws-drawer-footer {
  padding: 14px 28px; border-top: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
  background: #fff;
}

/* ── Toast ── */
.ws-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--gray-900); color: #fff; padding: 10px 20px; border-radius: 24px;
  font-size: 13px; font-weight: 500; z-index: 9999; opacity: 0;
  transition: all .3s ease; pointer-events: none; white-space: nowrap;
}
.ws-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ws-toast.success { background: var(--green); }
.ws-toast.error   { background: var(--red); }
.ws-toast.info    { background: var(--blue); }

/* ── 空状态 ── */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--gray-400);
}
.empty-state i { font-size: 48px; margin-bottom: 14px; opacity: .4; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; }

/* ── 积分不足提示 ── */
.credits-warning {
  background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 8px;
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: #92400E; margin-bottom: 16px;
}

/* ── 充值 Modal ── */
.recharge-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.95);
  width: 640px; max-width: calc(100vw - 32px); max-height: 88vh;
  background: #fff; border-radius: 20px; z-index: 500;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  overflow: hidden; display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: all .25s cubic-bezier(.4,0,.2,1);
}
.recharge-modal.open { opacity: 1; pointer-events: all; transform: translate(-50%, -50%) scale(1); }
.recharge-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 24px 28px 20px; border-bottom: 1px solid var(--gray-100);
}
.recharge-title { font-size: 18px; font-weight: 800; color: var(--gray-900); display: flex; align-items: center; gap: 8px; }
.recharge-title i { color: var(--brand); }
.recharge-sub { font-size: 13px; color: var(--gray-500); margin-top: 3px; }
.recharge-body { padding: 20px 28px 28px; overflow-y: auto; }

.credit-explain {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
  background: var(--gray-50); border-radius: 10px; padding: 12px 16px;
}
.ce-item2 {
  font-size: 12px; color: var(--gray-600);
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--gray-200);
  padding: 5px 12px; border-radius: 20px;
}
.ce-item2 strong { color: var(--gray-800); }

.product-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.product-card {
  border: 2px solid var(--gray-200); border-radius: 14px;
  padding: 20px; cursor: pointer; position: relative;
  transition: all .2s ease; background: #fff;
}
.product-card:hover { border-color: var(--brand-mid); box-shadow: 0 4px 16px rgba(124,58,237,.12); transform: translateY(-2px); }
.product-card.popular { border-color: var(--brand); background: var(--brand-light); }
.product-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 12px; border-radius: 10px; white-space: nowrap;
}
.product-credits { font-size: 16px; font-weight: 800; color: var(--gray-900); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.product-credits i { color: #F59E0B; }
.product-price { font-size: 24px; font-weight: 900; color: var(--brand); margin-bottom: 2px; }
.product-per { font-size: 11px; color: var(--gray-400); margin-bottom: 8px; }
.product-desc { font-size: 12px; color: var(--gray-500); line-height: 1.5; margin-bottom: 14px; }
.product-btn {
  width: 100%; padding: 10px; border-radius: 8px; border: 1.5px solid var(--brand);
  background: #fff; color: var(--brand); font-weight: 600; font-size: 13px; cursor: pointer;
  transition: all .15s ease;
}
.product-btn:hover { background: var(--brand); color: #fff; }
.product-btn.popular { background: var(--brand); color: #fff; border-color: var(--brand); }
.product-btn.popular:hover { background: #6D28D9; }

/* ── 响应式 ── */
@media (max-width: 1100px) {
  .ws-drawer { width: 100%; right: -100%; }
  .ws-drawer-left { width: 340px; padding: 20px; }
}
@media (max-width: 900px) {
  .ws-sidebar { display: none; }
  .ws-main { margin-left: 0; padding: 16px; }
  .ws-stats { grid-template-columns: repeat(2, 1fr); }
  .ws-drawer { width: 100%; right: -100%; }
  .ws-drawer-body { flex-direction: column; }
  .ws-drawer-left { width: 100%; border-right: none; border-bottom: 1px solid var(--gray-200); max-height: 60vh; }
  .ws-drawer-right { display: none; }
  .img-preview-grid { grid-template-columns: repeat(3, 1fr); }
  .platform-selector { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .ws-stats { grid-template-columns: 1fr 1fr; }
  .ws-form-row { grid-template-columns: 1fr; }

  /* 移动端抽屉全屏 */
  .ws-drawer {
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
  }
  .ws-drawer-body { padding: 12px; }

  /* 步骤条在小屏进一步压缩 */
  .ws-steps { padding: 5px 12px; }
  .ws-step-num { width: 16px; height: 16px; font-size: 9px; }
  .ws-step.active .ws-step-num { width: 18px; height: 18px; font-size: 10px; }
  .ws-step-line { min-width: 6px; }

  /* 图片槽位在小屏 2 列 */
  .img-preview-grid { grid-template-columns: repeat(2, 1fr); }
  .img-preview-slot { aspect-ratio: 1; }

  /* 平台选择器单列 */
  .platform-selector { grid-template-columns: repeat(2, 1fr); }
  .platform-chip { font-size: 12px; padding: 7px 10px; }

  /* 操作按钮栏换行 */
  #resultActionsBar { gap: 6px; }
  #resultActionsBar button { font-size: 11px; padding: 6px 10px; }

  /* 顶栏文字隐藏在小屏 */
  .ws-topbar-center span { display: none; }
  .ws-credits-badge span:last-child { display: none; }
}

/* ══════════════════════════════════════════════
   通用 Modal 组件
══════════════════════════════════════════════ */
.ws-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 800; padding: 16px;
  backdrop-filter: blur(2px);
  transition: opacity .2s ease;
}
.ws-modal-overlay.hidden { display: none; }
.ws-modal {
  background: #fff; border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  max-height: 90vh; overflow: hidden;
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { transform: translateY(12px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.ws-modal-header {
  padding: 18px 20px; border-bottom: 1px solid #F3F4F6;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.ws-modal-header h3 { font-size: 16px; font-weight: 700; color: #111827; margin: 0; }
.ws-modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  border: none; background: #F3F4F6; color: #6B7280;
  cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.ws-modal-close:hover { background: #E5E7EB; color: #111827; }
.ws-modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.ws-modal-footer {
  padding: 14px 20px; border-top: 1px solid #F3F4F6;
  display: flex; justify-content: flex-end; gap: 10px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   图片上传区 — 拖拽上传
═══════════════════════════════════════════ */
.img-drop-zone {
  border: 2px dashed #C4B5FD;
  border-radius: 14px;
  background: #FAFAF9;
  transition: all 0.2s ease;
  overflow: hidden;
}
.img-drop-zone.drag-over {
  border-color: #7C3AED;
  background: #F5F3FF;
  box-shadow: 0 0 0 4px rgba(124,58,237,0.08);
}
.drop-zone-inner {
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.drop-zone-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg,#EDE9FE,#DDD6FE);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #7C3AED;
  margin-bottom: 4px;
}
.drop-zone-title {
  font-size: 14px; font-weight: 600; color: #374151;
}
.drop-zone-link { color: #7C3AED; text-decoration: underline; }
.drop-zone-sub {
  font-size: 12px; color: #9CA3AF;
}

/* 槽位 badge */
.slot-src-badge {
  position: absolute; top: 5px; left: 5px;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700;
}
.url-badge { background: #BFDBFE; color: #1D4ED8; }
.r2-badge  { background: #BBF7D0; color: #15803D; }

/* 槽位视图角度标签（可点击切换） */
.slot-angle-tag {
  position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  background: rgba(17,24,39,.68); color: #fff;
  font-size: 10px; font-weight: 600; letter-spacing: .2px;
  padding: 2px 7px; border-radius: 6px; border: none;
  cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 2px;
  transition: background .15s ease;
  z-index: 8;
}
.slot-angle-tag:hover { background: rgba(124,58,237,.85); }
.img-preview-slot:hover .slot-angle-tag { opacity: 1; }

/* 槽位拖拽悬停 */
.img-preview-slot.drag-over {
  border-color: #7C3AED !important;
  background: #F5F3FF !important;
  transform: scale(1.04);
}

/* ═══════════════════════════════════════════
   视角分配 Modal
═══════════════════════════════════════════ */
.angle-modal-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(17,24,39,.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.angle-modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
  width: 100%; max-width: 540px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: slideUp .2s ease;
  overflow: hidden;
}
@keyframes slideUp { from { transform: translateY(16px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

.angle-modal-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid #F3F4F6;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  flex-shrink: 0;
}
.angle-modal-title {
  font-size: 16px; font-weight: 700; color: #111827;
  display: flex; align-items: center; gap: 8px;
}
.angle-modal-title i { color: #7C3AED; }
.angle-modal-sub {
  font-size: 12px; color: #9CA3AF; margin-top: 3px; font-weight: 400;
}
.angle-modal-close {
  flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 8px;
  border: none; background: #F3F4F6;
  color: #6B7280; font-size: 14px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.angle-modal-close:hover { background: #E5E7EB; color: #111827; }

.angle-modal-body {
  padding: 16px 24px;
  overflow-y: auto;
  flex: 1;
  display: flex; flex-direction: column; gap: 10px;
}

/* 每一行：缩略图 + 文件名 + 角度选择器 */
.angle-row {
  display: flex; align-items: center; gap: 12px;
  background: #F9FAFB;
  border: 1.5px solid #F3F4F6;
  border-radius: 12px;
  padding: 10px 12px;
  transition: border-color .15s;
}
.angle-row:hover { border-color: #DDD6FE; }

.angle-row-thumb {
  width: 56px; height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #E5E7EB;
}

.angle-row-info {
  flex: 1; min-width: 0;
}
.angle-row-name {
  font-size: 12px; font-weight: 600; color: #374151;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.angle-row-size {
  font-size: 11px; color: #9CA3AF; margin-top: 2px;
}

.angle-row-select {
  flex-shrink: 0;
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1.5px solid #DDD6FE;
  border-radius: 8px;
  padding: 7px 28px 7px 11px;
  font-size: 13px; font-weight: 600; color: #7C3AED;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  min-width: 90px;
}
.angle-row-select:hover { border-color: #7C3AED; }
.angle-row-select:focus { outline: none; border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124,58,237,.12); }

/* 角度冲突 / 数量不足 提示 */
.angle-modal-tips {
  display: flex; flex-direction: column; gap: 5px;
  min-height: 0;
}
.angle-conflict-tip,
.angle-count-tip {
  font-size: 11px;
  border-radius: 8px; padding: 7px 12px;
  display: none; align-items: center; gap: 6px;
}
.angle-conflict-tip {
  color: #D97706; background: #FFFBEB; border: 1px solid #FDE68A;
}
.angle-count-tip {
  color: #6D28D9; background: #F5F3FF; border: 1px solid #DDD6FE;
}
.angle-conflict-tip.show { display: flex; }
.angle-count-tip.show    { display: flex; }

/* 行内删除按钮 */
.angle-row-del {
  flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 7px;
  border: 1.5px solid #E5E7EB; background: #fff;
  color: #9CA3AF; font-size: 11px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.angle-row-del:hover { border-color: #FCA5A5; background: #FEF2F2; color: #EF4444; }

/* 底部布局：左侧提示 | 右侧操作区 */
.angle-modal-footer {
  padding: 14px 24px;
  border-top: 1px solid #F3F4F6;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-shrink: 0;
  background: #FAFAFA;
  flex-wrap: wrap;
}
.angle-modal-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.angle-counter {
  font-size: 12px; font-weight: 700;
  color: #7C3AED; background: #F5F3FF;
  border: 1.5px solid #DDD6FE;
  border-radius: 8px; padding: 4px 10px;
  white-space: nowrap;
}
.btn-add-more {
  padding: 7px 14px; border-radius: 9px;
  border: 1.5px dashed #C4B5FD; background: #FAFAFA;
  font-size: 12px; font-weight: 600; color: #7C3AED;
  cursor: pointer; transition: all .15s;
  display: flex; align-items: center; gap: 5px;
}
.btn-add-more:hover { border-color: #7C3AED; background: #F5F3FF; }
.angle-modal-footer .btn-cancel {
  padding: 7px 16px; border-radius: 9px;
  border: 1.5px solid #E5E7EB; background: #fff;
  font-size: 13px; font-weight: 600; color: #6B7280;
  cursor: pointer; transition: all .15s;
}
.angle-modal-footer .btn-cancel:hover { border-color: #D1D5DB; background: #F9FAFB; color: #374151; }
.angle-modal-footer .btn-confirm {
  padding: 7px 20px; border-radius: 9px;
  border: none; background: #7C3AED;
  font-size: 13px; font-weight: 700; color: #fff;
  cursor: pointer; transition: background .15s;
  display: flex; align-items: center; gap: 6px;
}
.angle-modal-footer .btn-confirm:hover:not(:disabled) { background: #6D28D9; }
.angle-modal-footer .btn-confirm:disabled { background: #C4B5FD; cursor: not-allowed; }

/* ═══════════════════════════════════════════
   AI 图像生成 Tab 内容区
═══════════════════════════════════════════ */
.img-gen-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.img-gen-card {
  border: 1.5px solid #E5E7EB; border-radius: 12px;
  overflow: hidden; background: #FAFAFA;
  transition: border-color 0.2s;
}
.img-gen-card:hover { border-color: #C4B5FD; }
.img-gen-card-img {
  width: 100%; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: #F3F4F6; font-size: 48px; color: #D1D5DB;
  position: relative; overflow: hidden;
}
.img-gen-card-img img { width: 100%; height: 100%; object-fit: cover; }
.img-gen-card-body {
  padding: 10px 12px;
}
.img-gen-card-title { font-size: 12px; font-weight: 700; color: #374151; margin-bottom: 4px; }
.img-gen-card-meta  { font-size: 11px; color: #9CA3AF; }
.img-gen-card-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* 图像生成按钮区 */
.img-gen-controls {
  background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px;
}
.img-gen-type-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.img-gen-type-btn {
  padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1.5px solid #E5E7EB; background: white; color: #6B7280;
  transition: all 0.15s;
}
.img-gen-type-btn.active,
.img-gen-type-btn:hover { border-color: #7C3AED; background: #F5F3FF; color: #7C3AED; }

/* ── 移动端步骤条 ── */
@media (max-width: 480px) {
  .ws-steps { padding: 4px 10px; }
  .ws-step-num { width: 14px; height: 14px; font-size: 8px; }
  .ws-step.active .ws-step-num { width: 16px; height: 16px; font-size: 9px; }
  .ws-step-label { font-size: 10px; }
  .ws-step-line { min-width: 4px; margin: 0 2px; }
  .ws-project-grid { grid-template-columns: 1fr 1fr; }
  .project-card-thumb { height: 100px; }
}

/* ══════════════════════════════════════════════
   Step 0 — 平台选择（新增）
══════════════════════════════════════════════ */
.step0-panel {
  padding: 0;
}
.step0-section-title {
  font-size: 13px; font-weight: 700; color: var(--gray-700);
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.step0-section-title i { color: var(--brand); }

/* 主平台大卡片网格 */
.platform-main-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 20px;
}
.platform-main-card {
  border: 2px solid var(--gray-200); border-radius: 12px;
  padding: 14px 10px; cursor: pointer; text-align: center;
  background: #fff; transition: all .2s ease;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.platform-main-card:hover {
  border-color: var(--brand-mid); background: var(--brand-light);
  transform: translateY(-2px); box-shadow: 0 4px 12px rgba(124,58,237,.12);
}
.platform-main-card.selected {
  border-color: var(--brand); background: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}
.platform-main-card .pmc-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  background: var(--gray-100); color: var(--gray-500);
  transition: all .2s;
}
.platform-main-card.selected .pmc-icon,
.platform-main-card:hover .pmc-icon { background: #fff; color: var(--brand); }
.platform-main-card .pmc-name {
  font-size: 12px; font-weight: 600; color: var(--gray-700);
}
.platform-main-card.selected .pmc-name { color: var(--brand); }
.platform-main-card .pmc-region {
  font-size: 10px; color: var(--gray-400);
  background: var(--gray-100); padding: 1px 6px; border-radius: 8px;
}
.platform-main-card.selected .pmc-region { background: #fff; }

/* 副平台复选框行 */
.sub-platform-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 16px;
}
.sub-platform-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px; cursor: pointer;
  border: 1.5px solid var(--gray-200); background: #fff;
  transition: all .18s;
  user-select: none;
}
.sub-platform-item:hover { border-color: var(--brand-mid); background: var(--brand-light); }
.sub-platform-item.selected { border-color: var(--brand); background: var(--brand-light); }
.sub-platform-item.disabled { opacity: .4; pointer-events: none; }
.sub-platform-item input[type=checkbox] { display: none; }
.sub-platform-check {
  width: 16px; height: 16px; border-radius: 4px;
  border: 2px solid var(--gray-300); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.sub-platform-item.selected .sub-platform-check {
  background: var(--brand); border-color: var(--brand); color: #fff; font-size: 9px;
}
.sub-platform-item.selected .sub-platform-check::after { content: '✓'; }
.sub-platform-label { font-size: 12px; font-weight: 500; color: var(--gray-600); flex: 1; }
.sub-platform-item.selected .sub-platform-label { color: var(--brand); }
.sub-platform-cost {
  font-size: 10px; color: var(--gray-400);
  background: var(--gray-100); padding: 1px 6px; border-radius: 8px;
  white-space: nowrap;
}
.sub-platform-item.selected .sub-platform-cost { background: #fff; color: var(--brand); }

/* 积分预估面板 */
.credits-estimate-panel {
  background: #F8F7FF; border: 1.5px solid #DDD6FE;
  border-radius: 10px; padding: 12px 14px; margin-top: 4px;
}
.credits-estimate-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--gray-600); padding: 3px 0;
}
.credits-estimate-row.total {
  border-top: 1px solid #DDD6FE; margin-top: 6px; padding-top: 8px;
  font-weight: 700; color: var(--gray-900); font-size: 13px;
}
.credits-estimate-row.warn { color: #D97706; }
.credits-estimate-row.ok { color: var(--green); }
.credits-estimate-badge {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 8px;
}
.credits-estimate-badge.ok { background: #D1FAE5; color: #059669; }
.credits-estimate-badge.warn { background: #FEF3C7; color: #D97706; }
.credits-estimate-badge.error { background: #FEE2E2; color: var(--red); }

/* 图片策略说明小标签 */
.img-strategy-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; padding: 2px 7px; border-radius: 8px; font-weight: 600;
}
.img-strategy-tag.copy { background: #D1FAE5; color: #059669; }
.img-strategy-tag.crop { background: #DBEAFE; color: #1D4ED8; }
.img-strategy-tag.gen  { background: #FEF3C7; color: #D97706; }

/* ══════════════════════════════════════════════
   抽屉右栏 — 上下文面板
══════════════════════════════════════════════ */
.drawer-right-title {
  font-size: 13px; font-weight: 700; color: var(--gray-700);
  margin-bottom: 14px; display: flex; align-items: center; gap: 6px;
  padding-bottom: 10px; border-bottom: 1px solid var(--gray-200);
}
.drawer-right-title i { color: var(--brand); }

/* 右栏：拍摄指南 (Step 1) */
.shoot-guide-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 16px;
}
.shoot-guide-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: 10px; padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.shoot-guide-card .sgc-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.shoot-guide-card .sgc-label {
  font-size: 12px; font-weight: 700; color: var(--gray-800);
}
.shoot-guide-card .sgc-desc {
  font-size: 11px; color: var(--gray-500); line-height: 1.5;
}
.shoot-guide-tips {
  background: #FFFBEB; border: 1px solid #FDE68A;
  border-radius: 8px; padding: 10px 12px;
  font-size: 12px; color: #92400E; line-height: 1.6;
}
.shoot-guide-tips i { color: #F59E0B; margin-right: 4px; }

/* 右栏：平台规格 (Step 2) */
.platform-spec-panel {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: 10px; overflow: hidden;
}
.platform-spec-header {
  padding: 10px 14px; background: var(--brand-light);
  font-size: 13px; font-weight: 700; color: var(--brand);
  display: flex; align-items: center; gap: 6px;
}
.platform-spec-row {
  display: flex; gap: 8px; padding: 8px 14px;
  border-bottom: 1px solid var(--gray-100); align-items: flex-start;
}
.platform-spec-row:last-child { border-bottom: none; }
.platform-spec-label {
  font-size: 11px; font-weight: 600; color: var(--gray-500);
  width: 80px; flex-shrink: 0; padding-top: 1px;
}
.platform-spec-value {
  font-size: 12px; color: var(--gray-800); flex: 1; line-height: 1.5;
}

/* 右栏：AI生成进度预览 (Step 3) */
.ai-stream-panel {
  flex: 1; display: flex; flex-direction: column; gap: 8px;
}
.ai-stream-block {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: 10px; padding: 12px 14px;
}
.ai-stream-block-title {
  font-size: 12px; font-weight: 700; color: var(--gray-700);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.ai-stream-content {
  font-size: 12px; color: var(--gray-600); line-height: 1.6;
  min-height: 40px; max-height: 120px; overflow-y: auto;
}
.ai-stream-content.loading { color: var(--gray-400); font-style: italic; }

/* 右栏：结果区 (Step 4) — Tab 移到右栏 */
.right-result-tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  border-bottom: 2px solid var(--gray-200); margin-bottom: 16px;
}
.right-result-tab {
  padding: 7px 12px; font-size: 12px; font-weight: 500;
  cursor: pointer; color: var(--gray-500);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all .2s; border: none; background: none; border-radius: 6px 6px 0 0;
  display: flex; align-items: center; gap: 4px;
}
.right-result-tab.active { color: var(--brand); border-bottom-color: var(--brand); background: var(--brand-light); }
.right-result-tab:hover:not(.active) { color: var(--gray-700); background: var(--gray-100); }
.right-result-tab .tab-badge {
  font-size: 9px; background: var(--brand); color: #fff;
  padding: 1px 4px; border-radius: 5px;
}
.right-result-tab.pending { color: var(--gray-400); }
.right-result-tab.pending .tab-gen-btn {
  font-size: 10px; background: var(--gray-100); color: var(--gray-500);
  padding: 1px 6px; border-radius: 6px; border: none; cursor: pointer;
  transition: all .15s;
}
.right-result-tab.pending:hover .tab-gen-btn {
  background: var(--brand-light); color: var(--brand);
}

/* Step 4 左栏：操作按钮区 */
.result-actions-panel {
  display: flex; flex-direction: column; gap: 10px;
}
.result-action-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px;
  border: 1.5px solid var(--gray-200); background: #fff;
  cursor: pointer; font-size: 13px; font-weight: 500; color: var(--gray-700);
  transition: all .2s; text-align: left; width: 100%;
}
.result-action-btn:hover { border-color: var(--brand-mid); background: var(--brand-light); color: var(--brand); }
.result-action-btn i { width: 20px; text-align: center; font-size: 14px; }
.result-action-btn .rab-desc { font-size: 11px; color: var(--gray-400); margin-top: 1px; font-weight: 400; }
.result-action-btn:hover .rab-desc { color: var(--brand-mid); }

/* 积分不足弹窗（简化版，去掉邀请） */
.credits-empty-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 900; padding: 16px;
}
.credits-empty-modal.hidden { display: none; }
.credits-empty-box {
  background: #fff; border-radius: 16px;
  padding: 32px 28px; max-width: 380px; width: 100%;
  text-align: center; box-shadow: 0 24px 80px rgba(0,0,0,.18);
  animation: modalIn .2s ease;
}
.credits-empty-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: #FEF3C7; color: #D97706;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin: 0 auto 16px;
}
.credits-empty-title { font-size: 18px; font-weight: 800; color: var(--gray-900); margin-bottom: 8px; }
.credits-empty-sub { font-size: 13px; color: var(--gray-500); margin-bottom: 24px; line-height: 1.6; }
.credits-empty-btns { display: flex; flex-direction: column; gap: 10px; }
.credits-empty-btns .btn-buy {
  padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: all .2s;
  background: linear-gradient(135deg, var(--brand), #A78BFA); color: #fff;
}
.credits-empty-btns .btn-buy:hover { opacity: .9; transform: translateY(-1px); }
.credits-empty-btns .btn-pro {
  padding: 11px 20px; border-radius: 10px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: 2px solid var(--brand); background: #fff; color: var(--brand);
  transition: all .2s;
}
.credits-empty-btns .btn-pro:hover { background: var(--brand-light); }
.credits-empty-btns .btn-skip {
  padding: 8px; font-size: 12px; color: var(--gray-400);
  cursor: pointer; border: none; background: none; text-decoration: underline;
}

/* 侧边栏：升级会员横幅 */
.sidebar-upgrade-banner {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--brand-light) 0%, #DDD6FE 100%);
  border-radius: 10px; cursor: pointer; transition: opacity .2s;
}
.sidebar-upgrade-banner:hover { opacity: .85; }
.sidebar-upgrade-banner .sub-title {
  font-size: 12px; font-weight: 700; color: var(--brand);
}
.sidebar-upgrade-banner .sub-desc {
  font-size: 11px; color: #7C3AED; margin-top: 2px;
}
.sidebar-upgrade-banner .sub-btn {
  margin-top: 8px; display: block; width: 100%;
  padding: 6px; text-align: center; border-radius: 7px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  border: none; cursor: pointer;
}

/* 侧边栏：任务/邀请入口 */
.sidebar-task-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: 8px; cursor: pointer;
  font-size: 12px; color: var(--gray-600); font-weight: 500;
  transition: background .2s; border: none; background: none; width: 100%;
  position: relative;
}
.sidebar-task-item:hover { background: var(--gray-100); color: var(--gray-800); }
.sidebar-task-dot {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
}

/* 副平台生成状态 Tab 增强 */
.sub-gen-status {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 9px; padding: 1px 5px; border-radius: 5px; font-weight: 600;
}
.sub-gen-status.done  { background: #D1FAE5; color: #059669; }
.sub-gen-status.gen   { background: #DBEAFE; color: #1D4ED8; }
.sub-gen-status.wait  { background: var(--gray-100); color: var(--gray-500); }
.sub-gen-status.error { background: #FEE2E2; color: var(--red); }

.platform-card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 20px;
}
.platform-card {
  border: 1.5px solid var(--gray-200); border-radius: 10px;
  padding: 12px 8px; cursor: pointer; text-align: center;
  transition: all var(--transition); background: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  position: relative; user-select: none;
}
.platform-card:hover { border-color: var(--brand-mid); background: var(--brand-light); }
.platform-card.selected {
  border-color: var(--brand); background: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.platform-card-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.platform-card-name { font-size: 11px; font-weight: 600; color: var(--gray-700); line-height: 1.2; }
.platform-card.selected .platform-card-name { color: var(--brand); }
.platform-card-check {
  position: absolute; top: 5px; right: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 9px;
  display: none; align-items: center; justify-content: center;
}
.platform-card.selected .platform-card-check { display: flex; }

/* 副平台复选框行 */
.secondary-platforms {
  margin-bottom: 16px;
}
.secondary-platform-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: 8px; cursor: pointer;
  border: 1.5px solid var(--gray-200); background: #fff;
  margin-bottom: 6px; transition: all var(--transition);
}
.secondary-platform-item:hover { border-color: var(--brand-mid); background: #FAFAFA; }
.secondary-platform-item.checked { border-color: var(--brand-mid); background: var(--brand-light); }
.secondary-platform-item.disabled { opacity: .4; pointer-events: none; }
.sp-left { display: flex; align-items: center; gap: 8px; }
.sp-icon { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.sp-name { font-size: 12px; font-weight: 600; color: var(--gray-700); }
.sp-cost { font-size: 11px; color: var(--gray-400); margin-left: 4px; }
.sp-checkbox {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--gray-300); background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all var(--transition);
}
.secondary-platform-item.checked .sp-checkbox {
  background: var(--brand); border-color: var(--brand);
  color: #fff; font-size: 10px;
}

/* 积分预估面板 */
.credits-estimate-panel {
  background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
  border: 1.5px solid var(--brand-light); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 16px;
}
.cep-title {
  font-size: 12px; font-weight: 700; color: var(--brand);
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.cep-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--gray-600); padding: 3px 0;
}
.cep-row-total {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700; color: var(--gray-900);
  border-top: 1px solid rgba(124,58,237,.2); margin-top: 8px; padding-top: 8px;
}
.cep-credits { font-weight: 700; color: var(--brand); }
.cep-credits-total { font-size: 16px; font-weight: 800; color: var(--brand); }
.cep-insufficient { color: var(--red) !important; }
.cep-warn {
  background: #FEF3C7; border: 1px solid #FDE68A;
  border-radius: 8px; padding: 8px 10px;
  font-size: 11px; color: #92400E;
  margin-top: 8px; display: none;
}
.cep-warn.show { display: block; }

/* ═══════════════════════════════════════════════
   右栏内容面板
═══════════════════════════════════════════════ */
.right-panel {
  height: 100%; display: flex; flex-direction: column;
  gap: 0; padding: 0;
}
.right-panel-title {
  font-size: 13px; font-weight: 700; color: var(--gray-700);
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.right-panel-title i { color: var(--brand); }

/* 视角指南卡片 */
.view-guide-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  margin-bottom: 16px;
}
.view-guide-card {
  border: 1.5px solid var(--gray-200); border-radius: 10px;
  padding: 12px 6px; text-align: center;
  background: #fff; transition: border-color var(--transition);
}
.view-guide-card:hover { border-color: var(--brand-mid); }
.vg-icon { font-size: 20px; margin-bottom: 6px; display: block; }
.vg-name { font-size: 10px; font-weight: 700; color: var(--gray-700); margin-bottom: 3px; }
.vg-desc { font-size: 10px; color: var(--gray-400); line-height: 1.4; }

/* 平台规格卡 */
.platform-spec-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 10px;
}
.psc-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 13px; font-weight: 700; color: var(--gray-800);
}
.psc-row { display: flex; gap: 8px; margin-bottom: 6px; font-size: 12px; }
.psc-label { color: var(--gray-400); min-width: 70px; flex-shrink: 0; }
.psc-value { color: var(--gray-700); font-weight: 500; }

/* Step 0 右栏欢迎区 */
.step0-right-welcome {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; text-align: center; gap: 12px; padding: 24px;
}
.step0-right-welcome .welcome-icon {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-light), #DDD6FE);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.step0-right-welcome h3 {
  font-size: 16px; font-weight: 700; color: var(--gray-800);
}
.step0-right-welcome p {
  font-size: 13px; color: var(--gray-500); line-height: 1.6;
  max-width: 220px;
}
.platform-selected-info {
  background: var(--brand-light); border: 1.5px solid var(--brand);
  border-radius: 12px; padding: 16px; width: 100%; text-align: left;
}
.psi-name { font-size: 15px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.psi-desc { font-size: 12px; color: var(--gray-600); line-height: 1.5; }
.psi-specs { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.psi-spec-row { display: flex; gap: 8px; font-size: 11px; }
.psi-spec-label { color: var(--gray-400); min-width: 60px; }
.psi-spec-val { color: var(--gray-700); font-weight: 600; }

/* Step 3 右栏实时流 */
.pipeline-stream {
  display: flex; flex-direction: column; gap: 8px;
}
.pipeline-stream-item {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: 10px; padding: 12px 14px;
  transition: all .3s ease;
}
.pipeline-stream-item.running { border-color: #BFDBFE; background: #EFF6FF; }
.pipeline-stream-item.done    { border-color: #BBF7D0; background: #F0FDF4; }
.pipeline-stream-item.error   { border-color: #FECACA; background: #FEF2F2; }
.psi-row { display: flex; align-items: center; gap: 10px; }
.psi-icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--gray-100); color: var(--gray-400);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.pipeline-stream-item.running .psi-icon { background: #DBEAFE; color: var(--blue); }
.pipeline-stream-item.done    .psi-icon { background: #D1FAE5; color: var(--green); }
.pipeline-stream-item.error   .psi-icon { background: #FEE2E2; color: var(--red); }
.psi-text { flex: 1; font-size: 12px; font-weight: 600; color: var(--gray-700); }
.psi-status { font-size: 11px; color: var(--gray-400); }
.pipeline-stream-item.running .psi-status { color: var(--blue); }
.pipeline-stream-item.done    .psi-status { color: var(--green); }
.pipeline-stream-item.error   .psi-status { color: var(--red); }

/* Step 4 右栏 — 快捷结果 */
.result-quick-panel {
  display: flex; flex-direction: column; gap: 12px;
}
.rqp-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: 10px; padding: 12px 14px;
}
.rqp-label {
  font-size: 11px; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px;
}
.rqp-value { font-size: 13px; color: var(--gray-800); line-height: 1.5; }
.rqp-score {
  font-size: 28px; font-weight: 800;
}

/* ═══════════════════════════════════════════════
   搜索栏颜色修复（白底）
═══════════════════════════════════════════════ */
#projectSearch {
  background: #fff !important;
  color: var(--gray-800) !important;
  border-color: var(--gray-200) !important;
}
#projectSearch::placeholder { color: var(--gray-400) !important; }
#projectSearch:focus { border-color: var(--brand-mid) !important; }

/* ═══════════════════════════════════════════════
   任务中心侧边栏入口 & 面板
═══════════════════════════════════════════════ */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-item {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: 10px; padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
}
.task-item-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.task-item-body { flex: 1; min-width: 0; }
.task-item-name { font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 3px; }
.task-item-desc { font-size: 12px; color: var(--gray-500); }
.task-item-reward {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--brand-light); color: var(--brand);
  font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: 10px; white-space: nowrap;
}
.task-status-done {
  font-size: 11px; font-weight: 600; color: var(--green); white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   积分不足 — 无邀请弹窗（简化版）
═══════════════════════════════════════════════ */
.credits-empty-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.96);
  width: 400px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.18); z-index: 900;
  overflow: hidden; transition: all .2s ease; opacity: 0; pointer-events: none;
}
.credits-empty-modal.open { opacity: 1; transform: translate(-50%,-50%) scale(1); pointer-events: all; }
.cem-header {
  padding: 24px 24px 16px;
  background: linear-gradient(135deg, var(--brand) 0%, #A78BFA 100%);
  color: #fff; text-align: center;
}
.cem-header i { font-size: 36px; margin-bottom: 10px; display: block; }
.cem-header h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.cem-header p { font-size: 13px; opacity: .85; }
.cem-body { padding: 20px 24px 24px; }
.cem-options { display: flex; flex-direction: column; gap: 10px; }
.cem-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--gray-200); cursor: pointer;
  transition: all var(--transition); text-decoration: none; color: inherit;
}
.cem-option:hover { border-color: var(--brand-mid); background: var(--brand-light); }
.cem-option-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.cem-option-body { flex: 1; }
.cem-option-title { font-size: 13px; font-weight: 700; color: var(--gray-800); margin-bottom: 2px; }
.cem-option-desc { font-size: 11px; color: var(--gray-500); }
.cem-cancel {
  display: block; width: 100%; margin-top: 12px;
  padding: 10px; border: none; background: none;
  font-size: 13px; color: var(--gray-400); cursor: pointer;
  text-align: center;
}
.cem-cancel:hover { color: var(--gray-600); }

/* ═══════════════════════════════════════════════
   抽屉 Prev 按钮显示控制
═══════════════════════════════════════════════ */
.ws-drawer-footer .footer-left { display: flex; align-items: center; gap: 10px; }
.ws-drawer-footer .footer-right { display: flex; align-items: center; gap: 10px; }
.step-hint {
  font-size: 11px; color: var(--gray-400);
}

/* ═══════════════════════════════════════════════
   Step 0 特别样式：主平台大选项（4列+中文）
═══════════════════════════════════════════════ */
.primary-platform-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 8px;
}
.pp-card {
  border: 1.5px solid var(--gray-200); border-radius: 10px;
  padding: 10px 6px; cursor: pointer; text-align: center;
  transition: all var(--transition); background: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  position: relative;
}
.pp-card:hover { border-color: var(--brand-mid); background: var(--brand-light); }
.pp-card.selected {
  border-color: var(--brand); background: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}
.pp-card-icon { font-size: 18px; line-height: 1; }
.pp-card-name { font-size: 10px; font-weight: 600; color: var(--gray-700); }
.pp-card.selected .pp-card-name { color: var(--brand); }
.pp-tick {
  position: absolute; top: 4px; right: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 8px;
  display: none; align-items: center; justify-content: center;
}
.pp-card.selected .pp-tick { display: flex; }

/* 第二行：副平台 inline 标签式 */
.secondary-tag-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px;
}
.secondary-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 20px;
  border: 1.5px solid var(--gray-200); background: #fff;
  font-size: 11px; font-weight: 600; color: var(--gray-600);
  cursor: pointer; transition: all var(--transition);
  user-select: none;
}
.secondary-tag:hover { border-color: var(--brand-mid); color: var(--brand); }
.secondary-tag.checked {
  border-color: var(--brand); color: var(--brand);
  background: var(--brand-light);
}
.secondary-tag.locked { opacity: .4; cursor: not-allowed; pointer-events: none; }
.secondary-tag .st-cost {
  font-size: 10px; font-weight: 400; color: var(--gray-400);
}
.secondary-tag.checked .st-cost { color: var(--brand); opacity: .7; }

@media (max-width: 900px) {
  .primary-platform-grid { grid-template-columns: repeat(3, 1fr); }
  .ws-drawer-right { display: none; }
}
@media (max-width: 480px) {
  .primary-platform-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ═══════════════════════════════════════════════
   Step 0 — 主平台选择卡片
═══════════════════════════════════════════════ */
.step0-section-title {
  font-size: 12px; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 10px; margin-top: 20px;
}
.step0-section-title:first-child { margin-top: 0; }

/* 主平台大卡片网格 */
.primary-platform-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 4px;
}
.primary-platform-card {
  border: 2px solid var(--gray-200); border-radius: 12px;
  padding: 14px 10px; cursor: pointer; text-align: center;
  background: #fff; transition: all var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.primary-platform-card:hover {
  border-color: var(--brand-mid); background: var(--brand-light);
  transform: translateY(-2px); box-shadow: 0 4px 12px rgba(124,58,237,.1);
}
.primary-platform-card.selected {
  border-color: var(--brand); background: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}
.primary-platform-card.soon {
  opacity: .4; pointer-events: none;
}
.platform-card-emoji { font-size: 22px; line-height: 1; }
.platform-card-name {
  font-size: 11px; font-weight: 600; color: var(--gray-600);
}
.primary-platform-card.selected .platform-card-name { color: var(--brand); }
.platform-card-tag {
  font-size: 9px; padding: 1px 5px; border-radius: 6px;
  background: var(--gray-100); color: var(--gray-400); font-weight: 600;
}
.primary-platform-card.selected .platform-card-tag {
  background: rgba(124,58,237,.12); color: var(--brand);
}

/* 副平台勾选列表 */
.secondary-platform-list {
  display: flex; flex-direction: column; gap: 7px;
  margin-bottom: 4px;
}
.secondary-platform-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--gray-200); background: #fff;
  transition: all var(--transition);
}
.secondary-platform-item:hover { border-color: var(--brand-mid); background: var(--brand-light); }
.secondary-platform-item.checked { border-color: var(--brand); background: #F5F3FF; }
.secondary-platform-item input[type=checkbox] { display: none; }
.sec-platform-check {
  width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0;
  border: 2px solid var(--gray-300); background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff; transition: all var(--transition);
}
.secondary-platform-item.checked .sec-platform-check {
  background: var(--brand); border-color: var(--brand);
}
.sec-platform-info { flex: 1; }
.sec-platform-name { font-size: 12px; font-weight: 600; color: var(--gray-700); }
.secondary-platform-item.checked .sec-platform-name { color: var(--brand); }
.sec-platform-cost {
  font-size: 11px; color: var(--gray-400); margin-top: 1px;
}
.sec-platform-strategy {
  font-size: 10px; padding: 2px 7px; border-radius: 6px;
  font-weight: 600; flex-shrink: 0;
}
.strategy-resize  { background: #D1FAE5; color: #059669; }
.strategy-crop    { background: #DBEAFE; color: #2563EB; }
.strategy-ai-gen  { background: #FEF3C7; color: #D97706; }

/* ═══════════════════════════════════════════════
   积分预估面板
═══════════════════════════════════════════════ */
.credit-estimate-panel {
  background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
  border: 1.5px solid #DDD6FE; border-radius: 12px;
  padding: 14px 16px; margin-top: 16px;
}
.credit-estimate-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.credit-estimate-title {
  font-size: 12px; font-weight: 700; color: var(--brand);
  display: flex; align-items: center; gap: 6px;
}
.credit-estimate-total {
  font-size: 18px; font-weight: 900; color: var(--brand);
}
.credit-estimate-rows {
  display: flex; flex-direction: column; gap: 5px;
}
.credit-estimate-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
}
.credit-estimate-label { color: var(--gray-600); }
.credit-estimate-val   { font-weight: 600; color: var(--gray-800); }
.credit-estimate-val.extra { color: var(--brand); }
.credit-estimate-divider {
  border: none; border-top: 1px dashed #C4B5FD; margin: 8px 0;
}
.credit-balance-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid #DDD6FE;
}
.credit-balance-label { color: var(--gray-500); }
.credit-balance-val   { font-weight: 700; }
.credit-balance-val.ok       { color: var(--green); }
.credit-balance-val.warn     { color: var(--yellow); }
.credit-balance-val.danger   { color: var(--red); }
.credit-warn-bar {
  background: #FEF3C7; border: 1px solid #FDE68A;
  border-radius: 8px; padding: 8px 12px; margin-top: 10px;
  font-size: 12px; color: #92400E;
  display: flex; align-items: center; gap: 8px;
}
.credit-danger-bar {
  background: #FEF2F2; border: 1px solid #FECACA;
  border-radius: 8px; padding: 8px 12px; margin-top: 10px;
  font-size: 12px; color: #991B1B;
  display: flex; align-items: center; gap: 8px;
}

/* ═══════════════════════════════════════════════
   抽屉右栏 — 每步内容
═══════════════════════════════════════════════ */
.drawer-right-panel { display: none; flex-direction: column; gap: 0; flex: 1; }
.drawer-right-panel.active { display: flex; }

/* 五视图指南（Step 1 右栏） */
.view-guide-title {
  font-size: 13px; font-weight: 700; color: var(--gray-800); margin-bottom: 14px;
  display: flex; align-items: center; gap: 7px;
}
.view-guide-title i { color: var(--brand); }
.view-guide-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 16px;
}
.view-guide-item {
  background: #fff; border: 1px solid var(--gray-200); border-radius: 10px;
  padding: 12px 10px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.view-guide-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.view-guide-name { font-size: 11px; font-weight: 700; color: var(--gray-700); }
.view-guide-desc { font-size: 10px; color: var(--gray-400); line-height: 1.4; }
.view-guide-tip {
  background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 8px;
  padding: 10px 12px; font-size: 12px; color: #92400E;
  display: flex; gap: 8px;
}
.view-guide-tip i { flex-shrink: 0; margin-top: 1px; }

/* 参数预览卡（Step 2 右栏） */
.param-preview-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 10px;
}
.param-preview-title {
  font-size: 12px; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px;
}
.param-preview-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--gray-100);
}
.param-preview-row:last-child { border-bottom: none; padding-bottom: 0; }
.param-preview-key { color: var(--gray-500); }
.param-preview-val { font-weight: 600; color: var(--gray-800); }
.param-platform-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600;
  background: var(--brand-light); color: var(--brand);
}
.param-sec-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 6px; font-size: 10px; font-weight: 600;
  background: var(--gray-100); color: var(--gray-500);
  margin: 2px 2px 0 0;
}
.uploaded-thumbs {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px;
}
.uploaded-thumb {
  width: 44px; height: 44px; border-radius: 7px; overflow: hidden;
  border: 1px solid var(--gray-200); flex-shrink: 0;
  background: var(--gray-100);
}
.uploaded-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* AI 流右栏日志（Step 3） */
.ai-stream-log {
  background: #0F172A; border-radius: 12px; padding: 16px;
  flex: 1; overflow-y: auto; font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px; line-height: 1.8; color: #94A3B8;
}
.ai-log-line { display: flex; gap: 8px; }
.ai-log-time { color: #475569; flex-shrink: 0; }
.ai-log-text { flex: 1; }
.ai-log-text.ok      { color: #4ADE80; }
.ai-log-text.info    { color: #60A5FA; }
.ai-log-text.warn    { color: #FBBF24; }
.ai-log-text.running { color: #A78BFA; }

/* 结果标注（Step 4 右栏） */
.result-summary-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 10px;
}
.result-summary-title {
  font-size: 12px; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px;
}
.result-platform-tab-list {
  display: flex; flex-direction: column; gap: 6px;
}
.result-platform-tab-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--gray-200);
  background: var(--gray-50); cursor: pointer;
  transition: all var(--transition); font-size: 12px; font-weight: 600;
}
.result-platform-tab-item:hover { border-color: var(--brand-mid); background: var(--brand-light); }
.result-platform-tab-item.active { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }
.result-platform-tab-item .platform-status-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px;
}
.result-platform-tab-item .platform-status-badge.done    { background: #D1FAE5; color: #059669; }
.result-platform-tab-item .platform-status-badge.pending { background: #F3F4F6; color: #6B7280; }
.result-platform-tab-item .platform-status-badge.running { background: #DBEAFE; color: #2563EB; }

/* 副平台生成按钮 */
.sec-platform-gen-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px; border: none; cursor: pointer;
  font-size: 12px; font-weight: 600;
  background: linear-gradient(135deg, var(--brand), #A78BFA);
  color: #fff; transition: opacity var(--transition);
}
.sec-platform-gen-btn:hover { opacity: .88; }
.sec-platform-gen-btn:disabled { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; }

/* ═══════════════════════════════════════════════
   侧边栏扩展 — 任务/邀请
═══════════════════════════════════════════════ */
.sidebar-task-banner {
  background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
  border-radius: 10px; padding: 12px 14px; margin: 8px 0;
  border: 1px solid #C4B5FD;
}
.sidebar-task-banner h4 {
  font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 4px;
}
.sidebar-task-banner p { font-size: 11px; color: #5B21B6; line-height: 1.5; }
.sidebar-task-btn {
  display: block; width: 100%; margin-top: 8px;
  padding: 6px 10px; border-radius: 7px;
  background: var(--brand); color: #fff;
  border: none; font-size: 11px; font-weight: 700; cursor: pointer;
  text-align: center; transition: opacity var(--transition);
}
.sidebar-task-btn:hover { opacity: .88; }

/* 任务中心 Modal */
.task-center-modal { width: 520px; }
.task-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 10px; margin-bottom: 8px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  transition: background var(--transition);
}
.task-item:hover { background: #fff; }
.task-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.task-info { flex: 1; }
.task-name { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.task-desc { font-size: 11px; color: var(--gray-500); margin-top: 1px; }
.task-reward {
  font-size: 12px; font-weight: 700; color: var(--brand);
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.task-status-done {
  font-size: 11px; font-weight: 700; color: var(--green);
  background: #D1FAE5; padding: 2px 8px; border-radius: 8px;
}
.task-status-btn {
  font-size: 11px; font-weight: 700; color: var(--brand);
  background: var(--brand-light); border: none; border-radius: 8px;
  padding: 4px 10px; cursor: pointer; transition: background var(--transition);
}
.task-status-btn:hover { background: #DDD6FE; }

/* ═══════════════════════════════════════════════
   搜索栏颜色修复
═══════════════════════════════════════════════ */
.project-search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--gray-100); border-radius: 8px; padding: 7px 12px;
  border: 1.5px solid transparent; transition: border-color var(--transition);
}
.project-search-bar:focus-within { border-color: var(--brand-mid); background: #fff; }
.project-search-bar i { color: var(--gray-400); font-size: 12px; flex-shrink: 0; }
.project-search-bar input {
  border: none; background: none; outline: none;
  font-size: 13px; color: var(--gray-700); flex: 1; font-family: inherit;
}
.project-search-bar input::placeholder { color: var(--gray-400); }

/* ═══════════════════════════════════════════════
   积分耗尽弹窗（去掉邀请入口）
═══════════════════════════════════════════════ */
.credits-empty-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 900; padding: 16px;
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.credits-empty-modal-overlay.open { opacity: 1; pointer-events: all; }
.credits-empty-modal {
  background: #fff; border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
  width: 100%; max-width: 420px; overflow: hidden;
  animation: modalIn .2s ease;
}
.credits-empty-header {
  text-align: center; padding: 28px 24px 20px;
  background: linear-gradient(135deg, #F5F3FF, #EDE9FE);
  border-bottom: 1px solid #DDD6FE;
}
.credits-empty-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), #A78BFA);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; margin: 0 auto 12px;
}
.credits-empty-title { font-size: 18px; font-weight: 800; color: var(--gray-900); }
.credits-empty-sub { font-size: 13px; color: #5B21B6; margin-top: 4px; }
.credits-empty-body { padding: 20px 24px 24px; }
.credits-empty-options { display: flex; flex-direction: column; gap: 10px; }
.credits-empty-option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--gray-200); background: #fff;
  transition: all var(--transition); text-align: left;
}
.credits-empty-option:hover { border-color: var(--brand-mid); background: var(--brand-light); transform: translateY(-1px); }
.credits-empty-option-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.credits-empty-option-info h4 { font-size: 13px; font-weight: 700; color: var(--gray-800); }
.credits-empty-option-info p { font-size: 11px; color: var(--gray-500); margin-top: 2px; }

/* ═══════════════════════════════════════════════
   Step 面板激活（改为 flex 双栏自适应）
═══════════════════════════════════════════════ */
.ws-step-panel.active {
  display: flex !important;
  flex-direction: row;
  flex: 1;
  overflow: hidden;
}

/* Step 0 面板特殊：单栏布局 */
#stepPanel0.active {
  flex-direction: row;
}
.step0-left {
  width: 380px; flex-shrink: 0;
  padding: 24px 28px; overflow-y: auto;
  border-right: 1px solid var(--gray-200);
}
.step0-right {
  flex: 1; background: var(--gray-50);
  padding: 24px; overflow-y: auto;
  display: flex; flex-direction: column;
}

@media (max-width: 900px) {
  .step0-left { width: 100%; border-right: none; border-bottom: 1px solid var(--gray-200); }
  .step0-right { display: none; }
  .primary-platform-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .primary-platform-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════
   ws-drawer-two-col — Step 面板内两栏容器
═══════════════════════════════════════════════ */
.ws-drawer-two-col {
  display: flex;
  flex-direction: row;
  flex: 1;
  overflow: hidden;
  width: 100%;
}

/* Step0 左栏宽度覆盖（平台网格需要更宽） */
#stepPanel0 .ws-drawer-left {
  width: 420px;
}

/* Step1 左栏（图片上传，标准宽度）*/
#stepPanel1 .ws-drawer-left {
  width: 380px;
}

/* Step2 左栏（配置参数，标准宽度）*/
#stepPanel2 .ws-drawer-left {
  width: 380px;
}

/* 右栏撑满剩余空间 */
.ws-drawer-two-col .ws-drawer-right {
  flex: 1;
}

/* Step3/Step4 面板不需要两栏，直接 left 撑满 */
#stepPanel3.active,
#stepPanel4.active {
  flex-direction: column;
  overflow-y: auto;
}
#stepPanel3 .ws-drawer-left,
#stepPanel4 .ws-drawer-left {
  width: 100%;
  border-right: none;
}

@media (max-width: 900px) {
  .ws-drawer-two-col { flex-direction: column; }
  #stepPanel0 .ws-drawer-left,
  #stepPanel1 .ws-drawer-left,
  #stepPanel2 .ws-drawer-left {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
    max-height: 55vh;
  }
  .ws-drawer-two-col .ws-drawer-right { display: none; }
}

/* ═══════════════════════════════════════════════
   结果页 — 平台切换器
═══════════════════════════════════════════════ */
.result-platform-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--brand-light);
  border: 1.5px solid var(--brand);
  border-radius: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.rps-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
  flex-shrink: 0;
}
.rps-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.result-platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--gray-200);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  transition: all .18s ease;
}
.result-platform-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
}
.result-platform-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,.25);
}
.result-platform-chip.active .rpc-badge {
  background: rgba(255,255,255,.25);
  color: #fff;
}
.rpc-emoji { font-size: 14px; }
.rpc-label { font-size: 12px; }
.rpc-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  line-height: 1.4;
}
.rpc-badge.main-badge {
  background: rgba(124,58,237,.12);
  color: var(--brand);
}
.rpc-badge.sub-badge {
  background: #F3F4F6;
  color: var(--gray-500);
}
.result-platform-chip.active .rpc-badge.main-badge,
.result-platform-chip.active .rpc-badge.sub-badge {
  background: rgba(255,255,255,.22);
  color: #fff;
}

/* ═══════════════════════════════════════════════
   副平台结果预览区
═══════════════════════════════════════════════ */
.sub-platform-preview {
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  animation: slideUp .2s ease;
}
.spp-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--gray-100);
}
.spp-platform-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.spp-platform-name {
  font-size: 16px;
  font-weight: 700;
}
.spp-platform-region {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
}
.spp-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* 差异化字段区 */
.spp-diff-section,
.spp-shared-section {
  padding: 16px 18px;
  border-bottom: 1px solid var(--gray-100);
}
.spp-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.spp-diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.spp-diff-card {
  background: #F9FAFB;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
}
.spp-diff-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.spp-diff-platform {
  display: inline-block;
  font-size: 10px;
  color: var(--gray-400);
  margin-right: 4px;
}
.spp-diff-from {
  color: var(--gray-500);
  font-size: 11px;
  padding: 4px 0;
  text-decoration: line-through;
  opacity: .7;
}
.spp-diff-arrow {
  color: var(--brand);
  font-size: 10px;
  padding: 2px 0;
}
.spp-diff-to {
  color: var(--gray-800);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 0;
}

/* 共用字段区 */
.spp-shared-card {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  padding: 10px 12px;
}
.spp-shared-row {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px solid #D1FAE5;
}
.spp-shared-row:last-child { border-bottom: none; }
.spp-shared-label {
  font-weight: 600;
  color: var(--gray-600);
  min-width: 80px;
  flex-shrink: 0;
}
.spp-shared-val { color: var(--gray-700); }

/* CTA 区 */
.spp-cta {
  padding: 24px 18px;
  text-align: center;
  background: linear-gradient(135deg, #FAFAFA, #F5F3FF);
}
.spp-cta-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 20px;
  color: var(--brand);
}
.spp-cta-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
}
.spp-cta-desc {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 16px;
}
.spp-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
  box-shadow: 0 3px 12px rgba(124,58,237,.3);
}
.spp-cta-btn:hover { opacity: .88; }
.spp-cta-btn:disabled { opacity: .55; cursor: not-allowed; }
.spp-cta-note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--gray-400);
}

/* 副平台文案结果 */
.spp-copy-result {
  padding: 16px 18px;
}

/* ═══════════════════════════════════════════════
   副平台积分不足 mini 提示
═══════════════════════════════════════════════ */
@keyframes hintSlideUp {
  from { transform: translate(-50%, 12px); opacity: 0; }
  to   { transform: translate(-50%, 0);   opacity: 1; }
}
#subPlatformCreditHint {
  animation: hintSlideUp .25s ease;
}

/* ═══════════════════════════════════════════════
   副平台勾选框 — 积分不足锁定态
═══════════════════════════════════════════════ */
.secondary-platform-item.insufficient {
  opacity: .6;
  cursor: not-allowed;
  border-color: var(--gray-200) !important;
}
.secondary-platform-item.insufficient .sec-platform-cost {
  color: var(--red) !important;
}
.secondary-platform-item.insufficient::after {
  content: '积分不足';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--red);
  font-weight: 700;
  background: #FEF2F2;
  padding: 2px 6px;
  border-radius: 6px;
}

/* ═══════════════════════════════════════════════
   Step0 提示横幅（替代副平台勾选区）
═══════════════════════════════════════════════ */
.step0-hint-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #F5F3FF 0%, #EFF6FF 100%);
  border: 1px solid #C4B5FD;
  border-radius: 8px;
  font-size: 12px;
  color: #5B21B6;
}

/* ═══════════════════════════════════════════════
   副平台扩展面板（结果页）
═══════════════════════════════════════════════ */
.sub-ext-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sub-ext-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #fff;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  font-family: inherit;
}
.sub-ext-chip:hover {
  border-color: #7C3AED;
  background: #F5F3FF;
  color: #5B21B6;
}
.sub-ext-chip.chosen {
  border-color: #7C3AED;
  background: #EDE9FE;
  color: #5B21B6;
  font-weight: 600;
}
.sub-ext-chip.done {
  border-color: #6EE7B7 !important;
  background: #D1FAE5 !important;
  color: #065F46 !important;
  cursor: pointer;
}
.sub-ext-chip.done:hover {
  background: #A7F3D0 !important;
}
.sub-ext-cost {
  font-size: 10px;
  color: #9CA3AF;
  background: #F3F4F6;
  padding: 1px 5px;
  border-radius: 4px;
}
.sub-ext-chip.chosen .sub-ext-cost {
  background: #DDD6FE;
  color: #6D28D9;
}
.sub-ext-check {
  color: #7C3AED;
  font-weight: 700;
  font-size: 11px;
}

.sub-ext-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 3px 10px rgba(124,58,237,.35);
  transition: opacity .15s;
}
.sub-ext-generate-btn:hover { opacity: .88; }
.sub-ext-generate-btn.disabled,
.sub-ext-generate-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════
   Agentic 元信息横幅样式补充
═══════════════════════════════════════════════ */
#agenticMetaBanner {
  animation: fadeIn .3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════
   Pipeline Phase 标签
═══════════════════════════════════════════════ */
.pipeline-phase-label {
  font-size: 10px;
  font-weight: 700;
  color: #7C3AED;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 10px 0 4px;
  border-top: 1px dashed #E5E7EB;
  margin-top: 6px;
}
.pipeline-phase-label:first-child {
  border-top: none;
  margin-top: 0;
}

/* ══════════════════════════════════════════════
   充值弹窗增强样式 v2.0
══════════════════════════════════════════════ */

/* 当前余额栏 */
.recharge-balance-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #F3F0FF 0%, #EDE9FE 100%);
  border: 1.5px solid #DDD6FE;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.recharge-balance-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #4B5563;
}
.recharge-balance-left strong {
  font-size: 22px;
  font-weight: 900;
  color: #7C3AED;
}
.recharge-balance-right {
  font-size: 11px;
  color: #94A3B8;
  text-align: right;
}
.recharge-balance-right strong { color: #7C3AED; }

/* 节省徽章 */
.product-save-badge {
  position: absolute;
  top: -10px;
  right: 10px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: .03em;
  box-shadow: 0 2px 6px rgba(16, 185, 129, .35);
}
.product-card { position: relative; }  /* 确保 save-badge 定位正确 */

/* 底部说明栏 */
.recharge-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #F1F5F9;
}
.recharge-security {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F8FAFC;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: #64748B;
  margin-bottom: 12px;
}
.recharge-security strong { color: #0F172A; }
.recharge-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.recharge-footer-links button {
  border: none;
  background: none;
  font-size: 12px;
  color: #94A3B8;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
  transition: color .15s;
}
.recharge-footer-links button:hover { color: #7C3AED; }

/* 积分历史页 - 订单行增强 */
.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #F1F5F9;
  font-size: 13px;
}
.order-row:last-child { border-bottom: none; }
.order-badge-paid   { background: #DCFCE7; color: #16A34A; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.order-badge-pending{ background: #FEF9C3; color: #B45309; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.order-badge-failed { background: #FEE2E2; color: #DC2626; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }

/* 项目卡片 - 分享链接按钮 */
.project-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
  color: #64748B;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.project-share-btn:hover {
  border-color: #7C3AED;
  color: #7C3AED;
  background: #F5F3FF;
}

/* ═══════════════════════════════════════════════
   侧边栏 Pro 升级横幅
═══════════════════════════════════════════════ */
.sidebar-pro-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #312e81, #4C1D95);
  border: 1px solid #6D28D9;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 8px 0;
  cursor: pointer;
  transition: opacity 0.2s;
}
.sidebar-pro-banner:hover { opacity: 0.88; }
.sidebar-pro-crown {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff; flex-shrink: 0;
}
.sidebar-pro-text { flex: 1; min-width: 0; }
.sidebar-pro-title { font-size: 12px; font-weight: 700; color: #E2E8F0; }
.sidebar-pro-sub   { font-size: 10px; color: #A78BFA; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-pro-arrow { font-size: 10px; color: #7C3AED; flex-shrink: 0; }

/* ═══════════════════════════════════════════════
   图片历史 类型筛选 Tab
═══════════════════════════════════════════════ */
.img-hist-tab {
  padding: 4px 12px;
  border: 1.5px solid #334155;
  border-radius: 20px;
  background: transparent;
  color: #64748B;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.img-hist-tab:hover { border-color: #7C3AED; color: #A78BFA; }
.img-hist-tab.active {
  background: #7C3AED;
  border-color: #7C3AED;
  color: #fff;
}

/* ═══════════════════════════════════════════════
   支付方式 Tab & 易支付二维码面板
═══════════════════════════════════════════════ */
.pay-type-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
  border-bottom: 2px solid #F1F5F9;
  padding-bottom: 0;
}
.pay-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #64748B;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  border-radius: 6px 6px 0 0;
  transition: all .15s;
}
.pay-tab:hover { color: #7C3AED; background: #F5F3FF; }
.pay-tab.active { color: #7C3AED; border-bottom-color: #7C3AED; background: #F5F3FF; }

/* 二维码面板 */
.epay-qr-wrap {
  text-align: center;
  padding: 20px;
  background: #F8FAFC;
  border-radius: 16px;
  border: 1.5px solid #E2E8F0;
  margin: 4px 0 16px;
}
.epay-qr-box {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  margin-bottom: 14px;
}
.epay-qr-loading {
  width: 200px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  font-size: 13px;
  gap: 10px;
}
.epay-qr-loading i { font-size: 28px; color: #8B5CF6; }
.epay-qr-status {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 4px;
}
.epay-qr-hint {
  font-size: 11px;
  color: #94A3B8;
  margin-bottom: 14px;
}
.epay-qr-cancel {
  display: inline-block;
  padding: 6px 16px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  background: #fff;
  color: #64748B;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.epay-qr-cancel:hover { border-color: #7C3AED; color: #7C3AED; }

/* ══════════════════════════════════════════════
   支付方式 Tab + 易支付二维码面板
══════════════════════════════════════════════ */

/* 支付方式切换 Tab */
.pay-type-tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0 12px;
}
.pay-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  background: #F8FAFC;
  color: #64748B;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.pay-tab:hover {
  border-color: #A78BFA;
  color: #7C3AED;
  background: #F5F3FF;
}
.pay-tab.active {
  border-color: #7C3AED;
  background: #EDE9FE;
  color: #6D28D9;
}

/* 易支付二维码面板 */
.epay-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 8px;
  gap: 12px;
}
.epay-qr-box {
  width: 224px;
  height: 224px;
  border: 2px solid #E2E8F0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(124,58,237,.08);
}
.epay-qr-box canvas,
.epay-qr-box img {
  border-radius: 8px;
}
.epay-qr-loading {
  text-align: center;
  color: #94A3B8;
  font-size: 13px;
  line-height: 2;
}
.epay-qr-status {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  text-align: center;
}
.epay-qr-hint {
  font-size: 12px;
  color: #94A3B8;
  text-align: center;
}
.epay-qr-cancel {
  font-size: 12px;
  color: #94A3B8;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color .15s;
}
.epay-qr-cancel:hover { color: #EF4444; }

/* ═══════════════════════════════════════════════════
   通用表单组件 — .form-group / .form-label / .form-input
   用于 ws-modal（亮色背景）内的表单元素
═══════════════════════════════════════════════════ */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  line-height: 1.4;
}

.form-label span {
  font-weight: 400;
  color: #9CA3AF;
  margin-left: 4px;
}

.form-input {
  width: 100%;
  padding: 9px 12px;
  background: #F9FAFB;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  font-size: 13px;
  color: #111827;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
  line-height: 1.5;
}

.form-input::placeholder {
  color: #9CA3AF;
  font-weight: 400;
}

.form-input:hover {
  border-color: #C4B5FD;
  background: #FEFEFE;
}

.form-input:focus {
  border-color: #7C3AED;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.form-input:disabled {
  background: #F3F4F6;
  color: #9CA3AF;
  cursor: not-allowed;
  border-color: #E5E7EB;
}

/* select 特殊处理 */
select.form-input {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* textarea 最小高度 */
textarea.form-input {
  min-height: 72px;
}

/* ═══════════════════════════════════════════════
   Agentic 进度面板（Step 3）— Genspark 风格
═══════════════════════════════════════════════ */

/* 整体包裹 */
.ag-progress-wrap {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 顶部标题区 */
.ag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}
.ag-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ag-spinner {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #7C3AED22, #6D28D911);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  font-size: 18px;
  flex-shrink: 0;
}
.ag-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}
.ag-subtitle {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}
.ag-phase-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-light);
  border: 1.5px solid var(--brand);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 整体进度条 */
.ag-progress-bar-wrap {
  height: 6px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
}
.ag-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #7C3AED, #A78BFA);
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* Agent 卡片流 */
.ag-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Phase 分组 */
.ag-phase-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ag-phase-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 0 2px;
}
.ag-phase-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ag-phase-dot.p1 { background: #7C3AED; }
.ag-phase-dot.p2 { background: #0EA5E9; }
.ag-phase-dot.p3 { background: #10B981; }
.ag-phase-dot.p4 { background: #F59E0B; }

/* 单张 Agent 卡片 */
.ag-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.ag-card.running {
  border-color: #BFDBFE;
  background: #EFF6FF;
  box-shadow: 0 0 0 3px #BFDBFE44;
}
.ag-card.done {
  border-color: #BBF7D0;
  background: #F0FDF4;
}
.ag-card.error {
  border-color: #FECACA;
  background: #FEF2F2;
}

/* 卡片图标 */
.ag-card-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: var(--gray-500);
  flex-shrink: 0;
  margin-top: 2px;
  transition: background 0.25s, color 0.25s;
}
.ag-card.running .ag-card-icon { background: #DBEAFE; color: #2563EB; }
.ag-card.done    .ag-card-icon { background: #D1FAE5; color: #059669; }
.ag-card.error   .ag-card-icon { background: #FEE2E2; color: #DC2626; }

/* 卡片内容 */
.ag-card-body {
  flex: 1;
  min-width: 0;
}
.ag-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 3px;
}
.ag-card-thought {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.55;
  transition: color 0.2s;
}
.ag-card.running .ag-card-thought { color: #1D4ED8; }
.ag-card.done    .ag-card-thought { color: #065F46; }
.ag-card.error   .ag-card-thought { color: #991B1B; }

/* 结果摘要（完成后显示） */
.ag-card-result {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  background: #D1FAE5;
  border-radius: 5px;
  padding: 3px 8px;
  display: inline-block;
}
.ag-card-result.hidden { display: none; }
.ag-card.error .ag-card-result { color: #DC2626; background: #FEE2E2; }

/* 右侧状态指示 */
.ag-card-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  padding-top: 2px;
  min-width: 42px;
}
.ag-card-state i {
  font-size: 14px;
  color: var(--gray-400);
  transition: color 0.25s;
}
.ag-card-state span {
  font-size: 10px;
  color: var(--gray-400);
  font-weight: 600;
  transition: color 0.25s;
}
.ag-card.running .ag-card-state i   { color: #2563EB; }
.ag-card.running .ag-card-state span { color: #2563EB; }
.ag-card.done    .ag-card-state i   { color: #059669; }
.ag-card.done    .ag-card-state span { color: #059669; }
.ag-card.error   .ag-card-state i   { color: #DC2626; }
.ag-card.error   .ag-card-state span { color: #DC2626; }

/* ============================================================
   ag-card — Genspark 风格 Agent 进度卡片
   对应 HTML 结构：.ag-card > .ag-card-icon + .ag-card-body + .ag-card-state
============================================================ */
.ag-progress-wrap {
  padding: 8px 0;
}
.ag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}
.ag-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ag-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7C3AED22, #6D28D911);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7C3AED;
  font-size: 16px;
  flex-shrink: 0;
}
.ag-title {
  font-size: 15px;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.3;
}
.ag-subtitle {
  font-size: 12px;
  color: #6B7280;
  margin-top: 2px;
}
.ag-phase-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, #7C3AED, #6D28D9);
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}
.ag-progress-bar-wrap {
  height: 4px;
  background: #E5E7EB;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}
.ag-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #7C3AED, #6D28D9);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}
.ag-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ag-phase-group {
  margin-bottom: 4px;
}
.ag-phase-header {
  font-size: 11px;
  font-weight: 600;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ag-phase-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ag-phase-dot.p1 { background: #3B82F6; }
.ag-phase-dot.p2 { background: #8B5CF6; }
.ag-phase-dot.p3 { background: #10B981; }
.ag-phase-dot.p4 { background: #F59E0B; }

.ag-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #E5E7EB;
  background: #FAFAFA;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.ag-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #E5E7EB;
  transition: background 0.3s ease;
}
.ag-card.running {
  border-color: #BFDBFE;
  background: #EFF6FF;
  box-shadow: 0 2px 8px rgba(59,130,246,0.08);
}
.ag-card.running::before { background: #3B82F6; }
.ag-card.done {
  border-color: #BBF7D0;
  background: #F0FDF4;
}
.ag-card.done::before { background: #10B981; }
.ag-card.error {
  border-color: #FECACA;
  background: #FEF2F2;
}
.ag-card.error::before { background: #EF4444; }

.ag-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #6B7280;
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.ag-card.running .ag-card-icon { background: #DBEAFE; color: #2563EB; }
.ag-card.done    .ag-card-icon { background: #D1FAE5; color: #059669; }
.ag-card.error   .ag-card-icon { background: #FEE2E2; color: #DC2626; }

.ag-card-body {
  flex: 1;
  min-width: 0;
}
.ag-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 3px;
}
.ag-card.running .ag-card-title { color: #1D4ED8; }
.ag-card.done    .ag-card-title { color: #065F46; }

.ag-card-thought {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.5;
  transition: all 0.4s ease;
  white-space: normal;
  word-break: break-all;
}
.ag-card.running .ag-card-thought {
  color: #3B82F6;
}
.ag-card.done .ag-card-thought {
  color: #059669;
}

.ag-card-result {
  font-size: 11px;
  color: #059669;
  background: #D1FAE5;
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: 5px;
  display: inline-block;
  font-weight: 600;
}
.ag-card-result.hidden { display: none; }

.ag-card-state {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #9CA3AF;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
}
.ag-card.running .ag-card-state { color: #2563EB; }
.ag-card.done    .ag-card-state { color: #059669; }
.ag-card.error   .ag-card-state { color: #DC2626; }
