/* ============================================================
   经营分析看板 · 共享模板样式（蓝紫主题 v1 · 对齐【蓝紫主题】样式参考）
   唯一视觉入口：结构 / CSS / 章节变更只改本文件与 index.template.html，
   内部场景 worker 只产出快照 JSON，不得自定义样式。
   设计语言：浅紫底 + 悬浮圆角卡片 + 渐变品牌 hero + 蓝紫主色（#5b4dff）。
   仅样式改造，不改 renderer.js 的 DOM 结构与功能；所有功能钩子
   （t-hidden / sticky / sortable / fchip.on / snap-pop fixed / scroll-margin /
   empty-state / pending-box / 导出按钮 disabled）原样保留。
   ============================================================ */

[hidden]{display:none!important;}

/* ===== 设计 token 层（port 自样式参考，蓝紫主题） ===== */
:root{
  /* 基础面 / 边框 / 控件 */
  --bg-base-normal:#FCFCFC; --bg-card-z0:rgba(20,20,20,.04); --bg-card-z1:#FFFFFF;
  --border-light:rgba(20,20,20,.1); --border-medium:rgba(20,20,20,.15);
  --control-input-bg:#FFFFFF; --control-core-button-default:#141414;
  --overlay-on-container-hover:rgba(20,20,20,.04);
  /* 圆角 */
  --radius-xs:4px; --radius-sm:6px; --radius-md:8px; --radius-lg:10px; --radius-xl:12px;
  --radius-2xl:16px; --radius-3xl:20px; --radius-4xl:24px; --radius-full:999px;
  /* 间距 */
  --spacing-xxs:2px; --spacing-xs:4px; --spacing-sm:6px; --spacing-md:8px; --spacing-l:10px;
  --spacing-lg:12px; --spacing-xl:16px; --spacing-xxl:20px; --spacing-xxxl:24px; --spacing-xxxxl:32px;
  /* 字号 / 行高 */
  --font-size-label-footnote-400:12px; --font-size-body-small-400:13px; --font-size-body-base-400:14px;
  --font-size-action-large-500:14px; --font-size-heading-h5:16px; --font-size-heading-h4:18px;
  --font-size-heading-h3:20px; --font-size-heading-h2:24px; --font-size-heading-h1:32px; --font-size-title-super:40px;
  --line-height-heading-h5:24px; --line-height-heading-h4:26px; --line-height-heading-h3:28px;
  --line-height-heading-h2:32px; --line-height-heading-h1:40px; --line-height-title-super:48px;
  /* 状态色 */
  --status-error:#D9150B; --status-fill-error-accent:#F2180C; --status-fill-error-container:rgba(242,24,12,.06);
  --status-success:#20803E; --status-fill-success-accent:#41D87E; --status-fill-success-container:rgba(86,232,145,.122);
  --status-fill-warning-container:rgba(247,189,12,.12);
  /* 文本 */
  --text-base-primary:#141414; --text-base-secondary:rgba(20,20,20,.65);
  --text-inverted-primary:#FFFFFF; --text-inverted-secondary:rgba(255,255,255,.8); --text-inverted-disable:rgba(255,255,255,.2);
  /* 主题色阶 */
  --theme-black-black-5:rgba(0,0,0,.04); --theme-black-black-10:rgba(0,0,0,.07); --theme-black-black-20:rgba(0,0,0,.1);
  --theme-purple-purple-5:rgba(91,77,255,.071); --theme-purple-purple-10:rgba(91,77,255,.149); --theme-purple-purple-20:rgba(91,77,255,.302);
  --theme-purple-purple-50:#756DD9; --theme-purple-purple-60:#5950B2; --theme-purple-purple-70:#463F8C;
  --theme-red-red-5:rgba(242,24,12,.06); --theme-red-red-10:rgba(242,24,12,.2); --theme-red-red-20:rgba(242,24,12,.4);
  --theme-green-green-10:rgba(86,232,145,.4); --theme-green-green-20:rgba(86,232,145,.651);
  --theme-orange-orange-20:rgba(249,115,22,.4); --theme-orange-orange-50:#F97316;
  --theme-yellow-yellow-10:rgba(247,189,12,.3); --theme-yellow-yellow-20:rgba(247,189,12,.5); --theme-yellow-yellow-70:#806005;
  --theme-white-white-100:#FFFFFF;

  /* ===== 语义别名：既有 renderer / css 引用的变量名 → 新 token（零重命名成本） ===== */
  --blue:#5b4dff; --blue-bg:var(--theme-purple-purple-5);
  --bg:#f5f5fc; --card:var(--bg-card-z1);
  --ink:var(--text-base-primary); --sub:var(--text-base-secondary); --line:var(--border-light);
  --red:var(--status-error); --red-bg:var(--status-fill-error-container);
  --green:var(--status-success); --green-bg:var(--status-fill-success-container);
  --orange:var(--theme-yellow-yellow-70); --orange-bg:var(--status-fill-warning-container);
  --amber:var(--theme-yellow-yellow-70);
  --purple:var(--blue); --purple-bg:var(--blue-bg);
  --page:var(--bg); --muted:var(--sub);
}

/* ===== 基础 ===== */
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;scroll-padding-top:96px;}
body{font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--ink);line-height:1.68;padding-bottom:60px;font-size:var(--font-size-body-base-400);-webkit-font-smoothing:antialiased;}
.page{max-width:1380px;margin:0 auto;padding:var(--spacing-xxxxl) 22px var(--spacing-xxxl);}
button,select,input{font:inherit;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease;}
b,strong{font-weight:600;}
button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--blue);outline-offset:3px;}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important;}}

/* ===== 顶部品牌栏 ===== */
.topbar{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:var(--spacing-xl);}
.brand{display:flex;align-items:center;gap:9px;font-weight:600;font-size:15px;color:var(--ink);}
.brand span{display:grid;place-items:center;background:linear-gradient(135deg,#635bff,var(--blue));color:#fff;width:28px;height:28px;border-radius:var(--radius-md);font-size:13px;flex:none;box-shadow:0 4px 10px var(--theme-purple-purple-20);}
.topbar a{font-size:12px;color:var(--sub);text-decoration:none;}
.topbar a:hover{color:var(--blue);text-decoration:underline;}
.topbar-tools{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap;}

/* ===== 一屏总览 hero（渐变品牌卡 + 悬浮子卡） ===== */
.hero{background:transparent;border:0;box-shadow:none;overflow:visible;margin-bottom:var(--spacing-xxxl);}
.hero-head{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:var(--spacing-xxxxl);border:1px solid var(--theme-purple-purple-20);border-radius:var(--radius-3xl);background-color:var(--blue);background-image:radial-gradient(620px 210px at 82% -32%,var(--text-inverted-disable),transparent 70%),linear-gradient(118deg,var(--theme-purple-purple-60) 0%,var(--blue) 54%,var(--theme-purple-purple-50) 100%);box-shadow:0 12px 34px var(--theme-purple-purple-20),inset 0 1px 0 var(--text-inverted-disable);}
.hero-head::before{content:"";position:absolute;inset:0;z-index:-1;background-image:radial-gradient(circle,var(--text-inverted-disable) 1px,transparent 1.2px);background-size:20px 20px;background-position:10px 10px;opacity:.34;-webkit-mask-image:linear-gradient(90deg,transparent 24%,rgba(0,0,0,.18) 54%,#000 100%);mask-image:linear-gradient(90deg,transparent 24%,rgba(0,0,0,.18) 54%,#000 100%);pointer-events:none;}
.hero-head::after{content:"";position:absolute;z-index:-1;top:-92px;right:9%;width:240px;height:240px;border:1px solid var(--text-inverted-disable);border-radius:50%;box-shadow:0 0 0 28px var(--text-inverted-disable),0 0 0 56px var(--text-inverted-disable);opacity:.22;pointer-events:none;}
.hero-head>*{position:relative;z-index:1;}
.hh-left{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;min-width:0;}
.hh-right{margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:none;}
.hero-head h1{font-size:var(--font-size-heading-h1);line-height:var(--line-height-heading-h1);font-weight:600;letter-spacing:-.8px;color:var(--text-inverted-primary);}
.hero-date{font-size:var(--font-size-body-small-400);color:var(--text-inverted-secondary);}
.health-status{display:flex;align-items:center;gap:9px;background:var(--bg-card-z1);border:1px solid transparent;border-radius:var(--radius-full);padding:8px 14px;font-size:12px;color:var(--orange);box-shadow:0 6px 18px var(--theme-black-black-20);}
.health-status .lamp{width:8px;height:8px;border-radius:50%;background:var(--orange);flex:none;}
.health-status.ok{color:var(--green);} .health-status.ok .lamp{background:var(--green);}
.health-status.alarm{color:var(--red);} .health-status.alarm .lamp{background:var(--red);}
.health-status b{font-size:12.5px;font-weight:600;}
.hh-reset{border:1px solid rgba(255,255,255,.5);background:rgba(255,255,255,.16);color:#fff;border-radius:var(--radius-full);padding:6px 13px;font-size:12px;font-weight:600;cursor:pointer;}
.hh-reset:hover{background:rgba(255,255,255,.3);}

.hero-concl{padding:0;margin-top:var(--spacing-xxxl);background:transparent;border:0;}
.hc-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:var(--spacing-md);}
.hc-tag{flex:none;font-size:var(--font-size-label-footnote-400);font-weight:500;color:var(--red);background:var(--red-bg);border:1px solid var(--theme-red-red-10);border-radius:var(--radius-full);padding:4px 10px;}
.hc-headline{font-size:var(--font-size-heading-h3);line-height:var(--line-height-heading-h3);font-weight:600;color:var(--ink);letter-spacing:-.3px;min-width:0;}
.hc-headline b{color:var(--red);font-weight:600;}
.hc-subline{margin-top:2px;font-size:var(--font-size-body-base-400);color:var(--sub);line-height:1.7;}
.hc-base{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0;}
.hc-base .b-item{flex:1;min-width:220px;background:var(--card);border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-xl);padding:10px 14px;display:block;line-height:1.55;font-size:12.5px;color:var(--sub);box-shadow:0 2px 8px var(--theme-purple-purple-5);}
.hc-base .b-item .dot{display:inline-block;vertical-align:middle;width:8px;height:8px;border-radius:50%;margin-right:8px;flex:none;background:var(--green);}
.hc-base .b-item .dot.warn{background:var(--red);}
.hc-base .b-item b{color:var(--ink);}
.hc-focus-title{font-size:12px;font-weight:600;color:var(--sub);margin-bottom:8px;letter-spacing:.5px;}
.hc-item{display:flex;align-items:center;gap:12px;background:var(--card);border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-xl);padding:10px 14px;margin-bottom:8px;}
.hc-item:last-child{margin-bottom:0;}
.hc-item.hc-alarm{border-color:var(--theme-red-red-20);background:var(--red-bg);}
.hc-no{width:24px;height:24px;flex:none;border-radius:var(--radius-md);color:#fff;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;}
.hc-no.n1,.hc-no.n2,.hc-no.n3{background:var(--red);}
.hc-item .txt{flex:1;font-size:13px;color:var(--ink);line-height:1.5;min-width:0;}
.hc-item .txt b{font-weight:600;}
.hc-item .txt .sub{color:var(--sub);font-size:12px;}

.hero-body{display:grid;grid-template-columns:1.15fr .85fr;gap:var(--spacing-xxl);margin-top:var(--spacing-xxxl);}
.hero-kpis{min-width:0;}
.hero-kpis>h3{font-size:14px;color:var(--blue);margin:0 0 12px;font-weight:600;}
.hero-kpis .dash-cards{padding:0;margin:0;}
.hero-kpis .scope{display:flex;gap:12px;flex-wrap:wrap;padding:12px 0 0;font-size:11.5px;color:var(--sub);}
.hero-kpis .scope b{color:var(--ink);font-weight:600;}
.dash-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;align-content:start;}
.dcard{position:relative;overflow:hidden;background:var(--card);border:1px solid var(--theme-white-white-100);border-radius:var(--radius-2xl);padding:var(--spacing-xl);box-shadow:0 6px 20px var(--theme-purple-purple-5);cursor:default;}
.dcard::before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:4px;border-radius:0 4px 4px 0;background:var(--border-medium);}
.dcard .n{font-size:12px;color:var(--sub);line-height:1.4;}
.dcard .v{font-size:var(--font-size-heading-h2);line-height:var(--line-height-heading-h2);font-weight:600;letter-spacing:-.5px;margin:4px 0;color:var(--ink);font-variant-numeric:tabular-nums;}
.dcard .d{font-size:11.5px;font-weight:500;line-height:1.5;}
.dcard .d.up{color:var(--red);}
.dcard .d.down,.dcard .d.good{color:var(--green);}
.dcard .d.flat{color:var(--sub);}
.dcard.ok::before{background:var(--status-fill-success-accent);}
.dcard.watch::before{background:var(--theme-orange-orange-50);}
.dcard.watch .d{color:var(--theme-yellow-yellow-70);}
.dcard.alarm{background:var(--red-bg);border-color:var(--theme-red-red-20);}
.dcard.alarm::before{background:var(--status-fill-error-accent);}
.dcard.alarm .v,.dcard.alarm .d{color:var(--red);}

.todo{min-width:0;}
.todo h3{font-size:14px;margin:0 0 12px;color:var(--blue);font-weight:600;}
.todo-item{display:flex;gap:10px;padding:12px 14px;background:var(--card);border:1px solid var(--theme-white-white-100);border-radius:var(--radius-2xl);margin-bottom:8px;box-shadow:0 4px 14px var(--theme-purple-purple-5);cursor:default;}
.todo-content{flex:1;min-width:0;}
.todo-content>b{display:block;font-size:13px;color:var(--ink);}
.todo-content>p{font-size:11px;color:var(--sub);margin:2px 0 0;line-height:1.55;}
.todo-id{width:26px;height:26px;flex:none;border-radius:var(--radius-md);color:#fff;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#635bff,var(--blue));}
.todo-id.a1,.todo-id.a2,.todo-id.a3{background:linear-gradient(135deg,#635bff,var(--blue));}
.todo-item .t{font-size:13px;font-weight:600;color:var(--ink);}
.todo-item .r{font-size:11px;color:var(--sub);}
.todo-item .r b{color:var(--blue);font-weight:600;}
.todo-empty{padding:16px;background:var(--blue-bg);border:1px dashed var(--theme-purple-purple-20);border-radius:var(--radius-2xl);color:var(--sub);font-size:12px;line-height:1.6;}
.todo-empty b{display:block;color:var(--ink);font-size:13px;margin-bottom:3px;}
.todo-empty p{margin:0;}
.todo-link{display:inline-flex;align-items:center;width:max-content;max-width:100%;margin-top:8px;border:1px solid var(--theme-purple-purple-20);background:var(--card);color:var(--blue);border-radius:var(--radius-md);padding:5px 11px;font-size:11.5px;font-weight:600;line-height:1.35;cursor:pointer;white-space:normal;}
.todo-link:hover{background:var(--blue-bg);border-color:var(--blue);}
.disabled-link{pointer-events:none;cursor:not-allowed;opacity:.62;}

/* ===== 决策流三联卡（风险 → 归因 → 行动；对齐参考 .action-card 悬浮卡） ===== */
.decision-flow{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--spacing-xxl);margin-top:var(--spacing-xxl);}
.decision-step{position:relative;display:flex;flex-direction:column;min-height:200px;padding:var(--spacing-xxxl);background:var(--card);border:1px solid var(--theme-white-white-100);border-radius:var(--radius-3xl);box-shadow:0 8px 28px var(--theme-purple-purple-5),0 1px 3px var(--theme-black-black-5);transition:.15s;}
.decision-step:hover{border-color:var(--theme-purple-purple-10);box-shadow:0 12px 32px var(--theme-purple-purple-10);}
.decision-step .ds-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:var(--spacing-xl);}
.decision-step .ds-kicker{font-size:var(--font-size-body-base-400);color:var(--ink);font-weight:600;letter-spacing:0;}
.decision-step .ds-time{font-size:12px;color:var(--sub);background:var(--bg);border-radius:var(--radius-full);padding:4px 10px;white-space:nowrap;}
.decision-step .ds-metric{font-size:30px;line-height:1.15;font-weight:600;color:var(--red);letter-spacing:-1px;margin-bottom:12px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;}
.decision-step .ds-caption{display:block;margin:-5px 0 8px;font-size:13px;color:var(--ink);}
.decision-step.success .ds-metric{color:var(--green);}
.decision-step.watch .ds-metric{color:var(--orange);}
.decision-step p{margin:0;color:var(--sub);font-size:13px;line-height:1.7;}
.decision-link{margin-top:auto;width:100%;text-align:center;padding:10px 16px;border:1px solid transparent;border-radius:var(--radius-xl);color:#fff;background:linear-gradient(110deg,#635bff,var(--blue));box-shadow:0 5px 14px var(--theme-purple-purple-20);font-size:var(--font-size-action-large-500);font-weight:500;cursor:pointer;transition:filter .15s ease,transform .15s ease,box-shadow .15s ease;}
.decision-link:hover{background:linear-gradient(110deg,#635bff,var(--blue));filter:saturate(1.08) brightness(1.07);transform:translateY(-1px);box-shadow:0 8px 20px var(--theme-purple-purple-20);}
.decision-link:active{filter:saturate(1.04) brightness(.98);transform:translateY(0);}
.hero-detail{margin-top:var(--spacing-xl);}
.hero-detail .detail-body{padding:0 var(--spacing-xl) var(--spacing-xl);font-size:12.5px;color:var(--sub);line-height:1.7;}

/* ===== Tab（悬浮胶囊卡） ===== */
.tab-bar{position:sticky;top:0;z-index:50;display:flex;gap:var(--spacing-sm);background:var(--card);border:1px solid var(--theme-white-white-100);border-radius:var(--radius-2xl);padding:var(--spacing-sm);margin-bottom:var(--spacing-xxl);overflow-x:auto;box-shadow:0 4px 16px var(--theme-purple-purple-5);}
.tab-btn{flex:1;min-height:40px;display:flex;align-items:center;justify-content:center;gap:7px;border:0;background:transparent;border-radius:var(--radius-xl);padding:8px 12px;font-size:var(--font-size-body-base-400);font-weight:500;color:var(--sub);cursor:pointer;transition:.15s;white-space:nowrap;}
.tab-btn:hover{color:var(--blue);background:var(--blue-bg);}
.tab-btn.active{background:var(--blue)!important;color:#fff!important;box-shadow:0 4px 10px var(--theme-purple-purple-20);font-weight:500;}
.tab-btn .tno{width:22px;height:22px;flex:none;border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;font-size:12px;color:#fff;background:#8590a3!important;}
.tab-btn.active .tno{background:rgba(255,255,255,.28)!important;}
section.t-hidden{display:none;}

/* 全景功能模板使用一个公共总看板和一个动态专题面板。 */
.full-page .full-tabs{position:sticky;top:0;z-index:30;display:flex;gap:8px;min-height:66px;margin:0 0 16px;padding:10px 0;background:var(--bg);overflow-x:auto;scroll-margin-top:0;}
.tab-scroll-anchor{height:0;margin:0;padding:0;pointer-events:none;}
.full-page .full-tabs button{flex:1;min-width:100px;min-height:42px;border:1px solid var(--line);border-radius:var(--radius-lg);padding:11px 9px;background:var(--card);color:var(--sub);font-weight:600;cursor:pointer;white-space:nowrap;}
.full-page .full-tabs button:hover{color:var(--blue);border-color:var(--theme-purple-purple-20);background:var(--blue-bg);}
.full-page .full-tabs button.on{border-color:var(--blue);background:var(--blue-bg);color:var(--blue);box-shadow:inset 0 0 0 1px var(--theme-purple-purple-10);}
#full-panel{display:block;min-width:0;}

/* ===== 区块（悬浮圆角卡） ===== */
section{background:var(--card);border:1px solid var(--theme-white-white-100);border-radius:var(--radius-4xl);padding:var(--spacing-xxxl);margin-bottom:var(--spacing-xxl);scroll-margin-top:82px;box-shadow:0 8px 28px var(--theme-purple-purple-5);}
.card{background:var(--card);border:1px solid var(--theme-white-white-100);border-radius:var(--radius-4xl);padding:var(--spacing-xxxl);margin-bottom:var(--spacing-xxl);scroll-margin-top:132px;box-shadow:0 8px 28px var(--theme-purple-purple-5);min-width:0;}
.section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px;}
.section-head .section-no{display:block;color:var(--blue);font-size:10px;letter-spacing:1.8px;margin-bottom:4px;}
.scope-contract{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:14px 0;padding:12px 14px;border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-xl);background:var(--bg-base-normal);color:var(--sub);font-size:12px;line-height:1.5;}
.scope-contract strong,.scope-contract .scope-primary{color:var(--ink);font-style:normal;}
.scope-contract small{flex-basis:100%;color:var(--sub);font-style:normal;}
.period-cards{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;}
.period-card{display:grid;gap:7px;padding:16px;border:1px solid var(--line);border-radius:var(--radius-xl);background:var(--bg-base-normal);font-style:normal;}
.period-card.on{border-color:var(--theme-purple-purple-20);box-shadow:inset 4px 0 0 var(--blue);}
.period-card>b{font-size:24px;line-height:1.2;font-style:normal;}
.period-card>small{color:var(--sub);font-style:normal;}
.period-card-state,.period-badge{display:inline-flex;width:max-content;max-width:100%;padding:3px 8px;border-radius:var(--radius-full);background:var(--blue-bg);color:var(--blue);font-size:11px;font-weight:600;font-style:normal;}
.period-badge.cross{background:var(--theme-orange-orange-10);color:var(--orange);}
.section-head h2{font-size:var(--font-size-heading-h3);line-height:var(--line-height-heading-h3);font-weight:600;color:var(--ink);letter-spacing:-.3px;}
.section-head .desc{font-size:12.5px;color:var(--sub);margin-top:4px;line-height:1.6;}
.sec-head{display:flex;align-items:center;gap:12px;margin-bottom:4px;}
.sec-num{display:none;}
.sec-head h2{font-size:var(--font-size-heading-h3);line-height:var(--line-height-heading-h3);font-weight:600;color:var(--ink);letter-spacing:-.3px;}
.sec-src{font-size:var(--font-size-label-footnote-400);color:var(--sub);margin-bottom:14px;line-height:1.7;}
.sec-src b{color:var(--blue);font-weight:600;}
h3{font-size:var(--font-size-heading-h5);font-weight:600;color:var(--ink);margin:var(--spacing-xxxl) 0 var(--spacing-lg);letter-spacing:-.2px;}
h3::before{display:none;}

/* 每专题摘要卡（section 头部，非嵌套盒） */
.full-topic-summary{margin-bottom:4px;}
.full-topic-summary .section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:6px;}
.full-topic-summary .section-head h2{font-size:var(--font-size-heading-h3);line-height:1.4;font-weight:600;color:var(--ink);letter-spacing:-.3px;}
.full-topic-summary .section-head .desc{font-size:12.5px;color:var(--sub);margin-top:4px;line-height:1.6;}
.full-topic-summary .full-topic-kpis{margin:14px 0 4px;}

/* 专题目录 local-nav（吸顶于 full-tabs 下方） */
.local-nav{position:sticky;top:64px;z-index:20;display:flex;gap:8px;padding:8px 0;margin:0 0 16px;overflow-x:auto;background:var(--card);}
.local-nav a{flex:none;min-width:116px;padding:9px 14px;background:var(--card);border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-lg);font-size:13px;font-weight:500;color:var(--sub);text-align:center;text-decoration:none;cursor:pointer;transition:.15s;}
.local-nav a:hover{color:var(--blue);border-color:var(--theme-purple-purple-20);background:var(--blue-bg);}
.local-nav a.active{color:#fff;background:var(--blue);border-color:var(--blue);}
.full-page .tab-bar{min-height:60px;}
.full-page .local-nav{top:64px;}
.full-page section [id]{scroll-margin-top:132px;}

/* ===== 图表 / 表格 ===== */
.chart{width:100%;height:300px;}
.chart-sm{width:100%;height:250px;}
.chart.tall{height:345px;}
.chart-box{min-width:0;}
.chart-box h4{font-size:13px;margin-bottom:8px;}
.mobile-tip{display:none;}
.table-wrap{max-width:100%;overflow:auto;border:1px solid var(--line);border-radius:var(--radius-lg);}
.table-wrap table{margin-top:0;}
table{width:100%;border-collapse:separate;border-spacing:0;font-size:var(--font-size-body-small-400);margin-top:4px;font-variant-numeric:tabular-nums;}
th{background:var(--bg);color:var(--sub);font-weight:500;font-size:var(--font-size-label-footnote-400);text-align:left;padding:var(--spacing-lg);border-bottom:1px solid var(--theme-purple-purple-10);white-space:nowrap;}
th:first-child{border-radius:var(--radius-lg) 0 0 var(--radius-lg);}
th:last-child{border-radius:0 var(--radius-lg) var(--radius-lg) 0;}
td{padding:14px var(--spacing-lg);border-bottom:1px solid var(--theme-purple-purple-5);vertical-align:middle;background:var(--card);line-height:1.65;}
td b{font-weight:600;}
tbody tr:hover td{background:var(--blue-bg);}
tr:last-child td{border-bottom:none;}
tr.row-alarm td{background:var(--red-bg);}
tr.row-watch td{background:var(--orange-bg);}
tbody tr.row-alarm:hover td{background:var(--theme-red-red-10);}
tbody tr.row-watch:hover td{background:var(--theme-yellow-yellow-10);}
.clickable-row{cursor:pointer;}
.clickable-row:focus{outline:2px solid var(--blue);outline-offset:-2px;}
.trend-up{color:var(--red);font-weight:600;}
.trend-down,.trend-pos{color:var(--green);font-weight:600;}
.tag{display:inline-block;border-radius:var(--radius-sm);padding:2px 8px;font-size:var(--font-size-label-footnote-400);font-weight:500;line-height:1.5;}
.tag.blue,.tag.purple{background:var(--blue-bg);color:var(--blue);}
.tag.red{background:var(--red-bg);color:var(--red);}
.tag.orange{background:var(--orange-bg);color:var(--orange);}
.tag.green{background:var(--green-bg);color:var(--green);}
.tag.amber{background:var(--orange-bg);color:var(--amber);}
.tag.gray{background:var(--bg-card-z0);color:var(--sub);}
.abn-badge{display:inline-block;color:var(--red);background:var(--red-bg);border:1px solid var(--theme-red-red-10);border-radius:var(--radius-sm);padding:0 6px;font-size:var(--font-size-label-footnote-400);font-weight:500;margin-right:5px;}
@keyframes abnPulse{0%,100%{opacity:1;}50%{opacity:.55;}}

/* 可排序表头 */
th.sortable{cursor:pointer;user-select:none;}
th.sortable:hover{color:var(--blue);}
th.sortable::after{content:"  ⇅";font-size:10px;color:var(--sub);font-weight:400;}
th.sort-asc::after{content:"  ↑";color:var(--blue);font-weight:600;}
th.sort-desc::after{content:"  ↓";color:var(--blue);font-weight:600;}

/* 商品图 + 链接 */
.goods-cell{display:flex;align-items:center;gap:12px;min-width:250px;max-width:330px;}
.goods-cell img{width:42px;height:42px;border-radius:var(--radius-sm);border:1px solid var(--border-light);object-fit:cover;flex:none;background:#f5f6fa;}
.goods-cell .gc-noimg{width:42px;height:42px;border-radius:var(--radius-sm);border:1px dashed var(--border);flex:none;display:flex;align-items:center;justify-content:center;font-size:11px;color:var(--sub);background:var(--bg);}
.goods-cell .gc-txt{min-width:0;}
.goods-cell .gc-title{font-size:var(--font-size-body-small-400);line-height:1.4;font-weight:500;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:250px;}
.goods-cell .gc-id{font-size:var(--font-size-label-footnote-400);color:var(--sub);}
.goods-cell .gc-id a{color:var(--blue);text-decoration:none;}
.goods-cell .gc-id a:hover{text-decoration:underline;}
.goods-cell .gc-id-actions{display:flex;align-items:center;flex-wrap:wrap;gap:2px 4px;line-height:16px;}
.item-inline-actions{display:inline-flex;align-items:center;gap:3px;vertical-align:baseline;white-space:nowrap;}
.item-inline-actions .tag{height:16px;min-height:0;margin:0;padding:0 4px;border-radius:3px;font-size:9px;font-weight:500;line-height:14px;}
.item-inline-actions .button{height:16px;min-width:0;min-height:0;padding:0 4px;border-radius:3px;font-size:10px;font-weight:500;line-height:14px;box-shadow:none;white-space:nowrap;}

/* ===== 筛选栏 / 档位自定义 ===== */
.filter-bar{display:flex;gap:var(--spacing-md);flex-wrap:wrap;align-items:center;margin:var(--spacing-lg) 0;}
.fchip{min-height:32px;border:1px solid var(--border-light);background:var(--card);border-radius:var(--radius-lg);padding:4px 13px;font-size:var(--font-size-body-small-400);font-weight:400;color:var(--sub);cursor:pointer;transition:.15s;}
.fchip:hover{border-color:var(--theme-purple-purple-20);color:var(--blue);}
.fchip.on,.fchip.on.hot{background:var(--blue-bg);border-color:var(--theme-purple-purple-20);color:var(--blue);font-weight:500;}
.fchip b{font-weight:600;margin-left:4px;font-variant-numeric:tabular-nums;}
select.fsel{border:1px solid var(--border-medium);border-radius:var(--radius-md);padding:5px 8px;font-size:12px;color:var(--ink);background:var(--control-input-bg);cursor:pointer;}
.fmeta{font-size:var(--font-size-label-footnote-400);color:var(--sub);margin-left:auto;}
.tier-toolbar{display:flex;gap:var(--spacing-lg);align-items:center;margin:8px 0;}
.tt-label{font-size:var(--font-size-body-small-400);font-weight:500;color:var(--sub);}
.tt-btn{min-height:32px;border:1px solid var(--border-light);background:var(--card);border-radius:var(--radius-lg);padding:6px 18px;font-size:var(--font-size-body-small-400);font-weight:500;color:var(--sub);cursor:pointer;transition:.15s;}
.tt-btn:hover{border-color:var(--theme-purple-purple-20);color:var(--blue);}
.tt-btn.on{background:var(--blue-bg);border-color:var(--theme-purple-purple-20);color:var(--blue);}
.tier-editor{display:flex;gap:var(--spacing-lg);flex-wrap:wrap;align-items:center;background:var(--blue-bg);border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-xl);padding:12px 16px;margin:8px 0;}
.tier-editor .te-item{display:flex;align-items:center;gap:5px;font-size:var(--font-size-body-small-400);color:var(--sub);font-weight:500;}
.tier-editor input{width:72px;min-height:32px;border:1px solid var(--border-medium);border-radius:var(--radius-md);padding:3px 6px;font-size:12px;font-variant-numeric:tabular-nums;}
.tier-editor .te-btn{border:0;background:var(--blue);color:#fff;border-radius:var(--radius-lg);padding:6px 14px;font-size:12px;font-weight:500;cursor:pointer;}

/* ===== 布局 / 面板 / KPI chip / 货盘卡 ===== */
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-xxl);}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--spacing-xxl);}
.grid-main{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(250px,.75fr);gap:var(--spacing-xxl);align-items:start;}
.analysis-list{display:grid;gap:10px;}
.analysis-item{border:1px solid var(--line);border-radius:var(--radius-xl);padding:13px 14px;background:var(--card);}
.analysis-item .label{font-size:10px;color:var(--sub);}
.analysis-item b{font-size:15px;display:block;margin:4px 0;}
.analysis-item p{color:var(--sub);font-size:11px;line-height:1.55;}
.calendar{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:6px;margin:13px 0;}
.calendar .day{min-width:0;border:1px solid var(--line);border-radius:var(--radius-md);padding:7px 4px;background:var(--card);color:var(--sub);font-size:10px;cursor:pointer;}
.calendar .day b{display:block;margin-top:2px;color:var(--ink);font-size:11px;}
.calendar .day.alert{border-color:var(--theme-red-red-20);background:var(--red-bg);}
.calendar .day.on{border-color:var(--blue);box-shadow:inset 0 0 0 1px var(--blue);color:var(--blue);}
.panel{border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-3xl);padding:var(--spacing-xxl);background:var(--card);min-width:0;}
.panel h4{font-size:var(--font-size-body-base-400);font-weight:600;color:var(--ink);margin-bottom:var(--spacing-xl);}
.kpi-chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px;}
.kpi-chip{flex:1;min-width:96px;background:var(--bg);border:0;border-radius:var(--radius-xl);padding:12px 8px;text-align:center;}
.kpi-chip .t{font-size:var(--font-size-label-footnote-400);color:var(--sub);}
.kpi-chip .v{font-size:var(--font-size-heading-h4);font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums;}
.kpi-chip .v em{font-style:normal;font-size:12px;font-weight:600;margin-left:2px;}
.kpi-chip .d{font-size:var(--font-size-label-footnote-400);font-weight:600;}
.tier-cards{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin:10px 0;}
.tcard{border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-2xl);padding:var(--spacing-xl);background:var(--card);position:relative;cursor:pointer;transition:.15s;}
.tcard:hover{border-color:var(--theme-purple-purple-20);}
.tcard.tsel{outline:2px solid var(--blue);outline-offset:1px;}
.tcard.tempty{opacity:.55;}
.tcard .tc-tip{display:inline-flex;align-items:center;margin-top:9px;border:1px solid var(--border-light);border-radius:var(--radius-sm);padding:4px 8px;background:var(--card);color:var(--blue);font-size:var(--font-size-label-footnote-400);font-weight:400;}
.tcard .tc-grade{position:absolute;top:10px;right:10px;width:26px;height:26px;border-radius:var(--radius-md);color:#fff;font-weight:600;display:flex;align-items:center;justify-content:center;font-size:14px;}
.tcard .tc-n{font-size:var(--font-size-label-footnote-400);color:var(--sub);}
.tcard .tc-amount-label{font-size:var(--font-size-label-footnote-400);color:var(--sub);margin-top:8px;}
.tcard .tc-v{font-size:var(--font-size-heading-h4);font-weight:600;margin:2px 0 7px;font-variant-numeric:tabular-nums;}
.tcard .tc-row{display:flex;justify-content:space-between;font-size:var(--font-size-label-footnote-400);color:var(--sub);border-top:1px solid var(--border-light);padding-top:6px;margin-top:6px;}
.tcard .tc-row b{color:var(--ink);font-weight:600;}
.tcard.tc-best{border-color:var(--theme-purple-purple-20);background:var(--blue-bg);}
.tcard.tc-risk{border-color:var(--theme-red-red-20);background:var(--red-bg);}

/* ===== 诊断 / 规则 / 文本行 ===== */
.diag{border:1px solid transparent;border-radius:var(--radius-2xl);padding:var(--spacing-xl) var(--spacing-xxl);font-size:13px;margin-bottom:14px;line-height:1.75;}
.diag.danger{color:var(--red);background:var(--red-bg);border-color:var(--theme-red-red-20);}
.diag.warn{color:var(--orange);background:var(--orange-bg);border-color:var(--theme-yellow-yellow-20);}
.diag.good{color:var(--green);background:var(--green-bg);border-color:var(--theme-green-green-20);}
.diag b.t{font-weight:600;}
.diag.danger b.t{color:var(--red);}
.diag.warn b.t{color:var(--orange);}
.diag.good b.t{color:var(--green);}
.action-jumps{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px;}
.action-jump{min-height:32px;border:1px solid var(--theme-purple-purple-10);background:var(--card);color:var(--blue);border-radius:var(--radius-lg);padding:5px 12px;font-size:var(--font-size-body-small-400);font-weight:400;cursor:pointer;transition:.15s;}
.action-jump:hover{background:var(--blue-bg);border-color:var(--theme-purple-purple-20);}
.diag-note{display:block;margin-top:7px;font-size:12px;font-weight:400;color:var(--sub);}
.rule{background:var(--bg-base-normal);border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-xl);padding:12px 16px;font-size:var(--font-size-label-footnote-400);margin-top:12px;line-height:1.75;color:var(--ink);}
.rule b{color:var(--blue);font-weight:500;}
.rule.warn{color:var(--orange);background:var(--orange-bg);border-color:var(--theme-yellow-yellow-20);}
.rule.warn b{color:var(--orange);}
.caliber-lines{display:grid;gap:6px;}
.caliber-lines>div{padding-left:14px;position:relative;}
.caliber-lines>div::before{content:'•';position:absolute;left:0;color:var(--sub);font-weight:800;}
.text-lines{display:grid;gap:6px;margin-top:5px;}
.text-lines>div{line-height:1.65;}
.text-lines.numbered{counter-reset:item;}
.text-lines.numbered>div{position:relative;padding-left:24px;}
.text-lines.numbered>div::before{counter-increment:item;content:counter(item);position:absolute;left:0;top:1px;width:17px;height:17px;border-radius:var(--radius-xs);color:var(--sub);font-size:12px;font-weight:400;text-align:center;line-height:17px;}

/* ===== 状态条 / 健康摘要 / 折叠卡 / 标签行 / 规则编辑器 / 任务卡 ===== */
.status-strip{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin:12px 0 16px;}
.status-item{border:1px solid var(--border-light);border-radius:var(--radius-md);padding:var(--spacing-xl);background:var(--bg-base-normal);}
.status-item .st{font-size:var(--font-size-label-footnote-400);color:var(--sub);font-weight:400;}
.status-item .sv{font-size:14px;font-weight:600;margin-top:2px;}
.status-item.bad{color:var(--red);background:var(--red-bg);border-color:var(--theme-red-red-20);}
.status-item.warn{color:var(--orange);background:var(--orange-bg);border-color:var(--theme-yellow-yellow-20);}
.status-item.good{color:var(--green);background:var(--green-bg);border-color:var(--theme-green-green-20);}
.status-item.pending{border-style:dashed;color:var(--sub);background:var(--card);border-color:var(--line);}
.health-summary{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:10px;margin:12px 0 6px;}
.health-summary .hs-main,.health-summary .hs-item{border-radius:var(--radius-xl);padding:var(--spacing-xxl);background:var(--card);}
.health-summary .hs-main{color:var(--red);background:var(--red-bg);border:1px solid var(--theme-red-red-20);}
.health-summary .hs-item{border:1px solid var(--theme-purple-purple-10);background:var(--bg-base-normal);}
.health-summary .hs-kicker{font-size:var(--font-size-label-footnote-400);color:var(--sub);font-weight:400;}
.health-summary .hs-value{font-size:var(--font-size-heading-h4);font-weight:600;margin-top:2px;}
.health-summary .hs-main .hs-value{color:var(--red);}
.health-summary .hs-desc{font-size:12px;color:var(--sub);margin-top:3px;}
details.more{margin-top:16px;border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-2xl);background:var(--card);overflow:hidden;}
details.more>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;cursor:pointer;color:var(--ink);font-weight:500;font-size:13px;list-style:none;padding:var(--spacing-xl);background:var(--bg-base-normal);}
details.more>summary::-webkit-details-marker{display:none;}
details.more>summary::after{content:'展开 ↓';flex:none;font-size:var(--font-size-label-footnote-400);font-weight:400;color:var(--sub);}
details.more>summary:hover{background:var(--blue-bg);}
details.more[open]>summary{color:var(--ink);background:var(--bg-base-normal);border-bottom:1px solid var(--border-light);}
details.more[open]>summary::after{content:'收起 ↑';color:var(--sub);}
details.more[open]{padding-bottom:var(--spacing-xl);}
details.more[open]>:not(summary){max-width:calc(100% - 32px);margin-left:16px;margin-right:16px;}
details.more[open]>.table-wrap{margin-top:var(--spacing-xl);}
details.more[open]>:last-child{margin-bottom:0;}
.summary-line{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 14px;}
.summary-line span{font-size:12px;color:var(--blue);background:var(--blue-bg);border:0;border-radius:var(--radius-full);padding:4px 12px;font-weight:400;}
.rule-editor{display:grid;grid-template-columns:repeat(4,minmax(145px,1fr)) auto;gap:10px;align-items:end;border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-md);padding:14px;background:var(--blue-bg);}
.rule-field label{display:block;font-size:var(--font-size-label-footnote-400);color:var(--sub);font-weight:500;margin-bottom:4px;}
.rule-field input{width:100%;min-height:36px;border:1px solid var(--border-medium);border-radius:var(--radius-md);padding:7px 8px;background:var(--control-input-bg);font-variant-numeric:tabular-nums;}
.rule-apply{min-height:36px;border:0;border-radius:var(--radius-lg);background:var(--blue);color:#fff;padding:8px 16px;font-weight:500;cursor:pointer;}
.task-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;}
.task-card{border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-2xl);padding:var(--spacing-xl);display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:start;background:var(--card);}
.task-card input{margin-top:4px;width:16px;height:16px;accent-color:var(--blue);}
.task-card .task-name{font-weight:600;font-size:13px;}
.task-card .task-desc{font-size:12px;color:var(--sub);margin-top:2px;line-height:1.7;}
.task-card .todo-link{align-self:center;white-space:nowrap;}
.task-card.done{opacity:.62;}
.task-card.done .task-name{text-decoration:line-through;}
.freq{font-size:var(--font-size-label-footnote-400);background:var(--blue-bg);color:var(--blue);border-radius:var(--radius-full);padding:3px 8px;white-space:nowrap;}
.note{font-size:var(--font-size-label-footnote-400);color:var(--sub);margin-top:8px;line-height:1.75;}
.ops-supplement{padding:8px 0 4px;}

/* ===== 新模板组件：度量格 / 情景卡 / 观察线 / 工具条 / 按钮 / 周期 / 通用件 ===== */
.metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:12px 0;}
.metrics.four{grid-template-columns:repeat(4,minmax(0,1fr));}
.metrics.three{grid-template-columns:repeat(3,minmax(0,1fr));}
.metric{border:1px solid var(--theme-white-white-100);border-radius:var(--radius-xl);padding:var(--spacing-xl);background:var(--bg-base-normal);min-width:0;box-shadow:0 2px 8px var(--theme-purple-purple-5);}
.metric .label{font-size:var(--font-size-label-footnote-400);color:var(--sub);}
.metric .value{font-size:22px;font-weight:600;margin:2px 0;line-height:1.3;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;color:var(--ink);}
.metric .sub{font-size:var(--font-size-label-footnote-400);color:var(--sub);line-height:1.5;}
.metric .sub:empty{display:none;}
.metric.alert{background:var(--red-bg);border-color:var(--theme-red-red-20);}
.metric.alert .value{color:var(--red);}
.metric.good{background:var(--green-bg);border-color:var(--theme-green-green-20);}
.metric.good .value{color:var(--green);}
.scenario{border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-2xl);padding:16px 18px;background:var(--bg-base-normal);margin:10px 0;}
.scenario>h3{margin-top:0;}
.scenario .controls{margin:10px 0;}
.takeaway{background:var(--blue-bg);border-left:3px solid var(--blue);border-radius:0 var(--radius-md) var(--radius-md) 0;padding:11px 14px;font-size:12.5px;margin-top:12px;line-height:1.7;}
.takeaway b{color:var(--blue);}
.notice{margin-top:var(--spacing-xl);padding:12px 14px;border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-xl);background:var(--bg-base-normal);color:var(--sub);font-size:var(--font-size-body-small-400);line-height:1.75;}
.notice p+p{margin-top:var(--spacing-md);}
.error-line{color:var(--red);font-size:12.5px;font-weight:600;margin:10px 0;}
.obs-editor{display:grid;grid-template-columns:repeat(4,minmax(145px,1fr));gap:12px;align-items:end;border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-md);padding:14px;background:var(--blue-bg);margin:8px 0;}
.obs-field label{display:block;font-size:var(--font-size-label-footnote-400);color:var(--sub);font-weight:500;margin-bottom:4px;}
.obs-field .obs-in{display:flex;align-items:center;gap:6px;}
.obs-field input{width:100%;min-height:36px;border:1px solid var(--border-medium);border-radius:var(--radius-md);padding:7px 8px;background:var(--control-input-bg);}
.obs-field .unit{font-size:11px;color:var(--sub);flex:none;}
.obs-actions{grid-column:1/-1;display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.button{display:inline-flex;align-items:center;gap:5px;min-height:32px;border:1px solid var(--border-light);background:var(--card);color:var(--ink);border-radius:var(--radius-lg);padding:7px 14px;font-size:var(--font-size-body-small-400);font-weight:500;cursor:pointer;transition:.15s;}
.button:hover{border-color:var(--theme-purple-purple-20);color:var(--blue);}
.button.primary{background:var(--blue);border-color:var(--blue);color:#fff;}
.button.primary:hover{background:var(--theme-purple-purple-60);border-color:var(--theme-purple-purple-60);color:#fff;}
.button.small{padding:5px 10px;font-size:11.5px;min-height:28px;}
.button:disabled{opacity:.45;cursor:not-allowed;}
.button:disabled:hover{border-color:var(--border-light);color:var(--ink);}
.text-button{border:0;background:none;color:var(--blue);font-size:12px;font-weight:600;cursor:pointer;padding:2px 4px;}
.text-button:hover{text-decoration:underline;}
.toolbar{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:8px 0 12px;}
.toolbar>span:empty{display:none;}
.controls{display:flex;gap:16px;flex-wrap:wrap;align-items:center;min-width:0;max-width:100%;}
.high-roi-controls{margin-bottom:var(--spacing-xl);}
.controls label{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:var(--sub);font-weight:500;min-width:0;max-width:100%;}
.controls input[type=range]{width:180px;accent-color:var(--blue);cursor:pointer;vertical-align:middle;}
.controls input[type=number]{width:74px;border:1px solid var(--border-medium);border-radius:var(--radius-md);padding:4px 6px;font-size:12px;}
.controls select{border:1px solid var(--border-medium);border-radius:var(--radius-md);padding:5px 8px;font-size:12px;color:var(--ink);background:var(--control-input-bg);cursor:pointer;max-width:230px;}
.controls b{color:var(--blue);font-weight:600;min-width:40px;display:inline-block;text-align:left;}
.period-switch{display:flex;gap:5px;flex-wrap:wrap;}
.period-switch button{min-height:32px;border:1px solid var(--border-light);border-radius:var(--radius-lg);background:var(--card);color:var(--sub);padding:7px 13px;font-size:12px;font-weight:500;cursor:pointer;transition:.15s;}
.period-switch button:hover{border-color:var(--theme-purple-purple-20);color:var(--blue);}
.period-switch button.on{background:var(--blue-bg);border-color:var(--theme-purple-purple-20);color:var(--blue);}
.global-period-bar{display:grid;grid-template-columns:minmax(280px,1fr) auto;align-items:center;gap:18px;margin:18px 0 16px;padding:18px 22px;border:1px solid var(--theme-purple-purple-20);border-left:6px solid var(--blue);border-radius:var(--radius-2xl);background:linear-gradient(105deg,var(--theme-purple-purple-5) 0%,var(--bg-base-normal) 64%,var(--card) 100%);box-shadow:0 8px 22px var(--theme-purple-purple-10);}
.global-period-copy{display:grid;grid-template-columns:auto 1fr;column-gap:10px;align-items:center;}
.global-period-kicker{grid-row:1/3;align-self:stretch;display:flex;align-items:center;padding:0 10px;border-radius:var(--radius-md);background:linear-gradient(135deg,var(--theme-purple-purple-50),var(--blue));color:#fff;font-size:11px;font-weight:700;letter-spacing:.04em;}
.global-period-copy strong{font-size:18px;color:var(--ink);}
.global-period-copy p{margin:4px 0 0;color:var(--sub);font-size:12px;line-height:1.6;}
.global-period-actions{display:flex;flex-direction:column;align-items:flex-end;gap:7px;}
.global-period-actions .period-switch{margin:0;flex-wrap:nowrap;}
.global-period-actions .period-switch button{min-width:86px;padding:10px 15px;background:var(--card);}
.global-period-actions .period-switch button.on{background:linear-gradient(110deg,#635bff,var(--blue));border-color:transparent;color:#fff;box-shadow:0 4px 12px var(--theme-purple-purple-20);}
.global-period-status{font-size:11px;color:var(--sub);}
.global-period-status b{color:var(--blue);}
.hero>.global-period-bar{margin:var(--spacing-xxxl) 0 0;}
.trend-toolbar{align-items:center;margin-top:0;}
.trend-toolbar>details.more{margin:0;}
.trend-toolbar>details.more>summary{height:38px;min-height:38px;padding:7px 12px;border-radius:var(--radius-xl);font-size:var(--font-size-body-small-400);}
.trend-toolbar>details.more:not([open])>summary::after{content:'展开 ↓';}
.trend-toolbar>details.more[open]{flex:1 0 100%;}
.trend-toolbar>details.more[open]>summary{min-height:44px;border-radius:0;}
.race-footer{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:12px;font-size:12px;color:var(--sub);flex-wrap:wrap;}
.wrap-cell{display:block;max-width:440px;min-width:220px;white-space:normal;line-height:1.7;}
td.table-empty{text-align:center;color:var(--sub);padding:24px 0;}
.note-inline{font-size:11px;color:var(--sub);}

/* ===== 1.5 全景功能对齐：固定细分区块 / 执行清单 / 口径弹窗 ===== */
.feature-section{scroll-margin-top:72px;}
.feature-section>.section-head{align-items:flex-start;}
.ops-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.ops-summary>div,.positive-box{display:flex;flex-direction:column;align-items:flex-start;text-align:left;border:1px solid var(--border-light);border-radius:var(--radius-xl);background:var(--bg-base-normal);padding:16px;}
.ops-summary span,.positive-box span{display:block;color:var(--sub);font-size:12px;font-weight:600;}
.ops-summary b,.positive-box b{display:block;color:var(--blue);font-size:24px;line-height:1.45;margin:4px 0;}
.ops-summary p,.positive-box p{flex:1;width:100%;font-size:12px;color:var(--sub);margin:0;line-height:1.7;}
.ops-summary p+.button,.positive-box p+.button{align-self:flex-start;margin-top:var(--spacing-xl);}
.ops-summary>div>.button,.positive-box>.button{align-self:flex-start;}
.action{border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-2xl);overflow:hidden;margin:14px 0;background:var(--card);}
.action-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px;background:var(--blue-bg);}
.action-head h3{font-size:15px;margin:0;}
.action-head p{font-size:11px;color:var(--sub);margin:2px 0 0;}
.steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));}
.step{padding:17px;border-right:1px solid var(--border-light);}
.step:last-child{border-right:0;}
.step h4{font-size:13px;margin:0 0 9px;}
.step h4 span{display:inline-block;margin-right:7px;border-radius:var(--radius-sm);background:var(--blue-bg);color:var(--blue);font-size:10px;padding:2px 5px;}
.step .path{min-height:48px;margin-bottom:8px;padding:7px 9px;border-radius:var(--radius-md);background:var(--blue-bg);color:var(--blue);font-size:11px;line-height:1.6;}
.step p{font-size:12px;color:var(--sub);line-height:1.75;margin:0;}
.review{padding:12px 18px;border-top:1px solid var(--border-light);background:var(--bg-base-normal);font-size:12px;color:var(--sub);}
.links{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0;}
.selected-goods{padding:12px;border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-xl);background:var(--blue-bg);margin-bottom:12px;}
dialog{width:calc(100% - 30px);max-width:760px;max-height:85vh;overflow:auto;border:1px solid var(--border-light);border-radius:var(--radius-2xl);padding:22px;color:var(--ink);box-shadow:0 20px 80px rgba(26,38,64,.24);}
dialog[open]{position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);margin:0;z-index:9999;box-sizing:border-box;background:var(--card);}
dialog::backdrop{background:rgba(19,30,54,.42);backdrop-filter:blur(3px);}
.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px;}
.dialog-head h2{font-size:18px;}
.dialog-head button{width:32px;height:32px;border:0;border-radius:var(--radius-md);background:var(--bg-base-normal);color:var(--sub);font-size:22px;cursor:pointer;}
dialog p,dialog li{font-size:13px;color:var(--sub);line-height:1.75;}
dialog textarea{width:100%;min-height:320px;border:1px solid var(--border-medium);border-radius:var(--radius-md);padding:10px;color:var(--ink);}
#dashToast{position:fixed;left:50%;bottom:24px;z-index:1200;transform:translateX(-50%);padding:10px 18px;border-radius:var(--radius-lg);background:#263954;color:#fff;font-size:12px;opacity:0;pointer-events:none;transition:opacity .2s;}
#dashToast.show{opacity:1;}

/* 信号卡（用户洞察 signals） */
.signals{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:2px 0 16px;}
.signal{display:block;background:var(--card);border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-2xl);padding:16px 18px;color:var(--ink);box-shadow:0 2px 8px var(--theme-purple-purple-5);}
.signal label{display:flex;justify-content:space-between;gap:8px;color:var(--sub);font-size:12px;margin-bottom:5px;}
.signal:not(.decision-step) b{display:block;font-size:14px;margin-bottom:4px;font-weight:600;}
.signal p{font-size:12px;color:var(--sub);line-height:1.7;margin:0;}
.decision-step .ds-metric b,.decision-step .ds-metric strong{display:inline;font:inherit;color:inherit;margin:0;}
.signal.alert{border-top:3px solid var(--red);}
.signal.watch{border-top:3px solid var(--orange);}
.signal.info{border-top:3px solid var(--blue);}

/* ===== 空态 / 占位 / 错误态 ===== */
.empty-state{padding:40px 20px;text-align:center;color:var(--sub);font-size:13px;}
.pending-box{height:180px;border:1.5px dashed var(--border-medium);border-radius:var(--radius-xl);display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--sub);font-size:12.5px;gap:6px;text-align:center;padding:0 12px;background:var(--bg-base-normal);}
.pending-box .ico{font-size:22px;}
.dash-error{max-width:640px;margin:60px auto;padding:24px;background:var(--red-bg);border:1px solid var(--theme-red-red-20);border-radius:var(--radius-2xl);color:var(--ink);}
.dash-error h2{color:var(--red);font-size:16px;margin-bottom:8px;}
.dash-error code{display:block;margin-top:8px;font-size:12px;color:var(--sub);word-break:break-all;}

/* ===== 页脚 ===== */
footer{text-align:center;color:var(--sub);font-size:12px;padding:14px 0;}
.page-footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:16px 2px;text-align:left;font-size:12px;color:var(--sub);border-top:1px solid var(--border-light);margin-top:8px;}

/* ============================================================
   日历 / 多快照选择器（右上角）
   弹层挂到 document.body 层并用 fixed 定位（见 snapshot-picker.js），
   彻底摆脱 .hero overflow 与 .page padding 的裁剪。触发器位于渐变 hero-head 上，
   用白色半透明胶囊；弹层为白卡 + 蓝紫高亮。
   ============================================================ */
.snap-picker{position:relative;display:flex;align-items:center;gap:6px;flex:none;}
.snap-nav{width:28px;height:28px;border-radius:var(--radius-full);border:1px solid rgba(255,255,255,.5);background:rgba(255,255,255,.16);color:#fff;font-size:14px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.15s;}
.snap-nav:hover:not(:disabled){background:rgba(255,255,255,.3);}
.snap-nav:disabled{opacity:.35;cursor:not-allowed;}
.snap-trigger{display:flex;align-items:center;gap:7px;border:1px solid rgba(255,255,255,.5);background:rgba(255,255,255,.16);color:#fff;border-radius:var(--radius-full);padding:6px 13px;font-size:12px;font-weight:600;cursor:pointer;transition:.15s;}
.snap-trigger:hover{background:rgba(255,255,255,.3);}
.snap-trigger .cal-ico{font-size:13px;}
.snap-trigger .caret{font-size:9px;opacity:.8;}
.snap-pop{position:fixed;top:0;left:0;z-index:1000;width:300px;max-width:calc(100vw - 24px);background:#fff;border:1px solid var(--border-light);border-radius:var(--radius-2xl);box-shadow:0 12px 34px var(--theme-purple-purple-20);padding:12px;color:var(--ink);display:none;}
.snap-pop.open{display:block;}
.sp-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;}
.sp-month{font-size:13px;font-weight:600;}
.sp-mbtn{width:24px;height:24px;border-radius:var(--radius-sm);border:1px solid var(--border-light);background:#fff;color:var(--sub);cursor:pointer;font-size:12px;line-height:1;display:flex;align-items:center;justify-content:center;transition:.15s;}
.sp-mbtn:hover{border-color:var(--blue);color:var(--blue);}
.sp-week{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin-bottom:4px;}
.sp-week span{text-align:center;font-size:10.5px;color:var(--sub);font-weight:600;padding:2px 0;}
.sp-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;}
.sp-day{position:relative;height:32px;border-radius:var(--radius-md);border:1px solid transparent;background:var(--bg-base-normal);display:flex;align-items:center;justify-content:center;font-size:12px;color:#c2c8d2;cursor:default;}
.sp-day.blank{background:transparent;}
.sp-day.has{background:var(--blue-bg);color:var(--blue);font-weight:700;cursor:pointer;border-color:var(--theme-purple-purple-10);}
.sp-day.has:hover{background:var(--theme-purple-purple-10);}
.sp-day.cur{outline:2px solid var(--blue);outline-offset:-1px;}
.sp-day.today::after{content:"";position:absolute;bottom:3px;left:50%;transform:translateX(-50%);width:4px;height:4px;border-radius:50%;background:var(--blue);}
.sp-day .cnt{position:absolute;top:2px;right:3px;font-size:8.5px;font-weight:800;color:#fff;background:var(--blue);border-radius:6px;padding:0 3px;line-height:12px;}
.sp-foot{margin-top:8px;font-size:11px;color:var(--sub);border-top:1px dashed var(--border-light);padding-top:8px;}
.sp-times{margin-top:8px;border-top:1px dashed var(--border-light);padding-top:8px;display:none;}
.sp-times.open{display:block;}
.sp-times .tt{font-size:11.5px;font-weight:700;color:var(--sub);margin-bottom:6px;}
.sp-time-item{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid var(--border-light);border-radius:var(--radius-md);padding:6px 10px;margin-bottom:6px;font-size:12px;cursor:pointer;transition:.15s;}
.sp-time-item:hover{border-color:var(--blue);background:var(--blue-bg);}
.sp-time-item.sel{border-color:var(--blue);background:var(--blue-bg);color:var(--blue);font-weight:700;}
.sp-time-item .st-scene{font-size:10.5px;color:var(--sub);}

/* ===== 响应式 ===== */
@media(max-width:1100px){.dash-cards{grid-template-columns:repeat(2,1fr);}.decision-step .ds-metric{font-size:26px;}}
@media(max-width:900px){.decision-flow{grid-template-columns:1fr;}.status-strip{grid-template-columns:repeat(3,1fr);}.health-summary{grid-template-columns:1fr;}.rule-editor{grid-template-columns:repeat(2,1fr);}.task-grid{grid-template-columns:1fr;}.obs-editor{grid-template-columns:repeat(2,1fr);}.steps{grid-template-columns:1fr;}.step{border-right:0;border-bottom:1px solid var(--border-light);}.step:last-child{border-bottom:0;}.ops-summary{grid-template-columns:1fr;}}
@media(max-width:880px){.hero-body{grid-template-columns:1fr;}.grid2,.grid-main{grid-template-columns:1fr;}.grid3{grid-template-columns:1fr;}.tier-cards{grid-template-columns:repeat(2,1fr);}.metrics,.metrics.four{grid-template-columns:repeat(2,1fr);}.metrics.three{grid-template-columns:1fr;}.signals{grid-template-columns:1fr;}.calendar{grid-template-columns:repeat(5,1fr);}}
@media(max-width:600px){.page{padding:var(--spacing-xxl) 12px;}.hero-head{align-items:flex-start;padding:var(--spacing-xxl) var(--spacing-xl);}.hero-date{width:100%;overflow-wrap:anywhere;}.scope-contract strong,.scope-contract span{flex:1 1 100%;min-width:0;overflow-wrap:anywhere;}.hero-head h1{font-size:var(--font-size-heading-h2);line-height:var(--line-height-heading-h2);}.hc-headline{font-size:var(--font-size-heading-h4);line-height:var(--line-height-heading-h4);}.hero-concl{margin-top:var(--spacing-xl);}.decision-step{padding:var(--spacing-xxl);}.dash-cards{gap:var(--spacing-lg);}section{padding:var(--spacing-xl);border-radius:var(--radius-3xl);}.panel{padding:var(--spacing-xl);}.status-strip{grid-template-columns:repeat(2,1fr);}.rule-editor{grid-template-columns:1fr;}.obs-editor{grid-template-columns:1fr;}.tab-btn{min-width:92px;}.controls{gap:10px;}.controls input[type=range]{width:135px;}.page-footer{font-size:11px;}.full-page .local-nav{top:60px;}.local-nav a{min-width:100px;font-size:12px;padding:9px 8px;}}
@media(max-width:560px){.dash-cards{grid-template-columns:repeat(2,1fr);}.tab-btn{flex-direction:column;gap:3px;font-size:11.5px;padding:8px 4px;}}

/* ===== 总览视觉校准：顶部、行动卡、指标卡、双栏摘要与场景二级导航 ===== */
.hero-concl .decision-flow{margin-top:var(--spacing-xxxxl);gap:var(--spacing-xxl);}
.hero-concl .dynamic-signals{grid-template-columns:repeat(3,minmax(0,1fr));}
.hero-concl .decision-step{display:grid;grid-template-rows:minmax(46px,auto) minmax(64px,auto) minmax(31px,auto) minmax(70px,1fr) auto;min-height:292px;padding:28px;border-radius:var(--radius-4xl);}
.hero-concl .decision-step .ds-top{align-self:start;margin-bottom:0;}
.hero-concl .decision-step .ds-metric{font-size:var(--font-size-title-super);line-height:var(--line-height-title-super);margin:0 0 var(--spacing-lg);letter-spacing:-1.2px;}
.hero-concl .decision-step .ds-caption{margin:0 0 var(--spacing-lg);font-size:var(--font-size-heading-h5);line-height:var(--line-height-heading-h5);}
.hero-concl .decision-step p{font-size:var(--font-size-body-small-400);line-height:1.8;}
.hero-concl .decision-step .decision-link{align-self:end;min-height:44px;margin-top:var(--spacing-xl);padding:var(--spacing-l) var(--spacing-xl);font-size:var(--font-size-action-large-500);}
.hero-body{align-items:stretch;}
.hero-kpis,.todo{display:flex;flex-direction:column;min-width:0;padding:var(--spacing-xxl);background:var(--card);border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-3xl);box-shadow:0 8px 28px var(--theme-purple-purple-5);}
.hero-kpis .dash-cards{flex:1;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));}
.hero-kpis .dcard{display:grid;grid-template-columns:36px minmax(0,1fr);grid-template-rows:auto auto 1fr;align-items:start;gap:var(--spacing-l);height:100%;min-height:146px;padding:var(--spacing-xl);border-radius:var(--radius-3xl);}
.hero-kpis .dcard>.ui-icon{grid-row:1;grid-column:1;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:var(--radius-xl);color:var(--blue);background:var(--blue-bg);}
.hero-kpis .dcard>.ui-icon svg{display:block;width:20px;height:20px;}
.hero-kpis .dcard .n{grid-row:1;grid-column:2;align-self:center;font-size:var(--font-size-label-footnote-400);line-height:18px;font-weight:400;}
.hero-kpis .dcard .v{grid-row:2;grid-column:1/-1;margin:var(--spacing-xs) 0 0;font-size:var(--font-size-heading-h1);line-height:var(--line-height-heading-h1);font-weight:600;letter-spacing:-.7px;}
.hero-kpis .dcard .d{grid-row:3;grid-column:1/-1;font-size:var(--font-size-label-footnote-400);line-height:1.65;font-weight:400;}
.hero-kpis .dcard.alarm>.ui-icon{color:var(--red);background:var(--theme-red-red-5);}
.hero-kpis .dcard.ok>.ui-icon{color:var(--green);background:var(--green-bg);}
.hero-kpis .dcard.watch>.ui-icon{color:var(--orange);background:var(--orange-bg);}
.hero-kpis .scope{margin-top:auto;}
.todo .todo-item{flex:1;margin-bottom:8px;}
.todo .todo-item:last-child{margin-bottom:0;}
.user-todo .todo-item{flex:0 0 auto;}
.full-topic-summary{margin-bottom:var(--spacing-lg);border-color:var(--theme-purple-purple-10);box-shadow:0 10px 30px var(--theme-purple-purple-10);}
.full-topic-summary .metric{background:var(--card);border-color:var(--theme-purple-purple-10);box-shadow:0 4px 14px var(--theme-purple-purple-5);}
.local-nav{padding:var(--spacing-sm);margin:0 0 var(--spacing-xxl);background:rgba(255,255,255,.96);border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-2xl);box-shadow:0 6px 20px var(--theme-purple-purple-5);}
@media(max-width:880px){
  .hero-concl .decision-step{min-height:260px;}
  .hero-kpis,.todo{padding:var(--spacing-xl);}
  .hero-kpis .dash-cards{grid-template-rows:none;}
  .todo .todo-item{flex:auto;}
}
@media(max-width:600px){
  .hh-right{width:100%;margin-left:0;align-items:flex-start;gap:8px;}
  .health-status{padding:6px 10px;}
  .hh-reset{padding:6px 10px;}
  .local-nav{padding:var(--spacing-xs);border-radius:var(--radius-xl);}
  .hero-kpis .dash-cards{grid-template-columns:repeat(2,minmax(0,1fr));}
  .hero-kpis .dcard{min-height:132px;padding:var(--spacing-lg);gap:var(--spacing-md);}
  .hero-kpis .dcard .v{font-size:var(--font-size-heading-h2);line-height:var(--line-height-heading-h2);}
  .hero-concl .decision-step{min-height:240px;padding:var(--spacing-xxl);}
  .hero-concl .decision-step .ds-metric{font-size:var(--font-size-heading-h1);line-height:var(--line-height-heading-h1);}
}

@media(max-width:760px){
  .global-period-bar{grid-template-columns:1fr;padding:15px 16px;}
  .global-period-actions{align-items:flex-start;width:100%;}
  .global-period-actions .period-switch{width:100%;overflow-x:auto;}
  .global-period-actions .period-switch button{flex:1;min-width:82px;white-space:nowrap;}
  .global-period-kicker{padding:0 8px;}
}

/* ===== 通用数据块：供外部店铺与后续非预设场景复用 ===== */
.external-hero-body{grid-template-columns:1fr;}
.external-hero-body .hero-kpis{width:100%;}
.external-panel{display:block;}
.external-panel.t-hidden{display:none;}
.generic-bars,.generic-funnel{display:grid;gap:var(--spacing-lg);margin-top:var(--spacing-xl);}
.generic-row{display:grid;grid-template-columns:minmax(150px,240px) minmax(180px,1fr) auto;align-items:center;gap:var(--spacing-lg);}
.generic-row-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink);font-size:var(--font-size-body-small-400);}
.generic-track{height:18px;overflow:hidden;border-radius:var(--radius-full);background:var(--bg);}
.generic-fill{display:block;height:100%;min-width:2px;border-radius:var(--radius-full);background:linear-gradient(90deg,var(--theme-purple-purple-50),var(--blue));}
.generic-row-value{color:var(--sub);font-size:var(--font-size-label-footnote-400);font-variant-numeric:tabular-nums;white-space:nowrap;}
.generic-insights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--spacing-lg);margin-top:var(--spacing-xl);}
.generic-insight{border-left:4px solid var(--blue);border-radius:var(--radius-xl);padding:var(--spacing-xl);background:var(--bg-base-normal);}
.generic-insight.alert{border-left-color:var(--red);background:var(--red-bg);}
.generic-insight.good{border-left-color:var(--green);background:var(--green-bg);}
.generic-insight.watch,.metric.watch{border-color:var(--theme-yellow-yellow-20);background:var(--orange-bg);}
.metric.watch .value{color:var(--orange);}
.generic-insight h3{margin:0 0 var(--spacing-md);font-size:var(--font-size-heading-h5);}
.generic-insight p,.generic-copy p,.generic-copy li{color:var(--sub);font-size:var(--font-size-body-small-400);line-height:1.75;}
.generic-copy p+p{margin-top:var(--spacing-lg);}
.generic-copy ul{padding-left:20px;margin-top:var(--spacing-lg);}
.generic-copy li+li{margin-top:var(--spacing-sm);}
@media(max-width:880px){.generic-insights{grid-template-columns:1fr;}.generic-row{grid-template-columns:minmax(120px,1fr) auto;}.generic-track{grid-column:1/-1;grid-row:2;}}

/* ===== 通用可用性校准：按钮、下拉、长表、并列面板与推广明细 ===== */
/* 所有 renderer 生成的轻量操作统一使用蓝紫模板语言，避免浏览器原生按钮外观。 */
.chips,.segmented{display:flex;align-items:center;gap:var(--spacing-md);flex-wrap:wrap;margin:var(--spacing-lg) 0;}
.chip,.fchip,.tt-btn,.segmented button,.period-switch button{
  display:inline-flex;align-items:center;justify-content:center;gap:var(--spacing-xs);min-height:36px;
  padding:7px 15px;border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-xl);
  background:var(--card);color:var(--sub);font-size:var(--font-size-body-small-400);font-weight:500;
  line-height:1.35;white-space:nowrap;cursor:pointer;box-shadow:0 2px 8px var(--theme-purple-purple-5);
}
.chip:hover,.fchip:hover,.tt-btn:hover,.segmented button:hover,.period-switch button:hover{color:var(--blue);border-color:var(--theme-purple-purple-20);background:var(--blue-bg);box-shadow:0 4px 12px var(--theme-purple-purple-10);}
.chip.on,.fchip.on,.fchip.on.hot,.tt-btn.on,.segmented button.on,.period-switch button.on{color:#fff;background:linear-gradient(110deg,#635bff,var(--blue));border-color:transparent;box-shadow:0 5px 14px var(--theme-purple-purple-20);}
.button,.todo-link,.action-jump,.tier-editor .te-btn,.rule-apply{
  min-height:36px;padding:8px 15px;border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-xl);
  background:var(--card);color:var(--blue);font-size:var(--font-size-body-small-400);font-weight:500;
  line-height:1.35;white-space:nowrap;box-shadow:0 2px 8px var(--theme-purple-purple-5);
}
.button:hover,.todo-link:hover,.action-jump:hover{color:var(--blue);border-color:var(--theme-purple-purple-20);background:var(--blue-bg);box-shadow:0 4px 12px var(--theme-purple-purple-10);}
.button.primary,.tier-editor .te-btn,.rule-apply{color:#fff;background:linear-gradient(110deg,#635bff,var(--blue));border-color:transparent;box-shadow:0 5px 14px var(--theme-purple-purple-20);}
.button.small{min-height:32px;padding:6px 12px;font-size:var(--font-size-label-footnote-400);}
.positive-box>.button{margin-top:auto;}

/* 所有下拉框统一为模板控件，覆盖 toolbar 中未带 fsel 类的原生 select。 */
select,select.fsel,.controls select,.toolbar select,.scenario select{
  -webkit-appearance:none;appearance:none;min-height:36px;min-width:0;max-width:100%;
  padding:7px 34px 7px 12px;border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-xl);
  background-color:var(--card);color:var(--ink);font-size:var(--font-size-body-small-400);font-weight:500;cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,var(--sub) 50%),linear-gradient(135deg,var(--sub) 50%,transparent 50%);
  background-position:calc(100% - 15px) 50%,calc(100% - 10px) 50%;background-size:5px 5px;background-repeat:no-repeat;
  box-shadow:0 2px 8px var(--theme-purple-purple-5);
}
select:hover,select.fsel:hover,.controls select:hover,.toolbar select:hover,.scenario select:hover{border-color:var(--theme-purple-purple-20);background-color:var(--blue-bg);}
select:focus,select.fsel:focus,.controls select:focus,.toolbar select:focus,.scenario select:focus{border-color:var(--blue);box-shadow:0 0 0 3px var(--theme-purple-purple-10);outline:0;}
input.fsel{min-height:36px;padding:7px 12px;border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-xl);background:var(--card);color:var(--ink);font-size:var(--font-size-body-small-400);box-shadow:0 2px 8px var(--theme-purple-purple-5);}
input.fsel:focus{border-color:var(--blue);box-shadow:0 0 0 3px var(--theme-purple-purple-10);outline:0;}

/* 文本与数字输入统一为蓝紫主题控件；不触碰复选框、滑杆和隐藏字段。 */
input[type=text],input[type=search],input[type=number],dialog textarea{
  min-height:40px;padding:8px 12px;border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-xl);
  background:var(--card);color:var(--ink);font:inherit;font-size:var(--font-size-body-small-400);font-variant-numeric:tabular-nums;
  box-shadow:0 2px 8px var(--theme-purple-purple-5);transition:border-color .15s,box-shadow .15s,background-color .15s;
}
input[type=text]:hover,input[type=search]:hover,input[type=number]:hover,dialog textarea:hover{border-color:var(--theme-purple-purple-20);background-color:var(--blue-bg);}
input[type=text]:focus,input[type=search]:focus,input[type=number]:focus,dialog textarea:focus{border-color:var(--blue);background:var(--card);box-shadow:0 0 0 3px var(--theme-purple-purple-10);outline:0;}

/* 全局观察线共用一层编辑底色，字段标签保持透明，仅输入框强调可编辑性。 */
.rules-grid{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:var(--spacing-lg);padding:var(--spacing-xl);margin-top:var(--spacing-md);border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-2xl);background:var(--blue-bg);}
.rules-grid>label{display:flex;flex-direction:column;gap:7px;min-width:0;padding:8px 4px;border:1px solid transparent;border-radius:var(--radius-xl);background:transparent;}
.rules-grid .rule-label{min-height:34px;color:var(--sub);font-size:var(--font-size-label-footnote-400);font-weight:500;line-height:1.5;}
.rules-grid .rule-control{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;}
.rules-grid .rule-control input{width:100%;min-width:0;}
.rules-grid .rule-control em{min-width:34px;color:var(--sub);font-size:11px;font-style:normal;white-space:nowrap;}
.rules-grid .rules-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:var(--spacing-md);padding-top:var(--spacing-xs);}

/* 单品诊断用紧凑选择器替代全量按钮墙。 */
.item-switcher{display:grid;grid-template-columns:auto minmax(280px,1fr) auto auto;align-items:end;gap:var(--spacing-md);margin:var(--spacing-lg) 0 var(--spacing-xl);padding:var(--spacing-lg);border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-2xl);background:var(--blue-bg);}
.item-switcher label{display:flex;flex-direction:column;gap:6px;min-width:0;color:var(--sub);font-size:var(--font-size-label-footnote-400);font-weight:500;}
.item-switcher select{width:100%;}
.item-switcher small{align-self:center;color:var(--sub);font-size:var(--font-size-label-footnote-400);white-space:nowrap;}

/* 长表统一限高并保留横纵滚动；表头吸顶。到边界后继续滚动会传递给页面。 */
.table-wrap{scrollbar-gutter:stable;overscroll-behavior:auto;}
.table-wrap.table-scroll{max-height:420px;}
.table-wrap.table-scroll-master{max-height:560px;}
.table-wrap.table-scroll thead th,.table-wrap.table-scroll-master thead th{position:sticky;top:0;z-index:3;box-shadow:0 1px 0 var(--theme-purple-purple-10);}
.table-wrap::-webkit-scrollbar{width:10px;height:10px;}
.table-wrap::-webkit-scrollbar-track{background:var(--bg);border-radius:var(--radius-full);}
.table-wrap::-webkit-scrollbar-thumb{background:var(--theme-purple-purple-20);border:2px solid var(--bg);border-radius:var(--radius-full);}
.table-wrap::-webkit-scrollbar-thumb:hover{background:var(--theme-purple-purple-50);}

/* 两列内容保持相同外框高度，较长一侧在面板内部滚动。 */
.grid2>.panel{height:100%;}
.source-analysis-grid>.panel{display:flex;flex-direction:column;min-height:620px;}
.source-analysis-grid>.panel .table-wrap{flex:1;height:500px;max-height:500px;overflow:auto;}
.source-analysis-grid>.panel .chart-sm{flex:1;height:500px;min-height:500px;}
.region-analysis-grid{align-items:stretch;}
.region-analysis-grid>.panel:first-child{display:flex;flex-direction:column;}
.region-analysis-grid .region-chart{flex:1;height:auto;min-height:440px;}
.anomaly-log .table-wrap{max-height:380px;overflow:auto;}

/* 商品明细固定为单行数据行，通过横向滚动保留完整字段，避免同表行高忽高忽低。 */
#goodsTable{min-width:1810px;table-layout:auto;}
#goodsTable th:not(:first-child),#goodsTable td:not(:first-child){white-space:nowrap;}
#goodsTable td{height:72px;}
#goodsTable .goods-cell{width:300px;min-width:300px;max-width:300px;}
#goodsTable .goods-cell .gc-title{max-width:238px;}
#goodsTable th:last-child,#goodsTable td:last-child{min-width:190px;}
#goodsTable .abn-badge{white-space:nowrap;margin-bottom:2px;}
.table-action-head,.table-action-cell{min-width:150px;}
.table-action-wrap{display:flex;align-items:center;justify-content:flex-start;white-space:nowrap;}
.table-action-wrap .button{flex:none;white-space:nowrap;}
.sort-header{display:flex;width:100%;align-items:center;justify-content:space-between;gap:8px;padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:600;text-align:left;white-space:nowrap;cursor:pointer;}
.sort-header span{color:var(--sub);font-size:10px;font-weight:400;}
.sort-header:hover,.sort-header:focus-visible{color:var(--blue);outline:0;}

/* 商品货盘的控件、档位卡和图表共用稳定尺寸。 */
#portfolio .tier-toolbar{justify-content:space-between;flex-wrap:wrap;margin:0 0 var(--spacing-lg);}
#portfolio .tier-mode-group,#portfolio .tier-toolbar-actions{display:flex;align-items:center;gap:var(--spacing-md);flex-wrap:wrap;}
#portfolio .tier-editor{margin:0 0 var(--spacing-xl);}
#portfolio .tier-editor .te-item{min-height:40px;padding:4px 2px;border:1px solid transparent;border-radius:var(--radius-lg);background:transparent;}
#portfolio .tier-editor input{height:32px;min-height:32px;margin:0;padding:4px 7px;box-shadow:none;}
#portfolio .tier-editor .te-btn{min-height:36px;padding:7px 16px;}
#portfolio .tier-error:empty{display:none;}
#portfolio .tier-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:var(--spacing-md);margin:var(--spacing-xl) 0;}
#portfolio .tier{display:flex;min-width:0;min-height:168px;flex-direction:column;align-items:flex-start;gap:7px;padding:var(--spacing-xl);border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-2xl);background:var(--card);color:var(--ink);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s;}
#portfolio .tier:hover{border-color:var(--theme-purple-purple-20);box-shadow:0 8px 20px var(--theme-purple-purple-10);transform:translateY(-1px);}
#portfolio .tier.on{border-color:var(--blue);background:var(--blue-bg);box-shadow:inset 0 0 0 1px var(--blue);}
#portfolio .tier .tier-head{color:var(--sub);font-size:var(--font-size-label-footnote-400);font-weight:600;}
#portfolio .tier>strong{font-size:var(--font-size-heading-h4);font-weight:600;font-variant-numeric:tabular-nums;}
#portfolio .tier>small{color:var(--sub);font-size:var(--font-size-label-footnote-400);line-height:1.45;}
#portfolio .tier .tier-cta{margin-top:auto;color:var(--blue);font-size:var(--font-size-label-footnote-400);font-weight:600;}
#portfolio .portfolio-charts{margin-top:var(--spacing-xl);align-items:stretch;}
#portfolio .portfolio-charts>.panel{display:flex;min-height:500px;}
#portfolio .portfolio-charts .chart-box{display:flex;flex:1;flex-direction:column;}
#portfolio .portfolio-charts .chart{flex:1;min-height:400px;}
#portfolio>.toolbar{justify-content:space-between;margin:0 0 var(--spacing-lg);}
#portfolio>.toolbar .segmented button{min-height:36px;padding:7px 16px;}
#portfolio>.toolbar .button{min-height:36px;white-space:nowrap;}
#portfolio>.controls{gap:var(--spacing-lg);margin:0 0 var(--spacing-xl);padding:14px 16px;border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-xl);background:var(--blue-bg);}
#portfolio>.controls label{min-height:42px;padding:4px 2px;border:1px solid transparent;border-radius:var(--radius-lg);background:transparent;}
#portfolio>.controls input[type=number]{width:84px;height:32px;min-height:32px;margin:0;padding:4px 7px;box-shadow:none;}
#portfolio>.controls .button{min-height:36px;margin-left:auto;white-space:nowrap;}
#portfolio>.grid2{gap:var(--spacing-xxl);margin-top:var(--spacing-xl);align-items:stretch;}
#portfolio>.grid2>.chart-box{display:flex;min-height:500px;flex-direction:column;padding:var(--spacing-xxl);border:1px solid var(--theme-purple-purple-10);border-radius:var(--radius-3xl);background:var(--card);}
#portfolio>.grid2>.chart-box .chart{flex:1;min-height:400px;}

/* 内容区统一垂直节奏：说明、表格、双栏卡片和后续工具栏之间保留清晰层级。 */
.feature-section>.section-head{margin-bottom:var(--spacing-xl);}
.feature-section>.section-head .desc{margin-top:var(--spacing-md);}
.feature-section>.section-head+.toolbar{margin-top:0;}
.feature-section>.section-head+.takeaway,
.feature-section>.section-head+.notice,
.feature-section>.section-head+.note{margin-top:0;}
.feature-section .takeaway+.grid-main,
.feature-section .notice+.grid-main,
.feature-section .note+.grid-main,
.feature-section .takeaway+.grid2,
.feature-section .notice+.grid2,
.feature-section .note+.grid2,
.feature-section .takeaway+.metrics,
.feature-section .notice+.metrics,
.feature-section .note+.metrics,
.feature-section .takeaway+.calendar,
.feature-section .notice+.calendar,
.feature-section .note+.calendar{margin-top:var(--spacing-xl);}
.feature-section .chart-box>.note{margin-top:var(--spacing-lg);}
.feature-section .note+details.more,
.feature-section .note+.race-footer,
.feature-section .note+.chips,
.feature-section .note+.toolbar,
.feature-section .note+p.note,
.feature-section .note+textarea{margin-top:var(--spacing-xl);}
.feature-section .takeaway+.table-wrap,
.feature-section .notice+.table-wrap,
.feature-section .grid2+.table-wrap,
.feature-section .ops-summary+.table-wrap{margin-top:var(--spacing-xl);}
/* buildTable 会在 table-wrap 前插入 mobile-tip；桌面端该节点隐藏，但仍会截断 + 相邻选择器。 */
.feature-section .takeaway+.mobile-tip+.table-wrap,
.feature-section .notice+.mobile-tip+.table-wrap,
.feature-section .note+.mobile-tip+.table-wrap,
.feature-section .links+.mobile-tip+.table-wrap,
.feature-section .grid2+.mobile-tip+.table-wrap,
.feature-section .ops-summary+.mobile-tip+.table-wrap,
.feature-section .table-foot+.mobile-tip+.table-wrap,
.feature-section .table-wrap+.mobile-tip+.table-wrap{margin-top:var(--spacing-xxl);}
.feature-section .table-wrap+.toolbar,
.feature-section .panel+.toolbar,
.feature-section .grid2+.toolbar{margin-top:var(--spacing-xl);}
.feature-section .grid2+.notice,
.feature-section .grid2+.takeaway{margin-top:var(--spacing-xl);}
.feature-section .ops-summary+.empty-state,
.feature-section .ops-summary+details.more{margin-top:var(--spacing-xl);}
.feature-section .table-wrap+details.more,
.feature-section .race-footer+details.more,
.feature-section .grid2+details.more,
.feature-section .portfolio-charts+details.more{margin-top:var(--spacing-xl);}
.feature-section details.more+.button{margin-top:var(--spacing-xl);}
.feature-section .table-wrap+.note{margin-top:var(--spacing-lg);}
.feature-section>.toolbar:last-child{margin-bottom:0;}

/* 客户价值专题：参考审阅模板的环比中轴图和首购/复购构成，并补足面板间距。 */
.customer-value-stack{display:grid;gap:24px;}
.customer-value-stack>.panel{margin:0;}
.customer-value-delta{margin-top:2px;max-width:100%;overflow-x:auto;}
.customer-value-delta-caption{margin:0 0 9px;font-size:11.5px;line-height:1.6;color:#7b8ca3;}
.customer-value-row{display:grid;grid-template-columns:132px minmax(120px,1fr) 70px 104px;gap:10px;align-items:center;padding:7px 0;border-bottom:1px solid #f0f3f8;}
.customer-value-row:last-child{border-bottom:0;}
.customer-value-row.customer-value-head{padding:0 0 6px;border-bottom:1px solid #e3e9f2;}
.customer-value-head span,.customer-value-head b{font-size:11px;font-weight:400;color:#8496ad;}
.customer-value-name{display:flex;min-width:0;align-items:center;gap:6px;font-size:12px;color:#33507a;}
.customer-value-dim{flex:none;padding:0 4px;border:1px solid #e2e8f1;border-radius:4px;font-size:10px;font-style:normal;line-height:15px;color:#8496ad;}
.customer-value-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.customer-value-track{position:relative;height:14px;border-radius:3px;background:#f6f8fc;}
.customer-value-zero{position:absolute;top:-3px;bottom:-3px;left:50%;width:1px;background:#c9d4e3;}
.customer-value-bar{position:absolute;top:0;bottom:0;border-radius:3px;}
.customer-value-bar.neg{right:50%;background:#d98a86;}
.customer-value-bar.pos{left:50%;background:#6fa287;}
.customer-value-change{font-size:12.5px;font-weight:700;text-align:right;white-space:nowrap;color:#5c6f88;}
.customer-value-change.neg{color:#b4554f;}
.customer-value-change.pos{color:#3f7d5f;}
.customer-value-current{font-size:12px;text-align:right;white-space:nowrap;color:#5c6f88;}
.customer-value-mix-bar{display:flex;height:36px;margin:12px 0 9px;overflow:hidden;border:1px solid #e3e9f2;border-radius:7px;background:#f6f8fc;}
.customer-value-mix-segment{display:flex;align-items:center;justify-content:center;overflow:hidden;color:#fff;font-size:12px;font-weight:600;white-space:nowrap;}
.customer-value-mix-segment.first{background:#5278df;}
.customer-value-mix-segment.repeat{background:#a8b4d4;}
.customer-value-mix-legend{display:flex;flex-wrap:wrap;gap:18px;margin-bottom:12px;font-size:11.5px;color:#5c6f88;}
.customer-value-mix-legend i{display:inline-block;width:9px;height:9px;margin-right:5px;border-radius:2px;}
@media(max-width:760px){
  .customer-value-stack{gap:20px;}
  .customer-value-row{grid-template-columns:104px minmax(90px,1fr) 62px 88px;gap:7px;}
}

/* 推广主表的操作区并入商品 ID 行，数值列继续保持稳定宽度。 */
#promoTable{min-width:1540px;table-layout:auto;}
#promoTable th:not(:first-child),#promoTable td:not(:first-child){white-space:nowrap;}
#promoTable .promo-action-head{width:120px;min-width:120px;max-width:120px;}
#promoTable .promo-action-cell{width:120px;min-width:120px;max-width:120px;}
.promo-action-wrap{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:var(--spacing-xs);white-space:normal;}
.promo-action-wrap .tag{flex:none;}
.promo-action-wrap .button{flex:none;min-width:72px;min-height:26px;padding:3px 8px;font-size:11px;justify-content:center;white-space:nowrap;}
.promo-roi-editor{grid-template-columns:minmax(240px,1fr);margin:0;}
.promo-roi-editor .obs-in{display:grid;grid-template-columns:minmax(110px,160px) minmax(0,1fr);gap:var(--spacing-lg);}
.promo-roi-editor .obs-field input{width:100%;height:36px;min-height:36px;padding:6px 10px;font-size:var(--font-size-body-small-400);box-shadow:none;}
.promo-roi-editor .unit{font-size:var(--font-size-label-footnote-400);line-height:1.5;white-space:normal;}

/* 同一行中的轻量控件统一压缩，避免输入框、下拉框和按钮明显高于相邻文字。 */
.controls select,.toolbar select,.filter-bar select.fsel,
.controls input[type=number],.obs-field input,.rules-grid .rule-control input{
  height:32px;min-height:32px;padding-top:5px;padding-bottom:5px;
}
.controls .button,.item-switcher .button,#portfolio>.controls .button{
  min-height:32px;padding:6px 12px;
}
.controls .button.small{min-height:28px;padding:4px 10px;}
.item-switcher select{height:32px;min-height:32px;padding-top:5px;padding-bottom:5px;}
.race-footer .button{min-height:30px;padding:5px 10px;font-size:var(--font-size-label-footnote-400);}
#portfolio>.toolbar .segmented button,#portfolio>.tier-toolbar .tt-btn,#portfolio>.tier-toolbar .button,
#portfolio .tier-editor .te-btn{min-height:32px;padding:6px 12px;}
.promo-roi-editor .obs-field input{height:32px;min-height:32px;padding:5px 9px;}

/* 异常业务影响门槛：控件占第一行，固定分数说明独占第二行。 */
.anomaly-threshold-toolbar{align-items:flex-start;}
.threshold-controls{display:grid;grid-template-columns:auto auto;align-items:center;gap:6px 10px;}
.threshold-controls .threshold-note{grid-column:1/-1;margin:0;line-height:1.5;}

/* 必须位于通用 .button.small 之后，确保商品 ID 行内动作不被恢复为 32px。 */
.goods-cell .gc-id-actions .item-inline-actions{min-height:16px;line-height:16px;}
.goods-cell .gc-id-actions .item-inline-actions .tag{
  box-sizing:border-box;height:16px;min-height:16px;max-height:16px;margin:0;padding:0 4px;
  border-radius:3px;font-size:9px;font-weight:500;line-height:14px;
}
.goods-cell .gc-id-actions .item-inline-actions .button.button.small{
  box-sizing:border-box;height:16px;min-width:0;min-height:16px;max-height:16px;margin:0;padding:0 4px;
  border-radius:3px;font-size:10px;font-weight:500;line-height:14px;box-shadow:none;white-space:nowrap;
}

@media(max-width:600px){
  .chip,.fchip,.tt-btn,.period-switch button{min-height:34px;padding:6px 12px;}
  .table-wrap.table-scroll{max-height:360px;}
  .table-wrap.table-scroll-master{max-height:480px;}
}

@media(max-width:900px){
  .rules-grid{grid-template-columns:repeat(2,minmax(150px,1fr));}
  .item-switcher{grid-template-columns:1fr 1fr;align-items:end;}
  .item-switcher label{grid-column:1/-1;grid-row:1;}
  .item-switcher small{grid-column:1/-1;text-align:center;}
  #portfolio .tier-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:600px){
  .rules-grid{grid-template-columns:1fr;}
  .item-switcher{grid-template-columns:1fr 1fr;}
  .item-switcher .button{justify-content:center;}
  #portfolio .tier-grid{grid-template-columns:1fr;}
  #portfolio>.controls .button{width:100%;margin-left:0;justify-content:center;}
}
