/* ===== 统一顶部导航（Company V1 / R2 Phase2）=====
   所有模块页共用同一套导航结构：<header class="module-shell"> + .module-brand + .module-nav + .module-account
   目的：
     - 固定导航的顺序与位置（同一 tag、同一内边距、同一宽度口径、无圆角贴边），
       切换页面不再出现"下方内容整体上下/左右跳动"。
     - 统一自适应宽度：内容区宽度 token 与导航内边距同步，宽屏不额外留白。
   约束：只替换导航外壳样式，不改变任何业务功能、按钮与列表布局。
*/
.module-shell{
  --nav-line:var(--line,#dfe6ec);
  --nav-navy:#0f303c;
  --nav-accent:#f1b35f;
  display:grid;grid-template-columns:max-content minmax(0,1fr) max-content;align-items:center;gap:18px;
  height:64px;min-height:64px;margin:0 0 14px;
  /* UAT-ALL-01 A：导航内容边距与全站内容区公式（宽 2180 / 窄侧边 clamp）对齐：
     宽屏时导航 brand 与页面内容左/右边缘一致，窄屏时保持最小 18px 安全边距。
     仅更新对齐公式，导航视觉（深蓝绿底 / 橙色 Logo / 下划线 / 64px）完全不变。 */
  padding:0 max(clamp(18px,3vw,56px),calc((100vw - 2180px)/2));
  background:var(--nav-navy);color:#fff;border:0;border-bottom:1px solid rgba(255,255,255,.09);
  position:sticky;top:0;z-index:50;
}
.module-shell .module-brand{grid-column:1;font-weight:800;color:#fff;white-space:nowrap;display:inline-flex;align-items:center;gap:11px}
.module-shell .module-brand::before{content:"A";display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:10px;background:var(--nav-accent);color:#19333b;font-size:21px;font-weight:900;line-height:1}
.module-shell .module-brand .badge{font-weight:600;background:rgba(255,255,255,.1);color:#dbe8e8}
.module-shell .module-nav{grid-column:2;display:flex;align-self:stretch;align-items:stretch;justify-content:safe center;gap:3px;flex-wrap:nowrap;font-size:0;min-width:0;overflow-x:auto;scrollbar-width:thin}
.module-shell .module-nav a{
  display:inline-flex;flex-shrink:0;align-items:center;min-height:64px;padding:0 11px;
  border:0;border-bottom:3px solid transparent;border-radius:0;color:#bdd0d5;text-decoration:none;
  font-size:14px;font-weight:700;white-space:nowrap;
}
.module-shell .module-nav a:hover{background:rgba(255,255,255,.045);color:#fff}
.module-shell .module-nav a.active{background:rgba(255,255,255,.045);color:#fff;border-bottom-color:var(--nav-accent)}
.module-shell .module-account{grid-column:3;justify-self:end;display:flex;align-items:center;gap:8px;font-size:13px;color:#dbe8e8}
.module-shell .module-account button{flex-shrink:0;white-space:nowrap;background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.18);color:#fff}
.module-shell:not(:has(.module-account))::after{content:"";grid-column:3;min-width:0}
@media(min-width:761px) and (max-width:1500px){
  .module-shell{gap:10px}
  .module-shell .module-nav a{padding-left:8px;padding-right:8px}
  .module-shell .module-account{white-space:nowrap}
  .module-shell:has(.module-account) .module-brand .badge{display:none}
  .module-shell .module-account #currentOperator{max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .module-shell .module-nav{justify-content:flex-start;gap:1px}
}
@media(max-width:760px){
  .module-shell{display:flex;flex-wrap:wrap;height:auto;min-height:64px;padding:8px clamp(12px,3vw,20px)}
  .module-shell .module-brand::before{width:34px;height:34px;flex-basis:34px;font-size:19px}
  .module-shell .module-nav{order:3;width:100%;height:42px;overflow-x:auto;justify-content:flex-start}
  .module-shell .module-nav a{min-height:42px;padding:0 10px}
  .module-shell .module-account{margin-left:auto}
  .module-shell:not(:has(.module-account))::after{display:none}
}
/* UAT：导航复用已确认深色版本，局部物流主题只影响内容区。 */
html body.r4-logistics-page header.module-shell.r4-logistics-nav {
  grid-template-columns:max-content minmax(0,1fr);
  background:#0f303c;color:#fff;border-bottom-color:rgba(255,255,255,.09);
}
html body.r4-logistics-page header.module-shell.r4-logistics-nav::after { display:none; }
html body.r4-logistics-page header.module-shell.r4-logistics-nav .module-brand { color:#fff; }
html body.r4-logistics-page header.module-shell.r4-logistics-nav .version-badge {
  color:#dbe8e8;border-color:rgba(255,255,255,.18);
}
html body.r4-logistics-page header.module-shell.r4-logistics-nav .module-nav a {
  color:#bdd0d5;font-size:14px;min-height:64px;border-radius:0;border-bottom:3px solid transparent;
}
html body.r4-logistics-page header.module-shell.r4-logistics-nav .module-nav a:hover,
html body.r4-logistics-page header.module-shell.r4-logistics-nav .module-nav a.active {
  color:#fff;background:rgba(255,255,255,.045);box-shadow:none;
}
html body.r4-logistics-page header.module-shell.r4-logistics-nav .module-nav a.active { border-bottom-color:#f1b35f; }
@media(max-width:760px){
  html body.r4-logistics-page header.module-shell.r4-logistics-nav .module-nav a { min-height:42px; }
}
