body[data-design="command-core"]{--ds-motion-play:running}
body[data-design="command-core"][data-motion="paused"]{--ds-motion-play:paused}
body[data-design="command-core"][data-motion="reduced"] *,body[data-design="command-core"][data-motion="reduced"] *::before,
body[data-design="command-core"][data-motion="reduced"] *::after{
  animation-duration:.001ms!important;
  animation-iteration-count:1!important;
  scroll-behavior:auto!important;
}
body[data-design="command-core"] :where(.panel,.card,.kcard,.adv-kpi,.adv-rec){
  position:relative;
}
body[data-design="command-core"] :where(.panel,.card,.kcard,.adv-kpi,.adv-rec,.tc-drawer,
.tct-modal,.tct-card,.chat-card,.ai-panel,.fd-w,.kb-card:not(.on),.ig-card){
  --ds-delay:calc(var(--ds-motion-index,0) * -.67s);
  animation:dsPlateBreath 8.4s ease-in-out infinite;
  animation-delay:var(--ds-delay);
  animation-play-state:var(--ds-motion-play);
}
body[data-design="command-core"] :where(.panel,.card,.kcard,.adv-kpi,.adv-rec)::after{
  content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;
  opacity:0;background:linear-gradient(110deg,transparent 25%,color-mix(in srgb,var(--ds-cyan) 8%,transparent) 48%,transparent 70%);
  background-size:240% 100%;background-position:120% 0;
  animation:dsSheen 10.5s ease-in-out infinite;
  animation-delay:calc(var(--ds-motion-index,0) * -.43s);
  animation-play-state:var(--ds-motion-play);
}
body[data-design="command-core"] [data-motion-kind="float"]::before{
  content:"";position:absolute;inset:-1px;pointer-events:none;border-radius:inherit;
  background:radial-gradient(circle at 18% 20%,color-mix(in srgb,var(--ds-indigo) 7%,transparent),transparent 36%);
  opacity:.3;animation:dsPlateFloat 7.6s ease-in-out infinite;
  animation-delay:calc(var(--ds-motion-index,0) * -.31s);
  animation-play-state:var(--ds-motion-play);
}
@keyframes dsPlateBreath{
  0%,100%{border-color:var(--ds-line);box-shadow:0 10px 28px color-mix(in srgb,var(--ds-shadow) 55%,transparent)}
  50%{border-color:color-mix(in srgb,var(--ds-cyan) 22%,var(--ds-line));box-shadow:0 13px 34px color-mix(in srgb,var(--ds-cyan) 8%,var(--ds-shadow))}
}
@keyframes dsPlateFloat{0%,100%{transform:translate3d(-2px,1px,0);opacity:.22}50%{transform:translate3d(3px,-2px,0);opacity:.48}}
@keyframes dsSheen{0%,72%{opacity:0;background-position:120% 0}82%{opacity:.7}100%{opacity:0;background-position:-120% 0}}
body[data-design="command-core"][data-motion="reduced"] *,
body[data-design="command-core"][data-motion="reduced"] *::before,
body[data-design="command-core"][data-motion="reduced"] *::after{
  animation:none!important;transition-duration:.001ms!important;
}
@media (prefers-reduced-motion:reduce){
  body[data-design="command-core"] *,body[data-design="command-core"] *::before,
  body[data-design="command-core"] *::after{
    animation:none!important;
    transition-duration:.001ms!important;
    scroll-behavior:auto!important;
  }
}

/* Keep text entry, open threads, and message histories fixed in place. */
body[data-design="command-core"] :where(.tc-comp,.tc-inp,.tct-inp,.tct-sel,.chat-thread,
.chat-msg,.ai-msgs,.ai-msg-user,.ai-msg-bot){
  animation:none!important;transform:none!important;
}
body[data-design="command-core"] :where(#tcBellCnt,.tc-btn-cnt):not([style*="none"]),
body[data-design="command-core"] .tct-btn-cnt{
  animation:dsBadgeArrive .62s ease-out 1;
}
@keyframes dsBadgeArrive{
  0%{transform:scale(.72);box-shadow:0 0 0 transparent}
  58%{transform:scale(1.16);box-shadow:0 0 16px color-mix(in srgb,var(--ds-coral) 45%,transparent)}
  100%{transform:scale(1);box-shadow:0 0 8px color-mix(in srgb,var(--ds-coral) 25%,transparent)}
}

body[data-design="command-core"] .adv-core-ring--one{animation:dsCoreSpin 15s linear infinite;animation-play-state:var(--ds-motion-play)}
body[data-design="command-core"] .adv-core-ring--two{animation:dsCoreSpinReverse 10s linear infinite;animation-play-state:var(--ds-motion-play)}
body[data-design="command-core"] [data-ai-state="pending"] .adv-core{animation:dsCorePending 2.2s ease-in-out infinite;animation-play-state:var(--ds-motion-play)}
body[data-design="command-core"] [data-ai-state="running"] .adv-core{animation:dsCoreRunning .82s ease-in-out infinite alternate;animation-play-state:var(--ds-motion-play)}
body[data-design="command-core"] [data-ai-state="running"] .adv-core-ring--one{animation-duration:2.2s}
body[data-design="command-core"] [data-ai-state="success"] .adv-core{animation:dsCoreSuccess .75s ease-out 1}
body[data-design="command-core"] [data-ai-state="quiet-fail"] .adv-core{animation:dsCoreQuietFail 1.1s ease-out 1}
@keyframes dsCoreSpin{to{transform:rotate(360deg)}}
@keyframes dsCoreSpinReverse{to{transform:rotate(-360deg)}}
@keyframes dsCorePending{0%,100%{transform:scale(.97)}50%{transform:scale(1.025)}}
@keyframes dsCoreRunning{from{transform:scale(.96);filter:hue-rotate(0)}to{transform:scale(1.07);filter:hue-rotate(20deg)}}
@keyframes dsCoreSuccess{35%{filter:hue-rotate(65deg);transform:scale(1.08)}100%{filter:none;transform:scale(1)}}
@keyframes dsCoreQuietFail{35%{filter:hue-rotate(145deg);opacity:.72}100%{filter:none;opacity:1}}

/* Business-module motion belongs to containers, never dense data or composers. */
body[data-design="command-core"] :where(.rv-card:not(.rv-overdue),.pcard,.fd-w,.payment-calendar,
.proc-card-table-wrap,.bdr,.rpx > .panel,.pos-card,.kb-card:not(.on),.ig-card,.hr-stat,
.hr-org-card:not(.root),.care-card,.kcard){
  animation:dsPlateBreath 8.8s ease-in-out infinite;
  animation-play-state:var(--ds-motion-play);
}
body[data-design="command-core"] .rv-card.rv-overdue,
body[data-design="command-core"] .kb-card.on,
body[data-design="command-core"] .hr-org-card.root{
  position:relative;
}
body[data-design="command-core"] .rv-card.rv-overdue{--ds-semantic-halo:var(--ds-coral)}
body[data-design="command-core"] .kb-card.on,
body[data-design="command-core"] .hr-org-card.root{--ds-semantic-halo:var(--ds-indigo)}
body[data-design="command-core"] .rv-card.rv-overdue::before,
body[data-design="command-core"] .kb-card.on::before,
body[data-design="command-core"] .hr-org-card.root::before{
  content:"";position:absolute;inset:2px;pointer-events:none;border-radius:inherit;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ds-semantic-halo) 36%,transparent);
  opacity:.32;transform:scale(.985);
  animation:dsSemanticHalo 4.8s ease-in-out infinite;
  animation-play-state:var(--ds-motion-play);
}
@keyframes dsSemanticHalo{
  0%,100%{opacity:.25;transform:scale(.985)}
  50%{opacity:.68;transform:scale(1)}
}
body[data-design="command-core"] :where(tr,td,th,input,select,textarea,[contenteditable="true"]){
  animation:none!important;
}
