/* Reset e Fundo */
body, html {
  background-color: #F6F9FC;
  overflow: hidden;
}

/* Container Principal Centralizado */
#app-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
}

/* --- Loader do primeiro acesso--- */
.brand-loader-content {
  display: none;
  flex-direction: column;
  align-items: center;
}

.loader-logo {
  width: 140px;
  height: 140px;
  animation: slideDownFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.loader-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: #472617;
  opacity: 0.8;
  margin-bottom: 40px;
  letter-spacing: 0.02em;
  animation: fadeIn 1.2s ease-out;
}

.progress-track {
  width: 240px;
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  width: 30%;
  height: 100%;
  background-color: #1867C0;
  border-radius: 10px;
  position: absolute;
  top: 0;
  left: 0;
  animation: progressSlide 1.5s infinite ease-in-out;
}

/* --- Loader simples para f5 --- */
.simple-loader-content {
  display: none;
}

.index-loader {
  border: 5px solid rgba(243, 243, 243, 0);
  border-top: 5px solid #0063AA;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: index-loader-spin 1.0s linear infinite;
}

/* --- Animações --- */
@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes progressSlide {
  0% {
    left: -30%;
    width: 20%;
  }

  50% {
    width: 40%;
  }

  100% {
    left: 100%;
    width: 20%;
  }
}

@keyframes index-loader-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Classes de Controle de Estado */
body.is-refresh .simple-loader-content {
  display: block;
}

body.is-initial .brand-loader-content {
  display: flex;
}