* {
  box-sizing: border-box;
}

html,
body {
  font-family: "Poppins", "Open Sans", sans-serif;
  color: #4f5f6f;
}

.almacen {
  cursor: pointer;
}

#productos {
  padding-top: 0px;
}

.handle-counter {
  overflow: hidden;
}

.handle-counter .counter-minus,
.handle-counter .counter-plus,
.handle-counter input {
  float: left;
  text-align: center;
}

.handle-counter .counter-minus,
.handle-counter .counter-plus {
  text-align: center;
}

.handle-counter input {
  width: 50px;
  border-width: 1px;
  border-left: none;
  border-right: none;
}

.btn {
  padding: 6px 12px;
  border: 1px solid transparent;
  /*color: #fff;*/
}

.header__content-start .btn,
.header__content-end .btn {
  color: inherit;
}

.btn:disabled,
.btn:disabled:hover {
  background-color: darkgrey;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #009dda;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #0486b9;
}

#contador {
  padding-left: 10%;
  padding-top: 6%;
}

#contador_ok {
  padding-top: 5%;
}

.card-mt {
  margin-top: 1rem;
}

.btn-border {
  border: 1px solid #888f96;
}

.hidden {
  display: none;
}

.fecha {
  border-radius: 0.25rem;
  border: 1px solid #ced4da;
}

.apexcharts-tooltip,
.apexcharts-tooltip.active,
.apexcharts-xaxistooltip,
.apexcharts-xaxistooltip.active,
.apexcharts-active {
  transition: none;
}

.card-block {
  padding: 20px;
  padding-bottom: 20px;
}

.row-sm {
  margin-left: -10px;
  margin-right: -10px;
}

.stats .stat-col {
  margin-bottom: 20px;
  float: left;
  white-space: nowrap;
  overflow: hidden;
}

.stats .stat-icon {
  color: #bdbdbd;
  display: inline-block;
  font-size: 26px;
  text-align: center;
  vertical-align: middle;
  width: 50px;
}

.stat {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  margin-right: 10px;
}

.stats .stat {
  vertical-align: middle; /*{*/
  @media (min-width: 1200px) {
    .stats .stat .value {
      font-size: 1.3vw;
    }
  }
  @media (min-width: 1200px) {
    .stats .stat .name {
      font-size: 0.9vw;
    }
  }
}

.stat .value {
  font-size: 20px;
  line-height: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.stat .name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats .stat-progress {
  height: 2px;
  margin: 5px 0;
  color: #85ce36;
  background-color: #dddddd;
}

.progress {
  display: -ms-flexbox;
  display: flex;
  height: 1rem;
  overflow: hidden;
  font-size: 0.75rem;
  background-color: #e9ecef;
  border-radius: 0.25rem;
}

.stats .stat-progress .progress-bar {
  background-color: #85ce36;
}

#map {
  height: 400px;
}

.marker-pin {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  background: #1b80f3;
  position: absolute;
  transform: rotate(-45deg);
  left: 50%;
  top: 50%;
  margin: -15px 0 0 -15px;
}

.marker-pin::after {
  content: "";
  width: 24px;
  height: 24px;
  margin: 3px 0 0 3px;
  background: #fff;
  position: absolute;
  border-radius: 50%;
}

.marker-pinEB {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  background: #1b80f3;
  position: absolute;
  transform: rotate(-45deg);
  left: 50%;
  top: 40%;
  margin: -15px 0 0 -15px;
  font-size: 42px;
}

.marker-pinEB::after {
  content: "";
  width: 24px;
  height: 24px;
  margin: 3px 0 0 3px;
  background: #fff;
  position: absolute;
  border-radius: 50%;
}

.marker-pinHidrante {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  background: #1b80f3;
  position: absolute;
  transform: rotate(-45deg);
  left: 50%;
  top: 40%;
  margin: -15px 0 0 -15px;
  font-size: 42px;
}

.marker-pinHidrante::after {
  content: "";
  width: 24px;
  height: 24px;
  margin: 3px 0 0 3px;
  background: #fff;
  position: absolute;
  border-radius: 50%;
}

.label-pinHidrante {
  font-family: "Serif";
  font-style: normal;
}

.marker-circleHidrante {
  background-color: #eeff00;
  border-color: #2f4f4f;
  border-radius: 3px;
  border-style: solid;
  border-width: 1px;
  width: 5px;
  height: 5px;
}

.custom-div-icon i {
  position: absolute;
  width: 22px;
  font-size: 12px;
  font-weight: bold;
  left: 0;
  right: 0;
  margin: 10px auto;
  text-align: center;
}

.custom-div-icon i.awesome {
  margin: 12px auto;
  font-size: 17px;
}

.labelstyleSector {
  color: green;
  font-size: 14px;
  font-weight: 700;
  background-color: none;
  border-color: none;
  background: none;
  border: none;
}

.polygon-labels {
  background-color: transparent;
  font-weight: bold;
  color: #000000;
  border: transparent;
  box-shadow: none;
  font-size: 16px;
}

.tableCampoRow {
  color: blue;
}

.tableSistemaRow {
  background-color: #009dda;
}

.modo-invierno:hover {
  opacity: 0.7;
  cursor: pointer;
  color: blue;
  transform: scale(1.5);
  transition-property: transform color;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

.modo-verano:hover {
  opacity: 0.7;
  cursor: pointer;
  color: yellow;
  transform: scale(1.5);
  transition-property: transform color;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

.tarjeta-conectada:hover {
  opacity: 0.7;
  cursor: pointer;
  color: blue;
}

.tarjeta-desconectada:hover {
  opacity: 0.7;
  cursor: pointer;
  color: black;
}

.regante-activo:hover {
  opacity: 0.7;
  cursor: pointer;
  color: blue;
}

.regante-no_activo:hover {
  opacity: 0.7;
  cursor: pointer;
  color: black;
}

.valvulas-Lista {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.vr1 {
  display: inline-block;
  align-self: stretch;
  width: 1px;
  min-height: 1em;
  background-color: currentColor;
  opacity: 0.25;
  background-color: rgba(0, 0, 0, 0.07);
  opacity: 1;
}

.fs5 {
  font-size: 0.9375rem !important;
}

.label-blue {
  color: blue;
  font-weight: bold;
}

#hora_riego,
#fechas_riego,
#duracion_riego {
  font-size: 20px;
}

.container1 {
  position: relative;
  display: flex;
}
.dropdown1 {
  display: none;
  position: absolute;
  background-color: white;
  border: 1px solid #ccc;
  padding: 5px;
  z-index: 1;
  width: 50%;
  top: 100%; /* Posiciona el desplegable debajo del cuadro de entrada */
  left: 0; /* Alinea el desplegable a la izquierda del cuadro de entrada */
  margin-top: 5px; /* Añade un margen superior para separarlo del cuadro de entrada */
}
.dropdown1 button {
  display: inline-block;
  text-align: center;
  width: 20%;
  margin: 2px;
  cursor: pointer;
}

.container2,
.container3 {
  position: relative;
  display: inline-block;
}

.dropdown_inicio {
  display: none;
  position: absolute;
  background-color: white;
  border: 1px solid #ccc;
  padding: 5px;
  z-index: 1;
  width: 50%; /* Aumenta el ancho para acomodar ambas secciones */
  top: 100%;
  left: 0;
  margin-top: 5px;
}

.dropdown_cambio_duracion {
  /*display: block;*/
  display: flex;
  background-color: white;
  border: 1px solid #ccc;
  padding: 5px;
  z-index: 1;
  width: 50%; /* Aumenta el ancho para acomodar ambas secciones */
  top: 100%;
  left: 0;
  margin-top: 5px;
}

.dropdown-section {
  display: inline-block;
  vertical-align: top;
}
.dropdown-divider {
  display: inline-block;
  height: 95%;
  width: 1px;
  background-color: #ccc;
}
.dropdown_inicio2 button {
  display: inline-block;
  text-align: center;
  width: 20%;
  margin: 2px 5px;
  cursor: pointer;
}

.selected {
  background-color: #a3d2ff; /* Elige el color que prefieras */
}

#dropdown_inicio {
  display: none;
  position: absolute;
  background-color: white;
  border: 1px solid #ccc;
  z-index: 10;
  flex-direction: row;
  padding: 5px;
}

#section-1,
#section-1-duracion,
#section-1-cambio-duracion {
  display: flex;
  flex-wrap: wrap;
  width: calc(66.333% - 10px);
}

#section-1 button,
#section-1-duracion button,
#section-1-cambio-duracion button {
  width: 20%;
}

#section-2 button,
#section-2-duracion button #section-2-cambio-duracion button {
  width: 50%;
}

#section-2,
#section-2-duracion,
#section-2-cambio-duracion {
  display: flex;
  flex-direction: column;
  width: calc(33.333% - 10px);
}

#section-1 button,
#section-2 button,
#section-1-duracion button,
#section-2-duracion button,
#section-1-cambio-duracion button,
#section-2-cambio-duracion button {
  font-size: 16px;
  padding: 5px;

  cursor: pointer;
  margin-bottom: 2px;
  outline: none;
}

.no-visible {
  visibility: hidden;
}

.sector_programado {
  width: 10%;
  background-color: #e1f5fb;
  min-width: 200px;
}

.solapado {
  font-size: 2em;
  vertical-align: middle;
  color: red;
}

.riegoPendiente {
  font-size: 1.5em;
  vertical-align: middle;
  color: #96d837;
}

/* CALENDARIO */
:root {
  --fc-border-color: black;
  --fc-daygrid-event-dot-width: 5px;
}

.fc table {
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 1em;
}

.fc-event {
  background-color: #d8d8d8;
}

.fc-event-main {
  cursor: move;
}

.striped {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1.5em 1.5em;
}

.sector_programado small {
  font-size: 0.75rem;
}

/* Modal legacy (no Bootstrap): usado en templates/sondas/sondas.html.
   Importante: NO aplicar a Bootstrap `.modal` (rompe layout y tooltips). */
.modal-overlay {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-overlay .modal {
  background-color: white;
  padding: 20px;
  border-radius: 5px;
}

.modal-overlay .modal h2 {
  margin-top: 0;
}

.sector-programado,
.icono_cambiar_tiempo,
.finca-catastral-select {
  cursor: pointer;
  position: relative;
  font-size: 15px;
}

.icono_cambiar_tiempo:hover {
  color: #2ecc71;
  transform: scale(1.2);
}

.sector-programado:hover,
.finca-catastral-select:hover {
  color: #ff4136;
  transform: scale(1.2);
}

.check-box-riegos {
  font-size: 20px;
  border: 0px;
}

.radio-duracion-riego {
  border: 1px solid rgba(158, 162, 168, 0.3);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  display: flex;
  align-items: center;
  font-size: 25px;
}

#tipo-duracion-riego {
  z-index: 0;
}

.huella {
  margin-left: 10px;
  margin-top: 5px;
}

.icono-eliminar-riego, .icono-eliminar-parcela, .icono-eliminar-comunero,
.icono-editar-riego, .icono-editar-parcela, .icono-editar-comunero,
.icono-rehusar-riego, .icono-rehusar-riego , .icono-rehusar-comunero{
  margin-right: 10px; /* Ajustar el espacio entre los iconos */
  transition: color 0.3s, transform 0.3s;
}

.icono-rehusar-riego:hover, .icono-rehusar-parcela:hover, .icono-rehusar-comunero:hover {
  color: green; /* Cambiar el color al pasar el mouse por encima */
  transform: scale(1.4); /* Aumentar el tamaño al pasar el mouse por encima */
  cursor: pointer; /* Cambiar el cursor al pasar el mouse por encima */
}

.icono-eliminar-riego:hover, .icono-eliminar-parcela:hover, .icono-eliminar-comunero:hover {
  color: red; /* Cambiar el color al pasar el mouse por encima */
  transform: scale(1.4); /* Aumentar el tamaño al pasar el mouse por encima */
  cursor: pointer; /* Cambiar el cursor al pasar el mouse por encima */
}

.icono-editar-riego:hover,.icono-editar-parcela:hover, .icono-editar-comunero:hover {
  color: blue; /* Cambiar el color al pasar el mouse por encima */
  transform: scale(1.4); /* Aumentar el tamaño al pasar el mouse por encima */
  cursor: pointer; /* Cambiar el cursor al pasar el mouse por encima */
}

.table.dataTable {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 15px;
}

/* Cambiar el color de fondo de los títulos del DataTable */
.subprogramas thead th {
  background-color: rgba(
    255,
    255,
    0,
    0.4
  ); /* Color de fondo deseado para los títulos */
}

/* Cambiar el color de fondo de las filas alternas del DataTable */
.subprogramas tbody tr:nth-child(even) {
  background-color: rgba(
    255,
    255,
    0,
    0.2
  ); /* Color de fondo deseado para las filas pares */
}

/* Cambiar el color de fondo de las filas impares del DataTable */
.subprogramas tbody tr:nth-child(odd) {
  background-color: rgba(
    255,
    255,
    0,
    0.2
  ); /* Color de fondo deseado para las filas impares */
}

.mostrar-fases {
  background-color: rgba(255, 255, 0, 0.2);
}

#flash-alert {
  transition: opacity 2s;
  opacity: 1;
}

#flash-alert.hide {
  opacity: 0;
}

table.dataTable tbody tr.fila-seleccionada {
  background-color: rgba(
    60,
    166,
    54,
    0.2
  ) !important; /* Color de fondo deseado */
}

table.dataTable tbody tr.finca-usada {
  background-color: rgba(
    255,
    255,
    0,
    0.2
  ) !important; /* Color de fondo deseado */
}

table.dataTable tbody tr.fila-roja {
  background-color: #ffbdbd;
  color: #8b0000; /* color de texto blanco */
}

input[type="checkbox"].fallo-active:checked {
  accent-color: red !important;
  color: #ffffff !important;
}

input[type="checkbox"].fallo-active:checked:disabled {
  accent-color: red !important;
  color: #ffffff !important;
}

input[type="checkbox"].fallo-active:after {
  box-shadow: none !important;
}

input[type="checkbox"].editor-active:checked {
  accent-color: green !important;
  color: #ffffff !important;
}

input[type="checkbox"].editor-active:after {
  box-shadow: none !important;
}

#chart-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

#chart-container > div {
  flex: 1 1 48%; /* Esto hará que los gráficos ocupen aproximadamente el 48% del contenedor, dejando un 4% de espacio entre ellos */
  box-sizing: border-box;
  margin-bottom: 10px; /* Espacio entre las filas */
}

@media (max-width: 768px) {
  #chart-container > div {
    flex: 1 1 100%; /* En pantallas pequeñas, los gráficos ocuparán el 100% del ancho del contenedor */
  }
}

.chart-container {
  position: relative;
}
.fullscreen-button {
  position: absolute;
  top: -2px;
  right: 135px;
  background: rgba(237, 241, 246, 0.7);
  border: none;
  padding: 5px;
  border-radius: 50%;
  color: #6e8192;
  cursor: pointer;
  z-index: 1000;
}
.fullscreen-button i {
  font-size: 20px;
}

.valor-actualizado {
  color: green;
  transition: color 0.5s ease;
}

.title-actualizado {
  color: green; /* O el color que prefieras */
  transition: color 0.5s ease;
}

.hidden {
  display: none !important;
}

.form-check-input {
  cursor: pointer;
}

/* Ensure header dropdown stays above NDVI map controls */
.header .dropdown-menu,
.header__content-end .dropdown-menu {
  z-index: 10050;
}

/* NDVI page: keep header above map overlays/controls */
.ndvi-page .header,
.ndvi-page.hd--sticky .header {
  z-index: 8000;
}
.ndvi-page .header .dropdown-menu {
  z-index: 10050;
}

/* Mini-nav tooltips in collapsed sidebar: keep above content and avoid clipping */
.mn--min #mainnav-container,
.mn--min #mainnav-container .mainnav__inner,
.mn--min #mainnav-container .mainnav__top-content {
  overflow: visible !important;
}
.mn--min #mainnav-container .mininav-content {
  z-index: 99999 !important;
}
.mn--min #mainnav-container .mininav-content.show {
  z-index: 99999 !important;
}
.mn--min #mainnav-container,
.mn--min .mainnav {
  position: relative;
  z-index: 9000;
}

/* Keep the left navigation pinned while the page content scrolls */
@media (min-width: 992px) {
  .root.mn--sticky #mainnav-container.mainnav {
    position: sticky;
    top: 3.125rem;
    align-self: start;
    height: calc(100vh - 3.125rem);
  }

  .root.mn--sticky #mainnav-container.mainnav .mainnav__inner {
    position: static !important;
    top: auto !important;
    height: 100% !important;
    min-height: 100% !important;
  }
}

.fv-chart-tip,
.fv-sync-tip {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 8px;
  box-shadow: none !important;
  padding: 6px 8px;
  transform: translate(-50%, -100%);
  pointer-events: none;
  backdrop-filter: none !important;
  display: inline-block;
  width: max-content;
  max-width: 220px;
  line-height: 1.25;
  text-shadow: none;
}

.fv-sync-tip .v {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.fv-sync-tip .d {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.7);
}

.fv-sync-tip-compact .v,
.fv-sync-tip-compact .d {
  font-size: 12px;
}

/* NDVI: make Apex tooltips transparent so they don't block the chart */
.ndvi-page .apexcharts-tooltip,
.ndvi-page .apexcharts-tooltip.apexcharts-theme-light,
.ndvi-page .apexcharts-tooltip.apexcharts-theme-dark {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
}

.ndvi-page .apexcharts-tooltip .apexcharts-tooltip-title {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.ndvi-page .apexcharts-tooltip * {
  box-shadow: none !important;
  filter: none !important;
}

.ndvi-page .apexcharts-tooltip:before,
.ndvi-page .apexcharts-tooltip:after {
  display: none !important;
}

/* Parcel sensors tiles */
.sensor-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

/* =========================
   Sondas (panel listado + detalle)
   ========================= */
.left-card-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.left-card-tabs {
    display: inline-flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 0;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}
.left-card-tabs .left-tab {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-bottom: none;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    padding: 7px 14px;
    border-radius: 12px 12px 6px 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    top: 1px;
}
.left-card-tabs .left-tab.active {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.18);
    font-weight: 700;
    box-shadow: 0 -6px 14px rgba(15, 23, 42, 0.08);
}
.left-card-title-text {
    font-size: 12px;
    color: #6b7280;
}
.sondas-panel {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
}
.sondas-panel-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sondas-search {
    display: flex;
    gap: 6px;
    align-items: center;
    background: #f9fafb;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    padding: 8px 10px;
}
.sondas-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 13px;
    color: #111827;
}
.sondas-filters {
    display: flex;
    gap: 0.25rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.sondas-filters::-webkit-scrollbar {
    height: 6px;
}
.sondas-filters::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 999px;
}
.sondas-chip {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.sondas-chip .ico {
    font-size: 14px;
    line-height: 1;
    transition: transform 0.12s;
}
.sondas-chip .txt {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.25s ease, opacity 0.2s ease;
}
.sondas-chip:hover .txt,
.sondas-chip:focus-visible .txt,
.sondas-chip.active .txt {
    max-width: 140px;
    opacity: 1;
    margin-left: 0.25rem;
}
.sondas-chip.active {
    background: #eef2f7;
    border-color: #d4d8df;
}
.sondas-chip:hover,
.sondas-chip.active {
    background: #eef2f7;
}
.sondas-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
    border-color: #0ea5e9;
}
.sondas-empty-state,
.parcel-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
    padding: 18px 12px;
}
.sondas-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: none;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}
.sondas-card {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.12s ease, border-color 0.15s ease;
}
.sondas-card:hover {
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}
.sondas-card.active {
    border-color: rgba(13, 110, 253, 0.45);
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.15);
}
.sondas-card-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    flex: 1 1 auto;
}
.sondas-card-right {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 96px;
    width: 96px;
}
.sondas-mini-chart {
    width: 96px;
    height: 60px;
}
.sondas-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.sondas-card-title {
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sondas-card-sub {
    font-size: 12px;
    color: #6b7280;
}
.sondas-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #374151;
    flex-wrap: wrap;
}
.camera-card-compact {
    padding: 7px 10px;
    gap: 8px;
    border-radius: 10px;
}
.camera-card-compact.is-map-hover {
    background: #eef6ff;
    border-color: #8bbef7;
    box-shadow: inset 0 0 0 1px rgba(59,130,246,.22);
}
.camera-card-compact .sondas-card-main {
    gap: 4px;
}
.camera-card-compact .mb-2 {
    margin-bottom: 4px !important;
}
.camera-card-thumb {
    width: 96px;
    height: 46px;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid #e5e7eb;
    flex: 0 0 96px;
}
.camera-card-alias {
    max-width: 185px;
    vertical-align: bottom;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
}
.camera-card-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.camera-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border: 0;
    background: transparent;
    border-radius: 0;
    font-size: 13px;
    line-height: 1;
    padding: 0;
}
.camera-icon-badge.is-online {
    color: #166534;
}
.camera-icon-badge.is-offline {
    color: #334155;
}
.camera-icon-badge.has-pos {
    color: #1d4ed8;
}
.camera-icon-badge.no-pos {
    color: #b91c1c;
}
.camera-no-pos-icon {
    position: relative;
    display: inline-block;
    width: 13px;
    height: 13px;
}
.camera-no-pos-icon .fa-map-marker-alt {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 13px;
}
.camera-no-pos-icon .fa-ban {
    position: absolute;
    right: -4px;
    bottom: -3px;
    font-size: 9px;
}
.camera-group-count {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 1px 6px;
}
.sondas-humidity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0d6efd;
    font-weight: 600;
}
.sondas-humidity svg {
    width: 14px;
    height: 14px;
}
.sondas-time-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
    line-height: 1.2;
}
.sondas-time-chip svg {
    width: 12px;
    height: 12px;
}
.sondas-time-chip.chip-fresh {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}
.sondas-time-chip.chip-stale {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}
.sondas-time-chip.chip-dead {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}
.sondas-time-chip.chip-unknown {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}
.sondas-time {
    color: #6b7280;
    font-size: 11px;
}
.sondas-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
}
.sondas-badge.ok {
    background: #dcfce7;
    color: #166534;
    border-color: rgba(22, 101, 52, 0.2);
}
.sondas-badge.warn {
    background: #fef3c7;
    color: #92400e;
    border-color: rgba(146, 64, 14, 0.2);
}
.sondas-badge.alert {
    background: #fde68a;
    color: #92400e;
    border-color: rgba(146, 64, 14, 0.25);
}
.sondas-badge.bad {
    background: #fee2e2;
    color: #991b1b;
    border-color: rgba(153, 27, 27, 0.2);
}
.sondas-state-dot {
    display: inline-flex;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    color: transparent;
    font-size: 0;
    line-height: 1;
    padding: 0;
}
.sondas-state-dot.ok {
    background: #22c55e;
}
.sondas-state-dot.warn {
    background: #f59e0b;
}
.sondas-state-dot.bad {
    background: #ef4444;
}
.sondas-state-dot.chip-fresh {
    background: #22c55e;
}
.sondas-state-dot.chip-stale {
    background: #f59e0b;
}
.sondas-state-dot.chip-dead {
    background: #ef4444;
}
.sondas-state-dot.chip-unknown {
    background: #9ca3af;
}

.marker,
.sonda-marker {
    background: #fff;
    border: 1px solid var(--card-border, rgba(0,0,0,0.08));
    color: var(--text, #111827);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.1s ease, border-color 0.1s ease,
        box-shadow 0.3s ease;
    white-space: nowrap;
}
.marker.highlight,
.sonda-marker.highlight {
    transform: scale(1.08);
    border-color: #0d6efd;
}
.marker.pulse-fresh,
.sonda-marker.pulse-fresh {
    box-shadow: 0 0 8px 2px rgba(3, 105, 161, 0.4);
    animation: sondaPulseFresh 2s infinite;
}
.marker.pulse-stale,
.sonda-marker.pulse-stale {
    box-shadow: 0 0 8px 2px rgba(217, 119, 6, 0.4);
    animation: sondaPulseStale 2s infinite;
}
.marker.pulse-dead,
.sonda-marker.pulse-dead {
    box-shadow: 0 0 8px 2px rgba(220, 38, 38, 0.4);
    animation: sondaPulseDead 2s infinite;
}
@keyframes sondaPulseFresh {
    0%,
    100% {
        box-shadow: 0 0 8px 2px rgba(3, 105, 161, 0.4);
    }
    50% {
        box-shadow: 0 0 14px 4px rgba(3, 105, 161, 0.6);
    }
}
@keyframes sondaPulseStale {
    0%,
    100% {
        box-shadow: 0 0 8px 2px rgba(217, 119, 6, 0.4);
    }
    50% {
        box-shadow: 0 0 14px 4px rgba(217, 119, 6, 0.6);
    }
}
@keyframes sondaPulseDead {
    0%,
    100% {
        box-shadow: 0 0 8px 2px rgba(220, 38, 38, 0.4);
    }
    50% {
        box-shadow: 0 0 14px 4px rgba(220, 38, 38, 0.6);
    }
}

.sondas-offcanvas {
    width: 380px;
}
.sondas-offcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--card-border);
}
.details-header .title-3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.details-header .subtle {
    font-size: 12px;
    color: var(--muted);
}
.dot-estado {
    font-size: 18px;
    line-height: 1;
}
.hdr-left {
    display: flex;
    gap: 10px;
    align-items: center;
}
.hdr-actions {
    display: flex;
    gap: 6px;
}
.btn-ghost {
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
}
.btn-ghost:hover {
    background: var(--panel-2);
}
a.btn-ghost {
    text-decoration: none;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
a.btn-ghost:hover {
    background: var(--panel-2);
    text-decoration: none;
    color: var(--text);
}
.details-body {
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}
.badges-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.badge-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--card-border);
    background: #f3f4f6;
    color: var(--text);
}
.badge-info {
    background: #e0f2fe;
    color: #0369a1;
    border-color: rgba(3, 105, 161, 0.2);
}
.tags-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.tags-row .badge {
    background: #eef2ff;
}
.metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.metric {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px;
}
.metric-label {
    font-size: 12px;
    color: var(--muted);
}
.metric-value {
    font-size: 18px;
    font-weight: 600;
}
.chart-card,
.list-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px;
}
.chart-title,
.list-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}
.range-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.range-btn {
    border: 1px solid var(--card-border);
    background: #fff;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
}
.range-btn.active {
    background: #e0f2fe;
    color: #0369a1;
    border-color: rgba(3, 105, 161, 0.2);
}
.values-list {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.values-list li {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border: 1px dashed var(--card-border);
    border-radius: 8px;
    padding: 6px 8px;
}
.state-ok {
    color: var(--ok);
}
.state-warn {
    color: var(--warn);
}
.state-bad {
    color: var(--bad);
}
.chip-fresh {
    background: #e0f2fe;
    color: #0369a1;
    border-color: rgba(3, 105, 161, 0.25);
}
.chip-stale {
    background: rgba(217, 119, 6, 0.12);
    color: var(--warn);
    border-color: rgba(217, 119, 6, 0.35);
}
.chip-dead {
    background: rgba(220, 38, 38, 0.12);
    color: var(--bad);
    border-color: rgba(220, 38, 38, 0.35);
}
#detailsChartBrush {
    border-top: 1px dashed var(--card-border);
    padding-top: 6px;
}
.sensor-tile--assigned {
  background: #f3f4f6;
  border-color: #e5e7eb;
  opacity: 0.7;
}
.sensor-tile__body {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sensor-tile__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef2ff;
  display: grid;
  place-items: center;
}
.sensor-tile__icon img {
  width: 20px;
  height: 20px;
}
.sensor-tile__title {
  font-size: 13px;
  font-weight: 600;
}
.sensor-tile__status {
  font-size: 12px;
  color: #6b7280;
}
.sensor-tile__actions {
  display: flex;
  gap: 8px;
}
.sensor-tile__actions .btn-xs {
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.2;
}

.sensor-marker {
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.35));
  color: #1d4ed8;
}
.sensor-marker--muted {
  color: #9ca3af;
  filter: grayscale(1) opacity(0.8);
}
.sensor-marker svg {
  width: 44px;
  height: 56px;
  display: block;
}

.sensor-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.sensor-tiles-grid .sensor-tile {
  flex-direction: column;
  align-items: stretch;
  min-height: 170px;
  height: 170px;
  padding: 12px;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  box-shadow: none;
}
.sensor-tiles-grid .sensor-tile__body {
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sensor-tiles-grid .sensor-tile__icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: #e8efff;
  box-shadow: none;
}
.sensor-tiles-grid .sensor-tile__icon img {
  width: 26px;
  height: 26px;
}
.sensor-tiles-grid .sensor-tile__meta {
  width: 100%;
  text-align: center;
}
.sensor-tiles-grid .sensor-tile__title {
  font-size: 14px;
  color: #0f172a;
}
.sensor-tiles-grid .sensor-tile__status {
  font-size: 12px;
  color: #6b7280;
}
.sensor-tiles-grid .sensor-tile__actions {
  justify-content: space-between;
}
