/* ============================================================
   全站统一页头（浅色版，对齐首页品牌区）
   ------------------------------------------------------------
   结构：
     <header class="sh-header [sh-sticky]">
       <div class="sh-wrap">
         <a class="sh-brand" href="index.html"> logo + 中文主标题 + 英文副标题 </a>
         <nav class="sh-nav"> 5 个 .sh-item（首页/政策/图景/流向/案例集） </nav>
         <div class="sh-user" id="authNav"></div>   ← 登录态由 auth-nav.js 注入
       </div>
     </header>

   约定：
   - 所有类名以 sh- 前缀，避免与 Tailwind / 各页内联样式冲突。
   - 只改这一处即可全站生效；页面里不要覆盖 .sh-* 的尺寸。
   - 页头本身不透明（内页没有首页那张天空底图），用浅蓝渐变承接品牌色。
   ============================================================ */

.sh-header{
  /* 层叠层级约定（改这里前先对照全站已有的 z-index）：
       统一页头          90
       页内次级吸顶条    ≤60（case-theme.css 的 .topbar=60、co- 页与 metal-chains 的 .bar=10）
                         —— 必须低于页头，否则吸顶条会盖住下拉面板
       跟随鼠标的小浮层  99（metal-chains 的 #tip 提示框）
       模态层            ≥200（case-theme.css 的 .lb 灯箱=200、policy-theme.css 的弹窗=999/1000、
                         admin.html 的 .mask=100000）
                         —— 必须高于页头，否则弹窗/灯箱会被页头压住
     案例正文页曾出现「下拉菜单被吸顶工具条切一半」：.sh-header 与 .topbar 同为 60，
     而 .topbar 在 DOM 里排在页头之后 → 后者胜出，压住 .sh-drop。
     （.sh-drop 的 z-index:80 只在 .sh-header 这个层叠上下文内部比较，出不去。） */
  position:relative;z-index:90;
  /* 蓝色调，不落到白色：色值取自首页天空底图（顶部 #C5E2FB / 左侧 #ABD6FB） */
  background:linear-gradient(180deg,#a9d4fa 0%,#bcdffa 48%,#cbe6fb 100%);
  border-bottom:1px solid #92c3ee;
  box-shadow:0 2px 16px rgba(11,88,164,.12);
  /* 防御：金属链等页存在 header{...!important}/header nav a{...!important} 硬规则，
     所以统一页头刻意不用 <header>/<nav> 标签（用 div + role），这里再清一遍可能被继承的排版属性 */
  display:block;padding:0;margin:0;
  text-align:left;color:#173e7b;
}
.sh-header.sh-sticky{position:sticky;top:0}

.sh-wrap{
  width:min(1500px,calc(100% - 44px));
  margin:0 auto;
  min-height:106px;
  padding:15px 0;
  display:flex;
  align-items:center;
  gap:18px;
  box-sizing:border-box;
}

/* ---------- 品牌区 ---------- */
.sh-brand{display:flex;align-items:center;gap:14px;min-width:0;text-decoration:none;flex:0 1 auto}
.sh-logo{width:84px;height:69px;flex:0 0 auto;filter:drop-shadow(0 5px 9px rgba(0,96,200,.20))}
.sh-logo svg{width:100%;height:100%;display:block}
.sh-titles{min-width:0}
.sh-title{
  display:block;
  font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif;
  font-size:clamp(17px,1.85vw,29px);
  font-weight:900;
  letter-spacing:.3px;
  line-height:1.18;
  color:#082d73;
  white-space:nowrap;
  text-shadow:0 1px 0 #fff;
}
.sh-en{
  display:block;
  font-size:11.5px;
  line-height:1.3;
  color:#3d6597;
  margin-top:6px;
  letter-spacing:.1px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ---------- 导航 ---------- */
.sh-nav{margin:0 0 0 auto;padding:0;display:flex;align-items:center;gap:4px;flex:0 0 auto;flex-wrap:nowrap}
.sh-item{
  display:inline-flex;align-items:center;gap:7px;
  padding:10px 13px;border-radius:11px;
  font-family:inherit;font-size:14px;font-weight:700;
  color:#173e7b;text-decoration:none;white-space:nowrap;
  transition:background .18s,color .18s,transform .18s,box-shadow .18s;
}
.sh-item svg{width:17px;height:17px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sh-item:hover{background:rgba(255,255,255,.86);color:#0757e8;transform:translateY(-1px);box-shadow:0 4px 12px rgba(11,88,164,.10)}
.sh-item.is-active{
  color:#fff;
  background:linear-gradient(135deg,#168fff,#0757e8);
  box-shadow:0 7px 18px rgba(0,103,244,.26);
}
.sh-item.is-active:hover{color:#fff}

/* 「关键供应链流向」对一般账号不可用：
   - 视觉：只置灰，不挂任何「锁定」字样（用户 2026-10-27 明确要求），
     hover 也不高亮，光标打斜杠
   - 行为：auth-nav.js 的 syncLockMarks() 按角色处理 —— 高级/管理员移除 .locked
     恢复可点；其余保持 .locked，并拦掉鼠标点击与键盘回车
   - 真护栏在后端：绕过前端也会被 api.py 302 到 /no-access.html */
.sh-item.locked{color:#a3b6cc;cursor:not-allowed}
.sh-item.locked:hover{background:transparent;color:#a3b6cc;transform:none;box-shadow:none}
.sh-item.locked svg{opacity:.55}
/* 当前就在该库上（说明有权限）：高亮优先 */
.sh-item.is-active.locked{color:#fff;cursor:pointer}
.sh-item.is-active.locked:hover{color:#fff}
.sh-item.is-active.locked svg{opacity:1}

/* ---------- 模块下拉菜单 ----------
   4 个内容模块收进一个下拉，横向只占「首页 + 触发按钮」两格。
   这样 16 字的平台全称才有位置完整显示（之前铺 5 项时会被挤成省略号）。
   触发按钮文案跟随当前模块，在首页时显示兜底文案「数据模块」。 */
.sh-mods{position:relative;display:inline-flex}
.sh-more{
  display:inline-flex;align-items:center;gap:7px;
  padding:10px 13px;border-radius:11px;border:0;background:transparent;
  font-family:inherit;font-size:14px;font-weight:700;color:#173e7b;
  cursor:pointer;white-space:nowrap;
  transition:background .18s,color .18s,transform .18s,box-shadow .18s;
}
.sh-more svg{width:17px;height:17px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sh-more:hover{background:rgba(255,255,255,.86);color:#0757e8;transform:translateY(-1px);box-shadow:0 4px 12px rgba(11,88,164,.10)}
.sh-more.is-active,.sh-more.is-active:hover{color:#fff;background:linear-gradient(135deg,#168fff,#0757e8);box-shadow:0 7px 18px rgba(0,103,244,.26)}
.sh-caret{
  display:inline-block;width:0;height:0;margin-left:2px;
  border-left:4.5px solid transparent;border-right:4.5px solid transparent;
  border-top:5.5px solid currentColor;
  transition:transform .2s;
}
.sh-more[aria-expanded="true"] .sh-caret{transform:rotate(180deg)}

.sh-drop{
  box-sizing:border-box;
  position:absolute;top:calc(100% + 9px);right:0;z-index:80;
  width:252px;padding:7px;
  background:#fff;border:1px solid #cfe3f8;border-radius:14px;
  box-shadow:0 18px 42px rgba(11,88,164,.22);
}
/* 必须显式写：元素被设了 display 后，[hidden] 的 UA 样式会被盖掉（弹窗会一直挂着） */
.sh-drop[hidden]{display:none}
.sh-drop-item{
  display:flex;align-items:center;gap:9px;
  padding:9px 11px;border-radius:10px;
  font-size:14px;font-weight:700;color:#173e7b;text-decoration:none;white-space:nowrap;
}
.sh-drop-item svg{width:17px;height:17px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sh-drop-item:hover{background:#eaf4ff;color:#0757e8}
.sh-drop-item.is-active,.sh-drop-item.is-active:hover{background:linear-gradient(135deg,#168fff,#0757e8);color:#fff}
/* 下拉里的同一项：只置灰、不可点，没有「锁定」徽标（同上） */
.sh-drop-item.locked,.sh-drop-item.locked:hover{background:transparent;color:#a3b6cc;cursor:not-allowed}
.sh-drop-item.locked svg{opacity:.55}
/* 当前就停在这一组页面上（is-active）说明后端已经放行 —— 这批页面全是高级账号专属，
   一般账号根本进不来。高亮优先于置灰，否则蓝底上会闪出一段几乎看不见的灰字。
   auth-nav.js 拿到角色后会把 .locked 整个摘掉，这条只负责那之前的瞬间。 */
.sh-drop-item.is-active.locked,.sh-drop-item.is-active.locked:hover{
  background:linear-gradient(135deg,#168fff,#0757e8);color:#fff;cursor:pointer}
.sh-drop-item.is-active.locked svg{opacity:1}

/* ---------- 右侧用户区（auth-nav.js 挂载点） ---------- */
.sh-user{margin-left:6px;display:inline-flex;align-items:center;flex:0 0 auto}

/* ---------- 响应式 ---------- */
/* 模块收进下拉后横向压力小很多：1340 以下统一收一档字号，900 以下才换行 */
@media(max-width:1340px){
  .sh-title{font-size:18px}
  .sh-en{display:none}
  .sh-brand{gap:11px}
  .sh-logo{width:70px;height:57px}
  .sh-item,.sh-more{padding:9px 9px;font-size:13px;gap:6px}
}
/* 第三项「关于我们」常驻后，900–1150 区间横向余量只剩几像素，
   故把换行断点从 900 提到 1150，避免标题被挤掉 */
@media(max-width:1150px){
  .sh-wrap{flex-wrap:wrap;gap:8px;padding:14px 0 12px;min-height:0}
  /* 不能 overflow-x:auto —— 会把绝对定位的下拉面板裁掉 */
  .sh-nav{order:3;width:100%;margin:2px 0 0;overflow:visible;justify-content:flex-start}
  .sh-user{margin-left:auto}
  .sh-drop{right:auto;left:0;width:min(280px,calc(100vw - 40px))}
}
@media(max-width:760px){
  .sh-wrap{width:calc(100% - 24px);min-height:0;padding:9px 0}
  .sh-brand{gap:9px}
  .sh-logo{width:46px;height:40px}
  .sh-title{font-size:15px;white-space:normal;line-height:1.25}
  .sh-nav{gap:2px}
  .sh-item,.sh-more{padding:8px 10px;font-size:12.5px;gap:5px}
  .sh-item svg,.sh-more svg{width:15px;height:15px}
  .sh-drop{width:min(260px,calc(100vw - 28px))}
  .sh-drop-item{padding:9px 10px;font-size:13.3px}
}
