/* Page-transition motion without screen blink — loaded after every other theme
 * sheet on both portals.
 *
 * Entrance animations on page-sized containers used to start at opacity 0, and
 * the portals re-render whole pages several times per click (placeholder →
 * data, toasts, panels), so each re-render flashed the screen blank. Here:
 *   1. page-level entrances only slide (no fade from invisible);
 *   2. theme.js marks the page container .fx-still ~650 ms after a page change,
 *      and a still container finishes every finite animation instantly
 *      (negative delay), so later re-renders never replay an entrance.
 *      Infinite animations (spinners, live dots) keep running. */

@keyframes sd-page-in { from { transform: translateY(8px); } to { transform: none; } }
@keyframes iv-rise  { from { transform: translateY(6px); } to { transform: none; } }
@keyframes iv2-rise { from { transform: translateY(6px); } to { transform: none; } }
@keyframes cv-rise  { from { transform: translateY(8px); } to { transform: none; } }
@keyframes is-rise  { from { transform: translateY(6px); } to { transform: none; } }
@keyframes is-fade  { from { transform: translateY(3px); } to { transform: none; } }

#main-content.fx-enter > *,
#app.fx-enter main > *,
#app.fx-enter main > div > *,
.fx-enter .kpi-grid > *, .fx-enter .cards-grid > *, .fx-enter .hc-grid > *, .fx-enter .stat-row > *, .fx-enter .main-grid > *,
#app.fx-enter .cs-dash > *, #app.fx-enter .cs-body > * {
  animation-name: sd-page-in !important;
  animation-duration: .38s !important;
}

#main-content.fx-still *, #main-content.fx-still *::before, #main-content.fx-still *::after,
#app.fx-still *, #app.fx-still *::before, #app.fx-still *::after {
  animation-delay: -60s !important;
}

@media (prefers-reduced-motion: reduce) {
  #main-content *, #app * { animation-duration: .001s !important; transition-duration: .001s !important; }
}
