/* ============================================================
   设计系统 "Meridian" · 跨境运营指挥台
   所有组件类名以 ds- 前缀。新代码用 ds- 类名，禁止内联样式。
   直译：深海蓝(petrol)底盘 + 黄铜金(brass)签名色 + 冷纸working面 + 表格数字对齐。
   ============================================================ */

:root {
  /* —— 语义色（沿用原变量名，值升级为 Meridian 调性）—— */
  --primary: #123240;      /* 深海蓝：导航/标题/主按钮 */
  --primary-700: #0C232D;  /* 更深 */
  --accent: #C7473C;       /* 精炼朱红：危险/错误 */
  --success: #1F8A5B;      /* 松绿 */
  --warning: #C0892F;      /* 琥珀 */
  --danger: #C23A30;
  --bg: #EEF1F4;           /* 冷纸画布 */
  --card-bg: #FFFFFF;
  --text: #17202A;
  --muted: #66717E;
  --border: #E3E7EC;
  --hover: #F5F7F9;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 60px;        /* 顶栏高度：粘性表头 top 偏移与之对齐 */

  /* —— 签名色：黄铜金 —— */
  --gold: #C0894A;
  --gold-2: #A9712F;
  --gold-soft: #EBD9BC;

  /* —— 阴影层次 —— */
  --shadow-sm: 0 1px 2px rgba(18,50,64,.05), 0 1px 3px rgba(18,50,64,.05);
  --shadow-md: 0 6px 22px rgba(18,50,64,.07), 0 1px 3px rgba(18,50,64,.05);
  --shadow-lg: 0 24px 60px rgba(10,32,42,.24);

  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui,
    -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 冷纸画布 + 极淡的深海光晕，制造纵深 */
  background:
    radial-gradient(1200px 520px at 88% -8%, rgba(18,50,64,.06), transparent 60%),
    radial-gradient(900px 480px at -10% 8%, rgba(192,137,74,.05), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

::selection { background: var(--gold-soft); color: var(--primary-700); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 3px; }

/* 通用微标签（eyebrow）：大写宽字距小标签，是本系统的排版签名之一 */
.ds-eyebrow {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

/* ---------- 导航栏 ---------- */
.ds-navbar {
  display: flex;
  align-items: center;
  gap: .5em;
  background: linear-gradient(180deg, #163948 0%, var(--primary) 55%, var(--primary-700) 100%);
  color: #fff;
  padding: 0 1.6em;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 8px 24px rgba(10,32,42,.16);
}
.ds-navbar-brand {
  display: flex; align-items: center; gap: .6em;
  font-size: 17px; font-weight: 700; letter-spacing: .01em;
  margin-right: 1.8em; color: #fff;
}
.ds-navbar-brand::before {
  content: ""; width: 12px; height: 12px; flex: none;
  border-radius: 3px; transform: rotate(45deg);
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 0 0 3px rgba(192,137,74,.18);
}
.ds-navbar-menu { display: flex; gap: .25em; flex: 1; }
.ds-navbar-menu a {
  position: relative;
  color: rgba(255,255,255,.68);
  text-decoration: none;
  padding: .55em .95em;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: color .18s, background .18s;
}
.ds-navbar-menu a:hover { color: #fff; background: rgba(255,255,255,.08); }
.ds-navbar-menu a.active { color: #fff; }
/* 签名：激活项下方黄铜金"子午线"指示 */
.ds-navbar-menu a.active::after {
  content: ""; position: absolute; left: .95em; right: .95em; bottom: -18px; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  border-radius: 2px 2px 0 0;
  box-shadow: 0 0 10px rgba(192,137,74,.5);
}
.ds-navbar-user { font-size: 13px; color: rgba(255,255,255,.82); display: flex; align-items: center; }
.ds-navbar-user a { color: rgba(255,255,255,.7); text-decoration: none; }
.ds-navbar-user a:hover { color: #fff; }

/* ---------- 主内容 ---------- */
.ds-main { padding: 1.8em 1.6em; max-width: 1440px; margin: 0 auto; }

/* ---------- 卡片 ---------- */
.ds-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3em 1.5em;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.1em;
}
.ds-card-title {
  display: flex; align-items: center; gap: .55em;
  font-size: 15.5px; font-weight: 700; letter-spacing: .01em;
  margin-bottom: 1em; padding-bottom: .7em;
  border-bottom: 1px solid var(--border);
}
/* 签名：标题前的黄铜金短竖标 */
.ds-card-title::before {
  content: ""; width: 3px; height: 15px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
}

/* ---------- 按钮 ---------- */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  padding: .6em 1.3em; border: 1px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14px; font-weight: 600; font-family: inherit;
  transition: transform .12s, box-shadow .18s, background .18s, border-color .18s;
}
.ds-btn:active { transform: translateY(1px); }
.ds-btn-primary {
  background: linear-gradient(180deg, #1a4152, var(--primary));
  color: #fff; box-shadow: 0 2px 8px rgba(18,50,64,.22);
}
.ds-btn-primary:hover { box-shadow: 0 6px 18px rgba(18,50,64,.28); }
.ds-btn-danger { background: var(--accent); color: #fff; }
.ds-btn-danger:hover { filter: brightness(.95); }
.ds-btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.ds-btn-outline:hover { border-color: var(--gold); color: var(--primary); }
.ds-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 表格 ---------- */
.ds-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ds-table th {
  /* top:0 —— 这些表格都套在 overflow-x:auto 容器里，粘性表头吸附的是该容器而非视口。
     若用 top:60px（清顶栏用），会在滚动=0 时被强行下推 60px≈一行，插进数据里（表头与数据重合）。
     容器内不需要清顶栏，故 top:0：表头稳定停在表格顶部，不产生位移。 */
  position: sticky; top: 0; z-index: 5;
  background: #F3F5F7;
  text-align: left; padding: .75em .85em;
  font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
  /* 分隔线用 inset 阴影（随表头一起移动），避免 border-collapse 下滚动时下边框脱离 */
  box-shadow: inset 0 -1px 0 var(--border);
}
.ds-table td {
  padding: .68em .85em; border-bottom: 1px solid var(--border);
  font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 文字型表格（说明/指标定义这类长句），关掉为数据报表设的 nowrap+省略号。
   报表页的数字列仍走默认样式，不受影响。 */
.ds-table.ds-table-text td {
  white-space: normal; overflow: visible; text-overflow: clip;
  line-height: 1.75; vertical-align: top; padding: .72em .85em;
}
.ds-table.ds-table-text th { white-space: normal; vertical-align: bottom; }
/* 单元格内的补充说明，另起一行走小字灰色 */
.ds-cell-sub {
  display: block; margin-top: .25em;
  font-size: 11.5px; line-height: 1.65; color: var(--muted, #888);
}
.ds-table tbody tr { transition: background .12s; }
.ds-table tbody tr:hover { background: #FBFAF6; }
.ds-num { text-align: right; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
/* 多张小表同页时(如报表分析六层)关闭 sticky，避免表头浮动串位 */
.ds-table--nostick th { position: static; top: auto; }

/* ---------- 列宽拖拽把手 ---------- */
.col-resize-handle {
  position: absolute; right: 0; top: 0; width: 5px; height: 100%;
  cursor: col-resize; background: transparent; transition: background .15s;
}
.col-resize-handle:hover { background: rgba(192,137,74,.35); }

/* ---------- 输入清空按钮 ---------- */
.inp-clear-wrap { position: relative; display: inline-flex; align-items: center; }
.inp-clear-btn {
  position: absolute; right: 8px; background: none; border: none;
  color: #b3b9c0; cursor: pointer; font-size: 16px; line-height: 1; display: none;
}
.inp-clear-btn:hover { color: var(--muted); }
.inp-clear-wrap input:not(:placeholder-shown) + .inp-clear-btn { display: block; }

/* ---------- 徽章 ---------- */
.ds-badge {
  display: inline-flex; align-items: center; gap: .3em;
  padding: .2em .65em; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  border: 1px solid transparent;
}
.ds-badge-success { background: #E8F5EE; color: var(--success); border-color: #CDE9DA; }
.ds-badge-warning { background: #FBF0DC; color: #9A6B14; border-color: #F0DDB8; }
.ds-badge-danger  { background: #FBECEA; color: var(--danger); border-color: #F3D3CE; }

/* ---------- Toast ---------- */
.ds-toast {
  position: fixed; top: 74px; right: 1.6em;
  background: var(--primary-700); color: #fff;
  padding: .8em 1.3em; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); z-index: 9999;
  border-left: 3px solid var(--gold);
  animation: slideIn .32s cubic-bezier(.2,.8,.2,1);
}
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } }

/* ---------- 表单控件 ---------- */
.ds-input, .ds-select {
  padding: 0 .8em; height: 38px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.ds-input:focus, .ds-select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(192,137,74,.15);
}
.ds-field { display: flex; flex-direction: column; }
.ds-label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .35em; font-weight: 700; }
.ds-filter-bar {
  display: flex; flex-wrap: wrap; gap: .9em; align-items: flex-end;
  margin-bottom: 1.2em; padding-bottom: 1.2em; border-bottom: 1px dashed var(--border);
}

/* ---------- 汇总条（升级为金属徽记风） ---------- */
.ds-summary { display: flex; flex-wrap: wrap; gap: .7em; margin: 0 0 1.1em; }
.ds-summary span {
  display: inline-flex; align-items: baseline; gap: .5em;
  background: linear-gradient(180deg, #fff, #FAFBFC);
  border: 1px solid var(--border); border-radius: 999px;
  padding: .45em 1em; font-size: 12.5px; color: var(--muted);
}
.ds-summary b { color: var(--primary); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ds-loading, .ds-empty { text-align: center; color: var(--muted); padding: 3em 0; font-size: 13px; }
.ds-loading::before {
  content: ""; display: block; width: 22px; height: 22px; margin: 0 auto .8em;
  border: 2px solid var(--border); border-top-color: var(--gold); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- KPI 统计瓦片（工作台签名元素） ---------- */
.ds-kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1em; margin-bottom: .2em;
}
.ds-kpi {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #fff, #FBFCFD);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25em 1.35em 1.35em; box-shadow: var(--shadow-sm);
  transition: transform .16s, box-shadow .16s;
}
.ds-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
/* 签名：瓦片顶部黄铜金"子午线"，可按指标改色 */
.ds-kpi::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
}
.ds-kpi--profit::before { background: linear-gradient(90deg, #2AA06B, var(--success)); }
.ds-kpi--ad::before { background: linear-gradient(90deg, #DBA43F, var(--warning)); }
.ds-kpi--stock::before { background: linear-gradient(90deg, #D6564B, var(--danger)); }
.ds-kpi-value {
  font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--primary-700);
  margin: .3em 0 .25em; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.ds-kpi-delta { font-size: 12px; display: flex; align-items: center; gap: .5em; flex-wrap: wrap; }

/* ---------- 登录页（全屏 · 子午线光环签名） ---------- */
.ds-login {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow: hidden;
  background:
    radial-gradient(1200px 620px at 22% -12%, #1c4a5c 0%, transparent 58%),
    radial-gradient(1000px 720px at 108% 112%, #0b222c 0%, transparent 55%),
    linear-gradient(155deg, #0c232d 0%, var(--primary) 58%, #0e2a37 100%);
}
/* 签名：从右上角发散的黄铜金同心"经线"环 */
.ds-login::before {
  content: ""; position: absolute; inset: -20%;
  background: repeating-radial-gradient(circle at 82% 14%,
    rgba(192,137,74,.10) 0 1px, transparent 1px 54px);
  -webkit-mask: radial-gradient(circle at 82% 14%, #000 0%, transparent 66%);
  mask: radial-gradient(circle at 82% 14%, #000 0%, transparent 66%);
  pointer-events: none;
}
.ds-login-card {
  position: relative; width: 380px; max-width: 92vw;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 18px; padding: 2.8em 2.4em 2.2em; text-align: center;
  box-shadow: var(--shadow-lg);
}
.ds-login-card::before {
  content: ""; position: absolute; top: 0; left: 26%; right: 26%; height: 3px;
  border-radius: 0 0 3px 3px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.ds-login-mark {
  width: 46px; height: 46px; margin: 0 auto 1.1em; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #163948, var(--primary-700));
  color: var(--gold); font-size: 22px; box-shadow: 0 8px 20px rgba(18,50,64,.28);
}
.ds-login-title { font-size: 21px; font-weight: 800; letter-spacing: .01em; color: var(--primary-700); margin: .5em 0 .3em; }
.ds-login-sub { color: var(--muted); font-size: 13px; margin-bottom: 1.9em; }
.ds-login-btn { width: 100%; height: 46px; font-size: 15px; }
.ds-login-hint { color: var(--accent); font-size: 12px; margin-top: 1em; min-height: 1.2em; }
.ds-login-foot {
  margin-top: 1.6em; padding-top: 1.2em; border-top: 1px solid var(--border);
  font-size: 11px; letter-spacing: .04em; color: #97a0aa;
}

/* ---------- 图片上传区 / 文本域（识别图片） ---------- */
.ds-upload {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 2.6em 1em; text-align: center; cursor: pointer; color: var(--muted);
  background: #FAFBFC; transition: border-color .15s, background .15s, color .15s;
}
.ds-upload:hover, .ds-upload.dragover { border-color: var(--gold); background: #FCFAF5; color: var(--primary); }
.ds-upload img { max-width: 100%; max-height: 340px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.ds-textarea {
  width: 100%; min-height: 300px; padding: 1em 1.1em;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 14px; line-height: 1.75; color: var(--text);
  background: #fff; resize: vertical;
}
.ds-textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(192,137,74,.15); }

/* ---------- 布局工具类 ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: .5em; }
.gap-md { gap: 1em; }
.gap-lg { gap: 1.5em; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1em; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1em; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1em; }

/* ---------- 通知演示模块 ---------- */
.ds-scene-sub { color: var(--muted); font-size: 13px; margin-top: .4em; max-width: 640px; }
.demo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.1em;
}
.demo-card {
  position: relative; overflow: hidden; margin-bottom: 0;
  display: flex; flex-direction: column;
  border-top: 3px solid var(--demo-accent, var(--gold));
  transition: transform .16s, box-shadow .16s;
}
.demo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.demo-card-head { display: flex; align-items: flex-start; gap: .7em; margin-bottom: .9em; }
.demo-icon {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: color-mix(in srgb, var(--demo-accent) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--demo-accent) 24%, transparent);
}
.demo-title { font-size: 15px; font-weight: 700; color: var(--primary-700); }
.demo-scene { font-size: 12.5px; color: var(--muted); margin-top: .2em; line-height: 1.5; }
.demo-preview {
  flex: 1; background: var(--hover); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .8em .9em; margin-bottom: 1em; font-size: 12.5px;
}
.demo-actions { display: flex; align-items: center; justify-content: space-between; gap: .6em; }
.demo-actions .demo-send { flex: none; }

/* 预览内构件（各模块长相不同） */
.demo-mini-table { width: 100%; border-collapse: collapse; }
.demo-mini-table td { padding: .3em 0; border-bottom: 1px dashed var(--border); color: var(--text); }
.demo-mini-table tr:last-child td { border-bottom: none; }
.demo-mini-table td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.demo-danger { color: var(--danger); }
.demo-warn { color: var(--warning); }
.demo-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4em; text-align: center; }
.demo-kpi span { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }
.demo-kpi b { font-size: 15px; color: var(--primary-700); font-variant-numeric: tabular-nums; }
.demo-acos { display: flex; align-items: center; gap: .5em; flex-wrap: wrap; font-weight: 700; }
.demo-acos-from { color: var(--muted); }
.demo-acos-arrow { color: var(--warning); }
.demo-acos-to { color: var(--danger); font-size: 17px; }
.demo-acos-spend { margin-left: auto; font-size: 11.5px; color: var(--danger); font-weight: 600; }
.demo-review .demo-stars { color: var(--warning); font-weight: 700; }
.demo-review .demo-stars span { color: var(--muted); font-weight: 400; font-size: 11.5px; margin-left: .4em; }
.demo-review .demo-quote { color: var(--text); margin-top: .4em; font-style: italic; line-height: 1.5; }
.demo-log {
  margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; color: #3b4a3f; white-space: pre-wrap; word-break: break-all; line-height: 1.6;
}

/* ============================================================
   左侧边栏 · 三段式布局（Meridian 侧栏）
   ============================================================ */
.ds-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 240px; z-index: 200;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #163948 0%, var(--primary) 46%, var(--primary-700) 100%);
  color: rgba(255,255,255,.72);
  box-shadow: 0 8px 30px rgba(10,32,42,.22);
  transition: width .25s ease, transform .25s ease;
}
body.sidebar-collapsed .ds-sidebar { width: 64px; }

.ds-sidebar-head {
  height: 60px; flex: none; display: flex; align-items: center; padding: 0 1.15em;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.ds-sidebar-brand {
  display: flex; align-items: center; gap: .65em;
  font-size: 16px; font-weight: 800; color: #fff; letter-spacing: .02em;
  white-space: nowrap; overflow: hidden;
}
.ds-sidebar-mark {
  width: 14px; height: 14px; flex: none; border-radius: 3px; transform: rotate(45deg);
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 0 0 3px rgba(192,137,74,.18);
}
.ds-sidebar-name { transition: opacity .2s; }
body.sidebar-collapsed .ds-sidebar-name { opacity: 0; }

.ds-sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: .6em .5em 1em; }
.ds-sidebar-nav::-webkit-scrollbar { width: 6px; }
.ds-sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }
.ds-sidebar-nav::-webkit-scrollbar-track { background: transparent; }

/* 通用菜单项（一级/分组头/二级共用骨架） */
.ds-nav-item {
  display: flex; align-items: center; gap: .7em; width: 100%;
  text-decoration: none; color: rgba(255,255,255,.72);
  border: 0; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 13.5px; text-align: left; padding: .62em .7em; border-radius: var(--radius-sm);
  transition: background .15s, color .15s; white-space: nowrap; margin-bottom: 1px;
}
.ds-nav-item:hover { color: #fff; background: rgba(255,255,255,.08); }
.ds-nav-icon { flex: none; width: 20px; text-align: center; font-size: 15px; }
.ds-nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; transition: opacity .2s; }
.ds-nav-caret { flex: none; opacity: .55; font-size: 15px; transition: transform .22s; }
.ds-nav-group.open > .ds-nav-grouphead .ds-nav-caret { transform: rotate(90deg); }
.ds-nav-grouphead.active-parent { color: #fff; }

/* 二级子菜单：手风琴展开 */
.ds-nav-sub { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.ds-nav-group.open > .ds-nav-sub { max-height: 520px; }
.ds-nav-leaf { padding-left: 2.35em; font-size: 13px; color: rgba(255,255,255,.6); }
.ds-nav-leaf:hover { color: #fff; }
.ds-nav-dot { flex: none; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .55; }
.ds-nav-soon {
  flex: none; font-size: 9.5px; letter-spacing: .04em; padding: .1em .4em; border-radius: 4px;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.5);
}

/* 激活态：黄铜金签名竖条 */
.ds-nav-item.active { color: #fff; background: rgba(192,137,74,.16); box-shadow: inset 3px 0 0 var(--gold); }

/* 折叠态（64px）：仅图标，二级改浮层 flyout */
body.sidebar-collapsed .ds-nav-label,
body.sidebar-collapsed .ds-nav-caret,
body.sidebar-collapsed .ds-nav-soon { opacity: 0; width: 0; overflow: hidden; }
body.sidebar-collapsed .ds-nav-item { justify-content: center; padding: .62em 0; gap: 0; }
body.sidebar-collapsed .ds-nav-leaf { padding-left: 0; }
body.sidebar-collapsed .ds-nav-group { position: relative; }
body.sidebar-collapsed .ds-nav-group > .ds-nav-sub {
  position: absolute; left: 100%; top: 0; width: 196px; max-height: none; overflow: visible;
  background: var(--primary-700); border-radius: 0 10px 10px 0; padding: .45em;
  box-shadow: var(--shadow-lg); display: none; z-index: 210;
}
body.sidebar-collapsed .ds-nav-group:hover > .ds-nav-sub { display: block; }
body.sidebar-collapsed .ds-nav-group:hover .ds-nav-leaf { justify-content: flex-start; padding: .55em .7em; gap: .6em; }
body.sidebar-collapsed .ds-nav-group:hover .ds-nav-sub .ds-nav-label { opacity: 1; width: auto; }
body.sidebar-collapsed .ds-nav-group:hover .ds-nav-sub .ds-nav-soon { opacity: 1; width: auto; }

/* 折叠/展开按钮 */
.ds-sidebar-collapse {
  flex: none; display: flex; align-items: center; gap: .6em; padding: .8em 1.2em;
  border: 0; border-top: 1px solid rgba(255,255,255,.07); background: transparent;
  color: rgba(255,255,255,.6); cursor: pointer; font-family: inherit; font-size: 12.5px;
  transition: background .15s, color .15s;
}
.ds-sidebar-collapse:hover { color: #fff; background: rgba(255,255,255,.06); }
.ds-collapse-icon { font-size: 15px; transition: transform .25s; }
body.sidebar-collapsed .ds-collapse-icon { transform: rotate(180deg); }
body.sidebar-collapsed .ds-collapse-text { display: none; }

/* 移动端抽屉遮罩 */
.ds-sidebar-scrim {
  position: fixed; inset: 0; z-index: 150; background: rgba(10,32,42,.45);
  opacity: 0; visibility: hidden; transition: opacity .25s;
}
body.sidebar-open .ds-sidebar-scrim { opacity: 1; visibility: visible; }

/* ---------- 右侧外壳 + 顶栏 ---------- */
.ds-shell { margin-left: 240px; min-height: 100vh; transition: margin-left .25s ease; }
body.sidebar-collapsed .ds-shell { margin-left: 64px; }
body.no-chrome .ds-shell { margin-left: 0; }

.ds-header {
  position: sticky; top: 0; z-index: 90; height: var(--header-h);
  display: flex; align-items: center; gap: 1em; padding: 0 1.4em;
  background: var(--card-bg);   /* 不透明：避免数据行透出与表头视觉重合 */
  border-bottom: 1px solid var(--border); box-shadow: 0 2px 10px rgba(18,50,64,.05);
}
.ds-header-burger { display: none; border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--primary); padding: .2em .3em; }
.ds-header-spacer { flex: 1; }
.ds-breadcrumb { display: flex; align-items: center; gap: .5em; font-size: 13.5px; color: var(--muted); overflow: hidden; }
.ds-crumb { white-space: nowrap; }
.ds-crumb-cur { color: var(--primary-700); font-weight: 700; }
.ds-crumb-sep { color: #c8ced4; }
/* 顶栏用户区改为浅底配色（覆盖旧的深色导航配色） */
.ds-header .ds-navbar-user { color: var(--muted); }
.ds-header .ds-navbar-user a { color: var(--muted); }
.ds-header .ds-navbar-user a:hover { color: var(--primary); }

/* ---------- 占位页 ---------- */
.ds-placeholder { text-align: center; padding: 4.5em 1em; }
.ds-placeholder-mark { font-size: 44px; line-height: 1; }
.ds-placeholder-title { font-size: 20px; color: var(--primary-700); margin: .5em 0 .3em; }
.ds-placeholder-sub { color: var(--muted); font-size: 13.5px; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .ds-main { padding: 1.2em 1em; }
  /* 侧栏在移动端改为抽屉式（off-canvas），忽略折叠态 */
  .ds-sidebar { transform: translateX(-100%); width: 240px; }
  body.sidebar-collapsed .ds-sidebar { width: 240px; }
  body.sidebar-open .ds-sidebar { transform: translateX(0); }
  body.sidebar-collapsed .ds-nav-label,
  body.sidebar-collapsed .ds-nav-caret,
  body.sidebar-collapsed .ds-nav-soon { opacity: 1; width: auto; }
  body.sidebar-collapsed .ds-nav-item { justify-content: flex-start; padding: .62em .7em; gap: .7em; }
  body.sidebar-collapsed .ds-nav-leaf { padding-left: 2.35em; }
  .ds-shell, body.sidebar-collapsed .ds-shell { margin-left: 0; }
  .ds-header-burger { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Listing 生成器 ---------- */
.ls-tabs { display: flex; gap: .4em; border-bottom: 1px solid var(--border); margin-bottom: 1.4em; }
.ls-tab {
  padding: .7em 1.4em; cursor: pointer; font-size: 13.5px; font-weight: 700;
  color: var(--muted); border: 1px solid transparent; border-bottom: none;
  border-radius: 8px 8px 0 0; margin-bottom: -1px; background: none;
}
.ls-tab:hover { color: var(--ink, #1A1D21); }
.ls-tab.active {
  color: var(--ink, #1A1D21); background: #fff;
  border-color: var(--border); border-bottom: 1px solid #fff;
}

/* 新规倒计时横幅 */
.ls-alert {
  display: flex; align-items: center; gap: .8em; flex-wrap: wrap;
  padding: .8em 1.1em; border-radius: 8px; margin-bottom: 1.2em;
  background: #FFF7ED; border: 1px solid #FDBA74; color: #9A3412; font-size: 13px;
}
.ls-alert-num { font-weight: 800; font-size: 17px; }
.ls-alert--past { background: #FEF2F2; border-color: #FCA5A5; color: #991B1B; }

/* 进度条 */
.ls-progress { height: 7px; background: #EEF1F4; border-radius: 999px; overflow: hidden; margin: .7em 0 .5em; }
.ls-progress-bar { height: 100%; background: linear-gradient(90deg, #2563EB, #60A5FA); transition: width .4s ease; }
.ls-progress-msg { font-size: 12.5px; color: var(--muted); }

/* 字符计数器 */
.ls-counter { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ls-counter.over { color: #DC2626; }
.ls-counter.ok { color: #059669; }

/* 结果字段块 */
.ls-out { border: 1px solid var(--border); border-radius: 8px; padding: .9em 1em; margin-bottom: 1em; background: #FCFDFE; }
.ls-out-head { display: flex; align-items: center; gap: .7em; margin-bottom: .5em; flex-wrap: wrap; }
.ls-out-label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ls-out-body { font-size: 13.5px; line-height: 1.65; word-break: break-word; white-space: pre-wrap; }
.ls-out-body.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* 旧标题 → 新标题 对比 */
.ls-diff-old { background: #FEF2F2; border-color: #FCA5A5; }
.ls-diff-new { background: #F0FDF4; border-color: #86EFAC; }

/* 违规提示 */
.ls-err { font-size: 12.5px; color: #DC2626; margin-top: .35em; }
.ls-warn { font-size: 12.5px; color: #B45309; margin-top: .35em; }
.ls-ok   { font-size: 12.5px; color: #15803D; margin-top: .35em; }

/* 标题新规修改报告正文：长报告，行距放宽、表格独立横向滚动，页面本身不横向滚 */
.ls-report { font-size: 13.5px; color: #333; }
.ls-report h2, .ls-report h3, .ls-report h4 { scroll-margin-top: 1em; }
.ls-report table.ds-table { min-width: 640px; }
.ls-report td, .ls-report th { vertical-align: top; }

/* 表格容器（宽表横向滚动，页面本身不横向滚） */
.ls-scroll { overflow-x: auto; }
.ls-scroll .ds-table { table-layout: auto; min-width: 720px; }

/* 取数摘要小徽记 */
.ls-ctx { display: flex; flex-wrap: wrap; gap: .5em; margin-bottom: 1em; }
.ls-ctx span {
  display: inline-flex; gap: .4em; align-items: baseline;
  background: #F3F5F7; border: 1px solid var(--border); border-radius: 999px;
  padding: .3em .85em; font-size: 12px; color: var(--muted);
}
.ls-ctx b { color: var(--ink, #1A1D21); font-variant-numeric: tabular-nums; }

/* ---------- Listing v2：diff / 词表 / 校验看板 ---------- */
.ls-sec { margin-bottom: 1.6em; }
.ls-sec-head { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .7em; display: flex; align-items: center; gap: .6em; flex-wrap: wrap; }

/* 逐条 diff */
.ls-bd { border: 1px solid var(--border); border-radius: 8px; margin-bottom: .8em; overflow: hidden; }
.ls-bd-head { display: flex; align-items: center; gap: .6em; padding: .5em .8em;
  background: #F3F5F7; border-bottom: 1px solid var(--border); font-size: 12px; flex-wrap: wrap; }
.ls-bd-idx { font-weight: 800; color: var(--muted); }
.ls-bd-row { padding: .6em .8em; font-size: 13px; line-height: 1.6; }
.ls-bd-row + .ls-bd-row { border-top: 1px dashed var(--border); }
.ls-bd-tag { font-size: 10px; font-weight: 800; letter-spacing: .05em; color: var(--muted);
  min-width: 2.2em; display: inline-block; }
.ls-bd-old { background: #FEF6F6; color: #7A2E2E; }
.ls-bd-new { background: #F4FDF7; }
.ls-bd-why { background: #FAFBFC; font-size: 12.5px; color: var(--muted); }

/* action 徽章 */
.ls-act { font-size: 10px; font-weight: 800; padding: .2em .6em; border-radius: 999px; letter-spacing: .04em; }
.ls-act-keep    { background: #EEF1F4; color: #56606B; }
.ls-act-edit    { background: #E0EDFF; color: #1D4ED8; }
.ls-act-replace { background: #FFE9D6; color: #9A3412; }
.ls-act-reorder { background: #EDE4FF; color: #6B21A8; }

/* 词徽记 */
.ls-kw { display: inline-block; font-size: 11px; padding: .16em .5em; border-radius: 4px;
  margin: .12em .2em .12em 0; font-family: ui-monospace, Menlo, monospace; }
.ls-kw-add { background: #DCFCE7; color: #14532D; }
.ls-kw-del { background: #FEE2E2; color: #7F1D1D; text-decoration: line-through; }

/* 场景词真伪表 */
.ls-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; }
@media (max-width: 760px) { .ls-two { grid-template-columns: 1fr; } }
.ls-wordbox { border: 1px solid var(--border); border-radius: 8px; padding: .8em; }
.ls-wordbox--use  { background: #F4FDF7; border-color: #86EFAC; }
.ls-wordbox--drop { background: #FEF6F6; border-color: #FCA5A5; }
.ls-wordrow { display: flex; justify-content: space-between; gap: .6em; font-size: 12.5px;
  padding: .3em 0; border-bottom: 1px dashed rgba(0,0,0,.06); }
.ls-wordrow:last-child { border-bottom: none; }
.ls-wordrow b { font-variant-numeric: tabular-nums; }

/* 校验看板 */
.ls-check { display: flex; align-items: center; gap: .5em; font-size: 12.5px; padding: .35em 0; }
.ls-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ls-dot-ok   { background: #10B981; }
.ls-dot-warn { background: #F59E0B; }
.ls-dot-bad  { background: #DC2626; }

/* CDQ 一票否决告警 */
.ls-veto { border: 1px solid #FCA5A5; background: #FEF2F2; border-radius: 8px;
  padding: .8em 1em; margin-bottom: 1em; }
.ls-veto-title { font-weight: 800; color: #991B1B; font-size: 13px; margin-bottom: .4em; }
.ls-veto li { font-size: 12.5px; color: #7F1D1D; margin-left: 1.1em; }

/* 数据新鲜度 */
.ls-fresh { font-size: 11.5px; padding: .2em .7em; border-radius: 999px; }
.ls-fresh-ok   { background: #ECFDF5; color: #065F46; }
.ls-fresh-warn { background: #FFFBEB; color: #92400E; }
.ls-fresh-bad  { background: #FEF2F2; color: #991B1B; }

/* ---------- Listing 结果：可折叠 + 可编辑 ---------- */
/* 用原生 details/summary：无需 JS、键盘可达、刷新不丢状态 */
.ls-fold { border: 1px solid var(--border); border-radius: 10px; background: #fff;
  margin-bottom: 1em; overflow: hidden; }
.ls-fold > summary {
  list-style: none; cursor: pointer; padding: .85em 1.1em;
  display: flex; align-items: center; gap: .7em; flex-wrap: wrap;
  font-weight: 700; font-size: 13.5px; background: #FAFBFC;
  border-bottom: 1px solid transparent; user-select: none;
}
.ls-fold > summary::-webkit-details-marker { display: none; }
.ls-fold > summary::before {
  content: '▸'; color: var(--muted); font-size: 11px; transition: transform .15s ease; flex: none;
}
.ls-fold[open] > summary::before { transform: rotate(90deg); }
.ls-fold[open] > summary { border-bottom-color: var(--border); }
.ls-fold > summary:hover { background: #F3F5F7; }
.ls-fold-body { padding: 1em 1.1em; }
.ls-fold-sub { font-weight: 400; font-size: 12px; color: var(--muted); }
.ls-fold-right { margin-left: auto; display: flex; align-items: center; gap: .5em; }

/* 编辑区 */
.ls-edit { width: 100%; border: 1px solid var(--border); border-radius: 6px;
  padding: .6em .7em; font-size: 13.5px; line-height: 1.6; font-family: inherit;
  background: #fff; resize: vertical; }
.ls-edit:focus { outline: none; border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.ls-edit.over { border-color: #DC2626; background: #FEF6F6; }
.ls-edit.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.ls-edit-row { margin-bottom: 1em; }
.ls-edit-head { display: flex; align-items: center; gap: .6em; margin-bottom: .35em; flex-wrap: wrap; }
.ls-edit-label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; }
.ls-edit-hint { font-size: 11.5px; color: var(--muted); }

/* 编辑操作条（吸底，改完随手就能存） */
.ls-bar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center;
  gap: .7em; flex-wrap: wrap; padding: .8em 1.1em; margin: 0 -1.1em -1em;
  background: rgba(255,255,255,.96); border-top: 1px solid var(--border);
  backdrop-filter: blur(6px); }
.ls-bar-state { font-size: 12.5px; color: var(--muted); margin-right: auto; }
.ls-dirty { color: #B45309; font-weight: 700; }

/* ---------- 图片生成器（image_gen） ---------- */
/* 参考图缩略图 */
.ig-thumbs { display: flex; flex-wrap: wrap; gap: .6em; margin-top: .6em; }
.ig-thumb { position: relative; width: 88px; height: 88px; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; background: #FAFBFC; }
.ig-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-thumb-x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; line-height: 18px;
  border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; cursor: pointer;
  font-size: 11px; padding: 0; }
.ig-thumb-x:hover { background: #DC2626; }

/* 主控/十要素键值行 */
.ig-kv { display: flex; gap: .7em; padding: .32em 0; font-size: 13px; line-height: 1.6;
  border-bottom: 1px dashed rgba(0,0,0,.05); }
.ig-kv:last-child { border-bottom: none; }
.ig-k { flex: 0 0 5.2em; color: var(--muted); font-weight: 700; font-size: 12px; }

/* 芯片 */
.ig-chip { display: inline-block; font-size: 12px; padding: .18em .6em; margin: .12em .25em .12em 0;
  border-radius: 999px; background: #F1F5F9; color: #334155; }
.ig-chip-res { background: #FEF3C7; color: #92400E; }

/* 英文提示词块 */
.ig-prompt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  line-height: 1.6; background: #0F172A; color: #E2E8F0; border-radius: 8px; padding: .7em .8em;
  white-space: pre-wrap; word-break: break-word; }
.ig-pre { font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
  color: var(--text, #1f2937); margin: 0; font-family: inherit; }

/* 桶位分区 + 标签 */
.ig-bucket { margin-bottom: 1.2em; }
.ig-btag { display: inline-block; font-size: 11px; font-weight: 700; padding: .16em .6em;
  border-radius: 6px; background: #E2E8F0; color: #334155; }
.ig-btag-main  { background: #DCFCE7; color: #14532D; }
.ig-btag-aux   { background: #DBEAFE; color: #1E3A8A; }
.ig-btag-aplus { background: #EDE4FF; color: #6B21A8; }

/* 生图槽位（二期）：状态条 + 成品预览 */
.ig-render { margin-top: .8em; padding-top: .7em; border-top: 1px dashed var(--border); }
.ig-genbar { display: flex; align-items: center; gap: .6em; flex-wrap: wrap; }
.ig-shot { display: block; margin-top: .7em; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: #FAFBFC; max-width: 420px; }
.ig-shot img { width: 100%; height: auto; display: block; }
.ig-shot:hover { border-color: #2563EB; }

/* 生图像素级实测徽章 */
.ig-hard { display: flex; gap: .4em; flex-wrap: wrap; margin-top: .5em; }

/* 图片生成器：表单草稿恢复提示条 */
.ig-draft { display: flex; align-items: center; gap: .7em; flex-wrap: wrap;
  background: #F0FDF4; border: 1px solid #86EFAC; border-radius: 8px;
  padding: .55em .9em; margin-bottom: 1em; font-size: 12.5px; color: #14532D; }
.ig-draft-note { color: #65758B; font-size: 11.5px; }

/* 品牌调性色块 */
.ig-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px;
  border: 1px solid rgba(0,0,0,.15); margin-right: .35em; vertical-align: -1px; }

/* 成品图：桌面/移动双版并排 */
.ig-shots { display: flex; gap: .6em; flex-wrap: wrap; margin-top: .7em; align-items: flex-start; }
.ig-shot { position: relative; display: block; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: #FAFBFC; max-width: 420px; }
.ig-shot img { width: 100%; height: auto; display: block; }
.ig-shot:hover { border-color: #2563EB; }
.ig-shot-tag { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.6); color: #fff;
  font-size: 11px; padding: .1em .5em; border-radius: 4px; }

/* ---------------------------------------------------------------------------
   点击式问号提示（选品中心表单与结果区用）
   为什么用点击而不是 hover：字段密集，hover 气泡会互相打断；且移动端没有 hover。
   --------------------------------------------------------------------------- */
.sel-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; margin-left: .3em; vertical-align: middle;
  border: 1px solid #c3c9d2; border-radius: 50%;
  font-size: 10px; line-height: 1; color: #8a94a2; cursor: pointer;
  user-select: none; flex: none; background: #fff; transition: all .12s;
}
.sel-help:hover { border-color: #1a73e8; color: #1a73e8; }
.sel-help.on { border-color: #1a73e8; color: #fff; background: #1a73e8; }
.sel-help-pop {
  position: absolute; z-index: 60; max-width: 300px;
  background: #21262d; color: #e6edf3; border-radius: 6px;
  padding: .6em .8em; font-size: 12px; line-height: 1.7; font-weight: 400;
  box-shadow: 0 6px 20px rgba(0,0,0,.28); white-space: normal; text-align: left;
}
.sel-help-pop b { color: #ffd479; }
.sel-help-pop::after {
  content: ''; position: absolute; top: -5px; left: 12px;
  border: 5px solid transparent; border-top: 0; border-bottom-color: #21262d;
}

/* ---------------------------------------------------------------------------
   宽表横向滚动（方案对比用）
   系统默认滚动条在 macOS 上会自动隐藏，宽表里用户根本不知道能拖 —— 这里强制常驻并加粗。
   首列 sticky：滚到最右边时还能看清这一行是哪个方案，否则几十列数字全无参照。
   --------------------------------------------------------------------------- */
.sel-hscroll {
  overflow-x: auto; overflow-y: visible; padding-bottom: 2px;
  scrollbar-width: auto; scrollbar-color: #aab3bf #eef1f4;   /* Firefox */
}
.sel-hscroll::-webkit-scrollbar { height: 18px; }
.sel-hscroll::-webkit-scrollbar-track { background: #eef1f4; border-radius: 9px; }
.sel-hscroll::-webkit-scrollbar-thumb {
  background: #98a2af; border-radius: 9px; border: 4px solid #eef1f4;
}
.sel-hscroll::-webkit-scrollbar-thumb:hover { background: #7d8794; }
/* 冻结首列。表头层级要高于数据列，否则横滚时数字会盖到表头上 */
.sel-hscroll table th:first-child,
.sel-hscroll table td:first-child {
  position: sticky; left: 0; background: #fff; z-index: 2;
  box-shadow: 1px 0 0 var(--border, #e5e7eb);
}
.sel-hscroll table thead th:first-child { z-index: 3; background: #FAFBFC; }

/* 方案对比这类多列宽表。
   🔴 两个关键点，少一个都会被压成省略号：
     ① width:max-content —— 让表格按内容自然撑开。只给 td 设 min-width 没用：
        table-layout:auto 下那只是建议，容器一窄浏览器照样压缩列宽。
     ② overflow:visible + text-overflow:clip —— 关掉全局 .ds-table td 的截断，
        否则压缩后的内容会被吃成「1…」「100.…」。
   表格撑宽后靠 .sel-hscroll 横向滚动来看，这才是宽表的正确姿势。 */
.ds-table-cmp { width: max-content; min-width: 100%; }
.ds-table-cmp th, .ds-table-cmp td {
  padding: .55em .6em; white-space: nowrap;
  overflow: visible; text-overflow: clip;
}
/* 品名例外：可能很长，仍然截断 + 悬停看全文 */
.ds-table-cmp td.cmp-prod { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================================
   工具类（utility classes）
   ----------------------------------------------------------------------------
   建于 2026-07-30，为落实 CLAUDE.md「禁止写 inline style」而设。
   项目本来就有工具类传统（.flex / .gap-md / .items-center / .grid-2…），这里是延续。

   🔴 为什么用字面色值而不是 var(--danger) 这些现有变量：
      业务页里在用的红是 #d93025（Google 红），而 --danger 是 #C23A30；
      灰用的是 #888，而 --muted 是 #66717E。两套值本来就不同。
      这次整改的定位是**把内联样式搬进 CSS，不是重设计**——界面刚经业务验收，
      像素必须零变化，所以照搬字面值。
      ⚠️ 两套色值统一是另一件事，要做得单独排期、单独验收，别混在搬家里做。
   ========================================================================== */

/* —— 文字颜色 —— */
.ds-t-body   { color: #333; }
.ds-t-label  { color: #555; }   /* 表单标签、次级正文 */
.ds-t-sub    { color: #666; }   /* 补充说明 */
.ds-t-muted  { color: #888; }   /* 最常用的弱化文字 */
.ds-t-hint   { color: #999; }   /* 更弱：脚注、单位 */
.ds-t-faint  { color: #aaa; }   /* 最弱：占位、禁用 */
.ds-t-danger { color: #d93025; } /* 必填标记、亏损、超限告警 */
.ds-t-warn   { color: #e8710a; } /* 橙：需注意但未越线 */

/* —— 字号 —— */
.ds-fs-11  { font-size: 11px; }
.ds-fs-115 { font-size: 11.5px; }
.ds-fs-12  { font-size: 12px; }
.ds-fs-125 { font-size: 12.5px; }
.ds-fs-13  { font-size: 13px; }
.ds-fs-135 { font-size: 13.5px; }
.ds-fs-14  { font-size: 14px; }
.ds-fs-17  { font-size: 17px; }

/* —— 字重 —— */
.ds-fw-400 { font-weight: 400; }
.ds-fw-700 { font-weight: 700; }

/* —— 布局 —— */
.ds-scroll-x { overflow-x: auto; }  /* 宽表容器，最常用 */
.ds-hide     { display: none; }
.ds-block    { display: block; }
.ds-nowrap   { white-space: nowrap; }
.ds-right    { text-align: right; }
.ds-center   { text-align: center; }

/* ============================================================================
   选品中心 · 组件类（sel- 前缀）
   建于 2026-07-30，把 select.js 里的结构性内联样式收拢过来。
   值全部照搬原内联，未做任何视觉调整。
   ========================================================================== */

/* —— 提示 / 说明块 —— */
.sel-tip {                       /* 蓝底左边框：重点提示 */
  background: #f0f6ff; border-left: 3px solid #1a73e8; border-radius: 4px;
  padding: .75em .95em;
}
.sel-formula {                   /* 灰底描边：公式与算法说明 */
  background: #FAFBFC; border: 1px solid var(--border, #e5e7eb); border-radius: 4px;
  padding: .65em .85em; line-height: 1.85;
}
.sel-note {                      /* 浅灰底：结论解读 */
  padding: .7em .9em; background: #f6f8fa; border-radius: 6px; line-height: 1.7;
}
.sel-chip {                      /* 小信息块 */
  background: #f6f8fa; border-radius: 6px; padding: .55em .75em;
}
.sel-decision {                  /* 蓝描边：三条决策线 */
  border: 1px solid #1a73e8; border-radius: 6px; padding: .6em .8em;
}
.sel-stat {                      /* 统计块，可伸缩 */
  flex: 1; min-width: 110px; background: #f6f8fa; border-radius: 6px; padding: .7em .9em;
}
.sel-item-card {                 /* 列表项卡片 */
  border: 1px solid #eee; border-radius: 8px; padding: 1em; margin-bottom: .9em;
}

/* —— 进度 / 评分条 —— */
.sel-bar {                       /* 评分条槽（18px） */
  flex: 1; background: #eef1f4; border-radius: 4px; height: 18px;
  overflow: hidden; min-width: 80px;
}
.sel-bar-sm {                    /* 细槽（11px） */
  flex: 1; min-width: 40px; background: #eef1f4; border-radius: 3px; height: 11px;
  overflow: hidden;
}
.sel-progress {                  /* 任务进度槽（8px） */
  background: #eee; border-radius: 6px; height: 8px; overflow: hidden;
}
.sel-progress-fill {             /* 进度填充，宽度由 JS 动态设置 */
  height: 100%; width: 0; background: #1a73e8; transition: width .4s;
}

/* —— 表格 / 布局 —— */
.sel-tabbar { gap: 0; border-bottom: 1px solid var(--border, #e5e7eb); }
.sel-subrow {                    /* 表格补充行：紧贴上一行，不要顶边框 */
  padding: .2em .8em .8em; border-top: none;
}
.sel-fold-warn {                 /* 黄色虚线折叠块：需注意的内容 */
  border: 1px dashed #f2a600; border-radius: 8px;
}

/* —— 图片 —— */
.sel-thumb    { width: 56px;  height: 56px;  object-fit: contain;
                border: 1px solid #eee; border-radius: 4px; }
.sel-thumb-lg { width: 110px; height: 110px; object-fit: contain;
                border: 1px solid #eee; border-radius: 6px; }

/* —— 间距刻度 ——
   命名 = 属性缩写 + 值×100（.ds-mt-80 → margin-top:.8em）。
   ⚠️ 这些值不是设计刻度，是从 select.js 现有内联样式**原样提取**的（.15em~1.4em 共 28 种）。
      归并成整齐的 4/8/12px 刻度会改变界面观感，而该界面刚经业务验收 —— 故保留原值。
      以后如要统一间距体系，那是一次独立的设计调整，需单独验收，别混进搬家里做。 */
.ds-mt-15  { margin-top: .15em; }
.ds-mt-25  { margin-top: .25em; }
.ds-mt-30  { margin-top: .3em; }
.ds-mt-35  { margin-top: .35em; }
.ds-mt-40  { margin-top: .4em; }
.ds-mt-50  { margin-top: .5em; }
.ds-mt-60  { margin-top: .6em; }
.ds-mt-70  { margin-top: .7em; }
.ds-mt-80  { margin-top: .8em; }
.ds-mt-90  { margin-top: .9em; }
.ds-mt-100 { margin-top: 1em; }
.ds-mt-110 { margin-top: 1.1em; }
.ds-mb-28  { margin-bottom: .28em; }
.ds-mb-40  { margin-bottom: .4em; }
.ds-mb-50  { margin-bottom: .5em; }
.ds-mb-55  { margin-bottom: .55em; }
.ds-mb-70  { margin-bottom: .7em; }
.ds-mb-80  { margin-bottom: .8em; }
.ds-mb-90  { margin-bottom: .9em; }
.ds-mb-100 { margin-bottom: 1em; }
.ds-mb-110 { margin-bottom: 1.1em; }
.ds-mb-120 { margin-bottom: 1.2em; }
.ds-mb-140 { margin-bottom: 1.4em; }
.ds-ml-25  { margin-left: .25em; }
.ds-ml-30  { margin-left: .3em; }
.ds-ml-50  { margin-left: .5em; }
.ds-ml-60  { margin-left: .6em; }
.ds-ml-80  { margin-left: .8em; }

/* —— 布局补充 ——
   项目已有 .flex/.flex-wrap/.items-center/.justify-between/.gap-sm(.5em)/.gap-md(1em)/.gap-lg(1.5em)，
   下面补的是它们没覆盖到的值。gap 同样按「值×100」编码，且照搬原值不做归并（理由同间距刻度）。 */
.ds-gap-35  { gap: .35em; }
.ds-gap-60  { gap: .6em; }
.ds-gap-70  { gap: .7em; }
.ds-gap-80  { gap: .8em; }
.ds-gap-90  { gap: .9em; }
.ds-gap-110 { gap: 1.1em; }
.ds-gap-120 { gap: 1.2em; }
.ds-items-start    { align-items: flex-start; }
.ds-items-end      { align-items: flex-end; }
.ds-items-stretch  { align-items: stretch; }
.ds-items-baseline { align-items: baseline; }
.ds-flex-1    { flex: 1; }
.ds-flex-none { flex: none; }
.ds-pointer   { cursor: pointer; }
.ds-lh-15 { line-height: 1.5; }
.ds-lh-16 { line-height: 1.6; }
.ds-lh-18 { line-height: 1.8; }
.ds-lh-19 { line-height: 1.9; }

/* —— 按钮尺寸变体（配合 .ds-btn 使用）—— */
.ds-btn-xxs { padding: .1em .5em; }
.ds-btn-xs  { padding: .15em .7em; }
.ds-btn-sm  { padding: .2em .8em; }

/* —— 选品中心：面板与勾选项 —— */
.sel-pane { padding: .9em 1.1em; }          /* 卡片内的一块内容区 */
.sel-chk  { padding: .15em 0; }             /* 勾选项 label 的行高留白 */

.ds-fw-600 { font-weight: 600; }
