/* Calm site-wide motion: operational pages are immediately stable and visible. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes app-popup-focus {
    from { opacity:.92; }
    to { opacity:1; }
  }
  @keyframes app-login-focus {
    from { opacity:.94; }
    to { opacity:1; }
  }
  /* Stylesheet is render-blocking in head, so entrances begin at first
     paint of the element. There is no observer, DOM ready hook or delay.
     We never transform main.content (sticky and fixed positioning depend on it). */
  @keyframes app-first-header {
    from {opacity:.45;transform:translateY(-13px);}
    to {opacity:1;transform:none;}
  }
  @keyframes app-first-surface {
    from {opacity:.32;transform:translateY(19px) scale(.985);}
    to {opacity:1;transform:none;}
  }
  @keyframes app-first-card {
    from {opacity:.35;transform:translateY(16px) scale(.982);}
    to {opacity:1;transform:none;}
  }
  body.app-shell-page .content > .topbar {
    animation:app-first-header 390ms cubic-bezier(.21,.8,.24,1) backwards;
  }
  /* Only top-level static surfaces; switching tabs never retriggers them. */
  body.app-shell-page .content > :is(.card,section:not(.module-card-grid):not(.sa-employee-tab-panel),.sa-employee-tabs-nav) {
    animation:app-first-surface 440ms cubic-bezier(.18,.75,.22,1) backwards;
  }
  /* Entry is per card, rather than animating its grid a second time. */
  body.app-shell-page .content > .module-card-grid > .module-card,
  body.app-shell-page .content > .settings-module-grid > .settings-module-card,
  body.app-shell-page .content > .ops-home-quick-tools > .ops-home-tool-link {
    animation:app-first-card 430ms cubic-bezier(.18,.75,.22,1) backwards;
  }
  /* Old delayed JS classes must remain inert if present. */
  body.app-shell-page .content .app-motion-arrived {animation:none!important;}
  body.app-shell-page .content a.module-card,
  body.app-shell-page .content a.ops-home-tool-link,
  body.app-shell-page .content a.settings-module-card {
    transition:transform 160ms ease,border-color 170ms ease,box-shadow 180ms ease,background-color 160ms ease;
  }
  body.app-shell-page .content .module-card-icon,
  body.app-shell-page .content .module-card-arrow {
    transition:transform 160ms ease,background-color 160ms ease;
  }
  @media (hover:hover) and (pointer:fine) {
    body.app-shell-page .content a.module-card:hover,
    body.app-shell-page .content a.ops-home-tool-link:hover,
    body.app-shell-page .content a.settings-module-card:hover {
      transform:translateY(-2px);
      border-color:#90afff;
      box-shadow:0 12px 26px rgba(31,78,155,.11);
    }
    body.app-shell-page .content a.module-card:hover .module-card-icon {
      transform:translateY(-1px) scale(1.035);background:#e3ecff;
    }
    body.app-shell-page .content a.module-card:hover .module-card-arrow {transform:translateX(-2px);}
    body.app-shell-page .sidebar nav a {
      transition:background-color 160ms ease,transform 160ms ease,box-shadow 160ms ease;
    }
    body.app-shell-page .sidebar nav a:hover {transform:translateX(-1px);}
    body.app-shell-page .content .btn:not(:disabled):hover,
    body.app-shell-page .content button:not(:disabled):hover,
    body.login .login-submit:hover {transform:translateY(-1px);}
  }
  body.app-shell-page .content .btn:not(:disabled),
  body.app-shell-page .content button:not(:disabled),
  body.login .login-submit {
    transition:transform 140ms ease,box-shadow 170ms ease,background-color 150ms ease;
  }
  body.app-shell-page .content a.module-card:active,
  body.app-shell-page .content a.ops-home-tool-link:active,
  body.app-shell-page .content a.settings-module-card:active,
  body.app-shell-page .content .btn:not(:disabled):active,
  body.app-shell-page .content button:not(:disabled):active,
  body.login .login-submit:active {transform:scale(.99);}
  body.app-shell-page .top-notifications-panel:not([hidden]) {
    animation:app-popup-focus 140ms ease-out;
  }
  body.login .login-card {animation:app-login-focus 160ms ease-out;}
}
@media (prefers-reduced-motion: reduce) {
  body.app-shell-page .content > .topbar,
  body.app-shell-page .content > :is(.card,section:not(.module-card-grid):not(.sa-employee-tab-panel),.sa-employee-tabs-nav),
  body.app-shell-page .content > .module-card-grid > .module-card,
  body.app-shell-page .content > .settings-module-grid > .settings-module-card,
  body.app-shell-page .content > .ops-home-quick-tools > .ops-home-tool-link,
  body.app-shell-page .content .app-motion-arrived,
  body.app-shell-page .top-notifications-panel,
  body.login .login-card {animation:none!important;transform:none!important;}
  body.app-shell-page .content a.module-card,
  body.app-shell-page .content a.ops-home-tool-link,
  body.app-shell-page .content a.settings-module-card,
  body.login .login-submit {transition:none!important;}
}
@media print {
  body.app-shell-page .content > .topbar,
  body.app-shell-page .content > :is(.card,section:not(.module-card-grid):not(.sa-employee-tab-panel),.sa-employee-tabs-nav),
  body.app-shell-page .content > .module-card-grid > .module-card,
  body.app-shell-page .content > .settings-module-grid > .settings-module-card,
  body.app-shell-page .content > .ops-home-quick-tools > .ops-home-tool-link,
  body.app-shell-page .content .app-motion-arrived,
  body.app-shell-page .top-notifications-panel,
  body.login .login-card {animation:none!important;transform:none!important;}
}
