/* 智慧消防内容工作台 · PC 管理端样式（C2 空壳） */
:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --line: #e5e8f0;
  --text: #1a2333;
  --muted: #6a7488;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --ok: #059669;
  --bad: #dc2626;
  --warn: #b45309;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 30, 60, 0.04), 0 8px 24px rgba(20, 30, 60, 0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button, input, select { font: inherit; color: inherit; }

/* ---------- 登录 ---------- */
.login-page {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1200px 500px at 15% -10%, #dbe6ff 0%, transparent 60%),
    radial-gradient(900px 400px at 100% 0%, #e6f6f1 0%, transparent 55%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 396px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 28px 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 4px; }
.brand h1 { font-size: 18px; margin: 0; letter-spacing: 0.2px; }
.brand .sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.brand-mark {
  width: 40px; height: 40px; flex: none;
  border-radius: 11px;
  background: linear-gradient(140deg, #2563eb, #0ea5e9);
  color: #fff; font-weight: 700; font-size: 15px;
  display: grid; place-items: center;
  letter-spacing: 0.5px;
}
.brand-mark.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }

label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  color: var(--text);
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

.btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: #f7f9fd; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { color: var(--bad); border-color: #f3c9c9; }
.btn.danger:hover { background: #fdf2f2; }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.block { width: 100%; }

.err { color: var(--bad); font-size: 13px; min-height: 18px; margin: 0; }
.hint { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.muted { color: var(--muted); }

/* ---------- 布局 ---------- */
.layout { display: grid; grid-template-columns: 216px 1fr; min-height: 100%; }

.sidebar {
  background: #0f1a2e;
  color: #cfd8e8;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}
.side-brand { display: flex; align-items: center; gap: 9px; font-weight: 600; color: #fff; padding: 0 4px 16px; }

#nav { display: grid; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  border: 0; background: transparent; color: #b9c5d9;
  padding: 10px 12px; border-radius: 9px; cursor: pointer; text-align: left;
}
.nav-item i { font-style: normal; width: 16px; opacity: .8; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: rgba(37, 99, 235, .9); color: #fff; }

.side-foot { margin-top: auto; padding: 12px 4px 0; display: grid; gap: 4px; }
.side-foot .who { color: #fff; font-weight: 600; }
.side-foot .role { font-size: 12px; color: #8fa0bb; margin-bottom: 8px; }

.main { padding: 20px 24px 40px; min-width: 0; }
.main-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.main-head h2 { margin: 0; font-size: 20px; }

.pill {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; color: var(--muted);
}

/* ---------- 卡片 / 面板 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.card-label { color: var(--muted); font-size: 13px; }
.card-value { font-size: 28px; font-weight: 650; margin-top: 6px; letter-spacing: .5px; }
.muted-card .card-value { font-size: 15px; font-weight: 500; color: var(--muted); padding-top: 10px; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h3 { margin: 0; font-size: 15px; }
.panel-actions { display: flex; gap: 8px; align-items: center; }
.panel-actions input { width: 230px; }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kv > div {
  display: flex; justify-content: space-between; gap: 10px;
  background: #fafbfe; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px;
}
.kv span { color: var(--muted); }
.ok { color: var(--ok); }
.bad { color: var(--bad); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  background: #eef3ff; color: #2b4fa8; border-radius: 6px;
  padding: 3px 8px; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; font-size: 12.5px; background: #fafbfe; }
.table tbody tr:hover { background: #fbfcff; }
.table .strong { font-weight: 600; }
.table td.ops { white-space: nowrap; }
.table td.ops .btn + .btn { margin-left: 6px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: #47536b; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.badge { display: inline-block; border-radius: 6px; padding: 2px 7px; font-size: 12px; margin-right: 4px; white-space: nowrap; }
.badge.on { background: #e7f7f0; color: #047857; }
.badge.off { background: #fdeeee; color: #b91c1c; }
.badge.warn { background: #fdf5e7; color: var(--warn); }

.pager { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.empty { padding: 28px 8px; text-align: center; color: var(--muted); }
.loading { padding: 24px; color: var(--muted); }

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .38);
  display: grid; place-items: center; padding: 20px; z-index: 50;
}
.modal {
  width: 100%; max-width: 420px; background: #fff; border-radius: 14px;
  padding: 22px; box-shadow: 0 24px 60px rgba(15, 23, 42, .28); display: grid; gap: 12px;
}
.modal h3 { margin: 0; font-size: 16px; }
.modal-body { display: grid; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.pwd-box {
  display: flex; align-items: center; gap: 10px;
  background: #f6f8fd; border: 1px dashed #c7d2e8; border-radius: 10px; padding: 12px 14px;
}
.pwd-box span { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; letter-spacing: 1px; flex: 1; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: #0f1a2e; color: #fff; padding: 10px 18px; border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .25); z-index: 80; transition: opacity .4s, transform .4s;
}
.toast-err { background: #b91c1c; }
.toast-out { opacity: 0; transform: translate(-50%, 10px); }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; overflow-x: auto; }
  .side-brand { padding: 0 8px 0 0; }
  #nav { display: flex; gap: 6px; }
  .side-foot { margin: 0 0 0 auto; padding: 0; display: flex; align-items: center; gap: 8px; }
  .side-foot .who, .side-foot .role { display: none; }
  .main { padding: 14px; }
  .panel-actions input { width: 150px; }
}

/* ============================================================
   C3 创作中心（五步流）
   ============================================================ */
textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: #fbfcfe; outline: none; resize: vertical; font: inherit; color: var(--text);
}
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.field input, .field select { width: 100%; }

/* 新建向导 */
.wiz { display: grid; gap: 16px; }
.wiz-row { display: grid; gap: 8px; }
.wiz-label { font-size: 12.5px; color: var(--muted); }
.wiz-inline { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }

.mode-cards, .model-cards { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.model-cards { grid-template-columns: repeat(2, 1fr); }
.mode-card, .model-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: #fbfcfe; cursor: pointer; display: grid; gap: 3px; transition: border-color .15s, background .15s;
}
.mode-card b, .model-card b { font-size: 13.5px; }
.mode-card span { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.model-card span { font-size: 11px; color: #8b96a9; font-family: ui-monospace, Menlo, Consolas, monospace; }
.model-card small { font-size: 11px; color: var(--muted); }
.mode-card.active, .model-card.active { border-color: var(--primary); background: #f3f7ff; box-shadow: 0 0 0 2px rgba(37, 99, 235, .1); }
.model-card input { display: none; }

/* 编辑器头 + 步骤条 */
.editor-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.editor-title h2 { margin: 0 0 6px; font-size: 19px; }
.editor-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }

.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; flex-wrap: wrap; }
.steps li {
  display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 6px;
}
.steps li span {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: #eef1f7; color: #6a7488; font-size: 11.5px;
}
.steps li.active { border-color: var(--primary); color: var(--primary); background: #f3f7ff; }
.steps li.active span { background: var(--primary); color: #fff; }
.steps li.done span { background: #d9f2e6; color: #047857; }

/* 脚本三件套 */
.copy-grid { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 10px; margin-top: 10px; }
.copy-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.copy-box {
  background: #f7f9fd; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 11px; font-size: 13px; min-height: 44px; white-space: pre-wrap;
}

/* 分镜表 */
.shots-table td { vertical-align: top; }
.prompt-cell { max-width: 420px; }
.prompt-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 5px; }
.prompt-tab {
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  padding: 2px 7px; font-size: 11px; color: var(--muted); cursor: pointer;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.prompt-tab.active { border-color: var(--primary); color: var(--primary); background: #f3f7ff; }
.prompt-text {
  font-size: 12px; color: #47536b; line-height: 1.55; max-height: 84px; overflow: auto;
  background: #fafbfe; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}

/* 镜头卡片 */
.shot-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.shot-card {
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px;
  background: #fbfcfe; display: grid; gap: 6px;
}
.shot-no { font-size: 12px; color: var(--muted); }
.shot-brief { font-size: 12.5px; color: #47536b; min-height: 34px; }
.shot-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 剪辑与成片 */
.setting-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; }
.final-box { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: start; }
.final-box video {
  width: 100%; aspect-ratio: 9 / 16; background: #0f1a2e; border-radius: 10px;
  border: 1px solid var(--line);
}
.final-meta { display: grid; gap: 6px; font-size: 13px; }

.mod-report { margin-top: 12px; border-radius: 10px; padding: 12px 14px; font-size: 13px; }
.mod-report.ok { background: #ecf8f1; border: 1px solid #cbeada; }
.mod-report.bad { background: #fdf3f3; border: 1px solid #f3d3d3; }
.mod-report ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }

.block-box {
  margin-top: 12px; border: 1px solid #f3d3d3; background: #fdf7f7;
  border-radius: 10px; padding: 12px 14px; display: grid; gap: 8px; justify-items: start;
}
.block-box b { color: var(--bad); }
.block-box p { margin: 0; font-size: 12.5px; }

@media (max-width: 900px) {
  .mode-cards, .model-cards, .copy-grid { grid-template-columns: 1fr; }
  .final-box { grid-template-columns: 1fr; }
  .final-box video { max-width: 220px; }
  .editor-head { flex-direction: column; }
}

/* ================================================================
   工作台首页（C3 · GET /todo 待办聚合）
   组序即动手顺序：补素材 → 选题 → 生成 → 发布 → 回填
   ================================================================ */
.work-hello {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin-bottom: 16px;
}
.work-hello h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: 0.2px; }
.work-hello p { margin: 0; font-size: 13px; }
.work-hello .hl { color: var(--primary); font-size: 15px; }
.work-refresh { display: flex; align-items: center; gap: 8px; flex: none; }

.todo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px; align-items: start;
}

.todo-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.todo-panel.is-empty { background: #fbfcfe; box-shadow: none; }
.todo-head { padding: 13px 15px 11px; border-bottom: 1px solid var(--line); }
.todo-title { display: flex; align-items: center; gap: 8px; }
.todo-title h3 { margin: 0; font-size: 14px; }
.todo-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--muted); }
.todo-dot.danger { background: var(--bad); }
.todo-dot.warn { background: var(--warn); }
.todo-dot.ok { background: var(--ok); }
.todo-dot.primary { background: var(--primary); }
.todo-count {
  margin-left: auto; font-size: 12px; font-weight: 600; line-height: 1;
  padding: 4px 8px; border-radius: 999px; background: #eef1f7; color: var(--muted);
}
.todo-count.danger { background: #fdecec; color: var(--bad); }
.todo-count.warn { background: #fdf3e3; color: var(--warn); }
.todo-count.ok { background: #e9f8f1; color: var(--ok); }
.todo-count.primary { background: #eaf1ff; color: var(--primary); }
.todo-desc { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

.todo-body { padding: 4px 0; }
.todo-none { padding: 18px 15px; font-size: 12.5px; color: var(--muted); text-align: center; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 15px; border-bottom: 1px dashed #eef1f7;
}
.todo-row:last-child { border-bottom: none; }
.todo-row:hover { background: #fafbfe; }
.todo-row-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.todo-row-main b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-row-main .muted { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-row-side { display: flex; align-items: center; gap: 8px; flex: none; font-size: 12px; }
.todo-foot { padding: 8px 15px 10px; border-top: 1px solid var(--line); background: #fafbfe; }

.meter {
  display: inline-block; width: 54px; height: 5px; border-radius: 999px;
  background: #e8ecf5; overflow: hidden; vertical-align: middle;
}
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #ef4444); border-radius: 999px; }

.sys-strip {
  margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  padding: 10px 14px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; font-size: 12px;
}
.sys-item { display: inline-flex; align-items: center; gap: 6px; }
.sys-strip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.sys-strip .dot.ok { background: var(--ok); }
.sys-strip .dot.bad { background: var(--bad); }
.sys-perm { margin-left: auto; }
.sys-perm summary { cursor: pointer; font-size: 12px; }
.sys-perm .tags { margin-top: 8px; max-width: 620px; }

@media (max-width: 900px) {
  .todo-grid { grid-template-columns: 1fr; }
  .work-hello { flex-direction: column; }
}

/* ================================================================
   项目素材库（C3 · 左项目列表 + 右素材面板）
   ================================================================ */
.mat-layout {
  display: grid; grid-template-columns: 268px 1fr; gap: 14px; align-items: start;
}
.mat-side {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; position: sticky; top: 12px;
}
.mat-search { display: flex; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line); }
.mat-search input { flex: 1; min-width: 0; }
.mat-projects { max-height: calc(100vh - 210px); overflow: auto; }
.mat-proj {
  display: grid; gap: 3px; width: 100%; text-align: left;
  padding: 10px 12px; background: none; border: none; border-bottom: 1px dashed #eef1f7;
  cursor: pointer; font: inherit; color: inherit;
}
.mat-proj:hover { background: #f7f9fd; }
.mat-proj.active { background: #eef4ff; box-shadow: inset 3px 0 0 var(--primary); }
.mat-proj-top { display: flex; align-items: center; gap: 8px; }
.mat-proj-top b { font-size: 13px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-proj-sub { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mat-main {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px 18px; min-height: 320px;
}
.mat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mat-head h3 { margin: 0 0 3px; font-size: 16px; }
.mat-head p { margin: 0; font-size: 12.5px; }

.mat-cats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px; margin: 14px 0 6px;
}
.mat-cat {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  background: #fbfcfe; display: grid; gap: 7px;
}
.mat-cat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mat-cat-top b { font-size: 13px; }
.mat-cat-top .ok { color: var(--ok); }
.mat-cat-top .bad { color: var(--bad); }
.mat-cat p { margin: 0; font-size: 11.5px; }
.mat-cat .meter { width: 100%; height: 6px; }
.file-btn { justify-self: start; position: relative; overflow: hidden; }

.mat-list-head { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.mat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px;
}
.mat-cell {
  margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff;
}
.mat-cell.is-off { opacity: 0.5; }
.mat-cell img {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eef1f7; cursor: zoom-in;
}
.mat-cell figcaption {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: 11.5px;
}
.mat-cell figcaption .muted { margin-left: auto; }

@media (max-width: 900px) {
  .mat-layout { grid-template-columns: 1fr; }
  .mat-side { position: static; }
  .mat-projects { max-height: 260px; }
}

/* ---------- 通用小件（选题中心等复用的表格内排版） ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.table .sub { margin-top: 3px; font-size: 11.5px; line-height: 1.4; white-space: normal; }
.table tr.row-muted td { color: var(--muted); }
.table tr.row-muted .strong { font-weight: 500; }
@media (max-width: 760px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- 图文创作（note.js） ---------- */
.panel-actions .btn { white-space: nowrap; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs .tab {
  display: grid; gap: 2px; text-align: left; padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: #33415c; font-size: 13.5px; font-weight: 600;
  cursor: pointer;
}
.tabs .tab small { font-weight: 400; font-size: 11.5px; color: var(--muted); }
.tabs .tab:hover { border-color: #cfd8ea; }
.tabs .tab.active { border-color: var(--primary); background: #f3f7ff; color: var(--primary-dark); }
.tabs .tab.active small { color: var(--primary); }

.copy-edit { display: grid; gap: 10px; }
.copy-edit textarea { width: 100%; }

.asset-ph {
  display: grid; gap: 4px; place-items: center; padding: 18px 8px;
  aspect-ratio: 4 / 3; background: repeating-linear-gradient(45deg, #f7f9fd, #f7f9fd 8px, #eef2f9 8px, #eef2f9 16px);
  text-align: center;
}
.asset-ph small { color: var(--muted); font-size: 11px; word-break: break-all; }
.asset-ph .badge { margin: 0; }

.task-line {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px;
  padding: 9px 12px; border-radius: 9px; background: #fafbff; border: 1px solid var(--line); font-size: 12.5px;
}
.inline-err { font-size: 12.5px; }


/* ---------- 作品库 + 发布中心（publish.js） ---------- */
.runner-line {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13px;
}
.runner-line.on { background: #ecf8f1; border: 1px solid #cbeada; }
.runner-line.off { background: #fdf5e7; border: 1px solid #f2e2c4; }
.runner-line b { font-weight: 600; }

.plat-cards { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.plat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 6px;
}
.plat-card.is-off { opacity: 0.62; }
.plat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plat-top b { font-size: 14px; }
.plat-num { font-size: 26px; font-weight: 650; letter-spacing: 0.5px; }
.plat-num small { font-size: 12px; font-weight: 400; color: var(--muted); }
.plat-card p { margin: 0; font-size: 12px; line-height: 1.5; }

.work-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.work-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fcfdff;
  display: grid; gap: 8px;
}
.work-title { font-weight: 600; font-size: 13.5px; line-height: 1.4; }
.work-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.work-card .btn { justify-self: start; }

.plat-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.plat-opt {
  display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer;
}
.plat-opt input { display: none; }
.plat-opt b { font-size: 13.5px; }
.plat-opt small { font-size: 11.5px; color: var(--muted); }
.plat-opt:has(input:checked) { border-color: var(--primary); background: #f3f7ff; }
.plat-opt.is-off { opacity: 0.5; cursor: not-allowed; }

.modal:has(.kit) { max-width: 860px; }
.kit { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 18px; align-items: start; }
.kit > * { min-width: 0; }
.kit-video { display: grid; gap: 6px; }
.kit-video video { width: 100%; border-radius: 10px; background: #0b1220; }
.kit-video .muted { font-size: 11.5px; }
/* 图文三件套：封面 + 图片网格（3:4 是小红书竖图比例，保持一致便于目检）
   🔴 min-width:0 不能省：grid 项默认 min-width:auto，会被图片固有宽度（1080px）顶开，
      把左栏从 340px 撑到 480px，整个弹窗跟着变形。 */
.kit-gallery { display: grid; gap: 10px; min-width: 0; max-height: 520px; overflow-y: auto; padding-right: 4px; }
.kit-cover { display: grid; gap: 4px; }
.kit-cover img { width: 100%; max-height: 132px; object-fit: cover; border-radius: 10px; background: #f1f5f9; }
.kit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kit-grid figure { margin: 0; display: grid; gap: 4px; min-width: 0; }
.kit-grid img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: #f1f5f9; }
.kit-grid figcaption { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; }
.kit-grid a { color: var(--primary); text-decoration: none; white-space: nowrap; }
.kit-steps { display: grid; gap: 10px; }
.kit-steps .btn { justify-self: start; white-space: nowrap; }
.kit-steps .btn small { font-weight: 400; }
.kit-links { display: flex; gap: 14px; font-size: 12.5px; }
.kit-links a { color: var(--primary); text-decoration: none; }
.kit-links a:hover { text-decoration: underline; }
@media (max-width: 900px) { .kit { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .modal:has(.kit) { max-width: 100%; } }

/* ---------- 数据看板（dashboard.js） ---------- */
.dash-wide { grid-column: span 2; }
.dash-sub { font-size: 12px; margin-top: 4px; }
.dash-bars { display: grid; gap: 6px; margin-top: 8px; }
.dash-bar-row { display: grid; grid-template-columns: 76px 1fr 34px; align-items: center; gap: 8px; font-size: 12px; }
.dash-bar-label { color: var(--muted); }
.trend { display: grid; gap: 8px; }
.trend-row { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; }
.trend-date { color: var(--muted); font-size: 12px; }
.trend-bars { display: grid; gap: 3px; }
.trend-bar {
  height: 12px; border-radius: 4px; position: relative;
  transition: width .2s ease;
}
.trend-bar.c-blue { background: var(--primary); opacity: .85; }
.trend-bar.c-green { background: var(--ok); opacity: .8; }
.trend-bar.c-red { background: var(--bad); opacity: .85; }
.trend-bar i {
  position: absolute; right: 4px; top: -1px; font-style: normal; font-size: 10.5px; color: #fff;
  line-height: 14px;
}
@media (max-width: 900px) { .dash-wide { grid-column: span 1; } }
