body {
  background-color: #fff;
  margin: 0;
  padding: 0;
}
.header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 20px 30px;
  position: fixed;
  top: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 100;
}
.logo { height: 40px; }
.login-container {
  max-width: 400px;
  width: 100%;
  margin: 80px auto;
  text-align: center;
  padding: 0 20px;
}
h1 {
  font-size: 30px;
  margin-bottom: 10px;
}
.form-block {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}
.button-join {
  background-color: #92419F;
  color: white;
  border-radius: 30px;
  border: none;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  cursor: pointer;
}
.button-join .material-icons {
  margin-left: 8px;
  font-size: 20px;
  color: white;
}
.divider {
  margin: 30px 0 10px;
  color: #999;
}
button.btn-icon-left, button.icong {
  position: relative;
  padding-left: 48px; /* espacio para el ícono */
  display: flex;
  align-items: center;
  justify-content: center;
}

button.btn-icon-left img, button.icong img {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  pointer-events: none;
  user-select: none;
  flex-shrink: 0;
}

button.btn-icon-left .btn-text, button.icong .btn-text {
  position: relative;
  width: 100%;
  text-align: center;
  pointer-events: none;
  left: -20px;
}
.small-text {
  font-size: 13px;
  color: #777;
  margin-top: 20px;
}
a { color: #92419f; text-decoration: none; }

    /* Toast mejorado */
#toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  background-color: rgba(50, 50, 50, 0.9);
  color: #fff;
  padding: 5px 28px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  min-width: 280px;
  max-width: 100vw;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  line-height: 1.4;
  z-index: 9999;
}
#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
#toast.success {
  background-color: #3a8a3c;
  color: #e0f2e9;
  box-shadow: 0 8px 25px rgba(58, 138, 60, 0.7);
}
#toast.error {
  background-color: #d94c41;
  color: #fdecea;
  box-shadow: 0 8px 25px rgba(217, 76, 65, 0.7);
}
#attemptsMsg {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    min-height: 20px; /* para evitar que salte el layout cuando no hay texto */
}
button.button-join:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

input[readonly] {
  background-color: #e9ecef;
  cursor: not-allowed;
}
.input-wrapper {
position: relative;
min-height: 60px; /* altura fija para evitar salto */
margin-bottom: 0.5rem;
}
.form-block {
width: 100%;
box-sizing: border-box;
padding-right: 40px; /* espacio para el icono */
font-size: 1rem;
line-height: 1.3;
}
.password-toggle-icon {
position: absolute;
right: 12px;
top: 40%;
transform: translateY(-50%);
cursor: pointer;
user-select: none;
font-size: 24px;
color: gray;
transition: color 0.3s;
}
.error-text {
color: #8B0000; /* rojo oscuro */
font-size: 0.8rem;
min-height: 1em; /* reservar espacio para evitar saltos */
}

 
/* Ajustes para móvil */
@media (max-width: 768px) {
  .header {
    padding: 15px 20px;
  }
  .logo {
    height: 30px;
  }
  .login-container {
    max-width: 90%;
    padding: 0 15px;
    margin-top: 120px !important; /* Asegurar que no se superponga con el header */
  }
  h1 {
    font-size: 26px;
    margin-bottom: 8px;
  }
  .divider {
    margin: 20px 0 8px;
  }
  .small-text {
    font-size: 12px;
    margin-top: 15px;
    padding: 0 5px;
  }
}

.modales {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}


.contenido-modales {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  width: 60%;
  position: relative;
  text-align: center;
  margin: 0 auto; /* para centrar */
}

@media (max-width: 768px) {
  .contenido-modales {
    margin: 10px;
    width: 100%;
  }
}


    button {
      font-size: 1rem;
      padding: 12px 0;
      flex: 1;
      background-color: #fff;
      color: #444444;
      border: 2px solid #888888;
      border-radius: 28px;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      transition: all 0.3s ease;
      user-select: none;
      box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

    button:hover, button:focus {
      border-color: #666666;
      box-shadow: 0 6px 12px rgba(0,0,0,0.12);
      transform: translateY(-2px);
      outline: none;
    }

    button img, button svg {
      width: 24px;
      height: 24px;
      filter: none;
      flex-shrink: 0;
    }