/* DM Sans Variable Font import */
@font-face {
  font-family: 'DM Sans';
  src: url('fonts/DM_Sans/DMSans-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('fonts/DM_Sans/DMSans-Italic-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

body, button, input, select, textarea, .app-modal, .app-modal-content, .top-bar, .menu-container, .layer-menu, .atribTable, .app-modal-title, .app-modal-subtitle, .app-modal-desc, .app-modal-footer {
  font-family: 'DM Sans', Arial, sans-serif !important;
}

body {
  margin: 0;
  font-family: 'DM Sans', Arial, sans-serif;
}

.top-bar {
  position: fixed;
  width: 100%;
  z-index: 1400;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #195800dc;
  color: white;
  padding: 3px;
  border-bottom: 6px solid rgb(255, 255, 255); /* Borde rojo en la parte inferior */
}

.logo-icon {
  width: auto;  /* Ajusta el tamaño aquí */
  height: 25px;  /* Mantiene la proporción */
  margin-left: 3px; /* Espacio entre el logo y el texto */
}


.title{
  font-size: 14px; /* Ajusta el tamaño del texto */
  font-weight: bold;
  color: rgb(255, 255, 255);
}

.logo {
  width: auto;  /* Ajusta el tamaño aquí */
  height: 25px;  /* Mantiene la proporción */
  border-radius: 0;
  margin-right: 3px;
}

.menu-container {
  position: fixed;
  top: 40px;
  z-index: 950;
  width: 100%;
  gap: 5px;
  display: flex; /* Usar flexbox para alinear elementos en línea */
  align-items: center; /* Centra verticalmente los elementos */
  padding: 5px; /* Espaciado interno */
  margin: 0;
  display: flex;
  justify-content: flex-start;
  
  box-shadow: none; /* Eliminar sombra si es necesario */
  border-top: 6px solid forestgreen;
  
}

/* Botón hamburger con posición fija a la derecha */
.buttonSystem.hamburger {
  position: fixed !important;
  top: 50px !important; /* Ajusta la distancia desde la parte superior */
  right: 10px !important; /* Alinea el elemento a la derecha */
  left: auto !important; /* Anula cualquier posicionamiento izquierdo */
  z-index: 3000 !important;
}

/* Estado activo del botón hamburger */
.buttonSystem.hamburger.active {
  background-color: rgb(212, 155, 0) !important;
  border-color: rgb(152, 152, 152) !important;
}

.buttonSystem.hamburger.active img {
  transform: scale(1.1) !important;
}

/* MENU CAPAS */
/* MANU CAPAS WAVE INICIO */ 

#layerMenu{
  display: none;  /*Oculto por defecto */
}

.layer-menu {
  
  position: fixed; /* Asegura que se superponga */
  top: 45px; /* Ajusta según sea necesario */
  right: 45px; /* Alinea el menú a la derecha */
  margin: 5px;
  background: transparent;
  box-shadow: 0px 8px 28px -9px rgba(0, 0, 0, 0.45);
  width: 200px;
  max-height: calc(100vh - 60px); /* Altura máxima basada en la ventana */
  border-radius: 16px;
  overflow-y: auto; /* Scroll vertical cuando sea necesario */
  overflow-x: hidden; /* Oculta scroll horizontal */
  display: flex;
  z-index: 1000;
  
  /* Estilos para el scrollbar personalizado */
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 155, 0, 0.8) rgba(255, 255, 255, 0.2);
}

/* Estilos para scrollbar en WebKit (Chrome, Safari, Edge) */
.layer-menu::-webkit-scrollbar {
  width: 8px;
}

.layer-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.layer-menu::-webkit-scrollbar-thumb {
  background: rgba(212, 155, 0, 0.8);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.layer-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 155, 0, 1);
}

.layer-menu .infotop ul {
  list-style-type: none; /* Elimina las viñetas */
  padding: 0; /* Elimina el padding por defecto */
  margin: 5px; /* Elimina el margen por defecto */
  

}

/* Estilo para alinear el label junto al checkbox */
#layerMenu label {
  display: inline-flex; /* Asegura que el contenido sea flexible y se alinee horizontalmente */
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  gap: 8px; /* Espaciado entre el checkbox y el texto */
}

.wave {
  position: absolute;
  width: 400px;
  height: 700px;
  opacity: 0.6;
  left: 0;
  top: 0;
  margin-left: -50%;
  margin-top: -70%;
  background: linear-gradient(744deg, #00ff4cd7, #03a539e0 60%, #00cc44);
}

.icon {
  width: 3em;
  margin-top: -1em;
  padding-bottom: 1em;
}

/* CONTENEDOR DEL MENU CAPAS*/ 

.bg-menu {
  display: flex;
  align-content: center;
  justify-content: center;
  position: absolute;
  align-self: center;
  align-items: center;
  width: 90%;
  height: 25px;
  z-index: 3;
  background: rgb(255, 255, 255);
  backdrop-filter: blur(24px);
  border-radius: 11px;
  overflow: hidden;
  outline: 2px solid rgb(0, 116, 44);
}

.blob-menu {
  position: relative;
  z-index: 1;
  
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: rgb(212, 155, 0);
  opacity: 1;
  filter: blur(6px);
  animation: blob-bounce 5s infinite ease;
}

@keyframes blob-bounce {
  0% {
    transform: translate(-100%, -100%) translate3d(0, 0, 0);
  }

  25% {
    transform: translate(-100%, -100%) translate3d(100%, 0, 0);
  }

  50% {
    transform: translate(-100%, -100%) translate3d(100%, 100%, 0);
  }

  75% {
    transform: translate(-100%, -100%) translate3d(0, 100%, 0);
  }

  100% {
    transform: translate(-100%, -100%) translate3d(0, 0, 0);
  }
}


.mTitutlo{
  justify-content: center; /* Centra horizontalmente */
  align-items: center; /* Centra verticalmente */
  z-index: 2;
  align-self: center;
  align-items: center;
  width: 95%;
  height: 35px;
  border-radius: 15px;
  border: rgb(212, 155, 0);
  display: flex;
  overflow: hidden;
  display: flex;
  margin-bottom: 5px;
  margin-top: 5px;
  left: 10%;
  ;
}

.mTitutlo2{
  justify-content: center; /* Centra horizontalmente */
  align-items: center; /* Centra verticalmente */
  z-index: 2;
  align-self: center;
  align-items: center;
  width: 95%;
  height: 35px;
  border-radius: 0px;
  border: #00ff15;
  display: flex;
  overflow: hidden;
  display: flex;
  margin-bottom: 2px;
  margin-top: 2px;
  left: 10%;
  ;
}

.bg-menu #titulo{
  justify-content: center;
  align-items: center;
  color: rgb(212, 155, 0);
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  font-weight: bold;
  font: size 18px;;
  width: fit-content; /* Ajusta automáticamente al contenido */
  flex-grow: 1;
}



.infotop {
  flex-direction: column;
  justify-content: center;
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: flex-start;
  font-size: 16px;
  position: relative;
  top: 0px;
  left: 0px;
  right: 0px;
  color: rgb(255, 255, 255);
  
}

.infotop .subtitulo{
  justify-content: center;
  align-items: center;
  color: #ffffff;
  font-weight: bold;
 
  border-radius: 5px;
 
  margin: 2px;
  flex-grow: 1;
  margin-left: 5px;
  margin-right: 5px;
  display: flex;
  height: 20px;
  border-radius: 15px;
  border: solid rgb(212, 155, 0);
  background-color: #0942216e;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Estado activo del subtítulo del acordeón */
.infotop .subtitulo.active {
  background-color: rgb(212, 155, 0);
  border-color: #ffffff;
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

/* Hover effect para subtítulos */
.infotop .subtitulo:hover {
  background-color: #ff000080;
  transform: scale(1.01);
}

.wave:nth-child(2),
.wave:nth-child(3) {
  top: 210px;
}

.playing .wave {
  border-radius: 40%;
  animation: wave 3000ms infinite linear;
}

.wave {
  border-radius: 40%;
  animation: wave 55s infinite linear;
}

.playing .wave:nth-child(2) {
  animation-duration: 4000ms;
}

.wave:nth-child(2) {
  animation-duration: 50s;
}

.playing .wave:nth-child(3) {
  animation-duration: 5000ms;
}

.wave:nth-child(3) {
  animation-duration: 45s;
}

@keyframes wave {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}
/* MENU CAPAS WAVE FIN */ 


 /* LISTA CHECKBOX EL MENU CAPAS INICIO */
/* Hide the default checkbox */
.container2 input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.container2 {
  display: block;
  position: relative;
  cursor: pointer;
  font-size: 1.5rem;
  gap: 10px;
  user-select: none;
}

/* Create a custom checkbox */
.checkmark {
  --clr: rgb(212, 155, 0);
  position: relative;
  top: 0;
  left: 0;
  height: 1.3em;
  width: 1.3em;
  background-color: #ffffff;
  outline: 2px solid rgb(212, 155, 0);
  border-radius: 50%;
  transition: 300ms;
}

/* When the checkbox is checked, add a blue background */

.container2 {
  margin: 3px;
  font-size: 14px;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  
}

.container2 input:checked ~ .checkmark {
  background-color: var(--clr);
  border-radius: .5rem;
  animation: pulse 500ms ease-in-out;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.container2 input:checked ~ .checkmark:after {
  display: block;
}

/* Style the checkmark/indicator */
.container2 .checkmark:after {
  left: 0.45em;
  top: 0.25em;
  width: 0.25em;
  height: 0.5em;
  border: solid #ffffff;
  border-width: 0 0.15em 0.15em 0;
  transform: rotate(45deg);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 #0B6E4F90;
    rotate: 20deg;
  }

  50% {
    rotate: -20deg;
  }

  75% {
    box-shadow: 0 0 0 10px #0B6E4F60;
  }

  100% {
    box-shadow: 0 0 0 13px #0B6E4F30;
    rotate: 0;
  }
}

.list {
  display: none; /* Oculta las listas inicialmente */
  padding: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

.list.visible {
  display: block; /* Muestra las listas cuando se agregue la clase "visible" */
  opacity: 1;
  transform: translateY(0);
}

/* Estilo para listas activas del acordeón */
.list[style*="block"] {
  opacity: 1;
  transform: translateY(0);
  animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 500px;
  }
}

/* FIN DE ELEMENTOS DEL MENU CAPAS */


.control-button {
  background-color: #4caf4f00; /* Color verde */
  border: none;
  color: white;
  padding: 5px 5px;
  text-align: center;
  text-decoration: none;
  display: inline-flex; /* Cambia a flex para alinear el ícono y el texto */
  align-items: center; /* Centra verticalmente los elementos */
  font-size: 10px;
  margin-right: 100px; /* Espacio a la izquierda del botón */
  cursor: pointer;
  border-radius: 5px; /* Bordes redondeados */
}

.control-button img {
  height: 45px; /* Ajusta el tamaño del ícono */
  margin-right: 5px; /* Espacio entre el ícono y el texto */
}

.control-button:hover {
  background-color: #45a049; /* Color verde más oscuro al pasar el ratón */
}


#refresh-button {
margin-right: 0;
background: none;
border: none;
cursor: pointer;
padding: 5px;
}

#refresh-button img {
background: none;
width: auto;  /* Ajusta el tamaño aquí */
height: 25px;  /* Mantiene la proporción */
}


#toggleMapButton {
  margin-right: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}


#toggleMapButton img {
  background: none;
  width: auto;  /* Ajusta el tamaño aquí */
  height: 25px;  /* Mantiene la proporción */
}



#google-label-button {
  margin-right: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

#google-label-button img {
  background: none;
  width: auto;  /* Ajusta el tamaño aquí */
  height: 25px;  /* Mantiene la proporción */
}

#medirDistanciaBtn {
  margin-right: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

#medirDistanciaBtn img {
  background: none;
  width: auto;  /* Ajusta el tamaño aquí */
  height: 25px;  /* Mantiene la proporción */
}

#medirAreaBtn {
  margin-right: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

#medirAreaBtn img {
  background: none;
  width: auto;  /* Ajusta el tamaño aquí */
  height: 25px;  /* Mantiene la proporción */
}


#localizar-button {
  margin-right: 80px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

#localizar-button img {
  background: none;
  width: auto;  /* Ajusta el tamaño aquí */
  height: 25px;  /* Mantiene la proporción */
}


#map {
    width: 100%;
    height: 100vh; /* O la altura que necesites */
    border: none;
    outline: none;
    background: transparent;
}



.select-wrapper {
  position: relative;
}

#visible-layers {


  transform: translateY(-5px); /* Ajusta la distancia hacia arriba */
}


/* Ajustes generales para el select */
#visible-layers {
  width: 150px;  /* Ajusta el tamaño según necesites */
  max-height: 300px; /* Limita la altura de las opciones */
  overflow-y: auto; /* Asegura que haya desplazamiento si las opciones exceden el máximo */
  position: relative;
}

/* Estilo para las opciones del select */
#visible-layers option {
  padding: 200px;
}

/* Si se necesita que el select abra hacia arriba cuando esté cerca de la parte inferior */
#visible-layers {
  position: relative;
  z-index: 9999;  /* Asegura que el select esté por encima de otros elementos */
}

#visible-layers:focus {
  overflow: visible;
}

#control-panel #layer-controls{
  align-self: center;
  align-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 300px;
}

.bottom-bar{
  position: fixed;
  vertical-align: bottom;
  display: flex;
  justify-content: flex-start;
  bottom: 30px;
  justify-content: center;
  align-items: center;
  left: 0;
  width: auto;
  background-color: rgba(255, 255, 255, 0); /* Hacerla completamente transparente */
  color: #fff;
  padding: 5px;
  flex-direction: column;
  border: none; /* Eliminar bordes si es necesario */
  box-shadow: none; /* Eliminar sombra si es necesario */
  z-index: 1000; /* Asegúrate de que esté sobre el mapa */
}

.button-container {
  position: fixed;
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px; /* Espacio entre los botones */
  padding: 0px;
  border-radius: 12px;
  z-index: 999;
  
}

.button-container .icon-button {
  width: 38px;
  height: auto;
  padding: 0;
  background-color: transparent;
  border-radius: 5px;
  transition: transform 0.2s ease;
}

.button-container .icon-button:hover {
  transform: scale(1.05);
}

/* Estilos para los botones del sistema en button-container */
.button-container .buttonSystem {
  background-color: rgba(255, 255, 255, 0.9) !important;
  border: 2px solid rgba(212, 155, 0, 0.8) !important;
  backdrop-filter: blur(3px);
}

.button-container .buttonSystem:hover {
  background-color: rgba(212, 155, 0, 0.9) !important;
  border: 2px solid rgba(212, 155, 0, 1) !important;
  transform: scale(1.05);
}

.button-container .buttonSystem img {
  filter: brightness(1.1);
}


#control-panel button {
  padding:0;
  border:0;
  justify-content: right;
  justify-items: right;
  margin: 30;
  margin-right: 5px;
  width: 40px;
  background-color: transparent;
}


.bottom-bar img {
  padding:0;
  border:0;
  margin:0;
  width: 40px;
  justify-content: center;
  align-self: center;
 
  left: 10;
}

#visible-layers{
  width: 95px;
  margin: 10;
  left: 40;
  border-color: green;
  border-width: 2px;
  background-color: red;
  font-weight: bold;
  color: aliceblue;
  flex-direction: column;
}

/* Eliminar clase antigua que puede causar conflicto */
/* .modal-content {
  width: 600px;
  height:auto;
  background: #00571a;
  position: relative;
  display: flex;
  flex-direction: column;
  place-content: center;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  z-index: 20000;
} */

.app-modal {
  position: fixed;
  top: 30px; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40000; /* Aumentado para estar sobre .atrib-table-overlay */
  animation: fadeInScale 0.2s;
}

.app-modal-content {
  position: relative;
  background: rgba(255,255,255,0.93);
  border-radius: 18px;
  width: 92vw;
  max-width: 480px;
  min-width: 280px;
  box-shadow: 0 0 32px #195800dc;
  display: flex;
  flex-direction: column;
  align-items: center;
  
  overflow: hidden;
  animation: fadeInScale 0.3s ease-out;
  background-image: url('images/pic2_nogal.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 40001; /* Aumentado para estar sobre .atrib-table-content */
  border: 1.5px solid #d49b00; /* Borde dorado original */
}

.app-modal-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(25,88,0,0.18); /* Overlay suave para contraste */
  z-index: 0;
  border-radius: 18px;
}

.app-modal-content > * {
  position: relative;
  z-index: 1;
}

/* LIMPIEZA DE COLORES Y DUPLICADOS PARA MODALES */
.app-modal-title, .app-modal-desc, .app-modal-footer, .modal-logo, .modal-map-logo {
  color: #fff !important;
  text-align: center;
  font-family: 'DM Sans', Arial, sans-serif !important;
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
}
.app-modal-title {
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  margin-top: 2px;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
}
.app-modal-subtitle {
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff !important;
  text-align: center;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
}
.app-modal-desc, .app-modal-footer {
  color: #fff !important;
  font-size: 1.05rem;
  letter-spacing: 0.1px;
  font-family: 'DM Sans', Arial, sans-serif !important;
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
}

/* === MODAL DE TABLA DE ATRIBUTOS AISLADO (UNIFICADO) === */
.atrib-table-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.45);
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.atrib-table-content {
  background: rgba(25,88,0,0.95);
  border: 2.5px solid #d49b00;
  border-radius: 18px;
  box-shadow: 0 0 32px #195800dc;
  padding: 14px 18px 16px 18px;
  width: auto;
  color: #fff;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.atrib-table-title {
  font-size: 1.15rem;
  font-weight: bold;
  margin-bottom: 6px;
  text-align: center;
}
/* Estilos para el contenedor del logo dinámico */
.atrib-logo-container {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  border: 1px solid #d49b00;
  padding: 7px 0 7px 0;
  margin: 2px 0 4px 0;
  text-align: center;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.atrib-logo-container img {
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
  height: 45px;
  width: auto;
}

.atrib-logo-container img:hover {
  transform: scale(1.05);
}

.atrib-barra-herramientas {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 6px;
  padding: 7px 4px 7px 4px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 
              0 2px 8px rgba(212, 155, 0, 0.3),
              inset 0 1px 2px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(212, 155, 0, 0.5);
}
.atributo-botones {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

/* Asegura que la tabla de atributos sea visible y legible */
.atribTable, .atribTable table, .atribTable td, .atribTable th {
  color: #fff !important;
  background: transparent !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  font-size: 0.97em;
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
}
.atribTable table {
  width: 100%;
  border-collapse: collapse;
}
.atribTable td, .atribTable th {
  padding: 4px 7px;
  border-bottom: 1px solid #d49b00;
}
.atribTable tr:last-child td {
  border-bottom: none;
}

.input-atributo {
  width: 100%;
  padding: 4px;
}

/* === ETIQUETAS DE MAPA (LABELS) === */
.label-card, .leaflet-label, .leaflet-tooltip, .map-label, .etiqueta-mapa, .etiqueta-label {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: #fff !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  font-size: 1.1em !important;
  font-weight: 500;
  padding: 2px 6px;
  text-shadow: 0 0 6px #fff, 0 0 2px #fff, 0 1px 2px #000;
  /* Sombra blanca y leve sombra negra para contraste */
  border-radius: 4px;
  pointer-events: none;
}

.label-card::before, .leaflet-label::before, .leaflet-tooltip::before, .map-label::before, .etiqueta-mapa::before, .etiqueta-label::before {
  display: none !important;
}

/* === ETIQUETAS ESPECÍFICAS PARA PUNTOS DE INTERÉS === */
.label-tooltip-punto {
  background: rgba(25, 88, 0, 0.9) !important;
  border: 2px solid #d49b00 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  color: #fff !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 3px 8px !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
  border-radius: 6px !important;
  pointer-events: none !important;
  text-align: center !important;
  min-width: 40px !important;
  white-space: nowrap !important;
}

.label-tooltip-punto::before {
  display: none !important;
}

/* === CONTROL DE ETIQUETAS POR ZOOM === */
/* Sistema híbrido CSS + JS para ocultar etiquetas en zooms bajos */

/* ZOOM BAJO (<14): Ocultar TODAS las etiquetas */
.leaflet-container.zoom-low .leaflet-tooltip {
  display: none !important;
  opacity: 0 !important;
}

/* ZOOM MEDIO (14-15): Mostrar solo etiquetas de puntos (amenidades) */
.leaflet-container.zoom-medium .leaflet-tooltip.punto-label {
  display: block !important;
  opacity: 1 !important;
}

.leaflet-container.zoom-medium .leaflet-tooltip.lote-label {
  display: none !important;
  opacity: 0 !important;
}

.leaflet-container.zoom-medium .leaflet-tooltip.etapa-label {
  display: block !important;
  opacity: 0.8 !important;
  font-size: 0.9em !important;
}

/* ZOOM ALTO (≥16): Mostrar TODAS las etiquetas */
.leaflet-container.zoom-high .leaflet-tooltip {
  display: block !important;
  opacity: 1 !important;
}

/* Transiciones suaves para cambios de zoom */
.leaflet-tooltip {
  transition: opacity 0.3s ease, font-size 0.2s ease !important;
}

/* Mejoras específicas para cada tipo */
.leaflet-tooltip.lote-label {
  font-size: 0.95em !important;
  font-weight: 600 !important;
}

.leaflet-tooltip.punto-label {
  font-size: 0.85em !important;
  font-weight: 500 !important;
}

.leaflet-tooltip.etapa-label {
  font-size: 1.1em !important;
  font-weight: 700 !important;
}

/* Para usar la ventana modal, solo agrega el HTML sugerido en cualquier parte del body */

/* Fondo y centrado para el contenedor de modales */
.app-modal {
  position: fixed;
  
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40000; /* Aumentado para estar sobre .atrib-table-overlay */
  animation: fadeInScale 0.2s;
}

.app-modal-content {
  position: relative;
  background: rgba(255,255,255,0.93);
  border-radius: 18px;
  width: 92vw;
  max-width: 480px;
  min-width: 280px;
  box-shadow: 0 0 32px #195800dc;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 28px 28px 28px;
  overflow: hidden;
  animation: fadeInScale 0.3s ease-out;
  background-image: url('images/pic2_nogal.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 40001; /* Aumentado para estar sobre .atrib-table-content */
  border: 1.5px solid #d49b00; /* Borde dorado original */
}

.app-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 28px;
  font-weight: bold;
  color: #d49b00;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s;
}
.app-modal-close:hover {
  color: #195800;
}

.app-modal-content input[type="text"],
.app-modal-content input[type="password"],
.app-modal-content input[type="email"] {
  width: 100%;
  padding: 10px;
  margin: 12px 0;
  font-size: 1rem;
  border: 1.5px solid #d49b00;
  border-radius: 6px;
  box-sizing: border-box;
  background: #fff;
}

.app-modal-content button,
.app-modal-content .button-modal {
  margin-top: 18px;
  background-color: #d49b00;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 10px 28px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.app-modal-content button:hover,
.app-modal-content .button-modal:hover {
  background-color: #195800;
  color: #fff;
}

/* Ajustes visuales para los elementos internos del modal unificado */
.modal-logo {
  display: block;
  margin: 0 auto 5px auto;
  height: 40px;
  width: auto;
  max-width: 100%; /* Permite que el ancho sea automático y nunca se distorsione */
}

.modal-map-logo {
  display: block;
  margin: 14px auto 10px auto;
  height: 40px;
  width: auto;
  max-width: 80px;
}

.app-modal-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 3px;
  margin-top: 2px;
  color: #fff;
  text-align: center;
}

.app-modal-subtitle {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 3px;
  color: #d49b00;
  text-align: center;
}

.app-modal-desc {
  color: #fff;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
  font-size: 1rem;
}

/* Justificación del texto para descripción expandida */
.app-modal-desc-resto {
    text-align: justify !important;
    line-height: 1.6 !important;
    text-justify: inter-word !important;
}

.app-modal-footer {
  color: #fff;
  font-size: 12px;
  text-align: center;
  margin-top: 10px;
}

@keyframes fadeInScale {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* BUZON DE MENSAJES */

/* Estilos para el panel de historial */
#panel-historial {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000; /* Aumentamos el z-index para asegurar que esté por encima de otros elementos */
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(25, 88, 0, 0.95);
    border: 2px solid rgb(212, 155, 0);
    border-radius: 8px;
    padding: 20px;
    max-width: 80vw;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Mejoras responsive para móviles */
@media (max-width: 768px) {
    #panel-historial {
        max-width: 95vw;
        max-height: 90vh;
        padding: 15px;
        border-radius: 6px;
    }
    
    /* Hacer que los controles del historial se apilen verticalmente en móvil */
    #panel-historial .barSystem {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    /* Mejorar el diseño de los labels e inputs en móvil */
    #panel-historial .barSystem label {
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin-bottom: 10px;
        font-size: 14px;
        font-weight: bold;
    }
    
    /* Hacer que los inputs ocupen todo el ancho disponible */
    #panel-historial .barSystem input,
    #panel-historial .barSystem select {
        width: 100%;
        padding: 8px;
        border: 1px solid rgb(212, 155, 0);
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.9);
        color: #333;
        font-size: 16px; /* Evita zoom en iOS */
        box-sizing: border-box;
    }
    
    /* Centrar el botón de descarga */
    #panel-historial .barSystem .buttonSystem {
        align-self: center;
        min-width: 50px;
        min-height: 40px;
    }
    
    /* Mejorar la lista de historial en móvil */
    #historial-notificaciones {
        max-height: 250px;
        font-size: 13px;
    }
    
    #historial-notificaciones li {
        padding: 8px;
        margin: 4px 0;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.1);
        line-height: 1.4;
        word-wrap: break-word;
    }
    
    /* Ajustar el título en móvil */
    #panel-historial .imagen-notificacion h3 {
        font-size: 16px;
        text-align: center;
        margin: 10px 0;
    }
    
    #panel-historial .imagen-notificacion img {
        max-width: 60px;
        max-height: 60px;
    }
}

/* Para pantallas muy pequeñas (menos de 480px) */
@media (max-width: 480px) {
    #panel-historial {
        max-width: 98vw;
        max-height: 95vh;
        padding: 10px;
        top: 5%;
        transform: translateX(-50%);
    }
    
    #panel-historial .barSystem input,
    #panel-historial .barSystem select {
        font-size: 16px; /* Mantener tamaño para evitar zoom */
        padding: 10px;
    }
    
    #historial-notificaciones {
        max-height: 200px;
        font-size: 12px;
    }
}

#historial-notificaciones {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
}

#historial-notificaciones li {
    padding: 5px;
    margin: 2px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    font-size: 12px;
}

/* Estilos para la sección de descarga del historial */
.descarga-historial {
    margin-top: 15px;
}

.descarga-historial h4 {
    text-align: center;
    color: rgb(212, 155, 0);
    margin-bottom: 10px;
    font-size: 16px;
}

/* Mejorar el botón de salir del historial en móvil */
@media (max-width: 768px) {
    .descarga-historial {
        text-align: center;
    }
    
    .descarga-historial h4 {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    #btn-salir-historial {
        margin-top: 15px;
        padding: 10px 15px !important;
        min-width: 60px;
        min-height: 45px;
    }
    
    #btn-salir-historial img {
        width: 20px !important;
        height: 20px !important;
    }
}

#notificaciones-wrapper {
    position: fixed;
    bottom: 15px;
    left: 15px;
    z-index: 9999; /* Muy alto para estar por encima de todo */
    font-family: sans-serif;
    border: 3px solid rgb(212, 155, 0);
    border-radius: 50px;
    pointer-events: auto; /* Asegurar que responda a eventos */
    cursor: pointer; /* Indicar que es clickeable */
}
#campana-con-imagen {
  position: relative;
  width: 40px;  /* Ajusta según el tamaño deseado */
  height: 40px;
  margin: 0 auto;
  background-color: green;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto; /* Asegurar que responda a eventos */
  cursor: pointer; /* Indicar que es clickeable */
  transition: all 0.2s ease; /* Transición suave */
}

#campana-con-imagen:hover {
  background-color: #228b22; /* Verde más claro en hover */
  transform: scale(1.05); /* Ligero aumento en hover */
}

#el-nogal-img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  display: block;
  border-radius: 50%;
  z-index: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

#campana-notificacion {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  z-index: 10001; /* Más alto que el panel */
  background: none;
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transform: translate(-50%, -50%);
  pointer-events: auto; /* Asegurar que responda a eventos */
  cursor: pointer; /* Indicar que es clickeable */
}

/* Estilo específico para la imagen de alarma con transición suave */
#campana-notificacion img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  border-radius: 50px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

/* Efecto de animación cuando hay notificaciones */
#campana-notificacion img[src*="alarma"] {
  animation: campanaPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

/* Animación de pulso para alarma */
@keyframes campanaPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Estado normal cuando no hay notificaciones */
#campana-notificacion img[src*="notificacion"] {
  animation: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#contador-notificaciones {
    position: absolute;
    top: -8px;
    right: -8px;
    background: red;
    color: #fff;
    font-size: 12px;
    padding: 2px 5px;
    border-radius: 50%;
    pointer-events: none; /* No bloquear clicks del elemento padre */
    z-index: 10002; /* Más alto que campana */
}

#panel-notificaciones {
    display: none;
    position: absolute;
    bottom: 60px;
    left: 0;
    right: auto;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(25, 88, 0, 0.95);
    border: 1px solid rgb(212, 155, 0);
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    padding: 10px;
    color: #fff;
    z-index: 10000; /* Aún más alto que el wrapper */
    pointer-events: auto; /* Asegurar que responda a eventos */
}

#panel-notificaciones h3 {
    margin-top: 0;
}

#panel-notificaciones ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#panel-notificaciones ul li {
    padding: 8px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

#panel-notificaciones ul li:last-child {
    border-bottom: none;
}

#panel-notificaciones.oculto {
    display: none;
}

#panel-notificaciones.visible {
    display: block;
}

#contador-notificaciones {
    background: red;
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 12px;
    display: none;
    position: absolute;
    top: -5px;
    right: -5px;
    
}

.imagen-notificacion {
    display: flex;
    align-items: center;      /* Centrado vertical */
    justify-content: center;  /* Centrado horizontal */
    gap: 12px;                /* Espacio entre imagen y texto */
    padding: 10px 0;
    text-align: center;
}

.imagen-notificacion img {
    height: 30px;
    width: auto;
    display: block;
}

.imagen-notificacion h3 {
    margin: 0;
    font-size: 1.2em;
    white-space: nowrap; /* Evita salto de línea si es necesario */
}


.descarga-historial {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
    font-size: 14px;
}

.descarga-historial label {
    display: block;
    margin-bottom: 5px;
}


/* Estilos para marcador de ubicación actual */
.ubicacion-actual-icon {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Estilo para notificaciones de distancia */
.toast-notificacion {
  background: linear-gradient(135deg, #4285f4, #34a853);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  font-weight: 500;
  font-size: 14px;
  max-width: 300px;
  text-align: center;
}

/* Estilos para ventana flotante de destino */
.ventana-destino {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255,255,255,0.96);
    border: 2px solid #195800;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 9999;
    font-size: 14px;
    min-width: 200px;
    max-width: 250px;
    font-family: 'DM Sans', Arial, sans-serif;
    backdrop-filter: blur(8px);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.ventana-destino div {
    margin-bottom: 6px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ventana-destino strong {
    color: #195800;
    font-weight: 600;
    margin-right: 8px;
}

.btn-cancelar-destino {
    margin-top: 12px;
    width: 100%;
    background: linear-gradient(135deg, #d9534f, #c9302c);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'DM Sans', Arial, sans-serif;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cancelar-destino:hover {
    background: linear-gradient(135deg, #c9302c, #ac2925);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 83, 79, 0.3);
}

.btn-cancelar-destino:active {
    transform: translateY(0);
}

.ventana-destino.oculto {
    display: none;
}

/* Estilos para botones de modal con solo iconos */
.button-modal img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    border-radius: 3px;
}

/* Estilo para tooltips mejorados */
[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
}

[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 117%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    pointer-events: none;
}

[title] {
    position: relative;
}

/* Estilos específicos para botones Fijar destino y Editar */
.button-modal {
    background-color: white !important;
    color: #333 !important;
    border: 2px solid rgb(212, 155, 0) !important;
}

.button-modal:hover {
    background-color: rgba(25, 88, 0, 0.95) !important;
    color: white !important;
    border-color: rgb(212, 155, 0) !important;
}

/* Estilo general para botones del sistema */
.buttonSystem {
    background-color: white !important;
    border: 2px solid rgb(212, 155, 0) !important;
    border-radius: 8px !important;
    padding: 3px !important;
    color: #333 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    height: 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.buttonSystem:hover {
    background-color: rgb(212, 155, 0) !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(212, 155, 0, 0.3) !important;
    transform: translateY(-1px) !important;
}

.buttonSystem:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(212, 155, 0, 0.2) !important;
}

.buttonSystem:focus {
    border-color: rgb(212, 155, 0) !important;
    box-shadow: 0 0 0 3px rgba(212, 155, 0, 0.2) !important;
}

/* Para botones deshabilitados */
.buttonSystem:disabled {
    background-color: #f5f5f5 !important;
    border-color: #ddd !important;
    color: #999 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.buttonSystem:disabled:hover {
    background-color: #f5f5f5 !important;
    color: #999 !important;
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Estilo general para GIF dentro de botones buttonSystem */
.buttonSystem img {
    width: 30px !important;
    height: 30px !important;
    vertical-align: middle !important;
    margin: 0 !important;
    border-radius: 8px !important;
    object-fit: contain !important;
    display: inline-block !important;
    transition: transform 0.2s ease !important;
}

/* Efecto hover para los GIF dentro de buttonSystem */
.buttonSystem:hover img {
    transform: scale(1.1) !important;
}

/* ================= WINDOW SYSTEM - SISTEMA DE VENTANAS UNIFICADO ================= */
/* Sistema independiente que luce exactamente igual a atrib-table-content */

.window-system-overlay {
  position: fixed;
  top: 0; 
  left: 0; 
  width: 100vw; 
  height: 100vh;
  background: rgba(0,0,0,0.45);
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.window-system-content {
  background: rgba(25,88,0,0.95);
  border: 2.5px solid #d49b00;
  border-radius: 18px;
  box-shadow: 0 0 32px #195800dc;
  padding: 10px 5px 5px 5px;
  max-width: 520px;
  width: 95vw;
  /* height: 95% !important; */
  color: #fff;
  font-family: 'DM Sans', Arial, sans-serif;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Logo container para windowSystem */
.window-system-logo-container {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  border: 1px solid #d49b00;
  padding: 5px;
  margin: 5px;
  text-align: center;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.window-system-logo-container img {
  width: auto !important;
  height: 65px !important;
  object-fit: contain;
  margin-bottom: 5px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
}

.window-system-logo-container img:hover {
  transform: scale(1.05);
}

.window-system-logo-label {
  margin-top: 5px;
  font-weight: bold;
  color: white;
  font-size: 14px;
}

/* Barra de herramientas para windowSystem */
.window-system-toolbar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

/* Título para windowSystem */
.window-system-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 12px;
  text-align: center;
}

/* Contenido principal para windowSystem */
.window-system-body {
  width: 85%;
  height: auto;

}

/* Tabla de contenido para windowSystem (igual que atribTable) */
.window-system-table {
  color: #fff !important;
  background: transparent !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  font-size: 1.05em;
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
}

.window-system-table table {
  width: 100%;
  border-collapse: collapse;
  color: #fff !important;
  background: transparent !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  font-size: 1.05em;
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
}

.window-system-table td, 
.window-system-table th {
  padding: 6px 10px;
  border-bottom: 1px solid #d49b00;
  color: #fff !important;
  background: transparent !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  font-size: 1.05em;
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
}

.window-system-table tr:last-child td {
  border-bottom: none;
}

/* Botones del footer para windowSystem */
.window-system-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 15px;
}

/* Asegurar que los botones del windowSystem se vean igual */
.window-system-content .buttonSystem {
  background-color: white !important;
  border: 2px solid rgb(212, 155, 0) !important;
  border-radius: 8px !important;
  padding: 3px !important;
  color: #333 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  outline: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  height: 36px !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.window-system-content .buttonSystem:hover {
  background-color: rgb(212, 155, 0) !important;
  color: white !important;
  box-shadow: 0 4px 8px rgba(212, 155, 0, 0.3) !important;
  transform: translateY(-1px) !important;
}

.window-system-content .buttonSystem img {
  width: 35px !important;
  height: 35px !important;
  vertical-align: middle !important;
  margin: 0 !important;
  border-radius: 8px !important;
  object-fit: contain !important;
  display: inline-block !important;
  transition: transform 0.2s ease !important;
}

.window-system-content .buttonSystem:hover img {
  transform: scale(1.1) !important;
}

.window-system-content .button-modal {
  margin-top: 18px;
  background-color: #d49b00;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 10px 28px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.window-system-content .button-modal:hover {
  background-color: #195800;
  color: #fff;
}

/* Responsividad para windowSystem */
@media (max-width: 768px) {
  .window-system-content {
    width: 95vw;
    max-width: none;
    padding: 10px;
    max-height: 90%;
    overflow-y: auto;
    /*height: 85% !important; */
  }
  
  .window-system-toolbar {
    gap: 8px;
  }
  
  
  .window-system-title {
    font-size: 1.3rem;
  }
}

/* ================= BAR SYSTEM - BARRA DE HERRAMIENTAS GENERAL ================= */
/* Clase general para barras de herramientas que puede ser utilizada en cualquier parte del sistema */

.barSystem {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 2px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 
              0 2px 8px rgba(212, 155, 0, 0.3),
              inset 0 1px 2px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(212, 155, 0, 0.5);
}

/* Asegurar que los botones dentro de barSystem mantengan el estilo buttonSystem */
.barSystem .buttonSystem {
  background-color: white !important;
  border: 2px solid rgb(212, 155, 0) !important;
  border-radius: 8px !important;
  padding: 3px !important;
  color: #333 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  outline: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  height: 36px !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.barSystem .buttonSystem:hover {
  background-color: rgb(212, 155, 0) !important;
  color: white !important;
  box-shadow: 0 4px 8px rgba(212, 155, 0, 0.3) !important;
  transform: translateY(-1px) !important;
}

.barSystem .buttonSystem:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 4px rgba(212, 155, 0, 0.2) !important;
}

.barSystem .buttonSystem:focus {
  border-color: rgb(212, 155, 0) !important;
  box-shadow: 0 0 0 3px rgba(212, 155, 0, 0.2) !important;
}

.barSystem .buttonSystem:disabled {
  background-color: #f5f5f5 !important;
  border-color: #ddd !important;
  color: #999 !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

.barSystem .buttonSystem:disabled:hover {
  background-color: #f5f5f5 !important;
  color: #999 !important;
  transform: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.barSystem .buttonSystem img {
  width: 30px !important;
  height: 30px !important;
  vertical-align: middle !important;
  margin: 0 !important;
  border-radius: 8px !important;
  object-fit: contain !important;
  display: inline-block !important;
  transition: transform 0.2s ease !important;
}

.barSystem .buttonSystem:hover img {
  transform: scale(1.1) !important;
}

/* Responsividad para barSystem */
@media (max-width: 768px) {
  .barSystem {
    gap: 8px;
    padding: 8px;
  }
  
  .barSystem .buttonSystem {
    height: 32px !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
  }
  
  .barSystem .buttonSystem img {
    width: 24px !important;
    height: 24px !important;
  }
}

/* ================= FIN BAR SYSTEM ================= */

/* ================= WINDOW SYSTEM GLOBAL - Clase windowSystem ================= */
/* Definición para elementos que usan directamente la clase windowSystem */
/* Aplica estilos globales SOLO a .windowSystem que NO tengan la clase .exportar-panel */
.windowSystem:not(.exportar-panel) {
  background: rgba(25,88,0,0.95) !important;
  border: 2.5px solid #d49b00 !important;
  border-radius: 18px !important;
  box-shadow: 0 0 32px #195800dc !important;
  padding: 20px 16px 16px 16px !important;
  color: #fff !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  position: fixed !important;
  top: 25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  max-width: 90vw !important;
  height: auto !important;
  overflow-y: auto !important;
  z-index: 10000 !important;
}

/* Fondo sólido y visible para el panel de exportar Excel */
.windowSystem.exportar-panel {
  background: rgba(25,88,0,0.95) !important;
  border: 2.5px solid #d49b00 !important;
  border-radius: 18px !important;
  box-shadow: 0 0 32px #195800dc !important;
  color: #222 !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  position: fixed !important;
  top: 25px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  max-width: 90vw !important;
  /*min-height: 800px !important;*/
  height: auto !important;
  overflow-y: auto !important;
  z-index: 10000 !important;
  padding: 32px 20px 32px 20px !important;
  display: block !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

/* Estilos específicos para el modal Excel (exportar/importar) con fondo igual a windowSystem pero sin posición fija */
.importar-panel {
  background: rgba(25,88,0,0.95) !important;
  border: 2.5px solid #d49b00 !important;
  border-radius: 18px !important;
  box-shadow: 0 0 32px #195800dc !important;
  color: #222 !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  position: fixed !important;
  top: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  max-width: 90vw !important;
  max-height: 90% !important;
  /*min-height: 800px !important;*/
  height: auto !important;
  width: auto !important;
  overflow-y: auto !important;
  z-index: 10000 !important;
  padding: 15px 10px 15px 10px !important;
  display: block !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  
}

.preview-table-container {
    max-height: 50vh;      /* O el valor que prefieras */
    overflow-y: auto;
    margin-bottom: 5px;
    width: 100%;
}
/* Para elementos windowSystem que son modales */
.app-modal .windowSystem {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

/* Asegurar que los elementos dentro de windowSystem mantengan el estilo adecuado */
.windowSystem h3, .windowSystem h4 {
  color: #fff !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  text-align: center !important;
  margin-bottom: 10px !important;
}

.windowSystem .modal-logo {
  max-width: 150px !important;
  max-height: 60px !important;
  object-fit: contain !important;
  margin-bottom: 8px !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4) !important;
}

/* Responsividad para windowSystem */
@media (max-width: 768px) {
  .windowSystem {
    width: 95vw !important;
    max-width: none !important;
    padding: 20px 16px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
}

/* ================= MARCADOR EMOJI BÚSQUEDA ================= */
.emoji-marker {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.emoji-marker div {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    animation: pulse 1.5s infinite;
    filter: drop-shadow(0 0 8px rgba(255,0,0,0.8));
}

@keyframes pulse {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Estilo para el popup del lote encontrado */
.leaflet-popup-content {
    font-family: 'DM Sans', Arial, sans-serif !important;
}

.leaflet-popup-content h4 {
    margin: 5px 0 !important;
    color: #195800 !important;
    font-weight: bold !important;
}

.leaflet-popup-content p {
    margin: 5px 0 !important;
    color: #666 !important;
}
/* ================= FIN MARCADOR EMOJI ================= */

/* 📏 ESTILOS PARA MEDICIÓN DE DISTANCIA */
.distance-measurement-tooltip {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 12px !important;
    padding: 8px 12px !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3) !important;
    text-align: center !important;
}

.distance-measurement-tooltip::before {
    border-top-color: #3498db !important;
}

.measurement-guide-tooltip {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    border: none !important;
    border-radius: 6px !important;
    color: white !important;
    font-size: 11px !important;
    padding: 6px 10px !important;
    box-shadow: 0 3px 10px rgba(44, 62, 80, 0.4) !important;
    text-align: center !important;
    opacity: 0.9 !important;
}

.measurement-guide-tooltip::before {
    border-top-color: #2c3e50 !important;
}

/* 🎨 ESTILOS PARA BOTONES DE MEDICIÓN ACTIVOS */
.measurement-button-active {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%) !important;
    color: white !important;
    font-weight: bold !important;
    border: 2px solid #1e8449 !important;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4) !important;
    transform: scale(1.02) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.measurement-button-active:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%) !important;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.5) !important;
    transform: scale(1.03) !important;
}

.measurement-button-inactive {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: scale(1) !important;
}

.measurement-button-inactive:hover {
    background-color: #f8f9fa !important;
    border-color: #27ae60 !important;
    color: #27ae60 !important;
    transform: scale(1.01) !important;
}

/* 📏 ANIMACIÓN DE PULSO PARA BOTONES ACTIVOS */
@keyframes pulseGreen {
    0% { box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(39, 174, 96, 0.6); }
    100% { box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4); }
}

.measurement-button-pulse {
    animation: pulseGreen 2s infinite ease-in-out;
}

/* 🎯 FORZAR CURSOR CROSSHAIR DURANTE MEDICIONES */
.measurement-mode-active {
    cursor: crosshair !important;
}

.measurement-mode-active * {
    cursor: crosshair !important;
}

.measurement-mode-active .leaflet-container {
    cursor: crosshair !important;
}

.measurement-mode-active .leaflet-interactive {
    cursor: crosshair !important;
}

.measurement-mode-active path {
    cursor: crosshair !important;
}

.measurement-mode-active polygon {
    cursor: crosshair !important;
}

/* Asegurar que todos los elementos del mapa tengan crosshair durante medición */
.measurement-mode-active .leaflet-zoom-box,
.measurement-mode-active .leaflet-marker-icon,
.measurement-mode-active .leaflet-popup,
.measurement-mode-active .leaflet-popup-content {
    cursor: crosshair !important;
}

/* 🔄 WIDGET DE PROGRESO PARA CAPAS CON ATRIBUTO "AVANCE" */
.marker-container {
    position: relative;
    display: inline-block;
}

.progress-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 44px;
    height: 44px;
    z-index: 1000;
    pointer-events: none;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.progress-ring circle {
    transition: stroke-dashoffset 0.5s ease-in-out;
}

.progress-badge {
    position: absolute;
    top: -25px;
    right: -7px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 14px;
    padding:  3px 7px;
    font-size: 11px;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    z-index: 1002;
    pointer-events: none;
    border: 2px solid rgba(255, 255, 255, 0.9);
    line-height: 1;
}

/* Colores del badge según el porcentaje */
.progress-badge.not-started {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: rgba(231, 76, 60, 0.3);
}

.progress-badge.in-progress {
    background: linear-gradient(135deg, #f39c12, #d68910);
    border-color: rgba(243, 156, 18, 0.3);
}

.progress-badge.almost-done {
    background: linear-gradient(135deg, #27ae60, #229954);
    border-color: rgba(39, 174, 96, 0.3);
}

.progress-badge.completed {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-color: rgba(52, 152, 219, 0.3);
}

/* Animación para badge completado */
.progress-badge.completed {
    animation: pulseComplete 2s infinite ease-in-out;
}

@keyframes pulseComplete {
    0% { transform: scale(1); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
    50% { transform: scale(1.1); box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4); }
    100% { transform: scale(1); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
}

/* Estilo para el marcador personalizado con progreso */
.custom-marker-with-progress {
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
}

.custom-marker-with-progress img {
    z-index: 999;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* 🎯 Tooltip hover para puntos con widget de progreso */
.hover-tooltip-punto {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    font-size: 12px !important;
    padding: 8px 12px !important;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.4) !important;
    text-align: center !important;
    opacity: 0.95 !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
}

.hover-tooltip-punto::before {
    border-top-color: #2c3e50 !important;
}

/* ===== ESTILOS EXCEL MODAL ===== */

/* Modal Excel más grande */
.excel-modal-large {
  max-width: auto !important;
  width: auto !important;
  max-height: 75vh !important;
  overflow-y: auto !important;
}

/* ===== ESTILOS DE AUTENTICACIÓN ===== */
.auth-message {
  margin: 5px 0 !important;
  padding: 5px !important;
  border: 2px solid #d49b00 !important;
  border-radius: 12px !important;
  background: rgba(255, 248, 220, 0.95) !important;
  text-align: center !important;
}

.auth-message h4 {
  color: #d49b00 !important;
  margin-bottom: 5px !important;
  font-size: 18px !important;
  font-weight: bold !important;
}

.auth-message p {
  color: #8b4513 !important;
  margin-bottom: 5px !important;
  font-size: 10px !important;
}

.admin-info {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 5px !important;
  padding: 12px !important;
  background: rgba(34, 139, 34, 0.1) !important;
  border: 1px solid #228b22 !important;
  border-radius: 8px !important;
  color: #228b22 !important;
  font-weight: bold !important;
}

.admin-info .buttonSystem.small {
  min-width: auto !important;
  padding: 3px 5px !important;
  font-size: 10px !important;
}

.import-container {
  margin-top: 3px !important;
  padding: 3px !important;
  border: 2px solid #228b22 !important;
  border-radius: 12px !important;
  background: rgba(240, 255, 240, 0.95) !important;
}

/* ===== ESTILOS PARA VISTA PREVIA DE CAMBIOS ===== */
.preview-container {
  margin-top: 5px !important;
  padding: 5px !important;
  border: 2px solid #2980b9 !important;
  border-radius: 12px !important;
  background: rgba(240, 248, 255, 0.95) !important;
  margin-top: 5px !important;
  background: rgba(255,255,255,0.1) !important;
  border: 2px solid #d49b00 !important;
  border-radius: 12px !important;
  backdrop-filter: blur(5px) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

.preview-stats {
  margin-bottom: 10px !important;
  padding: 5px !important;
  background: rgba(52, 152, 219, 0.1) !important;
  border-radius: 6px !important;
  text-align: center !important;
  font-weight: bold !important;
  color: #2980b9 !important;
}

.preview-table-container {
  max-height: 250px !important;
  overflow-y: auto !important;
  border: 2px solid #d49b00 !important;
  border-radius: 8px !important;
  background: rgba(25, 88, 0, 0.1) !important;
}

.preview-table-container table {
  width: auto !important;
  border-collapse: collapse !important;
  font-size: 10px !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
}

.preview-table-container th {
  background: rgba(25, 88, 0, 0.9) !important;
  color: #d49b00 !important;
  padding: 8px 6px !important;
  text-align: center !important;
  font-weight: bold !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  border-bottom: 2px solid #d49b00 !important;
  text-shadow: 0 1px 2px #000 !important;
}

.preview-table-container td {
  padding: 4px !important;
  border-bottom: 1px solid rgba(212, 155, 0, 0.3) !important;
  vertical-align: middle !important;
  text-align: center !important;
  background: rgba(25, 88, 0, 0.05) !important;
  color: #333 !important;
  font-weight: 500 !important;
}

.preview-table-container tr:nth-child(even) td {
  background: rgba(25, 88, 0, 0.15) !important;
}

.preview-table-container tr:hover td {
  background: rgba(212, 155, 0, 0.2) !important;
  color: #000 !important;
}

.preview-table-container td strong {
  color: #195800 !important;
  font-weight: bold !important;
}

/* ===== BADGES PARA ESTADOS ===== */
.estado-badge {
  padding: 2px 10px !important;
  border-radius: 20px !important;
  font-size: 10px !important;
  font-weight: bold !important;
  text-transform: uppercase !important;
  color: white !important;
  display: inline-block !important;
  min-width: 80px !important;
  text-align: center !important;
}

.estado-badge.disponible {
  background: #27ae60 !important;
}

.estado-badge.vendido {
  background: #e74c3c !important;
}

.estado-badge.separado {
  background: #f39c12 !important;
}

.estado-badge.reservado {
  background: #3498db !important;
}

.estado-badge.bloqueado {
  background: #95a5a6 !important;
}

.estado-badge.sin_estado {
  background: #7f8c8d !important;
}

.badge-cambio {
  padding: 4px 8px !important;
  background: rgba(155, 89, 182, 0.1) !important;
  border: 1px solid #9b59b6 !important;
  border-radius: 4px !important;
  font-size: 11px !important;
  font-weight: bold !important;
  color: #8e44ad !important;
}

/* Sistema de pestañas usando barSystem */
.excel-tabs {
  margin: 15px 0 !important;
  justify-content: center !important;
  gap: 10px !important;
}

.excel-tabs .tab-button {
  min-width: 120px !important;
  font-size: 14px !important;
  font-weight: bold !important;
}

.excel-tabs .tab-button.active {
  background-color: #228B22 !important;
  border-color: #006400 !important;
  color: white !important;
}

.excel-tabs .tab-button.active img {
  filter: brightness(0) invert(1) !important;
}

/* Contenido de pestañas */
.tab-content {
  padding: 20px !important;
  margin: 10px 0 !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  border: 2px solid #228B22 !important;
}

.tab-content h3 {
  color: #035e00 !important;
  margin-top: 0 !important;
  margin-bottom: 10px !important;
  font-size: 16px !important;
  font-weight: bold !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  text-align: center !important;
  text-shadow: 0 1px 2px #000 !important;
}

/* Selector de etapa */
.etapa-selector {
  margin-bottom: 12px !important;
}

.etapa-selector label {
  display: block !important;
  margin-bottom: 5px !important;
  color: #fff !important;
  font-weight: bold !important;
  font-size: 14px !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  text-shadow: 0 1px 2px #000 !important;
}

.etapa-selector select {
  width: 100% !important;
  padding: 8px !important;
  border: 2px solid #d49b00 !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,0.9) !important;
  font-size: 14px !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  color: #333 !important;
}

.etapa-selector select:focus {
  outline: none !important;
  border-color: #d49b00 !important;
  box-shadow: 0 0 0 3px rgba(212, 155, 0, 0.2) !important;
}

/* Vista previa de etapa */
.etapa-preview {
  margin: 10px 0 !important;
  padding: 10px !important;
  background: rgba(255,255,255,0.1) !important;
  border: 2px solid #d49b00 !important;
  border-radius: 12px !important;
  backdrop-filter: blur(5px) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

.etapa-preview h4 {
  color: #d49b00 !important;
  margin-top: 0 !important;
  margin-bottom: 8px !important;
  font-size: 15px !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  text-align: center !important;
  font-weight: bold !important;
  text-shadow: 0 1px 2px #000 !important;
}

.info-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.info-grid div {
  background: rgba(25,88,0,0.8) !important;
  padding: 5px 8px !important;
  border-radius: 6px !important;
  border: 1px solid #d49b00 !important;
  font-size: 12px !important;
  color: #fff !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  text-shadow: 0 1px 2px #000 !important;
}

.info-grid strong {
  color: #d49b00 !important;
  font-weight: bold !important;
}

/* Contenedor de input de archivo */
.file-input-container {
  margin: 10px 0 !important;
  box-sizing: border-box !important;
}

.file-input-container label {
  display: block !important;
  margin-bottom: 8px !important;
  color: #fff !important;
  font-weight: bold !important;
  font-size: 14px !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  text-shadow: 0 1px 2px #000 !important;
}

.file-input-container input[type="file"] {
  width: 100% !important;
  max-width: 100% !important;
  padding: 12px !important;
  border: 2px dashed #d49b00 !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,0.9) !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  font-size: 14px !important;
  color: #333 !important;
  box-sizing: border-box !important;
}

.file-input-container input[type="file"]:disabled {
  border-color: #ccc !important;
  background: rgba(255,255,255,0.5) !important;
  color: #999 !important;
}

.file-input-container small {
  display: block !important;
  margin-top: 5px !important;
  color: #fff !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  font-size: 12px !important;
  text-shadow: 0 1px 2px #000 !important;
  font-style: italic !important;
}


.preview-container h4 {
  color: #fff !important;
  margin-top: 0 !important;
  
  font-size: 12px !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  text-align: center !important;
  font-weight: bold !important;
}

.preview-stats {
  margin-bottom: 15px !important;
  padding: 8px 12px !important;
  background: rgba(25,88,0,0.8) !important;
  border-radius: 6px !important;
  border: 1px solid #d49b00 !important;
  font-weight: bold !important;
  color: #fff !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  text-align: center !important;
  text-shadow: 0 1px 2px #000 !important;
}

/* Tabla de preview */
.preview-table-container {
  max-height: 250px !important;
  overflow: auto !important;
  margin-bottom: 5px !important;
  border: 1px solid #ddd !important;
  border-radius: 6px !important;
}

#tabla-preview {
  width: 100% !important;
  border-collapse: collapse !important;
  background: white !important;
  font-size: 12px !important;
}

#tabla-preview th {
  background: #228B22 !important;
  color: white !important;
  padding: 8px !important;
  text-align: left !important;
  font-weight: bold !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
}

#tabla-preview td {
  padding: 6px 8px !important;
  border-bottom: 1px solid #eee !important;
  vertical-align: top !important;
}

#tabla-preview tr:nth-child(even) {
  background: rgba(34, 139, 34, 0.05) !important;
}

#tabla-preview tr:hover {
  background: rgba(34, 139, 34, 0.1) !important;
}

/* Ajustes responsive para el modal Excel */
@media (max-width: 768px) {
  .excel-modal-large {
    width: 95% !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
    margin: 0 auto !important;
  }
  
  .excel-tabs {
    flex-direction: column !important;
    gap: 5px !important;
  }
  
  .excel-tabs .tab-button {
    min-width: auto !important;
    width: 100% !important;
  }
  
  .info-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Ajustes específicos para el selector de etapa en móviles */
  .etapa-selector {
    margin-bottom: 10px !important;
  }
  
  .etapa-selector select {
    width: calc(100% - 4px) !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 12px !important;
    padding: 6px !important;
  }
  
  /* Asegurar que el contenido del modal no se desborde */
  .windowSystem {
    padding: 15px !important;
    box-sizing: border-box !important;
  }
  
  .tab-content {
    padding: 10px !important;
    box-sizing: border-box !important;
  }
}

/* Ajustes adicionales para dispositivos móviles muy pequeños */
@media (max-width: 480px) {
  .excel-modal-large {
    width: 98% !important;
    max-width: 98vw !important;
    margin: 1% auto !important;
  }
  
  .windowSystem {
    padding: 12px !important;
  }
  
  .etapa-selector select {
    width: calc(100% - 2px) !important;
    font-size: 11px !important;
    padding: 5px !important;
  }
  
  .tab-content h3 {
    font-size: 14px !important;
  }
  
  .etapa-preview h4 {
    font-size: 13px !important;
  }
  
  .info-grid div {
    font-size: 11px !important;
    padding: 4px 6px !important;
  }
  
  /* Ajustes para input de archivo en móviles */
  .file-input-container input[type="file"] {
    padding: 8px !important;
    font-size: 12px !important;
  }
}


#panel-atributos {
  background: rgba(180, 255, 194, 0.9) !important;
  border: 1px solid #dea700 !important;
  border-radius: 6px !important;
  padding: 5px !important;
  
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  margin-bottom: 2px !important;
}

/* Estilos para opciones de exportación */
.export-options {
  margin: 10px;
  padding: 5px;
  border: 1px solid rgba(212, 155, 0, 0.3);
  border-radius: 8px;
  gap: 5px;
  background: rgba(0, 0, 0, 0.1);
  align-content: center;
  align-items: center;
}

.export-type {
  margin-bottom: 10px;
}

.export-type label {
  display: flex;
  align-items: center;
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
}

.estado-selector {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  border-left: 3px solid rgba(212, 155, 0, 0.8);
}

.estado-selector label {
  display: block;
  color: #fff;
  font-size: 11px;
  margin-bottom: 5px;
  margin-left: 10px;
  font-weight: bold;
}

.estado-selector select {
  width: 100%;
  padding: 5px;
  border: 1px solid rgba(212, 155, 0, 0.5);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 11px;
}

/* ================= ESTILOS RESPONSIVOS PARA DASHBOARD ELÉCTRICO ================= */
/* Mejoras específicas para el dashboard en dispositivos móviles */

#dashboard-electrico {
  /* Asegurar centrado perfecto en móviles */
  position: fixed !important;
  top: 50px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 50vw !important;
  max-width: 50% !important;
  height: 85vh !important;
  max-height: 85% !important;
  overflow-y: auto !important;
}

/* Responsividad específica para móviles */
@media (max-width: 768px) {
  #dashboard-electrico {
    top: 10px !important;
    width: 98vw !important;
    height: 95vh !important;
    max-height: 95% !important;
  }
  
  /* Ajustar padding del contenido principal en móviles */
  #dashboard-electrico > div:last-child {
    padding: 15px 10px !important;
  }
  
  /* Hacer la estructura responsiva - Layout vertical en móviles */
  #dashboard-electrico .grid-principal {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto !important;
    gap: 15px !important;
    align-items: start !important;
  }
  
  /* Gráfico central en móviles */
  #dashboard-electrico .grafico-central {
    order: 1 !important;
    justify-self: center !important;
  }
  
  /* Columnas laterales apiladas en móviles */
  #dashboard-electrico .columna-izquierda,
  #dashboard-electrico .columna-derecha {
    order: 2 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  
  /* Mejorar grids en móviles - forzar una sola columna */
  #dashboard-electrico .grid-resumen {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
  }
  
  /* Mejorar tarjetas de elementos en móviles */
  #dashboard-electrico .grid-elementos {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  
  /* Reducir tamaño de fuentes en móviles */
  #dashboard-electrico h3 {
    font-size: 14px !important;
  }
  
  #dashboard-electrico h4 {
    font-size: 12px !important;
  }
  
  #dashboard-electrico .avance-numero {
    font-size: 24px !important;
  }
  
  /* Ajustar canvas del gráfico en móviles */
  #dashboard-electrico #chart-general {
    width: 200px !important;
    height: 200px !important;
  }
  
  /* Mejorar botones de tabs en móviles */
  #dashboard-electrico .tab-btn {
    font-size: 11px !important;
    padding: 8px 12px !important;
    margin: 2px !important;
  }
}

/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
  #dashboard-electrico {
    top: 5px !important;
    width: 99vw !important;
    height: 98vh !important;
  }
  
  #dashboard-electrico > div:last-child {
    padding: 10px 8px !important;
  }
  
  #dashboard-electrico h3 {
    font-size: 12px !important;
    margin: 0 0 5px 0 !important;
  }
  
  #dashboard-electrico .avance-numero {
    font-size: 20px !important;
  }
  
  #dashboard-electrico .tab-btn {
    font-size: 10px !important;
    padding: 6px 8px !important;
  }
  
  /* Mejorar botón de cerrar en móviles muy pequeños */
  #dashboard-electrico button[onclick*="cerrarDashboardElectrico"] {
    top: 5px !important;
    right: 5px !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 16px !important;
  }
}

/* Mejorar botón de cerrar dashboard en todas las pantallas móviles */
@media (max-width: 768px) {
  #dashboard-electrico button[onclick*="cerrarDashboardElectrico"] {
    top: 8px !important;
    right: 8px !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 18px !important;
    z-index: 10001 !important;
  }
}

/* Estilos para la nueva estructura con pestañas */
#dashboard-electrico {
  /* Asegurar que el dashboard tenga el tamaño correcto */
  max-width: 1200px;
}

/* Grid de categorías principales */
#dashboard-electrico > div:last-child > div:nth-child(2) {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

/* Contenedor de pestañas */
#tabs-container {
  transition: all 0.3s ease;
}

#tabs-container h3 {
  font-size: 20px;
  margin: 0 0 20px 0;
  text-align: left;
}

/* Responsive para la nueva estructura */
@media (max-width: 768px) {
  #dashboard-electrico {
    width: 98vw !important;
    max-width: 98vw !important;
    height: auto !important;
    max-height: 90vh !important;
    top: 5vh !important;
  }

  /* Grid de categorías en móviles */
  #dashboard-electrico > div:last-child > div:nth-child(2) {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Gráfico circular más pequeño en móviles */
  #chart-general {
    width: 250px !important;
    height: 250px !important;
  }

  /* Contenedor de pestañas en móviles */
  #tabs-container {
    margin-top: 15px !important;
    padding: 15px !important;
  }

  #tabs-container h3 {
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  /* Gráfico aún más pequeño en pantallas muy pequeñas */
  #chart-general {
    width: 200px !important;
    height: 200px !important;
  }

  /* Texto de avance general */
  #avance-general-texto {
    font-size: 18px !important;
  }

  /* Categorías principales en móviles pequeños */
  #dashboard-electrico > div:last-child > div:nth-child(2) h4 {
    font-size: 14px !important;
  }

  #dashboard-electrico > div:last-child > div:nth-child(2) p {
    font-size: 12px !important;
  }
}

/* ===== ESTILOS PARA DASHBOARD DE AGUA ===== */

/* Botón de configuración de agua */
.config-agua-btn {
  position: relative;
  transition: all 0.3s ease;
}

/* Estado para agua cruda */
.config-agua-btn.agua-cruda {
  background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
  border: 2px solid #A0522D;
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}

.config-agua-btn.agua-cruda:hover {
  background: linear-gradient(135deg, #A0522D 0%, #CD853F 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
}

/* Estado para agua tratada */
.config-agua-btn.agua-tratada {
  background: linear-gradient(135deg, #1E88E5 0%, #42A5F5 100%);
  border: 2px solid #1976D2;
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

.config-agua-btn.agua-tratada:hover {
  background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
}

/* Indicador de tipo de agua en el dashboard */
.tipo-agua-indicator {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 10px;
}

.tipo-agua-indicator.agua-cruda {
  background: linear-gradient(135deg, #8B4513, #D2691E);
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.tipo-agua-indicator.agua-tratada {
  background: linear-gradient(135deg, #1E88E5, #42A5F5);
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Efecto de pulso para botón de configuración activo */
.config-agua-btn::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: inherit;
  background: inherit;
  z-index: -1;
  opacity: 0;
  animation: pulseConfig 2s ease-in-out infinite;
}

@keyframes pulseConfig {
  0%, 100% {
    opacity: 0;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.05);
  }
}