/* SATH CRM v17.8.59: logo motion without editing business logic.
   Must load after sath-theme, reference-fix and motion-restore styles. */
html body .sath-brand .sath-logo-motion {
  display:inline-block; position:relative; isolation:isolate; line-height:0;
  vertical-align:middle; overflow:visible; max-width:100%;
}
html body .sath-brand .sath-logo-motion > .sath-logo-original {
  display:block; width:100%!important; max-width:100%!important; height:auto!important;
  border:0!important; background:transparent!important; border-radius:0!important;
  padding:0!important; box-shadow:none!important; transform:none!important;
  filter:none!important; animation:none!important;
}
html body .login-card .sath-logo-motion { width:286px; }
html body #app .sidebar .sath-logo-motion { width:154px; }
/* Duplicate with a travelling highlight: unlike a shadow pulse this actually moves
   through the original transparent lettering and the gold spear symbol. */
html body .sath-logo-motion > .sath-logo-glint {
  display:block; position:absolute; inset:0; width:100%!important; height:100%!important;
  object-fit:contain; pointer-events:none; z-index:2;
  border:0!important; background:transparent!important; box-shadow:none!important;
  filter:brightness(2.3) saturate(1.3) drop-shadow(0 0 5px rgba(255,219,151,.9))!important;
  clip-path:polygon(-35% 0,-12% 0,-35% 100%,-58% 100%);
  opacity:0; animation:sathLogoSweep59 4.6s ease-in-out infinite!important;
}
/* Small glimmer on geometric emblem, anchored to its position inside logo image. */
html body .sath-logo-motion > .sath-logo-spark {
  position:absolute; pointer-events:none; z-index:3; left:7.7%; top:50%;
  width:3px; height:3px; border-radius:50%;
  background:#ffe2a2; box-shadow:0 0 7px 3px rgba(255,214,133,.75),0 0 15px 5px rgba(255,221,161,.22);
  transform:translate(-50%,-50%); opacity:0;
  animation:sathLogoSpark59 4.6s ease-in-out infinite!important;
}
@keyframes sathLogoSweep59 {
  0%,10% {clip-path:polygon(-38% 0,-17% 0,-38% 100%,-59% 100%);opacity:0}
  17% {opacity:.12}
  27% {opacity:1;clip-path:polygon(6% 0,20% 0,6% 100%,-8% 100%)}
  47% {opacity:.95;clip-path:polygon(56% 0,70% 0,56% 100%,42% 100%)}
  66% {opacity:.1;clip-path:polygon(110% 0,125% 0,110% 100%,95% 100%)}
  70%,100% {opacity:0;clip-path:polygon(110% 0,125% 0,110% 100%,95% 100%)}
}
@keyframes sathLogoSpark59 {
  0%,12%,68%,100% {opacity:0;transform:translate(-50%,-50%) scale(.35)}
  19% {opacity:1;transform:translate(-50%,-50%) scale(1)}
  31% {opacity:.35;transform:translate(-50%,-50%) scale(.55)}
  42% {opacity:.85;transform:translate(-50%,-50%) scale(.85)}
  59% {opacity:0;transform:translate(-50%,-50%) scale(.35)}
}
/* A little breathing is visible even between sweeps, with no permanent neon box. */
html body .login-card .sath-logo-motion { animation:sathLogoHover59 6s ease-in-out infinite!important; }
@keyframes sathLogoHover59 {0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@media(max-width:720px) {
  html body .login-card .sath-logo-motion {width:min(245px,100%)}
  html body #app .sidebar .sath-logo-motion {width:154px}
}
@media(prefers-reduced-motion:reduce){
 html body .sath-logo-motion,html body .sath-logo-motion > .sath-logo-glint,
 html body .sath-logo-motion > .sath-logo-spark{animation:none!important;}
 html body .sath-logo-motion > .sath-logo-glint,html body .sath-logo-motion > .sath-logo-spark{opacity:0!important;}
}

/* v17.8.60 — constant-speed logo shimmer, no ease-in-out, no dwell.
   Clip begins fully beyond left edge and ends fully beyond right edge.
   At loop reset both endpoints are invisible (off-canvas). */
html body .sath-logo-motion > .sath-logo-glint {
  opacity:1!important;
  animation:sathLogoSweep60 3.8s linear infinite!important;
  will-change:clip-path;
}
@keyframes sathLogoSweep60 {
  0% {clip-path:polygon(-32% 0,-20% 0,-44% 100%,-56% 100%)}
  100% {clip-path:polygon(156% 0,168% 0,144% 100%,132% 100%)}
}
/* Remove the old independently pulsing sparkle that makes the sweep seem jerky.
   The moving glint itself gives the entire logo a consistent bright pass. */
html body .sath-logo-motion > .sath-logo-spark {
  display:none!important;
  animation:none!important;
}
/* Prevent a separate vertical bob from making the path look uneven. */
html body .login-card .sath-logo-motion {
  animation:none!important;
}
@media (prefers-reduced-motion:reduce) {
  html body .sath-logo-motion > .sath-logo-glint {
    animation:none!important;
    opacity:0!important;
    will-change:auto;
  }
}
