/* 伽优美视频生产系统 · 图标导航 + 分步向导
   设计原则：大图标、大按钮、一步只问一件事 */

:root {
  --brand: #E03060;
  --brand-dark: #c0244d;
  --brand-soft: #fdeef2;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1f2329;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-2: #eef0f3;
  --ok: #16a34a;
  --ok-soft: #eaf7ef;
  --bad: #dc2626;
  --bad-soft: #fdecec;
  --warn: #d97706;
  --warn-soft: #fdf3e3;
}

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

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 15px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ===== 顶栏 ===== */
.top {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 15px 28px; position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: var(--brand); color: #fff; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.top h1 { font-size: 19px; font-weight: 700; }
.sub { font-size: 13px; color: var(--muted); }
.pill { padding: 5px 13px; border-radius: 999px; font-size: 13px;
  background: var(--warn-soft); color: var(--warn); }
.pill.online { background: var(--ok-soft); color: var(--ok); }
.pill.offline { background: var(--bad-soft); color: var(--bad); }

main { max-width: 1000px; margin: 0 auto; padding: 30px 24px 70px; }
.view { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== 图标九宫格 ===== */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.icon-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 34px 20px; min-height: 178px;
  background: var(--card); border: 2px solid var(--line); border-radius: 20px;
  cursor: pointer; font-family: inherit; color: var(--text);
  transition: all .2s; text-align: center;
}
.icon-tile:hover {
  border-color: var(--brand); transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(224,48,96,.14);
}
.icon-tile .ico { font-size: 52px; line-height: 1; }
.icon-tile b { font-size: 18px; font-weight: 700; }
.icon-tile .tip { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* 主入口格外醒目 */
.primary-tile {
  background: linear-gradient(150deg, #fef2f6 0%, #fde8ee 100%);
  border-color: var(--brand);
}
.primary-tile b { color: var(--brand-dark); font-size: 20px; }
.primary-tile:hover { background: linear-gradient(150deg, #fde8ee 0%, #fcdde6 100%); }

/* ===== 子页头 ===== */
.sub-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.sub-head h2 { font-size: 22px; }
.back-btn {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 16px; cursor: pointer; font-family: inherit;
  font-size: 14px; color: var(--text);
}
.back-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ===== 向导 ===== */
.wizard-head {
  display: flex; align-items: center; gap: 18px; margin-bottom: 28px;
  flex-wrap: wrap;
}
.wizard-head h2 { font-size: 22px; }
.steps-bar { display: flex; align-items: center; gap: 0; margin-left: auto; }
.step-dot {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--line-2); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; transition: all .25s;
}
.step-dot.active { background: var(--brand); color: #fff; transform: scale(1.08); }
.step-dot.done { background: var(--ok); color: #fff; }
.step-line { width: 44px; height: 2px; background: var(--line-2); }
.step-line.done { background: var(--ok); }

.wiz-step {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 32px 34px;
}
.step-title {
  font-size: 20px; font-weight: 700; margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.step-title .n {
  background: var(--brand-soft); color: var(--brand-dark);
  padding: 4px 13px; border-radius: 8px; font-size: 14px; font-weight: 600;
}

/* 内容类型选择网格 */
.choice-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 13px;
}
.choice {
  border: 2px solid var(--line); border-radius: 14px; padding: 17px 15px;
  cursor: pointer; font-family: inherit; background: var(--card);
  text-align: left; transition: all .16s; color: var(--text);
}
.choice:hover { border-color: var(--brand); background: var(--brand-soft); }
.choice.active { border-color: var(--brand); background: var(--brand-soft); }
.choice b { display: block; font-size: 15px; margin-bottom: 3px; }
.choice span { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* 字段 */
.field { margin-bottom: 26px; }
.field > label {
  display: block; font-size: 14px; color: var(--muted);
  margin-bottom: 11px; font-weight: 600;
}
.chip-row { display: flex; gap: 11px; flex-wrap: wrap; }
.pick {
  border: 2px solid var(--line); border-radius: 12px; padding: 13px 22px;
  cursor: pointer; font-family: inherit; font-size: 15px; background: var(--card);
  color: var(--text); transition: all .16s; display: flex; flex-direction: column;
  align-items: center; gap: 3px; min-width: 96px;
}
.pick:hover { border-color: var(--brand); }
.pick.active { border-color: var(--brand); background: var(--brand-soft);
  color: var(--brand-dark); font-weight: 700; }
.pick-ico { font-size: 22px; line-height: 1; }
.pick-sub { font-size: 11px; color: var(--muted); font-weight: 400; }
.pick.active .pick-sub { color: var(--brand-dark); opacity: .8; }

/* 提示框 */
.hint-box {
  background: var(--brand-soft); border-left: 4px solid var(--brand);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 18px;
  font-size: 14px; color: var(--text);
}
.hint-box b { color: var(--brand-dark); }

textarea {
  width: 100%; min-height: 104px; resize: vertical;
  padding: 15px 17px; font-size: 15px; font-family: inherit;
  border: 2px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--text); line-height: 1.65;
}
textarea:focus { outline: none; border-color: var(--brand); }
textarea::placeholder { color: #9ca3af; }

.quick-tips {
  margin-top: 18px; display: flex; align-items: center;
  gap: 9px; flex-wrap: wrap; font-size: 13px; color: var(--muted);
}
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-family: inherit;
}
.chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* ===== 第 3 步：输入方式切换（一句话 / 粘贴脚本） ===== */
.mode-tabs {
  display: flex; gap: 8px; margin-bottom: 14px;
  background: var(--line-2, #f1f3f5); padding: 5px; border-radius: 12px;
}
.mode-tab {
  flex: 1; border: none; background: transparent; cursor: pointer;
  padding: 10px 16px; border-radius: 9px; font-family: inherit;
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: background .16s, color .16s;
}
.mode-tab:hover { color: var(--brand); }
.mode-tab.active {
  background: #fff; color: var(--brand-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

/* 脚本输入区：比一句话框更高，等宽字体便于看分镜对齐 */
.script-area {
  min-height: 260px; resize: vertical;
  font-family: "Consolas", "Courier New", ui-monospace, monospace;
  font-size: 13.5px; line-height: 1.8;
  white-space: pre-wrap; word-break: break-word;
}
.script-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}
.script-lab { font-size: 13px; color: var(--muted); }
.script-count {
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.script-count.warn { color: #d97706; font-weight: 600; }
.script-count.over { color: #dc2626; font-weight: 700; }

.script-bar {
  display: flex; align-items: center; gap: 9px;
  flex-wrap: wrap; margin-top: 12px;
}
.script-tip { font-size: 12px; color: var(--muted); }

/* 解析预览卡 */
.sc-preview {
  margin-top: 14px; padding: 14px 18px;
  background: var(--brand-soft); border-left: 4px solid var(--brand);
  border-radius: 10px; font-size: 13px; color: var(--text);
}
.sc-preview .sc-summ { font-weight: 700; color: var(--brand-dark); margin-bottom: 8px; }
.sc-preview .sc-warns { margin-top: 8px; font-size: 12.5px; color: #b45309; }
.sc-preview .sc-warns div { margin-top: 3px; }
.sc-preview ol { margin: 8px 0 0; padding-left: 22px; }
.sc-preview li {
  margin-bottom: 5px; line-height: 1.65; color: var(--text);
  font-size: 12.5px; font-family: "Consolas", "Courier New", ui-monospace, monospace;
}
.sc-preview .sc-more { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* ===== 视频库筛选台（按日期 / 类型 / 状态找片子） ===== */
.lib-filter {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 20px;
}
.lf-row {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; padding: 8px 0;
}
.lf-row + .lf-row { border-top: 1px dashed var(--line-2, #eef0f2); }
.lf-lab {
  font-size: 13px; font-weight: 600; color: var(--muted);
  min-width: 62px; flex-shrink: 0;
}
.lf-chips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; flex: 1; }
.lf-chip {
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
  font-size: 12.5px; font-family: inherit; white-space: nowrap;
  transition: all .15s;
}
.lf-chip:hover { border-color: var(--brand); color: var(--brand); }
.lf-chip.active {
  background: var(--brand); border-color: var(--brand);
  color: #fff; font-weight: 600;
}
/* v4.10.3：成品统一住成品库——我的视频里只剩一个金色跳转引导按钮 */
.lf-chip-go {
  border-color: #f0b429; color: #b45309; background: #fffbeb;
  font-weight: 600;
}
.lf-chip-go:hover {
  border-color: #f0b429; color: #92400e; background: #fef3c7;
}

.lf-group-toggle {
  border: 1px solid var(--brand); background: var(--brand-soft);
  color: var(--brand-dark); padding: 6px 14px; border-radius: 999px;
  cursor: pointer; font-size: 12.5px; font-family: inherit;
  font-weight: 600; white-space: nowrap;
}
.lf-group-toggle:not(.active) {
  background: #fff; border-color: var(--line); color: var(--muted); font-weight: 400;
}

.lf-search {
  flex: 1; min-width: 180px; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; font-family: inherit; color: var(--text); background: #fff;
}
.lf-search:focus { outline: none; border-color: var(--brand); }

.lf-sum-row { justify-content: space-between; }
.lf-sum { font-size: 12.5px; color: var(--muted); }
.lf-reset {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  padding: 5px 14px; border-radius: 999px; cursor: pointer;
  font-size: 12.5px; font-family: inherit;
}
.lf-reset:hover { border-color: var(--brand); color: var(--brand); }

/* ===== v4.9.5（董事长指令十）：按状态分类摆放 + 制作人 ===== */
/* 四分类分组：成品 → 制作中 → 排队中 → 不成功（顺序由 JS 固定） */
.bucket-group { margin-bottom: 26px; }
.bucket-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin-bottom: 12px;
  border-left: 4px solid var(--brand); border-radius: 8px;
  background: linear-gradient(90deg, var(--brand-soft), rgba(255, 255, 255, 0));
}
.bucket-ico { font-size: 17px; }
.bucket-lab { font-size: 15px; font-weight: 700; color: var(--brand-dark); }
.bucket-n {
  font-size: 12px; font-weight: 700; color: #fff; background: var(--brand);
  padding: 2px 10px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.bucket-tip { flex: 1; font-size: 12px; color: var(--muted); }
.bucket-cost {
  font-size: 12px; color: var(--brand-dark); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* 各分类头配色：成品绿、制作中玫红、排队中橙、不成功灰红 */
.bg-done .bucket-head {
  border-left-color: #16a34a;
  background: linear-gradient(90deg, rgba(22, 163, 74, 0.10), rgba(255, 255, 255, 0));
}
.bg-done .bucket-lab { color: #15803d; }
.bg-done .bucket-n { background: #16a34a; }
.bg-running .bucket-head {
  border-left-color: var(--brand);
  background: linear-gradient(90deg, var(--brand-soft), rgba(255, 255, 255, 0));
}
.bg-queued .bucket-head {
  border-left-color: #d97706;
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.10), rgba(255, 255, 255, 0));
}
.bg-queued .bucket-lab { color: #b45309; }
.bg-queued .bucket-n { background: #d97706; }
.bg-failed .bucket-head {
  border-left-color: #9ca3af;
  background: linear-gradient(90deg, rgba(156, 163, 175, 0.13), rgba(255, 255, 255, 0));
}
.bg-failed .bucket-lab { color: #4b5563; }
.bg-failed .bucket-n { background: #9ca3af; }
/* v4.10b：删除留档组（灰蓝，弱化视觉——已结束的留档不抢注意力） */
.bg-tombed .bucket-head {
  border-left-color: #94a3b8;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.10), rgba(255, 255, 255, 0));
}
.bg-tombed .bucket-lab { color: #475569; }
.bg-tombed .bucket-n { background: #94a3b8; }

/* ===== v4.10b（董事长指令：删除留档的改为单列显示）===== */
/* 一行一条紧凑留档：我的视频「删除留档」组 + 「🗄️ 删除留档」页通用 */
.tomb-list { display: grid; gap: 8px; }
.tomb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border: 1px solid var(--line-2);
  border-left: 3px solid #cbd5e1; border-radius: 10px;
  background: #fafbfc; font-size: 13px; flex-wrap: wrap;
}
.tomb-row:hover { background: #f1f5f9; }
.tomb-row .t-ico { font-size: 14px; }
.tomb-row .t-id { color: var(--muted); font-weight: 700; white-space: nowrap; }
.tomb-row .t-ttl {
  flex: 1; min-width: 120px; font-weight: 600;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.tomb-row .t-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.tomb-row .badge { flex-shrink: 0; }
/* 「🗄️ 删除留档」页版本：两行（主体 + 原主人/删除人/花费），左边红条 */
.tomb-row.page {
  border-left-color: #dc2626; background: #fff;
  padding: 10px 14px;
}
.tomb-row.page .t-main {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}
.tomb-row.page .t-sub {
  width: 100%; color: var(--muted); font-size: 12px; padding-left: 24px;
}

/* 制作人行（所有视角可见） */
.task-card .owner-row .v { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.who-badge {
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  border: 1px solid transparent; line-height: 1.6;
}
.who-badge.me { color: #fff; background: var(--brand); border-color: var(--brand); }
.who-badge.other { color: #475569; background: #eef2f7; border-color: #dbe3ec; }

/* 概览里的四分类小计数 */
.lf-mini-wrap { margin-left: 10px; display: inline-flex; gap: 6px; flex-wrap: wrap; }
.lf-mini {
  font-size: 11.5px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: #fff;
}
.lf-mini b { color: var(--text); font-variant-numeric: tabular-nums; }
.lf-mini.b-done { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.lf-mini.b-running { border-color: #fbcfe8; background: #fdf2f8; color: var(--brand-dark); }
.lf-mini.b-queued { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.lf-mini.b-failed { border-color: #e5e7eb; background: #f9fafb; color: #4b5563; }

/* 摆放方式切换 */
.lf-view-toggle .lf-chip { font-weight: 600; }

/* 日期分组 */
.date-group { margin-bottom: 24px; }
/* v4.10.4：等待审批分组头（琥珀弱化配色，不与制作中的黄冲突） */
.bg-awaiting { border-left: 4px solid #f0b429; }
.bg-awaiting .bucket-head {
  background: linear-gradient(90deg, #fffbeb, rgba(255, 255, 255, 0));
}
.bg-awaiting .bucket-lab { color: #b45309; }
.await-note { color: #b45309; font-size: 12.5px; }
.date-head {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; margin-bottom: 12px;
  background: linear-gradient(90deg, var(--brand-soft), rgba(255, 255, 255, 0));
  border-left: 4px solid var(--brand); border-radius: 8px;
}
.date-ico { font-size: 17px; }
.date-lab { font-size: 14px; font-weight: 700; color: var(--brand-dark); flex: 1; }
.date-n {
  font-size: 12px; color: var(--muted); background: #fff;
  border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px;
}
.date-cost {
  font-size: 12px; color: var(--brand-dark); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* 任务卡（带类型图标） */
.task-card .task-ico { font-size: 17px; margin-right: 7px; vertical-align: -1px; }
.task-card .task-ttl { font-weight: 600; }

.lib-empty {
  padding: 46px 20px; text-align: center;
  font-size: 15px; color: var(--muted); line-height: 2;
  background: #fafbfc; border: 1px dashed var(--line); border-radius: 14px;
}
.lib-empty .desc { font-size: 13px; }

@media (max-width: 640px) {
  .lf-lab { min-width: 100%; margin-bottom: 2px; }
  .lf-group-toggle { width: 100%; }
  .date-cost { display: none; }
  .bucket-cost { display: none; }
  .bucket-tip { display: none; }
  .lf-mini-wrap { display: flex; margin: 6px 0 0; }
}

/* 向导底部 */
.wiz-foot {
  display: flex; align-items: center; gap: 14px;
  margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line-2);
  flex-wrap: wrap;
}
.primary {
  border: none; border-radius: 12px; cursor: pointer;
  background: var(--brand); color: #fff; font-family: inherit;
  font-weight: 700; padding: 13px 32px; font-size: 16px;
  text-decoration: none; display: inline-block; transition: background .18s;
}
.primary:hover { background: var(--brand-dark); }
.primary:disabled { background: #d1d5db; cursor: not-allowed; }
.primary.big { padding: 14px 40px; font-size: 17px; margin-left: auto; }
.ghost {
  background: #fff; color: var(--text); border: 1px solid var(--line);
  padding: 12px 24px; border-radius: 12px; cursor: pointer;
  font-size: 15px; font-family: inherit;
}
.ghost:hover { border-color: var(--brand); color: var(--brand); }

.runmode {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--muted); cursor: pointer;
}
.runmode input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.runmode .tip { font-size: 12px; }

/* ===== 结果 ===== */
.res-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px; border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 14px;
}
.res-card .badge { flex-shrink: 0; }
.res-card .info { flex: 1; min-width: 0; }
.res-card .info b { display: block; font-size: 16px; margin-bottom: 5px; }
.res-card .info .meta { font-size: 14px; color: var(--muted); }
.path {
  font-family: Consolas, monospace; font-size: 13px;
  background: #f3f4f6; padding: 5px 11px; border-radius: 6px;
  display: inline-block; margin-top: 8px; word-break: break-all;
  color: var(--brand-dark);
}
.badge { padding: 5px 14px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.run { background: var(--warn-soft); color: var(--warn); }
.badge.wait { background: #fef3c7; color: #b45309; }   /* v4.10.4 等待审批（琥珀） */
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--brand-soft); color: var(--brand-dark); }

.loading-dots::after { content: ''; animation: dots 1.4s steps(4, end) infinite; }
@keyframes dots {
  0% { content: ''; } 25% { content: '.'; }
  50% { content: '..'; } 75% { content: '...'; }
}

/* ===== 通用 ===== */
.desc { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.hidden { display: none !important; }

.card-list { display: grid; gap: 13px; }
.info-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
}
.info-card h3 { font-size: 17px; color: var(--brand-dark); margin-bottom: 11px; }
.line-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size: 14px;
}
.line-row:last-child { border-bottom: none; }
.line-row .k { color: var(--muted); }
.line-row .v { font-weight: 600; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px; margin-bottom: 22px;
}
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 20px; text-align: center;
}
.stat .k { font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.stat .v { font-size: 27px; font-weight: 700; color: var(--brand-dark); }

.tpl-card {
  border: 2px solid var(--line); border-radius: 16px; padding: 20px 22px;
  margin-bottom: 14px; cursor: pointer; transition: all .18s;
  background: var(--card);
}
.tpl-card:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(224,48,96,.1); }
.tpl-card b { font-size: 17px; display: block; margin-bottom: 5px; }
.tpl-card .meta { font-size: 13px; color: var(--muted); }
.tpl-card .use {
  color: var(--brand); font-weight: 600; font-size: 14px;
  margin-top: 10px; display: inline-block;
}

/* ---- 模板速建：新建入口 + 表单（2026-10-07）---- */
.tpl-bar {
  display: flex; align-items: center; gap: 14px;
  margin: 16px 0 18px; flex-wrap: wrap;
}
.tpl-bar-tip { font-size: 13px; color: var(--muted); }

.tpl-form {
  border: 2px solid var(--brand); border-radius: 16px;
  padding: 20px 22px; margin-bottom: 20px; background: var(--card);
  box-shadow: 0 6px 20px rgba(224,48,96,.08);
}
.tpl-form-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.tpl-form-head b { font-size: 17px; }
.tpl-form .x-btn {
  border: none; background: transparent; cursor: pointer;
  font-size: 17px; color: var(--muted); line-height: 1; padding: 4px 6px;
}
.tpl-form .x-btn:hover { color: var(--brand); }
.tpl-form .field { margin-bottom: 15px; }
.tpl-form label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 7px; }
.tpl-form .req { color: var(--brand); }
.tpl-form input[type="text"],
.tpl-form select,
.tpl-form textarea {
  width: 100%; box-sizing: border-box; font-size: 14px; font-family: inherit;
  padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; color: inherit;
}
.tpl-form textarea { resize: vertical; line-height: 1.5; }
.tpl-form input[type="text"]:focus,
.tpl-form select:focus,
.tpl-form textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(224,48,96,.12);
}
.tpl-overwrite {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: #b45309; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 14px;
}
.tpl-overwrite input { margin-top: 2px; }
.tpl-form-foot {
  display: flex; gap: 12px; justify-content: flex-end;
  padding-top: 6px; border-top: 1px solid var(--line-2); margin-top: 4px;
}
.tpl-form-msg { font-size: 13px; margin-top: 10px; min-height: 18px; }

.tpl-card-top { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.tpl-card-top b { margin-bottom: 0; }
.tpl-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--line-2); color: var(--muted);
}
.tpl-tag.self { background: rgba(224,48,96,.1); color: var(--brand); font-weight: 600; }
.tpl-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
}
.tpl-del {
  border: 1.5px solid var(--line); background: transparent; cursor: pointer;
  font-size: 13px; color: var(--muted); border-radius: 8px; padding: 4px 12px;
  transition: all .15s;
}
.tpl-del:hover { border-color: #dc2626; color: #dc2626; background: #fef2f2; }

/* 帮助 */
.help-step { display: flex; gap: 15px; margin-bottom: 20px; }
.help-step .num {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.help-step b { display: block; font-size: 16px; margin-bottom: 3px; }
.help-step p { font-size: 14px; color: var(--muted); }
.help-body h3 {
  font-size: 17px; margin: 26px 0 12px;
  padding-top: 20px; border-top: 1px solid var(--line-2);
}
.faq dt { font-weight: 700; font-size: 15px; margin-top: 15px; }
.faq dd {
  font-size: 14px; color: var(--muted);
  padding-left: 15px; border-left: 3px solid var(--brand-soft);
}
code {
  font-family: Consolas, monospace; font-size: 13px;
  background: #f3f4f6; padding: 2px 7px; border-radius: 5px;
  color: var(--brand-dark);
}

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 22px; }
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1f2329; color: #fff; padding: 14px 28px; border-radius: 12px;
  font-size: 15px; opacity: 0; transition: all .3s; pointer-events: none;
  z-index: 99; max-width: 90vw; text-align: center;
}
.toast.show { opacity: .96; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--bad); }
.toast.ok { background: var(--ok); }

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .icon-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .icon-tile { min-height: 150px; padding: 26px 15px; }
  .icon-tile .ico { font-size: 42px; }
  .icon-tile b { font-size: 16px; }
}
@media (max-width: 560px) {
  .top { padding: 12px 16px; }
  .top h1 { font-size: 16px; }
  .sub { display: none; }
  main { padding: 20px 14px 50px; }
  .icon-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .icon-tile { min-height: 132px; padding: 20px 10px; gap: 7px; }
  .icon-tile .ico { font-size: 34px; }
  .icon-tile b { font-size: 15px; }
  .icon-tile .tip { display: none; }
  .wiz-step { padding: 24px 18px; }
  .steps-bar { margin-left: 0; width: 100%; justify-content: center; }
  .step-line { width: 30px; }
  .primary.big { margin-left: 0; width: 100%; }
  .wiz-foot .ghost { flex: 1; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
}

/* 更多内容类型展开 */
.more-wrap { grid-column: 1 / -1; text-align: center; margin-top: 4px; }
.more-btn { padding: 8px 20px !important; font-size: 14px !important; }
#ct-rest { margin-top: 13px; }

/* ===== 任务卡操作（开跑/取消） ===== */
.mine-actions { display:flex; gap:10px; margin-top:12px; padding-top:10px; border-top:1px dashed var(--line); }
.mini-btn { flex:1; padding:9px 0; border-radius:10px; border:1.5px solid var(--line);
  background:#fff; color:var(--ink); font-size:13.5px; font-weight:600; cursor:pointer;
  transition:background .15s, border-color .15s; }
.mini-btn:hover { background:#f6f7f9; border-color:#c9cfda; }
.mini-btn.primary { background:var(--brand); border-color:var(--brand); color:#fff; }
.mini-btn.primary:hover { background:#c01f4f; }
.mini-btn:disabled { opacity:.55; cursor:wait; }

/* ===== 品牌素材库：添加表单 + 素材网格 ===== */
#asset-form { background:#fff; border:2px solid var(--line); border-radius:16px;
  padding:18px; margin:14px 0 20px; }
.form-row { display:flex; gap:14px; margin-bottom:12px; flex-wrap:wrap; }
.form-row label { flex:1; min-width:220px; font-size:13px; color:var(--dim); display:flex;
  flex-direction:column; gap:6px; font-weight:600; }
.form-row input[type=text], .form-row select, .form-row textarea {
  border:1.5px solid var(--line); border-radius:10px; padding:9px 11px;
  font-size:14px; color:var(--ink); background:#fafbfc; font-family:inherit; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline:none; border-color:var(--brand); background:#fff; }
.form-row input[type=file] { font-size:13px; }
.form-actions { display:flex; align-items:center; gap:14px; margin-top:4px; }
#af-hint { font-size:13px; }

.asset-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(168px,1fr)); gap:14px; }
.asset-card { background:#fff; border:1.5px solid var(--line); border-radius:14px;
  padding:10px; display:flex; flex-direction:column; gap:6px; }
.asset-thumb { width:100%; height:96px; object-fit:cover; border-radius:9px; background:#f2f3f5; }
.asset-ph { display:flex; align-items:center; justify-content:center; font-size:34px; }
.asset-name { font-size:13.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap; }
.asset-meta { font-size:11.5px; color:var(--dim); }
.asset-tags { font-size:11px; color:#c0244d; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap; }
.asset-ops { margin-top:auto; }
/* v4.8.3：原 .asset-link 外链样式废弃，改站内预览按钮（.mini-btn） */
.mini-btn.view { border-color:var(--brand); color:var(--brand); }

/* ===== v4.9.6（董事长指令十一）：素材归组的图标卡片 ===== */
/* 一个组 = 一个人物/一个系列；组头即「图标」，点开看组内多张 */
.asset-groups { display:flex; flex-direction:column; gap:10px; }
.asset-group {
  background:#fff; border:1.5px solid var(--line); border-radius:14px; overflow:hidden;
}
.asset-group.multi { border-color:#f3d0dd; }
.ag-head {
  display:flex; align-items:center; gap:9px; padding:11px 14px; cursor:pointer;
  background:linear-gradient(90deg,var(--brand-soft),rgba(255,255,255,0)); user-select:none;
}
.asset-group:not(.multi) .ag-head { cursor:default; background:#fff; }
.ag-ico {
  font-size:20px; width:38px; height:38px; line-height:38px; text-align:center;
  border-radius:11px; background:#fff; border:1.5px solid var(--line); flex:0 0 auto;
}
.asset-group.multi .ag-ico { border-color:var(--brand); background:var(--brand-soft); }
.ag-label { font-size:14.5px; font-weight:700; color:var(--brand-dark); }
.ag-n {
  font-size:11.5px; font-weight:700; color:#fff; background:var(--brand);
  padding:1px 9px; border-radius:999px;
}
.ag-n-1 { background:#c9ced6; }
.ag-type { font-size:11.5px; color:var(--dim); }
.ag-use { font-size:11.5px; color:#15803d; background:#f0fdf4; border:1px solid #bbf7d0;
  padding:1px 8px; border-radius:999px; }
.ag-rename { margin-left:auto; }
.ag-caret { font-size:12px; color:var(--dim); font-weight:600; }
.asset-group.multi .ag-caret { margin-left:8px; }
.asset-group.multi .ag-rename + .ag-caret { margin-left:6px; }
.ag-body { padding:0 14px 14px; }
.ag-body .asset-grid { grid-template-columns:repeat(auto-fill,minmax(158px,1fr)); }
.asset-card .asset-ops { display:flex; gap:6px; flex-wrap:wrap; }
.asset-card .rn-by { color:#b45309; }
.asset-card [data-rename] { border-color:#fbcfe8; color:var(--brand-dark); }
@media (max-width:640px){ .asset-grid { grid-template-columns:repeat(2,1fr); }
  .ag-type, .ag-use { display:none; } }

/* ===== 登录层 ===== */
.login-mask { position:fixed; inset:0; background:rgba(250,250,252,.97);
  display:flex; align-items:center; justify-content:center; z-index:900; }
.login-box { width:min(400px,92vw); background:#fff; border:2px solid var(--line);
  border-radius:22px; padding:34px 30px; text-align:center; box-shadow:0 18px 50px rgba(0,0,0,.09); }
.big-logo { width:64px; height:64px; line-height:64px; font-size:30px; border-radius:18px;
  background:var(--brand); color:#fff; display:inline-block; margin-bottom:14px; }
.login-box h2 { font-size:19px; margin:0 0 6px; }
.login-field { display:flex; flex-direction:column; gap:6px; text-align:left;
  font-size:13px; color:var(--dim); font-weight:600; margin-top:14px; }
.login-field input { border:1.5px solid var(--line); border-radius:11px; padding:11px 13px;
  font-size:15px; background:#fafbfc; font-family:inherit; color:var(--ink); }
.login-field input:focus { outline:none; border-color:var(--brand); background:#fff; }
.primary.big.full { width:100%; margin-top:20px; }
#lg-hint { margin-top:12px; font-size:13px; }

/* ===== 顶栏账号区 ===== */
.status { display:flex; align-items:center; gap:8px; }
.pill.who { background:#fde8ee; color:#c0244d; font-weight:600; }
.pill.ghost { background:transparent; border:1.5px solid var(--line); cursor:pointer;
  font-family:inherit; font-size:13px; }
.pill.ghost:hover { background:#f6f7f9; }

/* ===== 删除留档卡 ===== */
.info-card.tomb { border-left:4px solid #dc2626; }

/* ===== 添加素材：多文件预览 ===== */
.files-preview { display:flex; flex-wrap:wrap; gap:10px; margin:2px 0 12px; }
.pv-item { position:relative; width:88px; display:flex; flex-direction:column; gap:4px; }
.pv-item img, .pv-item .pv-ph { width:88px; height:70px; object-fit:cover;
  border-radius:9px; border:1.5px solid var(--line); background:#f2f3f5;
  display:flex; align-items:center; justify-content:center; font-size:24px; }
.pv-name { font-size:10.5px; color:var(--dim); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }
.pv-idx { position:absolute; top:4px; right:4px; width:17px; height:17px;
  border-radius:50%; background:var(--brand); color:#fff; font-size:10.5px;
  line-height:17px; text-align:center; font-weight:700; }

/* ===== 成片播放（v4.8） ===== */
.mini-btn.play { background:var(--brand); color:#fff; border-color:var(--brand);
  font-weight:700; }
.mini-btn.play:hover { filter:brightness(1.08); }
/* 2026-10-06 P0：试跑占位片必须一眼扎眼——原琥珀色小字不够醒目，彩条片
   曾被当成真实成片点开（董事长点名批评）。改红底白字徽标。 */
.task-card .dry { color:#fff; background:#dc2626; font-weight:700;
  padding:1px 7px; border-radius:9px; font-size:12px; white-space:nowrap; }

body.vm-open { overflow:hidden; }
.video-modal { position:fixed; inset:0; z-index:900; display:flex;
  align-items:center; justify-content:center; padding:20px; }
.vm-mask { position:absolute; inset:0; background:rgba(15,18,25,.72);
  backdrop-filter:blur(2px); }
.vm-box { position:relative; width:min(1000px, 94vw); max-height:92vh; overflow:auto;
  background:#fff; border-radius:16px; box-shadow:0 24px 70px rgba(0,0,0,.4);
  display:flex; flex-direction:column; }
.vm-head { display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding:14px 18px; border-bottom:1px solid var(--line); }
.vm-title { font-size:15px; font-weight:700; color:var(--ink); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }
.vm-close { border:0; background:#f3f4f6; color:#4b5563; width:30px; height:30px;
  border-radius:50%; cursor:pointer; font-size:14px; line-height:1; flex:0 0 auto;
  font-family:inherit; }
.vm-close:hover { background:#e5e7eb; color:#111827; }
.vm-stage { position:relative; background:#0b0d12; display:flex;
  align-items:center; justify-content:center; min-height:300px; }
.vm-stage video { width:100%; max-height:62vh; display:block; background:#0b0d12; }
/* 素材预览（v4.8.3）：图片自适应、非媒体类型给可读提示 */
.vm-stage img.vm-media { max-width:100%; max-height:62vh; display:block;
  object-fit:contain; background:#fff; }
.vm-stage video.vm-media { width:auto; max-width:100%; }
.vm-empty { color:#cbd5e1; font-size:13.5px; text-align:center; line-height:1.8;
  padding:56px 24px; }
.vm-loading { position:absolute; color:#cbd5e1; font-size:13px; text-align:center;
  padding:0 20px; line-height:1.7; }
.vm-loading.hidden { display:none; }
.vm-meta { padding:12px 18px 0; font-size:12.5px; color:var(--dim); line-height:1.7; }
.vm-foot { display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding:12px 18px 16px; flex-wrap:wrap; }
.vm-note { font-size:12px; color:var(--dim); }
.vm-dl { font-size:12.5px; font-weight:600; color:var(--brand);
  text-decoration:none; border:1.5px solid var(--brand); border-radius:9px;
  padding:7px 13px; }
.vm-dl:hover { background:var(--brand); color:#fff; }
@media (max-width:640px) {
  .video-modal { padding:0; }
  .vm-box { width:100vw; max-height:100vh; height:100vh; border-radius:0; }
  .vm-stage video { max-height:44vh; }
}

/* ===== 开跑反馈链（v4.8.1） ===== */
.badge.run { animation: vmPulse 1.5s ease-in-out infinite; }
@keyframes vmPulse { 0%,100% { opacity:1; } 50% { opacity:.5; } }

.vm-slim { width:min(520px, 92vw); }
.vm-pad { padding:16px 18px 6px; }
.vm-right { justify-content:flex-end; align-items:center; }
.rm-line { font-size:13.5px; color:var(--ink); line-height:1.8; }
.rm-dim { font-size:12.5px; color:var(--dim); line-height:1.7; margin-top:4px; }
.err-text { color:#dc2626; }
.mini-btn.pay { background:#fff7ed; color:#b45309; border-color:#fdba74;
  font-weight:600; }
.mini-btn.pay:hover { background:#fdba74; color:#7c2d12; }
/* v4.9.7（董事长指令十二）：制作中「■ 停止」——红边框警示，但不填满（防误点） */
.mini-btn.danger { background:#fff; color:#dc2626; border-color:#fca5a5;
  font-weight:600; }
.mini-btn.danger:hover { background:#dc2626; color:#fff; border-color:#dc2626; }
.mini-btn:disabled { opacity:.55; cursor:not-allowed; }

/* ===== 子账号日额度 + 超额申请（v4.9） ===== */
.quota-strip { display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  background:var(--soft,#f8fafc); border:1.5px solid var(--line);
  border-radius:12px; padding:10px 14px; margin:0 0 14px; font-size:13px; }
.quota-strip .qs-lbl { color:var(--dim); font-weight:600; }
.quota-strip b { color:var(--ink); }
.quota-strip .qs-over { color:#dc2626; }
.quota-strip .qs-sep { color:var(--line); }
.quota-strip .qs-grant { color:#0369a1; background:#e0f2fe; border-radius:8px;
  padding:1px 8px; font-size:12px; font-weight:600; }
.quota-strip .qs-pend { color:#b45309; background:#fef3c7; border-radius:8px;
  padding:1px 8px; font-size:12px; font-weight:600; }
.quota-strip .qs-ok { color:#15803d; background:#dcfce7; border-radius:8px;
  padding:1px 8px; font-size:12px; font-weight:600; }
/* 指令八（2026-10-06）：今天满额没有 → 一眼可见 */
.quota-strip .qs-fulltag { color:#fff; background:#dc2626; border-radius:8px;
  padding:1px 9px; font-size:12px; font-weight:700; }
.quota-strip .qs-left { color:#15803d; font-weight:600; }
.quota-strip .qs-why { color:#b91c1c; background:#fee2e2; border-radius:8px;
  padding:1px 8px; font-size:12px; font-weight:600; }
.quota-strip.qs-full { border-color:#fca5a5; background:#fef2f2; }
.quota-strip .mini-btn { flex:0 0 auto; padding:5px 12px; font-size:12.5px; }

/* 额度进度条 */
.qbar { height:6px; background:#e5e7eb; border-radius:4px; overflow:hidden;
  margin:6px 0 2px; }
.qbar > span { display:block; height:100%; background:var(--brand); border-radius:4px;
  transition:width .3s; }
.qbar.high > span { background:#f59e0b; }
.qbar.full > span { background:#dc2626; }

/* ===== 实时制作看板（v4.9.2，董事长指令八）===== */
.live-board { background:#fff; border:1.5px solid var(--line); border-radius:12px;
  padding:12px 14px; margin:0 0 14px; }
.live-board .lb-head { font-size:13.5px; font-weight:700; color:var(--ink);
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  margin-bottom:8px; }
.live-board .lb-count { font-weight:600; color:var(--dim); font-size:12.5px; }
.live-board .lb-sec { font-size:12px; font-weight:700; color:var(--dim);
  margin:10px 0 6px; padding-left:2px; }
.live-board .lb-item { border:1px solid var(--line); border-radius:10px;
  padding:8px 11px; margin-bottom:7px; background:var(--soft,#f8fafc); }
.live-board .lb-item.running { border-left:4px solid var(--brand); }
.live-board .lb-item.queued { border-left:4px solid #cbd5e1; }
.live-board .lb-title { font-size:13px; color:var(--ink); line-height:1.5; }
.live-board .lb-title b { color:var(--brand); }
.live-board .lb-meta { font-size:12px; color:var(--dim); margin-top:3px; }
.live-board .lb-wait { color:#b45309; }
.live-board .lb-pos { float:right; background:#e2e8f0; color:#475569;
  border-radius:8px; padding:0 8px; font-size:11.5px; font-weight:700; }
/* v4.9.7b（董事长返工指令）：看板行操作按钮——行内小按钮，右对齐 */
.live-board .lb-title { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.live-board .lb-title b { flex:1 1 auto; min-width:0; }
.live-board .lb-stop, .live-board .lb-cancel, .live-board .lb-del {
  flex:0 0 auto; padding:3px 10px; font-size:12px; border-radius:8px; }
.live-board .lb-cancel { background:#fff; color:#475569; }
.live-board .lb-cancel:hover { background:#475569; color:#fff; border-color:#475569; }
.live-board .lb-bar { height:4px; background:#e5e7eb; border-radius:3px;
  overflow:hidden; margin-top:6px; }
.live-board .lb-bar > span { display:block; height:100%; background:var(--brand);
  border-radius:3px; transition:width .4s; }
.live-board .lb-quota { margin-top:8px; font-size:12.5px; font-weight:600;
  border-radius:8px; padding:6px 10px; color:#15803d; background:#dcfce7; }
.live-board .lb-quota.full { color:#b91c1c; background:#fee2e2; }
.live-board .lb-note { font-size:12.5px; color:#b91c1c; line-height:1.6; }

/* 董事长待审批区 */
.quota-board { border-color:#fdba74 !important; background:#fffbeb !important; }
.quota-board h3 { margin:0 0 10px; font-size:14.5px; color:#b45309; }
.quota-board .qreq { border-top:1px dashed var(--line); padding:10px 0 4px; }
.quota-board .qreq:first-of-type { border-top:none; }

/* 申请弹层表单行 */
.rm-row { display:flex; align-items:center; gap:10px; margin:8px 0; }
.rm-row label { flex:0 0 96px; font-size:13px; color:var(--dim); }
.rm-row input { flex:1; padding:7px 10px; border:1.5px solid var(--line);
  border-radius:9px; font-size:13.5px; font-family:inherit; color:var(--ink); }
.rm-row input:focus { outline:none; border-color:var(--brand); }

/* ===== 出片指引（v4.9.1，董事长指令） =====
   「不要彩条，要么出真片，要么一步一步告诉我出片步骤」。
   开跑前先预检：通过就直接开真跑；不通过就在这里把「卡在哪 + 怎么做」讲清楚。 */
.pf-head { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.pf-badge { font-size:11.5px; font-weight:700; border-radius:8px; padding:3px 9px;
  letter-spacing:.3px; }
.pf-badge.ok { color:#15803d; background:#dcfce7; }
.pf-badge.bad { color:#b91c1c; background:#fee2e2; }
.pf-badge.wait { color:#b45309; background:#fef3c7; }
.pf-title { font-size:14.5px; font-weight:700; color:var(--ink); }
.pf-reason { background:#fef2f2; border-left:3px solid #ef4444; border-radius:0 8px 8px 0;
  padding:9px 12px; font-size:13px; color:#991b1b; line-height:1.7; margin:0 0 12px; }
.pf-reason.ok { background:#f0fdf4; border-left-color:#22c55e; color:#166534; }
.pf-sec { font-size:12.5px; font-weight:700; color:var(--dim); margin:12px 0 6px;
  letter-spacing:.5px; }
.pf-steps { list-style:none; counter-reset:pfs; margin:0; padding:0; }
.pf-steps li { counter-increment:pfs; position:relative; padding:7px 0 7px 30px;
  font-size:13px; color:var(--ink); line-height:1.7; border-bottom:1px dashed var(--line); }
.pf-steps li:last-child { border-bottom:none; }
.pf-steps li::before { content:counter(pfs); position:absolute; left:0; top:8px;
  width:19px; height:19px; border-radius:50%; background:var(--brand); color:#fff;
  font-size:11.5px; font-weight:700; display:flex; align-items:center;
  justify-content:center; }
.pf-kv { font-size:12.5px; color:var(--dim); line-height:1.8; }
.pf-kv code { background:#f1f5f9; border-radius:5px; padding:1px 6px;
  font-size:12px; color:#334155; font-family:ui-monospace,Consolas,monospace; }

/* ===== 制作选项面板（v4.13，董事长指令「可以选择有无字幕，和其他你想到的选择」）=====
   一屏内把「节奏 / 字幕 / logo / BGM / 片尾卡 / 水印」收在同一块，选了就生效。 */
.opt-hint { font-size:11.5px; color:var(--muted); font-weight:400; margin-left:6px; }
.opt-panel { border:1px solid var(--line); border-radius:12px; padding:6px 14px;
  background:var(--card); }
.opt-row { display:flex; align-items:flex-start; gap:14px; padding:11px 0;
  border-bottom:1px dashed var(--line); }
.opt-row:last-child { border-bottom:none; }
.opt-lab { flex:0 0 68px; font-size:13.5px; font-weight:700; color:var(--text);
  padding-top:8px; }
.opt-ctl { flex:1; display:flex; flex-direction:column; gap:9px; }
.opt-sub { display:flex; align-items:center; gap:11px; flex-wrap:wrap; }
.opt-val { font-size:12.5px; color:var(--dim); min-width:38px; }
.chip-row.sm { gap:7px; }
.chip-row.sm .pick { padding:6px 13px; font-size:13px; min-width:auto;
  flex-direction:row; border-width:1.5px; border-radius:9px; }
.chip-row.sm .pick .pick-sub { font-size:10.5px; margin-left:4px; }
/* 开关（自绘，非原生 input — 前端铁律：不用原生控件弹窗） */
.switch { display:inline-flex; align-items:center; gap:8px; cursor:pointer;
  border:1.5px solid var(--line); border-radius:999px; padding:6px 14px 6px 7px;
  background:var(--card); font-family:inherit; font-size:13px; color:var(--muted);
  transition:all .16s; width:fit-content; }
.switch:hover { border-color:var(--brand); }
.switch .sw-dot { width:15px; height:15px; border-radius:50%; background:#cbd5e1;
  transition:all .16s; flex:0 0 auto; }
.switch.on { border-color:var(--brand); background:var(--brand-soft);
  color:var(--brand-dark); font-weight:700; }
.switch.on .sw-dot { background:var(--brand); box-shadow:0 0 0 3px rgba(224,48,96,.16); }
input[type=range]#bgm-range { width:150px; accent-color:var(--brand); }
.opt-disabled { opacity:.4; pointer-events:none; }

/* ===== 素材咨询键（v4.13，董事长硬指令「素材库要出咨询」）=====
   拦停时必须让人一眼看清「缺什么、为什么、怎么选」——三张卡三条路。 */
.cs-item { border:1px solid var(--line); border-radius:9px; padding:9px 11px;
  margin:0 0 8px; background:#fafafa; }
.cs-item:last-child { margin-bottom:0; }
.cs-tag { display:inline-block; font-size:11px; font-weight:700; border-radius:5px;
  padding:1px 7px; margin-right:7px; vertical-align:1px; }
.cs-tag.bad { color:#b91c1c; background:#fee2e2; }
.cs-tag.miss { color:#b45309; background:#fef3c7; }
.cs-role { font-size:12.5px; font-weight:700; color:var(--ink); margin-right:7px; }
.cs-who { font-size:12.5px; color:#334155; }
.cs-why { font-size:12px; color:var(--dim); line-height:1.7; margin-top:4px; }
/* ===== v4.19 咨询栏内嵌模糊候选（董事长指令「模糊参照+可选择」） ===== */
.cs-cands { margin-top:7px; }
.cs-cand-hint { font-size:11.5px; color:#1d4ed8; margin-bottom:5px; }
.cs-cand-grid { display:flex; flex-wrap:wrap; gap:7px; }
.cs-cand { width:86px; border:2px solid var(--line); border-radius:8px;
  padding:4px; cursor:pointer; background:#fff; text-align:center;
  transition:border-color .12s, box-shadow .12s; }
.cs-cand:hover { border-color:#93c5fd; }
.cs-cand.on { border-color:#2563eb; box-shadow:0 0 0 2px #dbeafe; }
.cs-cand.broken { opacity:.55; cursor:not-allowed; }
.cs-cand img { width:100%; height:56px; object-fit:cover; border-radius:5px;
  display:block; }
.cs-cand-na { height:56px; display:flex; align-items:center; justify-content:center;
  font-size:11px; color:#b91c1c; background:#fee2e2; border-radius:5px; }
.cs-cand-name { font-size:10.5px; color:var(--ink); margin-top:3px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cs-cand-sim { font-size:10px; color:#1d4ed8; font-weight:700; }
.pf-loading { text-align:center; color:var(--dim); font-size:13px; padding:26px 0;
  line-height:1.9; }
.pf-ch { display:flex; align-items:center; gap:8px; padding:8px 0;
  border-bottom:1px dashed var(--line); font-size:13px; }
.pf-ch:last-child { border-bottom:none; }
.pf-ch .pf-cn { flex:1; color:var(--ink); }
.pf-ch .pf-cs { font-size:11.5px; font-weight:700; border-radius:7px; padding:2px 8px; }
.pf-ch .pf-cs.ok { color:#15803d; background:#dcfce7; }
.pf-ch .pf-cs.bad { color:#b91c1c; background:#fee2e2; }

/* ===== 素材选择键（v4.10.5，董事长指令 2026-10-07）=====
   「没有找到，可以给我选择键，从素材库指定找哪一个，有时候会有好几个选择」
   关键：一眼看出是哪张图 → 缩略图网格 + 文件名 + 尺寸，点一下即选中。 */
.mp-wrap { margin:14px 0 4px; }
.mp-hint { font-size:12.5px; color:#b45309; background:#fffbeb;
  border-left:3px solid #f59e0b; border-radius:0 8px 8px 0;
  padding:9px 12px; line-height:1.7; margin:0 0 12px; }
.mp-group { border:1px solid var(--line); border-radius:11px; padding:11px 12px;
  margin:0 0 12px; background:#fbfcfd; }
.mp-ghead { display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  font-size:13px; font-weight:700; color:var(--ink); margin-bottom:9px; }
.mp-ghead .mp-tag { font-size:11.5px; font-weight:700; border-radius:7px;
  padding:2px 8px; background:#eef2ff; color:#4338ca; }
.mp-ghead .mp-only { margin-left:auto; font-size:12px; font-weight:400;
  color:var(--dim); }
.mp-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(104px,1fr));
  gap:9px; }
.mp-card { position:relative; border:2px solid var(--line); border-radius:9px;
  overflow:hidden; cursor:pointer; background:#fff; transition:.15s; }
.mp-card:hover { border-color:var(--brand); transform:translateY(-1px); }
.mp-card.on { border-color:var(--brand); box-shadow:0 0 0 3px rgba(224,48,96,.14); }
.mp-card.on::after { content:"✓"; position:absolute; top:5px; right:5px;
  width:19px; height:19px; border-radius:50%; background:var(--brand); color:#fff;
  font-size:12px; font-weight:700; display:flex; align-items:center;
  justify-content:center; }
.mp-thumb { width:100%; height:88px; object-fit:cover; display:block;
  background:#f1f5f9; }
.mp-thumb.na { display:flex; align-items:center; justify-content:center;
  font-size:11px; color:#b91c1c; text-align:center; padding:4px; }
.mp-name { font-size:11.5px; color:var(--ink); padding:5px 6px 1px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mp-size { font-size:10.5px; color:var(--dim); padding:0 6px 5px; }
.mp-card.broken { border-color:#fecaca; background:#fff7f7; }
.mp-foot-note { font-size:11.5px; color:var(--dim); margin-top:2px; }

/* ===== 充值回来一键继续（v4.9.4，董事长指令九）===== */
.resume-strip { background:#fff7ed; border:1.5px solid #fdba74; border-radius:12px;
  padding:12px 14px; margin:0 0 14px; }
.resume-strip .rs-head { font-size:13.5px; font-weight:700; color:#9a3412;
  display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:9px; }
.resume-strip .rs-sub { font-size:12px; font-weight:400; color:#b45309; }
.resume-strip .rs-item { display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:#fff; border:1px solid #fed7aa; border-radius:9px;
  padding:8px 11px; margin-bottom:7px; }
.resume-strip .rs-t { flex:1; min-width:180px; font-size:13px; color:var(--ink); }
.resume-strip .rs-r { font-size:11.5px; font-weight:700; color:#b91c1c;
  background:#fee2e2; border-radius:7px; padding:2px 8px; }
.resume-strip .rs-foot { display:flex; gap:8px; margin-top:4px; }

/* ===== 消息铃铛 + 收件箱（v4.9.4）===== */
.pill.bell { position:relative; cursor:pointer; background:#f1f5f9;
  border:1.5px solid var(--line); font-size:14px; padding:4px 11px; }
.pill.bell:hover { background:#e2e8f0; }
.pill.bell.has-unread { background:#fde8ee; border-color:#f9a8c0; }
.bell-count { position:absolute; top:-6px; right:-6px; min-width:17px; height:17px;
  border-radius:9px; background:#e03060; color:#fff; font-size:10.5px; font-weight:700;
  display:flex; align-items:center; justify-content:center; padding:0 4px; }
.nm-item { border:1px solid var(--line); border-radius:10px; padding:9px 12px;
  margin-bottom:8px; background:#fff; cursor:pointer; }
.nm-item.unread { background:#fff7fa; border-color:#f9a8c0; }
.nm-item:hover { border-color:var(--brand); }
.nm-item .nm-top { display:flex; align-items:center; gap:7px; }
.nm-item .nm-ico { font-size:14px; }
.nm-item .nm-title { flex:1; font-size:13.5px; color:var(--ink); }
.nm-item .nm-dot { width:8px; height:8px; border-radius:50%; background:#e03060; }
.nm-item .nm-time { font-size:11.5px; color:var(--dim); }
.nm-item .nm-from { font-size:11.5px; color:var(--dim); margin-top:3px; }
.nm-item .nm-body { font-size:12.5px; color:var(--ink); margin-top:6px;
  line-height:1.7; background:#f8fafc; border-radius:7px; padding:7px 9px; }

/* 发通知表单 */
.sn-row { display:flex; gap:10px; align-items:flex-start; margin-bottom:10px; }
.sn-row label { flex:0 0 52px; font-size:13px; color:var(--dim); padding-top:8px; }
.sn-input { flex:1; padding:8px 10px; border:1.5px solid var(--line); border-radius:9px;
  font-size:13px; font-family:inherit; color:var(--ink); }
.sn-input:focus { outline:none; border-color:var(--brand); }
textarea.sn-input { resize:vertical; line-height:1.6; }
.sn-hint { font-size:12.5px; color:var(--dim); margin-top:4px; min-height:16px; }

/* ===== 成品库 + 验收 + 垃圾库（v4.10 董事长指令十三）===== */
.ok-tile {
  background: linear-gradient(150deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #16a34a;
}
.ok-tile b { color: #15803d; font-size: 20px; }
.ok-tile:hover { background: linear-gradient(150deg, #dcfce7 0%, #bbf7d0 100%); }

/* 验收条：成品卡底部，三键（合格/不合格/浪费）或验收结果徽标 */
.review-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding: 9px 11px;
  background: #f8fafc; border: 1px dashed var(--line); border-radius: 10px;
}
.review-bar.done { border-style: solid; background: #fcfcfd; }
.review-lab { font-size: 13px; color: var(--dim); font-weight: 600; }
.review-badge { font-size: 12.5px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.review-badge.ok { background: var(--ok-soft, #dcfce7); color: var(--ok, #15803d); }
.review-badge.warn { background: var(--warn-soft, #fef3c7); color: var(--warn, #b45309); }
.review-badge.bad { background: var(--bad-soft, #fee2e2); color: var(--bad, #b91c1c); }
.review-bar .desc { font-size: 11.5px; color: var(--dim); }
.mini-btn.ok { color: #15803d; border-color: #86efac; }
.mini-btn.ok:hover { background: #16a34a; border-color: #16a34a; color: #fff; }
.mini-btn.warn { color: #b45309; border-color: #fcd34d; }
.mini-btn.warn:hover { background: #d97706; border-color: #d97706; color: #fff; }

/* 垃圾库卡片 */
.trash-card { border-style: dashed; }

/* ===== v4.10.4c 账号管理图标化（董事长指令：图标显示，打开有信息） ===== */
.acc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px; margin-top: 14px;
}
.acc-tile {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 16px 10px 12px; text-align: center;
  background: #fff; border: 1px solid var(--line, #e5e7eb); border-radius: 14px;
  cursor: pointer; font: inherit; color: inherit;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.acc-tile:hover {
  transform: translateY(-2px); border-color: #e03060;
  box-shadow: 0 6px 18px rgba(224, 48, 96, .12);
}
.acc-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 4px;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
}
.acc-avatar.acc-owner { background: linear-gradient(135deg, #e03060, #be185d); }
.acc-avatar.acc-off { background: linear-gradient(135deg, #9ca3af, #6b7280); }
.acc-avatar.big { width: 58px; height: 58px; font-size: 24px; flex: none; }
.acc-name { font-size: 15px; line-height: 1.2; }
.acc-sub { font-size: 11.5px; color: var(--dim, #6b7280); }
.acc-dept { font-size: 11.5px; color: var(--dim, #6b7280); }
.acc-badge { position: absolute; top: 8px; right: 8px; font-size: 10.5px; padding: 2px 7px; }
.acc-mini {
  margin-top: 3px; font-size: 11px; color: #334155;
  background: #f1f5f9; border-radius: 999px; padding: 2px 9px;
}
.acc-tile.acc-off { opacity: .62; }
.acc-detail-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px dashed var(--line, #e5e7eb);
}
.acc-detail-name { font-size: 17px; }

/* ===== 人员工作日志（v4.10.4d） ===== */
#wl-people { margin-bottom: 10px; }
.wl-list { display: flex; flex-direction: column; gap: 6px; }
.wl-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line, #e5e7eb); border-radius: 10px;
  padding: 8px 12px; font-size: 13px;
}
.wl-time { color: var(--dim, #6b7280); font-size: 12px; white-space: nowrap; }
.wl-who {
  font-weight: 700; white-space: nowrap; font-size: 12px;
  color: #be185d; background: #fdf2f8;
  border-radius: 999px; padding: 1px 10px;
}
.wl-act { flex: 1; min-width: 0; }
.wl-obj { color: var(--dim, #6b7280); font-size: 12px; white-space: nowrap; }

/* v4.17.1（指令十八）：工作日志详情展开 */
.wl-row.has-detail { cursor: pointer; }
.wl-row.has-detail:hover { border-color: #ec4899; }
.wl-more {
  color: #be185d; font-size: 12px; white-space: nowrap;
  background: #fdf2f8; border-radius: 999px; padding: 1px 9px;
}
.wl-detail {
  background: #f9fafb; border: 1px dashed var(--line, #e5e7eb);
  border-radius: 10px; padding: 8px 12px; margin-top: -2px;
  font-size: 12.5px; line-height: 1.8; word-break: break-all;
  font-family: Consolas, "Courier New", monospace; color: #374151;
}
.wl-det-k {
  display: inline-block; color: #be185d; font-weight: 700;
  margin: 0 6px 0 12px; font-family: inherit;
}
.wl-detail .wl-det-k:first-child { margin-left: 0; }

/* ===== v4.17.2（指令十九）：会员下载码弹层 ===== */
#qr-modal { position: fixed; inset: 0; z-index: 120; }
#qr-modal .qm-mask { position: absolute; inset: 0; background: rgba(17,24,39,.45); }
#qr-modal .qm-box {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(340px, 92vw); background: #fff; border-radius: 16px;
  padding: 16px 16px 14px; box-shadow: 0 12px 40px rgba(0,0,0,.22);
  text-align: center;
}
#qr-modal .qm-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; font-size: 15px;
}
#qr-modal .qm-x {
  border: 0; background: #f3f4f6; color: #6b7280; width: 26px; height: 26px;
  border-radius: 999px; cursor: pointer; font-size: 12px;
}
#qr-modal .qm-img {
  display: flex; justify-content: center; align-items: center;
  min-height: 208px; background: #f9fafb; border-radius: 12px; padding: 8px;
}
#qr-modal .qm-img img { width: 208px; height: 208px; }
#qr-modal .qm-fallback {
  font-size: 12px; color: #374151; word-break: break-all; padding: 8px;
}
#qr-modal .qm-link {
  margin-top: 10px; font-size: 11.5px; color: #6b7280;
  word-break: break-all; background: #f9fafb; border-radius: 8px;
  padding: 7px 9px; text-align: left;
}
#qr-modal .qm-tip { margin-top: 9px; font-size: 11.5px; color: #6b7280; line-height: 1.7; }
#qr-modal .qm-ops {
  margin-top: 11px; display: flex; gap: 8px; justify-content: center;
}
#qr-modal .qm-ops .mini-btn { text-decoration: none; display: inline-block; }

/* ===== v4.10.5 欠费一键重出条 + 成本预估 ===== */
.retry-strip {
  margin-bottom: 10px; padding: 10px 14px;
  background: #fffbeb; border: 1px solid #f59e0b; border-radius: 12px;
  font-size: 13px;
}
.retry-strip .rs-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.retry-strip .rs-sub { color: #92400e; font-size: 11.5px; }
.cost-est {
  margin-top: 8px; padding: 8px 12px;
  background: #fdf2f8; border: 1px dashed #e03060; border-radius: 10px;
  font-size: 12.5px; color: #9d174d; line-height: 1.6;
}

/* ===== v4.24 模型选择键：费用估算 + 推荐卡 ===== */
#model-rec {
  background: #f0fdf4; border: 1px dashed #16a34a; color: #14532d;
  margin-bottom: 4px;
}
#model-rec .rec-line b { color: #15803d; }
#model-rec .rec-opts { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
#model-rec .rec-opt {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #fff; border: 1px solid #bbf7d0; font-size: 12px; color: #166534;
}
#model-rec .rec-opt.rec-on {
  background: #16a34a; border-color: #16a34a; color: #fff; font-weight: 600;
}
#model-rec .rec-opt i { color: #b45309; font-style: normal; }

/* ===== v4.14（董事长指令十四）素材库分区 + 人物档案 + 删除按钮 ===== */
.lib-sec-h {
  margin: 22px 0 6px; padding: 6px 0 6px 10px;
  border-left: 4px solid var(--brand); font-size: 15px; font-weight: 700;
  color: #1f2430;
}
.lib-sec-h.pub { border-left-color: #0e7490; }
.lib-sec-h.mine { border-left-color: var(--brand); }
.lib-sec-h.person { border-left-color: #7c3aed; }
.lib-sec-sub {
  font-size: 12.5px; color: #6b7280; margin: 4px 0 8px;
}
.mini-btn.danger {
  border-color: #dc2626; color: #dc2626;
}
.mini-btn.danger:hover { background: #fef2f2; border-color: #b91c1c; }
.mini-btn.ok {
  border-color: #059669; color: #059669;
}
.mini-btn.ok:hover { background: #ecfdf5; }
.vis-tag {
  display: inline-block; font-size: 10.5px; line-height: 1.5;
  padding: 0 5px; border-radius: 6px; margin-right: 5px; vertical-align: 1px;
}
.vis-tag.pub { background: #cffafe; color: #0e7490; }
.vis-tag.priv { background: #fce7f3; color: #be1e4d; }

/* 人物档案 chip */
.person-row { display: flex; flex-wrap: wrap; gap: 8px; }
.person-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 11px; border: 1.5px solid var(--line); border-radius: 999px;
  background: #fff; font-size: 13px;
}
.person-chip.pend { border-color: #f59e0b; background: #fffbeb; }
.person-chip .pc-ico { font-size: 13px; }
.person-chip .pc-name { font-weight: 700; color: #1f2430; }
.person-chip .pc-n { font-size: 11.5px; color: #6b7280; }
.person-chip .pc-al { font-size: 11px; color: #9ca3af; }
.person-chip .mini-btn { flex: none; padding: 3px 9px; font-size: 11.5px; border-radius: 7px; }
.mini-btn.dl { border-color: #0e7490; color: #0e7490; }
.mini-btn.dl:hover { background: #ecfeff; border-color: #155e75; }

/* ---- v4.17.3 品牌 logo 换新：金色圆形标志（照片裁圆、圆外透明），全站 .logo/.big-logo 统一生效 ---- */
.logo, .big-logo {
  background: url(/assets/vendor/jym_logo.png) center / cover no-repeat;
  color: transparent; font-size: 0; border-radius: 50%;
  box-shadow: 0 2px 10px rgba(224, 48, 96, .16);
}

/* ---- v4.17.6 顶栏返回中心：a 标签版 pill 的显示修正 ---- */
a.pill { display: inline-block; text-decoration: none; line-height: 1.55; }

/* v4.23 费用台账卡：复用接力条视觉体系（金额一眼可见） */
#spend-card { background:#f0fdf4; border:1.5px solid #86efac; border-radius:12px;
  padding:12px 14px; margin:0 0 14px; }
#spend-card .rs-head { font-size:13.5px; font-weight:700; color:#166534;
  display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:9px; }
#spend-card .rs-sub { font-size:12px; font-weight:400; color:#15803d; }
#spend-card .rs-item { display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:#fff; border:1px solid #bbf7d0; border-radius:9px;
  padding:8px 11px; margin-bottom:7px; }
#spend-card .rs-t { flex:1; min-width:180px; font-size:13px; color:var(--ink); }
