/* crm-publish.css — 发布中心 + AICRM 页面样式（2026-11-19） */
.pub-cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 16px; }
.pub-cap { background: #fff; border: 1px solid #e6e9ef; border-radius: 12px; padding: 14px 16px; }
.pub-cap h4 { margin: 0 0 6px; font-size: 14px; color: #111827; display: flex; align-items: center; gap: 8px; }
.pub-cap p { margin: 0; font-size: 12.5px; color: #6b7280; line-height: 1.7; }
.pub-dot { width: 8px; height: 8px; border-radius: 50%; background: #d1d5db; display: inline-block; }
.pub-dot.ok { background: #16a34a; }
.pub-dot.warn { background: #f59e0b; }
.pub-dot.bad { background: #ef4444; }

.pub-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.pub-stat { background: #fff; border: 1px solid #e6e9ef; border-radius: 12px; padding: 14px 16px; }
.pub-stat b { display: block; font-size: 24px; line-height: 1.2; color: #111827; }
.pub-stat span { font-size: 12px; color: #6b7280; }
.pub-stat.warn b { color: #f59e0b; }
.pub-stat.ok b { color: #16a34a; }
.out-stat-btn { text-align: left; font: inherit; width: 100%; cursor: pointer; color: inherit; appearance: none; transition: border-color .18s, box-shadow .18s, transform .18s; }
.out-stat-btn:hover { border-color: #93b4ff; box-shadow: 0 6px 18px rgba(31, 111, 235, .10); transform: translateY(-1px); }
.out-stat-btn:focus-visible { outline: 2px solid #1f6feb; outline-offset: 2px; }
.out-stat-btn small { display: block; margin-top: 5px; font-size: 11px; color: #1f6feb; }
.out-plan-card { text-align: left; font: inherit; width: 100%; border: 1px solid #e4ebf7; border-radius: 10px; padding: 10px 12px; background: #fff; cursor: pointer; position: relative; transition: border-color .18s, box-shadow .18s, transform .18s; }
.out-plan-card:hover { border-color: #1f6feb; box-shadow: 0 6px 16px rgba(31, 111, 235, .10); transform: translateY(-1px); }
.out-plan-card:focus-visible { outline: 2px solid #1f6feb; outline-offset: 2px; }
.out-plan-buyhint { margin-top: 6px; font-size: 11px; color: #1f6feb; }
.out-plan-buyhint.active { color: #16a34a; }
.out-addon-card { border-color: #fcd34d; background: #fffbeb; }
.out-addon-card:hover { border-color: #f59e0b; box-shadow: 0 6px 16px rgba(245, 158, 11, .12); }
.out-addon-badge { display: inline-block; font-size: 10px; line-height: 1.5; padding: 1px 6px; border-radius: 6px; color: #92400e; background: #fde68a; margin-bottom: 4px; }

.pub-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.pub-toolbar .btn-sm { flex: 0 0 auto; }
.pub-table-wrap { overflow-x: auto; border: 1px solid #e6e9ef; border-radius: 12px; background: #fff; }
.pub-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 12.5px; }
.pub-table th, .pub-table td { padding: 10px 12px; border-bottom: 1px solid #f0f2f5; text-align: left; vertical-align: top; }
.pub-table th { background: #f8fafc; color: #6b7280; font-weight: 600; white-space: nowrap; }
.pub-table tr:last-child td { border-bottom: 0; }
.pub-table td .muted { color: #9ca3af; font-size: 11.5px; }
.pub-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; line-height: 1.8; white-space: nowrap; }
.pub-pill.pending { background: #eef2ff; color: #4f46e5; }
.pub-pill.running { background: #e0f2fe; color: #0284c7; }
.pub-pill.published { background: #dcfce7; color: #15803d; }
.pub-pill.manual { background: #fef3c7; color: #b45309; }
.pub-pill.failed { background: #fee2e2; color: #b91c1c; }
.pub-pill.cancelled { background: #f1f5f9; color: #64748b; }
.pub-pill.blocked { background: #f3e8ff; color: #7e22ce; }
.pub-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pub-actions button { border: 1px solid #d7dce4; background: #fff; color: #374151; border-radius: 7px; padding: 4px 8px; font-size: 11.5px; cursor: pointer; }
.pub-actions button:hover { border-color: #16a34a; color: #15803d; }
.pub-actions button.danger:hover { border-color: #ef4444; color: #b91c1c; }

.pub-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.pub-form-grid .full { grid-column: 1 / -1; }
.pub-form-grid label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.pub-form-grid input, .pub-form-grid select, .pub-form-grid textarea {
  width: 100%; box-sizing: border-box; border: 1px solid #d7dce4; border-radius: 8px; padding: 8px 10px; font-size: 13px; background: #fff; color: #111827;
}
.pub-form-grid textarea { min-height: 80px; resize: vertical; }
.pub-form-grid .check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #374151; }
.pub-form-grid .check input { width: auto; }
.pub-help { font-size: 11.5px; color: #9ca3af; line-height: 1.7; margin-top: 4px; }

.crm-pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.crm-stage { background: #fff; border: 1px solid #e6e9ef; border-radius: 12px; padding: 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.crm-stage:hover, .crm-stage.on { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.08); }
.crm-stage h4 { margin: 0 0 6px; font-size: 13px; color: #111827; display: flex; justify-content: space-between; gap: 6px; }
.crm-stage b { font-size: 20px; color: #111827; }
.crm-stage span { display: block; font-size: 11.5px; color: #9ca3af; margin-top: 3px; }

.crm-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.crm-toolbar input, .crm-toolbar select { border: 1px solid #d7dce4; border-radius: 8px; padding: 7px 9px; font-size: 12.5px; background: #fff; }
.crm-toolbar input[type=search] { min-width: 190px; }

.crm-badge { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; background: #f1f5f9; color: #475569; }
.crm-badge.hot { background: #fff7ed; color: #c2410c; }
.crm-badge.overdue { background: #fee2e2; color: #b91c1c; }
.crm-badge.public { background: #eef2ff; color: #4338ca; }

.crm-modal { max-height: 86vh; overflow: auto; }
.crm-detail-hd { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid #eef0f4; margin-bottom: 14px; }
.crm-detail-hd h3 { margin: 0 0 4px; font-size: 18px; color: #111827; }
.crm-detail-hd p { margin: 0; font-size: 12.5px; color: #6b7280; line-height: 1.7; }
.crm-detail-hd .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-detail-hd .actions button { border: 1px solid #d7dce4; background: #fff; border-radius: 7px; padding: 5px 9px; font-size: 12px; cursor: pointer; }
.crm-detail-hd .actions button:hover { border-color: #16a34a; color: #15803d; }
.crm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.crm-section { border: 1px solid #eef0f4; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: #fff; }
.crm-section h4 { margin: 0 0 10px; font-size: 13.5px; color: #111827; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.crm-section h4 span { font-size: 11.5px; color: #9ca3af; font-weight: 400; }
.crm-field { margin-bottom: 8px; }
.crm-field label { display: block; font-size: 11.5px; color: #6b7280; margin-bottom: 3px; }
.crm-field input, .crm-field select, .crm-field textarea { width: 100%; box-sizing: border-box; border: 1px solid #d7dce4; border-radius: 7px; padding: 7px 9px; font-size: 12.5px; background: #fff; }
.crm-field textarea { min-height: 60px; resize: vertical; }
.crm-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.crm-btn { border: 1px solid #d7dce4; background: #fff; color: #374151; border-radius: 7px; padding: 6px 10px; font-size: 12px; cursor: pointer; }
.crm-btn.solid { background: #16a34a; border-color: #16a34a; color: #fff; }
.crm-btn.line { background: #fff; color: #15803d; border-color: #16a34a; }
.crm-btn:hover { opacity: .92; }

.crm-timeline { list-style: none; margin: 0; padding: 0; }
.crm-timeline li { position: relative; padding: 0 0 12px 18px; border-left: 2px solid #e5e7eb; }
.crm-timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.crm-timeline li::before { content: ''; position: absolute; left: -6px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #16a34a; }
.crm-timeline b { display: block; font-size: 12.5px; color: #111827; }
.crm-timeline p { margin: 3px 0 0; font-size: 12px; color: #6b7280; line-height: 1.7; white-space: pre-wrap; }
.crm-timeline time { font-size: 11px; color: #9ca3af; }
.crm-empty { font-size: 12px; color: #9ca3af; padding: 8px 0; }
.crm-ai { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.crm-ai b { font-size: 12.5px; color: #166534; }
.crm-ai p { margin: 4px 0 6px; font-size: 12px; color: #4b5563; line-height: 1.7; }
.crm-ai button { border: 1px solid #86efac; background: #fff; color: #15803d; border-radius: 6px; padding: 3px 8px; font-size: 11.5px; cursor: pointer; }

.crm-list-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.crm-list-table th, .crm-list-table td { padding: 7px 8px; border-bottom: 1px solid #f0f2f5; text-align: left; vertical-align: top; }
.crm-list-table th { color: #6b7280; background: #f8fafc; font-weight: 600; }
.crm-list-table tr:last-child td { border-bottom: 0; }

.pub-empty { padding: 22px; text-align: center; color: #9ca3af; font-size: 12.5px; }
.pub-note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.8; margin-bottom: 14px; }

/* AI 外呼（2026-11-26） */
.out-stats .pub-stat em { display: block; font-style: normal; font-size: 11px; color: #9ca3af; margin-top: 4px; }
.out-banner { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border: 1px solid #dbe4df; background: #f7fbf8; border-radius: 14px; padding: 15px 18px; margin-bottom: 16px; }
.out-banner.off { border-color: #e5e7eb; background: #f8fafc; }
.out-banner.warn { border-color: #fde68a; background: #fffbeb; }
.out-banner.ok { border-color: #bbf7d0; background: #f0fdf4; }
.out-banner-main { min-width: 0; flex: 1; }
.out-banner-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.out-banner-title b { font-size: 14.5px; color: #111827; }
.out-banner-tag { font-size: 11px; color: #6b7280; background: #fff; border: 1px solid #e5e7eb; border-radius: 999px; padding: 2px 8px; }
.out-plan-chip { font-size: 11px; color: #166534; background: #dcfce7; border: 1px solid #bbf7d0; border-radius: 999px; padding: 2px 8px; font-weight: 600; white-space: nowrap; }
.out-plan-chip.off { color: #92400e; background: #fef3c7; border-color: #fde68a; }

.out-banner p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.7; color: #6b7280; }
.out-banner-side { flex: 0 0 auto; padding-top: 2px; }
.out-online { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #15803d; font-weight: 600; }
.out-online i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }
.out-flow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.out-flow span { font-size: 11px; color: #4b5563; background: #fff; border: 1px solid #e5e7eb; border-radius: 999px; padding: 3px 8px; }
.out-progress { height: 5px; border-radius: 999px; background: #eef2f0; overflow: hidden; min-width: 90px; }
.out-progress i { display: block; height: 100%; background: #16a34a; border-radius: 999px; }
.out-phone { font-variant-numeric: tabular-nums; font-weight: 600; color: #111827; }
.out-consent { font-size: 11.5px; color: #475569; background: #f1f5f9; border-radius: 999px; padding: 2px 7px; }
.out-callable { font-size: 11.5px; color: #15803d; background: #dcfce7; border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.out-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.out-script { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; border-bottom: 1px solid #f0f2f5; padding: 10px 0; }
.out-script:last-child { border-bottom: 0; padding-bottom: 0; }
.out-script-main { min-width: 0; }
.out-script > button { flex: 0 0 auto; white-space: nowrap; align-self: center; }
.out-script-main b { font-size: 13px; color: #111827; margin-right: 6px; }
.out-script-main p { margin: 4px 0 0; font-size: 11.5px; line-height: 1.65; color: #6b7280; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.out-boundary ul, .out-help-list { margin: 0; padding-left: 17px; font-size: 12px; line-height: 1.9; color: #4b5563; }
.out-transcript { margin: 0; font-size: 12.5px; line-height: 1.85; color: #374151; white-space: pre-wrap; word-break: break-word; }
.out-camp-table { min-width: 820px; }
.out-contact-table { min-width: 900px; }
.out-task-table { min-width: 820px; }
.out-contact-table th:last-child, .out-contact-table td:last-child,
.out-task-table th:last-child, .out-task-table td:last-child { padding-right: 82px; }
.modal .pub-form-grid label { font-size: 11.5px; }
.modal .pub-form-grid textarea { min-height: 74px; }
@media (max-width: 900px) {
  .out-grid2 { grid-template-columns: 1fr; }
  .out-banner { flex-direction: column; gap: 10px; }
  .out-banner-side { width: 100%; }
}
@media (max-width: 760px) {
  .pub-form-grid, .crm-grid2, .crm-two { grid-template-columns: 1fr; }
  .crm-detail-hd .actions { width: 100%; }
  .pub-table { min-width: 640px; }
  .out-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .out-banner { padding: 13px 14px; }
}


/* ===== 作品管理 · 账号筛选（自定义弹层，替换原生 select） ===== */
.pub-account-filter{position:relative;display:inline-flex;flex:none;z-index:30}
.pub-account-btn{display:flex;align-items:center;gap:9px;min-width:230px;max-width:300px;height:42px;padding:0 11px;border:1px solid #dbe3ea;border-radius:12px;background:linear-gradient(180deg,#fff 0%,#f8fafc 100%);box-shadow:0 1px 2px rgba(16,24,40,.05);cursor:pointer;text-align:left;transition:border-color .16s,box-shadow .16s,background .16s}
.pub-account-btn:hover{border-color:#b7c7d8;background:#fff;box-shadow:0 3px 10px rgba(15,23,42,.07)}
.pub-account-btn:focus-visible{outline:none;border-color:#16a34a;box-shadow:0 0 0 3px rgba(22,163,74,.16)}
.pub-account-filter.open .pub-account-btn{border-color:#16a34a;background:#fff;box-shadow:0 0 0 3px rgba(22,163,74,.12)}
.pub-account-ico{width:28px;height:28px;flex:none;display:flex;align-items:center;justify-content:center;border-radius:9px;background:#eaf7ef;color:#15803d;font-size:12px;font-weight:800;letter-spacing:-.3px}
.pub-account-ico.all{background:#eef4ff;color:#2563eb}
.pub-account-cur{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1}
.pub-account-cur em{font-style:normal;font-size:10px;line-height:1.2;color:#94a3b8;font-weight:600}
.pub-account-cur b{font-size:13px;line-height:1.3;color:#0f172a;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pub-account-sub{max-width:86px;font-size:10.5px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pub-account-chev{width:8px;height:8px;flex:none;border-right:1.8px solid #64748b;border-bottom:1.8px solid #64748b;transform:rotate(45deg) translateY(-2px);transition:transform .18s}
.pub-account-filter.open .pub-account-chev{transform:rotate(225deg) translateY(-1px)}
.pub-account-menu{position:absolute;top:calc(100% + 8px);left:0;width:310px;max-height:340px;overflow:auto;padding:6px;background:#fff;border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 18px 46px rgba(15,23,42,.18),0 2px 8px rgba(15,23,42,.08);display:none;z-index:60}
.pub-account-filter.open .pub-account-menu{display:block;opacity:1;transform:none}

.pub-account-menu-hd{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px 7px;font-size:11px;font-weight:800;color:#334155;border-bottom:1px solid #f1f5f9;margin-bottom:4px}
.pub-account-menu-hd span{font-size:10px;font-weight:600;color:#94a3b8}
.pub-account-opt{display:flex;align-items:center;gap:9px;width:100%;padding:8px 9px;border:0;border-radius:10px;background:transparent;cursor:pointer;text-align:left;transition:background .14s}
.pub-account-opt:hover{background:#f8fafc}
.pub-account-opt.on{background:#f0fdf4}
.pub-account-opt .pub-account-txt{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1}
.pub-account-opt .pub-account-txt b{font-size:12px;line-height:1.35;color:#0f172a;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pub-account-opt .pub-account-txt em{font-style:normal;font-size:10px;line-height:1.3;color:#94a3b8}
.pub-account-opt .pub-account-check{width:18px;flex:none;font-size:12px;font-weight:800;color:#16a34a;text-align:center}
@media (max-width:760px){
  .pub-account-filter{width:100%}
  .pub-account-btn{width:100%;max-width:none;min-width:0}
  .pub-account-menu{width:100%;max-width:calc(100vw - 44px)}
}

