/* ============================================================================
   CIGAUOO 工作台 · 界面预览 v5
   只读设计预览：不连接任何接口，不改仓库代码与数据。数字为示例数据。
   ========================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ink: #141417;
  --ink-2: #4e4e58;
  --ink-3: #6e6e79;
  --line: #e9e9ed;
  --line-2: #dcdce2;
  --surface: #ffffff;
  --wash: #f6f6f8;
  --wash-2: #fafafb;

  --accent: #1649f0;
  --accent-strong: #0f3ad2;
  --accent-wash: #e8eeff;

  --c-blue: #2e5bff;
  --c-indigo: #4b4df5;
  --c-violet: #7445f0;
  --c-teal: #0aa39a;
  --c-green: #0f9d5a;
  --c-amber: #d97706;
  --c-red: #d93a2b;
  --pos: #0b8a4b;
  --warn: #a55a00;
  --neg: #c9241a;

  --r-sheet: 12px;
  --r-ctl: 8px;
  --r-chip: 6px;
  --bar: 40px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
li { list-style: none; }
svg { display: block; }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

::selection { background: #dbe4ff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
button:focus:not(:focus-visible), input:focus:not(:focus-visible) { outline: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d8d8de; border: 3px solid #fff; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #c3c3cb; }

[hidden] { display: none !important; }

.num, .m-value, .f-value, .fr-num, .fr-rate, .s-num, .ad-meta, .tr-meta, .legend span,
.table-wrap td.num, .table-wrap th.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ── preview bar ──────────────────────────────────────────────────────── */
.preview-bar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--bar);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 14px;
  background: #141418;
  color: #a3a3ac;
  font-size: 12px;
  z-index: 100;
}
.pv-brand { display: flex; align-items: center; gap: 8px; color: #e9e9ee; white-space: nowrap; }
.pv-mark { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .16); }
.pv-slash { color: #55555f; }
.pv-sub { color: #a3a3ac; }
.pv-chip { font-size: 11px; padding: 1px 6px; border-radius: 5px; background: #26262c; color: #a3a3ac; }
.pv-tabs { display: flex; gap: 2px; margin-left: 8px; }
.pv-tab { height: 26px; padding: 0 11px; border-radius: 6px; color: #9797a1; font-size: 12px; transition: background .15s, color .15s; }
.pv-tab:hover { color: #fafafa; background: #222228; }
.pv-tab.is-active { background: #2c2c33; color: #fafafa; }
.pv-note { margin-left: auto; color: #74747e; white-space: nowrap; }

/* ── app shell ────────────────────────────────────────────────────────── */
.app {
  position: fixed;
  inset: var(--bar) 0 0 0;
  display: flex;
  overflow: hidden;
  background: #fff;
}
html[data-bare] .preview-bar { display: none; }
html[data-bare] .app { inset: 0 0 0 0; }

/* ── rail ─────────────────────────────────────────────────────────────── */
.rail {
  width: 236px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: #fafafb;
  border-right: 1px solid var(--line);
  padding: 14px 10px 10px;
}

.rail-brand { display: flex; align-items: center; gap: 9px; padding: 0 8px 14px; }
.rail-logo { width: 26px; height: 26px; border-radius: 7px; }
.rail-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.rail-brand-text strong { font-size: 13px; font-weight: 650; letter-spacing: .02em; }
.rail-brand-text span { font-size: 9.5px; letter-spacing: .08em; color: var(--ink-3); margin-top: 2px; }

.ws-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 9px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(15, 15, 20, .04);
  margin-bottom: 16px;
  transition: box-shadow .15s;
}
.ws-switch:hover { box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(15, 15, 20, .05); }
.ws-switch .ic { color: var(--ink-2); }
.ws-name { font-size: 12.5px; font-weight: 500; }
.ws-count { font-size: 11px; color: var(--ink-3); margin-left: auto; }
.ws-caret { width: 14px; height: 14px; color: var(--ink-3); }

.nav { flex: 1; overflow-y: auto; }
.nav-group { margin-bottom: 14px; }
.nav-label { font-size: 11.5px; color: #7b7b86; padding: 0 9px 5px; letter-spacing: .02em; }
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  color: var(--ink-2);
  font-size: 13px;
  text-align: left;
  transition: background .12s, color .12s;
}
.nav-item .ic { color: #7f8593; width: 15px; height: 15px; transition: color .12s; }
.nav-item[data-tone="blue"] .ic { color: #3f68f5; }
.nav-item[data-tone="indigo"] .ic { color: #5a5cf2; }
.nav-item[data-tone="violet"] .ic { color: #7f55f0; }
.nav-item[data-tone="teal"] .ic { color: #12aaa0; }
.nav-item[data-tone="amber"] .ic { color: #d08413; }
.nav-item[data-tone="slate"] .ic { color: #8a8a95; }
.nav-item:hover .ic { filter: saturate(1.15); }
.nav-item:hover { background: rgba(20, 20, 23, .05); color: var(--ink); }
.nav-item.is-active {
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(15, 15, 20, .05);
}
.nav-item.is-active[data-tone="blue"] { background: #e9efff; }
.nav-item.is-active[data-tone="indigo"] { background: #ececff; }
.nav-item.is-active[data-tone="violet"] { background: #f0ebff; }
.nav-item.is-active[data-tone="teal"] { background: #e6f7f5; }
.nav-item.is-active[data-tone="amber"] { background: #fdf2e0; }
.nav-item.is-active[data-tone="blue"] .ic { color: var(--c-blue); }
.nav-item.is-active[data-tone="indigo"] .ic { color: var(--c-indigo); }
.nav-item.is-active[data-tone="violet"] .ic { color: var(--c-violet); }
.nav-item.is-active[data-tone="teal"] .ic { color: var(--c-teal); }
.nav-item.is-active[data-tone="amber"] .ic { color: var(--c-amber); }
.nav-count {
  margin-left: auto;
  font-size: 10.5px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 99px;
  color: var(--ink-3);
  background: #ededf1;
  font-variant-numeric: tabular-nums;
}

.rail-foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.rail-sync { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); padding: 0 9px 8px; }
.rail-user { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: 8px; text-align: left; transition: background .12s; }
.rail-user:hover { background: rgba(20, 20, 23, .05); }
.rail-user-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.rail-user-text strong { font-size: 12px; font-weight: 550; }
.rail-user-text span { font-size: 10.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.rail-signout { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.rail-clock { font-size: 10.5px; color: #82828d; padding: 7px 9px 0; }
.sep { color: #c2c2cb; padding: 0 2px; }

.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: #141417; color: #fff; font-size: 11.5px; font-weight: 600;
  letter-spacing: .01em; flex: none;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10.5px; }

/* sidebar sub-nav: always open, no chevron */
.nav-sub { margin: 0 0 10px 17px; padding-left: 9px; border-left: 1px solid var(--line); }
.nav-subitem {
  position: relative; display: flex; align-items: center;
  width: 100%; height: 26px; padding: 0 8px; border-radius: 6px;
  font-size: 12.5px; color: var(--ink-3); text-align: left;
  transition: color .12s, background .12s;
}
.nav-subitem:hover { color: var(--ink); background: rgba(20, 20, 23, .04); }
.nav-subitem.is-active { color: var(--ink); font-weight: 500; }
body:not([data-view="ads"]) .nav-sub[data-group="ads"] .nav-subitem.is-active,
body:not([data-view="customers"]) .nav-sub[data-group="customers"] .nav-subitem.is-active { color: var(--ink-3); font-weight: 400; }
body:not([data-view="ads"]) .nav-sub[data-group="ads"] .nav-subitem.is-active::before,
body:not([data-view="customers"]) .nav-sub[data-group="customers"] .nav-subitem.is-active::before { display: none; }
.nav-subitem.is-active::before {
  content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px;
  width: 1.5px; border-radius: 2px; background: var(--accent);
}

/* ── main / toolbar ──────────────────────────────────────────────────── */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.toolbar {
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  z-index: 30;
}
.toolbar-title { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.toolbar-sub { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.scope-chip { font-size: 11px; font-weight: 400; color: var(--ink-3); padding: 2px 7px; border-radius: 99px; background: var(--wash); }

.search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 280px;
  height: 30px;
  padding: 0 8px 0 9px;
  margin-left: 10px;
  border-radius: 8px;
  background: #f4f4f6;
  color: var(--ink-3);
  font-size: 12.5px;
  transition: background .15s, box-shadow .15s;
}
.search:hover { background: #efeff2; }
.search .ic { width: 14px; height: 14px; }
.search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
kbd {
  margin-left: auto;
  font-family: var(--font);
  font-size: 10.5px;
  color: var(--ink-3);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
  line-height: 15px;
}

.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.seg { display: flex; padding: 2px; border-radius: 8px; background: #f4f4f6; }
.seg button {
  height: 26px; padding: 0 10px; border-radius: 6px; white-space: nowrap;
  font-size: 12px; color: var(--ink-3); transition: .12s;
}
.seg button:hover { color: var(--ink); }
.seg button.on {
  background: #fff; color: var(--ink); font-weight: 500;
  box-shadow: 0 0 0 1px var(--line), 0 1px 1px rgba(15, 15, 20, .05);
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 9px; border-radius: 8px;
  color: var(--ink-2); font-size: 12px;
  transition: background .12s;
}
.btn-ghost:hover { background: var(--wash); }
.btn-ghost .chev { width: 13px; height: 13px; color: var(--ink-3); }
.currency .cur-code { font-size: 11.5px; font-weight: 550; letter-spacing: .03em; }
.toolbar-sep { width: 1px; height: 16px; background: var(--line); margin: 0 2px; }
.sync { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.icon-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--ink-2); transition: background .12s; }
.icon-btn:hover { background: var(--wash); }
.icon-btn .ic { width: 15px; height: 15px; }

/* status dots */
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: none; background: var(--ink-3); }
.dot.ok { background: #1a9a5c; box-shadow: 0 0 0 2.5px rgba(26, 154, 92, .14); }
.dot.warn { background: #d08a12; box-shadow: 0 0 0 2.5px rgba(208, 138, 18, .14); }
.dot.danger { background: #d13b30; box-shadow: 0 0 0 2.5px rgba(209, 59, 48, .14); }
.dot.blue { background: var(--accent); box-shadow: 0 0 0 2.5px rgba(44, 92, 230, .14); }

/* ── content ─────────────────────────────────────────────────────────── */
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
.content { max-width: 1400px; margin: 0 auto; padding: 26px 32px 72px; }

.page-head { padding: 2px 0 24px; }
.dateline { font-size: 11.5px; color: var(--ink-3); letter-spacing: .01em; }
.lede {
  margin: 9px 0 12px;
  max-width: 960px;
  font-size: 30px;
  line-height: 1.34;
  font-weight: 600;
  letter-spacing: -.022em;
  color: var(--ink);
  text-wrap: balance;
}
.lede b { font-weight: 600; font-variant-numeric: tabular-nums; }
.lede .warn { color: var(--warn); }
.subline { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.st { display: inline-flex; align-items: center; gap: 6px; }
.st.quiet { color: var(--ink-3); }

/* metric ledger */
.topband {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ledger { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric { padding: 14px 16px 15px; border-left: 1px solid var(--line); min-width: 0; }
.metric:first-child { border-left: 0; padding-left: 0; }
.m-label { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.m-tag { font-size: 9.5px; letter-spacing: .04em; color: #8b8b96; background: #f1f1f4; border-radius: 3px; padding: 0 4px; line-height: 14px; }
.m-value { font-size: 25px; font-weight: 600; letter-spacing: -.024em; line-height: 1.2; margin-top: 5px; white-space: nowrap; }
.m-foot { font-size: 11px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delta { font-weight: 500; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--pos); }
.delta.down { color: var(--neg); }
.delta.flat { color: var(--ink-2); }

.spark { border-left: 1px solid var(--line); padding: 13px 16px 8px; display: flex; flex-direction: column; }
.spark-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px; color: var(--ink-2); }
.spark-avg { font-size: 10.5px; color: var(--ink-3); }
.spark-bars { width: 100%; height: 82px; margin-top: 6px; overflow: visible; }
.spark-bars .b { fill: #bccdff; }
.spark-bars .b.today { fill: var(--accent); }
.spark-bars .avg-line { stroke: #bcbcc6; stroke-width: 1; stroke-dasharray: 3 4; }
.spark-days { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 10px; color: #8a8a95; text-align: center; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* sections */
.section { padding-top: 26px; }
.section.tight { padding-top: 18px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.section-head .note { font-size: 11.5px; color: var(--ink-3); }
.section-head .actions { margin-left: auto; display: flex; gap: 8px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: stretch; }
.split.wide { grid-template-columns: minmax(0, 1fr) 300px; }
.adsview[hidden] { display: none; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sheet); }

/* funnel */
.funnel { padding: 8px 18px 12px; display: flex; flex-direction: column; }
.funnel-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 68px 58px; gap: 12px; align-items: center; padding: 10px 0; }
.fr-name { font-size: 12.5px; color: var(--ink-2); }
.fr-track { height: 28px; background: #f2f2f5; border-radius: 6px; overflow: hidden; }
.fr-track i { display: block; height: 100%; min-width: 6px; border-radius: 6px; background: #a3b8ff; transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.fr-num { font-size: 14px; font-weight: 600; text-align: right; letter-spacing: -.01em; }
.fr-rate { font-size: 11.5px; color: var(--ink-3); text-align: right; }
.funnel-row.weak .fr-name, .funnel-row.weak .fr-num { color: var(--warn); }
.funnel-row.weak .fr-track i { background: #f0bf72; }
.funnel-note {
  display: flex; align-items: center; gap: 7px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid #f1f1f4;
  font-size: 11.5px; color: var(--ink-3);
}
.link { color: var(--accent); font-size: 11.5px; font-weight: 500; padding: 0; }
.link:hover { text-decoration: underline; text-underline-offset: 2px; }

.leak { margin-top: auto; padding-top: 11px; border-top: 1px solid #f1f1f4; }
.leak-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; font-size: 11.5px; color: var(--ink-3); }
.leak-head b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.leak-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px 72px; gap: 10px; align-items: center; padding: 5.5px 0; font-size: 11.5px; color: var(--ink-2); border-top: 1px solid #f4f4f6; }
.leak-row:first-of-type { border-top: 0; }
.l-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-num { text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.l-amt { text-align: right; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

/* right rail */
.railpanel {
  background: var(--wash-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sheet);
  padding: 13px 14px;
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
}
.rp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rp-head h3 { font-size: 12.5px; font-weight: 600; letter-spacing: -.005em; }
.rp-count { font-size: 10.5px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; line-height: 16px; }
.rp-note { font-size: 10.5px; color: var(--ink-3); }
.todo li { display: flex; align-items: flex-start; gap: 9px; padding: 9px 0; border-top: 1px solid #ededf0; }
.todo li:first-child { border-top: 0; }
.todo li .dot { margin-top: 6px; }
.todo-body { min-width: 0; flex: 1; }
.todo-title { font-size: 12.5px; font-weight: 500; line-height: 1.4; }
.todo-meta { font-size: 10.5px; color: var(--ink-3); margin-top: 1px; }
.ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 11px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 12px; font-weight: 450; white-space: nowrap;
  transition: border-color .12s, background .12s, color .12s;
}
.ghost:hover { border-color: var(--line-2); background: #fbfbfc; color: var(--ink); }
.ghost.sm { height: 27px; font-size: 11.5px; padding: 0 9px; }
.ghost.xs { height: 23px; font-size: 11px; padding: 0 7px; border-radius: 6px; margin-top: 1px; }
.ghost.full { width: 100%; margin-top: 10px; }
.railpanel > .ghost.full { margin-top: auto; padding-top: 0; min-height: 27px; }
.ghost .ic { width: 13px; height: 13px; }
.rp-divider { height: 1px; background: #eaeaef; margin: 12px 0; }

.health li { display: flex; align-items: center; gap: 8px; padding: 4.5px 0; font-size: 11.5px; }
.h-name { color: var(--ink-2); width: 34px; flex: none; }
.h-meta { color: var(--ink-3); flex: 1; font-variant-numeric: tabular-nums; }

/* tables */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sheet); overflow: hidden; }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th {
  text-align: left; font-weight: 500; font-size: 11px; color: var(--ink-3);
  padding: 9px 12px; background: #fbfbfc; border-bottom: 1px solid var(--line);
  white-space: nowrap; letter-spacing: .01em;
}
table.data td { padding: 9px 12px; border-bottom: 1px solid #f2f2f5; white-space: nowrap; }
table.data th.num, table.data td.num { text-align: right; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .1s; }
table.data tbody tr:hover { background: #fafafc; }
table.data tfoot td { padding: 9px 12px; font-weight: 600; border-top: 1px solid var(--line); background: #fcfcfd; }
.ch-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c); display: inline-block; margin-right: 8px; }
table.data td:first-child { color: var(--ink); }
.th-sort { display: inline-flex; align-items: center; gap: 4px; }
.th-sort .ic { width: 11px; height: 11px; display: inline-block; }

.stores li { border-top: 1px solid #ededf0; }
.stores li:first-child { border-top: 0; }
.store-row { width: 100%; display: grid; grid-template-columns: 82px minmax(0, 1fr) 30px; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 6px; transition: background .12s; }
.store-row:hover { background: #fff; }
.s-name { font-size: 11.5px; color: var(--ink-2); text-align: left; overflow: hidden; text-overflow: ellipsis; }
.s-bar { height: 5px; background: #ececf0; border-radius: 3px; overflow: hidden; }
.s-bar i { display: block; height: 100%; background: #a3b8ff; border-radius: 3px; }
.store-row:hover .s-bar i { background: var(--accent); }
.s-num { font-size: 11.5px; color: var(--ink-2); text-align: right; }

/* facts */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 13px 0; }
.fact { padding: 0 18px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.f-label { font-size: 11.5px; color: var(--ink-3); }
.f-value { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin: 3px 0 1px; }
.f-unit { font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.f-foot { font-size: 10.5px; color: var(--ink-2); }

/* footnotes */
.footnotes { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 3px; max-width: 980px; }
.footnotes p { font-size: 10.5px; color: var(--ink-3); line-height: 1.6; }

/* ── ads page ────────────────────────────────────────────────────────── */
.subtabs { display: inline-flex; gap: 2px; background: #f4f4f6; padding: 3px; border-radius: 9px; }
.subtabs-item { height: 26px; padding: 0 12px; border-radius: 7px; font-size: 12px; color: var(--ink-2); transition: .12s; }
.subtabs-item:hover { color: var(--ink); }
.subtabs-item.is-active { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--line), 0 1px 1px rgba(15, 15, 20, .05); }

.filterbar { display: flex; align-items: center; gap: 8px; margin: 16px 0 18px; flex-wrap: wrap; }
.field {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 9px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff;
  font-size: 12px; color: var(--ink-2);
  transition: border-color .12s, box-shadow .12s;
}
.field:hover { border-color: var(--line-2); }
.field .ic { width: 13px; height: 13px; color: var(--ink-3); }
.field .chev { margin-left: 1px; }
.field-sub { color: var(--ink-3); font-size: 10.5px; padding-left: 6px; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.search-field { width: 236px; padding: 0 8px; }
.search-field input { border: 0; outline: 0; background: none; width: 100%; font-size: 12px; }
.search-field input::placeholder { color: var(--ink-3); }
.filterbar-spacer { flex: 1; }

.ledger.four { grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-sheet); overflow: hidden; }
.ledger.four .metric { padding: 13px 16px; }
.ledger.four .metric:first-child { padding-left: 16px; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 500;
  border: 1px solid var(--accent);
  transition: background .12s, box-shadow .12s;
}
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-primary .ic { width: 13px; height: 13px; }
.btn-primary.sm { height: 28px; font-size: 11.5px; padding: 0 10px; }
.btn-primary.full { width: 100%; margin-top: 12px; }

table.data.ads td { padding: 8px 12px; }
table.data.ads th { padding: 8px 12px; }
.ad-name { display: block; font-size: 12.5px; font-weight: 500; line-height: 1.3; }
.ad-meta { display: block; font-size: 10px; color: var(--ink-3); margin-top: 1px; }
.strong { font-weight: 600; }
.low { color: var(--neg); }
.pill { display: inline-block; font-size: 10.5px; line-height: 17px; padding: 0 7px; border-radius: 99px; }
.pill.ok { background: #dcf7e8; color: #0a6b3d; }
.pill.warn { background: #feefd7; color: var(--warn); }
.pill.muted { background: #f0f0f3; color: var(--ink-2); }
table.data.ads tbody tr.row-link { cursor: pointer; }
table.data.tasks { table-layout: fixed; }
table.data.tasks th:nth-child(1), table.data.tasks td:nth-child(1) { width: 32%; }
table.data.tasks th:nth-child(2), table.data.tasks td:nth-child(2) { width: 13%; }
table.data.tasks th:nth-child(3), table.data.tasks td:nth-child(3) { width: 12%; }
table.data.tasks th:nth-child(n+4), table.data.tasks td:nth-child(n+4) { width: 10.75%; }

.stackbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; margin: 8px 0 10px; }
.legend li { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-2); padding: 3.5px 0; }
.legend i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.legend span { margin-left: auto; color: var(--ink-3); font-size: 11px; }
.rp-text { font-size: 11.5px; color: var(--ink-2); line-height: 1.6; margin-bottom: 8px; }
.rp-text.quiet { font-size: 11px; color: var(--ink-3); display: flex; gap: 6px; align-items: flex-start; }
.rp-text.quiet .dot { margin-top: 5px; }

.chart-panel { padding: 16px 18px 14px; }
.week-chart { width: 100%; height: 190px; }
.week-chart .axis { stroke: #ededf0; stroke-width: 1; }
.week-chart .axis.faint { stroke: #f4f4f6; }
.week-chart .bars rect.rev { fill: #5878e8; }
.week-chart .bars rect.spend { fill: #9aa0ad; }
.week-chart .roas-line { fill: none; stroke: #141417; stroke-width: 1.5; stroke-linejoin: round; }
.week-chart .roas-dots circle { fill: #fff; stroke: #141417; stroke-width: 1.5; }
.chart-axis { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 10.5px; color: var(--ink-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.chart-legend { display: flex; gap: 16px; font-size: 11px; color: var(--ink-2); margin-top: 10px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.lg-bar { width: 9px; height: 9px; border-radius: 2px; background: #5878e8; }
.lg-bar.spend { background: #9a9aa6; }
.lg-note { color: var(--ink-3); font-variant-numeric: tabular-nums; }

.diag-list li { display: flex; gap: 9px; padding: 9px 0; border-top: 1px solid #ededf0; }
.diag-list li:first-child { border-top: 0; }
.diag-list .dot { margin-top: 6px; }
.diag-title { font-size: 12px; font-weight: 500; line-height: 1.4; }
.diag-meta { font-size: 10.5px; color: var(--ink-3); margin-top: 1px; }

/* ── 账户对比 / 台账 ─────────────────────────────────────────────────── */
table.data.compare.accounts { table-layout: fixed; }
table.data.compare.accounts th, table.data.compare.accounts td { padding: 8px 10px; }
table.data.compare.accounts th:nth-child(1), table.data.compare.accounts td:nth-child(1) { width: 4%; text-align: center; }
table.data.compare.accounts th:nth-child(2), table.data.compare.accounts td:nth-child(2) { width: 20%; }
table.data.compare.accounts th:nth-child(3), table.data.compare.accounts td:nth-child(3) { width: 8%; }
table.data.compare.accounts th:nth-child(4), table.data.compare.accounts td:nth-child(4) { width: 10%; }
table.data.compare.accounts th:nth-child(5), table.data.compare.accounts td:nth-child(5) { width: 9%; }
table.data.compare.accounts th:nth-child(6), table.data.compare.accounts td:nth-child(6) { width: 7%; }
table.data.compare.accounts th:nth-child(7), table.data.compare.accounts td:nth-child(7) { width: 7%; }
table.data.compare.accounts th:nth-child(8), table.data.compare.accounts td:nth-child(8) { width: 6%; }
table.data.compare.accounts th:nth-child(9), table.data.compare.accounts td:nth-child(9) { width: 6%; }
table.data.compare.accounts th:nth-child(10), table.data.compare.accounts td:nth-child(10) { width: 9%; }
table.data.compare.accounts th:nth-child(11), table.data.compare.accounts td:nth-child(11) { width: 7%; }
table.data.compare.accounts th:nth-child(12), table.data.compare.accounts td:nth-child(12) { width: 7%; }
table.data.compare.accounts td.ck, table.data.compare.accounts th.ck { padding-left: 12px; }
input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 14px; height: 14px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; cursor: pointer; position: relative; vertical-align: -2px; transition: background .12s, border-color .12s; }
input[type="checkbox"]:hover { border-color: #b9b9c6; }
input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(42deg); }
input[type="checkbox"]:indeterminate { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:indeterminate::after { content: ""; position: absolute; left: 3px; top: 6px; width: 6px; height: 1.5px; background: #fff; }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row-zero td:not(.ck) { color: var(--ink-3); }
.row-zero .ad-name { color: var(--ink-2); }
.sel-count { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.ledger-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.chip-quiet { font-size: 10.5px; color: var(--ink-2); background: #f2f2f5; border-radius: 99px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.seg.sm { padding: 2px; }
.seg.sm button { height: 22px; padding: 0 8px; font-size: 11px; }
.ledger-page { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn[disabled] { opacity: .38; cursor: not-allowed; }
.ledger-tools .icon-btn:nth-last-child(2) .ic { transform: rotate(180deg); }
.d-day { font-weight: 500; font-variant-numeric: tabular-nums; }
.d-week { font-size: 10.5px; color: var(--ink-3); margin-left: 6px; }
.src { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); }

/* ── marketing effect ───────────────────────────────────────────────── */
.effect { overflow: hidden; align-self: start; }
.eff-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.eff { padding: 13px 16px 14px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); min-width: 0; }
.eff:nth-child(4n+1) { border-left: 0; padding-left: 18px; }
.eff:nth-child(-n+4) { border-top: 0; }
.eff-label { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.eff-ic { width: 18px; height: 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.eff-ic .ic { width: 11px; height: 11px; }
.eff-ic.teal { background: #dcf6f3; color: var(--c-teal); }
.eff-ic.blue { background: var(--accent-wash); color: var(--c-blue); }
.eff-ic.green { background: #dcf5e7; color: var(--c-green); }
.eff-ic.violet { background: #ece4ff; color: var(--c-violet); }
.eff-ic.slate { background: #f1f1f4; color: var(--ink-3); }
.eff-value { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eff-value span { font-size: 11.5px; font-weight: 400; color: var(--ink-3); margin-left: 2px; }
.eff-hint { font-size: 10.5px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eff-foot { font-size: 10.5px; color: var(--ink-3); padding: 9px 18px 10px; border-top: 1px solid var(--line); background: #fcfcfd; }
.pill { background: #f0f0f3; color: var(--ink-2); }

table.data.mini th { background: none; padding: 4px 0; font-size: 10px; }
table.data.mini td { padding: 6px 0; font-size: 11.5px; border-bottom: 1px solid #f2f2f5; }
table.data.mini tr:last-child td { border-bottom: 0; }
table.data.mini td:first-child { color: var(--ink-2); }
.mono-cell { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }

.custview[hidden] { display: none; }

table.data.tbl-restock, table.data.tbl-email, table.data.tbl-customers, table.data.tbl-pool,
table.data.ledger-table { table-layout: fixed; }
table.data.ledger-table th:nth-child(1), table.data.ledger-table td:nth-child(1) { width: 20%; }
table.data.ledger-table th:nth-child(2), table.data.ledger-table td:nth-child(2) { width: 19%; }
table.data.ledger-table th:nth-child(3), table.data.ledger-table td:nth-child(3) { width: 19%; }
table.data.ledger-table th:nth-child(4), table.data.ledger-table td:nth-child(4) { width: 14%; }
table.data.ledger-table th:nth-child(5), table.data.ledger-table td:nth-child(5) { width: 14%; }
table.data.ledger-table th:nth-child(6), table.data.ledger-table td:nth-child(6) { width: 14%; }
table.data.tbl-restock th:nth-child(1), table.data.tbl-restock td:nth-child(1) { width: 22%; }
table.data.tbl-restock th:nth-child(2), table.data.tbl-restock td:nth-child(2) { width: 30%; }
table.data.tbl-restock th:nth-child(3), table.data.tbl-restock td:nth-child(3) { width: 13%; }
table.data.tbl-restock th:nth-child(4), table.data.tbl-restock td:nth-child(4) { width: 11%; }
table.data.tbl-restock th:nth-child(5), table.data.tbl-restock td:nth-child(5) { width: 14%; }
table.data.tbl-restock th:nth-child(6), table.data.tbl-restock td:nth-child(6) { width: 10%; }

table.data.tbl-email th:nth-child(1), table.data.tbl-email td:nth-child(1) { width: 30%; }
table.data.tbl-email th:nth-child(2), table.data.tbl-email td:nth-child(2) { width: 12%; }
table.data.tbl-email th:nth-child(3), table.data.tbl-email td:nth-child(3) { width: 16%; }
table.data.tbl-email th:nth-child(4), table.data.tbl-email td:nth-child(4) { width: 24%; }
table.data.tbl-email th:nth-child(5), table.data.tbl-email td:nth-child(5) { width: 18%; }

table.data.tbl-customers th:nth-child(1), table.data.tbl-customers td:nth-child(1) { width: 20%; }
table.data.tbl-customers th:nth-child(2), table.data.tbl-customers td:nth-child(2) { width: 30%; }
table.data.tbl-customers th:nth-child(3), table.data.tbl-customers td:nth-child(3) { width: 10%; }
table.data.tbl-customers th:nth-child(4), table.data.tbl-customers td:nth-child(4) { width: 15%; }
table.data.tbl-customers th:nth-child(5), table.data.tbl-customers td:nth-child(5) { width: 13%; }
table.data.tbl-customers th:nth-child(6), table.data.tbl-customers td:nth-child(6) { width: 12%; }

table.data.tbl-pool th:nth-child(1), table.data.tbl-pool td:nth-child(1) { width: 30%; }
table.data.tbl-pool th:nth-child(2), table.data.tbl-pool td:nth-child(2) { width: 18%; }
table.data.tbl-pool th:nth-child(3), table.data.tbl-pool td:nth-child(3) { width: 20%; }
table.data.tbl-pool th:nth-child(4), table.data.tbl-pool td:nth-child(4) { width: 20%; }
table.data.tbl-pool th:nth-child(5), table.data.tbl-pool td:nth-child(5) { width: 12%; }

/* ── account analysis ────────────────────────────────────────────────── */
table.data.tbl-dims { table-layout: fixed; }
table.data.tbl-dims th:nth-child(1), table.data.tbl-dims td:nth-child(1) { width: 17%; }
table.data.tbl-dims th:nth-child(2), table.data.tbl-dims td:nth-child(2) { width: 11%; }
table.data.tbl-dims th:nth-child(3), table.data.tbl-dims td:nth-child(3) { width: 11%; }
table.data.tbl-dims th:nth-child(4), table.data.tbl-dims td:nth-child(4) { width: 9%; }
table.data.tbl-dims th:nth-child(5), table.data.tbl-dims td:nth-child(5) { width: 8%; }
table.data.tbl-dims th:nth-child(6), table.data.tbl-dims td:nth-child(6) { width: 8%; }
table.data.tbl-dims th:nth-child(7), table.data.tbl-dims td:nth-child(7) { width: 8%; }
table.data.tbl-dims th:nth-child(8), table.data.tbl-dims td:nth-child(8) { width: 9%; }
table.data.tbl-dims th:nth-child(9), table.data.tbl-dims td:nth-child(9) { width: 7%; }
table.data.tbl-dims th:nth-child(10), table.data.tbl-dims td:nth-child(10) { width: 14%; }

table.data.tbl-age { table-layout: fixed; }
table.data.tbl-age th:nth-child(1), table.data.tbl-age td:nth-child(1) { width: 12%; }
table.data.tbl-age th:nth-child(2), table.data.tbl-age td:nth-child(2) { width: 16%; }
table.data.tbl-age th:nth-child(3), table.data.tbl-age td:nth-child(3) { width: 15%; }
table.data.tbl-age th:nth-child(4), table.data.tbl-age td:nth-child(4) { width: 11%; }
table.data.tbl-age th:nth-child(5), table.data.tbl-age td:nth-child(5) { width: 10%; }
table.data.tbl-age th:nth-child(6), table.data.tbl-age td:nth-child(6) { width: 10%; }
table.data.tbl-age th:nth-child(7), table.data.tbl-age td:nth-child(7) { width: 13%; }
table.data.tbl-age th:nth-child(8), table.data.tbl-age td:nth-child(8) { width: 13%; }

table.data.tbl-region { table-layout: fixed; }
table.data.tbl-region th:nth-child(1), table.data.tbl-region td:nth-child(1) { width: 19%; }
table.data.tbl-region th:nth-child(2), table.data.tbl-region td:nth-child(2) { width: 12%; }
table.data.tbl-region th:nth-child(3), table.data.tbl-region td:nth-child(3) { width: 12%; }
table.data.tbl-region th:nth-child(4), table.data.tbl-region td:nth-child(4) { width: 9%; }
table.data.tbl-region th:nth-child(5), table.data.tbl-region td:nth-child(5) { width: 8%; }
table.data.tbl-region th:nth-child(6), table.data.tbl-region td:nth-child(6) { width: 11%; }
table.data.tbl-region th:nth-child(7), table.data.tbl-region td:nth-child(7) { width: 10%; }
table.data.tbl-region th:nth-child(8), table.data.tbl-region td:nth-child(8) { width: 19%; }

.share-col { width: 12%; text-align: right; }
.share-num { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
td.share-col { padding-top: 7px; padding-bottom: 7px; }
.st-abbr { display: inline-block; min-width: 30px; font-size: 10px; font-weight: 600; letter-spacing: .04em; color: var(--ink-2); background: #f1f1f4; border-radius: 4px; padding: 1px 4px; margin-right: 8px; text-align: center; }
.st-abbr.muted { color: var(--ink-3); background: #f5f5f7; }

.hours { padding: 6px 18px 12px; }
.hour-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 96px 72px 52px; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid #f2f2f5; }
.hour-row:first-child { border-top: 0; }
.h-name { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.h-bar { height: 26px; background: #f4f4f6; border-radius: 6px; overflow: hidden; }
.h-bar i { display: block; height: 100%; background: #a3b8ff; border-radius: 6px; }
.h-spend { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.h-sub { font-size: 11px; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.h-roas { font-size: 12.5px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.hour-row.weak .h-name, .hour-row.weak .h-roas { color: var(--warn); }
.hour-row.weak .h-bar i { background: #f0bf72; }
.hours-foot { font-size: 11.5px; color: var(--ink-3); padding-top: 10px; border-top: 1px solid #f1f1f4; }

.sex-row { padding: 9px 0; border-top: 1px solid #ededf0; }
.sex-row:first-of-type { border-top: 0; }
.sex-top { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-2); }
.sex-top b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.sex-bar { height: 5px; background: #efeff3; border-radius: 3px; overflow: hidden; margin: 5px 0 4px; }
.sex-bar i { display: block; height: 100%; background: #c9c9d4; border-radius: 3px; }
.sex-meta { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.stale-note { margin-top: 22px; display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px; color: var(--ink-3); line-height: 1.65; max-width: 900px; }
.stale-note .dot { margin-top: 5px; }

/* ── repurchase module ───────────────────────────────────────────────── */
.ledger.rich .metric { padding: 14px 16px 16px; }
.ledger.rich .m-value { font-size: 30px; margin-top: 6px; }
.ledger.rich .m-value .m-unit { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: 2px; }
.ledger.rich .m-value .delta { font-size: 11.5px; font-weight: 500; margin-left: 4px; letter-spacing: 0; }
.ledger.rich .m-foot.wrap { white-space: normal; line-height: 1.45; margin-top: 3px; }
.ledger.rich .link { margin-top: 6px; font-size: 11px; }

.dim3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dim3-panel { padding: 14px 16px 10px; }
.seg-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px 44px; gap: 10px; align-items: center; width: 100%; padding: 10px 4px; border-top: 1px solid #f2f2f5; text-align: left; }
.seg-row:first-of-type { border-top: 0; }
.seg-row span { font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; }
.sd { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: none; }
.sd.green { background: var(--c-green); }
.sd.blue { background: var(--c-blue); }
.sd.violet { background: var(--c-violet); }
.sd.teal { background: var(--c-teal); }
.sd.amber { background: var(--c-amber); }
.sd.red { background: var(--c-red); }
.seg-row b { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.seg-row em { font-style: normal; font-size: 11px; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.seg-row:hover { background: #fafafc; }
.seg-row:hover span { color: var(--ink); }

.exec-strip { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.exec-strip b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 3px; }
.exec-strip .quiet { margin-left: auto; font-size: 11px; }

table.data.tbl-stores, table.data.tbl-restock2, table.data.tbl-cohort { table-layout: fixed; }
table.data.tbl-stores th:nth-child(1), table.data.tbl-stores td:nth-child(1) { width: 24%; }
table.data.tbl-stores th:nth-child(n+2), table.data.tbl-stores td:nth-child(n+2) { width: 15.2%; }
table.data.tbl-restock2 th:nth-child(1), table.data.tbl-restock2 td:nth-child(1) { width: 20%; }
table.data.tbl-restock2 th:nth-child(2), table.data.tbl-restock2 td:nth-child(2) { width: 26%; }
table.data.tbl-restock2 th:nth-child(3), table.data.tbl-restock2 td:nth-child(3) { width: 11%; }
table.data.tbl-restock2 th:nth-child(4), table.data.tbl-restock2 td:nth-child(4) { width: 9%; }
table.data.tbl-restock2 th:nth-child(5), table.data.tbl-restock2 td:nth-child(5) { width: 11%; }
table.data.tbl-restock2 th:nth-child(6), table.data.tbl-restock2 td:nth-child(6) { width: 12%; }
table.data.tbl-restock2 th:nth-child(7), table.data.tbl-restock2 td:nth-child(7) { width: 11%; }
table.data.tbl-cohort th:nth-child(1), table.data.tbl-cohort td:nth-child(1) { width: 22%; }
table.data.tbl-cohort th:nth-child(2), table.data.tbl-cohort td:nth-child(2) { width: 16%; }
table.data.tbl-cohort th:nth-child(n+3), table.data.tbl-cohort td:nth-child(n+3) { width: 15.5%; }
td.heat { background: rgba(22, 73, 240, calc(var(--heat) * 0.6)); color: var(--ink); font-variant-numeric: tabular-nums; }

/* ── spend share bars (版位 / 性别) ───────────────────────────────────── */
.bar-row { padding: 5px 0; border-top: 1px solid #ededf0; }
.bar-row:first-of-type { border-top: 0; }
.bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--ink-2); }
.bar-top b { font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.bar-track { height: 5px; background: #efeff3; border-radius: 3px; overflow: hidden; margin: 5px 0 4px; }
.bar-track i { display: block; height: 100%; background: #a3b8ff; border-radius: 3px; }
.bar-meta { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-top: 1px; }
.bar-note { margin-top: auto; padding-top: 10px; border-top: 1px solid #eaeaef; font-size: 11px; color: var(--ink-3); line-height: 1.55; display: flex; gap: 7px; align-items: flex-start; }
.bar-note .dot { margin-top: 5px; }

/* ── AI create flow ──────────────────────────────────────────────────── */
table.data.tbl-pick { table-layout: fixed; }
table.data.tbl-pick th:nth-child(1), table.data.tbl-pick td:nth-child(1) { width: 4%; text-align: center; }
table.data.tbl-pick th:nth-child(2), table.data.tbl-pick td:nth-child(2) { width: 38%; }
table.data.tbl-pick th:nth-child(3), table.data.tbl-pick td:nth-child(3) { width: 13%; }
table.data.tbl-pick th:nth-child(4), table.data.tbl-pick td:nth-child(4) { width: 16%; }
table.data.tbl-pick th:nth-child(5), table.data.tbl-pick td:nth-child(5) { width: 14%; }
table.data.tbl-pick th:nth-child(6), table.data.tbl-pick td:nth-child(6) { width: 15%; }
table.data.tbl-pick tr.picked { background: #fbfcff; }

.ref-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ref-card { position: relative; display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: #fff; transition: border-color .12s, box-shadow .12s; }
.ref-card:hover { border-color: var(--line-2); }
.ref-card.picked { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.ref-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.ref-card input { position: absolute; left: 8px; top: 8px; z-index: 2; }
.ref-meta { display: block; padding: 6px 8px; font-size: 10.5px; color: var(--ink-3); }
.ref-meta b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.gen-settings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gs-item { background: #fff; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.gs-item span { font-size: 11px; color: var(--ink-3); }
.gs-item b { font-size: 14px; font-weight: 600; }
.gs-item small { font-size: 10.5px; color: var(--ink-3); }
.gs-note { grid-column: 1 / -1; background: #fcfcfd; padding: 8px 16px; font-size: 10.5px; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }

table.data.tbl-genrows { table-layout: fixed; }
table.data.tbl-genrows th:nth-child(1), table.data.tbl-genrows td:nth-child(1) { width: 5%; }
table.data.tbl-genrows th:nth-child(2), table.data.tbl-genrows td:nth-child(2) { width: 18%; }
table.data.tbl-genrows th:nth-child(3), table.data.tbl-genrows td:nth-child(3) { width: 16%; }
table.data.tbl-genrows th:nth-child(4), table.data.tbl-genrows td:nth-child(4) { width: 36%; }
table.data.tbl-genrows th:nth-child(5), table.data.tbl-genrows td:nth-child(5) { width: 12%; }
table.data.tbl-genrows th:nth-child(6), table.data.tbl-genrows td:nth-child(6) { width: 13%; }
table.data.tbl-genrows td.wrap { white-space: normal; line-height: 1.45; color: var(--ink-2); }
.ref-inline { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-2); }
.ref-inline img { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; }
.thumb-mini { width: 34px; height: 34px; border-radius: 5px; object-fit: cover; display: block; }
.thumb-empty { color: var(--ink-3); font-size: 11px; }

/* ── AI create flow ──────────────────────────────────────────────────── */
.ref-switch { display: inline-flex; gap: 2px; background: #f4f4f6; padding: 3px; border-radius: 8px; }
.ref-tab { height: 24px; padding: 0 10px; border-radius: 6px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.ref-tab:hover { color: var(--ink); }
.ref-tab.is-active { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--line); }
.ref-panel[hidden] { display: none; }

.design-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 160px; border: 1px dashed var(--line-2); border-radius: 12px; background: #fcfcfd; color: var(--ink-3); cursor: pointer; text-align: center; padding: 18px; }
.dropzone:hover { border-color: var(--accent); color: var(--ink-2); background: #fbfcff; }
.dropzone .ic { width: 20px; height: 20px; color: var(--ink-3); }
.dropzone b { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.dropzone span { font-size: 10.5px; }
.design-side { display: flex; flex-direction: column; gap: 6px; }
.ds-label { font-size: 11px; color: var(--ink-3); }
.ds-input { width: 100%; min-height: 96px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; font: inherit; font-size: 12px; line-height: 1.6; color: var(--ink); background: #fff; }
.ds-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.ds-input::placeholder { color: #8a8a95; }
.ds-hint { font-size: 10.5px; color: var(--ink-3); line-height: 1.55; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.set-field { background: #fff; padding: 13px 16px; display: flex; flex-direction: column; gap: 8px; }
.set-field.wide { grid-column: 1 / -1; }
.sf-label { font-size: 11px; color: var(--ink-3); }
.sf-input { height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: 12px; width: 100%; }
.sf-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.set-field small { font-size: 10.5px; color: var(--ink-3); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 11.5px; color: var(--ink-2); }
.chip:hover { border-color: var(--line-2); }
.chip.on { background: var(--accent-wash); border-color: #c7d7fa; color: var(--accent); font-weight: 500; }
.settings-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.settings-foot .gs-note { font-size: 10.5px; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }

/* ── email marketing ───────────────────────────────────────────────── */
.upstream { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--wash-2); font-size: 11.5px; color: var(--ink-3); margin-bottom: 14px; }
.up-label { font-size: 10.5px; color: var(--ink-2); font-weight: 600; letter-spacing: .02em; }
.upstream b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.mail-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.mail-tab { height: 32px; padding: 0 13px; border-radius: 8px; font-size: 12.5px; color: var(--ink-2); border: 1px solid transparent; }
.mail-tab:hover { background: var(--wash); }
.mail-tab.is-active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 500; }
.mail-panel[hidden] { display: none; }

.flow { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.flow-step { flex: 1 1 0; min-width: 150px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; display: flex; flex-direction: column; gap: 3px; }
.fs-num { font-size: 10px; font-weight: 600; color: var(--accent); letter-spacing: .06em; }
.flow-step b { font-size: 12.5px; font-weight: 600; }
.fs-meta { font-size: 10.5px; color: var(--ink-3); line-height: 1.45; }
.flow-arrow { display: flex; align-items: center; padding: 0 7px; color: #b9b9c6; font-size: 13px; }
.flow-note { margin-top: 10px; font-size: 10.5px; color: var(--ink-3); line-height: 1.65; background: var(--wash-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }

.taskbar { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: #fff; }
.tb-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.tb-label { font-weight: 500; }
.tb-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); }
.tb-meta { font-size: 11px; color: var(--ink-3); }
.taskbar .chips { margin-top: 10px; }
.taskbar .table-note { margin-top: 8px; }

.gate-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.gate { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; background: #fff; }
.gate-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.gate-cols div { background: #fff; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.gate-cols span { font-size: 11px; color: var(--ink-3); }
.gate-cols b { font-size: 20px; font-weight: 600; }
.gate-cols small { font-size: 10.5px; color: var(--ink-3); }

table.data.tbl-mail-list { table-layout: fixed; }
table.data.tbl-mail-list th:nth-child(1), table.data.tbl-mail-list td:nth-child(1) { width: 24%; }
table.data.tbl-mail-list th:nth-child(2), table.data.tbl-mail-list td:nth-child(2) { width: 34%; }
table.data.tbl-mail-list th:nth-child(3), table.data.tbl-mail-list td:nth-child(3) { width: 14%; }
table.data.tbl-mail-list th:nth-child(4), table.data.tbl-mail-list td:nth-child(4) { width: 14%; }
table.data.tbl-mail-list th:nth-child(5), table.data.tbl-mail-list td:nth-child(5) { width: 14%; }

/* ── AI generation panel ────────────────────────────────────────────── */
.gen-panel { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 14px 16px 12px; }
.gen-modes { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.gen-mode { height: 28px; padding: 0 11px; border-radius: 7px; font-size: 12px; color: var(--ink-2); border: 1px solid transparent; }
.gen-mode:hover { background: var(--wash); }
.gen-mode.is-active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 500; }
.gen-mode-hint { font-size: 10.5px; color: var(--ink-3); margin-left: 6px; }

.gen-modelbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid #f1f1f4; border-bottom: 1px solid #f1f1f4; }
.gm-label { font-size: 11px; color: var(--ink-3); }
.gm-pick { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 11.5px; color: var(--ink); background: #fff; }
.gm-pick .chev { width: 12px; height: 12px; color: var(--ink-3); }
.ratio-wrap { display: flex; gap: 3px; flex-wrap: wrap; }
.ratio { height: 22px; padding: 0 7px; border-radius: 5px; font-size: 10.5px; color: var(--ink-2); border: 1px solid var(--line); background: #fff; }
.ratio.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.gt-head { font-size: 11.5px; color: var(--ink-3); margin: 12px 0 2px; }
.gt-head b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.task { display: grid; grid-template-columns: 22px 170px 92px 88px minmax(0, 1fr); gap: 8px 10px; align-items: start; padding: 10px 0; border-top: 1px solid #f2f2f5; }
.task-row { display: contents; }
.tr-idx { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 8px; }
.tr-name { height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px; font-size: 12px; width: 100%; }
.tr-name:focus, .tr-prompt:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.tr-upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 62px; border: 1px dashed var(--line-2); border-radius: 8px; color: var(--ink-3); font-size: 10px; line-height: 1.4; background: #fcfcfd; }
.tr-upload:hover { border-color: var(--accent); color: var(--ink-2); }
.tr-upload .ic { width: 14px; height: 14px; }
.tr-gallery { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 62px; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; color: var(--ink-3); }
.tr-gallery b { font-size: 10px; font-weight: 500; color: var(--ink-2); }
.tr-gallery span { font-variant-numeric: tabular-nums; }
.tr-prompt { width: 100%; min-height: 62px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 11.5px; line-height: 1.6; resize: vertical; }
.tr-prompt::placeholder { color: #8a8a95; }
.task-actions { grid-column: 5; display: flex; gap: 6px; }
.gt-foot { display: flex; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid #f1f1f4; }
.gt-foot span { font-size: 10.5px; color: var(--ink-3); }
.gt-foot .btn-primary { margin-left: auto; }

/* ── diagnosis flow ─────────────────────────────────────────────────── */
.pill.p0 { background: #fde3e0; color: var(--neg); }
.pill.p1 { background: #feefd7; color: var(--warn); }
.pill.p2 { background: #e3eaff; color: var(--accent); }
table.data.tbl-anomaly, table.data.tbl-break { table-layout: fixed; }
table.data.tbl-anomaly th:nth-child(1), table.data.tbl-anomaly td:nth-child(1) { width: 9%; }
table.data.tbl-anomaly th:nth-child(2), table.data.tbl-anomaly td:nth-child(2) { width: 43%; }
table.data.tbl-anomaly th:nth-child(3), table.data.tbl-anomaly td:nth-child(3) { width: 12%; }
table.data.tbl-anomaly th:nth-child(4), table.data.tbl-anomaly td:nth-child(4) { width: 11%; }
table.data.tbl-anomaly th:nth-child(5), table.data.tbl-anomaly td:nth-child(5) { width: 11%; }
table.data.tbl-anomaly th:nth-child(6), table.data.tbl-anomaly td:nth-child(6) { width: 14%; }
table.data.tbl-break th:nth-child(1), table.data.tbl-break td:nth-child(1) { width: 30%; }
table.data.tbl-break th:nth-child(2), table.data.tbl-break td:nth-child(2) { width: 16%; }
table.data.tbl-break th:nth-child(3), table.data.tbl-break td:nth-child(3) { width: 14%; }
table.data.tbl-break th:nth-child(4), table.data.tbl-break td:nth-child(4) { width: 12%; }
table.data.tbl-break th:nth-child(5), table.data.tbl-break td:nth-child(5) { width: 12%; }
table.data.tbl-break th:nth-child(6), table.data.tbl-break td:nth-child(6) { width: 16%; }

.review { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 14px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.rv-field { display: flex; flex-direction: column; gap: 6px; }
.rv-field.wide { grid-column: 1 / -1; }
.rv-field span { font-size: 11px; color: var(--ink-3); }
.rv-field input, .rv-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 12px; line-height: 1.6; }
.rv-field textarea { min-height: 76px; resize: vertical; }
.rv-field input:focus, .rv-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.rv-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid #f1f1f4; }
.rv-note { font-size: 10.5px; color: var(--ink-3); }

/* ── creative library ────────────────────────────────────────────────── */
.creative-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cc { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; transition: border-color .12s, box-shadow .12s; }
.cc:hover { border-color: var(--line-2); box-shadow: 0 2px 10px rgba(15, 15, 20, .05); }
.cc-media { position: relative; aspect-ratio: 1 / 1; background: #f4f4f6; }
.cc-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-tag { position: absolute; left: 8px; top: 8px; font-size: 10px; padding: 2px 7px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: var(--ink-2); backdrop-filter: blur(6px); }
.cc-tag.ok { color: #126b41; }
.cc-tag.low { color: var(--neg); }
.cc-body { padding: 9px 11px 11px; }
.cc-name { font-size: 12.5px; font-weight: 500; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-meta { font-size: 10.5px; color: var(--ink-3); margin-top: 1px; }
.cc-stats { display: flex; gap: 10px; margin-top: 8px; font-size: 10.5px; color: var(--ink-3); }
.cc-stats b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── AI studio ───────────────────────────────────────────────────────── */
.studio { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.studio-panel { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--wash-2); }
.sp-label { font-size: 11px; color: var(--ink-3); margin: 14px 0 7px; display: flex; justify-content: space-between; }
.sp-label:first-child { margin-top: 0; }
.sp-label span { color: var(--ink-3); }
.pick { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.pick img { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; }
.pick-name { font-size: 12px; font-weight: 500; }
.pick-meta { font-size: 10.5px; color: var(--ink-3); margin-top: 1px; }
.ref-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ref-grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); }
.sp-rows li { display: flex; justify-content: space-between; padding: 7px 0; font-size: 11.5px; color: var(--ink-3); border-top: 1px solid #ececf0; }
.sp-rows li:first-child { border-top: 0; }
.sp-rows b { color: var(--ink); font-weight: 500; }
.sp-foot { font-size: 10px; color: var(--ink-3); margin-top: 8px; line-height: 1.5; }
.studio-canvas { min-width: 0; }
.canvas-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-bottom: 10px; }
.canvas-head span:last-child { color: var(--ink-3); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.gen-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gen { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.gen img { width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; display: block; }
.gen figcaption { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 7px 8px; font-size: 10.5px; background: #fff; border-top: 1px solid #f2f2f5; }
.gen-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gen-state { color: var(--ink-3); flex: none; }
.gen-state.ok { color: var(--pos); }
.canvas-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 12px; }
.canvas-foot p { font-size: 11px; color: var(--ink-3); line-height: 1.6; max-width: 60ch; }
.gen-actions { display: flex; gap: 8px; flex: none; }
table.data.tbl-gen { table-layout: fixed; }
table.data.tbl-gen th:nth-child(1), table.data.tbl-gen td:nth-child(1) { width: 20%; }
table.data.tbl-gen th:nth-child(2), table.data.tbl-gen td:nth-child(2) { width: 34%; }
table.data.tbl-gen th:nth-child(3), table.data.tbl-gen td:nth-child(3) { width: 12%; }
table.data.tbl-gen th:nth-child(4), table.data.tbl-gen td:nth-child(4) { width: 14%; }
table.data.tbl-gen th:nth-child(5), table.data.tbl-gen td:nth-child(5) { width: 20%; }

/* ── customer extras ─────────────────────────────────────────────────── */
table.data.tbl-remind, table.data.tbl-sendlog, table.data.tbl-import, table.data.tbl-advice { table-layout: fixed; }
table.data.tbl-remind th:nth-child(1), table.data.tbl-remind td:nth-child(1) { width: 16%; }
table.data.tbl-remind th:nth-child(2), table.data.tbl-remind td:nth-child(2) { width: 24%; }
table.data.tbl-remind th:nth-child(3), table.data.tbl-remind td:nth-child(3) { width: 10%; }
table.data.tbl-remind th:nth-child(4), table.data.tbl-remind td:nth-child(4) { width: 14%; }
table.data.tbl-remind th:nth-child(5), table.data.tbl-remind td:nth-child(5) { width: 18%; }
table.data.tbl-remind th:nth-child(6), table.data.tbl-remind td:nth-child(6) { width: 18%; }

table.data.tbl-sendlog th:nth-child(1), table.data.tbl-sendlog td:nth-child(1) { width: 12%; }
table.data.tbl-sendlog th:nth-child(2), table.data.tbl-sendlog td:nth-child(2) { width: 28%; }
table.data.tbl-sendlog th:nth-child(3), table.data.tbl-sendlog td:nth-child(3) { width: 12%; }
table.data.tbl-sendlog th:nth-child(4), table.data.tbl-sendlog td:nth-child(4) { width: 20%; }
table.data.tbl-sendlog th:nth-child(5), table.data.tbl-sendlog td:nth-child(5) { width: 12%; }
table.data.tbl-sendlog th:nth-child(6), table.data.tbl-sendlog td:nth-child(6) { width: 16%; }

table.data.tbl-import th:nth-child(1), table.data.tbl-import td:nth-child(1) { width: 18%; }
table.data.tbl-import th:nth-child(2), table.data.tbl-import td:nth-child(2) { width: 24%; }
table.data.tbl-import th:nth-child(3), table.data.tbl-import td:nth-child(3) { width: 14%; }
table.data.tbl-import th:nth-child(4), table.data.tbl-import td:nth-child(4) { width: 14%; }
table.data.tbl-import th:nth-child(5), table.data.tbl-import td:nth-child(5) { width: 14%; }
table.data.tbl-import th:nth-child(6), table.data.tbl-import td:nth-child(6) { width: 16%; }

table.data.tbl-advice th:nth-child(1), table.data.tbl-advice td:nth-child(1) { width: 32%; }
table.data.tbl-advice th:nth-child(2), table.data.tbl-advice td:nth-child(2) { width: 40%; }
table.data.tbl-advice th:nth-child(3), table.data.tbl-advice td:nth-child(3) { width: 15%; }
table.data.tbl-advice th:nth-child(4), table.data.tbl-advice td:nth-child(4) { width: 13%; }
table.data.tbl-advice td { white-space: normal; line-height: 1.45; }

.cust-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.cust-todo li { display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px; color: var(--ink-2); padding: 5px 0; line-height: 1.5; }
.cust-todo .dot { margin-top: 5px; }
.insp-orders-list li { display: grid; grid-template-columns: 1fr 62px 60px; gap: 8px; padding: 6px 0; border-top: 1px solid #f4f4f6; font-size: 11px; color: var(--ink-2); }
.insp-orders-list li:first-child { border-top: 0; }

/* ── ads sub-views ───────────────────────────────────────────────────── */
.dims-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dim-panel { padding: 14px 16px 12px; }
.dp-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.dp-head h3 { font-size: 13px; font-weight: 600; }
.dp-head span { font-size: 10.5px; color: var(--ink-3); }
.dp-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 36px 38px; gap: 10px; align-items: center; padding: 6.5px 0; border-top: 1px solid #f2f2f5; }
.dp-row:first-of-type { border-top: 0; }
.dp-name { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-bar { height: 6px; background: #f1f1f4; border-radius: 3px; overflow: hidden; }
.dp-bar i { display: block; height: 100%; background: #c9c9d4; border-radius: 3px; }
.dp-pct { font-size: 10.5px; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.dp-roas { font-size: 11.5px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.dp-empty { opacity: 0; }

.ai-note { border: 1px solid var(--line); border-radius: var(--r-sheet); padding: 16px 18px; max-width: 760px; }
.ai-note p { font-size: 13px; line-height: 1.75; color: var(--ink-2); margin-bottom: 10px; }
.ai-note b { color: var(--ink); font-weight: 600; }
.ai-note .link { margin-top: 2px; font-size: 12px; }

.table-note { font-size: 11px; color: var(--ink-3); line-height: 1.65; margin-top: 12px; max-width: 820px; }
.chart-panel.big .week-chart { height: 240px; }

.budget { display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--ink-3); margin: 4px 0 8px; }
.budget span:first-child { font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.budget-bar { height: 6px; background: #ededf1; border-radius: 3px; overflow: hidden; }
.budget-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.mini-facts { margin-top: 10px; }
.mini-facts li { display: flex; justify-content: space-between; padding: 5px 0; font-size: 11.5px; color: var(--ink-3); border-top: 1px solid #efeff2; }
.mini-facts li:first-child { border-top: 0; }
.mini-facts b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ── spec page ───────────────────────────────────────────────────────── */
.spec { max-width: 1060px; margin: 0 auto; }
.lede-sub { margin-top: -4px; font-size: 14px; color: var(--ink-2); max-width: 66ch; line-height: 1.65; }
.spec .section { padding-top: 30px; }
.spec .section-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; }
.body-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; max-width: 74ch; margin-top: 10px; }
.body-text b { color: var(--ink); font-weight: 550; }
.body-text.quiet { color: var(--ink-3); margin-top: 16px; }
.body-text code, .spec code { font-family: var(--mono); font-size: 11px; background: var(--wash); padding: 1px 4px; border-radius: 4px; }

table.compare td { padding: 11px 12px; vertical-align: top; white-space: normal; }
table.compare th:nth-child(2) { width: 42%; }
table.compare td:nth-child(2) { color: var(--ink-3); }
table.compare td:nth-child(3) { color: var(--ink); }
.compare-k { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

.grid-demo { display: flex; border: 1px solid var(--line); border-radius: var(--r-sheet); overflow: hidden; height: 132px; }
.gd-rail { width: 236px; flex: none; background: #fafafb; border-right: 1px solid var(--line); display: grid; place-content: center; text-align: center; font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gd-rail span { font-size: 10px; color: var(--ink-3); }
.gd-main { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between; }
/* wireframe of the real composition, not a 12-tile abstraction */
.gd-band { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; height: 34px; background: #e6eaf6; border: 1px solid #e2e8f8; border-radius: 6px; overflow: hidden; }
.gd-band i { background: #f2f5fd; }
.gd-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; height: 40px; margin-top: 12px; }
.gd-8 { background: #eaeffb; border: 1px solid #d9e1f8; border-radius: 6px; }
.gd-4 { background: #f2f5fd; border: 1px solid #e2e8f8; border-radius: 6px; }
.gd-note { font-size: 10.5px; color: var(--ink-3); }

.spec-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.spec-panel { padding: 15px 16px; }
.spec-label { font-size: 11px; color: var(--ink-3); margin-bottom: 8px; }
.type-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid #f2f2f5; }
.type-row:first-of-type { border-top: 0; }
.tr-sample { color: var(--ink); letter-spacing: -.02em; }
.tr-meta { font-size: 10px; color: var(--ink-3); }
.spec-foot { font-size: 10.5px; color: var(--ink-3); margin-top: 10px; line-height: 1.6; }

.swatches { display: grid; grid-template-columns: 1fr; gap: 1px; }
.swatches li { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-2); padding: 4px 0; border-top: 1px solid #f2f2f5; }
.swatches li:first-child { border-top: 0; }
.swatches i { width: 15px; height: 15px; border-radius: 4px; border: 1px solid transparent; flex: none; }
.swatches code { margin-left: auto; background: none; padding: 0; font-size: 9.5px; color: var(--ink-3); }

.states li { display: flex; gap: 10px; font-size: 11.5px; color: var(--ink-2); padding: 5px 0; border-top: 1px solid #f2f2f5; }
.states li:first-child { border-top: 0; }
.states span { width: 30px; flex: none; color: var(--ink-3); font-size: 10.5px; padding-top: 1px; }

.decisions li { position: relative; padding: 10px 0 10px 26px; border-top: 1px solid #f2f2f5; counter-increment: d; }
.decisions { counter-reset: d; }
.decisions li::before {
  content: counter(d);
  position: absolute; left: 0; top: 11px;
  font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.decisions b { display: block; font-size: 12.5px; font-weight: 550; }
.decisions span { display: block; font-size: 11.5px; color: var(--ink-2); margin-top: 1px; line-height: 1.6; }

body[data-view="overview"] { --tone: var(--c-blue); }
body[data-view="ads"] { --tone: var(--c-indigo); }
body[data-view="customers"] { --tone: var(--c-violet); }
body[data-view="spec"] { --tone: var(--ink-3); }
.section-head h2::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--tone, var(--c-blue)); margin-right: 8px; vertical-align: 2px; }

body[data-view="spec"] .seg,
body[data-view="spec"] .currency,
body[data-view="spec"] .sync,
body[data-view="spec"] .icon-btn,
body[data-view="spec"] .toolbar-sep { display: none; }
body[data-view="spec"] .scope-chip { display: none; }

/* ── inspector ───────────────────────────────────────────────────────── */
.inspector {
  position: fixed;
  top: calc(var(--bar) + 52px);
  right: 0;
  bottom: 0;
  width: 360px;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -16px 0 40px rgba(15, 15, 20, .07);
  transform: translateX(101%);
  transition: transform .24s cubic-bezier(.2, .8, .2, 1);
  z-index: 60;
  display: flex;
  flex-direction: column;
}
html[data-bare] .inspector { top: 52px; }
.inspector.is-open { transform: translateX(0); }
.insp-head { padding: 16px 16px 12px 18px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid #f1f1f4; }
.insp-kicker { font-size: 10.5px; color: var(--ink-3); }
.insp-title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin-top: 2px; }
.insp-body { padding: 14px 18px 18px; overflow-y: auto; }
.insp-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; }
.insp-facts div { padding: 0 12px; border-left: 1px solid var(--line); }
.insp-facts div:first-child { border-left: 0; padding-left: 0; }
.insp-facts p { font-size: 10.5px; color: var(--ink-3); }
.insp-facts b { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.insp-sub { font-size: 10.5px; color: var(--ink-3); margin: 8px 0 14px; }
.insp-mini { display: grid; gap: 8px; margin-bottom: 14px; }
.mini-row { display: grid; grid-template-columns: 34px 1fr 38px; gap: 10px; align-items: center; font-size: 11px; color: var(--ink-3); }
.mini-row i { height: 6px; background: #e6e6ec; border-radius: 3px; display: block; }
.mini-row b { text-align: right; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mini-cap { font-size: 10.5px; color: var(--ink-3); margin: -4px 0 12px; font-variant-numeric: tabular-nums; }
.insp-text { font-size: 11.5px; line-height: 1.65; color: var(--ink-2); background: var(--wash); border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; }
.insp-actions { display: flex; gap: 8px; margin-top: 14px; }
.insp-orders { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.io-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); margin-bottom: 4px; }
.io-head span { color: var(--ink-3); }
.insp-orders li { display: grid; grid-template-columns: 1fr 62px 64px; gap: 8px; align-items: center; padding: 5.5px 0; border-top: 1px solid #f4f4f6; font-size: 11px; color: var(--ink-2); }
.insp-orders li:first-of-type { border-top: 0; }
.io-id { font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); }
.io-amt { text-align: right; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.io-time { text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.insp-foot { margin-top: 16px; font-size: 10px; color: var(--ink-3); }

/* ── palette ─────────────────────────────────────────────────────────── */
.palette-wrap {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(12, 12, 16, .3);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  display: flex; justify-content: center; align-items: flex-start;
  padding-top: 13vh;
  animation: fade .16s ease-out;
}
.palette {
  width: 560px; max-width: calc(100vw - 32px); max-height: 70vh;
  background: rgba(255, 255, 255, .99);
  border-radius: 14px;
  box-shadow: 0 28px 70px rgba(10, 10, 15, .26), 0 0 0 1px rgba(0, 0, 0, .06);
  overflow: hidden; display: flex; flex-direction: column;
  animation: pop .18s cubic-bezier(.2, .9, .2, 1);
}
.palette-input { display: flex; align-items: center; gap: 9px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.palette-input .ic { width: 15px; height: 15px; color: var(--ink-3); }
.palette-input input { flex: 1; border: 0; outline: 0; font-size: 14px; background: none; }
.palette-input input::placeholder { color: var(--ink-3); }
.palette-list { padding: 6px; overflow-y: auto; max-height: 50vh; }
.palette-group { font-size: 10.5px; color: var(--ink-3); padding: 8px 10px 4px; }
.palette-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13px; text-align: left; color: var(--ink-2); }
.palette-item .ic { width: 15px; height: 15px; color: var(--ink-3); }
.palette-item:hover, .palette-item.is-sel { background: #f2f2f5; color: var(--ink); }
.pi-hint { margin-left: auto; font-size: 10.5px; color: var(--ink-3); }
.palette-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--ink-3); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.985); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
}

/* ── responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1439px) {
  .content { padding: 24px 28px 64px; }
  .search { width: 240px; }
  .topband { grid-template-columns: minmax(0, 1fr); }
  .spark { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 1279px) {
  .content { padding: 24px 26px 64px; }
  .search { width: 200px; }
  .split { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
}
@media (max-width: 1119px) {
  .search, .toolbar-sep { display: none; }
  .split, .split.wide { grid-template-columns: minmax(0, 1fr); }
  .railpanel { position: static; }
  .split .railpanel { margin-top: 2px; }
  .ledger { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric:nth-child(3n+1) { border-left: 0; padding-left: 0; }
  .metric:nth-child(n+4) { border-top: 1px solid var(--line); }
  .metric:nth-child(5) { grid-column: span 2; border-left: 0; padding-left: 16px; }
}
@media (max-width: 980px) {
  .rail { width: 64px; padding: 14px 8px 10px; align-items: center; }
  .rail-brand { padding: 0 0 14px; }
  .rail-brand-text, .ws-name, .ws-count, .ws-caret, .nav-label, .nav-item span, .nav-count, .nav-sub,
  .rail-sync, .rail-user-text, .rail-signout, .rail-clock { display: none; }
  .ws-switch { width: 40px; padding: 0; justify-content: center; }
  .nav-item { justify-content: center; padding: 0; width: 40px; height: 36px; }
  .nav { width: 100%; }
  .rail-foot { width: 100%; display: flex; justify-content: center; }
  .rail-user { width: auto; padding: 4px; }
  .lede { font-size: 26px; }
  .currency { display: none; }
}
@media (max-width: 860px) {
  .seg { display: none; }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(odd) { border-left: 0; padding-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .metric:nth-child(5) { grid-column: span 2; padding-left: 0; }
  .facts { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .spec-two { grid-template-columns: 1fr; }
  .dims-grid { grid-template-columns: 1fr; }
  .creative-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dim3 { grid-template-columns: 1fr; }
  .ref-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flow-step { min-width: 46%; }
  .task { grid-template-columns: 20px 140px 84px 84px minmax(0, 1fr); }
  .gate-cols { grid-template-columns: 1fr; }
  .gen-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio { grid-template-columns: 1fr; }
  .eff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eff:nth-child(odd) { border-left: 0; padding-left: 16px; }
  .eff:nth-child(3) { border-top: 1px solid var(--line); }
  .table-wrap { overflow-x: auto; }
}
@media (max-width: 720px) {
  .content { padding: 18px 16px 56px; }
  .lede { font-size: 22px; letter-spacing: -.018em; }
  .m-value { font-size: 20px; }
  .m-foot { font-size: 10.5px; }
  .ledger.four { grid-template-columns: 1fr 1fr; }
  .ledger.four .metric:nth-child(odd) { border-left: 0; padding-left: 12px; }
  .ledger.four .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .toolbar { padding: 0 14px; gap: 8px; }
  .scope-chip { display: none; }
  .inspector { width: 100%; }
  .funnel-row { grid-template-columns: 52px minmax(0, 1fr) 54px; }
  .fr-rate { display: none; }
  .facts { grid-template-columns: 1fr; row-gap: 12px; }
  .fact { border-left: 0; padding: 0; border-top: 1px solid var(--line); padding-top: 10px; }
  .fact:first-child { border-top: 0; padding-top: 0; }
  .fs-list { margin-left: 0; width: 100%; gap: 10px; flex-wrap: wrap; }
  .section-head { flex-wrap: wrap; }
  .section-head .actions { margin-left: 0; }
}

/* ============================================================================
 * 字号整体上调（2026-11-14 用户要求「字体再大一点」）
 * 底色/间距不变，只放大字阶：正文 14→15、表格 12.5→13.5、辅助 11.5→12.5、
 * 页面判断句 30→32、区块标题 15→16.5。
 * ========================================================================== */
body { font-size: 15px; }

.nav-item { font-size: 14px; }
.nav-label { font-size: 12px; }
.nav-subitem { font-size: 13.5px; height: 28px; }
.nav-item { height: 32px; }
.rail-brand-text strong { font-size: 14px; }
.rail-brand-text span { font-size: 10px; }
.ws-name { font-size: 13.5px; }
.ws-count { font-size: 12px; }
.rail-user-text strong { font-size: 13px; }
.rail-user-text span { font-size: 11px; }
.rail-clock { font-size: 11px; }
.rail-sync { font-size: 11.5px; }

.toolbar-title { font-size: 14.5px; }
.scope-chip { font-size: 11.5px; }
.search { font-size: 13px; height: 32px; }
.seg button { font-size: 12.5px; height: 28px; }
.btn-ghost { font-size: 12.5px; }
.sync { font-size: 12px; }
kbd { font-size: 11px; }

.dateline { font-size: 12.5px; }
.lede { font-size: 32px; }
.subline { font-size: 12.5px; }
.m-label { font-size: 12px; }
.m-value { font-size: 27px; }
.m-foot { font-size: 11.5px; }
.m-tag { font-size: 10px; }
.ledger.rich .m-value { font-size: 33px; }
.ledger.rich .m-foot.wrap { font-size: 12px; }

.section-head h2 { font-size: 16.5px; }
.section-head .note { font-size: 12.5px; }
.fr-name { font-size: 13.5px; }
.fr-num { font-size: 15px; }
.fr-rate { font-size: 12px; }
.funnel-note { font-size: 12px; }
.hours-foot, .table-note, .bar-note { font-size: 12px; }

.rp-head h3 { font-size: 13.5px; }
.rp-note, .rp-count { font-size: 11px; }
.todo-title { font-size: 13.5px; }
.todo-meta, .h-meta { font-size: 11.5px; }
.h-name { font-size: 12.5px; }
.rp-text { font-size: 12.5px; }

table.data { font-size: 13.5px; }
table.data th { font-size: 12px; padding: 10px 12px; }
table.data td { padding: 10px 12px; }
.ad-name { font-size: 13.5px; }
.ad-meta { font-size: 11px; }
.pill { font-size: 11.5px; line-height: 19px; }
.chip { font-size: 12.5px; height: 28px; }
.chip-quiet { font-size: 11.5px; }
.field { font-size: 13px; height: 32px; }
.field-sub { font-size: 11px; }
.filterbar .btn-primary.sm, .btn-primary.sm { font-size: 12.5px; height: 30px; }
.ghost.sm { font-size: 12px; height: 28px; }
.ghost.xs { font-size: 11.5px; height: 25px; }

.f-label { font-size: 12.5px; }
.f-value { font-size: 22px; }
.f-foot { font-size: 11.5px; }
.footnotes p { font-size: 11.5px; }
.eff-label { font-size: 12.5px; }
.eff-value { font-size: 22px; }
.eff-hint { font-size: 11.5px; }
.eff-foot { font-size: 11.5px; }
.leak-head, .leak-row { font-size: 12.5px; }
.bar-top { font-size: 12.5px; }
.bar-meta { font-size: 11.5px; }

.insp-kicker { font-size: 11px; }
.insp-title { font-size: 18px; }
.insp-facts p { font-size: 11px; }
.insp-facts b { font-size: 20px; }
.insp-sub { font-size: 11px; }
.insp-text { font-size: 12.5px; }
.io-head { font-size: 11.5px; }
.insp-orders li, .insp-orders-list li { font-size: 12px; }
.io-id { font-size: 11px; }
.mini-row { font-size: 12px; }
.mini-cap { font-size: 11.5px; }
.insp-foot { font-size: 11px; }
.cust-todo li { font-size: 12.5px; }

.flow-step b { font-size: 13.5px; }
.fs-meta, .flow-note { font-size: 11.5px; }
.mail-tab { font-size: 13.5px; height: 34px; }
.upstream { font-size: 12.5px; }
.gate { font-size: 12px; }
.gen-mode { font-size: 13px; }
.gen-mode-hint { font-size: 11.5px; }
.ratio { font-size: 11.5px; }
.tr-prompt { font-size: 12.5px; }
.tr-name { font-size: 13px; height: 32px; }
.gt-head, .gt-foot span { font-size: 12px; }
.rv-field span { font-size: 12px; }
.rv-field input, .rv-field textarea { font-size: 13px; }
.palette-item { font-size: 14px; }
.palette-input input { font-size: 15px; }
.type-row .tr-sample { font-size: inherit; }
.cc-name { font-size: 13.5px; }
.cc-meta { font-size: 11.5px; }
.cc-stats { font-size: 11.5px; }
.cc-tag { font-size: 11px; }
.sex-top { font-size: 12.5px; }
.sex-meta { font-size: 11.5px; }
.palette-group { font-size: 12px; }
.pi-hint { font-size: 11.5px; }
.palette-foot { font-size: 11.5px; }
.dp-head h3 { font-size: 14px; }
.dp-name { font-size: 12.5px; }
.dp-pct, .dp-roas { font-size: 12px; }

/* ── 自定义日期 ───────────────────────────────────────────────────────── */
.seg .seg-custom { color: var(--ink-3); }
.seg .seg-custom.on { color: var(--ink); }
.date-pop { position: fixed; z-index: 80; width: 276px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 48px rgba(15, 15, 20, .16); padding: 12px 14px; }
.dp-title { font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.dp-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dp-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--ink-3); }
.dp-fields input { height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; font: inherit; font-size: 12px; color: var(--ink); }
.dp-fields input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.dp-hint { font-size: 10.5px; color: var(--ink-3); margin-top: 8px; }
.dp-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.pool-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pool-sync { margin-left: auto; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pool-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pstat { font-size: 12px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; background: #fff; }
.pstat b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; margin-left: 3px; }
.pstat.on { background: var(--accent-wash); border-color: #c7d7fa; color: var(--accent); }
.pstat.on b { color: var(--accent); }
.name-field { gap: 8px; }
.nf-label { font-size: 10.5px; color: var(--ink-3); }
.name-field input { border: 0; outline: 0; background: none; font-size: 12.5px; width: 120px; color: var(--ink); }
.prod-cell { display: flex; align-items: center; gap: 10px; }
.prod-cell img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; flex: none; }
.hist-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.hist { margin: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.hist img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.hist figcaption { font-size: 10px; color: var(--ink-3); padding: 5px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.copy-cell { white-space: normal; line-height: 1.5; max-width: 720px; }
table.data.tbl-copy { table-layout: fixed; }
table.data.tbl-copy th:nth-child(1), table.data.tbl-copy td:nth-child(1) { width: 56%; }
table.data.tbl-copy th:nth-child(2), table.data.tbl-copy td:nth-child(2) { width: 11%; }
table.data.tbl-copy th:nth-child(3), table.data.tbl-copy td:nth-child(3) { width: 11%; }
table.data.tbl-copy th:nth-child(4), table.data.tbl-copy td:nth-child(4) { width: 11%; }
table.data.tbl-copy th:nth-child(5), table.data.tbl-copy td:nth-child(5) { width: 11%; }
table.data.tbl-pool2 { table-layout: fixed; }
table.data.tbl-pool2 th:nth-child(1), table.data.tbl-pool2 td:nth-child(1) { width: 5%; text-align: center; }
table.data.tbl-pool2 th:nth-child(2), table.data.tbl-pool2 td:nth-child(2) { width: 24%; }
table.data.tbl-pool2 th:nth-child(3), table.data.tbl-pool2 td:nth-child(3) { width: 11%; }
table.data.tbl-pool2 th:nth-child(4), table.data.tbl-pool2 td:nth-child(4) { width: 16%; }
table.data.tbl-pool2 th:nth-child(5), table.data.tbl-pool2 td:nth-child(5) { width: 15%; }
table.data.tbl-pool2 th:nth-child(6), table.data.tbl-pool2 td:nth-child(6) { width: 15%; }
table.data.tbl-pool2 th:nth-child(7), table.data.tbl-pool2 td:nth-child(7) { width: 14%; }
table.data.tbl-customers th:nth-child(7), table.data.tbl-customers td:nth-child(7) { width: 10%; }
table.data.tbl-customers th:nth-child(1), table.data.tbl-customers td:nth-child(1) { width: 18%; }
table.data.tbl-customers th:nth-child(2), table.data.tbl-customers td:nth-child(2) { width: 26%; }
table.data.tbl-customers th:nth-child(3), table.data.tbl-customers td:nth-child(3) { width: 9%; }
table.data.tbl-customers th:nth-child(4), table.data.tbl-customers td:nth-child(4) { width: 13%; }
table.data.tbl-customers th:nth-child(5), table.data.tbl-customers td:nth-child(5) { width: 12%; }
table.data.tbl-customers th:nth-child(6), table.data.tbl-customers td:nth-child(6) { width: 11%; }
table.data.tbl-customers th:nth-child(7), table.data.tbl-customers td:nth-child(7) { width: 11%; }

/* ── 邮件营销：闸门 / 口径 / 筛选 / 台账 / 面板 ────────────────────────── */
.gate-card { border: 1px solid var(--line); border-radius: var(--r-sheet); background: #fff; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 12px; }
.gate-card .gate-bar { margin-bottom: 0; }
.gate-hint { font-size: 11.5px; color: var(--ink-3); margin-left: auto; }
.gate-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; background: none; border: 0; border-radius: 0; overflow: visible; }
.gate-cols div { background: var(--wash-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.gate-cols span { font-size: 11.5px; font-weight: 600; color: var(--ink); }
.gate-cols small { font-size: 11.5px; line-height: 1.55; color: var(--ink-2); }
.gate-setup { border: 1px solid #f0e0c2; background: #fdf8ee; border-radius: 9px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.gate-setup p { font-size: 11.5px; color: var(--neg); line-height: 1.55; }
.gate-setup code { font-family: var(--mono); font-size: 11px; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; }
.gate-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gate-form input, .gate-test input, .send-row input, .pf-field input {
  height: 32px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: #fff;
  padding: 0 10px; font: inherit; font-size: 12.5px; color: var(--ink); min-width: 0;
}
.gate-form input { flex: 1 1 190px; }
.gate-test { display: flex; align-items: center; gap: 8px; }
.gt-label { font-size: 11.5px; color: var(--ink-3); flex: none; }
.gate-test input { flex: 1 1 auto; }
.gate-form input:focus, .gate-test input:focus, .send-row input:focus, .pf-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.gate-form input::placeholder, .gate-test input::placeholder, .send-row input::placeholder { color: #a9a9b6; }

.ledger-strip { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); padding: 10px 0 12px; border-top: 1px solid var(--line); }
.ledger-strip b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ledger-strip .quiet { margin-left: auto; font-size: 11.5px; }
table.data.tbl-daily { table-layout: fixed; border-top: 1px solid var(--line); }
table.data.tbl-daily th:nth-child(1), table.data.tbl-daily td:nth-child(1) { width: 28%; }
table.data.tbl-daily th:nth-child(2), table.data.tbl-daily td:nth-child(2) { width: 13%; }
table.data.tbl-daily th:nth-child(3), table.data.tbl-daily td:nth-child(3) { width: 13%; }
table.data.tbl-daily th:nth-child(4), table.data.tbl-daily td:nth-child(4) { width: 14%; }
table.data.tbl-daily th:nth-child(5), table.data.tbl-daily td:nth-child(5) { width: 15%; }
table.data.tbl-daily th:nth-child(6), table.data.tbl-daily td:nth-child(6) { width: 17%; }
table.data td.num.neg { color: var(--neg); }
table.data td.num.muted, table.data td.muted { color: #b3b3bd; }

.caliber { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 0; border: 1px solid var(--line); border-radius: var(--r-sheet); background: var(--wash-2); padding: 11px 6px; margin-bottom: 14px; }
.cal-item { font-size: 12px; color: var(--ink-3); line-height: 1.5; padding: 3px 14px; border-left: 1px solid var(--line); }
.cal-item:first-child { border-left: 0; }
.cal-item b { color: var(--ink); font-weight: 600; }
.cal-item.quiet { color: #a3a3ac; font-variant-numeric: tabular-nums; }
.cal-item.ml-auto { margin-left: auto; }

.kpi4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kbox { border: 1px solid var(--line); border-radius: var(--r-sheet); background: #fff; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.k-label { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.k-value { font-size: 25px; font-weight: 600; letter-spacing: -.02em; line-height: 1.12; font-variant-numeric: tabular-nums; }
.k-foot { font-size: 11.5px; color: var(--ink-3); line-height: 1.45; }
.ktag { font-style: normal; font-size: 9.5px; letter-spacing: .05em; padding: 1px 5px; border-radius: 4px; background: #f0f0f3; color: #6a6a76; }
.ktag.rp1 { background: #e4f6ea; color: #17744a; }
.ktag.rp2 { background: #fdeedd; color: #9a5a08; }
.ktag.hold { background: #f0f0f3; color: var(--ink-2); }
.ktag.send { background: #e6edfe; color: #1c46c8; }

[data-mailpanel] .panel, .ledgerview .panel { margin-bottom: 14px; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h3 { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.panel-head .ph-note { font-size: 11.5px; color: var(--ink-3); }
.panel-head .ghost { margin-left: auto; }
.panel-body { padding: 14px 16px; }
.panel-body.promo { display: grid; grid-template-columns: minmax(0, 2fr) 76px 76px auto; gap: 8px; align-items: end; }
.panel-foot { font-size: 11.5px; color: var(--ink-3); line-height: 1.6; padding: 9px 16px; border-top: 1px solid var(--line); background: var(--wash-2); }
.panel-foot.row { display: flex; justify-content: space-between; gap: 12px; }

.payfilter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 16px; }
.pf-label { font-size: 12px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; flex: none; }
.pf-label .ic { width: 14px; height: 14px; color: var(--accent); }
.seg3 { display: flex; padding: 2px; border-radius: 9px; background: #f4f4f6; }
.seg3 button { height: 26px; padding: 0 11px; border-radius: 7px; font-size: 12px; color: var(--ink-3); white-space: nowrap; transition: .12s; }
.seg3 button.on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--line), 0 1px 1px rgba(15, 15, 20, .05); }
.pf-ck { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.pf-ck input { accent-color: var(--ink); margin: 0; }
.pf-note { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; margin-left: auto; max-width: 540px; }
.pf-note b { color: var(--ink); }
.pf-warn { font-size: 11.5px; color: var(--neg); }

.card-health { display: grid; grid-template-columns: 190px minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; align-items: start; }
.h-main { background: var(--wash-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.h-main span, .h-bars > span, .h-fail > span { font-size: 11px; color: var(--ink-3); }
.h-main b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.h-main small { font-size: 11px; color: var(--ink-3); }
.hbars { display: flex; align-items: flex-end; gap: 5px; height: 46px; margin-top: 8px; }
.hbar { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.hbar i { width: 100%; border-radius: 3px 3px 0 0; display: block; }
.hbar em { font-style: normal; font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.h-fail div { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--ink-2); padding: 4px 0; border-bottom: 1px solid var(--wash); }
.h-fail div:last-child { border-bottom: 0; }
.h-fail b { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }

.split.mail { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.split.mail > .panel { margin-bottom: 0; }
.mstack { display: flex; flex-direction: column; }
.mstack .panel:last-child { margin-bottom: 0; }

table.data.tbl-restock2 { table-layout: fixed; }
table.data.tbl-restock2 th:nth-child(1), table.data.tbl-restock2 td:nth-child(1) { width: 33%; }
table.data.tbl-restock2 th:nth-child(2), table.data.tbl-restock2 td:nth-child(2) { width: 41%; }
table.data.tbl-restock2 th:nth-child(3), table.data.tbl-restock2 td:nth-child(3) { width: 11%; }
table.data.tbl-restock2 th:nth-child(4), table.data.tbl-restock2 td:nth-child(4) { width: 15%; }
table.data.tbl-aud { table-layout: fixed; }
table.data.tbl-aud th:nth-child(1), table.data.tbl-aud td:nth-child(1) { width: 36%; }
table.data.tbl-aud th:nth-child(2), table.data.tbl-aud td:nth-child(2) { width: 8%; }
table.data.tbl-aud th:nth-child(3), table.data.tbl-aud td:nth-child(3) { width: 12%; }
table.data.tbl-aud th:nth-child(4), table.data.tbl-aud td:nth-child(4) { width: 20%; }
table.data.tbl-aud th:nth-child(5), table.data.tbl-aud td:nth-child(5) { width: 24%; }

.cust-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cust-line b { display: block; font-weight: 500; font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.cust-line small { display: block; font-size: 11px; color: var(--ink-3); }
.paytag { flex: none; font-size: 10px; font-weight: 600; line-height: 16px; padding: 0 5px; border-radius: 4px; background: #e6edfe; color: #1c46c8; }
.paytag.card { background: #ecebfb; color: #4745b8; }
.prod-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tbl-restock2 .prod-cell img { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.prod-cell b { display: block; font-weight: 500; font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.prod-cell small { font-size: 11px; color: var(--ink-3); }
[data-mailpanel] table.data td b, .ledgerview table.data td b { font-weight: 500; }
table.data td small { display: block; font-size: 11px; color: var(--ink-3); }
.mono-small { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.tiny { font-size: 11px; color: var(--ink-3); line-height: 1.5; }

.mail-mock { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 9px; }
.mm-top { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.mm-logo { font-size: 12px; font-weight: 700; letter-spacing: .2em; }
.mm-sub { font-size: 9.5px; color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; }
.mm-kicker { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.mm-h1 { font-size: 16px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.mm-p { font-size: 11.5px; line-height: 1.65; color: var(--ink-2); }
.mm-p b { color: var(--ink); font-weight: 600; }
.mm-cta { align-self: flex-start; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; padding: 7px 12px; border-radius: 6px; }
.mm-code { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.pf-field { display: flex; flex-direction: column; gap: 4px; }
.pf-field span { font-size: 10.5px; color: var(--ink-3); }
.pf-field.wide input { width: 100%; }
.send-body { display: flex; flex-direction: column; gap: 10px; }
.send-note { font-size: 11.5px; line-height: 1.6; color: var(--ink-2); }
.send-note b { color: var(--ink); font-weight: 600; }
.send-row { display: flex; align-items: center; gap: 8px; }
.send-row input { flex: 1 1 auto; }
.send-row.between { justify-content: space-between; }
.ck-row { display: flex; align-items: flex-start; gap: 7px; font-size: 11.5px; line-height: 1.55; color: var(--ink-2); }
.ck-row input { margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.ck-row b { color: var(--ink); font-weight: 600; }
.primary-block { width: 100%; height: 34px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 500; border: 1px solid var(--ink); }
.primary-block[disabled] { background: #ededf1; color: #a2a2ae; border-color: #ededf1; }
.result-line { border: 1px solid var(--line); background: var(--wash-2); border-radius: 8px; padding: 8px 10px; font-size: 11px; color: var(--ink-3); line-height: 1.5; }

.filter-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 16px; border-bottom: 1px solid var(--line); background: var(--wash-2); }
.filter-strip .pf-note { max-width: 320px; }
.schema { border: 1px solid var(--line); border-radius: 9px; background: var(--wash-2); padding: 10px 12px; font-family: var(--mono); font-size: 10.5px; line-height: 1.75; color: var(--ink-2); }
.schema b { color: var(--ink); font-weight: 600; }
.schema-note { font-size: 11.5px; line-height: 1.65; color: var(--ink-3); margin-top: 10px; }
.schema-note b { color: var(--ink-2); font-weight: 600; }
.schema-warn { font-size: 11.5px; line-height: 1.6; color: var(--neg); margin-top: 8px; }
.lazy-link { border: 1px solid #d8e2fb; background: var(--accent-wash); border-radius: 9px; padding: 10px 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.lazy-link > span { font-size: 11.5px; font-weight: 600; }
.lazy-link code { font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); word-break: break-all; }
.lazy-link small { font-size: 11px; color: var(--ink-3); line-height: 1.55; }
.lazy-link .row { display: flex; align-items: center; gap: 8px; }
.src-foot { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--ink-3); padding: 2px 2px 6px; }
[data-payrows] tr[hidden] { display: none; }
.split.even { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 14px; }
.split.even > .panel { margin-bottom: 0; }

/* ── 发货与订单台账 ──────────────────────────────────────────────────── */
body[data-view="ledger"] { --tone: var(--c-amber); }
body:not([data-view="ledger"]) .nav-sub[data-group="ledger"] .nav-subitem.is-active { color: var(--ink-3); font-weight: 400; }
body:not([data-view="ledger"]) .nav-sub[data-group="ledger"] .nav-subitem.is-active::before { display: none; }
@media (max-width: 1119px) {
  .split.mail, .split.even { grid-template-columns: minmax(0, 1fr); }
  .split.mail > .mstack .panel:last-child, .split.even > .panel:last-child { margin-bottom: 14px; }
  .card-health { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .card-health .h-main { grid-column: span 2; }
  .kpi4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-item { border-left: 0; padding: 4px 12px; }
  .cal-item.ml-auto { margin-left: 0; }
  .gate-cols { grid-template-columns: minmax(0, 1fr); }
  .pf-note { margin-left: 0; max-width: none; }
}
@media (max-width: 720px) {
  .kpi4 { grid-template-columns: minmax(0, 1fr); }
  .card-health { grid-template-columns: minmax(0, 1fr); }
  .card-health .h-main { grid-column: auto; }
  .gate-test { flex-wrap: wrap; }
  .ledger-strip .quiet { margin-left: 0; }
}

/* 发货台账：固定列宽 + 数字不换行（长金额的小字注释允许折行） */
table.data.tbl-ship, table.data.tbl-unret, table.data.tbl-outside,
table.data.tbl-ord, table.data.tbl-cross { table-layout: fixed; }
table.data.tbl-ship td, table.data.tbl-unret td, table.data.tbl-outside td,
table.data.tbl-ord td, table.data.tbl-cross td { white-space: normal; padding: 9px 10px; }
table.data.tbl-ship td.num, table.data.tbl-unret td.num, table.data.tbl-outside td.num,
table.data.tbl-ord td.num, table.data.tbl-cross td.num { white-space: nowrap; }
table.data.tbl-ord td.num small, table.data.tbl-ship td.num small { white-space: normal; display: block; }
table.data.tbl-ord td:nth-child(5) b, table.data.tbl-ship td:nth-child(5) b,
table.data.tbl-unret td:nth-child(5) b { line-height: 1.35; }

table.data.tbl-ship th:nth-child(1), table.data.tbl-ship td:nth-child(1) { width: 9%; }
table.data.tbl-ship th:nth-child(2), table.data.tbl-ship td:nth-child(2) { width: 15%; }
table.data.tbl-ship th:nth-child(3), table.data.tbl-ship td:nth-child(3) { width: 7%; }
table.data.tbl-ship th:nth-child(4), table.data.tbl-ship td:nth-child(4) { width: 10%; }
table.data.tbl-ship th:nth-child(5), table.data.tbl-ship td:nth-child(5) { width: 17%; }
table.data.tbl-ship th:nth-child(6), table.data.tbl-ship td:nth-child(6) { width: 5%; }
table.data.tbl-ship th:nth-child(7), table.data.tbl-ship td:nth-child(7) { width: 9%; }
table.data.tbl-ship th:nth-child(8), table.data.tbl-ship td:nth-child(8) { width: 11%; }
table.data.tbl-ship th:nth-child(9), table.data.tbl-ship td:nth-child(9) { width: 17%; }

table.data.tbl-unret th:nth-child(1), table.data.tbl-unret td:nth-child(1) { width: 10%; }
table.data.tbl-unret th:nth-child(2), table.data.tbl-unret td:nth-child(2) { width: 17%; }
table.data.tbl-unret th:nth-child(3), table.data.tbl-unret td:nth-child(3) { width: 8%; }
table.data.tbl-unret th:nth-child(4), table.data.tbl-unret td:nth-child(4) { width: 12%; }
table.data.tbl-unret th:nth-child(5), table.data.tbl-unret td:nth-child(5) { width: 16%; }
table.data.tbl-unret th:nth-child(6), table.data.tbl-unret td:nth-child(6) { width: 12%; }
table.data.tbl-unret th:nth-child(7), table.data.tbl-unret td:nth-child(7) { width: 12%; }
table.data.tbl-unret th:nth-child(8), table.data.tbl-unret td:nth-child(8) { width: 13%; }

table.data.tbl-outside th:nth-child(1), table.data.tbl-outside td:nth-child(1) { width: 10%; }
table.data.tbl-outside th:nth-child(2), table.data.tbl-outside td:nth-child(2) { width: 17%; }
table.data.tbl-outside th:nth-child(3), table.data.tbl-outside td:nth-child(3) { width: 8%; }
table.data.tbl-outside th:nth-child(4), table.data.tbl-outside td:nth-child(4) { width: 12%; }
table.data.tbl-outside th:nth-child(5), table.data.tbl-outside td:nth-child(5) { width: 9%; }
table.data.tbl-outside th:nth-child(6), table.data.tbl-outside td:nth-child(6) { width: 32%; }
table.data.tbl-outside th:nth-child(7), table.data.tbl-outside td:nth-child(7) { width: 12%; }

table.data.tbl-ord th:nth-child(1), table.data.tbl-ord td:nth-child(1) { width: 8%; }
table.data.tbl-ord th:nth-child(2), table.data.tbl-ord td:nth-child(2) { width: 12%; }
table.data.tbl-ord th:nth-child(3), table.data.tbl-ord td:nth-child(3) { width: 5.5%; }
table.data.tbl-ord th:nth-child(4), table.data.tbl-ord td:nth-child(4) { width: 10%; }
table.data.tbl-ord th:nth-child(5), table.data.tbl-ord td:nth-child(5) { width: 15%; }
table.data.tbl-ord th:nth-child(6), table.data.tbl-ord td:nth-child(6) { width: 4%; }
table.data.tbl-ord th:nth-child(7), table.data.tbl-ord td:nth-child(7) { width: 8.5%; }
table.data.tbl-ord th:nth-child(8), table.data.tbl-ord td:nth-child(8) { width: 11%; }
table.data.tbl-ord th:nth-child(9), table.data.tbl-ord td:nth-child(9) { width: 6.5%; }
table.data.tbl-ord th:nth-child(10), table.data.tbl-ord td:nth-child(10) { width: 6%; }
table.data.tbl-ord th:nth-child(11), table.data.tbl-ord td:nth-child(11) { width: 7%; }
table.data.tbl-ord th:nth-child(12), table.data.tbl-ord td:nth-child(12) { width: 6.5%; }

table.data.tbl-cross th:nth-child(1), table.data.tbl-cross td:nth-child(1) { width: 11%; }
table.data.tbl-cross th:nth-child(2), table.data.tbl-cross td:nth-child(2) { width: 18%; }
table.data.tbl-cross th:nth-child(3), table.data.tbl-cross td:nth-child(3) { width: 9%; }
table.data.tbl-cross th:nth-child(4), table.data.tbl-cross td:nth-child(4) { width: 9%; }
table.data.tbl-cross th:nth-child(5), table.data.tbl-cross td:nth-child(5) { width: 27%; }
table.data.tbl-cross th:nth-child(6), table.data.tbl-cross td:nth-child(6) { width: 14%; }
table.data.tbl-cross th:nth-child(7), table.data.tbl-cross td:nth-child(7) { width: 12%; }
table.data.tbl-ship, table.data.tbl-unret, table.data.tbl-outside,
table.data.tbl-ord, table.data.tbl-cross { font-size: 13px; }
table.data.tbl-ship td, table.data.tbl-unret td, table.data.tbl-outside td,
table.data.tbl-ord td, table.data.tbl-cross td { padding: 8px 10px; }

/* ── 客户池 / 分页 ───────────────────────────────────────────────────── */
.panel-body .filterbar { margin: 12px 0; }
.ph-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pool-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--ink-3); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.pool-summary b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ps-total { font-size: 13px; font-weight: 600; color: var(--ink); }
.ps-chase b { color: var(--warn); }
.ps-filter { margin-left: auto; font-family: var(--mono); }
.pool-caliber { margin: 12px 0 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--wash-2); display: flex; flex-direction: column; gap: 6px; }
.pool-caliber p { font-size: 11.5px; line-height: 1.75; color: var(--ink-3); }
.pool-caliber b { color: var(--ink); font-weight: 600; }
.pool-caliber .mk { font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.pool-filter { margin: 12px 0 10px; }
.date-field input { border: 0; outline: 0; background: none; font-family: var(--mono); font-size: 11.5px; color: var(--ink); width: 98px; }
.missing { color: var(--ink-3); }
.pool-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pool-tools .pt-label { font-size: 11.5px; color: var(--ink-3); margin-left: 4px; }
.pool-tools .pt-count { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pool-tools .chip { height: 26px; font-size: 11.5px; }

table.data.tbl-pool3 { table-layout: fixed; }
table.data.tbl-pool3 th:nth-child(1), table.data.tbl-pool3 td:nth-child(1) { width: 4%; }
table.data.tbl-pool3 th:nth-child(2), table.data.tbl-pool3 td:nth-child(2) { width: 25%; }
table.data.tbl-pool3 th:nth-child(3), table.data.tbl-pool3 td:nth-child(3) { width: 13%; }
table.data.tbl-pool3 th:nth-child(4), table.data.tbl-pool3 td:nth-child(4) { width: 17%; }
table.data.tbl-pool3 th:nth-child(5), table.data.tbl-pool3 td:nth-child(5) { width: 10%; }
table.data.tbl-pool3 th:nth-child(6), table.data.tbl-pool3 td:nth-child(6) { width: 10%; }
table.data.tbl-pool3 th:nth-child(7), table.data.tbl-pool3 td:nth-child(7) { width: 13%; }
table.data.tbl-pool3 th:nth-child(8), table.data.tbl-pool3 td:nth-child(8) { width: 8%; }
th.ck, td.ck { text-align: center; }
td.ck input { accent-color: var(--ink); margin: 0; }
.pool-email { font-family: var(--mono); font-size: 11.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.src-name { display: block; font-size: 12px; color: var(--ink-2); }
.src-stage { display: block; font-size: 11px; color: var(--ink-3); }
.src-stage.overdue { color: var(--warn); font-weight: 500; }
.mini-select { height: 24px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; font-size: 11.5px; color: var(--ink); padding: 0 4px; }
.shop-tag { font-size: 11.5px; color: var(--accent); }
td.amber { color: var(--warn); }
td.muted { color: #b3b3bd; }
.pool-flow { display: flex; flex-direction: column; gap: 7px; }
.pool-flow p { font-size: 11.5px; line-height: 1.75; color: var(--ink-3); }
.pool-flow b { color: var(--ink); font-weight: 600; }
.pool-flow code { font-family: var(--mono); font-size: 10.5px; background: var(--wash); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.pg-info { font-size: 11.5px; color: var(--ink-3); }
.pg-info b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pg-btns { display: flex; align-items: center; gap: 4px; }
.pg-num { height: 25px; min-width: 25px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pg-num.is-on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 500; }
.pg-gap { font-size: 11.5px; color: var(--ink-3); padding: 0 2px; }
.pool-filter .search-field { width: 180px; }
.pool-filter .name-field input { width: 148px; }
.pool-filter .field { font-size: 11.5px; }
.pool-table { overflow-x: auto; }
.pool-table table.data.tbl-pool3 { min-width: 1000px; }

/* ── WhatsApp 私域触达 ──────────────────────────────────────────────── */
body[data-view="whatsapp"] { --tone: var(--c-teal); }
.wa-content { max-width: 1560px; }
.wa-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.wa-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.wa-account { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 99px; background: #e8f6ee; color: #1a7f45; font-size: 12px; font-weight: 600; }
.wa-account .mono { font-family: var(--mono); font-size: 10.5px; font-weight: 400; color: #3d7a5c; }
.wa-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 99px; background: #f2f2f5; color: var(--ink-2); font-size: 12px; font-weight: 500; }
.wa-pill.warn { background: #fdf1e3; color: var(--warn); }
.wa-pill .dot { width: 5px; height: 5px; }

.wa-shell { display: grid; grid-template-columns: 296px minmax(0, 1fr) 348px; height: 964px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.wa-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.wa-col + .wa-col { border-left: 1px solid var(--line); }

.wa-list-head { padding: 12px 14px 8px; }
.wa-list-title { font-size: 12.5px; font-weight: 600; }
.wa-list-title small { font-weight: 400; font-size: 11px; color: var(--ink-3); margin-left: 5px; }
.wa-list-search { padding: 0 14px 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.wa-search { width: 100%; }
.wa-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.wa-filters button { height: 22px; padding: 0 9px; border-radius: 99px; background: #f2f2f5; color: var(--ink-3); font-size: 11px; font-weight: 500; }
.wa-filters button.is-on { background: var(--ink); color: #fff; }

.wa-list { flex: 1; overflow-y: auto; min-height: 0; }
.wa-conv { display: flex; gap: 10px; width: 100%; padding: 11px 14px; text-align: left; border-bottom: 1px solid #f2f2f5; background: none; }
.wa-conv:hover { background: #fafbfd; }
.wa-conv.is-on { background: var(--accent-wash); }
.wa-avatar { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #e8f6ee; color: #1a7f45; font-size: 13px; font-weight: 700; }
.wa-avatar.lg { width: 38px; height: 38px; font-size: 14px; }
.wa-avatar i { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #1a9a5c; border: 2px solid #fff; }
.wa-avatar i.warn { background: #d08a12; }
.wa-conv-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.wa-conv-top { display: flex; align-items: baseline; gap: 8px; }
.wa-conv-top b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-conv-top em { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; flex: none; }
.wa-conv-preview { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-conv-tags { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 1px; }
.wa-unread { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: #12a150; color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tag-order { font-size: 10px; padding: 1px 5px; border-radius: 4px; background: var(--accent-wash); color: #1c46c8; font-family: var(--mono); }
.tag-issue { font-size: 10px; padding: 1px 5px; border-radius: 4px; background: #fdf1e3; color: var(--warn); font-weight: 500; }
.tag { font-size: 10px; padding: 1px 5px; border-radius: 4px; background: #f2f2f5; color: var(--ink-3); }
.wa-conv-state { margin-left: auto; font-size: 10.5px; color: var(--ink-3); }
.wa-list-foot { display: flex; justify-content: space-between; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--wash-2); font-size: 11px; color: var(--ink-3); }

.wa-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--wash-2); }
.wa-thread-title { display: flex; align-items: center; gap: 8px; }
.wa-thread-title h2 { font-size: 14px; font-weight: 600; }
.wa-thread-sub { font-size: 11px; color: var(--ink-3); font-family: var(--mono); margin-top: 2px; }
.wa-thread-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.wa-icon-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--ink-3); }
.wa-icon-btn .ic { width: 14px; height: 14px; }

.wa-thread { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: linear-gradient(180deg, #fafbfd, #fff 40%); }
.wa-day { align-self: center; font-size: 10.5px; color: var(--ink-3); background: #f2f2f5; border-radius: 99px; padding: 2px 10px; margin-bottom: 2px; }
.wa-msg { display: flex; flex-direction: column; gap: 5px; max-width: 74%; }
.wa-msg.me { align-self: flex-end; align-items: flex-end; }
.wa-meta { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--ink-3); padding: 0 2px; }
.wa-tr-btn { font-size: 10px; padding: 1px 6px; border-radius: 5px; background: var(--accent-wash); color: #1c46c8; }
.wa-bubble { padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; line-height: 1.6; color: var(--ink); }
.wa-msg.me .wa-bubble { border-radius: 14px 14px 4px 14px; background: var(--accent); border-color: var(--accent); color: #fff; }
.wa-zh { font-size: 11px; line-height: 1.6; color: var(--ink-2); background: var(--accent-wash); border: 1px solid #dbe4fb; border-radius: 8px; padding: 6px 9px; max-width: 74%; }
.wa-zh b { color: #1c46c8; font-weight: 600; margin-right: 4px; }
.wa-annot { border-radius: 8px; padding: 7px 10px; max-width: none; }
.wa-annot b { color: #1c46c8; }

.wa-tpl { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--wash-2); flex-wrap: wrap; }
.wa-tpl-label { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--ink-3); flex: none; }
.wa-tpl-label .ic { width: 12px; height: 12px; }
.wa-tpl button { flex: none; height: 23px; padding: 0 9px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 11px; color: var(--ink-2); }
.wa-tpl button:hover { border-color: #c7d7fa; background: var(--accent-wash); color: #1c46c8; }

.wa-composer { border-top: 1px solid var(--line); padding: 10px 14px 11px; display: flex; flex-direction: column; gap: 8px; }
.wa-composer-row { display: flex; align-items: flex-end; gap: 8px; }
.wa-prod-btn { flex: none; height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
.wa-input { flex: 1; min-height: 40px; max-height: 92px; border: 1px solid var(--line); border-radius: 10px; background: var(--wash-2); padding: 9px 11px; font: inherit; font-size: 12.5px; line-height: 1.5; color: var(--ink); resize: none; }
.wa-input::placeholder { color: #a3a3ac; }
.wa-send { flex: none; height: 40px; padding: 0 18px; border-radius: 10px; background: #12a150; color: #fff; font-size: 12.5px; font-weight: 600; }
.wa-composer-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--ink-3); }
.wa-out { color: #1a7f45; font-weight: 600; }
.wa-expand { margin-left: auto; font-size: 11px; color: var(--ink-3); }

.wa-side-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px 0; border-bottom: 1px solid var(--line); }
.wa-tabs { display: flex; gap: 2px; }
.wa-tabs button { height: 30px; padding: 0 9px; font-size: 12px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; }
.wa-tabs button.is-on { color: #1c46c8; border-bottom-color: #1c46c8; }
.wa-side-meta { margin-left: auto; font-size: 10.5px; color: var(--ink-3); font-family: var(--mono); }
.wa-side { flex: 1; min-height: 0; overflow-y: auto; }

.wa-card { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.wa-card-top { display: flex; align-items: center; gap: 10px; }
.wa-card-top b { display: block; font-size: 13px; font-weight: 600; }
.wa-card-top small { display: block; font-size: 10.5px; color: var(--ink-3); font-family: var(--mono); margin-top: 2px; }
.wa-status-row { display: flex; gap: 4px; }
.wa-status-row button { height: 24px; padding: 0 10px; border-radius: 7px; background: #f2f2f5; font-size: 11px; color: var(--ink-3); }
.wa-status-row button.is-on { background: #fdf1e3; color: var(--warn); font-weight: 600; }
.wa-issue-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.wa-issue-row > span { font-size: 10.5px; color: var(--ink-3); margin-right: 2px; }
.wa-issue-row button { height: 22px; padding: 0 8px; border-radius: 6px; background: #f7f7f9; font-size: 10.5px; color: var(--ink-3); }
.wa-issue-row button.is-on { background: var(--accent-wash); color: #1c46c8; font-weight: 600; }
.wa-note { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 11px; line-height: 1.55; color: var(--ink-2); background: #fff; resize: none; }

.wa-sec { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.wa-sec h4 { display: flex; align-items: baseline; gap: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.wa-sec h4 span { margin-left: auto; font-size: 10px; letter-spacing: 0; text-transform: none; color: var(--ink-3); font-weight: 400; }
.wa-sec h4 a { margin-left: auto; font-size: 10px; letter-spacing: 0; text-transform: none; color: #1c46c8; font-weight: 500; }
.wa-vals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.wa-vals div { background: var(--wash-2); border-radius: 9px; padding: 8px 9px; }
.wa-vals b { display: block; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wa-vals small { display: block; margin-top: 2px; font-size: 10px; color: var(--ink-3); line-height: 1.35; }
.wa-order { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.wa-order-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wa-order-top .mono { font-family: var(--mono); font-size: 10.5px; color: var(--ink); }
.wa-amt { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wa-order-title { font-size: 11px; color: var(--ink-2); }
.wa-order-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10.5px; color: var(--ink-3); }
.ok-t { color: #1a7f45; }
.amber-t { color: var(--warn); }
.wa-kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--ink-2); }
.wa-kv .mono { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.wa-kv em { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.wa-tagrow { display: flex; flex-wrap: wrap; gap: 5px; }
.wa-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 99px; background: #f2f2f5; color: var(--ink-3); }
.wa-tag.on { background: var(--accent-wash); color: #1c46c8; font-weight: 500; }
.wa-hand p { font-size: 11px; line-height: 1.6; color: var(--ink-3); }
@media (max-width: 1279px) {
  .wa-shell { grid-template-columns: 264px minmax(0, 1fr) 320px; height: 820px; }
}
@media (max-width: 1119px) {
  .wa-shell { grid-template-columns: 1fr; height: auto; }
  .wa-col { max-height: none; }
  .wa-col-list, .wa-col-thread { border-left: 0; border-bottom: 1px solid var(--line); }
  .wa-list { max-height: 340px; }
  .wa-thread { max-height: 420px; }
  .wa-col-side { border-left: 0; }
}
.wa-thread > .wa-day { margin-top: auto; }
.wa-thread-title h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-thread-title .pill { flex: none; }
.wa-thread-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1365px) {
  .wa-tpl { flex-wrap: nowrap; overflow-x: auto; }
  .wa-thread { padding: 14px; }
  .wa-msg { max-width: 84%; }
  .wa-thread-actions .ghost.sm { display: none; }
}

/* ── 素材榜：小图 5 列 ──────────────────────────────────────────────── */
.creative-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.creative-grid .cc-body { padding: 7px 9px 9px; }
.creative-grid .cc-name { font-size: 11.5px; }
.creative-grid .cc-meta { font-size: 10px; }
.creative-grid .cc-stats { gap: 8px; margin-top: 6px; font-size: 10px; }
.creative-grid .cc-tag { left: 6px; top: 6px; font-size: 9.5px; padding: 1px 6px; }

/* ── 参考素材：排序条 / 小字 / 分页 ──────────────────────────────────── */
.ref-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ref-bar-title { font-size: 12px; font-weight: 600; }
.ref-bar-note { font-size: 11.5px; color: var(--ink-3); }
.ref-picked { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ref-strip { gap: 10px; }
.ref-meta { padding: 5px 7px; font-size: 10px; line-height: 1.35; }
.ref-sub { display: block; color: #a3a3ac; font-size: 9.5px; font-variant-numeric: tabular-nums; }
.ref-panel .pager { margin-top: 10px; }

/* ── 生成数量：预设 + 自定义 ────────────────────────────────────────── */
.qty-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qty-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); }
.qty-custom input { width: 58px; height: 26px; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; font: inherit; font-size: 11.5px; text-align: center; color: var(--ink); }
.qty-custom input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
@media (max-width: 1119px) {
  .creative-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .creative-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.creative-grid .cc-stats { flex-wrap: wrap; row-gap: 3px; }
.creative-grid .cc-stats span { white-space: nowrap; }
@media (max-width: 1365px) {
  .creative-grid .cc-stats { font-size: 9.5px; gap: 8px; }
}
.ref-card input { width: 15px; height: 15px; accent-color: var(--accent); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9), 0 1px 4px rgba(0, 0, 0, .3); border-radius: 4px; }
.wa-head-right { margin-left: auto; }

/* ── WhatsApp：整体字号上调 ─────────────────────────────────────────── */
.wa-account { font-size: 12.5px; }
.wa-account .mono { font-size: 11px; }
.wa-pill { font-size: 12.5px; }
.wa-list-title { font-size: 13.5px; }
.wa-list-title small { font-size: 12px; }
.wa-search input { font-size: 12.5px; }
.wa-filters button { height: 24px; font-size: 11.5px; }
.wa-conv-top b { font-size: 13.5px; }
.wa-conv-top em { font-size: 11px; }
.wa-conv-preview { font-size: 12.5px; }
.wa-unread { font-size: 10.5px; height: 17px; min-width: 17px; }
.tag-order, .tag-issue, .tag { font-size: 10.5px; padding: 1px 6px; }
.wa-conv-state { font-size: 11px; }
.wa-list-foot { font-size: 11.5px; }
.wa-avatar { width: 36px; height: 36px; font-size: 14px; }

.wa-thread-title h2 { font-size: 15.5px; }
.wa-thread-sub { font-size: 12px; }
.wa-meta { font-size: 11.5px; }
.wa-tr-btn { font-size: 10.5px; }
.wa-bubble { font-size: 13.5px; }
.wa-zh { font-size: 12px; }
.wa-tpl-label { font-size: 12px; }
.wa-tpl button { height: 25px; font-size: 12px; }

.wa-prod-btn { font-size: 12.5px; }
.wa-input { font-size: 13.5px; }
.wa-send { font-size: 13.5px; }
.wa-composer-foot { font-size: 11.5px; }
.wa-expand { font-size: 11.5px; }

.wa-tabs button { font-size: 13px; }
.wa-side-meta { font-size: 11px; }
.wa-card-top b { font-size: 14px; }
.wa-card-top small { font-size: 11.5px; }
.wa-status-row button { height: 25px; font-size: 11.5px; }
.wa-issue-row > span { font-size: 11px; }
.wa-issue-row button { height: 23px; font-size: 11px; }
.wa-note { font-size: 12px; }
.wa-sec h4 { font-size: 11px; }
.wa-sec h4 span, .wa-sec h4 a { font-size: 10.5px; }
.wa-vals b { font-size: 17px; }
.wa-vals small { font-size: 10.5px; }
.wa-order-top .mono { font-size: 11.5px; }
.wa-amt { font-size: 12.5px; }
.wa-order-title { font-size: 12px; }
.wa-order-foot { font-size: 11px; }
.wa-kv { font-size: 12.5px; }
.wa-kv .mono { font-size: 11.5px; }
.wa-kv em { font-size: 11px; }
.wa-tag { font-size: 11px; padding: 2px 9px; }
.wa-hand p { font-size: 12px; }
.wa-shell { grid-template-columns: 300px minmax(0, 1fr) 356px; }
@media (max-width: 1279px) {
  .wa-shell { grid-template-columns: 272px minmax(0, 1fr) 330px; }
}
.wa-thread-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.wa-thread-title { min-width: 0; }
.wa-thread-title h2 { min-width: 0; }
.wa-thread-actions { flex: 0 0 auto; }
@media (max-width: 1365px) {
  .wa-thread-actions .wa-icon-btn { display: none; }
}
@media (max-width: 1119px) {
  .wa-shell { grid-template-columns: 1fr; height: auto; }
}

/* ── 投放分析：账户绑定 / 投放明细（系列-广告组-素材） ───────────────── */
table.data.tbl-bind { table-layout: fixed; }
table.data.tbl-bind th:nth-child(1), table.data.tbl-bind td:nth-child(1) { width: 16%; }
table.data.tbl-bind th:nth-child(2), table.data.tbl-bind td:nth-child(2) { width: 15%; }
table.data.tbl-bind th:nth-child(3), table.data.tbl-bind td:nth-child(3) { width: 11%; }
table.data.tbl-bind th:nth-child(4), table.data.tbl-bind td:nth-child(4) { width: 6%; }
table.data.tbl-bind th:nth-child(5), table.data.tbl-bind td:nth-child(5) { width: 10%; }
table.data.tbl-bind th:nth-child(6), table.data.tbl-bind td:nth-child(6) { width: 10%; }
table.data.tbl-bind th:nth-child(7), table.data.tbl-bind td:nth-child(7) { width: 10%; }
table.data.tbl-bind th:nth-child(8), table.data.tbl-bind td:nth-child(8) { width: 12%; }
table.data.tbl-bind td { white-space: nowrap; }
table.data.tbl-bind td b { font-weight: 500; }
.ghost.xs.accent { color: var(--accent); border-color: #c7d7fa; }

table.data.tbl-ads { table-layout: fixed; }
table.data.tbl-ads th:nth-child(1), table.data.tbl-ads td:nth-child(1) { width: 30%; }
table.data.tbl-ads th:nth-child(2), table.data.tbl-ads td:nth-child(2) { width: 10%; }
table.data.tbl-ads th:nth-child(3), table.data.tbl-ads td:nth-child(3) { width: 9.5%; }
table.data.tbl-ads th:nth-child(4), table.data.tbl-ads td:nth-child(4) { width: 10%; }
table.data.tbl-ads th:nth-child(5), table.data.tbl-ads td:nth-child(5) { width: 8%; }
table.data.tbl-ads th:nth-child(6), table.data.tbl-ads td:nth-child(6) { width: 7%; }
table.data.tbl-ads th:nth-child(7), table.data.tbl-ads td:nth-child(7) { width: 5.5%; }
table.data.tbl-ads th:nth-child(8), table.data.tbl-ads td:nth-child(8) { width: 5.5%; }
table.data.tbl-ads th:nth-child(9), table.data.tbl-ads td:nth-child(9) { width: 7.5%; }
table.data.tbl-ads th:nth-child(10), table.data.tbl-ads td:nth-child(10) { width: 7%; }
table.data.tbl-ads td { white-space: nowrap; }
.ad-tree { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ad-tree b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-tree .ad-meta { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-caret { width: 14px; height: 14px; flex: none; color: var(--ink-3); font-size: 9px; line-height: 1; display: grid; place-items: center; border-radius: 3px; }
.ad-caret:hover { background: var(--wash); color: var(--ink); }
.ad-glyph { flex: none; font-size: 9.5px; padding: 1px 5px; border-radius: 4px; background: #f2f2f5; color: var(--ink-3); }
.ad-tree img { width: 24px; height: 24px; border-radius: 5px; object-fit: cover; flex: none; border: 1px solid var(--line); }
tr.ad-lv1 > td { background: #fcfcfd; }
tr.ad-lv1 .ad-glyph { background: var(--accent-wash); color: #1c46c8; }
tr.ad-lv2 .ad-glyph { background: #eef0f4; color: #55607a; }
tr.ad-lv3 .ad-glyph { background: #f4f4f6; color: #7b7b86; }
tr.ad-lv2 .ad-tree { padding-left: 16px; }
tr.ad-lv3 .ad-tree { padding-left: 40px; }
tr.ad-lv1 > td:first-child { border-left: 2px solid transparent; }
tr.ad-lv1 > td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
tr.collapsed > td:first-child { box-shadow: inset 2px 0 0 #dcdce2; }
tr.collapsed .ad-tree b { color: var(--ink-2); }
.pill.info { background: #e3eaff; color: #1c46c8; }
.pill.danger { background: #fde3e0; color: var(--neg); }
.ad-tree b { flex: 0 0 auto; max-width: 62%; }
.ad-tree .ad-meta { flex: 0 1 auto; min-width: 0; }
.table-wrap { overflow-x: auto; }
table.data.tbl-ads { min-width: 1040px; }
table.data.tbl-bind { min-width: 880px; }
@media (max-width: 1119px) {
  .section-head { flex-wrap: wrap; row-gap: 8px; }
  .section-head h2 { white-space: nowrap; }
  .section-head .actions { margin-left: 0; }
}

/* ── 账户消耗：紧凑工具栏 / 口径区 / 投放明细工具栏 ───────────────────── */
.ad-topbar { margin: 14px 0 12px; gap: 8px; }
.ad-q { width: 268px; }
.ad-sel { gap: 7px; padding-right: 4px; }
.ad-sel-label { font-size: 11.5px; color: var(--ink-3); }
.ad-sel select { border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--ink); padding: 0 2px; max-width: 210px; }
.ad-sel select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.ad-info { border: 1px solid var(--line); border-radius: 10px; background: var(--wash-2); padding: 11px 14px; margin: 0 0 14px; }
.ad-info p { font-size: 11.5px; line-height: 1.75; color: var(--ink-3); }
.ad-info p + p { margin-top: 4px; }
.ad-info b { color: var(--ink); font-weight: 600; }
.ad-info .lnk { color: var(--accent); }

.ad-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 12px; }
.ad-count { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-left: 2px; }
.ad-scope { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.seg .seg-num { font-size: 10.5px; color: var(--ink-3); margin-left: 3px; font-variant-numeric: tabular-nums; }
.seg button.on .seg-num { color: var(--ink-2); }

.ad-colset { position: relative; }
.ad-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 168px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 15, 20, .12); padding: 9px 11px; display: flex; flex-direction: column; gap: 7px; }
.ad-pop[hidden] { display: none; }
.ad-pop label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.ad-pop input { accent-color: var(--accent); }

table.data.tbl-adgrid { table-layout: fixed; min-width: 1040px; }
table.data.tbl-adgrid th:nth-child(1), table.data.tbl-adgrid td:nth-child(1) { width: 31%; }
table.data.tbl-adgrid th:nth-child(2), table.data.tbl-adgrid td:nth-child(2) { width: 9.5%; }
table.data.tbl-adgrid th:nth-child(3), table.data.tbl-adgrid td:nth-child(3) { width: 9.5%; }
table.data.tbl-adgrid th:nth-child(4), table.data.tbl-adgrid td:nth-child(4) { width: 9.5%; }
table.data.tbl-adgrid th:nth-child(5), table.data.tbl-adgrid td:nth-child(5) { width: 8.5%; }
table.data.tbl-adgrid th:nth-child(6), table.data.tbl-adgrid td:nth-child(6) { width: 7%; }
table.data.tbl-adgrid th:nth-child(7), table.data.tbl-adgrid td:nth-child(7) { width: 6%; }
table.data.tbl-adgrid th:nth-child(8), table.data.tbl-adgrid td:nth-child(8) { width: 6%; }
table.data.tbl-adgrid th:nth-child(9), table.data.tbl-adgrid td:nth-child(9) { width: 7%; }
table.data.tbl-adgrid th:nth-child(10), table.data.tbl-adgrid td:nth-child(10) { width: 6%; }
table.data.tbl-adgrid td { white-space: nowrap; }
table.data.tbl-adgrid th[data-sort] { cursor: pointer; user-select: none; }
table.data.tbl-adgrid th[data-sort]:hover { color: var(--ink); }
table.data.tbl-adgrid th.is-sorted::after { content: "↓"; margin-left: 4px; color: var(--accent); font-size: 10px; }
table.data.tbl-adgrid th.is-sorted[data-dir="asc"]::after { content: "↑"; }

.tbl-adgrid.hide-imp [data-col="imp"], .tbl-adgrid.hide-clicks [data-col="clicks"],
.tbl-adgrid.hide-ctr [data-col="ctr"], .tbl-adgrid.hide-cart [data-col="cart"],
.tbl-adgrid.hide-buy [data-col="buy"], .tbl-adgrid.hide-cpa [data-col="cpa"] { display: none; }

.ad-tree { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ad-tree b { font-weight: 500; font-size: 12.5px; flex: 0 0 auto; max-width: 54%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-tree .ad-meta { font-size: 11px; color: var(--ink-3); flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ad-tree img { width: 24px; height: 24px; border-radius: 5px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.ad-caret { width: 14px; height: 14px; flex: none; color: var(--ink-3); font-size: 9px; line-height: 1; display: grid; place-items: center; border-radius: 3px; }
.ad-caret:hover { background: var(--wash); color: var(--ink); }
.ad-caret.is-leaf { visibility: hidden; }
.ad-glyph { flex: none; font-size: 9.5px; padding: 1px 5px; border-radius: 4px; background: #f2f2f5; color: var(--ink-3); }
.ad-glyph.g-account { background: var(--ink); color: #fff; }
.ad-glyph.g-campaign { background: var(--accent-wash); color: #1c46c8; }
.ad-acc { flex: none; font-size: 10px; padding: 1px 5px; border-radius: 4px; background: #f2f2f5; color: var(--ink-3); font-family: var(--mono); }

tr.ad-account > td { background: #fbfbfd; }
tr.ad-account .ad-tree b { font-weight: 600; font-size: 13px; }
tr.ad-row.is-zero .ad-tree b { color: var(--ink-2); }
tr.ad-account > td:first-child { box-shadow: inset 2px 0 0 var(--ink); }
tr.ad-campaign > td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
tr.ad-campaign > td { background: #fdfdff; }
.ad-acctstate { font-size: 11.5px; color: var(--ink-3); }
.ad-empty { padding: 28px 16px; text-align: center; color: var(--ink-3); font-size: 12.5px; }

.ad-foot-main td { background: var(--wash-2); font-weight: 500; }
.ad-foot-main td:first-child { font-size: 12px; color: var(--ink-2); }
.ad-foot-scope td { background: #fff; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); padding: 8px 12px; }
@media (max-width: 1119px) {
  .ad-q { width: 200px; }
  .ad-scope { margin-left: 0; }
}
.ad-glyph.g-account { background: #ececf1; color: #3a3a44; }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.ad-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1279px) { .ad-topbar-right { margin-left: 0; } }

/* ── 账户绑定折叠面板 / 投放明细账户切换 ─────────────────────────────── */
.ad-fold { border: 1px solid var(--line); border-radius: var(--r-sheet); background: #fff; overflow: hidden; }
.ad-fold-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: var(--wash-2); }
.ad-fold.is-open .ad-fold-head { border-bottom: 1px solid var(--line); }
.ad-fold-toggle { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1 1 auto; text-align: left; }
.ad-fold-caret { font-size: 10px; color: var(--ink-3); transform: translateY(-1px); }
.ad-fold-toggle h2 { font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.ad-fold-toggle h2::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--tone, var(--c-blue)); margin-right: 8px; vertical-align: 3px; }
.ad-fold-note { font-size: 12.5px; color: var(--ink-3); }
.ad-fold-warn { font-size: 11.5px; color: var(--warn); }
.ad-fold-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ad-fold-body { padding: 14px; }
.ad-fold-body .table-wrap { margin-bottom: 0; }
.ad-fold-body .table-note { padding-top: 10px; }
.ad-fold:not(.is-open) .ad-fold-toggle h2 { color: var(--ink); }

.ad-acctpick { gap: 6px; height: 30px; }
.ad-acctpick select { border: 0; background: none; font: inherit; font-size: 12px; color: var(--ink); max-width: 178px; }
.ad-acctpick select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ad-acctclear { width: 16px; height: 16px; border-radius: 50%; background: #ececf1; color: var(--ink-2); font-size: 11px; line-height: 1; display: grid; place-items: center; }
.ad-acctclear[hidden] { display: none; }
.ad-range select { border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--ink); padding: 0 2px; }
.ad-range select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
