/* ============================================================
 * P0a 差异化增强 —— 188 成本预估面板 / 187 负面词黑名单&风控库
 * 宿主：keys.html（成本面板）+ settings.html（风控库）
 * 只增量挂接：不改 workbench.html / style.css / 既有 js / 其他 rectify_*
 * 颜色全部复用既有 hex（浅蓝白体系），零深色引入，禁 rgba(0,0,0,·) 实底
 * ============================================================ */

/* ---------- 188 成本预估面板（keys.html） ---------- */
#p0aCostMount { margin-top: 16px; }
.p0a-cost-card {
  background: var(--v10-card, #fff);
  border: 1px solid rgba(22, 11, 255, .16);
  border-radius: var(--v10-radius, 16px);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 6px 22px rgba(29, 33, 41, .08);
}
.p0a-cost-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.p0a-cost-title { font-size: 16px; font-weight: 700; color: #303133; display: flex; align-items: center; gap: 8px; }
.p0a-cost-sub { font-size: 13px; color: #606266; }
.p0a-cost-spacer { flex: 1; }

/* 顶部「当前预估」汇总卡 */
.p0a-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 16px;
}
.p0a-sum-cell {
  background: linear-gradient(135deg, #F4F9FF, #FFFFFF);
  border: 1px solid rgba(22, 11, 255, .18);
  border-radius: 12px; padding: 14px 16px;
}
.p0a-sum-cell.over {
  background: linear-gradient(135deg, #ffece8, #FFFFFF);
  border-color: rgba(194, 80, 80, .35);
}
.p0a-sum-l { font-size: 12px; color: #606266; margin-bottom: 4px; }
.p0a-sum-v { font-size: 24px; font-weight: 700; color: #303133; }
.p0a-sum-cell.over .p0a-sum-v { color: #f53f3f; }
.p0a-sum-hint { font-size: 12px; color: #9AA9BE; margin-top: 3px; }
.p0a-sum-cell.over .p0a-sum-hint { color: #f53f3f; }

/* 区块小标题 */
.p0a-sec-title {
  font-size: 14px; font-weight: 700; color: #1d2129;
  margin: 16px 0 10px; padding-top: 14px;
  border-top: 1px dashed rgba(22, 11, 255, .25);
}
.p0a-sec-title:first-of-type { border-top: 0; padding-top: 0; }

/* 单价配置表 */
.p0a-price-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.p0a-price-tbl th {
  text-align: left; font-size: 12px; font-weight: 600; color: #606266;
  padding: 7px 10px; background: #FAFCFF;
  border-bottom: 1px solid rgba(22, 11, 255, .14);
}
.p0a-price-tbl td { padding: 9px 10px; border-bottom: 1px solid #ffffff; vertical-align: middle; }
.p0a-price-tbl tr:last-child td { border-bottom: 0; }
.p0a-mchip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  font-size: 12px; font-weight: 700; color: #fff; margin-right: 8px;
  vertical-align: middle;
}
.p0a-model-name { font-weight: 600; color: #303133; vertical-align: middle; }
.p0a-num {
  width: 110px; padding: 7px 10px; border: 1px solid #f5f7fa; border-radius: 8px;
  font-size: 13px; background: #ffffff; outline: none;
}
.p0a-num:focus { border-color: #38BDF8; box-shadow: 0 0 0 3px rgba(56,189,248,.15); }
.p0a-unit-sel {
  padding: 7px 8px; border: 1px solid #f5f7fa; border-radius: 8px;
  font-size: 13px; background: #ffffff; outline: none; margin-left: 6px;
}

/* 预算阈值行 */
.p0a-budget-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #FAFCFF; border: 1px solid rgba(22, 11, 255, .14);
  border-radius: 12px; padding: 12px 14px;
}
.p0a-budget-row label.p0a-blbl { font-size: 14px; color: #303133; font-weight: 600; }
.p0a-budget-row .p0a-num { width: 140px; }
.p0a-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #606266; cursor: pointer; user-select: none; }
.p0a-toggle input { display: none; }
.p0a-tk {
  width: 36px; height: 20px; border-radius: 999px; background: #D8E4F3;
  position: relative; transition: background .18s; flex: none;
}
.p0a-tk::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(29,33,41,.25); transition: left .18s;
}
.p0a-toggle input:checked + .p0a-tk { background: #38BDF8; }
.p0a-toggle input:checked + .p0a-tk::after { left: 18px; }

/* 历史消耗条形占比（纯 CSS，浅蓝白） */
.p0a-usage-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 13px; }
.p0a-usage-name { width: 130px; flex: none; color: #303133; font-weight: 600; }
.p0a-usage-bar {
  flex: 1; height: 14px; background: #EEF4FB; border-radius: 999px; overflow: hidden;
  position: relative;
}
.p0a-usage-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #A8C6EC, #38BDF8);
  transition: width .4s ease;
}
.p0a-usage-fill.minimax { background: linear-gradient(90deg, #B9D2F0, #8FB4E2); }
.p0a-usage-fill.h3 { background: linear-gradient(90deg, #D9C9A8, #B89B6E); }
.p0a-usage-fill.seedance { background: linear-gradient(90deg, #A9D4B8, #7FB593); }
.p0a-usage-val { width: 150px; flex: none; text-align: right; color: #606266; font-size: 13px; }

.p0a-empty-stat {
  text-align: center; padding: 22px; color: #9AA9BE; font-size: 13px;
  background: #FAFCFF; border-radius: 12px; border: 1px dashed rgba(56,189,248,.3);
}

.p0a-disclaimer {
  margin-top: 14px; padding: 10px 13px; font-size: 12px; color: #ff7d00;
  background: #FFF7E8; border-radius: 12px; line-height: 1.7;
}
.p0a-save-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 12px; border: 0; cursor: pointer;
  background: linear-gradient(90deg, #38BDF8, #38BDF8); color: #fff;
  font-size: 14px; font-weight: 600; margin-top: 12px;
}
.p0a-save-btn:hover { filter: brightness(1.07); }

/* 口径标注（显著） */
.p0a-caliber {
  background: #f7f9fc; border: 1px dashed rgba(56,189,248,.35);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 14px;
  font-size: 13px; color: #1d2129; line-height: 1.6;
}
.p0a-caliber b { color: #303133; }

/* 三档预估输入行 */
.p0a-est-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #FAFCFF; border: 1px solid rgba(56,189,248,.14);
  border-radius: 12px; padding: 11px 14px; margin-bottom: 12px;
  font-size: 13px; color: #303133;
}
.p0a-est-row label { display: inline-flex; align-items: center; gap: 6px; }
.p0a-est-row .p0a-num { width: 80px; }
.p0a-range-txt {
  margin-left: auto; font-size: 13px; font-weight: 700; color: #1d2129;
  background: #e6f4ff; padding: 6px 12px; border-radius: 999px;
}

/* 未配置单价态 */
.p0a-tbd { color: #9AA9BE; font-size: 14px; font-weight: 600; line-height: 1.4; }
.p0a-sum-cell.p0a-unset { background: #F5F8FC; border-style: dashed; }
.p0a-unset-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: #FFF7E8; color: #ff7d00;
}
.p0a-price-tbl tr.p0a-row-unset td { background: #FCFBF6; }
.p0a-tbd-cell { color: #9AA9BE; font-size: 13px; }

/* 三档表（明细） */
.p0a-tier-tbl { margin-top: 4px; }
.p0a-tier-tbl td { font-size: 13px; color: #303133; font-weight: 600; }

/* ⓪ 官方价源入口卡 */
.p0a-src-card {
  background: #FAFCFF; border: 1px solid rgba(56,189,248,.14);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
}
.p0a-eff-price { font-weight: 600; color: #303133; }
.p0a-upd-time { font-size: 12px; color: #9AA9BE; }
.p0a-src-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: #E7F4EA; color: #3B7A4F;
}
.p0a-src-tag.p0a-src-local { background: #F0F4FA; color: #606266; }
.p0a-src-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.p0a-src-hint { font-size: 12px; color: #9AA9BE; }
.p0a-price-modal-ft { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* 成本 toast（复用 i6Toast 风格，独立容器） */
.p0a-toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: #303133; color: #fff; padding: 10px 18px; border-radius: 12px;
  font-size: 14px; box-shadow: 0 10px 30px rgba(29,33,41,.25);
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 200;
}
.p0a-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.p0a-toast.warn { background: #f53f3f; }

/* ---------- 187 负面词黑名单（settings.html） ---------- */
#p0aNegMount .p0a-neg-card {
  background: var(--v10-card, #fff);
  border: 1px solid rgba(22, 11, 255, .16);
  border-radius: var(--v10-radius, 16px);
  padding: 18px 20px; margin-bottom: 14px;
  box-shadow: 0 6px 22px rgba(29, 33, 41, .08);
}
.p0a-neg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.p0a-neg-title { font-size: 16px; font-weight: 700; color: #303133; display: flex; align-items: center; gap: 8px; }
.p0a-neg-sub { font-size: 13px; color: #606266; margin-bottom: 14px; }

.p0a-neg-tabs { display: inline-flex; background: #EEF4FB; border-radius: 12px; padding: 3px; margin-bottom: 14px; }
.p0a-neg-tab {
  padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
  color: #1d2129; border: 0; background: transparent; font-weight: 500;
}
.p0a-neg-tab.on { background: #fff; color: #303133; font-weight: 700; box-shadow: 0 2px 6px rgba(29,33,41,.12); }

.p0a-proj-sel-wrap { margin-bottom: 12px; font-size: 13px; color: #606266; }
.p0a-proj-sel {
  margin-left: 8px; padding: 7px 10px; border: 1px solid #f5f7fa; border-radius: 8px;
  font-size: 13px; background: #ffffff; min-width: 220px; outline: none;
}

.p0a-words-edit {
  width: 100%; min-height: 140px; padding: 11px 13px;
  border: 1px solid #f5f7fa; border-radius: 12px; background: #ffffff;
  font-size: 14px; line-height: 1.9; resize: vertical; outline: none;
  font-family: inherit; color: #303133;
}
.p0a-words-edit:focus { border-color: #38BDF8; box-shadow: 0 0 0 3px rgba(56,189,248,.15); }
.p0a-words-hint { font-size: 12px; color: #9AA9BE; margin-top: 6px; line-height: 1.7; }

.p0a-word-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.p0a-wchip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: 13px;
  background: #ffece8; color: #f53f3f; border: 1px solid rgba(194,80,80,.2);
}
.p0a-wchip button {
  border: 0; background: transparent; color: #f53f3f; cursor: pointer;
  font-size: 13px; line-height: 1; padding: 0 2px;
}
.p0a-wchip button:hover { color: #8a3a3a; }

.p0a-neg-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.p0a-neg-btn {
  padding: 7px 14px; border-radius: 8px; border: 0; cursor: pointer;
  font-size: 13px; font-weight: 600;
}
.p0a-neg-btn-primary { background: linear-gradient(90deg,#38BDF8,#38BDF8); color: #fff; }
.p0a-neg-btn-ghost { background: #e6f4ff; color: #1d2129; }
.p0a-neg-btn-ghost:hover { background: #DFEBF9; }
.p0a-neg-btn-warn { background: #ffece8; color: #f53f3f; }

.p0a-redline {
  margin-top: 16px; padding: 12px 14px; font-size: 13px; color: #ff7d00;
  background: #FFF7E8; border-left: 3px solid #E0B86A; border-radius: 8px;
  line-height: 1.8;
}
.p0a-redline b { color: #ff7d00; }

/* 命中提示浮层（浅黄） */
.p0a-hit-pop {
  position: absolute; z-index: 9999; max-width: 320px;
  background: #FFF7E8; border: 1px solid #E8D49A; border-left: 3px solid #E0B86A;
  color: #ff7d00; padding: 8px 12px; border-radius: 8px;
  font-size: 13px; line-height: 1.5;
  box-shadow: 0 8px 22px rgba(150,120,50,.18);
  pointer-events: none; opacity: 0; transition: opacity .18s;
}
.p0a-hit-pop.show { opacity: 1; }
.p0a-hit-pop b { color: #B07A2A; }
