:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --border: #e4e7ec;
  --text: #1f2329;
  --muted: #86909c;
  --primary: #3370ff;
  --primary-weak: #e8f0ff;
  --danger: #f53f3f;
  --warn-bg: #fff7e6;
  --ok: #00b42a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
header { background: var(--card); border-bottom: 1px solid var(--border); padding: 14px 24px 0; position: sticky; top: 0; z-index: 10; }
header h1 { font-size: 18px; margin-bottom: 10px; }
nav { display: flex; gap: 4px; overflow-x: auto; }
nav button { background: none; border: none; padding: 10px 16px; cursor: pointer; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
nav button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
main { padding: 20px 24px 60px; max-width: 1400px; margin: 0 auto; }
.tab { display: none; }
.tab.active { display: block; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.step h3 { font-size: 15px; margin-bottom: 10px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
button { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 7px 14px; cursor: pointer; font-size: 13px; }
button:hover { border-color: var(--primary); color: var(--primary); }
button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
button.primary:hover { opacity: .9; color: #fff; }
button.danger { color: var(--danger); border-color: var(--danger); }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; font-size: 13px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
.chk { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.muted { color: var(--muted); font-size: 12px; }
.tbl { width: 100%; border-collapse: collapse; background: var(--card); }
.tbl th, .tbl td { border-bottom: 1px solid var(--border); padding: 8px 10px; text-align: left; font-size: 13px; }
.tbl th { color: var(--muted); font-weight: 500; background: #fafbfc; }
.pager { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.opts { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.opts label { display: flex; align-items: center; gap: 6px; }

/* 素材卡片 */
.mat-grid, .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 10px 0; }
.mat-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; position: relative; cursor: pointer; }
.mat-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-weak); }
.mat-card video, .mat-card img.cover { width: 100%; height: 180px; object-fit: cover; background: #000; display: block; }
.mat-card .name { padding: 6px 8px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-new { position: absolute; top: 6px; left: 6px; background: var(--danger); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 9px; font-weight: 600; box-shadow: 0 1px 4px rgba(245,63,63,.4); }
.badge-bid { position: absolute; top: 6px; right: 6px; background: #ff7d00; color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 9px; }
.mat-card.is-new { border-color: #ffc2c2; }

/* 账户卡片（预览区） */
.acc-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px; position: relative; }
.acc-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-weak); }
.acc-card .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.acc-card .acc-name { font-weight: 600; font-size: 13px; }
.acc-card .acc-id { color: var(--muted); font-size: 12px; }
.acc-card .tag { font-size: 11px; padding: 1px 8px; border-radius: 9px; }
.tag-create { background: var(--primary-weak); color: var(--primary); }
.tag-supp { background: #e8ffea; color: var(--ok); }
.tag-skip { background: #f2f3f5; color: var(--muted); }
.acc-card .sec { margin-top: 6px; }
.acc-card .sec b { font-size: 12px; color: var(--muted); font-weight: 500; }
.acc-card .thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; }
.acc-card .thumbs video, .acc-card .thumbs img { width: 72px; height: 96px; border-radius: 5px; object-fit: cover; background: #000; flex-shrink: 0; position: relative; }
.thumb-wrap { position: relative; flex-shrink: 0; }
.thumb-wrap .badge-new { top: 2px; left: 2px; }
.acc-card .titles { font-size: 12px; color: var(--text); }
.acc-card .titles li { margin-left: 16px; line-height: 1.5; }

/* 账户列表（选择） */
.acc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 10px 0; }
.acc-item { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--card); }
.acc-item.built { background: var(--warn-bg); border-color: #ffd591; }
.acc-item input { width: auto; }
.acc-item .info { overflow: hidden; }
.acc-item .info .n { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-item .info .i { font-size: 11px; color: var(--muted); }

/* 标题 */
.title-list { display: flex; flex-direction: column; gap: 6px; }
.title-row { display: flex; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.title-row .t { flex: 1; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal.hidden { display: none; }
.modal-body { background: var(--card); border-radius: 12px; padding: 20px 24px; max-width: 760px; max-height: 80vh; overflow: auto; width: 90%; }
.settings .row { margin-bottom: 8px; }
.settings input { width: 560px; }
.settings label { display: inline-block; width: 260px; color: var(--muted); font-size: 13px; }
.warn { color: var(--danger); }
.done { color: var(--ok); }

/* ========== 创编四栏布局（对标巨量全域创编页） ========== */
.ce-wrap { background: var(--card, #fff); border: 1px solid #e5e8ef; border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.ce-topbar { display: flex; gap: 10px; margin-bottom: 12px; }
.btn-blue { background: #2b5aed; color: #fff; border: none; border-radius: 6px; padding: 8px 22px; font-size: 14px; cursor: pointer; }
.btn-blue:hover { background: #1f4ad6; }
.btn-blue.light { background: #9db6f5; }
.btn-blue.light:hover { background: #7d9df0; }
.ce-planbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.ce-label { color: #333; }
.ce-planbar input { width: 220px; }
.ce-link { color: #2b5aed; cursor: pointer; text-decoration: none; }
.ce-link:hover { text-decoration: underline; }
.ce-divider { width: 1px; height: 18px; background: #e0e4ec; margin: 0 4px; }
.ce-mode { background: #fff; border: 1px solid #d5dbe8; border-radius: 4px; padding: 5px 14px; font-size: 13px; cursor: pointer; color: #444; }
.ce-mode.active { border-color: #2b5aed; color: #2b5aed; background: #eef3ff; }
.ce-tip { background: #f5f8ff; border: 1px solid #dce6ff; color: #5a7bd8; border-radius: 4px; padding: 4px 10px; font-size: 12px; }
.ce-tip i { font-style: normal; margin-right: 4px; }
.ce-grid { display: grid; grid-template-columns: 0.9fr 1fr 1fr 1.3fr 1fr; border: 1px solid #e5e8ef; border-radius: 8px; overflow: hidden; }
.ce-col { display: flex; flex-direction: column; border-right: 1px solid #e5e8ef; min-height: 300px; background: #fff; }
.ce-col:last-child { border-right: none; }
.ce-col-head { padding: 10px 14px; font-weight: 600; font-size: 14px; border-bottom: 1px solid #eef0f5; display: flex; align-items: center; justify-content: space-between; }
.ce-col-head > span:first-child:last-child { margin-right: auto; }
.ce-col-head .muted { font-weight: 400; margin-left: 8px; font-size: 12px; }
.ce-col-body { flex: 1; padding: 12px 14px; overflow-y: auto; max-height: 380px; }
.ce-empty { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 200px; color: #b6bcc8; font-size: 13px; }
.ce-panel .ce-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.ce-panel label { display: block; margin-bottom: 8px; font-size: 13px; color: #444; }
.ce-panel select, .ce-panel input { font-size: 13px; }
.ce-col-foot { border-top: 1px solid #eef0f5; padding: 9px 14px; text-align: center; }
.ce-col-foot a { font-size: 13px; }
.ce-accounts { border: 1px solid #e5e8ef; border-radius: 8px; padding: 12px; margin-top: 12px; background: #fafbfe; }
.ce-actions { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; }
.ce-preview { background: var(--card, #fff); border: 1px solid #e5e8ef; border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.ce-preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.ce-preview-head h3 { margin: 0; }
.mat-grid.compact { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }

/* ========== 层级树 / 布局 / 占位 ========== */
.ce-layout { display: flex; gap: 14px; align-items: flex-start; }
.tree-panel { width: 230px; flex-shrink: 0; background: var(--card, #fff); border: 1px solid #e5e8ef; border-radius: 10px; padding: 12px; font-size: 13px; }
.tree-main { flex: 1; min-width: 0; }
.tree-root { font-weight: 600; padding: 6px 4px; }
.tree-node { margin-top: 4px; }
.tree-label { font-weight: 600; padding: 6px 4px; cursor: pointer; border-radius: 6px; }
.tree-label:hover { background: #f2f5ff; }
.tree-children { padding-left: 14px; }
.tree-sub { color: #888; padding: 4px 0; }
.tree-leaf { padding: 5px 6px; border-radius: 6px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-leaf:hover { background: #f2f5ff; }
.tree-projects, .tree-promotions { border-left: 1px dashed #dde3ee; margin-left: 6px; }
.no-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 90px; color: #b6bcc8; font-size: 12px; background: #f4f6fa; border-radius: 4px; text-align: center; }

/* ========== 铺剧规则编辑弹窗（对标巨量） ========== */
.rule-modal-body { max-width: 720px; width: 92%; padding: 0 0 16px; }
.rule-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid #eef0f5; }
.rule-modal-head h3 { margin: 0; font-size: 16px; }
.rule-x { cursor: pointer; color: #8a919f; font-size: 15px; }
.rule-form { padding: 10px 24px 0; }
.rule-row { display: flex; align-items: flex-start; margin-bottom: 16px; }
.rule-label { width: 170px; flex: none; color: #333; font-size: 13px; padding-top: 7px; }
.rule-field { flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #555; font-size: 13px; position: relative; }
.rule-field input[type=text], .rule-field input:not([type]), .rule-field input[type=number], .rule-field input[type=date] {
  border: 1px solid #dcdfe6; border-radius: 6px; padding: 6px 10px; font-size: 13px; }
.rule-field select { border: 1px solid #dcdfe6; border-radius: 6px; padding: 6px 8px; }
.rule-count { position: absolute; right: 8px; color: #b0b6c0; font-size: 12px; pointer-events: none; }
.rule-toggle { display: inline-flex; border: 1px solid #dcdfe6; border-radius: 6px; overflow: hidden; }
.rule-toggle button { border: none; background: #fff; padding: 6px 18px; font-size: 13px; cursor: pointer; color: #555; }
.rule-toggle button + button { border-left: 1px solid #dcdfe6; }
.rule-toggle button.active { background: #e8efff; color: #2b5aed; font-weight: 600; }
.rule-tip { width: 100%; color: #e6a23c; font-size: 12px; }
.rule-check { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.rule-sch { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rule-sch select, .rule-sch input { border: 1px solid #dcdfe6; border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.rule-sch .del { color: #f56c6c; cursor: pointer; border: none; background: none; font-size: 13px; }
.rule-add-cycle { width: 100%; border: 1px dashed #b8c6f5; background: #f4f7ff; color: #2b5aed; border-radius: 6px; padding: 8px; cursor: pointer; font-size: 13px; }
.rule-sep { margin: 18px 0 14px; padding-top: 12px; border-top: 1px solid #eef0f5; color: #8a919f; font-size: 12px; }
.rule-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 0; border-top: 1px solid #eef0f5; margin-top: 12px; }
.rule-foot button { border: 1px solid #dcdfe6; background: #fff; border-radius: 6px; padding: 8px 24px; font-size: 14px; cursor: pointer; }

/* ========== 账户栏：空态 + 已选账户（对标巨量创编） ========== */
.acc-empty { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 0; cursor: pointer; }
.acc-empty-icon { font-size: 56px; opacity: .75; filter: hue-rotate(10deg); margin-bottom: 16px; }
.acc-empty-text { color: #2b5aed; font-size: 15px; font-weight: 600; }
.acc-empty:hover .acc-empty-text { text-decoration: underline; }
.acc-selected { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.acc-sel-head { font-size: 13px; color: #333; font-weight: 600; }
.acc-chip { display: inline-flex; align-items: center; gap: 6px; background: #f0f4ff; color: #2b5aed; border: 1px solid #ccd9ff; border-radius: 14px; padding: 2px 10px; font-size: 12px; margin: 0 6px 6px 0; }
.acc-chip i { cursor: pointer; font-style: normal; color: #8aa3e8; }
.acc-chip i:hover { color: #f56c6c; }

/* ========== 投放内容栏：短剧区（对标巨量） ========== */
.drama-sec { border-top: 1px solid #eef0f5; margin-top: 10px; padding-top: 10px; display: flex; flex-direction: column; gap: 12px; }
.drama-sec-title { font-weight: 600; font-size: 14px; color: #333; }
.drama-field { display: flex; flex-direction: column; gap: 6px; }
.drama-label { color: #555; font-size: 13px; }
.drama-field select { border: 1px solid #dcdfe6; border-radius: 6px; padding: 7px 10px; font-size: 13px; }
.prod-hint { background: #fafbfc; border: 1px solid #eef0f5; border-radius: 6px; padding: 8px 10px; font-size: 13px; word-break: break-all; }
.prod-hint.warn { color: #e6a23c; }
.prod-pick-list { max-height: 320px; overflow: auto; padding: 8px 24px 0; }
.prod-pick-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #f2f4f8; font-size: 13px; cursor: pointer; }
.prod-pick-item .n { flex: 1; }

/* ========== 批量添加账户：巨量同款导入页 ========== */
.imp-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.imp-label { font-size: 14px; color: #333; }
.imp-tabs { display: inline-flex; border: 1px solid #dcdfe6; border-radius: 6px; overflow: hidden; }
.imp-tabs button { border: none; background: #fff; padding: 9px 22px; font-size: 14px; cursor: pointer; color: #333; }
.imp-tabs button + button { border-left: 1px solid #dcdfe6; }
.imp-tabs button.active { background: #e8efff; color: #2b5aed; font-weight: 600; }
.imp-tip { background: #fdf6ec; border: 1px solid #faecd8; color: #b88230; border-radius: 6px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.imp-box { border: 1px solid #e5e8ef; border-radius: 8px; overflow: hidden; width: 100%; }
.imp-box-head { background: #f7f8fa; border-bottom: 1px solid #eef0f5; padding: 10px 14px; font-size: 14px; font-weight: 600; color: #333; }
.imp-box-head b { color: #2b5aed; }
.imp-editor { display: flex; background: #fff; }
.imp-gutter { width: 44px; flex: none; padding: 12px 0; text-align: center; color: #b0b6c0; font-size: 13px; line-height: 20px; background: #fafbfc; border-right: 1px solid #eef0f5; overflow: hidden; user-select: none; }
.imp-editor textarea { flex: 1; border: none; outline: none; resize: vertical; padding: 12px 14px; font-size: 13px; line-height: 20px; color: #333; min-height: 220px; font-family: inherit; }
.imp-editor textarea::placeholder { color: #b0b6c0; }
.imp-pick-list { max-height: 320px; overflow: auto; border: 1px solid #e5e8ef; border-radius: 8px; max-width: 860px; margin-top: 8px; }
.imp-pick-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid #f2f4f8; font-size: 13px; cursor: pointer; }
.imp-pick-item .n { flex: 1; }
.imp-pick-item .i { color: #8a919f; }
.imp-pick-item.added { background: #f5f9ff; }
.imp-pick-item .tag { color: #2b5aed; font-size: 12px; }

/* ========== 数据报表：指标列提示 ========== */
.tbl th.th-off { color: #b0b6c0; font-weight: 500; }
.tbl tfoot td { border-top: 1px solid #e5e8ef; background: #fafbfc; font-weight: 600; }

.pl-link{max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:monospace;font-size:12px}

/* ========== 常读应用：剧目库（授权）诊断 ========== */
.ok-tag{display:inline-block;background:#e8f7ee;color:#128a4b;border:1px solid #b7e4c9;border-radius:10px;padding:0 8px;font-size:12px;line-height:18px}
a.ce-link.zero-book{color:#d4380d;font-weight:600}
a.ce-link.zero-book:hover{color:#a8071a}

/* ========== 铺剧任务（对标创量 短剧管理 → 短剧 → 铺剧任务） ========== */
.pt-badge{display:inline-block;border-radius:10px;padding:0 8px;font-size:12px;line-height:18px;border:1px solid transparent}
.pt-pending{background:#f4f5f7;color:#5a6472;border-color:#dfe3e8}
.pt-running{background:#eaf3ff;color:#1264c8;border-color:#bcd7fb}
.pt-done{background:#e8f7ee;color:#128a4b;border-color:#b7e4c9}
.pt-failed{background:#fff1f0;color:#c1121f;border-color:#f5b8b8}
.pt-stopped{background:#f7f7f7;color:#8a8a8a;border-color:#e3e3e3}
.pt-step{display:inline-block;margin-right:4px;padding:0 6px;border-radius:8px;font-size:12px;line-height:18px;background:#f4f5f7;color:#5a6472}
.pt-step.ok{background:#e8f7ee;color:#128a4b}
.pt-step.fail{background:#fff1f0;color:#c1121f}
.pt-step.run{background:#eaf3ff;color:#1264c8}
.pt-drawer{padding:0 4px;max-height:70vh;overflow:auto}
.pt-sec{border-top:1px solid #eef0f3;padding:10px 0 6px}
.pt-sec:first-child{border-top:none}
.pt-sec-h{font-size:13px;color:#333;margin-bottom:6px}
.pt-sec-h b{display:inline-block;width:16px;height:16px;line-height:16px;text-align:center;border-radius:8px;background:#1668dc;color:#fff;font-size:11px;margin-right:6px}
#pt-modal .modal-body,#pt-auto-modal .modal-body{max-height:88vh;display:flex;flex-direction:column}
#pt-modal .modal-body .rule-foot,#pt-auto-modal .modal-body .rule-foot{margin-top:8px}
#pt-auto-modal #pt-auto-form{padding:0 4px}

/* ================= 新版外壳：登录页 + 创量式侧边导航 ================= */
#login-page { position: fixed; inset: 0; z-index: 300;
  background: linear-gradient(160deg, #e8f0ff 0%, #f7f9ff 55%, #eefaf3 100%);
  display: flex; align-items: center; justify-content: center; }
body.authed #login-page { display: none; }
.login-card { width: 380px; background: #fff; border-radius: 16px; padding: 40px 36px 28px;
  box-shadow: 0 12px 48px rgba(31, 35, 41, .10); }
.login-card h2 { text-align: center; font-size: 20px; margin-bottom: 6px; }
.login-sub { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 24px; }
.login-card input { width: 100%; margin-bottom: 12px; padding: 10px 12px; font-size: 14px; }
.login-card button.primary { width: 100%; padding: 10px; font-size: 15px; margin-top: 4px; }
.login-hint { margin-top: 16px; text-align: center; }

#app-shell { display: none; flex-direction: column; min-height: 100vh; }
body.authed #app-shell { display: flex; }

/* 顶栏 */
.topbar { display: flex; align-items: center; gap: 16px; padding: 0 20px; height: 52px;
  background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.topbar .brand { font-weight: 700; font-size: 16px; white-space: nowrap; }
#crumb { color: var(--muted); font-size: 13px; }
#me-info { font-size: 13px; white-space: nowrap; }
#me-info a { margin-left: 6px; }

/* 侧边栏 + 主区 */
.shell-body { display: flex; flex: 1; align-items: stretch; }
#side-nav { width: 212px; flex: none; background: #fff; border-right: 1px solid var(--border);
  padding: 10px 8px 30px; position: sticky; top: 52px; height: calc(100vh - 52px);
  overflow-y: auto; user-select: none; }
.nav-item { padding: 7px 12px; border-radius: 6px; cursor: pointer; color: #333;
  font-size: 13px; margin: 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { background: #f2f5ff; color: var(--primary); }
.nav-item.active { background: var(--primary-weak); color: var(--primary); font-weight: 600; }
.nav-group-title { padding: 7px 12px; font-weight: 600; font-size: 13px; color: #1f2329;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center; border-radius: 6px; }
.nav-group-title:hover { background: #f7f9ff; }
.nav-group-title.sub { font-weight: 600; color: #444; }
.nav-group-title.sub2 { font-weight: 500; color: #555; font-size: 12.5px; }
.nav-arrow { color: #b0b6c0; font-size: 11px; }
.nav-sub { margin-left: 12px; border-left: 1px solid #eef0f5; padding-left: 5px; display: none; }
.nav-group.open > .nav-sub { display: block; }
main { flex: 1; min-width: 0; padding: 20px 24px 60px; max-width: none; }

/* ================= 已绑定账户：创量式筛选条 ================= */
.cl-searchbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cl-searchbar select, .cl-searchbar input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.cl-filterbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; row-gap: 6px; }
.cl-chips { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.cl-chip { display: inline-flex; align-items: center; gap: 6px; background: #f2f6ff;
  border: 1px solid #bcd2ff; border-radius: 16px; padding: 4px 10px; font-size: 12.5px; color: #2456b3; }
.cl-chip b { font-weight: 500; white-space: nowrap; }
.cl-chip select { border: none; background: transparent; color: #2456b3; font-size: 12.5px; outline: none; max-width: 180px; }
.cl-chip input[type="date"] { border: none; background: transparent; color: #2456b3; font-size: 12.5px; outline: none; width: 128px; }
.cl-chip .cl-x { cursor: pointer; color: #7c93bd; font-size: 14px; padding: 0 2px; }
.cl-chip .cl-x:hover { color: #e34d59; }
.cl-addbtn { color: var(--primary); cursor: pointer; font-size: 13px; white-space: nowrap; }
.cl-addbtn:hover { text-decoration: underline; }
.cl-clear { color: var(--primary); cursor: pointer; font-size: 13px; }
.cl-hint { color: var(--muted); font-size: 12px; cursor: pointer; }
.cl-menu { display: none; position: relative; margin-top: 6px; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(31,35,41,.12); padding: 6px; width: 220px; z-index: 20; }
.cl-menu a { display: block; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.cl-menu a:hover { background: #f2f5ff; color: var(--primary); }

/* ================= 新建全域项目：选中状态实时条 ================= */
.ce-status { display: flex; flex-wrap: wrap; gap: 8px; margin-right: auto; align-items: center; }
.ce-st { padding: 3px 10px; border-radius: 12px; font-size: 12.5px; background: #f2f4f8; color: #5b6472; white-space: nowrap; }
.ce-st.ok { background: #e8f6ee; color: #12894a; }
.ce-st.miss { background: #fdecec; color: #d93025; font-weight: 500; }
.ce-st.ready { background: #e7f0ff; color: #1a5fd0; font-weight: 600; }
.ce-st.hint { background: #fff7e6; color: #a86a00; }
.ce-col.need { box-shadow: 0 0 0 1.5px #f2a6a6 inset; border-radius: 8px; }
.ce-col.need .ce-col-head { color: #d93025; }

/* ================= 巨量授权过期横幅 ================= */
.auth-banner { background: #fdecec; color: #b3261e; border-bottom: 1px solid #f2c4c0;
  padding: 8px 18px; font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.auth-banner a { color: #1a5fd0; cursor: pointer; font-weight: 600; text-decoration: underline; }
.auth-banner #auth-banner-close { margin-left: auto; cursor: pointer; color: #b3261e; opacity: .6; padding: 0 4px; }
.auth-banner #auth-banner-close:hover { opacity: 1; }

/* 表格批量搭建：逐行校验状态 */
.bs-ok { color: #12894a; font-weight: 500; }
.bs-warn { color: #b7791f; font-weight: 500; }
.bs-err { color: var(--danger); font-weight: 500; }
#tab-buildsheet a.btn-blue { text-decoration: none; display: inline-block; padding: 6px 12px; }

/* ================= 批量建全域：7步向导 ================= */
.wiz-wrap { display: flex; flex-direction: column; gap: 0; }
.wiz-steps { position: sticky; top: 52px; z-index: 9; display: flex; gap: 6px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e5e8ef; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.wz-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px;
  border-radius: 16px; border: 1px solid #e5e8ef; background: #fafbfc; font-size: 12.5px; color: #5b6472; cursor: pointer; }
.wz-chip:hover { border-color: #2b5aed; color: #2b5aed; }
.wz-chip .wz-num { width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%;
  background: #eceff4; color: #5b6472; font-size: 12px; font-weight: 600; flex: none; }
.wz-chip.has .wz-num { background: #e8f6ee; color: #12894a; }
.wz-chip.cur { border-color: #2b5aed; background: #eef3ff; color: #2b5aed; font-weight: 600; }
.wz-chip.cur .wz-num { background: #2b5aed; color: #fff; }
h3 .wz-num { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center;
  border-radius: 50%; background: #2b5aed; color: #fff; font-size: 13px; margin-right: 4px; }
.wz-chips { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
.wz-chips .acc-chip { font-size: 12.5px; padding: 4px 12px; }
.wz-avatar-prev img { width: 64px; height: 64px; border-radius: 8px; border: 1px solid #e5e8ef; object-fit: cover; vertical-align: middle; }
.wz-drama-row, .wz-acc-row { display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px dashed #f0f2f6; flex-wrap: wrap; }
.wz-drama-row:last-child, .wz-acc-row:last-child { border-bottom: none; }
.wz-drama-row input[type=text], .wz-drama-row input:not([type]) { width: 260px; }
.wz-drama-row input.wz-pid { width: 220px; font-family: monospace; font-size: 12px; }
.wz-src { padding: 1px 8px; border-radius: 9px; font-size: 11.5px; white-space: nowrap; }
.wz-src.ok { background: #e8f6ee; color: #12894a; }
.wz-src.fuzzy { background: #fff7e6; color: #a86a00; }
.wz-src.fail { background: #fdecec; color: #d93025; }
.wz-del { color: #b0b6c0; cursor: pointer; border: none; background: none; font-size: 14px; padding: 0 4px; }
.wz-del:hover { color: #e34d59; }
.wz-task-tbl th { font-size: 12px; }
.wz-mats { display: flex; gap: 4px; flex-wrap: wrap; }
.wz-mats span { background: #f2f6ff; border: 1px solid #d5e2ff; color: #2456b3; border-radius: 4px;
  font-size: 11px; padding: 0 6px; line-height: 18px; max-width: 200px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.wz-group-head { background: #f7f9ff; border: 1px solid #e3ebff; border-radius: 8px;
  padding: 8px 12px; margin: 12px 0 6px; font-weight: 600; font-size: 13.5px; color: #1f3c8f;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wz-warn { background: #fff7e6; border: 1px solid #faecd8; color: #a86a00; border-radius: 6px;
  padding: 6px 12px; font-size: 12.5px; margin: 4px 0; }

/* 第①步 账户表格（仿巨量后台账户管理） */
.wz-acc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.wz-acc-table th, .wz-acc-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid #eef1f6; }
.wz-acc-table th { color: #667; font-weight: 500; background: #f7f9fc; }
.wz-acc-table .c-chk { width: 34px; text-align: center; }
.wz-acc-table .c-op { width: 70px; text-align: center; }
.wz-acc-table .c-id { color: #667; font-family: ui-monospace, Menlo, monospace; }
.wz-acc-table .c-name { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-acc-table .lnk-del { color: #f56c6c; text-decoration: none; cursor: pointer; }
.wz-acc-table .lnk-del:hover { text-decoration: underline; }
.wz-acc-table tr.wz-row-sel td { background: #fff7f7; }

/* 第①步 批量操作下拉菜单（仿巨量后台） */
.wz-batch { position: relative; display: inline-block; }
.wz-batch-menu { display: none; position: absolute; z-index: 50; top: 100%; left: 0; min-width: 210px;
  background: #fff; border: 1px solid #dfe5ee; border-radius: 8px; box-shadow: 0 8px 24px rgba(30,50,90,.14);
  padding: 4px 0; margin-top: 4px; }
.wz-batch.open .wz-batch-menu { display: block; }
.wz-batch-menu > div { padding: 8px 14px; font-size: 13px; cursor: pointer; color: #333; white-space: nowrap; }
.wz-batch-menu > div:hover { background: #f0f4ff; color: #2b5aed; }
.wz-batch-menu .wz-batch-danger { color: #f56c6c; border-top: 1px solid #f0f0f0; margin-top: 2px; }
.wz-batch-menu .wz-batch-danger:hover { background: #fff2f2; color: #d93636; }

/* 任务记录账户列：全称折叠（2026-10-09） */
.acc-fold { display: inline-block; max-width: 300px; vertical-align: top; }
.acc-fold summary { cursor: pointer; list-style: none; word-break: break-all; }
.acc-fold summary::-webkit-details-marker { display: none; }
.acc-fold summary::before { content: "▸ "; color: #2456b3; }
.acc-fold[open] summary::before { content: "▾ "; }
.acc-fold-more { color: #2456b3; white-space: nowrap; }
.acc-fold-body { margin: 4px 0 0 14px; line-height: 1.6; word-break: break-all; color: var(--text, #333); }

/* ===== 全域自动化 · 新建区账户卡片（2026-10-18 重做：解决「按钮太小太乱」） =====
   旧实现：所有元素挤在一行，行内按钮被写成 padding:0 6px / font-size:11px，
   账户名、ID、4 个按钮、计数、手动输入框、已选串全在一条 1px 灰线里，找不到重点。
   新实现：账户=卡片，头部「名称+ID」一行、右侧固定操作区；状态用胶囊标签；
   抖音号列表收进独立的浅色面板；手动加号单独一行。命名空间全用 .au- 前缀隔离。 */
.au-zone { display: flex; flex-direction: column; gap: 10px; }
.au-zone-empty { padding: 20px 14px; border: 1px dashed var(--border); border-radius: 10px;
  color: var(--muted); font-size: 13px; text-align: center; line-height: 1.8; }

.au-card { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 11px 13px; }
.au-card:hover { border-color: #c9cdd4; }
.au-top { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.au-ident { min-width: 0; flex: 1 1 320px; }
.au-name { font-size: 13.5px; font-weight: 600; line-height: 1.45; word-break: break-all; }
.au-id { font-size: 12px; color: var(--muted); word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.au-ops { display: flex; gap: 8px; flex-shrink: 0; }

.au-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 30px; padding: 0 13px; font-size: 12.5px; line-height: 1; white-space: nowrap;
  border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); cursor: pointer; }
.au-btn:hover { border-color: var(--primary); color: var(--primary); }
.au-btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.au-btn-primary:hover { opacity: .9; color: #fff; }
.au-btn-danger { color: var(--danger); border-color: #f0b6b6; }
.au-btn-danger:hover { border-color: var(--danger); color: var(--danger); background: #fff5f5; }
.au-btn:disabled { opacity: .5; cursor: not-allowed; }
.au-btn-lg { height: 34px; padding: 0 16px; font-size: 13px; }

.au-mid { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 9px; }
.au-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px;
  border-radius: 14px; border: 1px solid #cfe0ff; background: var(--primary-weak);
  color: #2456b3; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.au-chip:hover { border-color: var(--primary); }
.au-chip b { color: #0e42a8; font-weight: 600; }
.au-chip .au-caret { font-size: 10px; }
/* 2026-10-26：自动分配模式下「池内共 N 个号」——只读查看入口，不能勾选 */
.au-poolinfo { cursor: pointer; }
.au-selnames { flex: 1 1 300px; min-width: 0; font-size: 12.5px; color: var(--ok);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.au-dd { margin-top: 9px; border: 1px solid var(--border); border-radius: 8px;
  background: #fafbfc; padding: 10px; }
.au-dd-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.au-inp { height: 30px; padding: 0 10px; font-size: 12.5px; border: 1px solid var(--border);
  border-radius: 6px; background: #fff; }
.au-inp:focus { outline: none; border-color: var(--primary); }
.au-inp-grow { flex: 1 1 240px; min-width: 170px; }
.au-dd-grid { max-height: 260px; overflow: auto; background: #fff; border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 8px; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 1px 12px; }
.au-dd-item { display: flex; align-items: center; gap: 7px; padding: 5px 7px; border-radius: 5px;
  font-size: 12.5px; cursor: pointer; min-width: 0; }
.au-dd-item:hover { background: var(--primary-weak); }
.au-dd-item input { flex: none; margin: 0; cursor: pointer; width: 14px; height: 14px; }
.au-dd-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.au-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--border); }
.au-foot-label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.au-warn { font-size: 12.5px; color: #b45309; line-height: 1.5; }

.au-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.au-stat { font-size: 12.5px; color: var(--muted); padding: 3px 10px; background: #f5f7fa;
  border-radius: 12px; white-space: nowrap; }

/* ===== 标准投放 IAA/IAP（2026-10-30）：芯片 / 主图 / 抖音号勾选 ===== */
.chipbox { display:flex; flex-wrap:wrap; gap:8px; background:#f6f7fb; border-radius:10px;
  padding:10px; min-height:44px; align-items:center; }
.chip { display:inline-flex; align-items:center; gap:6px; background:#fff; border:1px solid #e3e6ef;
  border-radius:8px; padding:6px 10px; font-size:13px; color:#333; }
.chip a { color:#9aa0ad; cursor:pointer; font-size:12px; }
.chip a:hover { color:#d33; }
.std-img-prev { width:108px; height:108px; object-fit:cover; border-radius:10px;
  border:1px solid #e3e6ef; background:#f6f7fb; }
.std-aw { display:inline-flex; align-items:center; gap:6px; background:#fff; border:1px solid #e3e6ef;
  border-radius:8px; padding:6px 10px; font-size:13px; cursor:pointer; }
.std-aw input { margin:0; }
body.dark .chipbox, body.theme-dark .chipbox { background:#2a2d36; }
body.dark .chip, body.dark .std-aw { background:#22252c; border-color:#3a3f4b; color:#ddd; }

/* 2026-10-30：账户区「清空所有账户」按钮（普通 button 套红色样式） */
.std-danger { color: var(--danger); border: 1px solid #f0b6b6; background: #fff;
  border-radius: 6px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; }
.std-danger:hover { border-color: var(--danger); background: #fff5f5; }
/* 抖音号「共享」标记：SHARE_BY_COMPANY / SHARE_BY_EBP_CASCADE_ACCOUNT / SHARE_BY_ACCOUNT */
.std-share { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px;
  font-size: 11px; line-height: 16px; color: #9a5b00; background: #fff4e0; border: 1px solid #f5d9a8; }
body.dark .std-share, body.theme-dark .std-share { color: #ffcf8b; background: #3a3222; border-color: #5a4a2c; }

/* 标准投放：投放配置内的子模块（行动号召 / 产品主图 / 产品卖点） */.std-sub { margin-top:14px; padding-top:12px; border-top:1px dashed var(--border, #e3e6ef); }
.std-sub-h { font-size:13px; font-weight:600; color:#333; margin-bottom:8px; }
.std-sub-h .muted { font-weight:400; font-size:12px; }
body.dark .std-sub-h, body.theme-dark .std-sub-h { color:#ddd; }

/* ===== 抖音解析页：任务进度看板（2026-11-16） ===== */
.dpbar { display:flex; height:14px; border-radius:7px; overflow:hidden; background:var(--border); margin:6px 0 8px; }
.dpbar > i { display:block; height:100%; transition:width .3s ease; }
.dpbar .s-pending  { background:#c9cdd4; }
.dpbar .s-parsing  { background:#3370ff; }
.dpbar .s-parsed   { background:#14c9c9; }
.dpbar .s-uploaded { background:#00b42a; }
.dpbar .s-failed   { background:#f53f3f; }
.dpbar .s-up_error { background:#ff7d00; }
.dpbar .s-other    { background:#9aa4b2; }
.dplegend { display:flex; gap:16px; flex-wrap:wrap; font-size:12px; color:var(--muted); }
.dplegend > span { display:flex; align-items:center; gap:5px; }
.dplegend b { color:var(--text); font-weight:600; }
.dplegend i { display:inline-block; width:9px; height:9px; border-radius:2px; }
.dplegend i.s-pending  { background:#c9cdd4; }
.dplegend i.s-parsing  { background:#3370ff; }
.dplegend i.s-parsed   { background:#14c9c9; }
.dplegend i.s-uploaded { background:#00b42a; }
.dplegend i.s-failed   { background:#f53f3f; }
.dplegend i.s-up_error { background:#ff7d00; }
.dplegend i.s-other    { background:#9aa4b2; }

.dpsteps { display:flex; gap:3px; align-items:center; }
.dpsteps i { width:28px; height:6px; border-radius:3px; background:var(--border); }
.dpsteps i.on  { background:var(--primary); }
.dpsteps i.ok  { background:var(--ok); }
.dpsteps i.bad { background:var(--danger); }
.dpsteps span { margin-left:7px; font-size:12px; color:var(--muted); white-space:nowrap; }
.dpsteps span.bad { color:var(--danger); }
.dpsteps span.ok  { color:var(--ok); }
/* 2026-11-16 解析任务明细：组织上传状态徽标（不依赖 .dpsteps 容器） */
td > span.ok  { color:var(--ok); font-weight:600; white-space:nowrap; }
td > span.bad { color:var(--danger); font-weight:600; white-space:nowrap; }
