/* ===== SPLASH SCREEN ===== */
#nira-splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  /* CSS FAILSAFE: auto-hide after 7s even if JS fails */
  animation: splashAutoHide 0.6s ease forwards 7s;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  justify-content: center;
}

.splash-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin-bottom: 24px;
  animation: pulse-splash-logo 2s infinite;
  /* Constrain size even if tailwind fails */
  max-width: 60vw;
  max-height: 25vh;
}

.splash-title {
  font-family: 'Kerisdipa', 'Minangkabau', 'Plus Jakarta Sans', sans-serif;
  font-size: 46px;
  font-weight: 800;
  color: #00a87e;
  /* Hijau khas NIRA */
  margin: 0;
  letter-spacing: 2px;
}

.splash-subtitle {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #3d4945;
  margin-top: 8px;
  max-width: 80%;
}

.splash-loader-wrapper {
  position: absolute;
  bottom: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.splash-loader {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 30px;
}

.splash-loader .bar {
  width: 8px;
  background-color: #00a87e;
  border-radius: 4px;
  animation: bar-chart-anim 1.2s infinite ease-in-out;
  transform-origin: bottom;
}

.splash-loader .bar:nth-child(1) {
  height: 12px;
  animation-delay: -1.0s;
}

.splash-loader .bar:nth-child(2) {
  height: 18px;
  animation-delay: -0.8s;
}

.splash-loader .bar:nth-child(3) {
  height: 28px;
  animation-delay: -0.6s;
}

.splash-loader .bar:nth-child(4) {
  height: 18px;
  animation-delay: -0.4s;
}

.splash-loader .bar:nth-child(5) {
  height: 12px;
  animation-delay: -0.2s;
}

/* Responsiveness */
@media (min-width: 768px) {
  .splash-logo {
    width: 220px;
    height: 220px;
  }

  .splash-title {
    font-size: 56px;
  }

  .splash-subtitle {
    font-size: 17px;
  }

  .splash-loader-wrapper {
    bottom: 60px;
  }
}

/* Overriding rules loaded later in the document */
#nira-splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease;
}
