/* =========================================================
   V2.6.13 全局动效系统
   原则：短时、克制、只使用 opacity/transform，系统减少动态时完整降级。
   ========================================================= */

:root{
  --hc-motion-fast:140ms;
  --hc-motion-base:210ms;
  --hc-motion-slow:300ms;
  --hc-motion-ease:cubic-bezier(.2,.72,.2,1);
  --hc-motion-emphasized:cubic-bezier(.16,1,.3,1);
  --hc-motion-delay:0ms;
}

/* 收口历史版本中分散、重复和持续循环的动效。 */
.page-transition,
.ui-reveal,
.backdrop,
.modal,
#toast.show,
.donut,
.executive-donut,
.executive-trend-bars i,
.trend-bars i,
.empty-icon,
.loading-spinner,
.sync i,
.bar span:after,
.dept-bars i:after,
.workload-progress i:after,
.executive-dept-volume i:after,
.executive-person-progress i:after{
  animation:none;
}

.ui-reveal{opacity:1;transform:none;filter:none}
.sidebar:after,
.topbar:after,
.welcome-banner:after,
.executive-hero:after,
.btn:before,
.nav button:after{
  content:none!important;
}
.nav button i{filter:none!important}
.energy-ring,.fab-ring{animation:none!important}
.hc-mascot .bot-body,
.hc-mascot .eyes,
.hc-mascot .bot-sparkles,
.hc-mascot .arm-right,
.hc-mascot .head-shell,
.official-mascot .mascot-img,
.official-mascot .mascot-halo,
.official-mascot .mascot-bolt,
.welcome-pulse,
.loading-orbit,
.executive-hero-tags i,
.digital-live-dot{
  animation:none!important;
}

/* 页面进入与分组错峰。未加载脚本时内容始终保持可见。 */
html.hc-motion-ready .page-transition.hc-page-enter{
  animation:hcPageEnter var(--hc-motion-base) var(--hc-motion-ease) both;
}
html.hc-motion-ready .hc-motion-item{
  animation:hcItemEnter var(--hc-motion-slow) var(--hc-motion-emphasized) both;
  animation-delay:var(--hc-motion-delay,0ms);
}
html.hc-motion-ready .refined-login-card.hc-login-enter{
  animation:hcLoginCardEnter 360ms var(--hc-motion-emphasized) both;
}
html.hc-motion-ready .refined-login-main.hc-login-enter,
html.hc-motion-ready .refined-login-brand.hc-login-enter{
  animation:hcLoginCopyEnter 320ms var(--hc-motion-emphasized) both;
}

@keyframes hcPageEnter{
  from{opacity:.01;transform:translate3d(0,6px,0)}
  to{opacity:1;transform:none}
}
@keyframes hcItemEnter{
  from{opacity:.01;transform:translate3d(0,8px,0)}
  to{opacity:1;transform:none}
}
@keyframes hcLoginCardEnter{
  from{opacity:.01;transform:translate3d(0,10px,0) scale(.992)}
  to{opacity:1;transform:none}
}
@keyframes hcLoginCopyEnter{
  from{opacity:.01;transform:translate3d(-8px,0,0)}
  to{opacity:1;transform:none}
}

/* 仅为可操作的按钮和导航提供轻量反馈。 */
.btn,
.icon-button,
.nav button,
.view-switch button,
.unified-tabs button,
.dorm-tabs button,
.quick-report-buttons button,
.topbar-more-menu button,
summary{
  transition:
    transform var(--hc-motion-fast) var(--hc-motion-ease),
    box-shadow var(--hc-motion-base) ease,
    border-color var(--hc-motion-base) ease,
    background-color var(--hc-motion-base) ease,
    color var(--hc-motion-base) ease;
}

@media(hover:hover) and (pointer:fine){
  .nav button:hover{transform:translate3d(2px,0,0)}
  .nav button:hover .ui-icon{transform:translate3d(0,-1px,0)}
  .btn:hover,.icon-button:hover{transform:translate3d(0,-1px,0)}
}

.btn:active,
.icon-button:active,
.nav button:active,
summary:active{
  transform:scale(.99)!important;
  transition-duration:70ms!important;
}

.nav button:before{
  transition:transform var(--hc-motion-base) var(--hc-motion-emphasized),opacity var(--hc-motion-fast) ease!important;
}
.nav button.active .ui-icon{
  transform:translate3d(0,-1px,0);
  transition:transform var(--hc-motion-base) var(--hc-motion-ease);
}
/* 图表与数值只播放一次，不再持续扫光。 */
html.hc-motion-ready .hc-progress-enter{
  transform-origin:left center;
  animation:hcProgressEnter 520ms var(--hc-motion-emphasized) both;
  animation-delay:var(--hc-motion-delay,0ms);
}
html.hc-motion-ready .hc-chart-enter{
  transform-origin:center bottom;
  animation:hcChartEnter 420ms var(--hc-motion-emphasized) both;
}
@keyframes hcProgressEnter{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes hcChartEnter{from{opacity:.01;transform:scaleY(.25)}to{opacity:1;transform:none}}

/* 弹窗：进入、退出均有反馈，退出期间禁止重复点击。 */
html.hc-motion-ready .backdrop{
  animation:hcBackdropIn 170ms ease-out both;
}
html.hc-motion-ready .modal{
  animation:hcModalIn 230ms var(--hc-motion-emphasized) both;
}
html.hc-motion-ready .backdrop.is-leaving{
  pointer-events:auto;
  animation:hcBackdropOut 180ms ease-in both;
}
html.hc-motion-ready .modal.is-leaving,
html.hc-motion-ready .backdrop.is-leaving .modal{
  pointer-events:none;
  animation:hcModalOut 180ms ease-in both;
}
@keyframes hcBackdropIn{from{opacity:.01}to{opacity:1}}
@keyframes hcBackdropOut{from{opacity:1}to{opacity:.01}}
@keyframes hcModalIn{
  from{opacity:.01;transform:translate3d(0,10px,0) scale(.988)}
  to{opacity:1;transform:none}
}
@keyframes hcModalOut{
  from{opacity:1;transform:none}
  to{opacity:.01;transform:translate3d(0,7px,0) scale(.992)}
}

/* 下拉菜单、移动抽屉、提示和加载状态。 */
html.hc-motion-ready details[open]>.topbar-more-menu,
html.hc-motion-ready details[open]>.page-more-menu,
html.hc-motion-ready details[open]>.action-menu-list,
html.hc-motion-ready details.action-menu[open]>div{
  transform-origin:top right;
  animation:hcMenuIn var(--hc-motion-base) var(--hc-motion-emphasized) both;
}
@keyframes hcMenuIn{
  from{opacity:.01;transform:translate3d(0,-4px,0) scale(.985)}
  to{opacity:1;transform:none}
}

html.hc-motion-ready #toast.show{
  animation:hcToastIn 240ms var(--hc-motion-emphasized) both;
}
html.hc-motion-ready #toast.show.is-leaving{
  animation:hcToastOut 180ms ease-in both;
}
@keyframes hcToastIn{
  from{opacity:.01;transform:translate3d(-50%,10px,0) scale(.98)}
  to{opacity:1;transform:translate3d(-50%,0,0) scale(1)}
}
@keyframes hcToastOut{
  from{opacity:1;transform:translate3d(-50%,0,0)}
  to{opacity:.01;transform:translate3d(-50%,7px,0)}
}

html.hc-motion-ready .loading-card{animation:hcLoadingCardIn var(--hc-motion-base) var(--hc-motion-emphasized) both}
html.hc-motion-ready .loading-spinner .ui-icon,
html.hc-motion-ready .sync.state-syncing .ui-icon,
html.hc-motion-ready .syncing .ui-icon,
html.hc-motion-ready .side-status.state-syncing .ui-icon{animation:hcSpin 900ms linear infinite}
@keyframes hcLoadingCardIn{
  from{opacity:.01;transform:translate3d(0,7px,0) scale(.99)}
  to{opacity:1;transform:none}
}
@keyframes hcSpin{to{transform:rotate(360deg)}}

/* 横向可滚动区域仅显示静态边缘提示，不制造循环动画。 */
.tablewrap.is-scrollable:not(.scrolled-end):after,
.executive-person-table.is-scrollable:not(.scrolled-end):after{
  transition:opacity var(--hc-motion-base) ease;
}

html.hc-motion-paused *{animation-play-state:paused!important}

/* 用户手动精简、系统减少动态或窄屏触控环境下统一降级。 */
html.hc-motion-reduced{scroll-behavior:auto!important}
html.hc-motion-reduced *,
html.hc-motion-reduced *:before,
html.hc-motion-reduced *:after{
  animation-duration:.001ms!important;
  animation-iteration-count:1!important;
  transition-duration:.001ms!important;
  scroll-behavior:auto!important;
}
html.hc-motion-reduced .hc-motion-item,
html.hc-motion-reduced .page-transition,
html.hc-motion-reduced .refined-login-card,
html.hc-motion-reduced .refined-login-main,
html.hc-motion-reduced .refined-login-brand{
  opacity:1!important;
  transform:none!important;
}

@media(prefers-reduced-motion:reduce){
  *,*:before,*:after{
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
    scroll-behavior:auto!important;
  }
  .hc-motion-item,.page-transition,.refined-login-card,.refined-login-main,.refined-login-brand{
    opacity:1!important;
    transform:none!important;
  }
}

@media(max-width:820px){
  :root{--hc-motion-slow:240ms}
  html.hc-motion-ready .hc-motion-item{animation-delay:min(var(--hc-motion-delay,0ms),72ms)}
}
