/* ===== ESTILO GENERAL ===== */
body {
  font-family: Arial, sans-serif;
  background: #f4f6fb;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== ENCABEZADO ===== */
.main-header {
  background-color: #00264d; /* mismo color que el pie */
  text-align: center;
  padding: 10px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header-logo {
  width: 120px;
  height: auto;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.auth-container {
  background: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0px 5px 20px rgba(0,0,0,0.1);
  width: 350px;
  text-align: center;
  margin: 50px auto;
}

.auth-container h2 {
  color: #1d4ed8;
  margin-bottom: 20px;
}

/* ===== CAMPOS DE TEXTO ===== */
.auth-container input {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  box-sizing: border-box;
}

/* ===== OJO DE CONTRASEÑA ===== */
.password-wrapper {
  position: relative;
}
.password-wrapper input {
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background-color: transparent;
  cursor: pointer;
}

/* Icono del ojo */
.toggle-password::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #555;
  top: 5px;
  left: 0;
}
.toggle-password::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background-color: #555;
  border-radius: 50%;
  top: 9px;
  left: 8px;
}

/* Cuando se activa (mostrar) */
.toggle-password.active::before {
  border-color: #1d4ed8;
}
.toggle-password.active::after {
  background-color: #1d4ed8;
}

/* ===== BOTONES ===== */
button {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  background: #1d4ed8;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}
button:hover {
  background: #1e40af;
}

/* ===== TEXTO ADICIONAL ===== */
.extra-text {
  margin-top: 12px;
  font-size: 13px;
}
.extra-text a {
  color: #1d4ed8;
  text-decoration: none;
}
.extra-text a:hover {
  text-decoration: underline;
}

/* ===== CASILLA Y TEXTO DE TÉRMINOS ===== */
.terms {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: #333;
  text-align: left;
}

/* Casilla en color naranja */
.terms input[type="checkbox"] {
  accent-color: #ff6600;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Enlaces en color naranja */
.terms a {
  color: #ff6600;
  text-decoration: none;
  font-weight: 600;
}
.terms a:hover {
  color: #ff8533;
  text-decoration: underline;
}

.terms label {
  color: #333;
  font-size: 13px;
  line-height: 1.5;
}

.terms label::after {
  content: " *";
  color: red;
  font-weight: bold;
}

/* ===== PIE DE PÁGINA ===== */
.main-footer {
  background-color: #00264d;
  color: #ffcc00;
  text-align: center;
  padding: 15px 0;
  font-size: 14px;
  margin-top: auto;
}

/* ===== SECCIONES ===== */
.hidden {
  display: none;
}

/* ===== ESTILOS NUEVOS (AGREGADOS) ===== */

/* Spinner de carga */
.spinner {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.spinner.show {
  display: block;
}

.spinner-circle {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

.spinner-text {
  text-align: center;
  margin-top: 10px;
  color: #333;
  font-size: 14px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Overlay para bloquear interacción durante carga */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.overlay.show {
  display: block;
}

/* Estilo para el logo clickeable */
.header-logo {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.header-logo:hover {
  transform: scale(1.05);
}

.header-logo:active {
  transform: scale(0.95);
}

/* Estilo simple para mensajes de error */
.error-message {
  color: #f44336;
  background-color: #ffebee;
  border: 1px solid #f44336;
  padding: 10px 15px;
  border-radius: 5px;
  margin: 10px auto;
  text-align: center;
  font-size: 14px;
  max-width: 400px;
}

.success-message {
  color: #4CAF50;
  background-color: #e8f5e8;
  border: 1px solid #4CAF50;
  padding: 10px 15px;
  border-radius: 5px;
  margin: 10px auto;
  text-align: center;
  font-size: 14px;
  max-width: 400px;
}

/* Contenedor de mensajes */
#messageContainer {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: 90%;
  max-width: 400px;
}