/* 统一页面外框（2026-10-28 TK：各页面总宽度不一致，左侧导航折叠时更明显）
   标准 = 设计规范 hk-ds.v5 的 .hk-ds 外框（经营数据看板同款）：左右各 32px、铺满导航右侧的宽度、靠左，不另设最大宽度。
   这里把各页面自己加的最大宽度 / 居中 / 额外边距去掉，导航展开和折叠时所有页面左右边缘一致。
   只管电脑和平板（≥821px）；手机照 mobile.v1.css 和 hk-ds 的 16px。门店员工页里 640/720 的手机式窄栏不动。
   跟导航一起由 render-layout.js 加载，排在各页面样式前面，所以用 !important。新页面不用管这份：根元素用 class="hk-ds" 就是这个外框。 */
@media (min-width: 821px) {
  /* 1. 页面根：直接挂在 body 下的 <main>（绝大多数页面）和几个 div / section 根 */
  :is(body:has(> .console-nav-shell), body.has-console-nav-shell) > main,
  :is(body:has(> .console-nav-shell), body.has-console-nav-shell) > #live-analysis-app,
  :is(body:has(> .console-nav-shell), body.has-console-nav-shell) > div > .hk-page {
    box-sizing: border-box !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
  }

  /* 2. 根里面再套一层自带最大宽度 / 居中的主栏 */
  :is(body:has(> .console-nav-shell), body.has-console-nav-shell) :is(.ds-main, .ops6-main, .sd-main, .lx-main, .tpv2o-main, .dz-main, .wb6 .wb-main, .hk-ds.dh) {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 3. 老页面外壳（.hk-page）里又放了 .hk-ds，两层各 32px，去掉里面那层 */
  :is(body:has(> .console-nav-shell), body.has-console-nav-shell) .hk-page > .hk-ds {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 4. 人事管理是一整张白卡（自带左侧小导航），卡片边对齐别的页面的内容边 */
  :is(body:has(> .console-nav-shell), body.has-console-nav-shell) > #harrold-people-v2 {
    width: auto !important;
    max-width: none !important;
    margin-left: 32px !important;
    margin-right: 32px !important;
  }
}
