/* Startup only. Page and table loading indicators keep their own styles. */
#global-splash {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 88px 20px;
  background: radial-gradient(ellipse 360px 300px at 50% 46%, #eaf3ff 0%, #f8fafc 100%);
  color: #14213d;
  font-family: var(--admin-font, "Manrope", system-ui, sans-serif);
  text-align: center;
}

#global-splash.hidden { display: none !important; }

#global-splash .splash-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#global-splash .startup-splash-symbol {
  display: block;
  width: clamp(88px, 12vw, 110px);
  height: auto;
  object-fit: contain;
}

#global-splash .startup-splash-symbol[hidden] { display: none; }

#global-splash .startup-splash-brand {
  margin: 16px 0 8px;
  color: #14213d;
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.045em;
}

#global-splash #startup-splash-message {
  margin: 0;
  color: #64748b;
  font-size: clamp(14px, 2.8vw, 18px);
  line-height: 1.5;
}

#global-splash .splash-loader {
  position: relative;
  width: min(250px, 80%);
  height: 5px;
  margin-top: 30px;
  overflow: hidden;
  border-radius: 999px;
  background: #ccddfb;
}

#global-splash .splash-loader::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 35%;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  /* Loading feedback stays animated with either system motion preference. */
  animation: admin-startup-splash-slide 1.4s linear infinite;
}

#global-splash .startup-splash-footer {
  position: absolute;
  right: 20px;
  bottom: max(clamp(24px, 7vh, 60px), env(safe-area-inset-bottom));
  left: 20px;
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

@keyframes admin-startup-splash-slide {
  from { transform: translateX(-100%); }
  /* translateX uses the segment width: 100 / .35 = 285.714286%.
     Start fully outside the left edge and end fully outside the right edge. */
  to { transform: translateX(285.714286%); }
}

@media (max-height: 420px) {
  #global-splash { padding: 48px 20px; }
  #global-splash .startup-splash-symbol { width: 64px; }
  #global-splash .startup-splash-brand { margin-top: 8px; font-size: 32px; }
  #global-splash .splash-loader { margin-top: 16px; }
  #global-splash .startup-splash-footer { bottom: 12px; font-size: 12px; }
}
