/* ==========================================================================
   EDTS Corporate Splash Screen Loader
   ========================================================================== */

.splash-screen {
  --edts-red: #DC2626;
  --edts-red-glow: rgba(220, 38, 38, 0.35);
  --edts-dark: #0F172A;
  --edts-bg: #FFFFFF;
  --edts-text: #1E293B;
  --edts-subtext: #64748B;

  background: var(--edts-bg);
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease;
}

[data-bs-theme="dark"] .splash-screen {
  background: #0F172A;
  --edts-text: #F8FAFC;
  --edts-subtext: #94A3B8;
}

.loaded .splash-screen {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Container */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  max-width: 420px;
  padding: 2rem;
}

/* Glowing Pulse Ring around Logo */
.logo-loader-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

/* Dual Ring Spinner */
.spinner-ring-outer {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--edts-red);
  border-right-color: rgba(220, 38, 38, 0.2);
  animation: edtsSpin 1.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
  box-shadow: 0 0 20px var(--edts-red-glow);
}

.spinner-ring-inner {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: var(--edts-red);
  border-left-color: rgba(220, 38, 38, 0.15);
  animation: edtsSpinReverse 1s linear infinite;
}

@keyframes edtsSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

/* Center Logo */
.loader-logo-img {
  max-width: 110px;
  max-height: 70px;
  width: auto;
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 2;
  animation: logoPulse 2s ease-in-out infinite alternate;
}

@keyframes logoPulse {
  0% { transform: scale(0.96); filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1)); }
  100% { transform: scale(1.04); filter: drop-shadow(0 6px 16px var(--edts-red-glow)); }
}

/* Title & Subtitle */
.loader-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--edts-text);
  margin-bottom: 0.35rem;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.loader-tagline {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--edts-subtext);
  margin-bottom: 1.8rem;
}

/* Premium Linear Progress Bar */
.loader-progress-track {
  width: 220px;
  height: 4px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.loader-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, #DC2626 0%, #EF4444 50%, #DC2626 100%);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.6);
  animation: edtsProgress 1.6s ease-in-out infinite;
}

@keyframes edtsProgress {
  0% { left: -40%; width: 40%; }
  50% { width: 60%; }
  100% { left: 100%; width: 40%; }
}