/**
 * Critical-path boot loader — linked from index.html before the JS bundle.
 * Rules must only apply while `.shell-boot` is still in #app; after React mounts
 * these selectors no longer match and must not affect login or AppShell layout.
 */
html:has(#app > .shell-boot),
body:has(#app > .shell-boot) {
  height: 100%;
  margin: 0;
}

body.shell-app-bg:has(#app > .shell-boot) {
  background-color: #ffffff;
  color: #1a1f26;
}

#app:has(> .shell-boot) {
  display: grid;
  place-items: center;
  min-height: 100dvh;
}

.shell-boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.shell-boot__spinner {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.shell-boot__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(52, 151, 253, 0.14);
  border-top-color: #3497fd;
  animation: shell-boot-rotate 0.9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.shell-boot__dot {
  width: 25%;
  height: 25%;
  border-radius: 50%;
  background: #3497fd;
  animation: shell-boot-pulse 1.4s ease-in-out infinite;
}

.shell-boot__text {
  margin: 0;
  font-family: "DM Sans Variable", "DM Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #5b6470;
  letter-spacing: 0.3px;
}

@keyframes shell-boot-rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shell-boot-pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shell-boot__ring,
  .shell-boot__dot {
    animation: none;
  }

  .shell-boot__dot {
    opacity: 0.7;
  }
}
