/* 全站皮肤层（2026-11-09 界面风格；2026-11-12 两维化；2026-11-12 三改）
 * ——**只有企业端 index.html 加载本文件**（总后台不换肤）。
 *
 * 两维，职责严格分离：
 *   · 风格 html[data-style]：**只定义框架布局**，不含颜色定义——
 *       plain  素雅侧栏（默认：侧栏 + 素雅底色）
 *       classic 经典侧栏（侧栏为主色带，正文素雅）
 *       top    素雅顶部导航（菜单横排在顶栏）
 *       top-classic 经典顶部导航（顶栏为主色带）
 *       dark   通体背景侧栏（整页深色底 + 侧栏）
 *       dark-top 通体顶部导航（整页深色底 + 顶栏）
 *     风格里出现的颜色一律**由主题色推导**（color-mix）或中性灰，不写死品牌色。
 *   · 主题色 html[data-accent]：**只定义主色 --p**（classic 经典蓝=默认不写）。
 *     搭配色（--p50 浅底 / --p-ink 深字 / --p-line 描边 / --ctl-focus 聚焦环）全部
 *     由 --p 按固定比例推导——换主题色只改一处。
 *
 * 兜底：不支持 color-mix 的浏览器落到 :root 静态值（=经典蓝搭配色），布局不错位。
 * 纪律：默认组合（plain×classic）零覆盖，观感=白底极简定版；点缀色/状态色
 * （引擎色、图表色）跨皮肤不变。
 */

/* ═══ 主题色：只定义 --p（六个可选；classic 经典蓝=默认，不写覆盖） ═════════ */
html[data-accent="azure"]{ --p:#0284C7 }
html[data-accent="deep"]{ --p:#1E40AF }
html[data-accent="jade"]{ --p:#0F766E }
html[data-accent="sunset"]{ --p:#C2410C }
html[data-accent="violet"]{ --p:#7C3AED }

/* 搭配色：由 --p 推导（浅底/深字/描边/聚焦环），换主题色自动跟随。
   **必须包 @supports**（2026-11-23 苹果设备侧栏背景消失根因）：
   后写的 color-mix 声明一旦"能解析但算不出"（旧 Safari 的 color-mix(var()) 实现缺陷），
   该属性会回落到 initial（透明/none），**不会退回上一条静态值**——实测 WebKit 里
   `background:linear-gradient(#1D4ED8,#1E3A8A)` 后面再写一条坏的 color-mix 渐变，
   computed backgroundImage 直接变 `none`，侧栏就成了空白（用户报的"背景显示不出来"）。
   修法：所有 color-mix 一律放进 @supports，不支持/算不出时整段不生效，静态兜底保留。 */
@supports (color: color-mix(in srgb, red, blue)){
  html[data-accent]{
    --p50:color-mix(in srgb, var(--p) 8%, #fff);
    --p-ink:color-mix(in srgb, var(--p) 86%, #0b1220);
    --p-line:color-mix(in srgb, var(--p) 34%, #fff);
    --ctl-focus:color-mix(in srgb, var(--p) 16%, transparent);
  }
}

/* 实时查询指标色（2026-11-19 归入皮肤层）：
 * 提及率跟随主题主色（--p-ink）；TOP3/TOP1 是**数据色**——色相跨主题不变
 * （防与主色撞色/语义漂移），但深色皮肤下自动提亮，保证对比度。 */
:root{ --m-top3:#0891B2; --m-top1:#7C3AED }
html[data-style="dark"], html[data-style="dark-top"]{
  --m-top3:#22D3EE; --m-top1:#A78BFA;
}

/* ═══ 布局共用：顶部导航（素雅 / 经典 / 通体顶部 三者共用排布） ═══════════ */
html[data-style="top"] .app,
html[data-style="top-classic"] .app,
html[data-style="dark-top"] .app{ flex-direction:column }
html[data-style="top"] .sb,
html[data-style="top-classic"] .sb,
html[data-style="dark-top"] .sb{
  width:100%; height:56px; flex-direction:row; align-items:center;
  border-right:none; border-bottom:1px solid var(--bd); overflow:visible;
}
html[data-style="top"] .logo,
html[data-style="top-classic"] .logo,
html[data-style="dark-top"] .logo{ padding:0 14px 0 16px }
html[data-style="top"] .logo .lm,
html[data-style="top-classic"] .logo .lm,
html[data-style="dark-top"] .logo .lm{ width:30px; height:30px; border-radius:8px }
html[data-style="top"] .ln,
html[data-style="top-classic"] .ln,
html[data-style="dark-top"] .ln{ font-size:14.5px }
html[data-style="top"] .ln small,
html[data-style="top-classic"] .ln small,
html[data-style="dark-top"] .ln small{ display:none }
html[data-style="top"] .nav,
html[data-style="top-classic"] .nav,
html[data-style="dark-top"] .nav{
  display:flex; flex-direction:row; align-items:center;
  overflow-x:auto; overflow-y:hidden; padding:0 6px; flex:1; min-width:0;
}
/* 顶栏模式隐藏分组标签（横排没有分组语义） */
html[data-style="top"] .ng,
html[data-style="top-classic"] .ng,
html[data-style="dark-top"] .ng{ display:none }
html[data-style="top"] .nv,
html[data-style="top-classic"] .nv,
html[data-style="dark-top"] .nv{
  padding:7px 11px; margin:0; border-radius:8px; white-space:nowrap; font-size:13px;
}
/* 顶栏用"浅底胶囊"高亮，去掉侧栏的左强调条 */
html[data-style="top"] .nv.on::before,
html[data-style="top-classic"] .nv.on::before,
html[data-style="dark-top"] .nv.on::before{ display:none }
html[data-style="top"] .bfoot,
html[data-style="top-classic"] .bfoot,
html[data-style="dark-top"] .bfoot{ display:none }
html[data-style="top"] .main,
html[data-style="top-classic"] .main,
html[data-style="dark-top"] .main{ height:auto; flex:1; min-height:0; width:100% }
/* 内容区横向铺满（原 .ct 有 max-width:1200px，顶栏模式下右侧留白） */
html[data-style="top"] .ct,
html[data-style="top-classic"] .ct,
html[data-style="dark-top"] .ct{ max-width:100%; width:100% }

/* ═══ 风格：classic 经典侧栏（侧栏为主色带；颜色由主题色推导） ═════════════ */
html[data-style="classic"] .sb{
  /* 静态兜底：经典蓝渐变（不支持 color-mix 的浏览器就用它，绝不留白） */
  background:linear-gradient(180deg, #1D4ED8, #1E3A8A);
  border-right-color:rgba(255,255,255,.12);
}
/* 主题色推导版（@supports 守卫：算不出时整段不生效，上面的静态渐变保留） */
@supports (color: color-mix(in srgb, red, blue)){
  html[data-style="classic"] .sb{
    background:linear-gradient(180deg,
               color-mix(in srgb, var(--p) 80%, #0d1638),
               color-mix(in srgb, var(--p) 42%, #0d1638));
  }
}
html[data-style="classic"] .sb .ln{ color:#fff }
html[data-style="classic"] .sb .ln small{ color:rgba(255,255,255,.62) }
html[data-style="classic"] .sb .bfoot{ color:rgba(255,255,255,.55); border-top-color:rgba(255,255,255,.16) }
html[data-style="classic"] .sb .ng{ color:rgba(255,255,255,.62) }
html[data-style="classic"] .sb .ng::after{ background:rgba(255,255,255,.16) }
html[data-style="classic"] .sb .nv{ color:rgba(255,255,255,.86) }
html[data-style="classic"] .sb .nv:hover{ background:rgba(255,255,255,.12); color:#fff }
html[data-style="classic"] .sb .nv.on{ background:rgba(255,255,255,.16); color:#fff }
html[data-style="classic"] .sb .nv.on::before{ background:#fff }

/* ═══ 风格：top-classic 经典顶部导航（顶栏为主色带；颜色由主题色推导） ═════ */
html[data-style="top-classic"] .sb{
  background:linear-gradient(90deg,#1D4ED8,#1E3A8A);
  border-bottom-color:rgba(255,255,255,.12);
}
@supports (color: color-mix(in srgb, red, blue)){
  html[data-style="top-classic"] .sb{
    background:linear-gradient(90deg,
               color-mix(in srgb, var(--p) 80%, #0d1638),
               color-mix(in srgb, var(--p) 42%, #0d1638));
  }
}
html[data-style="top-classic"] .sb .ln{ color:#fff }
html[data-style="top-classic"] .sb .nv{ color:rgba(255,255,255,.88) }
html[data-style="top-classic"] .sb .nv:hover{ background:rgba(255,255,255,.12); color:#fff }
html[data-style="top-classic"] .sb .nv.on{ background:rgba(255,255,255,.18); color:#fff }

/* ═══ 风格：dark / dark-top 通体背景（整页深色底；底色由主题色推导） ═══════ */
html[data-style="dark"], html[data-style="dark-top"]{
  /* 兜底静态值（经典蓝搭配）——不支持 color-mix 时用 */
  --bg:#0B1220; --card:#121B2E; --surface:#121B2E; --surface2:#1B2740;
  --fill:#141F35; --bd:#233149; --line:#233149; --hd-line:#1D2A44;
  --row-hover:#16223A; --th-bg:#16223A;
  --t1:#E6EDF7; --t2:#AEBDD4; --t3:#7B8AA6;
  --track:#2A3A57; --scroll:#2A3A57; --scroll-hover:#3B517A;
  --wn:#FBBF24; --wnbg:#2C2408; --wn-line:#634A12;
  --ok:#4ADE80; --okbg:#0F2C1D; --dg:#F87171; --dgbg:#301216;
  --p50:#18294A; --p-ink:#8AB6FF; --p-line:#2C4470;
  --ctl-focus:rgba(76,141,255,.20);
}
/* 深色表面由主题色推导（保持一点主题色倾向，通体背景不"死黑"）。
   @supports 守卫：旧 Safari 的 color-mix(var()) 会算不出 → 若裸写会让整组变量变无效
   （--bg 等回落到"未定义"，body 背景变白、卡片透视到底层，看起来"背景没了"）。
   包起来时上面的静态深色值保留，只是不带主题色倾向。 */
@supports (color: color-mix(in srgb, red, blue)){
  html[data-style="dark"], html[data-style="dark-top"]{
    --bg:color-mix(in srgb, var(--p) 7%, #070C16);
    --card:color-mix(in srgb, var(--p) 9%, #0F1626);
    --surface:var(--card);
    --surface2:color-mix(in srgb, var(--p) 12%, #18213A);
    --fill:color-mix(in srgb, var(--p) 7%, #0D1526);
    --bd:color-mix(in srgb, var(--p) 16%, #1B2740);
    --line:var(--bd);
    --hd-line:color-mix(in srgb, var(--p) 12%, #16203A);
    --row-hover:color-mix(in srgb, var(--p) 11%, #141E33);
    --th-bg:color-mix(in srgb, var(--p) 11%, #141E33);
    --track:color-mix(in srgb, var(--p) 18%, #1E2A44);
    --scroll:color-mix(in srgb, var(--p) 18%, #1E2A44);
    --scroll-hover:color-mix(in srgb, var(--p) 26%, #2A3A57);
    /* 主色在深底上的变体：浅底/深字/描边整体提亮 */
    --p50:color-mix(in srgb, var(--p) 22%, var(--card));
    --p-ink:color-mix(in srgb, var(--p) 62%, #fff);
    --p-line:color-mix(in srgb, var(--p) 42%, var(--card));
    --ctl-focus:color-mix(in srgb, var(--p) 22%, transparent);
  }
}
html[data-style="dark"] .b-red,
html[data-style="dark-top"] .b-red{ color:#FCA5A5 }
/* 深色下下拉自绘箭头换浅色（forms.css 的箭头是 data-URI，变量进不去，整条覆写） */
html[data-style="dark"] select,
html[data-style="dark-top"] select{
  background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23AEBDD4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ═══ 页面标题 / 内容块标题（2026-11-19 定版，全站企业端）═════════════════
 * 页面标题不再在页内出现：H1 隐藏、标题收到顶栏 #crumb（4px 渐变竖条 + 19px）。
 * 内容块标题 .card .ch 统一：3px 渐变竖条 + 14px/650，右侧附加信息保持原布局。
 * 竖条用绝对定位伪元素——不参与 flex 排布，不会挤动右侧按钮/角标。 */
.page > h1{ display:none }

#crumb{ display:flex; align-items:center; gap:9px; font-size:19px; font-weight:650;
  letter-spacing:.2px; color:var(--t1,#0F172A) }
#crumb::before{ content:""; width:4px; height:17px; border-radius:2px; flex:0 0 auto;
  background:linear-gradient(180deg,var(--p,#2563EB),var(--m-top3,#0891B2)) }

.card .ch{ position:relative; padding-left:12px; padding-bottom:10px; margin-bottom:14px;
  font-size:14px; font-weight:650; line-height:20px; color:var(--t1,#0F172A) }
.card .ch::before{ content:""; position:absolute; left:0; top:3px; width:3px; height:14px;
  border-radius:2px; background:linear-gradient(180deg,var(--p,#2563EB),var(--m-top3,#0891B2)) }

/* 带右侧计数的小节标题（历史查询/查询结果这类）：竖条由 .sec-t 自带，避免双条 */
.card .ch.sec{ padding-left:0 }
.card .ch.sec::before{ display:none }
.ch.sec{ display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-start; gap:8px }
.ch.sec .sec-t{ display:flex; align-items:center; gap:8px }
.ch.sec .sec-t::before{ content:""; width:3px; height:14px; border-radius:2px; flex:0 0 auto;
  background:linear-gradient(180deg,var(--p,#2563EB),var(--m-top3,#0891B2)) }
.ch.sec .sec-n{ margin-left:auto; font-size:11.5px; font-weight:400;
  color:var(--t2,#64748B); font-variant-numeric:tabular-nums }
