.page-boot {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  opacity: 1;
  visibility: visible;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  pointer-events: auto;
}

.page-boot--exit {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-boot--auth {
  background:
    radial-gradient(circle at 18% 12%, rgba(59, 130, 246, 0.12), transparent 22%),
    radial-gradient(circle at 82% 4%, rgba(14, 165, 233, 0.1), transparent 24%),
    #f8fafc;
  color: #0f172a;
}

.page-boot--app {
  background:
    radial-gradient(circle at 20% 15%, rgba(59, 130, 246, 0.2), transparent 34%),
    radial-gradient(circle at 85% 80%, rgba(14, 165, 233, 0.14), transparent 30%),
    linear-gradient(180deg, #0f172a 0%, #1e3a8a 52%, #0c4a6e 100%);
  color: #e2e8f0;
}

.page-boot--admin {
  background:
    radial-gradient(circle at 20% 15%, rgba(245, 158, 11, 0.16), transparent 34%),
    radial-gradient(circle at 85% 80%, rgba(59, 130, 246, 0.12), transparent 30%),
    linear-gradient(180deg, #0f172a 0%, #1e293b 46%, #0f172a 100%);
  color: #e2e8f0;
}

.page-boot__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  animation: pageBootFadeIn 0.45s ease both;
}

.page-boot__logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.page-boot--auth .page-boot__logo {
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.18);
}

.page-boot__brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-boot__spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #38bdf8;
  animation: pageBootSpin 0.75s linear infinite;  
}

.page-boot--auth .page-boot__spinner {
  border-color: rgba(37, 99, 235, 0.15);
  border-top-color: #2563eb;
}

.page-boot--admin .page-boot__spinner {
  border-top-color: #f59e0b;
}

.page-boot__text {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.88;
  letter-spacing: 0.01em;
}

.page-boot__bar {
  width: min(220px, 70vw);
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.page-boot--auth .page-boot__bar {
  background: rgba(37, 99, 235, 0.12);
}

.page-boot__bar-fill {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
  animation: pageBootBar 1.1s ease-in-out infinite;  
}

.page-boot--auth .page-boot__bar-fill {
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.page-boot--admin .page-boot__bar-fill {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

@keyframes pageBootSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pageBootFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageBootBar {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-boot__inner,
  .page-boot__spinner,
  .page-boot__bar-fill {
    animation: none;
  }

  .page-boot {
    transition: none;
  }
}
