/* ============================================================================
 * sp.css — 千川网页版自动调价 通用样式（单一真理源）
 * 蓝主色、强对比、大字号、非纯白背景。
 * 预览页与生产 styles.css 共用本文件（生产通过 @import 或合并引入）。
 *
 * 布局策略：整页自然滚动（左右栏不再固定高度/内部滚动），窗口大小自适应；
 * 窄屏（<=960px）左右栏自动堆叠为上下栏。
 * ==========================================================================*/

.sp-page {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  color: #1f2d3d;
  background: linear-gradient(160deg, #e8eefb 0%, #eef2f7 45%, #e6ecf5 100%);
  padding: 18px 22px 60px;
  min-height: 100vh;
  box-sizing: border-box;
  font-size: 15px;
}
.sp-page * { box-sizing: border-box; }

/* 顶部操作条 */
.sp-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.sp-actions .sp-title {
  font-size: 21px;
  font-weight: 800;
  margin-right: auto;
  color: #142238;
  letter-spacing: .5px;
}

/* 按钮 */
.sp-btn {
  border: 1px solid #c3d0e0;
  background: #ffffff;
  color: #22334c;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s ease;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(20,40,80,.08);
}
.sp-btn:hover { border-color: #2f7bff; color: #2f7bff; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(47,123,255,.18); }
.sp-btn.primary {
  background: linear-gradient(135deg, #3d86ff 0%, #2166ec 100%);
  border-color: #2166ec; color: #fff;
  box-shadow: 0 2px 8px rgba(47,123,255,.35);
}
.sp-btn.primary:hover { background: linear-gradient(135deg, #2f7bff 0%, #1a5ad4 100%); color: #fff; }
.sp-btn.ghost { background: transparent; box-shadow: none; }
.sp-btn.sm { padding: 6px 14px; font-size: 13px; border-radius: 7px; }
.sp-btn.danger { color: #e23a3a; border-color: #f0b4b4; }
.sp-btn.danger:hover { background: #ffecec; border-color: #e23a3a; color: #e23a3a; }
.sp-btn.warn { color: #d9820c; border-color: #f2cd97; }
.sp-btn.warn:hover { background: #fff7e8; border-color: #d9820c; color: #d9820c; }
.sp-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* 布局 —— 整页自然滚动，左右栏各自独立高度，不再固定等高/内部滚动 */
.sp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.sp-col { display: flex; flex-direction: column; gap: 10px; }
.sp-sep { height: 1px; background: linear-gradient(90deg, #d8e2f0, rgba(216,226,240,0)); margin: 16px 0; }

/* ── 整页左右栏：左选右开（在当前视图内各自滚动，不顶开页面） ── */
.sp-layout { display: flex; gap: 18px; align-items: stretch; height: 100%; min-height: 0; }
.sp-side {
  width: 330px; flex: none; display: flex; flex-direction: column; gap: 12px;
  height: 100%; min-height: 0; overflow-y: auto;
}
.sp-main { flex: 1; min-height: 0; overflow-y: auto; }
.sp-sidehead { margin: 0; font-size: 20px; font-weight: 800; color: #142238; display: flex; align-items: center; gap: 8px; }
.sp-sidehead .sp-count {
  font-size: 12px; font-weight: 700; color: #2f7bff; background: #e3edff;
  border-radius: 20px; padding: 2px 10px;
}
.sp-listbox {
  background: #fff;
  border: 1px solid #dce4ef; border-radius: 12px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 2px 10px rgba(20,40,80,.07);
}
.sp-listitem {
  padding: 13px 15px; border-radius: 9px; cursor: pointer;
  border: 1px solid #e8eef6; background: #fbfdff;
  transition: all .13s ease; border-left: 3px solid transparent;
}
.sp-listitem:hover { background: #f0f6ff; border-color: #d3e3fb; }
.sp-listitem.active {
  background: #e9f1ff; border-color: #2f7bff; border-left: 3px solid #2f7bff;
  box-shadow: 0 2px 8px rgba(47,123,255,.14);
}
.sp-itemname { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; color: #16243a; }
.sp-itemname .sp-name-text {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-itemname .sp-badge { flex: none; white-space: nowrap; }
.sp-itemmeta { font-size: 12px; color: #6b7a90; margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sp-itemmeta .sp-badge { white-space: nowrap; }
/* 左栏：组织下的账户子项（缩进一层，视觉上区分层级） */
.sp-listitem.sub {
  margin-left: 16px; padding: 9px 12px;
  background: #fff; border-left-color: #cfe0f8;
}
.sp-listitem.sub::before {
  content: "└"; color: #a9b8cc; font-size: 12px; margin-right: 4px;
}
.sp-listitem.sub .sp-itemname { font-size: 13.5px; font-weight: 600; }
.sp-listitem.sub .sp-name-text { white-space: normal; word-break: break-all; line-height: 1.45; }
.sp-listitem.sub .sp-itemmeta { margin-top: 4px; font-size: 11.5px; }
.sp-listitem.sub.active { border-left-color: #2f7bff; background: #e9f1ff; }
.sp-listitem.off { opacity: .62; }
.sp-listitem.off:hover { opacity: 1; }

/* 账户表格里可点击进计划的账户名 */
.sp-linkname { color: #2f7bff; cursor: pointer; }
.sp-linkname:hover { text-decoration: underline; }

/* 内嵌计划面板（合并页：账户设置 + 计划表同页） */
.sp-camphost { margin-top: 8px; }
.sp-camphost .sp-editorhead { padding: 10px 0; border-bottom: 1px solid #e8eef6; }
.sp-camphost .sp-editorhead h3 { font-size: 17px; margin: 0; }
.sp-camphost .sp-mainbody { padding: 14px 0 0; }

/* 模态对话框（替代原生 confirm / prompt / alert） */
/* 关键：空层必须 pointer-events:none，否则会拦截整页点击 */
.sp-modal-layer { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
.sp-modal-mask {
  position: absolute; inset: 0; background: rgba(15,28,48,.42);
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
  animation: spFade .12s ease;
}
@keyframes spFade { from { opacity: 0; } to { opacity: 1; } }
.sp-modal-box {
  width: 440px; max-width: calc(100vw - 40px);
  background: #fff; border-radius: 14px; padding: 22px 24px 18px;
  box-shadow: 0 18px 48px rgba(15,28,48,.28);
  animation: spPop .16s ease;
}
@keyframes spPop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.sp-modal-title { font-size: 16.5px; font-weight: 800; color: #16243a; margin-bottom: 10px; }
.sp-modal-msg { font-size: 14px; color: #46556b; line-height: 1.65; white-space: pre-wrap; word-break: break-all; }
.sp-modal-inputwrap { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.sp-modal-foot { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }

.sp-main {
  flex: 1; min-width: 0; background: #fff;
  border: 1px solid #dce4ef; border-radius: 12px; padding: 0 0 40px;
  box-shadow: 0 2px 10px rgba(20,40,80,.07);
  display: flex; flex-direction: column;
}
.sp-mainhint { color: #8a98ad; text-align: center; padding: 140px 20px; font-size: 15px; margin: auto; }
.sp-mainbody { padding: 28px 40px 48px; }
.sp-editorhead {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 28px; margin: 0;
  border-bottom: 1px solid #e8eef6;
  background: linear-gradient(180deg, #f7faff, #fff);
  position: sticky; top: 0; z-index: 5;
}
.sp-editorhead h3 { margin: 0; font-size: 18px; font-weight: 800; color: #142238; margin-right: auto; display: flex; align-items: center; gap: 10px; }
.sp-section {
  font-size: 16px; font-weight: 800; color: #142238;
  margin: 24px 0 12px; padding: 8px 14px; border-left: 4px solid #2f7bff;
  background: linear-gradient(90deg, #eef4ff, rgba(238,244,255,0));
  border-radius: 0 8px 8px 0;
}
.sp-sub { font-size: 14px; font-weight: 700; color: #2a3b52; margin: 14px 0 8px; }
.sp-doc { font-size: 13px; color: #6b7a90; line-height: 1.7; margin: 6px 0; }
.sp-doc b { color: #2f7bff; }
.sp-hint { font-size: 12px; color: #8492a6; line-height: 1.6; margin: 4px 0 10px; padding-left: 6px; border-left: 2px solid #dbe6ff; }
.sp-hint.warn { color: #d9820c; border-left-color: #ffd8a8; }
.sp-labeled { display: flex; flex-direction: column; gap: 7px; }
.sp-lbl { font-size: 13.5px; color: #44566e; font-weight: 700; margin-bottom: 5px; }

/* 徽标 */
.sp-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11.5px; font-weight: 700; line-height: 1.6; white-space: nowrap;
}
.sp-badge.blue { background: #e3edff; color: #2f7bff; }
.sp-badge.gray { background: #eef1f5; color: #6b7a90; }
.sp-badge.green { background: #e3f7e9; color: #1e9e50; }
.sp-badge.red { background: #ffecec; color: #e23a3a; }
.sp-badge.orange { background: #fff3e0; color: #d9820c; }

/* 表单控件 */
.sp-num, .sp-text, .sp-time, .sp-select, .sp-textarea {
  border: 1px solid #c3d0e0;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 14px;
  background: #fff;
  color: #1f2d3d;
  outline: none;
  transition: border-color .13s, box-shadow .13s;
  font-family: inherit;
}
.sp-num:focus, .sp-text:focus, .sp-time:focus, .sp-select:focus, .sp-textarea:focus {
  border-color: #2f7bff; box-shadow: 0 0 0 3px rgba(47,123,255,.14);
}
.sp-textarea { width: 100%; min-height: 110px; resize: vertical; font-size: 12.5px; line-height: 1.5; word-break: break-all; }
.sp-unit { font-size: 13px; color: #6b7a90; }
.sp-cb {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; cursor: pointer; color: #2a3b52; font-weight: 700;
  user-select: none;
}
.sp-cb.bold { font-weight: 800; color: #142238; }
.sp-cb input { width: 17px; height: 17px; cursor: pointer; accent-color: #2f7bff; }
.sp-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.sp-toggle .sp-toggle-track {
  width: 42px; height: 23px; border-radius: 20px; background: #cfd8e6;
  position: relative; transition: background .18s; flex: none;
}
.sp-toggle .sp-toggle-track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 19px; height: 19px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .18s;
}
.sp-toggle.on .sp-toggle-track { background: #2f7bff; }
.sp-toggle.on .sp-toggle-track::after { left: 21px; }
.sp-toggle:not(.on) { opacity: .85; }

/* 表格 */
.sp-tablewrap { overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(20,40,80,.07); }
.sp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sp-table th, .sp-table td { padding: 14px 20px; text-align: left; border-bottom: 1px solid #eef2f7; }
.sp-table th { background: #f3f7fc; color: #34465e; font-weight: 800; white-space: nowrap; }
.sp-table td { white-space: nowrap; }
.sp-table tr:hover td { background: #f7faff; }
.sp-table .sp-tag {
  display: inline-block; padding: 2px 9px; border-radius: 5px;
  font-size: 12px; background: #e8f0ff; color: #2f7bff; font-weight: 700;
}
.sp-table .sp-tag.builtin { background: #f0f2f5; color: #6b7a90; }
.sp-cellname { display: inline-block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }

/* 计划管理：名称+ID 两行、紧凑数字列 */
.sp-campname { min-width: 220px; }
.sp-campname .sp-campid { font-size: 11.5px; color: #8a98ad; margin-top: 2px; }
.sp-camptable th, .sp-camptable td { padding: 12px 16px; font-size: 14px; }
/* 列顺序对齐 701 桌面端：1启停 2计划 3商品ID 4类型 5策略 6状态 | 7预算 8计划ROI 9今日消耗
   10成交金额 11今日ROI 12今日净ROI 13订单数 14订单成本 15保本ROI 16佣金退货
   17近2h消耗 18近2hROI 19最新操作 20上次调价 21下次调价 */
.sp-camptable td:nth-child(n+7) { text-align: right; font-variant-numeric: tabular-nums; }
.sp-camptable td:nth-child(19) { text-align: left; }               /* 最新操作 */
.sp-camptable td:nth-child(20) { text-align: center; }             /* 上次调价 */
.sp-camptable td:nth-child(21) { text-align: center; }             /* 下次调价 */
.sp-camptable td:nth-child(4), .sp-camptable td:nth-child(6) { text-align: center; }  /* 类型 / 状态 */
.sp-cell-pid { font-size: 12.5px; color: #5b6b82; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-cell-time { font-variant-numeric: tabular-nums; color: #6b7a90; }
.sp-cell-dim { color: #b3bccb; }

/* v2026100303：调价计划表在当前页面框内滚动（不再整页长滚动），表头吸顶 */
.sp-campscroll { max-height: calc(100vh - 300px); min-height: 320px; overflow: auto; }
.sp-campscroll .sp-table thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 #dce4ef; }
/* v2026100303：调价计划表加表格线（行列边框清晰可见） */
.sp-camptable th, .sp-camptable td { border: 1px solid #e3eaf3; }
/* v2026100303：去掉多选/拖选后，行不再是"可点选"语义，恢复默认光标（右键复制仍可用） */
.sp-table.sp-camptable tbody tr { cursor: default; }

/* 总览统计卡 / 组织卡 */
/* v2026100601 #792：总览卡片恢复「正常宽度」——上一版 176px 上限偏小，改回 1fr 自适应铺满。 */
.sp-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 16px 0 22px; }
.sp-statcard {
  border: 1px solid #dce4ef; border-radius: 12px; padding: 20px 22px;
  background: linear-gradient(160deg, #fbfdff, #f2f7ff); box-shadow: 0 2px 8px rgba(20,40,80,.06);
}
.sp-statcard .sp-statval { font-size: 26px; font-weight: 800; color: #142238; }
.sp-statcard .sp-statval.c-blue { color: #2f7bff; }
.sp-statcard .sp-statval.c-green { color: #1e9e50; }
.sp-statcard .sp-statval.c-orange { color: #d9820c; }
.sp-statcard .sp-statlbl { font-size: 13px; color: #6b7a90; margin-top: 6px; font-weight: 700; }
.sp-orggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.sp-orgcard {
  border: 1px solid #dce4ef; border-radius: 12px; padding: 18px 20px; cursor: pointer;
  background: #fbfdff; transition: all .14s ease;
}
.sp-orgcard:hover { border-color: #2f7bff; box-shadow: 0 4px 14px rgba(47,123,255,.16); transform: translateY(-2px); }
.sp-orgcard .sp-orggoto { margin-top: 10px; font-size: 13px; color: #2f7bff; font-weight: 700; }

/* 空状态 */
.sp-empty { padding: 40px; text-align: center; color: #8a98ad; font-size: 15px; }
.sp-loading { padding: 40px; text-align: center; color: #8a98ad; }
.sp-error { padding: 24px; text-align: center; color: #e23a3a; }

/* 分组卡片（时间段 / 关键动作 / 账户信息块） */
.sp-grp {
  border: 1px solid #dce4ef; border-radius: 11px; padding: 16px 18px;
  background: #fbfdff; margin: 12px 0;
}
.sp-grptitle { font-size: 15px; font-weight: 800; color: #142238; margin-bottom: 10px; }
.sp-kv { display: flex; gap: 8px; font-size: 14px; margin: 7px 0; align-items: baseline; line-height: 1.6; }
.sp-kv .sp-kvkey { color: #6b7a90; flex: none; min-width: 104px; font-weight: 600; }
.sp-kv .sp-kvval { color: #22334c; font-weight: 700; word-break: break-all; }

/* Tab 切换（胶囊风格） */
.sp-tabbar {
  display: flex; gap: 6px; flex-wrap: wrap;
  background: #eef3fa; border-radius: 11px; padding: 5px;
  margin-bottom: 18px;
}
.sp-tab {
  padding: 8px 18px; cursor: pointer; font-size: 14px; font-weight: 700;
  color: #5a6b83; border: none; background: transparent;
  border-radius: 8px; transition: all .14s ease;
}
.sp-tab:hover { color: #2f7bff; background: rgba(47,123,255,.08); }
.sp-tab.active { color: #fff; background: linear-gradient(135deg, #3d86ff, #2166ec); box-shadow: 0 2px 6px rgba(47,123,255,.35); }
.sp-tabbody.active { display: block; }

/* 时间段卡片 / 参数卡片 */
.sp-segbox { display: flex; flex-direction: column; gap: 12px; }
.sp-segcard {
  border: 1px solid #dce4ef; border-radius: 11px; padding: 16px 18px;
  background: #fbfdff;
}
.sp-segtitle { font-weight: 800; color: #142238; margin-bottom: 8px; font-size: 15px; }
.sp-paramcard {
  border: 1px dashed #b9c8dc; border-radius: 11px; padding: 14px 16px;
  background: #f7faff; margin: 8px 0;
}
.sp-paramcard .sp-grptitle { font-size: 14px; }
.sp-wide { width: 100%; }

/* 提示横幅 */
.sp-banner {
  border: 1px solid #cfe0fb; background: linear-gradient(90deg, #eef4ff, #f8fbff);
  border-radius: 11px; padding: 14px 18px; margin-bottom: 14px;
  font-size: 13.5px; color: #44566e; line-height: 1.7;
}
.sp-banner b { color: #2f7bff; }

/* 下拉框：与系统原生 select 风格一致 */
.sp-select {
  min-height: 38px;
  height: 38px;
  padding: 0 32px 0 11px;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center / 12px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--txt);
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.sp-select::-ms-expand { display: none; }
.sp-select option { padding: 8px 12px; font-size: 14px; color: #1f2937; background: #fff; }
.sp-select:hover { border-color: var(--accent); }
.sp-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.12); outline: none; }

/* 复选框：统一加大、无边框默认样式 */
input[type="checkbox"].sp-cb-input,
.sp-table input[type="checkbox"],
.sp-cb input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px;
  border: 2px solid #c3d0e0; border-radius: 5px;
  background: #fff; cursor: pointer; position: relative; flex: none;
  transition: all .13s ease;
}
input[type="checkbox"].sp-cb-input:checked,
.sp-table input[type="checkbox"]:checked,
.sp-cb input[type="checkbox"]:checked {
  background: #2f7bff; border-color: #2f7bff;
}
input[type="checkbox"].sp-cb-input:checked::after,
.sp-table input[type="checkbox"]:checked::after,
.sp-cb input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="checkbox"].sp-cb-input:hover,
.sp-table input[type="checkbox"]:hover,
.sp-cb input[type="checkbox"]:hover { border-color: #2f7bff; }

/* 策略编辑器内边距（避免内容贴边） */
.sp-editor { padding: 0 40px 48px; }
.sp-editor .sp-editorhead { margin: 0 -40px; padding-left: 40px; padding-right: 40px; }
.sp-tabpane { padding-top: 6px; }

/* 账户名称完整显示 */
.sp-account-name { white-space: normal; word-break: break-all; line-height: 1.5; }

/* 表格行选中高亮 + 拖拽选择（计划表不显示选择框，改用整行高亮 + 左侧蓝条） */
.sp-table tbody tr { cursor: pointer; }
.sp-table tbody tr.selected td { background: #e9f1ff !important; }
.sp-table tbody tr.selected:hover td { background: #d8e7ff !important; }
.sp-table tbody tr:active td { background: #f0f6ff; }
.sp-camptable tbody input[type=checkbox] { display: none; }
.sp-camptable tbody td:first-child, .sp-camptable thead th:first-child {
  width: 6px; min-width: 6px; padding-left: 0; padding-right: 6px;
}
.sp-camptable tbody tr.selected td:first-child {
  background: #2f7bff !important; box-shadow: inset 0 0 0 1px #2f7bff;
}

/* 表格内嵌表头筛选 */
.sp-table thead th .sp-select {
  width: 100%; min-height: 32px; padding: 4px 22px 4px 6px;
  font-size: 13px; font-weight: 600; color: #16243a;
  background-position: right 6px center; background-size: 12px;
}

/* 右键菜单 */
.sp-contextmenu {
  position: absolute; background: #fff; border: 1px solid #dce4ef; border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15,28,48,.18); padding: 6px 0; min-width: 150px; z-index: 10000;
}
.sp-contextitem { padding: 9px 16px; font-size: 13.5px; color: #16243a; cursor: pointer; }
.sp-contextitem:hover { background: #f0f6ff; }

/* 更多徽标颜色（状态多样性） */
.sp-badge.yellow { background: #fff8e1; color: #c28e00; }
.sp-badge.purple { background: #f0e6ff; color: #8e44ad; }
.sp-badge.cyan { background: #e0f7fa; color: #00838f; }

/* ── 响应式：窄屏左右栏堆叠为上下栏，整页滚动 ── */
@media (max-width: 960px) {
  .sp-layout { flex-direction: column; }
  .sp-side { width: 100%; }
  .sp-mainbody { padding: 22px 16px 40px; }
  .sp-editorhead { padding: 14px 16px; }
  .sp-table th, .sp-table td { padding: 12px 12px; }
  .sp-camptable th, .sp-camptable td { padding: 10px 11px; }
}
/* 自动调价统一入口：顶部 Tab 切换 */
.sp-auto-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.sp-auto-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  background: #f5f7fb;
  border-bottom: 1px solid #e1e8f0;
  flex-shrink: 0;
}
.sp-auto-tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: #5a6a85;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: all 0.15s ease;
}
.sp-auto-tab:hover {
  background: rgba(47, 123, 255, 0.08);
  color: #2f7bff;
}
.sp-auto-tab.active {
  background: #fff;
  color: #2f7bff;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
  font-weight: 600;
}
.sp-auto-body {
  flex: 1;
  overflow-y: auto;
  background: #f5f7fb;
  min-height: 0;
}
/* 让子模块内部的白卡能正常滚动 */
.sp-auto-body .sp-page,
.sp-auto-body .sp-main {
  max-height: none;
}

/* 运行日志：筛选标签栏 */
.sp-logbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.sp-logtag {
  padding: 5px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: #fff; color: var(--txt-2); font-size: 12px; cursor: pointer;
  transition: all .13s ease;
}
.sp-logtag:hover { border-color: var(--accent); color: var(--accent); }
.sp-logtag.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.sp-logbar .sp-btn { margin-left: 4px; }


/* ── v20261003 团队隔离：归属标签 / 只读模式 ───────────────────── */
.sp-itemname .sp-tag {
  display: inline-block; padding: 1px 8px; border-radius: 5px;
  font-size: 11.5px; font-weight: 700; margin-left: 8px;
  background: #e8f0ff; color: #2f7bff;
}
.sp-itemname .sp-tag.builtin { background: #f0f2f5; color: #6b7a90; }
.sp-itemname .sp-tag.shared  { background: #eaf7ee; color: #1a9c53; }
.sp-itemname .sp-tag.ro      { background: #fff4e5; color: #d9820c; margin-left: 6px; }
.sp-ro-badge {
  display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 700; color: #d9820c;
  background: #fff7e8; border: 1px solid #f2cd97;
}
.sp-readonly-tip {
  margin: 8px 0 10px; padding: 8px 12px; border-radius: 8px;
  background: #fff7e8; border: 1px solid #f2cd97; border-left-width: 3px;
  color: #a2650a; font-size: 12.5px; line-height: 1.6;
}
.sp-editor.sp-locked .sp-editorhead h3::after {
  content: " \00b7 \53ea\8bfb"; font-size: 12px; font-weight: 700; color: #d9820c;
}

.sp-shared-tip {
  margin: 10px 0 0; padding: 8px 12px; border-radius: 8px;
  background: #eef4ff; border: 1px solid #c9dbff; border-left-width: 3px;
  color: #2f5bb7; font-size: 12.5px; line-height: 1.6;
}

/* ============================================================================
 * v2026100501 · 全局下拉框统一（与系统 .rdd 自绘圆角菜单同款）
 * 原生 select 被设成 opacity:0 + pointer-events:none 保留占位与数据源，
 * 可见外观由 .sp-selview 承担，弹层由 body 级 .sp-selmenu 承担（防被容器裁剪）。
 * ==========================================================================*/
.sp-selwrap { position: relative; display: inline-block; vertical-align: middle; }
.sp-selwrap > select { opacity: 0; pointer-events: none; -webkit-appearance: none; appearance: none; }
.sp-selview {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 0 26px 0 11px;
  background: var(--panel, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  color: var(--txt, #0f172a);
  font-size: 13px; line-height: 1;
  cursor: pointer; user-select: none; overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.sp-selview:hover { border-color: #93c5fd; box-shadow: 0 2px 8px rgba(37,99,235,.10); }
.sp-selwrap.open .sp-selview { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.sp-seltext { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-selcaret {
  flex: none; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid #94a3b8;
  transition: transform .15s;
}
.sp-selwrap.open .sp-selcaret { transform: rotate(180deg); }
/* 禁用态 */
.sp-selwrap.dis .sp-selview { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
.sp-selwrap.dis .sp-selview:hover { border-color: var(--line, #e2e8f0); box-shadow: none; }

.sp-selmenu {
  position: fixed; z-index: 10050;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15,23,42,.14);
  padding: 6px; max-height: 320px; overflow: auto;
  animation: spSelIn .12s ease;
}
@keyframes spSelIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.sp-selitem {
  padding: 7px 12px; border-radius: 8px;
  font-size: 13px; color: #334155; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp-selitem:hover { background: #eff6ff; color: #1d4ed8; }
.sp-selitem.on { background: #2563eb; color: #fff; font-weight: 600; }
.sp-selitem.dis { color: #cbd5e1; cursor: not-allowed; }
.sp-selitem.dis:hover { background: transparent; color: #cbd5e1; }

/* v2026102223：批量添加素材「列表视图」浅色表格 + 整行选中高亮 */
.am-mat-table { border-collapse: collapse; background: #fff; }
.am-mat-table th,
.am-mat-table td { padding: 9px 10px; border-bottom: 1px solid #eef1f5; }
.am-mat-table thead th { background: #f6f8fb; color: #5a6472; font-weight: 600; font-size: 12px; border-bottom: 2px solid #e6ebf2; }
.am-mat-table tbody tr.amrow { transition: background .12s ease; }
.am-mat-table tbody tr.amrow:nth-child(even) { background: #fafbfc; }
.am-mat-table tbody tr.amrow:hover { background: #eef4ff; }
/* 整行选中：浅蓝底 + 左侧色条，一眼可见 */
.am-mat-table tbody tr.amrow.on { background: #e3f0ff; }
.am-mat-table tbody tr.amrow.on td:first-child { box-shadow: inset 3px 0 0 #2f80ed; }
.am-mat-table tbody tr.amrow.on td { color: #1e40af; }
.am-mat-table tbody tr.amrow input[type=checkbox] { width: 16px; height: 16px; accent-color: #2f80ed; cursor: pointer; }
