/* V166：三分析页最终统一尺寸：左右0、宽100%、顶栏46、顶部0、间距0。 */
:root{
  --hl-analysis-v166-side:0px;
  --hl-analysis-v166-toolbar-h:46px;
  --hl-analysis-v166-gap:0px;
  --hl-analysis-v166-content-top:46px;
}

/* 历史/广告：真实DOM首帧直接预留46px，不等待路由JS。 */
#hl-history-v150,
.ad-v109-page{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
  margin-top:46px!important;
  box-sizing:border-box!important;
}

/* 利润分析：由 head 中同步预路由 class 在 React 之前决定位置。 */
html.hl-route-profit-v166 .app-main>.workspace-panel,
body.hl-analysis-v166-profit .app-main>.workspace-panel{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
  margin-top:46px!important;
  box-sizing:border-box!important;
}

/* 一旦离开利润分析，立即恢复普通页面原始位置；即时分析不能继承利润页偏移。 */
html:not(.hl-route-profit-v166) body.hl-analysis-v157-profit .app-main>.workspace-panel,
html:not(.hl-route-profit-v166) body.hl-analysis-v163-profit .app-main>.workspace-panel,
html:not(.hl-route-profit-v166) body.hl-analysis-v165-profit .app-main>.workspace-panel,
html:not(.hl-route-profit-v166) body.hl-analysis-v166-profit .app-main>.workspace-panel{
  width:auto!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  margin-top:0!important;
}

/* 覆盖旧历史页所有12px/6px规则。 */
body.hl-analysis-v160-history #hl-history-v150,
body.hl-analysis-v161-history #hl-history-v150,
body.hl-analysis-v162-history #hl-history-v150,
body.hl-analysis-v163-history #hl-history-v150,
body.hl-analysis-v165-history #hl-history-v150,
body.hl-analysis-v166-history #hl-history-v150{
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  margin-top:46px!important;
}

/* 三页下方表格/详情100%占满统一工作区。 */
#hl-history-v150 .hl-his-overview,
#hl-history-v150 .hl-his-detail,
.ad-v109-page .ad-v109-overview,
.ad-v109-page .ad-v109-detail,
.ad-v109-page .ad-v109-table-wrap,
.ad-v109-page .ad-v109-product-detail,
html.hl-route-profit-v166 .app-main>.workspace-panel>.data-table-wrap,
body.hl-analysis-v166-profit .app-main>.workspace-panel>.data-table-wrap{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}

/* 历史标题保持常规字重。 */
#hl-history-v150 .hl-his-header h1{
  font-weight:400!important;
}


/* V167：历史分析 / 广告流量切换时，根容器占位完全一致，避免布局改变 */
#hl-history-v150,
.ad-v109-page{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:46px 0 0 0!important;
  padding:0!important;
  box-sizing:border-box!important;
  position:relative!important;
  left:0!important;
  right:auto!important;
  top:auto!important;
  transform:none!important;
  transition:none!important;
}

/* 两页第一块业务面板也使用同样的宽度/左右位置 */
#hl-history-v150 .hl-his-overview,
.ad-v109-page .ad-v109-overview{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}

/* 历史页自身旧版本留下的额外根 padding 全部清零 */
#hl-history-v150{
  padding-left:0!important;
  padding-right:0!important;
  padding-top:0!important;
}


/* V172：首帧和切页都不使用 transition，公共时间栏下的页面位置一次到位。 */
#hl-history-v150,
.ad-v109-page,
html.hl-route-profit-v166 .app-main>.workspace-panel{
  margin-top:46px!important;
  transition:none!important;
  animation:none!important;
}


/* 离开三分析页后不再使用专门的即时分析/实时广告路由样式；普通页面自动恢复自身布局。 */


/* V175：公共时间栏固定46px；三分析页任何滚动定位都要避开它。 */
#hl-history-v150,
#hl-history-v150 .hl-his-overview,
#hl-history-v150 .hl-his-detail,
.ad-v109-page,
.ad-v109-page .ad-v109-overview,
.ad-v109-page .ad-v109-detail,
html.hl-route-profit-v166 .app-main > .workspace-panel{
  scroll-margin-top:46px!important;
}

/* 切换三分析页不做任何平滑位移，避免浏览器旧滚动位置产生视觉过渡。 */
html.hl-route-history-v166,
html.hl-route-ads-v166,
html.hl-route-profit-v166{
  scroll-behavior:auto!important;
}
