* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

/* Shared background: same green on splash and login */
.flash-green-bg {
  background-color: #5CB030;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

/* ========== Splash Screen (same green as login: rgb(92, 176, 48)) ========== */
.splash-screen {
  position: fixed;
  inset: 0;
  background-color: #5CB030 !important; /* rgb(92, 176, 48) */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow: hidden;
  transition: opacity 0.5s ease-out;
}

.splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.splash-logo {
  max-width: 800px;
  width: 90vw;
  min-width: 320px;
  height: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 768px) {
  .splash-logo {
    width: 95vw;
    max-width: none;
    min-width: 0;
  }
}

/* Loader - white circular spinner */
.loader {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

/* ========== Login Page (after splash) ========== */
.main-content {
  display: none;
  max-width: 100%;
  overflow-x: hidden;
}

.main-content:not(.hidden) {
  display: block;
}

.main-content > div {
  max-width: 100%;
  overflow-x: hidden;
}

.main-content.hidden {
  display: none !important;
}

/* Password visibility toggle icons */
.toggle-password .icon-eye-off.hidden,
.toggle-password .icon-eye.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-content,
  .main-content .flash-green-bg,
  .main-content .flex.flex-col.px-7 {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .header-logo {
    max-width: 100% !important;
    width: 90vw !important;
    height: auto !important;
  }

  .splash-logo {
    max-width: 100% !important;
    width: 90vw !important;
  }
}
