/* style.css — 公众号矩阵 · 纯静态演示前端（亮色） */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --panel-2: #eef0f4;
  --border: #e3e6ec;
  --text: #1f2937;
  --muted: #64748b;
  --accent: #6366f1;
  --accent-2: #a855f7;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 12px;
  --grad: linear-gradient(135deg, #6366f1, #a855f7);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #fff;
  flex-shrink: 0;
}
.logo-title { font-weight: 700; font-size: 15px; }
.logo-sub { font-size: 11px; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group { font-size: 11px; color: var(--muted); padding: 12px 10px 6px; letter-spacing: .08em; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--muted);
  transition: background .15s, color .15s;
  font-size: 13px;
}
.nav-link:hover { background: var(--panel-2); color: var(--text); }
.nav-link.active { background: rgba(99,102,241,.14); color: #4338ca; }
.nav-link .ico { width: 18px; text-align: center; font-size: 15px; }

.sidebar-foot {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 11px;
  color: var(--muted);
}
.mock-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.mock-toggle input { accent-color: #6366f1; cursor: pointer; }
.version-badge {
  display: inline-block;
  background: rgba(99,102,241,.12);
  color: #4338ca;
  border: 1px solid rgba(99,102,241,.35);
  border-radius: 6px;
  padding: 1px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- 主内容（Mac 桌面全屏填充） ---------- */
.main { flex: 1; padding: 26px 32px 60px; width: 100%; }

.page-header { margin-bottom: 22px; }
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header p { color: var(--muted); margin-top: 4px; }

/* ---------- 卡片（自适应栅格：宽屏自动加列、窄屏自动降级） ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .main { padding: 20px; }
}

/* ---------- 统计卡 ---------- */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .num { font-size: 30px; font-weight: 800; }
.stat .lbl { color: var(--muted); font-size: 12px; }
.stat .num.green { color: var(--green); }
.stat .num.accent { color: #6366f1; }
.stat .num.amber { color: var(--amber); }

/* ---------- 流程可视化（带序号） ---------- */
.pipeline { display: flex; align-items: stretch; gap: 0; margin: 6px 0 4px; }
.pipe-step {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  position: relative;
}
.pipe-step + .pipe-step { margin-left: 30px; }
.pipe-step + .pipe-step::before {
  content: '→';
  position: absolute;
  left: -24px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
}
.pipe-step .step-head { display: flex; align-items: center; gap: 8px; }
.pipe-step .step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pipe-step .step-ico { font-size: 18px; }
.pipe-step .step-name { font-weight: 700; font-size: 14px; }
.pipe-step .step-desc { font-size: 11px; color: var(--muted); margin-top: 4px; }
.pipe-step .step-count {
  display: inline-block;
  margin-top: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 20px;
  padding: 1px 10px;
  font-size: 11px;
}
.pipe-step.done { border-color: rgba(22,163,74,.45); }
.pipe-step.done .step-count { color: var(--green); border-color: rgba(22,163,74,.4); background: rgba(22,163,74,.1); }
.pipe-step.current { border-color: rgba(99,102,241,.55); box-shadow: 0 0 0 1px rgba(99,102,241,.2); }
.pipe-step.current .step-count { color: #6366f1; border-color: rgba(99,102,241,.5); background: rgba(99,102,241,.1); }

/* ---------- 封面（mock：渐变背景 + 标题叠加） ---------- */
.cover {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 900 / 383;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.cover-title {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  padding: 0 28px;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,.55);
  letter-spacing: .02em;
}
.cover-label {
  position: absolute;
  right: 8px; bottom: 6px;
  font-size: 10px;
  color: rgba(255,255,255,.78);
  background: rgba(0,0,0,.35);
  border-radius: 5px;
  padding: 1px 7px;
}
.thumb { border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.thumb .cover { aspect-ratio: 900/383; }
.thumb .cover-title { font-size: 13px; padding: 0 10px; }

/* ---------- 徽标 / 按钮 ---------- */
.badge {
  display: inline-block;
  font-size: 11px;
  border-radius: 20px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--panel-2);
}
.badge.ready { color: #2563eb; border-color: rgba(59,130,246,.4); background: rgba(59,130,246,.1); }
.badge.published { color: var(--green); border-color: rgba(22,163,74,.4); background: rgba(22,163,74,.1); }
.badge.track { color: #e11d48; border-color: rgba(244,114,182,.4); background: rgba(244,114,182,.1); }
.badge.video-pending { color: #7c3aed; border-color: rgba(168,85,247,.4); background: rgba(168,85,247,.1); }
.badge.video-ready { color: #047857; border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.1); }

.mp-body-img { display: block; width: 100%; border-radius: 10px; margin: 18px 0; object-fit: cover; }

/* ---------- 穿搭风格 ---------- */
.mp-styles { margin: 6px 0 20px; }
.mp-styles-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.mp-styles-row { display: flex; flex-direction: column; gap: 16px; }
.mp-style-card { position: relative; }
.mp-style-card img {
  display: block; width: 100%; height: auto;
  border-radius: 10px; object-fit: contain; background: #fafafa;
}
.mp-style-tag {
  display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600;
  padding: 4px 14px; border-radius: 999px; background: rgba(0,0,0,.07); color: #333;
}

/* ---------- 表情秀 ---------- */
.expr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.expr-card { padding: 12px; }
.expr-video { position: relative; border-radius: 10px; overflow: hidden; }
.expr-video video { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #000; border-radius: 10px; }
.expr-emoji {
  position: absolute; top: 8px; right: 8px; font-size: 20px;
  background: rgba(0,0,0,.45); border-radius: 999px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.expr-label { margin-top: 8px; font-size: 14px; font-weight: 600; text-align: center; }

/* ---------- 视频占位 / 真实视频 ---------- */
.mp-video { position: relative; margin-bottom: 20px; border-radius: 10px; overflow: hidden; }
.mp-video video { display: block; width: 100%; border-radius: 10px; background: #000; aspect-ratio: 16 / 9; object-fit: cover; }
.mp-video .mp-video-tag {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff;
}

/* ---------- 视频占位 ---------- */
.video-placeholder {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1c2536, #2c3e50);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  margin-bottom: 20px;
  cursor: pointer;
}
.video-placeholder .video-play-btn {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  border: 2px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  transition: transform .15s;
}
.video-placeholder:hover .video-play-btn { transform: scale(1.08); }
.video-placeholder .video-label {
  font-size: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.video-placeholder .video-label span { font-size: 11px; color: rgba(255,255,255,.6); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover { opacity: .9; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--panel-2); }
.btn-green { background: var(--green); color: #ffffff; }
.btn-green:hover { opacity: .9; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ---------- 成品列表 ---------- */
.item {
  display: flex;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  align-items: flex-start;
}
.item + .item { margin-top: 12px; }
.item .body { flex: 1; min-width: 0; }
.item .title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.item .meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.item .actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag-row .chip { font-size: 11px; }

.chip {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: rgba(99,102,241,.5); color: #4338ca; }
.chip.active { background: rgba(99,102,241,.14); border-color: rgba(99,102,241,.5); color: #4338ca; font-weight: 600; }
.chip-static { cursor: default; }

/* ---------- 成品库工具栏 ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search-input {
  flex: 1;
  min-width: 220px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text);
  outline: none;
}
.search-input:focus { border-color: rgba(99,102,241,.6); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.search-input::placeholder { color: var(--muted); }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.filter-lbl { font-size: 12px; color: var(--muted); margin-right: 2px; }

/* ---------- 流水日志 ---------- */
.task-log {
  margin-top: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  max-height: 260px;
  overflow: auto;
}
.log-line { display: flex; gap: 10px; padding: 3px 0; color: var(--text); }
.log-line .t { color: var(--muted); flex-shrink: 0; }
.log-line.ok { color: var(--green); }

/* ---------- 公众号预览（模拟微信文章） ---------- */
.mp-stage { background: #e9ebee; padding: 24px 0; }

/* ---------- 预览页切换箭头 ---------- */
.preview-shell { display: flex; align-items: center; gap: 14px; }
.preview-shell .mp-stage { flex: 1; min-width: 0; }
.nav-arrow {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.nav-arrow:hover:not(:disabled) { border-color: rgba(99,102,241,.6); color: #4338ca; transform: scale(1.05); }
.nav-arrow:disabled { opacity: .35; cursor: not-allowed; }
@media (max-width: 900px) {
  .preview-shell { flex-direction: column; }
  .nav-arrow { width: 40px; height: 40px; }
}
.mp-page {
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.08);
}
.mp-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
}
.mp-avatar {
  width: 40px; height: 40px;
  border-radius: 6px;
  background: var(--grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.mp-account-name { font-size: 16px; font-weight: 700; }
.mp-account-sub { font-size: 12px; color: #888; }
.mp-follow {
  margin-left: auto;
  background: #07c160;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 13px;
  cursor: pointer;
}
.mp-article { padding: 28px 24px 8px; }
.mp-title { font-size: 21px; font-weight: 800; line-height: 1.4; margin-bottom: 12px; color: #1a1a1a; }
.mp-meta { font-size: 12px; color: #999; margin-bottom: 18px; display: flex; gap: 14px; }
.mp-cover { border-radius: 6px; overflow: hidden; margin-bottom: 20px; }
.mp-body { font-size: 16px; line-height: 1.75; color: #333; word-break: break-word; }
.mp-body h1, .mp-body h2 { font-size: 18px; margin: 18px 0 8px; color: #1a1a1a; }
.mp-body h3 { font-size: 16px; margin: 14px 0 6px; color: #1a1a1a; }
.mp-body p { margin: 10px 0; }
.mp-body ul, .mp-body ol { margin: 10px 0 10px 22px; }
.mp-body li { margin: 4px 0; }
.mp-body strong { color: #1a1a1a; }
.mp-body code { background: #f2f2f2; border-radius: 4px; padding: 1px 6px; font-size: 14px; }
.mp-footer {
  padding: 20px 24px 26px;
  border-top: 1px solid #f0f0f0;
  color: #999;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.mp-actions { display: flex; gap: 8px; }
.mp-mini-card {
  margin: 0 24px 24px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fafafa;
}
.mp-mini-ico {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: var(--grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.mp-mini-name { font-size: 14px; font-weight: 600; }
.mp-mini-desc { font-size: 12px; color: #999; }
.mp-mini-tag { margin-left: auto; background: #f2f2f2; color: #666; border-radius: 4px; padding: 2px 8px; font-size: 11px; }

/* ---------- 区块标题 ---------- */
.section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 99; }
.toast {
  background: #ffffff;
  border: 1px solid rgba(99,102,241,.5);
  color: #1f2937;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
  animation: toast-in .2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 商城 ---------- */
.price-card { text-align: center; }
.price-card .p-name { font-weight: 700; font-size: 15px; }
.price-card .p-price { font-size: 26px; font-weight: 800; margin: 8px 0 4px; color: #111827; }
.price-card .p-price .cur { font-size: 15px; color: var(--muted); }
.price-card .p-desc { font-size: 12px; color: var(--muted); }
.price-card .btn { margin-top: 12px; width: 100%; justify-content: center; }

.pack {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  display: flex;
  flex-direction: column;
}
.pack .cover { border: none; border-radius: 0; }
.pack .pack-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pack .pack-title { font-weight: 700; }
.pack .pack-meta { font-size: 12px; color: var(--muted); }
.pack .btn { margin-top: auto; width: 100%; justify-content: center; }

/* ---------- 页脚 ---------- */
.page-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; font-size: 13px; }
