/* =========================================================
   VISOR HISTÓRICO DE CALIDAD DEL AGUA — JIRA
   Hoja de estilos consolidada

   Se eliminaron reglas duplicadas conservando los valores
   finales que estaban activos en la hoja original.
========================================================= */

* {
    box-sizing: border-box;
}
html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}
body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    color: #263238;
    background-color: #eef3f5;
}
.encabezado {
    min-height: 55px;
    padding: 3px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background-color: #e5edf2;
    border-bottom: 3px solid #1788ad;
}
.identidad {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.contenedor-logo {
    width: 145px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.logo-jira {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}
.titulos-visor {
    max-width: 720px;
    min-width: 0;
}
.encabezado h1 {
    margin: 0;
    font-size: 21px;
    line-height: 1.1;
}
.encabezado p {
    margin: 1px 0 0;
    max-width: 720px;
    color: #526873;
    font-size: 12px;
    line-height: 1.25;
}
.nombre-sistema {
    color: #176f8f;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 0.8px;
}
.panel-titulo {
    min-height: 46px;
    padding-left: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #526674;
    color: white;
    font-size: 17px;
    font-weight: bold;
}
#boton-panel {
    width: 46px;
    height: 46px;
    border: 0;
    background: transparent;
    color: white;
    font-size: 27px;
    cursor: pointer;
}
#boton-panel:hover {
    background-color: rgba(255, 255, 255, 0.12);
}
.boton-seccion {
    width: 100%;
    margin-bottom: 9px;
    padding: 10px;
    border: 0;
    border-radius: 4px;
    background-color: #667782;
    color: white;
    font-size: 14px;
    line-height: 1.15;
    cursor: pointer;
}
.boton-seccion:hover,
.boton-seccion.activo {
    background-color: #176f8f;
}
.tarjeta-filtros {
    margin: 12px 0;
    padding: 13px;
    display: grid;
    gap: 7px;
    border: 1px solid #cbd6db;
    border-radius: 6px;
    background-color: white;
}
.tarjeta-filtros label {
    margin-top: 3px;
    font-size: 13px;
    font-weight: bold;
}
.tarjeta-filtros select {
    width: 100%;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid #b9c7cd;
    border-radius: 4px;
    background-color: white;
    font-size: 13px;
}
.boton-consulta {
    min-height: 38px;
    margin-top: 7px;
    padding: 8px;
    border: 1px solid #176f8f;
    border-radius: 4px;
    background-color: white;
    color: #176f8f;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}
.boton-consulta:hover {
    background-color: #176f8f;
    color: white;
}
.panel-leyenda {
    margin-top: 12px;
    padding: 12px 4px 8px;
    border-top: 1px solid #cbd6db;
}
.panel-leyenda h2 {
    margin: 0 0 9px;
    font-size: 15px;
}
.panel-leyenda p {
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.2;
}
.simbolo {
    width: 13px;
    height: 13px;
    display: inline-block;
    flex-shrink: 0;
    border: 1px solid #333;
    border-radius: 50%;
}
.apto {
    background-color: #35a853;
}
.moderado {
    background-color: #f2c94c;
}
.no-apto {
    background-color: #d9363e;
}
.sin-datos {
    background-color: #aeb5b9;
}
@media (max-width: 1200px) {
    .encabezado {
        min-height: 62px;
        padding: 5px 12px;
        gap: 10px;
    }
    .contenedor-logo {
        width: 140px;
        height: 56px;
    }
    .identidad {
        gap: 10px;
    }
    .encabezado h1 {
        font-size: 20px;
    }
    .encabezado p {
        font-size: 11px;
        line-height: 1.15;
    }
    .nombre-sistema {
        font-size: 19px;
    }
    .panel-lateral {
        width: 280px;
        min-width: 280px;
    }
    .panel-titulo {
        min-height: 42px;
        padding-left: 13px;
        font-size: 16px;
    }
    #boton-panel {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }
    .panel-contenido {
        padding: 10px 12px;
    }
    .boton-seccion {
        margin-bottom: 7px;
        padding: 8px;
        font-size: 13px;
    }
    .tarjeta-filtros {
        margin: 9px 0;
        padding: 10px;
        gap: 5px;
    }
    .tarjeta-filtros label {
        font-size: 12px;
    }
    .tarjeta-filtros select,
    .boton-consulta {
        min-height: 34px;
        font-size: 12px;
    }
    .panel-leyenda {
        margin-top: 9px;
        padding-top: 9px;
    }
    .panel-leyenda h2 {
        margin-bottom: 7px;
        font-size: 14px;
    }
    .panel-leyenda p {
        margin: 4px 0;
        gap: 7px;
        font-size: 11px;
    }
    .simbolo {
        width: 11px;
        height: 11px;
    }
}
#map {
    width: 100%;
    height: 100%;
}
.pie {
    min-height: 28px;
    padding: 6px 18px;
    background-color: #304955;
    color: white;
    font-size: 12px;
}
@media (max-width: 850px) {
    .nombre-sistema {
        display: none;
    }
    .panel-lateral {
        width: 300px;
        min-width: 300px;
    }
    .encabezado h1 {
        font-size: 19px;
    }
}
.popup-sitio {
    min-width: 270px;
    line-height: 1.35;
}
.popup-sitio h3 {
    margin: 0 0 12px;
    font-size: 24px;
    color: #2d2d2d;
}
.popup-sitio hr {
    margin: 12px 0;
    border: 0;
    border-top: 1px solid #d5d5d5;
}
.popup-linea {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
    margin: 5px 0;
    align-items: start;
}
.popup-etiqueta {
    font-weight: 700;
    color: #2f2f2f;
}
.popup-linea span:last-child {
    color: #4a4a4a;
}
.leyenda-contexto {
    margin: 0 0 14px;
    padding: 9px 10px;
    border-left: 4px solid #176f8f;
    background-color: #edf5f8;
    color: #35515d;
    font-size: 13px;
    line-height: 1.35;
}
.leyenda-periodo {
    margin-top: 14px !important;
    padding-top: 10px;
    border-top: 1px solid #cbd6db;
    color: #526873;
    font-size: 13px !important;
    font-style: italic;
}
.tabla-fisicoquimica {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid #cbd6db;
    border-radius: 6px;
    background-color: white;
}
.tabla-fisicoquimica h2 {
    margin: 0 0 8px;
    color: #263238;
    font-size: 17px;
}
.fisicoquimico-contexto {
    margin: 0 0 14px;
    color: #60717a;
    font-size: 13px;
    line-height: 1.35;
}
.fisicoquimico-sitio {
    margin-bottom: 14px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-left: 4px solid #176f8f;
    background-color: #edf5f8;
}
.fisicoquimico-sitio strong {
    color: #263238;
    font-size: 15px;
}
.fisicoquimico-sitio span {
    color: #60717a;
    font-size: 13px;
}
.tabla-fisicoquimica table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.tabla-fisicoquimica th,
.tabla-fisicoquimica td {
    padding: 8px 6px;
    border-bottom: 1px solid #dce4e7;
    text-align: left;
    vertical-align: top;
}
.tabla-fisicoquimica th {
    color: #35515d;
    font-size: 12px;
    text-transform: uppercase;
}
.tabla-fisicoquimica th:last-child,
.tabla-fisicoquimica td:last-child {
    text-align: right;
    font-weight: 600;
}
.tabla-fisicoquimica tbody tr:last-child td {
    border-bottom: 0;
}
.modal-grafica {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-color: rgba(21, 35, 42, 0.55);
}
.ventana-grafica {
    width: min(1100px, 95vw);
    height: min(680px, 90vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}
.encabezado-grafica {
    flex-shrink: 0;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #d4dde1;
    background-color: #eef4f6;
}
.informacion-grafica {
    flex: 1;
    min-width: 0;
}
.encabezado-grafica h2 {
    margin: 0;
    color: #263238;
    font-size: 24px;
}
.encabezado-grafica p {
    margin: 5px 0 0;
    color: #60717a;
    font-size: 15px;
}
#cerrar-grafica {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #526674;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}
#cerrar-grafica:hover {
    background-color: #dce7eb;
}
.contenedor-grafica {
    position: relative;
    flex: 1;
    min-height: 0;
    padding: 24px 28px;
    background-color: white;
}
.contenedor-grafica canvas {
    width: 100% !important;
    height: 100% !important;
}
.selector-parametro-grafica {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.selector-parametro-grafica label {
    color: #35515d;
    font-size: 14px;
    font-weight: bold;
}
.selector-parametro-grafica select {
    min-width: 250px;
    padding: 7px 9px;
    border: 1px solid #b9c7cd;
    border-radius: 4px;
    background-color: white;
    color: #263238;
    font-size: 14px;
}
.modal-reporte {
    position: fixed;
    inset: 0;
    z-index: 5100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-color: rgba(21, 35, 42, 0.58);
}
.ventana-reporte {
    width: min(1050px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}
.encabezado-reporte h2 {
    margin: 0;
    color: #263238;
    font-size: 23px;
}
.encabezado-reporte p {
    margin: 5px 0 0;
    color: #60717a;
    font-size: 14px;
}
.contenido-reporte {
    padding: 22px;
    overflow-y: auto;
}
.reporte-seccion {
    margin-bottom: 24px;
}
.reporte-seccion h3 {
    margin: 0 0 12px;
    padding-bottom: 7px;
    border-bottom: 2px solid #1788ad;
    color: #263238;
    font-size: 17px;
}
.reporte-ficha {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.reporte-ficha div {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid #d7e0e4;
    border-radius: 5px;
    background-color: #f8fafb;
}
.reporte-ficha strong {
    color: #526873;
    font-size: 12px;
    text-transform: uppercase;
}
.reporte-ficha span {
    color: #263238;
    font-size: 14px;
}
.reporte-indicadores {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.reporte-indicadores div {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    border: 1px solid #cbd6db;
    border-radius: 6px;
    background-color: #edf5f8;
    text-align: center;
}
.reporte-indicadores strong {
    color: #176f8f;
    font-size: 25px;
}
.reporte-indicadores span {
    color: #526873;
    font-size: 13px;
}
.reporte-extremos {
    margin-top: 14px;
    padding: 12px 14px;
    border-left: 4px solid #176f8f;
    background-color: #f3f7f9;
}
.reporte-extremos p {
    margin: 5px 0;
    font-size: 14px;
}
.reporte-tabla-contenedor {
    overflow-x: auto;
}
.reporte-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.reporte-tabla th,
.reporte-tabla td {
    padding: 9px 8px;
    border: 1px solid #d7e0e4;
    text-align: left;
}
.reporte-tabla th {
    background-color: #526674;
    color: white;
}
.reporte-tabla th small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: normal;
}
.reporte-tabla tbody tr:nth-child(even) {
    background-color: #f6f9fa;
}
.reporte-tabla .fila-sin-datos {
    color: #7b878d;
    background-color: #f0f2f3;
}
.reporte-nota {
    margin: 0;
    padding: 12px;
    border-radius: 5px;
    background-color: #fff8dd;
    color: #5f552f;
    font-size: 12px;
    line-height: 1.45;
}
.reporte-grafica {
    position: relative;
    width: 100%;
    height: 380px;
    padding: 14px;
    border: 1px solid #d7e0e4;
    border-radius: 6px;
    background-color: white;
}
.reporte-grafica canvas {
    width: 100% !important;
    height: 100% !important;
}
.reporte-selector-parametro {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.reporte-selector-parametro label {
    color: #35515d;
    font-size: 14px;
    font-weight: bold;
}
.reporte-selector-parametro select {
    min-width: 260px;
    padding: 8px 10px;
    border: 1px solid #b9c7cd;
    border-radius: 4px;
    background-color: white;
    color: #263238;
    font-size: 14px;
}
.reporte-tabla-fisicoquimica {
    min-width: 850px;
}
.indicador-monitoreos {
    border-top: 4px solid #1788ad !important;
}
.indicador-apto {
    border-top: 4px solid #35a853 !important;
}
.indicador-no-apto {
    border-top: 4px solid #d9363e !important;
}
@media (max-width: 700px) {
    .reporte-ficha,
    .reporte-indicadores {
        grid-template-columns: 1fr;
    }
    .reporte-grafica {
        height: 300px;
    }
    .reporte-selector-parametro {
        align-items: stretch;
        flex-direction: column;
    }
    .reporte-selector-parametro select {
        width: 100%;
        min-width: 0;
    }
}
.encabezado-reporte {
    padding: 18px 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 3px solid #1788ad;
    background-color: #f7fafb;
}
.encabezado-reporte-principal {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 22px;
}
.logo-reporte {
    width: 200px;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
}
.identidad-reporte {
    flex: 1;
    min-width: 0;
}
.institucion-reporte {
    margin: 0 0 7px;
    max-width: 760px;
    color: #526873;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}
.identidad-reporte h2 {
    margin: 0;
    color: #263238;
    font-size: 25px;
    line-height: 1.2;
}
.datos-principales-reporte {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
}
.datos-principales-reporte p {
    margin: 0;
    color: #526873;
    font-size: 15px;
}
.datos-principales-reporte strong {
    color: #263238;
}
.datos-principales-reporte span {
    color: #176f8f;
    font-weight: 700;
}
.fecha-reporte {
    margin: 8px 0 0;
    color: #77878e;
    font-size: 11px;
}
.acciones-reporte {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
#imprimir-reporte {
    padding: 9px 14px;
    border: 1px solid #176f8f;
    border-radius: 5px;
    background-color: white;
    color: #176f8f;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}
#imprimir-reporte:hover {
    background-color: #176f8f;
    color: white;
}
#cerrar-reporte {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #526674;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}
#cerrar-reporte:hover {
    background-color: #e2eaed;
}
@media (max-width: 760px) {
    .encabezado-reporte {
        flex-direction: column;
    }
    .encabezado-reporte-principal {
        width: 100%;
    }
    .logo-reporte {
        width: 130px;
        height: auto;
    }
    .identidad-reporte h2 {
        font-size: 21px;
    }
    .acciones-reporte {
        width: 100%;
        justify-content: flex-end;
    }
}
.reporte-indicadores-generales {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.reporte-tabla-general {
    min-width: 1050px;
}
.reporte-tabla-periodos {
    min-width: 850px;
}
.reporte-tabla-general th,
.reporte-tabla-general td,
.reporte-tabla-periodos th,
.reporte-tabla-periodos td {
    text-align: center;
}
.reporte-tabla-general th:first-child,
.reporte-tabla-general td:first-child,
.reporte-tabla-general th:nth-child(2),
.reporte-tabla-general td:nth-child(2),
.reporte-tabla-periodos th:first-child,
.reporte-tabla-periodos td:first-child {
    text-align: left;
}
.celda-apta {
    background-color: #e5f4e9;
    color: #226c36;
    font-weight: 600;
}
.celda-no-apta {
    background-color: #fbe6e7;
    color: #9a252b;
    font-weight: 600;
}
@media (max-width: 900px) {
    .reporte-indicadores-generales {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media print {
    .encabezado,
    .contenedor-app,
    .pie,
    .modal-grafica,
    #cerrar-reporte,
    #imprimir-reporte {
        display: none !important;
    }
    .modal-reporte {
        position: static;
        inset: auto;
        display: block !important;
        padding: 0;
        background: white;
    }
    .ventana-reporte {
        width: 100%;
        max-height: none;
        overflow: visible;
        border-radius: 0;
        box-shadow: none;
    }
    .encabezado-reporte {
        padding: 0 0 14px;
        border-bottom: 2px solid #176f8f;
        background: white;
    }
    .contenido-reporte {
        padding: 16px 0 0;
        overflow: visible;
    }
    body {
        display: block;
        overflow: visible;
        background: white;
    }
    .encabezado,
    .contenedor-app,
    .pie,
    .modal-grafica,
    #cerrar-reporte,
    #imprimir-reporte,
    #cerrar-reporte-general,
    #imprimir-reporte-general {
        display: none !important;
    }
    .modal-reporte.oculto {
        display: none !important;
    }
    .modal-reporte:not(.oculto) {
        position: static;
        inset: auto;
        display: block !important;
        width: 100%;
        padding: 0;
        background: white;
    }
    .modal-reporte:not(.oculto) .ventana-reporte {
        width: 100%;
        max-width: none;
        max-height: none;
        min-width: 0;
        overflow: visible;
        border-radius: 0;
        box-shadow: none;
    }
    .modal-reporte:not(.oculto) .encabezado-reporte {
        padding: 0 0 14px;
        border-bottom: 2px solid #176f8f;
        background: white;
    }
    .modal-reporte:not(.oculto) .contenido-reporte {
        padding: 16px 0 0;
        overflow: visible;
    }
    .reporte-seccion {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .reporte-grafica {
        height: 320px;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .reporte-tabla-contenedor {
        width: 100%;
        max-width: 100%;
        overflow: visible !important;
    }
    .reporte-tabla {
        width: 100% !important;
        min-width: 0 !important;
        border-collapse: collapse;
        table-layout: fixed;
        font-size: 9px;
    }
    .reporte-tabla th,
    .reporte-tabla td {
        padding: 4px 3px;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        text-align: center;
        vertical-align: middle;
    }
    .reporte-tabla th:first-child,
    .reporte-tabla td:first-child {
        text-align: left;
    }
    .reporte-tabla-general,
    .reporte-tabla-periodos,
    .reporte-tabla-fisicoquimica {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed;
    }
    .reporte-tabla-general {
        font-size: 7.5px;
    }
    .reporte-tabla-general th,
    .reporte-tabla-general td {
        padding: 3px 2px;
    }
    .reporte-tabla-periodos {
        font-size: 8.5px;
    }
    .reporte-selector-parametro {
        display: none !important;
    }
    .reporte-indicadores-generales {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    #modal-reporte-general .reporte-tabla-contenedor {
        display: block;
        overflow: visible !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
    }
    #modal-reporte-general .reporte-tabla thead {
        display: table-header-group;
    }
    #modal-reporte-general .reporte-tabla tfoot {
        display: table-footer-group;
    }
    #modal-reporte-general .reporte-tabla tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    #modal-reporte-general .reporte-seccion h3 {
        break-after: avoid;
        page-break-after: avoid;
    }
    #modal-reporte-general .reporte-seccion {
        break-inside: auto !important;
        page-break-inside: auto !important;
        margin-bottom: 14px;
    }
    #modal-reporte-general .reporte-tabla {
        margin-top: 0;
        margin-bottom: 0;
    }
    @page {
        size: A4 landscape;
        margin: 12mm;
    }
}
#modal-reporte-general .ventana-reporte {
    width: min(1250px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    min-width: 0;
}
#modal-reporte-general .contenido-reporte {
    min-width: 0;
    overflow-x: hidden;
}
#modal-reporte-general .reporte-tabla-contenedor {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}
.leaflet-interactive:focus {
    outline: none;
}
.controles-flotantes-mapa {
    position: absolute;
    top: 105px;
    right: 14px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.boton-mapa-flotante {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d8dfe3;
    border-radius: 7px;
    background-color: white;
    color: #7a858b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
    cursor: pointer;
    transition: background-color 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}
.boton-mapa-flotante:hover {
    background-color: #eef4f6;
    color: #176f8f;
    border-color: #8fb4c2;
    transform: translateY(-1px);
}
.icono-capas-svg {
    width: 28px;
    height: 28px;
    overflow: visible;
}
.icono-capas-svg path {
    fill: #d9dde0;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* Ícono del glosario */

.icono-glosario-svg {
    width: 26px;
    height: 26px;
    overflow: visible;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icono-glosario-svg circle,
.icono-glosario-svg line {
    fill: none;
    stroke: currentColor;
}
.boton-mapa-flotante.activo {
    background-color: #176f8f;
    color: white;
    border-color: #176f8f;
}
.boton-mapa-flotante.activo .icono-capas-svg path {
    fill: rgba(255, 255, 255, 0.24);
}
.panel-mapa-flotante {
    position: absolute;
    top: 74px;
    right: 62px;
    z-index: 1190;
    width: 230px;
    overflow: hidden;
    border: 1px solid #bcc9cf;
    border-radius: 7px;
    background-color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.20);
}
.panel-mapa-encabezado {
    min-height: 44px;
    padding: 8px 10px 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #526674;
    color: white;
    font-size: 14px;
}
.panel-mapa-encabezado button {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.panel-mapa-contenido {
    padding: 12px 14px;
    display: grid;
    gap: 10px;
}
.panel-mapa-contenido label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #33434b;
    font-size: 13px;
    cursor: pointer;
}
.panel-mapa-contenido input {
    width: 16px;
    height: 16px;
}
.oculto {
    display: none !important;
}
.leaflet-control-layers {
    display: none;
}
.contenedor-app {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
}
.panel-lateral {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #c9d5da;
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 1200;
    width: 340px;
    min-width: 340px;
    overflow: hidden;
    border: 1px solid #b8c6cc;
    border-radius: 8px;
    background-color: rgba(248, 251, 252, 0.98);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24);
    transition: width 0.24s ease,
        min-width 0.24s ease,
        opacity 0.18s ease;
}
.contenedor-mapa {
    position: relative;
    width: 100%;
    min-width: 0;
    flex: 1;
}
.barra-panel-contraido {
    display: none;
}
.panel-lateral.contraido {
    top: 24px;
    bottom: auto;
    left: 20px;
    width: 48px !important;
    min-width: 48px !important;
    overflow: visible;
    border: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
}
.panel-lateral.contraido .panel-titulo,
.panel-lateral.contraido .panel-contenido,
.panel-lateral.contraido .panel-leyenda {
    display: none !important;
}
.panel-lateral.contraido .barra-panel-contraido {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #aebdc4;
    border-radius: 7px;
    background-color: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.boton-barra-panel {
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-bottom: 1px solid #d6dfe3;
    background-color: white;
    color: #526674;
    cursor: pointer;
    transition: background-color 0.18s ease,
        color 0.18s ease;
}
.boton-barra-panel:last-child {
    border-bottom: 0;
}
.boton-barra-panel:hover {
    background-color: #eaf3f6;
    color: #176f8f;
}
.boton-barra-panel svg {
    width: 27px;
    height: 27px;
    overflow: visible;
}
.boton-barra-panel svg path,
.boton-barra-panel svg circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.boton-abrir-panel svg {
    width: 23px;
    height: 23px;
}
.panel-contenido {
    padding: 14px 16px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.leaflet-top.leaflet-right .leaflet-control-zoom {
    margin-top: 14px;
    margin-right: 14px;
}
.leaflet-control-scale {
    transition: margin-left 0.25s ease;
}
body.panel-abierto .leaflet-control-scale {
    margin-left: 360px !important;
}
.panel-lateral.modo-bacteriologico
#boton-fisicoquimicos {
    display: none;
}
.panel-lateral.modo-fisicoquimico
#boton-bacteriologico {
    display: none;
}
.zona-mapa {
    position: relative;
    flex: 1;
    min-width: 0;
}
.icono-leyenda-svg {
    width: 28px;
    height: 28px;
    overflow: visible;
}
.icono-leyenda-svg circle,
.icono-leyenda-svg line {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
#boton-leyenda-flotante {
    display: none;
}
.panel-simbologia-contenido {
    padding: 14px 18px;
}
.panel-simbologia-contenido p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    font-size: 15px;
}
/* ==========================================
   BUSCADOR DE SITIOS
========================================== */

.buscador-sitios {
    margin: 10px 0 12px;
    padding: 11px 12px;

    border: 1px solid #cbd6db;
    border-radius: 6px;
    background-color: white;
}

.buscador-sitios label {
    display: block;
    margin-bottom: 6px;

    color: #33434b;
    font-size: 13px;
    font-weight: 700;
}

.buscador-sitios-fila {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

#buscar-sitio {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 7px 9px;

    border: 1px solid #b9c7cd;
    border-radius: 4px;
    background-color: white;

    color: #263238;
    font-size: 13px;
}

#buscar-sitio:focus {
    border-color: #1788ad;
    outline: 2px solid rgba(23, 136, 173, 0.16);
}

#boton-buscar-sitio {
    width: 38px;
    min-width: 38px;
    min-height: 36px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #176f8f;
    border-radius: 4px;
    background-color: white;
    color: #176f8f;

    cursor: pointer;
}

#boton-buscar-sitio:hover {
    background-color: #176f8f;
    color: white;
}

#boton-buscar-sitio svg {
    width: 19px;
    height: 19px;
}

#boton-buscar-sitio circle,
#boton-buscar-sitio line {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.mensaje-buscador-sitios {
    min-height: 15px;
    margin: 5px 0 0;

    color: #60717a;
    font-size: 11px;
    line-height: 1.2;
}

.mensaje-buscador-sitios.error {
    color: #a42d33;
}
/* ==========================================
   RESULTADOS DEL BUSCADOR DE SITIOS
========================================== */

.buscador-sitios {
    position: relative;
}

.resultados-buscador-sitios {
    position: absolute;
    top: calc(100% - 18px);
    left: 12px;
    right: 12px;
    z-index: 1800;

    max-height: 230px;
    overflow-y: auto;

    border: 1px solid #b9c7cd;
    border-radius: 5px;
    background-color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.resultado-sitio {
    width: 100%;
    padding: 9px 11px;

    display: block;

    border: 0;
    border-bottom: 1px solid #e2e8eb;
    background-color: white;

    color: #33434b;
    font-size: 13px;
    text-align: left;

    cursor: pointer;
}

.resultado-sitio:last-child {
    border-bottom: 0;
}

.resultado-sitio:hover,
.resultado-sitio.activo {
    background-color: #eaf3f6;
    color: #176f8f;
}

.resultados-buscador-sitios::-webkit-scrollbar {
    width: 8px;
}

.resultados-buscador-sitios::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background-color: #aebbc1;
}

.resultados-buscador-sitios::-webkit-scrollbar-track {
    background-color: #eef3f5;
}
.texto-encontrado {
    color: #176f8f;
    font-weight: 700;
}
/* ==========================================
   TOUR INTERACTIVO JIRA
========================================== */

.tour-jira.driver-popover {
    width: min(430px, calc(100vw - 32px));
    max-width: 430px;

    padding: 20px;

    border-radius: 10px;
    background-color: white;

    box-shadow:
        0 14px 38px rgba(0, 0, 0, 0.28);
}

.tour-jira .driver-popover-title {
    color: #263238;
    font-size: 21px;
    line-height: 1.2;
}

.tour-jira .driver-popover-description {
    color: #526873;
    font-size: 14px;
    line-height: 1.45;
}

.tour-jira .driver-popover-progress-text {
    color: #77878e;
    font-size: 12px;
}

.tour-jira .driver-popover-next-btn,
.tour-jira .driver-popover-prev-btn {
    padding: 7px 12px;

    border: 1px solid #176f8f;
    border-radius: 4px;

    text-shadow: none;
    font-size: 12px;
}

.tour-jira .driver-popover-next-btn {
    background-color: #176f8f;
    color: white;
}

.tour-jira .driver-popover-next-btn:hover {
    background-color: #125e79;
}

.tour-jira .driver-popover-prev-btn {
    background-color: white;
    color: #176f8f;
}

.tour-jira .driver-popover-close-btn {
    color: #526674;
}


/* Introducción */

.tour-intro-modulos {
    margin-top: 4px;
}

.tour-introduccion {
    margin: 0 0 14px;

    color: #526873;
    font-size: 13px;
    line-height: 1.4;
}

.tour-modulo {
    margin-top: 9px;
    padding: 10px 11px;

    display: flex;
    align-items: center;
    gap: 11px;

    border: 1px solid #d6e0e4;
    border-radius: 7px;

    background-color: #f7fafb;
}

/* Íconos de los módulos dentro del tour */

.tour-icono-gota {
    width: 42px;
    height: 42px;
    min-width: 42px;
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 1px solid #cbd9de;
    border-radius: 7px;

    background-color: #eef6f8;
    color: #176f8f;
}

.tour-icono-gota svg {
    width: 27px !important;
    height: 27px !important;
    max-width: 27px !important;
    max-height: 27px !important;

    display: block;
    overflow: visible;
}

.tour-icono-gota svg path,
.tour-icono-gota svg circle {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.tour-modulo-texto {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tour-modulo-texto strong {
    color: #263238;
    font-size: 13px;
    line-height: 1.25;
}

.tour-modulo-texto small {
    color: #60717a;
    font-size: 11px;
    line-height: 1.35;
}


/* Tablet y celular */

@media (max-width: 600px) {

    .tour-jira.driver-popover {
        padding: 16px;
    }

    .tour-jira .driver-popover-title {
        font-size: 18px;
    }

    .tour-modulo {
        align-items: flex-start;
    }

    .tour-icono-gota {
        width: 35px;
        height: 35px;
    }

    .tour-icono-gota svg {
        width: 23px;
        height: 23px;
    }
}
/* ==========================================
   BUSCADOR POR MUNICIPIO Y LOCALIDAD
========================================== */

.buscador-ubicacion {
    margin: 8px 0 12px;
}

.boton-mostrar-ubicacion {
    width: 100%;
    min-height: 38px;
    padding: 9px 12px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    border: 1px solid #cbd6db;
    border-radius: 6px;

    background-color: white;
    color: #33434b;

    font-size: 13px;
    font-weight: 700;
    text-align: left;

    cursor: pointer;
}

.boton-mostrar-ubicacion:hover {
    border-color: #8fb4c2;
    background-color: #f2f7f9;
    color: #176f8f;
}

.flecha-buscador-ubicacion {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.boton-mostrar-ubicacion[aria-expanded="true"]
.flecha-buscador-ubicacion {
    transform: rotate(180deg);
}

.contenido-buscador-ubicacion {
    margin-top: 7px;
    padding: 12px;

    display: grid;
    gap: 8px;

    border: 1px solid #cbd6db;
    border-radius: 6px;

    background-color: white;
}

.contenido-buscador-ubicacion label {
    color: #33434b;
    font-size: 12px;
    font-weight: 700;
}

.contenido-buscador-ubicacion select {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;

    border: 1px solid #b9c7cd;
    border-radius: 4px;

    background-color: white;
    color: #263238;
    font-size: 12px;
}

.encabezado-sitios-ubicacion {
    margin-top: 5px;
    padding-top: 9px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-top: 1px solid #d9e2e6;
}

.encabezado-sitios-ubicacion strong {
    color: #33434b;
    font-size: 12px;
}

#contador-sitios-ubicacion {
    min-width: 24px;
    height: 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;
    background-color: #176f8f;
    color: white;

    font-size: 11px;
    font-weight: 700;
}

.lista-sitios-ubicacion {
    max-height: 190px;
    overflow-y: auto;

    display: grid;
    gap: 5px;
}

.mensaje-sitios-ubicacion {
    margin: 0;
    padding: 8px 4px;

    color: #60717a;
    font-size: 11px;
    line-height: 1.35;
}

.boton-sitio-ubicacion {
    width: 100%;
    padding: 8px 9px;

    display: flex;
    align-items: center;
    gap: 8px;

    border: 1px solid #d7e0e4;
    border-radius: 5px;

    background-color: #f8fafb;
    color: #33434b;

    font-size: 12px;
    text-align: left;

    cursor: pointer;
}

.boton-sitio-ubicacion:hover {
    border-color: #8fb4c2;
    background-color: #eaf3f6;
    color: #176f8f;
}

.boton-sitio-ubicacion::before {
    content: "⌖";
    flex-shrink: 0;
    color: #176f8f;
    font-size: 15px;
}
/* Separar nombre del sitio y localidad */

.boton-sitio-ubicacion {
    display: flex;
    align-items: flex-start;
}

.boton-sitio-ubicacion > span {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.boton-sitio-ubicacion strong,
.boton-sitio-ubicacion small {
    display: block;
    width: 100%;
    text-align: left;
}

.boton-sitio-ubicacion strong {
    color: #33434b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.boton-sitio-ubicacion small {
    color: #6c7d85;
    font-size: 10.5px;
    line-height: 1.25;
}
/* ==========================================
   GLOSARIO DE PARÁMETROS
========================================== */

.icono-glosario-svg {
    width: 26px;
    height: 26px;
    overflow: visible;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icono-glosario-svg circle,
.icono-glosario-svg line {
    fill: none;
    stroke: currentColor;
}


/* Fondo del modal */

.modal-glosario {
    position: fixed;
    inset: 0;
    z-index: 5000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background-color:
        rgba(20, 37, 46, 0.68);
}


/* Ventana */

.ventana-glosario {
    width: min(720px, 96vw);
    max-height: 86vh;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border-radius: 12px;
    background-color: #ffffff;

    box-shadow:
        0 18px 50px
        rgba(0, 0, 0, 0.30);
}


/* Encabezado */

.glosario-encabezado {
    padding: 20px 22px 16px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    border-bottom:
        1px solid #d7e0e4;
}

.glosario-encabezado h2 {
    margin: 0 0 5px;

    color: #263238;
    font-size: 22px;
    line-height: 1.2;
}

.glosario-encabezado p {
    margin: 0;

    max-width: 560px;

    color: #60717a;
    font-size: 12px;
    line-height: 1.4;
}


/* Cerrar */

.cerrar-glosario {
    width: 32px;
    height: 32px;
    flex-shrink: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: #526873;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}

.cerrar-glosario:hover {
    background-color: #eef3f5;
    color: #176f8f;
}


/* Pestañas */

.glosario-pestanas {
    padding: 12px 22px 0;

    display: flex;
    gap: 6px;

    background-color: #ffffff;
}

.glosario-pestana {
    padding: 8px 14px;

    border: 1px solid #cad6db;
    border-radius: 6px 6px 0 0;

    background-color: #f4f7f8;
    color: #526873;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.glosario-pestana:hover {
    background-color: #eaf3f6;
    color: #176f8f;
}

.glosario-pestana.activo {
    border-color: #176f8f;

    background-color: #176f8f;
    color: #ffffff;
}


/* Contenido desplazable */

.glosario-contenido {
    padding: 18px 22px 22px;

    overflow-y: auto;

    background-color: #f8fafb;
}


/* Tarjetas de parámetros */

.glosario-parametro {
    margin-bottom: 12px;
    padding: 14px 15px;

    border: 1px solid #d7e0e4;
    border-radius: 8px;

    background-color: #ffffff;
}

.glosario-parametro:last-child {
    margin-bottom: 0;
}


.glosario-parametro-titulo {
    margin-bottom: 8px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.glosario-parametro h3 {
    margin: 0;

    color: #263238;
    font-size: 14px;
    line-height: 1.3;
}

.glosario-unidad {
    flex-shrink: 0;

    padding: 4px 8px;

    border-radius: 12px;

    background-color: #e7f2f6;
    color: #176f8f;

    font-size: 10px;
    font-weight: 700;
}

.glosario-parametro p {
    margin: 0 0 8px;

    color: #52646c;
    font-size: 12px;
    line-height: 1.45;
}

.glosario-parametro p:last-child {
    margin-bottom: 0;
}


/* Importancia ambiental */

.glosario-importancia {
    padding: 8px 10px;

    border-left:
        3px solid #176f8f;

    border-radius: 0 4px 4px 0;

    background-color: #f1f7f9;
}

.glosario-importancia strong {
    color: #33434b;
}


/* Celular */

@media (max-width: 600px) {

    .modal-glosario {
        padding: 12px;
    }

    .ventana-glosario {
        width: 100%;
        max-height: 92vh;
    }

    .glosario-encabezado {
        padding: 16px;
    }

    .glosario-encabezado h2 {
        font-size: 19px;
    }

    .glosario-pestanas {
        padding:
            10px 16px 0;
    }

    .glosario-pestana {
        flex: 1;

        padding:
            8px 6px;

        font-size: 11px;
    }

    .glosario-contenido {
        padding: 14px 16px 18px;
    }

    .glosario-parametro-titulo {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}


/* Mantener oculto el modal y las secciones
   inactivas cuando corresponda */

.modal-glosario.oculto,
.glosario-seccion.oculto {
    display: none;
}