﻿/* ============================================================
   热点工场 HotSpot Studio · 电商媒体热点营销工作台
   现代 SAAS 极简风格 · 中性灰底 + 极客蓝/高亮紫品牌色
   ============================================================ */

:root {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #eef0f6;
  --border: #e6e8f0;
  --border-strong: #d8dbe6;
  --text: #1c2333;
  --text-2: #5b6472;
  --text-3: #8a93a3;
  --brand: #3b6df6;
  --brand-2: #7c3aed;
  --brand-soft: #eef2ff;
  --brand-soft-2: #f5f0ff;
  --grad: linear-gradient(135deg, #3b6df6 0%, #7c3aed 100%);
  --success: #16a34a;
  --success-soft: #ecfdf3;
  --warning: #d97706;
  --warning-soft: #fff7e8;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --hot: #ff4d4f;
  --hot-soft: #fff1f0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd3e0; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ---------------- 顶部导航 ---------------- */
.topbar {
  height: 64px;
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo { width: 38px; height: 38px; flex: 0 0 auto; }
.brand-text { line-height: 1.25; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.brand-en { font-size: 12px; font-weight: 600; color: var(--text-3); margin-left: 6px; letter-spacing: .5px; }
.brand-sub { font-size: 11.5px; color: var(--text-3); }
.badge-demo {
  background: linear-gradient(135deg, #3b6df6, #7c3aed);
  color: #fff; font-weight: 700; letter-spacing: 1px;
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  position: relative;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text-2);
  transition: all .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-dot {
  position: absolute; top: 7px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--hot); border: 1.5px solid #fff;
}
.topbar-divider { width: 1px; height: 26px; background: var(--border); }
.user-box { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.user-box:hover { background: var(--surface-2); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff; font-weight: 700; border-radius: 50%;
  flex: 0 0 auto;
}
.avatar-sm { width: 34px; height: 34px; font-size: 14px; }
.avatar-lg { width: 44px; height: 44px; font-size: 17px; }
.user-meta { line-height: 1.3; }
.user-name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.user-role { font-size: 11.5px; color: var(--text-3); }
.chev { width: 15px; height: 15px; color: var(--text-3); }

/* ---------------- 布局 ---------------- */
.layout { flex: 1; display: flex; min-height: 0; }

/* ---------------- 左侧流程导航 ---------------- */
.sidebar {
  width: 248px; flex: 0 0 248px;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 14px 14px;
  overflow-y: auto;
}
.sidebar-title { font-size: 11.5px; font-weight: 700; color: var(--text-3); letter-spacing: 1.5px; padding: 0 10px 10px; }
.steps { display: flex; flex-direction: column; gap: 4px; }
.step-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 10px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s;
  user-select: none;
}
.step-item:hover { background: var(--surface-2); }
.step-item.active {
  background: var(--brand-soft);
  border-color: #dbe3ff;
}
.step-item.active .step-index {
  background: var(--grad); color: #fff; box-shadow: 0 4px 10px rgba(59,109,246,.35);
}
.step-item.done .step-index {
  background: var(--success-soft); color: var(--success);
  border-color: #bfe8cf;
}
.step-index {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: var(--surface-3); color: var(--text-2);
  font-size: 13px; font-weight: 700;
  border: 1px solid var(--border);
  transition: all .18s;
}
.step-index svg { width: 15px; height: 15px; }
.step-text { line-height: 1.3; min-width: 0; }
.step-name { font-size: 13.5px; font-weight: 600; }
.step-item.active .step-name { color: var(--brand); }
.step-item.done .step-name { color: var(--text); }
.step-desc { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.step-connector {
  width: 1px; height: 12px; margin-left: 24px;
  background: var(--border);
}
.sidebar-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.linkage-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.panel-title { font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.panel-tag {
  font-size: 10px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft); border: 1px solid #dbe3ff;
  padding: 1px 7px; border-radius: 99px;
}
.link-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.link-item em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--text-3); }
.link-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.link-dot.ok { background: var(--success); }
.sidebar-ver { text-align: center; font-size: 11px; color: var(--text-3); }

/* ---------------- 右侧工作区 ---------------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.context-bar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.ctx-label { font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: 1px; }
.ctx-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-2);
  max-width: 380px;
}
.ctx-chip b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-chip .chip-ico { width: 14px; height: 14px; flex: 0 0 auto; }
.ctx-chip.empty { color: var(--text-3); border-style: dashed; }
.ctx-spacer { flex: 1; }
.btn-reset-mini { font-size: 12px; }

.view {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 32px;
  animation: viewIn .28s ease;
}
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- 通用组件 ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-title .ico { width: 17px; height: 17px; color: var(--brand); }
.card-sub { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 6px; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent;
  transition: all .16s;
  white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(59,109,246,.3); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 6px 16px rgba(59,109,246,.38); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: none; }
.btn-outline { background: #fff; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { filter: brightness(1.06); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 11px 22px; font-size: 14.5px; border-radius: 10px; }
.btn-block { width: 100%; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 2px 9px;
  border-radius: 99px;
  line-height: 1.6;
}
.badge-blue { background: var(--brand-soft); color: var(--brand); }
.badge-purple { background: var(--brand-soft-2); color: var(--brand-2); }
.badge-hot { background: var(--hot-soft); color: var(--hot); }
.badge-green { background: var(--success-soft); color: var(--success); }
.badge-amber { background: var(--warning-soft); color: var(--warning); }
.badge-gray { background: var(--surface-3); color: var(--text-2); }
.badge-red { background: var(--danger-soft); color: var(--danger); }

.tag {
  display: inline-block;
  font-size: 11.5px; color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 8px;
  margin: 2px 4px 2px 0;
}

.stat-row { display: flex; gap: 14px; flex-wrap: wrap; }
.stat {
  flex: 1 1 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.stat .k { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 4px; letter-spacing: .3px; }
.stat .v small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.stat .d { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea {
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 13.5px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59,109,246,.12); }
.textarea { resize: vertical; line-height: 1.7; }
.select { cursor: pointer; }

.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button {
  border: none; background: transparent;
  padding: 5px 13px; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); border-radius: 7px; transition: all .15s;
}
.seg button.active { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }

.switch { position: relative; width: 38px; height: 21px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0;
  background: #d3d7e2; border-radius: 99px; transition: .2s; cursor: pointer;
}
.switch .slider::before {
  content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--grad); }
.switch input:checked + .slider::before { transform: translateX(17px); }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px;
  padding: 52px 20px; color: var(--text-3);
}
.empty-state .empty-ico {
  width: 62px; height: 62px; border-radius: 18px;
  background: var(--surface-3); color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
}
.empty-state .empty-ico svg { width: 30px; height: 30px; }
.empty-state h3 { font-size: 15px; color: var(--text-2); }
.empty-state p { font-size: 12.5px; max-width: 420px; }

.progress-track { height: 7px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--grad); border-radius: 99px; transition: width .4s ease; }
/* ---------------- Step 1 新闻抓取 ---------------- */
.news-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
.news-row:last-child { border-bottom: none; }
.news-row:hover { background: var(--surface-2); }
.news-row.selected { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.news-rank { width: 30px; text-align: center; font-weight: 800; font-size: 15px; color: var(--text-3); flex: 0 0 auto; }
.news-rank.top1 { color: var(--hot); font-size: 17px; }
.news-rank.top2 { color: #f97316; }
.news-rank.top3 { color: #f59e0b; }
.news-main { flex: 1; min-width: 0; }
.news-title { font-size: 14px; font-weight: 600; line-height: 1.5; }
.news-row.selected .news-title { color: var(--brand); }
.news-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.news-summary { font-size: 12px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-heat { display: flex; align-items: center; gap: 8px; width: 150px; flex: 0 0 auto; }
.heat-num { font-size: 12.5px; font-weight: 700; color: var(--text-2); width: 62px; text-align: right; }
.heat-bar { flex: 1; height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.heat-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #3b6df6, #7c3aed); }
.news-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.platform-pill { font-size: 11px; font-weight: 700; padding: 1px 9px; border-radius: 6px; }
.pf-weibo { background: #fff2f0; color: #e6162d; }
.pf-douyin { background: #f0fbff; color: #0f172a; }
.pf-zhihu { background: #eef2ff; color: #2f5cf0; }
.pf-baidu { background: #f0f2f5; color: #2932e1; }
.pf-toutiao { background: #fff7e8; color: #f03030; }

/* 抓取控制 */
.fetch-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fetching-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--brand-soft);
  border: 1px solid #dbe3ff;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 12.5px; color: var(--brand);
}
.spinner {
  width: 15px; height: 15px; flex: 0 0 auto;
  border: 2px solid rgba(59,109,246,.25);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Step 2/3 商品 ---------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .18s;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.product-card.picked { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(59,109,246,.25), var(--shadow-sm); }
.product-thumb {
  height: 118px; display: flex; align-items: center; justify-content: center;
  font-size: 46px; position: relative;
}
.product-thumb .match-ribbon {
  position: absolute; top: 10px; right: 10px;
  background: rgba(28,35,51,.72); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 99px;
  backdrop-filter: blur(4px);
}
.product-thumb .match-ribbon b { color: #ffd666; }
.product-thumb .platform-ribbon {
  position: absolute; top: 10px; left: 10px;
  font-size: 10.5px; font-weight: 700;
  background: rgba(255,255,255,.9);
  color: var(--text-2);
  padding: 2px 8px; border-radius: 6px;
  box-shadow: var(--shadow-sm);
}
.product-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-name { font-size: 13.5px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px; }
.product-price-row { display: flex; align-items: baseline; gap: 8px; }
.product-price { font-size: 18px; font-weight: 800; color: var(--hot); }
.product-price small { font-size: 11px; font-weight: 600; }
.product-price-origin { font-size: 11.5px; color: var(--text-3); text-decoration: line-through; }
.product-sales { margin-left: auto; font-size: 11px; color: var(--text-3); }
.product-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.product-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }

.match-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-2); }
.match-row .m-label { width: 44px; flex: 0 0 auto; }
.match-row .progress-track { flex: 1; height: 6px; }
.match-row .m-num { width: 40px; text-align: right; font-weight: 700; color: var(--text-2); flex: 0 0 auto; }
.match-reason { font-size: 11.5px; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 4px 8px; }

.library-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
.library-list { max-height: 560px; overflow-y: auto; }
.lib-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s;
}
.lib-row:hover { background: var(--surface-2); }
.lib-row.picked { background: var(--brand-soft); }
.lib-thumb { width: 46px; height: 46px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex: 0 0 auto; }
.lib-info { flex: 1; min-width: 0; }
.lib-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; display: flex; gap: 8px; }
.lib-price { font-size: 13px; font-weight: 800; color: var(--hot); flex: 0 0 auto; }
.sel-list { display: flex; flex-direction: column; gap: 10px; }
.sel-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--surface-2);
}
.sel-item .lib-thumb { width: 40px; height: 40px; font-size: 20px; }
.sel-item .lib-name { flex: 1; }
.sel-order {
  display: flex; align-items: center; gap: 3px;
  color: var(--text-3);
}
.sel-order button {
  width: 22px; height: 22px; border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff; color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.sel-order button:hover:not(:disabled) { color: var(--brand); border-color: var(--brand); }
.sel-order button:disabled { opacity: .35; cursor: not-allowed; }
.sel-remove {
  width: 24px; height: 24px; border: none; background: transparent;
  color: var(--text-3); border-radius: 6px; font-size: 15px;
}
.sel-remove:hover { background: var(--danger-soft); color: var(--danger); }
.match-score-big { font-size: 30px; font-weight: 800; }
.match-score-big small { font-size: 13px; color: var(--text-3); font-weight: 600; }

/* ---------------- Step 4 文案 ---------------- */
.copy-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.copy-config .card-body { display: flex; flex-direction: column; gap: 16px; }
.gen-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  padding: 60px 20px;
  text-align: center;
}
.gen-btn-wrap { position: relative; }
.gen-pulse {
  position: absolute; inset: -6px; border-radius: 14px;
  pointer-events: none;
  background: var(--grad); opacity: .25; filter: blur(8px);
  animation: pulse 2s ease infinite;
}
@keyframes pulse { 0%,100% { opacity: .18; transform: scale(1);} 50% { opacity: .4; transform: scale(1.04);} }
.copy-loading { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.loading-line { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.loading-line .li-ico { width: 18px; height: 18px; flex: 0 0 auto; }
.loading-line.done { color: var(--success); }
.loading-line.done .li-ico { color: var(--success); }
.skeleton-block { border-radius: 8px; background: linear-gradient(90deg, #eef0f6 25%, #f6f7fb 50%, #eef0f6 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.copy-version {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border .18s;
}
.copy-version.active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(59,109,246,.2); }
.copy-version-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.copy-style-tag { font-weight: 700; font-size: 12.5px; color: var(--brand); background: var(--brand-soft); padding: 2px 10px; border-radius: 99px; }
.copy-words { font-size: 11.5px; color: var(--text-3); }
.copy-version-head .spacer { flex: 1; }
.copy-text {
  padding: 16px;
  font-size: 14px; line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 340px; overflow-y: auto;
}
.copy-text .htag { color: var(--brand); font-weight: 600; }
.copy-text.editable { cursor: text; }
.copy-text:focus { outline: none; box-shadow: inset 0 0 0 2px rgba(59,109,246,.25); }
.copy-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.copy-foot .hint { font-size: 11.5px; color: var(--text-3); }
.copy-foot .spacer { flex: 1; }
.copied-tip { color: var(--success); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* ---------------- Step 5 审核与发送 ---------------- */
.review-layout { display: grid; grid-template-columns: 1fr 400px; gap: 18px; align-items: start; }
.weibo-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  max-width: 560px;
}
.weibo-head { display: flex; align-items: center; gap: 10px; }
.weibo-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #fff;
  flex: 0 0 auto;
}
.weibo-name { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.weibo-v {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg,#ffd76a,#f5a623);
  color: #fff; font-size: 9px; font-weight: 800;
}
.weibo-uid { font-size: 11.5px; color: var(--text-3); }
.weibo-body { margin-top: 12px; font-size: 14px; line-height: 1.9; white-space: pre-wrap; word-break: break-word; }
.weibo-body .htag { color: var(--brand); font-weight: 600; }
.weibo-imgs { display: flex; gap: 8px; margin-top: 12px; }
.weibo-img {
  flex: 1; height: 92px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 34px;
}
.weibo-img.wide { flex: 1.6; }
.weibo-foot {
  display: flex; gap: 34px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-3); font-size: 12.5px;
}
.weibo-foot span { display: inline-flex; align-items: center; gap: 5px; }
.weibo-foot svg { width: 15px; height: 15px; }
.weibo-time { margin-top: 10px; font-size: 11.5px; color: var(--text-3); }

.check-list { display: flex; flex-direction: column; gap: 10px; }
.check-item {
  display: flex; align-items: flex-start; gap: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  background: var(--surface-2);
}
.check-item .ci-icon { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; }
.check-item .ci-main { flex: 1; min-width: 0; }
.check-item .ci-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.check-item .ci-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.check-item.warn { border-color: #fcd9a8; background: var(--warning-soft); }
.check-item.warn .ci-title { color: var(--warning); }
.check-item.pass { border-color: #bfe8cf; background: var(--success-soft); }
.check-item.pass .ci-title { color: var(--success); }
.check-item.wait { opacity: .75; }

.status-tag { font-size: 12px; font-weight: 700; }
.status-untouched { color: var(--text-3); background: var(--surface-3); padding: 2px 10px; border-radius: 99px; }
.status-approved { color: var(--success); background: var(--success-soft); padding: 2px 10px; border-radius: 99px; }
.status-pending { color: var(--warning); background: var(--warning-soft); padding: 2px 10px; border-radius: 99px; }

.history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 10px;
}
.history-item .h-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--success-soft); color: var(--success); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.history-item .h-ico svg { width: 17px; height: 17px; }
.history-item .h-main { flex: 1; min-width: 0; }
.history-item .h-title { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .h-meta { font-size: 11.5px; color: var(--text-3); }

/* ---------------- Toast & Modal ---------------- */
.toast-root {
  position: fixed; top: 76px; right: 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow);
  padding: 11px 15px;
  min-width: 240px; max-width: 380px;
  font-size: 13px; font-weight: 500;
  animation: toastIn .25s ease;
  pointer-events: auto;
}
.toast .t-ico { width: 18px; height: 18px; flex: 0 0 auto; }
.toast.ok .t-ico { color: var(--success); }
.toast.err .t-ico { color: var(--danger); }
.toast.info .t-ico { color: var(--brand); }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px);} to { opacity: 1; transform: none;} }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px);} }

.modal-root { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; }
.modal-root.open { display: flex; }
.modal-mask { position: absolute; inset: 0; background: rgba(15,23,42,.42); backdrop-filter: blur(2px); animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0;} to { opacity: 1;} }
.modal {
  position: relative; width: 480px; max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  background: #fff; border-radius: 14px; box-shadow: 0 24px 64px rgba(15,23,42,.25);
  animation: modalIn .22s ease;
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-body { overflow-y: auto; }
.modal-wide .modal { width: 860px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98);} to { opacity: 1; transform: none;} }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 15px; }
.modal-x { border: none; background: transparent; color: var(--text-3); font-size: 18px; width: 28px; height: 28px; border-radius: 8px; }
.modal-x:hover { background: var(--surface-2); color: var(--text); }
.modal-body { padding: 18px 20px; font-size: 13.5px; color: var(--text-2); line-height: 1.8; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }

a.link { color: var(--brand); text-decoration: none; font-weight: 600; }
a.link:hover { text-decoration: underline; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1200px) {
  .review-layout { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: 1fr; }
  .copy-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { width: 76px; flex: 0 0 76px; padding: 14px 8px; }
  .step-desc, .step-name, .sidebar-title, .linkage-panel, .sidebar-ver { display: none; }
  .step-item { justify-content: center; padding: 10px 0; }
  .step-connector { margin-left: 0; }
  .step-index { width: 36px; height: 36px; font-size: 15px; }
  .brand-en, .brand-sub, .user-role { display: none; }
  .news-heat { display: none; }
}

/* ============ 多渠道创作区（Step4） ============ */
.channel-tabs{display:flex;gap:6px;border-bottom:1px solid var(--border);margin-bottom:14px;flex-wrap:wrap}
.channel-tabs .ctab{border:1px solid var(--border);background:var(--paper,#fff);color:var(--text-2);padding:7px 14px;border-radius:8px;font-size:12.5px;cursor:pointer;transition:.15s}
.channel-tabs .ctab:hover{border-color:var(--brand);color:var(--brand)}
.channel-tabs .ctab.active{background:linear-gradient(135deg,var(--brand),var(--brand2,#7c3aed));color:#fff;border-color:transparent}

.ch-version-bar{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.ch-version{border:1px solid var(--border);background:#fff;color:var(--text-2);padding:6px 12px;border-radius:999px;font-size:12px;cursor:pointer}
.ch-version.active{background:var(--brand-soft);color:var(--brand);border-color:var(--brand)}

.ch-field{margin-bottom:10px;border:1px solid var(--border);border-radius:10px;padding:10px 12px;background:#fff}
.ch-field-label{font-size:12px;font-weight:700;color:var(--text-2);margin-bottom:6px;display:flex;align-items:center;gap:8px}
.ch-field-value{font-size:13px;line-height:1.8;color:var(--text);white-space:pre-wrap}
.ch-list-item{display:flex;align-items:flex-start;gap:8px;padding:4px 0;font-size:13px;line-height:1.7;color:var(--text)}
.ch-idx{color:var(--brand);font-weight:700;min-width:18px}
.ch-skip{border-left:3px solid var(--warning);background:var(--warning-soft);padding:8px 12px;font-size:12.5px;color:var(--text-2);margin-bottom:10px;border-radius:4px}

.ch-area-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.ch-hint{font-size:11.5px;color:var(--text-3);font-weight:400;margin-top:2px}

.ch-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.ch-image-slot{border:1px solid var(--border);border-radius:10px;overflow:hidden;background:#fff}
.ch-slot-media{aspect-ratio:3/4;background:var(--bg,#f5f7fb);display:flex;align-items:center;justify-content:center;overflow:hidden}
.ch-slot-media img{width:100%;height:100%;object-fit:cover}
.ch-slot-loading,.ch-slot-idle{font-size:11.5px;color:var(--text-3);padding:20px}
.ch-slot-body{padding:8px 10px;display:flex;flex-direction:column;gap:6px}
.ch-slot-desc{font-size:11.5px;color:var(--text-2);line-height:1.6;min-height:34px}
.ch-slot-note{font-size:10.5px;color:var(--warning,#b45309)}
.ch-slot-btn,.ch-shot-btn{font-size:11.5px;width:100%}

.ch-shot-list{display:flex;flex-direction:column;gap:12px}
.ch-shot-card{display:flex;gap:12px;border:1px solid var(--border);border-radius:12px;padding:12px;background:#fff}
.ch-shot-media{position:relative;width:110px;height:196px;aspect-ratio:9/16;flex:0 0 auto;border-radius:8px;overflow:hidden;background:var(--bg,#0f172a);display:flex;align-items:center;justify-content:center}
.ch-shot-media img,.ch-shot-media video{width:100%;height:100%;object-fit:cover}
.ch-shot-badge{position:absolute;top:6px;left:6px;background:rgba(15,23,42,.72);color:#fff;font-size:10px;padding:2px 6px;border-radius:999px}
.ch-shot-info{flex:1;display:flex;flex-direction:column;gap:5px;min-width:0}
.ch-shot-num{font-size:13px;font-weight:700;color:var(--text)}
.ch-shot-line{font-size:12px;color:var(--text-2);line-height:1.6}
.ch-shot-line b{color:var(--text)}
.ch-shot-error{font-size:11px;color:var(--danger);background:var(--danger-soft);padding:4px 8px;border-radius:6px}
.ch-shot-info .ch-shot-btn{align-self:flex-start;width:auto;margin-top:2px}

.ch-summary{border:1px solid var(--border);border-radius:12px;padding:14px;background:#fff}
.ch-summary .ch-field{border:none;padding:0;margin:0}
.ch-summary .ch-field-value{background:var(--bg,#f8fafc);border-radius:10px;padding:12px}

.mm-banner{display:flex;align-items:center;gap:8px;margin-top:14px;padding:8px 12px;border-radius:8px;font-size:12px}
.mm-banner .mm-dot{width:8px;height:8px;border-radius:50%;background:currentColor;flex:0 0 auto}
.mm-ok{background:var(--success-soft,#ecfdf5);color:var(--success,#059669)}
.mm-warn{background:var(--warning-soft,#fffbeb);color:var(--warning,#b45309)}

.btn-xs{padding:2px 8px;font-size:11px;border-radius:6px}
