:root {
  --motion-lift: translateY(-2px) scale(1.006);
  --motion-fast: 160ms cubic-bezier(.2, .8, .2, 1);
  --motion-medium: 240ms cubic-bezier(.2, .8, .2, 1);
  --motion-glow: 0 18px 44px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

@keyframes doughlab-online-pulse {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.12), 0 0 0 0 rgba(52, 199, 89, 0.34);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.16), 0 0 0 9px rgba(52, 199, 89, 0);
  }
}

@keyframes doughlab-soft-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

:where(button, a, input, select, textarea, .stage-button, .list-card, .device-card, .device-detail-card, .metric-card, .warehouse-card, .line-card, .truck-card, .employee-row, .compact-row, .item-row, .shelf-row, .receipt-card, .placement-card, .suggestion-card, .card-preview) {
  transition:
    transform var(--motion-fast),
    border-color var(--motion-fast),
    background-color var(--motion-fast),
    box-shadow var(--motion-fast),
    opacity var(--motion-fast),
    filter var(--motion-fast);
}

:where(button, .stage-button, .list-card, .device-card):hover {
  transform: var(--motion-lift);
  border-color: rgba(255, 255, 255, 0.28) !important;
  box-shadow: var(--motion-glow) !important;
  filter: saturate(1.08);
}

:where(.metric-card, .warehouse-card, .line-card, .truck-card, .employee-row, .compact-row, .item-row, .shelf-row, .receipt-card, .placement-card, .suggestion-card, .card-preview):hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24) !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.26) !important;
}

.device-detail-card {
  animation: doughlab-soft-enter var(--motion-medium) both;
}

.device-detail-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.24) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

:where(input, select, textarea):focus {
  transform: translateY(-1px);
}

:where(.app-view, .catalog-home, .list-panel, .detail-panel, .work-surface, .step-view, .warehouse-list-panel) {
  animation: doughlab-soft-enter var(--motion-medium) both;
}

.device-status-dot.online,
.status-dot.online,
.status-dot.ready,
.status-dot.ok {
  animation: doughlab-online-pulse 1.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
