@keyframes waveAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(270deg, #a9d6ff, #004e92, #a9d6ff);
  background-size: 600% 600%;
  animation: waveAnimation 20s ease infinite;
  color: #003366;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 1rem;
}

.container {
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  width: 320px;
  max-width: 100%;
  text-align: center;
}

.logo {
  max-width: 150px;
  margin-bottom: 1.5rem;
  user-select: none;
  pointer-events: none;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

label {
  font-weight: 600;
  color: #004e92;
  text-align: left;
}

input, select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem;
  border: 2px solid #004e92;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus, select:focus {
  border-color: #0077cc;
  outline: none;
  box-shadow: 0 0 6px #0077ccaa;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: white;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23004e92" class="bi bi-chevron-down" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

button {
  margin-top: 1rem;
  background-color: #004e92;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.7rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover:not(:disabled) {
  background-color: #0077cc;
}

button:disabled {
  background-color: #8fbce6;
  cursor: not-allowed;
}

#messageCongregacion,
#messageLogin {
  font-weight: 600;
  min-height: 1.2rem;
  text-align: center;
  margin: 4px 0;
}

.error {
  color: #b00020;
}

.success {
  color: #0077cc;
}

.compacto {
  font-size: 0.9rem;
  color: #004e92;
  margin: 2px 0;
  text-align: center;
}


/* Móvil: fondo blanco, minimalista */
@media (max-width: 480px) {
  body {
    background: white;
    animation: none;
    display: flex;
    justify-content: center;
    align-items: center;

    padding: 1rem;
    height: 100vh;
  }

  .container {
    width: 100%;
    max-width: 360px;
    border-radius: 0;
    box-shadow: none;
    padding: 1rem;
    background: none;
  }

  .logo {
    margin: 0 auto 1rem auto;
    display: block;
    max-width: 100px;
  }

  button {
    font-size: 1rem;
    padding: 0.6rem;
  }

  label {
    font-size: 0.9rem;
  }
}

/* LOADER BARRA ---------------------------------------------------------------- */
.loader-overlay {
  position: fixed;
  inset: 0;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-content img {
  width: 150px;
  margin-bottom: 20px;
}

.loader-bar-container {
  width: 200px;
  height: 10px;
  background-color: #3c5251;
  border-radius: 5px;
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background-color: #1c9ac6;
  transition: width 0.1s linear;
}
