body.page-loading {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background-color: #f9f9f9;
}

html[data-bs-theme="dark"] body.page-loading {
  background-color: #1c1c1c;
}

.splash-screen {
  display: none;
}

.page-loading .splash-screen {
  position: absolute;
  z-index: 1000;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: #f9f9f9;
}

html[data-bs-theme="dark"] .page-loading .splash-screen {
  background-color: #1c1c1c;
}

/* MUI CircularProgress-like spinner (HTML splash runs before React) */
.mui-circular-progress {
  display: inline-block;
  width: 48px;
  height: 48px;
  color: #1976d2;
}

html[data-bs-theme="dark"] .mui-circular-progress {
  color: #90caf9;
}

.mui-circular-progress__svg {
  display: block;
  width: 100%;
  height: 100%;
  animation: mui-circular-rotate 1.4s linear infinite;
}

.mui-circular-progress__circle {
  stroke: currentColor;
  stroke-dasharray: 80px, 200px;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  animation: mui-circular-dash 1.4s ease-in-out infinite;
}

@keyframes mui-circular-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes mui-circular-dash {
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }
  100% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -125px;
  }
}
