body, html {
  margin: 0;
  height: 100%;
  font-family: 'Gadugi', sans-serif;
}

/* Header con posición fija */
header {
  background: #8B0000; /* Rojo oscuro */
  color: #F5F5DC; /* Beige para contraste */
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0.5rem 1rem;
  height: 70px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* Contenedor izquierdo del header */
.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Título del proyecto */
.project-title {
  margin: 0;
  font-size: 1.8rem;
  color: #FFFFFF; /* Blanco para máximo contraste */
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Modo actualización */
.update-mode {
  margin: 3px 0 0 0;
  font-size: 0.9rem;
  color: #F5F5DC; /* Beige */
  font-style: italic;
}

/* Contenedor derecho del header */
.header-right {
  display: flex;
  align-items: flex-end;
  height: 100%;
}

/* Botón de usuario */
.user-btn {
  background: #B22222; /* Rojo fuego */
  color: #F5F5DC; /* Beige */
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  margin-bottom: 5px;
}

.user-btn:hover {
  background: #A52A2A; /* Rojo marrón más oscuro */
  transform: scale(1.05);
}

.user-btn:active {
  transform: scale(0.98);
}

/* Mapa */
#map {
  height: calc(100vh - 70px);
}

/* Modal de autenticación */
#authModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  background: #FFFFFF;
  padding: 1.5rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 80%;
  max-width: 320px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-top: 4px solid #8B0000; /* Rojo oscuro */
}

.modal h2 {
  color: #8B0000; /* Rojo oscuro */
  margin-top: 0;
  text-align: center;
}

.modal input {
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Gadugi', sans-serif;
}

.modal input:focus {
  outline: none;
  border-color: #B22222; /* Rojo fuego */
}

.modal button {
  background: #8B0000; /* Rojo oscuro */
  color: white;
  border: none;
  padding: 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Gadugi', sans-serif;
  font-weight: bold;
  transition: background 0.2s;
}

.modal button:hover {
  background: #A52A2A; /* Rojo marrón */
}

#toggleForm {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  cursor: pointer;
  margin: 0;
}

#toggleForm:hover {
  color: #8B0000; /* Rojo oscuro */
  text-decoration: underline;
}

#closeModal {
  background: #F5F5DC; /* Beige */
  color: #8B0000; /* Rojo oscuro */
  border: 1px solid #8B0000;
}

.hidden { 
  display: none !important; 
}

/* Estilos responsivos */
@media (max-width: 600px) {
  header {
    padding: 0.5rem;
    height: 65px;
  }
  
  .project-title { 
    font-size: 1.5rem; 
  }
  
  .update-mode {
    font-size: 0.8rem;
  }
  
  .user-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  
  #map {
    height: calc(100vh - 65px);
  }
}

/* Estilo para popups del mapa */
.leaflet-popup-content {
  font-family: 'Gadugi', sans-serif;
  max-width: 250px;
  max-height: 200px;
  overflow-y: auto;
}

.leaflet-popup-content b {
  color: #8B0000;
}