/**
 * YLÄUXI motion — seamless view transitions, stagger, skeleton, focus
 */
@keyframes ylux-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes ylux-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ylux-shimmer {
  0% { background-position: -480px 0; }
  100% { background-position: 480px 0; }
}
@keyframes ylux-count {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.view.act {
  animation: ylux-fade-up 0.32s var(--ylux-ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
}
.yla-panel.is-on,
.sp-panel.is-on {
  animation: ylux-fade-up 0.28s var(--ylux-ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
}

.ylux-stagger > *,
.ylux-kpi-row > *,
.kpi-row > *,
.mg > .mc,
.kpi-grid > .kpi {
  animation: ylux-fade-up 0.4s var(--ylux-ease) both;
}
.ylux-stagger > *:nth-child(1), .ylux-kpi-row > *:nth-child(1), .kpi-row > *:nth-child(1), .mg > .mc:nth-child(1), .kpi-grid > .kpi:nth-child(1) { animation-delay: 0.04s; }
.ylux-stagger > *:nth-child(2), .ylux-kpi-row > *:nth-child(2), .kpi-row > *:nth-child(2), .mg > .mc:nth-child(2), .kpi-grid > .kpi:nth-child(2) { animation-delay: 0.08s; }
.ylux-stagger > *:nth-child(3), .ylux-kpi-row > *:nth-child(3), .kpi-row > *:nth-child(3), .mg > .mc:nth-child(3), .kpi-grid > .kpi:nth-child(3) { animation-delay: 0.12s; }
.ylux-stagger > *:nth-child(4), .ylux-kpi-row > *:nth-child(4), .kpi-row > *:nth-child(4), .mg > .mc:nth-child(4), .kpi-grid > .kpi:nth-child(4) { animation-delay: 0.16s; }

.ylux-skel,
.ylux-skel-line {
  background: linear-gradient(90deg, var(--ylux-faint) 25%, var(--ylux-border) 50%, var(--ylux-faint) 75%);
  background-size: 960px 100%;
  animation: ylux-shimmer 1.5s infinite linear;
  border-radius: var(--ylux-radius, 2px);
}
.ylux-skel-line { height: 11px; margin-bottom: 8px; }
.ylux-skel-val { height: 28px; width: 55%; margin-bottom: 6px; }
.ylux-skel-block { height: 72px; margin-bottom: 12px; }

.ylux-empty-center {
  padding: 48px 24px;
  text-align: center;
  color: var(--ylux-text-m);
  font-family: var(--ylux-font-display);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ylux-empty-center .ylux-empty-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 14px;
  opacity: 0.35;
  stroke: var(--ylux-accent);
}

.ylux-page-hdr {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 0.5px solid var(--ylux-border);
}
.ylux-page-hdr::after {
  content: '';
  display: block;
  width: 36px;
  height: 1px;
  background: var(--ylux-accent);
  margin-top: 12px;
}

.ylux-val-animate {
  animation: ylux-count 0.5s var(--ylux-ease) both;
}

button:focus-visible,
.btn:focus-visible,
.nav-item:focus-visible,
.ni:focus-visible,
.yl-nav-item:focus-visible,
.input:focus-visible,
.fi:focus-visible {
  outline: 2px solid var(--ylux-accent);
  outline-offset: 2px;
}

#ylux-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9000;
  background: var(--ylux-bg2);
  border: 0.5px solid var(--ylux-border-s);
  padding: 14px 22px 14px 16px;
  font-family: var(--ylux-font-display);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ylux-text);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.28s var(--ylux-ease), transform 0.28s var(--ylux-ease);
  pointer-events: none;
  max-width: 360px;
  box-shadow: var(--ylux-shadow);
}
#ylux-toast.show {
  opacity: 1;
  transform: translateY(0);
}
#ylux-toast.ok { border-left: 2px solid var(--ylux-accent); }
#ylux-toast.err { border-left: 2px solid var(--ylux-accent-d); }

@media (prefers-reduced-motion: reduce) {
  .view.active, .view.act, .ylux-stagger > *, .ylux-kpi-row > *, .kpi-row > *, .mg > .mc, .kpi-grid > .kpi, .ylux-val-animate {
    animation: none !important;
  }
}
