    :root {
        --primary: #00ACA1;
        --bg-dark: #0f2b46;
        --bg-light: #193863;
        --text-light: #F5F5F5;
        --text-soft: #1396D;
        --text-gris: #FFFFFF;
        --card-bg: #122847;
        --text-blue: #005EB8;
    }

    body {
        /* font-family: 'Segoe UI', sans-serif; */
        font-family: 'Poppins', sans-serif;
        background: var(--bg-dark);
        margin: 0;
        padding: 0;
        color: var(--text-light);
        font-size: 14px;
        overflow-x: hidden;
    }
    
    /* ✅ Solo en escritorio: forzar scroll para evitar saltos de layout */
    @media (min-width: 768px) {
        body {
            overflow-y: scroll;
        }
    }

    .header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1em;
        width: 100%;
        max-width: 400px;
        margin: auto;
        padding: 0;
    }

    .logo-container {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 2em auto 1.5em auto;
        text-align: center;
        margin-bottom: 1em;
        width: 100%;
        max-width: 360px;
        padding: 0;
        /* Prevenir reflow visual y parpadeo */
        visibility: visible !important;
        opacity: 1 !important;
        transition: none !important;
        position: static !important;
        left: auto !important;
        transform: none !important;
    }

    .blue-title {
        color: #1396D4 !important;
        text-align: center;
        font-weight: bold;
        margin-top: 10px;
        font-size: 18px;
        width: 100%;
    }

    .logo-container img,
    .logo-container svg {
        max-width: 220px;
        width: 100%;
        height: auto;
        display: block;
    }

    .card {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        padding: 1em;
        text-align: center;
        box-shadow: none;
        min-height: 70px;
        max-height: 70px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .card .label {
        color: var(--primary);
        font-weight: bold;
        font-size: 1.1em;
        margin-bottom: 0.5em;
        display: block;
        text-align: left;
        line-height: 1.2;
    }
    /*nota de modificacion para verificar que al cambiar actualiza*/

    /* Contenedor de valor con alerta */
    .value-with-alert {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    /* Contenedor de valor con unidad de medida */
    .value-with-unit {
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 2px;
    }

    /* Icono de alerta dentro de las tarjetas */
    .alert-icon-card {
        width: 18px;
        height: 18px;
        filter: brightness(1.2);
        flex-shrink: 0;
    }

    .card .value {
        font-size: 1.5em;
        font-weight: bold;
        margin: 0;
        padding: 0;
        letter-spacing: 1px;
    }

    .info-block {
        grid-column: span 2;
        font-size: 0.9em;
        line-height: 1.4em;
        max-height: none;
        height: auto;
        min-height: auto;
        align-items: flex-start;
        text-align: left;
        overflow: visible;
    }

    .info-block .label {
        text-align: left;
        width: 100%;
        margin-bottom: 0.5em;
    }

    .info-block-centered {
        text-align: center;
        align-items: center;
        justify-content: center;
    }

    .tips-content {
        margin-bottom: 2rem;
        padding: 0;
        color: inherit;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }

    .tips-content p {
        margin: 4px 0;
        padding: 0;
        line-height: 1.4em;
        text-align: justify;
        text-justify: inter-word;
        word-wrap: break-word;
        hyphens: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .tips-placeholder {
        color: #999;
        font-style: italic;
        margin: 0;
        padding: 0;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }

    /* Estilos específicos para Markdown en tips */
    .tips-title {
        color: var(--primary);
        font-size: 1.1em;
        font-weight: bold;
        margin: 8px 0 6px 0;
        padding: 0;
        text-align: left;
        border-bottom: 2px solid var(--primary);
        padding-bottom: 2px;
    }

    .tips-list {
        margin: 8px 0;
        padding-left: 16px;
        list-style: none;
    }

    .tips-list li {
        margin: 4px 0;
        padding-left: 8px;
        position: relative;
        line-height: 1.4em;
    }

    .tips-list li:before {
        content: '•';
        color: var(--primary);
        font-weight: bold;
        position: absolute;
        left: -8px;
    }

    .tips-code {
        background: rgba(255, 255, 255, 0.1);
        padding: 2px 4px;
        border-radius: 3px;
        font-family: monospace;
        font-size: 0.9em;
    }

    .tips-arrow {
        color: var(--primary);
        font-weight: bold;
        margin: 0 4px;
    }

    .tips-emoji {
        font-size: 1.1em;
        margin-right: 4px;
    }

    .card.wide {
        grid-column: span 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
      }
    
      .config-option:active {
        background: rgba(255, 255, 255, 0.08);
      }

    .card .switch {
        margin: 0;
        padding: 0;
        flex-shrink: 0;
    }



    .toast {
        visibility: hidden;
        min-width: 200px;
        background: var(--primary);
        color: #000;
        text-align: center;
        border-radius: 4px;
        padding: 1em;
        position: fixed;
        z-index: 1000;
        left: 50%;
        bottom: 30px;
        transform: translateX(-50%);
        font-size: 1em;
        opacity: 0;
        transition: opacity 0.5s, visibility 0.5s;
    }

    .toast.show {
        visibility: visible;
        opacity: 1;
    }

    .footer {
        text-align: center;
        color: var(--text-soft);
        font-size: 0.8em;
        margin-top: 2em;
    }

    .led {
        display: inline-block;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: #444;
        box-shadow: 0 0 8px var(--card-bg);
        vertical-align: middle;
        margin: 0;
        transition: 0.3s, box-shadow 0.3s;
    }

    .led.on {
        background: var(--primary);
        box-shadow: 0 0 12px var(--primary);
    }

    .led.off {
        background: var(--card-bg);
        box-shadow: 0 0 8px --card-bg;
    }

    /* Estilos para la puntuación en vista individual */
    .score-display {
        display: flex;
        align-items: center;
        gap: 8px;
        justify-content: center;
        margin: 0;
        padding: 0;
    }

    .score-number {
        font-size: 1.2em;
        font-weight: bold;
        color: var(--primary);
    }

    .score-display svg {
        width: 16px;
        height: 16px;
        fill: #fbbf24;
        flex-shrink: 0;
    }

    .score-number.score-high {
          color: var(--text-light);
    }

    .score-number.score-medium {
          color: var(--text-light);
    }

    .score-number.score-low {
        color: var(--text-light);
    }

    .signal-bars {
        display: flex;
        gap: 2px;
        vertical-align: middle;
        align-items: end;
    }

    .signal-bar {
        width: 6px;
        border-radius: 2px 2px 0 0;
        background: #bbb;
        transition: 0.3s;
    }

    .signal-bar.active {
        background: var(--primary);
    }

    .signal-bar:nth-child(1) {
        height: 8px;
    }

    .signal-bar:nth-child(2) {
        height: 12px;
    }

    .signal-bar:nth-child(3) {
        height: 16px;
    }

    .signal-bar:nth-child(4) {
        height: 20px;
    }

    .signal-bar:nth-child(5) {
        height: 24px;
    }

    .switch {
        position: relative;
        display: inline-block;
        width: 46px;
        height: 24px;
    }

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        transition: .4s;
        border-radius: 24px;
    }

    .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

    input:checked+.slider {
        background-color: var(--primary);
    }

    input:checked+.slider:before {
        transform: translateX(22px);
    }

    .mi-svg {
        width: 200px;
        height: auto;
    }


    .poolbox-list {
        background-color: var(--bg-light);
        border-radius: 30px;
        padding: 20px;
        box-sizing: border-box;
        max-width: 400px;
        margin: auto;
        width: 100%;
    }

    .poolbox-card {
        width: 340px;
        min-height: 100px;
        background: var(--card-bg);
        border-radius: 16px;
        margin-bottom: 18px;
        padding: 18px 16px 12px 16px;
        color: #fff;
        box-shadow: 0 2px 8px #0002;
        background-color: rgba(255, 255, 255, 0.05);
        position: relative;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        overflow: hidden;
    }

    .poolbox-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px #0004;
    }

    .poolbox-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
        position: relative;
    }

    .poolbox-owner {
        color: var(--text-light);
        font-size: 1.1em;
        max-width: calc(100% - 60px); /* Reservar espacio para la puntuación */
    }

    .notificacion-texto {
        color: #1396D4;
        font-size: 1.1em;
        font-weight: 500;
        max-width: calc(100% - 60px); /* Reservar espacio para el icono de alerta */
        line-height: 1.4;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Puntuación posicionada absolutamente */
    .pool-score-compact {
        position: absolute;
        top: 0;
        right: 0;
        font-size: 14px;
        font-weight: bold;
        color: var(--primary);
        padding: 2px 6px;
        border-radius: 4px;
        background: rgba(0, 172, 161, 0.1);
        line-height: 1.2;
        min-width: 32px;
        text-align: center;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
    }

    .pool-score-compact svg {
        width: 12px;
        height: 12px;
        fill: #fbbf24;
        flex-shrink: 0;
    }

    .pool-score-compact.score-high {
        background: rgba(34, 197, 94, 0.15);
        color: var(--primary);
    }

    .pool-score-compact.score-medium {
        background: rgba(251, 191, 36, 0.15);
        color: #fbbf24;
    }

    .pool-score-compact.score-low {
        background: rgba(239, 68, 68, 0.15);
        color: #ef4444;
    }

    .score-value-compact {
        font-size: 14px;
        font-weight: bold;
    }

    /* Fila de dirección normal sin flexbox */
    .poolbox-address-row {
        position: relative;
        margin: 2px 0;
        line-height: 0.7;
    }

    .poolbox-address-row .poolbox-address {
        margin: 0;
        max-width: calc(100% - 40px); /* Reservar espacio para alerta */
        display: block;
    }

    /* Icono de alerta en la segunda línea de dirección */
    .alert-icon-inline {
        position: absolute;
        top: 0;
        right: 0;
        width: 29.21px;
        height: 25.16px;
        object-fit: contain;
        display: block;
        transition: all 0.3s ease;
        border-radius: 4px;
        padding: 2px;
        z-index: 2;
    }

    .alert-icon-inline:hover {
        transform: scale(1.15);
        filter: brightness(1.5) contrast(1.3) saturate(1.2);
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Icono de alerta simple - sin posicionamiento absoluto */
    .alert-icon-simple {
        width: 29.21px;
        height: 25.16px;
        margin-left: 8px;
        flex-shrink: 0;
        transition: all 0.2s ease;
        object-fit: contain;
        border-radius: 4px;
        padding: 2px;
        max-height: 20px;
        align-self: center;
    }

    .alert-icon-simple:hover {
        filter: brightness(1.3);
        transform: scale(1.1);
    }

    /* Contenedor de dirección con icono */
    .poolbox-address-with-alert {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 20px;
        margin: 4px 0 10px 0;
        padding: 0;
        overflow: hidden;
    }

    .poolbox-address-with-alert .poolbox-address {
        margin: 0;
        flex-grow: 1;
        line-height: 20px;
    }

    /* Estilos para el indicador de estado de bomba */
    .pump-status {
        display: flex;
        align-items: center;
        padding: 4px;
    }

    .status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #6b7280;
        transition: all 0.3s ease;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
    }

    .status-dot.status-on {
        background: var(--primary);
        box-shadow: 0 0 0 2px rgba(0, 172, 161, 0.3), 0 0 8px rgba(0, 172, 161, 0.6);
    }

    .status-dot.status-off {
        background: #6b7280;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
    }

    /* Indicador de bomba simple al lado de temperatura - OCULTO */
    .pump-indicator {
        display: none !important;
    }

    .pump-indicator.status-on {
        background: var(--primary);
        box-shadow: 0 0 4px var(--primary);
    }

    .pump-indicator.status-off {
        background: #6b7280;
    }

    .poolbox-owner {
        color: #1396D4;
        font-size: 1.1em;
    }

    .poolbox-fav {
        color: #1ec6e6;
        font-size: 1.3em;
    }

    .poolbox-address {
        font-size: 14px;
        margin: 8px 0px 0px 0px;
        color: var(--text-light);
        line-height: 0.7;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Estilos específicos para notificaciones */
    .poolbox-card .poolbox-address {
        /* min-height: 20px; */
        max-height: none;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        display: block;
    }

    .poolbox-status {
        display: flex;
        align-items: normal;
        gap: 10px;
        font-size: 14px;
        color: var(--primary);
        /* font-weight: bold; */
        margin-top: 22px;
        margin-left: 0px !important;
    }

    .poolbox-status .ph {
        color: var(--text-light);
        /* font-weight: bold; */
    }

    .poolbox-status .orp {
        color: var(--text-light);
        /* font-weight: bold; */
    }

    .poolbox-status .tmp {
        color: var(--text-light);
        /* font-weight: bold; */
    }

    .poolbox-status .wifi {
        color: #1ec6e6;
        font-size: 1.2em;
    }

    .poolbox-status .alert {
        color: #1ec6e6;
        font-size: 1.2em;
    }

    .poolbox-status .label {
        font-weight: bold;
        color: var(--primary);
        margin-right: 4px;
    }

    .poolbox-status .value {
        font-weight: regular;
        color: var(--text-light);
        white-space: nowrap;
    }

    .poolbox-status .alert {
        /* font-weight: bold; */
        color: var(--primary);
        font-size: 26px
    }

    .alert-icon {
        width: 36px;
        height: auto;
        margin-left: 10px;
        margin-top: 2px;
        flex-shrink: 0;
        filter: brightness(1.2) contrast(1.1);
        transition: all 0.3s ease;
    }
    
    .alert-icon:hover {
        transform: scale(1.1);
        filter: brightness(1.4) contrast(1.2);
    }
.detail-header {
  text-align: center;
  margin-bottom: 1em;
}

.alias-title {
  color: var(--text-light);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  text-align: center;
    margin-bottom: 0.5em;
}

/* Clase para ocultar el alias en vista de detalle */
.alias-title.hidden {
  display: none !important;
}

.address-text {
  color: var(--text-light);
  font-size: 14px;
  margin: 4px 0 0;
  line-height: 1.4em;
  margin-bottom: 1em;
  font-style: regular;
  text-align: center;
}

#signal.value {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50%;
  min-height: 50px; /* Altura mínima para mejor centrado */
  padding: 10px 0; /* Padding top y bottom para centrado */
  box-sizing: border-box;
}

#signal.value .signal-bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 24px; /* Altura fija para las barras - igual que la lista */
  justify-self: center; /* Centrado en el grid */
}

#signal.value .signal-bar {
  width: 6px; /* Mismo ancho que en la lista */
  border-radius: 2px 2px 0 0;
  background: #bbb;
  transition: 0.3s;
}

/* Mismas alturas que en la lista */
#signal.value .signal-bar:nth-child(1) { height: 8px; }
#signal.value .signal-bar:nth-child(2) { height: 12px; }
#signal.value .signal-bar:nth-child(3) { height: 16px; }
#signal.value .signal-bar:nth-child(4) { height: 20px; }
#signal.value .signal-bar:nth-child(5) { height: 24px; }

#signal.value .signal-bar.active {
  background: var(--primary);
}

    .card-list .status-icons {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        margin-left: auto;
    }

    .card-list .signal-bars {
        display: flex;
        gap: 2px;
        align-items: flex-end;
    }

    .card-list .alert-icon {
        width: 29.21px;
        height: 25.16px;
        object-fit: contain;
        display: block;
        /* filter: brightness(1.3) contrast(1.2) saturate(1.1); */
        transition: all 0.3s ease;
        border-radius: 4px;
        padding: 2px;
    }
    
    .card-list .alert-icon:hover {
        transform: scale(1.15);
        filter: brightness(1.5) contrast(1.3) saturate(1.2);
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Estilos específicos para alertas activas/inactivas */
    .alert-icon[src*="alert_enabled"] {
        filter: brightness(1.1) contrast(1.1);
    }
    
    .alert-icon[src*="alert_disabled"] {
        filter: brightness(0.7) contrast(0.8) saturate(0.5);
        opacity: 0.6;
    }

    /* Mejorar visibilidad en dispositivos móviles */
    @media (max-width: 768px) {
        .alert-icon {
            width: 32px;
            filter: brightness(1.4) contrast(1.3);
        }
        
        .card-list .alert-icon {
            width: 26px;
            height: 22px;
            /* filter: brightness(1.4) contrast(1.3) saturate(1.2); */
        }
        
        .alert-icon[src*="alert_enabled"] {
            filter: brightness(1.2) contrast(1.1);
        }
    }

    .card-list-icons {
        margin-left: auto;
        display: flex;
        align-items: flex-start;
        /* alinea ambos arriba */
        gap: 8px;
        margin-top: -6px;
        margin-right: 0px;
    }

    /* Indicadores de notificaciones */
    .notification-critical-indicator,
    .notification-info-indicator {
        font-size: 14px;
        padding: 2px 4px;
        border-radius: 4px;
        background-color: rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .notification-critical-indicator {
        color: #ff6b6b;
        background-color: rgba(255, 107, 107, 0.1);
    }

    .notification-info-indicator {
        color: #4ecdc4;
        background-color: rgba(78, 205, 196, 0.1);
    }

    /* Estilos para notificaciones simplificadas */
    .poolbox-header .alert-icon-simple {
        width: 24px;
        height: 24px;
        margin-left: auto;
        flex-shrink: 0;
    }

    .poolbox-header {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .search-container {
        position: relative;
        background-color: var(--card-bg);
        border-radius: 20px;
        margin-bottom: 16px;
        /* Espacio con las pastillas */
        height: 40px;
        /* Menor altura */
        width: 100%;
        /* Igual al ancho de las tarjetas */
        max-width: 100%;
        /* Que respete el mismo ancho que las tarjetas */
        max-width: 370px;
        /* 👈 Mismo ancho que las tarjetas */
    }

    .search-input {
        width: 100%;
        padding: 8px 40px 10px 14px;
        border: none;
        border-radius: 40px;
        background-color: transparent;
        color: #fff;
        font-size: 16px;
        font-family: 'Poppins', sans-serif;
        outline: none;
    }

    .search-input::placeholder {
        color: #aaa;
        /* Placeholder gris claro */
    }

    .search-icon {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        opacity: 0.6;
        pointer-events: none;
    }


.intervenciones-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  width: 100%;
}

.intervenciones-toolbar .search-container {
  width: 100%;
  max-width: 360px;
  margin-bottom: 0;
}

.btn-add-intervencion {
  align-self: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-add-intervencion:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-add-intervencion:active {
  background: rgba(255, 255, 255, 0.18);
}

.btn-add-intervencion:focus-visible {
  outline: 2px solid rgba(0, 172, 161, 0.45);
  outline-offset: 2px;
}

.btn-add-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 172, 161, 0.15);
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

    /* ✅ Estilos para pantalla de notificaciones */
    .notificaciones-view {
        background-color: var(--bg-light);
        border-radius: 30px;
        padding: 20px;
        box-sizing: border-box;
        max-width: 800px;
        margin: auto;
        width: 100%;
    }

    .notificaciones-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .notificacion-card {
        width: 340px;
        background: var(--card-bg);
        border-radius: 16px;
        padding: 18px 16px 12px 16px;
        color: #fff;
        box-shadow: 0 2px 8px #0002;
        background-color: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .notificacion-card:hover {
        background-color: rgba(255, 255, 255, 0.12);
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }

    .notificacion-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
    }

    .notificacion-info {
        flex: 1;
        min-width: 0;
    }

    .notificacion-titulo {
        font-size: 16px;
        font-weight: 600;
        color: #fff;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .notificacion-poolbox {
        font-size: 13px;
        color: var(--primary);
        margin: 2px 0 0 0;
        font-weight: 500;
    }

    .notificacion-fecha {
        font-size: 12px;
        color: #aaa;
        margin: 4px 0 0 0;
    }

    .notificacion-mensaje {
        font-size: 14px;
        color: #ddd;
        margin: 8px 0 0 0;
        line-height: 1.4;
        display: -webkit-box;
      line-clamp: 2;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .notificacion-critica {
        border-left: 4px solid #ff4444;
        background-color: rgba(255, 68, 68, 0.1);
    }

    .notificacion-warning {
        border-left: 4px solid #ffa500;
        background-color: rgba(255, 165, 0, 0.1);
    }

    .notificacion-info {
        border-left: 4px solid var(--primary);
        background-color: rgba(0, 172, 161, 0.1);
    }

    .notificacion-alert-icon {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
        margin-left: 8px;
    }

    .pills-container {
        display: flex;
        gap: 10px;
    }

    .bottom-bar {
        position: fixed;
        bottom:0;
        left: 0;
        width: 100%;
        background-color: #0A223D;
        color: white;
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 85px;
        box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.3);
        font-family: 'Poppins', sans-serif;
        z-index: 100;

    }

    .bottom-bar .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #A6B5D1;
        font-size: 12px;
        text-align: center;
        cursor: pointer;
    }

    .bottom-bar .nav-item.active {
        color: var(--primary);
    }

    .bottom-bar .nav-item img {
        height: 30px;
        margin-bottom: 4px;
        /* Convertir todos los iconos a gris por defecto */
        filter: brightness(0) saturate(100%) invert(69%) sepia(8%) saturate(1284%) hue-rotate(184deg) brightness(94%) contrast(89%);
    }

    .bottom-bar .nav-item.active img {
        /* Convertir el icono a azul cuando está activo */
        filter: brightness(0) saturate(100%) invert(27%) sepia(87%) saturate(1352%) hue-rotate(174deg) brightness(96%) contrast(91%);
    }

    .navbar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 160px;
        /* Aumenta la altura */
        background-color: var(--card-bg);
        display: flex;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
        z-index: 100;
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1;
        padding: 10px 0;
    }

    .nav-item img {
        width: 40px;
        /* Más grande para móvil */
        height: 400px;
        margin-bottom: 20px;
    }

    .nav-item span {
        font-size: 9px;
        color: var(--text-light);
    }

    .hidden-until-loaded {
        visibility: hidden;
    }

    .poolbox-list,
    .container {
        display: none;
        /* background-color: transparent; */
        border-radius: 30px;
        padding: 15px;
        box-sizing: border-box;
        max-width: 400px;
        margin: auto;
        width: 100%;
        background-color: var(--card-bg);
    }

    .hidden {
        display: none !important;
    }

    /* Estilos para el detailview de la poolbox */
    .poolbox-detail {
        padding: 20px;
        max-width: 600px;
        margin: auto;
        color: var(--text-light);
          grid-template-columns: repeat(2, 1fr);
          display: grid;
          gap: 1em;
    }

    .detail-header {
        text-align: center;
        margin-bottom: 20px;
    }

    .detail-logo {
        width: 120px;
        margin-bottom: 10px;
    }

    .detail-title {
        font-size: 1.5em;
        margin: 0;
        color: var(--primary);
    }

    .detail-address {
        font-size: 1em;
        color: var(--text-soft);
    }

    .detail-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .detail-card {
        background: var(--card-bg);
        padding: 1em;
        border-radius: 10px;
        text-align: center;
        box-shadow: inset 0 0 10px #0005;
    }

    .detail-card .label {
        font-size: 1em;
        color: var(--primary);
        margin-bottom: 6px;
    }

    .detail-card .value {
        font-size: 1.4em;
        font-weight: bold;
    }

    .detail-card.wide {
        grid-column: span 2;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .info-block {
        margin-top: 20px;
        font-size: 0.9em;
        line-height: 1.6;
        /* border-top: 1px solid #ccc3; */
        padding-top: 10px;
    }

    
    .tab-toggle {
  display: flex;
    justify-content: space-around;
  margin-bottom: 16px;
  background-color: var(--bg-dark);
  border-radius: 40px;
  padding: 5px;
  max-width: 400px;
  margin: 20px auto;
  min-width: 350px;
}

.tab-button {
  flex: 1;
  background-color: transparent;
  color: white;
  border: none;
  border-radius: 30px;
  padding: 10px 0;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
   font-family: 'Poppins', sans-serif;
}

.tab-button.active {
  background-color: var(--primary);
  color: white;
}

.tab-content {
  margin-top: 20px;
}

.horario-container {
  padding: 16px;
  max-width: 400px;
  margin: 0 auto;
  gap: 20px;
  display: flex;
  flex-direction: column;
}

/* Nuevos estilos modernos para las programaciones */
.motor-section {
  background-color: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.motor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.motor-title-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.motor-header h3,
.motor-title {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  flex: 1;
}

.btn-edit-title {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.3s ease;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-edit-title:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-edit-title svg {
  width: 20px;
  height: 20px;
}

/* Estilos para la edición del nombre del relé */
.edit-title-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.edit-title-input {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 8px 12px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  flex: 1;
  outline: none;
  transition: all 0.3s ease;
}

.edit-title-input:focus {
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(0, 172, 161, 0.2);
}

.edit-title-actions {
  display: flex;
  gap: 4px;
}

.btn-save-title,
.btn-cancel-title {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.btn-save-title {
  background-color: var(--primary);
}

.btn-save-title:hover {
  background-color: #009691;
  transform: scale(1.05);
}

.btn-cancel-title {
  background-color: rgba(220, 53, 69, 0.8);
}

.btn-cancel-title:hover {
  background-color: #dc3545;
  transform: scale(1.05);
}

.btn-save-title:disabled,
.btn-cancel-title:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.motor-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.motor-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.motor-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #4a5568;
  transition: .4s;
  border-radius: 28px;
}

.motor-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .motor-slider {
  background-color: var(--primary);
}

input:checked + .motor-slider:before {
  transform: translateX(22px);
}

.motor-content {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Reducir el gap ya que tenemos margin-bottom en las cards */
}

.program-card-modern {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 15px; /* Agregar espacio entre calibraciones */
  transition: all 0.3s ease;
  /* border-left: 4px solid var(--primary); */
}

.program-card-modern.active {
  border-left: 4px solid var(--primary);
}

.program-card-modern.inactive {
  border-left: 4px solid #6b7280;
}

/* Animación para el swipe mode */
.program-card-modern.swipe-mode {
  transform: translateX(-10px);
  background-color: rgba(239, 68, 68, 0.1);
  border-left-color: #ef4444;
}

.program-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.program-info {
  flex: 1;
}

.program-title {
  color: white;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  font-family: 'Poppins', sans-serif;
}

.program-schedule {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
}

.dias-modern {
  color: var(--primary);
  font-weight: 500;
}

.hora-modern, .duracion-modern {
  color: rgba(255, 255, 255, 0.9);
}

.btn-delete-modern {
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

.btn-delete-modern:hover {
  background-color: rgba(107, 114, 128, 0.2);
  opacity: 1;
}

.btn-delete-modern:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.btn-delete-modern svg {
  width: 36px;
  height: 36px;
}

.poolbox-address-button {
  display: block;
  margin-top: 4px;
  padding: 6px 8px;
  border: none;
  border-radius: 8px;
  background: none;
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
  opacity: 0.85;
}

.poolbox-address-button:hover,
.poolbox-address-button:focus {
  background-color: rgba(107, 114, 128, 0.2);
  opacity: 1;
  outline: none;
}

.poolbox-address-button:active {
  background-color: rgba(107, 114, 128, 0.3);
}

.poolbox-address-button .address-main {
  color: white;
  display: block;
}

.poolbox-address-button .address-secondary {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  display: block;
}

/* Botón eliminar deshabilitado para calibraciones activas */
.btn-delete-disabled {
  background: none;
  border: none;
  cursor: not-allowed;
  padding: 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
  transition: all 0.3s;
}

.btn-delete-disabled svg {
  width: 24px;
  height: 24px;
}

.btn-delete-disabled:hover {
  opacity: 0.5;
}

/* Estilo para cuando se hace swipe (modo eliminación) */
.program-card-modern.swipe-mode .btn-delete-modern {
  background-color: #ef4444;
  opacity: 1;
}

.program-card-modern.swipe-mode .btn-delete-modern svg path {
  fill: white;
}

.btn-add-round {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: background-color 0.3s;
  margin-top: 8px;
  max-width: 400px;
  width: 100%;
}

/* Estilos para formulario de edición */
.program-card-modern.editing {
  background-color: rgba(var(--card-bg), 0.9);
}

.program-edit-form {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 12px 12px;
}

.edit-form-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.edit-titulo {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: white;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
}

.edit-titulo:focus {
  outline: none;
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.15);
}

.dias-selector {
  --dia-gap: 8px;
  --dia-pad-x: 16px;
  --dia-row-gap: 6px;
  --dia-target: 46px;
  --dia-size: clamp(44px, calc((100% - (var(--dia-pad-x) * 2) - (var(--dia-gap) * 6)) / 7), var(--dia-target));
  --dia-font-size: 18px;
  --dia-active-glow: 0 1px 5px rgba(0, 172, 161, 0.13);
  --dia-hover-scale: 1.02;
  display: flex;
  column-gap: var(--dia-gap);
  row-gap: var(--dia-row-gap);
  justify-content: center;
  flex-wrap: wrap;
  padding-inline: var(--dia-pad-x);
  width: 100%;
  overflow: visible;
  box-sizing: border-box;
}

.dias-break {
  flex-basis: 100%;
  width: 0;
  height: 0;
  pointer-events: none;
}

.dia-btn {
  width: var(--dia-size);
  height: var(--dia-size);
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 var(--dia-size);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: var(--dia-font-size);
  font-family: 'Poppins', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
  text-align: center;
  position: relative;
  overflow: visible;
}

.dia-btn::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
}

.dia-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: rgba(0, 172, 161, 0.1);
  transform: scale(var(--dia-hover-scale));
}

.dia-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: var(--dia-active-glow);
  transform: scale(1.02);
}

.time-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.time-picker select {
  background-color: transparent;
  border: none;
  color: white;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  padding: 4px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.time-picker select:focus {
  outline: none;
}

.time-picker select option {
  background-color: var(--bg-dark);
  color: white;
  padding: 8px;
}

.time-picker span {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

.range-time-dial-container {
  margin-top: 8px;
}

.range-time-dial-card {
  background: linear-gradient(180deg, rgba(15, 43, 70, 0.85), rgba(12, 35, 58, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 12px 12px 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.range-time-dial-values {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.range-time-chip {
  flex: 1;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.range-time-chip-label {
  font-size: 11px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 4px;
}

.range-time-chip-value {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1;
}

.range-time-dial-card .time-text {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.range-time-chip.active {
  border-color: rgba(0, 172, 161, 0.85);
  box-shadow: 0 0 0 1px rgba(0, 172, 161, 0.35) inset;
}

.range-time-midnight {
  min-height: 18px;
  margin-bottom: 2px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.range-time-midnight.visible {
  opacity: 1;
}

.range-time-dial-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.range-time-dial-svg {
  width: min(92vw, 300px);
  max-width: 300px;
  height: auto;
  touch-action: none;
  user-select: none;
}

.range-time-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 12;
}

.range-time-ticks-major line {
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 2.2;
}

.range-time-ticks-minor line {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1.1;
}

.range-time-range {
  fill: none;
  stroke: var(--primary);
  stroke-width: 10.8;
  stroke-linecap: round;
  filter: none;
  transition: d 0.12s linear;
}

.range-time-gap-dot {
  fill: rgba(15, 43, 70, 0.95);
  stroke: var(--primary);
  stroke-width: 2;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.range-time-gap-dot.visible {
  opacity: 1;
}

.range-time-midnight-tick {
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 2;
  opacity: 0;
  transition: opacity 0.2s ease, stroke 0.2s ease;
}

.range-time-midnight-tick.visible {
  opacity: 1;
  stroke: var(--primary);
}

.range-time-hours {
  pointer-events: none;
}

.range-time-hour-label {
  fill: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
}

.range-time-hour-label.primary {
  fill: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 600;
}

.range-time-handle-hit {
  fill: rgba(0, 0, 0, 0);
  pointer-events: all;
  cursor: grab;
}

.range-time-handle-separator {
  fill: none;
  stroke: rgba(0, 0, 0, 0.42);
  stroke-width: 1;
  pointer-events: none;
}

.range-time-handle {
  fill: rgba(15, 43, 70, 0.95);
  stroke: var(--primary);
  stroke-width: 4;
  cursor: grab;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
  transition: transform 0.12s ease, stroke 0.12s ease, fill 0.12s ease, filter 0.12s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.range-time-handle-core {
  fill: #ffffff;
  stroke: rgba(0, 172, 161, 0.45);
  stroke-width: 1;
  pointer-events: none;
  transition: transform 0.12s ease, filter 0.12s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.range-time-dial-container.dragging .range-time-handle,
.range-time-handle:active {
  cursor: grabbing;
}

.range-time-handle.is-active,
.range-time-handle-core.is-active {
  transform: scale(1.1);
}

.range-time-handle.is-active {
  filter: drop-shadow(0 0 10px rgba(0, 172, 161, 0.5)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.range-time-handle-core.is-active {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.35));
}

.range-time-handle.is-dimmed,
.range-time-handle-core.is-dimmed {
  opacity: 0.6;
}

.range-time-dial-container.handles-overlap .range-time-handle {
  stroke-width: 4.4;
}

.range-time-handle:focus {
  outline: none;
  filter: drop-shadow(0 0 6px rgba(0, 172, 161, 0.8));
}

.range-time-center-duration {
  fill: #ffffff;
  font-size: 22px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  dominant-baseline: middle;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.range-time-center-duration.is-updating {
  transform: scale(1.05);
  opacity: 0.92;
}

.range-time-center-range {
  fill: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  dominant-baseline: middle;
}

.range-time-tooltip rect {
  fill: rgba(15, 43, 70, 0.95);
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1;
}

.range-time-tooltip polygon {
  fill: rgba(15, 43, 70, 0.95);
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1;
  display: none;
}

.range-time-tooltip {
  opacity: 0;
  transition: opacity 0.14s ease;
}

.range-time-tooltip.visible {
  opacity: 1;
}

.range-time-tooltip text {
  fill: #ffffff;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  dominant-baseline: middle;
}

.range-time-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.time-picker.time-picker-wheel {
  position: relative;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  min-height: 132px;
  overflow: hidden;
}

.time-picker.time-picker-wheel::before {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 36px;
  transform: translateY(-50%);
  border-radius: 10px;
  background: rgba(0, 172, 161, 0.22);
  border: 1px solid rgba(0, 172, 161, 0.35);
  pointer-events: none;
}

.wheel-select {
  width: 76px;
  height: 112px;
  border: none;
  outline: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 28px;
  font-weight: 500;
  text-align: center;
  text-align-last: center;
  padding: 0;
  margin: 0;
  z-index: 1;
  scrollbar-width: none;
}

.wheel-select::-webkit-scrollbar {
  display: none;
}

.wheel-select option {
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  padding: 6px 0;
}

.wheel-select option:checked {
  color: #ffffff;
  font-weight: 700;
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cancel, .btn-save {
  padding: 12px 24px;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 15px;
  min-width: 100px;
  text-align: center;
}

.btn-cancel {
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cancel:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-1px);
}

.btn-save {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 172, 161, 0.2);
}

.btn-save:hover {
  /* background-color: #009691; */
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 172, 161, 0.3);
}

.btn-save:disabled, .btn-cancel:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Toggle de activar/desactivar programación */
.program-toggle-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.program-toggle-label {
  color: white;
  font-weight: 500;
  font-size: 16px;
}

.program-toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.program-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.program-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.4s;
  border-radius: 34px;
}

.program-toggle-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.program-toggle-switch input:checked + .program-toggle-slider {
  background-color: var(--primary);
}

.program-toggle-switch input:checked + .program-toggle-slider:before {
  transform: translateX(26px);
}

.program-toggle-switch input:focus + .program-toggle-slider {
  box-shadow: 0 0 1px var(--primary);
}

.program-info {
  cursor: pointer;
  transition: all 0.3s;
}

.program-info:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

/* Responsive para formulario de edición en móviles */
@media (max-width: 768px) {
  .program-edit-form {
    margin: 15px;
  }

  .dias-selector {
    --dia-gap: 6px;
    --dia-pad-x: 12px;
    --dia-row-gap: 6px;
    --dia-target: 44px;
    --dia-size: clamp(44px, calc((100% - (var(--dia-pad-x) * 2) - (var(--dia-gap) * 6)) / 7), var(--dia-target));
    --dia-font-size: 12px;
    --dia-active-glow: 0 1px 3px rgba(0, 172, 161, 0.1);
    --dia-hover-scale: 1.01;
    justify-content: center;
  }

  .dia-btn {
    font-size: var(--dia-font-size);
  }

  .form-actions {
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
  }

  .btn-cancel, .btn-save {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
  }

  .program-toggle-container {
    margin-bottom: 25px;
    padding: 18px;
  }

  .program-toggle-label {
    font-size: 17px;
  }

  .time-picker {
    padding: 12px;
  }

  .time-picker select {
    font-size: 17px;
    padding: 6px;
  }

  /* Responsive para edición de nombre del relé */
  .motor-title-container {
    gap: 6px;
  }

  .edit-title-input {
    font-size: 14px;
    padding: 6px 10px;
  }

  .btn-edit-title svg {
    width: 14px;
    height: 14px;
  }

  .btn-save-title,
  .btn-cancel-title {
    width: 24px;
    height: 24px;
    padding: 4px;
  }

  .edit-title-actions {
    gap: 2px;
  }
}

@media (max-width: 480px) {
  .program-edit-form {
    padding: 16px;
  }
  
  .dias-selector {
    --dia-gap: 6px;
    --dia-pad-x: 12px;
    --dia-row-gap: 5px;
    --dia-target: 44px;
    --dia-size: clamp(44px, calc((100% - (var(--dia-pad-x) * 2) - (var(--dia-gap) * 6)) / 7), var(--dia-target));
    --dia-font-size: 12px;
    --dia-active-glow: none;
    --dia-hover-scale: 1;
  }
  
  .dia-btn {
    font-size: var(--dia-font-size);
  }
  
  .time-picker {
    padding: 12px;
  }
  
  .time-picker select {
    font-size: 18px; /* Más grande para móviles */
    padding: 8px;
    min-width: 50px;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-cancel, .btn-save {
    width: 100%;
    padding: 12px;
  }

  .program-toggle-container {
    padding: 15px;
  }

  .program-toggle-label {
    font-size: 16px;
  }
}

@media (min-width: 1024px) {
  .dias-selector {
    flex-wrap: nowrap;
    row-gap: 0;
  }

  .dias-break {
    display: none;
  }
}

@media (max-width: 420px) {
  .dias-selector {
    flex-wrap: wrap;
    justify-content: center;
    --dia-gap: 6px;
    --dia-pad-x: 12px;
    --dia-row-gap: 5px;
    --dia-target: 44px;
    --dia-size: 44px;
  }
}



.program-status {
  font-size: 12px;
  margin-top: 4px;
  font-weight: 500;
}

.program-status.active {
  color: var(--primary);
}

.program-status.inactive {
  color: rgba(255, 255, 255, 0.5);
}

.no-data, .error {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 20px;
  font-style: italic;
}

.error {
  color: #ff6b6b;
}

.no-programs {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  padding: 20px;
  font-style: italic;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

/* Título removido - ahora cada motor tiene su propio título */

.program-card {
  background-color: var(--card-bg);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); */ 
}

.program-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--text-light);
  font-size: 16px;
}
.program-details {
  display: flex;
  font-weight: 400;
  margin-top: 8px;
  font-size: 14px;
  text-align: left;
  color: rgba(255, 255, 255, 0.8);
  gap: 12px;
  font-family: 'Poppins', sans-serif;
  align-items: center;
}

.program-details .separador {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
}

.program-details .dias {
  font-weight: 500;
  color: var(--primary);
}

.program-details .hora {
  font-weight: 500;
}

.program-details .duracion {
  font-weight: 500;
}

.btn-add {
  margin-top: 20px;
  padding: 10px 16px;
  font-size: 16px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  width: 100%;
   font-family: 'Poppins', sans-serif;
}

.btn-delete {
  background: none;
  border: none;
  font-size: 18px;
  color: #ff6b6b;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
}

.btn-delete:hover {
  background-color: rgba(255, 107, 107, 0.1);
  color: #ff5252;
}

.tab-wrapper {
  background-color: #183153; /* o el azul claro exacto de tus tarjetas */
  padding: 5px;
  border-radius: 20px;
  margin: 20px auto;
}



    @media (max-width: 600px) {
        .container {
            max-width: 100vw;
            padding: 0.5em;
            gap: 0.7em;
        }

        .logo-container {
            margin: 1.2em auto 1em auto;
            padding: 0 0.5em;
            max-width: calc(100vw - 1em);
        }

        .logo-container img,
        .logo-container svg {
            max-width: 200px;
        }

        .card {
            padding: 1.2em 0.5em;
        }

        .card .label {
            font-size: 1.5em;
            color: var(--primary);
        }

        .card .value {
            font-size: 2em;
            color: var (--text-light);
        }

        .info-block {
            font-size: 1.1em;
        }

        .footer {
            font-size: 1em;
        }

        .switch {
            width: 60px;
            height: 32px;
        }

        .slider {
            border-radius: 32px;
        }

        .slider:before {
            width: 24px;
            height: 24px;
            left: 4px;
            bottom: 4px;
        }

        input:checked+.slider:before {
            transform: translateX(28px);
        }

        .navbar {
            height: 140px;
            /* Ajusta según lo que necesites */
        }

        .nav-item {
            font-size: 14px;
            padding: 4px 6px;
        }

        .nav-item img {
            width: 60px;
            height: 60px;
        }

    }

/* ===== CALIBRACIONES - DISEÑO COMPACTO ===== */
.calibraciones-container {
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.calibraciones-header {
  display: none; /* Ocultamos el header anterior */
}

.calibraciones-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calibracion-item-compact {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.calibracion-item-compact:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.calibracion-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calibracion-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calibracion-nombre-compact {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.calibracion-estado-compact {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calibracion-estado-compact.activa {
  background: var(--primary);
  box-shadow: 0 0 8px rgba(0, 196, 204, 0.6);
}

.calibracion-estado-compact.inactiva {
  background: #ff6b6b;
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.6);
}

.calibracion-fecha-compact {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 400;
}

.calibracion-valores-compact {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
}

.btn-add-calibracion-compact {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 20px auto 0;
  box-shadow: 0 4px 12px rgba(0, 196, 204, 0.3);
}

.btn-add-calibracion-compact:hover {
  /* background: #00a8b0; */
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 196, 204, 0.4);
}

.add-icon-compact {
  color: white;
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
}

/* ===== PESTAÑAS ACTUALIZADAS ===== */
.tab-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  padding: 4px;
  margin: 20px auto;
  width: fit-content;
  backdrop-filter: blur(10px);
}

.tab-button {
  background: transparent;
  border: none;
  padding: 12px 24px;
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tab-button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 196, 204, 0.3);
}

.tab-button:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ===== MODAL CALIBRACIONES - NUEVO DISEÑO ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: linear-gradient(135deg, #2a4a7a 0%, #1e3862 100%);
  border-radius: 16px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-medicion {
  max-width: 400px;
  text-align: center;
}

.modal-header {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  color: #fff;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 30px;
  overflow-y: auto;
}

.modal-body p {
  color: #fff;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.intervencion-estado {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  max-width: 100%;
  white-space: nowrap;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.intervencion-estado[data-estado="Completada"] {
  background: rgba(47, 142, 104, 0.2);
  color: #b9f6d0;
  border-color: rgba(47, 142, 104, 0.5);
}

.intervencion-estado[data-estado="Cancelada"] {
  background: rgba(217, 83, 79, 0.2);
  color: #ffdede;
  border-color: rgba(217, 83, 79, 0.5);
}

.intervencion-estado[data-estado="En Curso"] {
  background: rgba(52, 152, 219, 0.2);
  color: #d3ecff;
  border-color: rgba(52, 152, 219, 0.45);
}

.intervencion-estado[data-estado="Pendiente"] {
  background: rgba(232, 196, 73, 0.2);
  color: #fff2c2;
  border-color: rgba(232, 196, 73, 0.45);
}

.modal-content.modal-tarea {
  width: 100%;
  max-width: 400px;
  margin: 0 16px;
  box-sizing: border-box;
}

.modal-content.modal-tarea .modal-header {
  padding: 24px 28px 12px 28px;
}

.modal-content.modal-tarea .modal-body {
  padding: 20px 28px 24px 28px;
}

.modal-content.modal-tarea .modal-actions {
  padding: 20px 28px 24px 28px;
}

/* ===== CAMPOS DE CALIBRACIÓN ===== */
.calibracion-campo {
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calibracion-label {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.calibracion-input-container {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}

.calibracion-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 20px;
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  outline: none;
}

.calibracion-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.calibracion-unidad {
  position: absolute;
  right: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  font-weight: 500;
  pointer-events: none;
}

/* ===== BOTONES DE CALIBRACIÓN ===== */
.btn-medir {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 196, 204, 0.3);
}

.btn-medir:hover {
  /* background: #00a8b0; */
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 196, 204, 0.4);
}

.btn-cancelar {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-cancelar:hover {
  background: #c0392b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.modal-actions {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-cancel, .btn-confirm, .btn-save {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.3);
}

.btn-confirm, .btn-save {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}

.btn-confirm:hover, .btn-save:hover {
  /* background: #00a8b0; */
  border-color: var(--primary);
}

/* ===== RESPONSIVE MODAL ===== */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .calibracion-input {
    font-size: 20px;
    padding: 16px;
  }

  .btn-medir, .btn-cancelar {
    padding: 14px 28px;
    font-size: 15px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .btn-cancel, .btn-confirm, .btn-save {
    width: 100%;
  }
}

/* ===== RESPONSIVE CALIBRACIONES ===== */
@media (max-width: 768px) {
  .calibraciones-container {
    padding: 15px;
  }

  .calibracion-item-compact {
    padding: 14px;
  }

  .calibracion-nombre-compact {
    font-size: 15px;
  }

  .calibracion-fecha-compact {
    font-size: 11px;
  }

  .calibracion-valores-compact {
    font-size: 12px;
  }

  .btn-add-calibracion-compact {
    width: 45px;
    height: 45px;
  }

  .add-icon-compact {
    font-size: 22px;
  }

  .modal-content {
    width: 95%;
  }

  .modal-actions {
    flex-direction: column;
  }

  .btn-cancel, .btn-confirm, .btn-save {
    width: 100%;
    max-width: 400px;
  }

  .tab-button {
    padding: 10px 18px;
    font-size: 13px;
  }
}

/* Modal de medición */
#medicionModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

#medicionModal .modal-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#medicionModal h3 {
  color: #00d4ff;
  margin-bottom: 20px;
  font-size: 1.2em;
}

#medicionMensaje {
  color: white;
  margin-bottom: 30px;
  font-size: 1.1em;
  line-height: 1.4;
}

#medicionModal .modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

#medicionModal .btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
}

#medicionModal .btn-success {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

#medicionModal .btn-success:hover {
  background: linear-gradient(135deg, #218838, #1fa085);
  transform: translateY(-2px);
}

#medicionModal .btn-cancel {
  background: linear-gradient(135deg, #dc3545, #fd7e14);
  color: white;
}

#medicionModal .btn-cancel:hover {
  background: linear-gradient(135deg, #c82333, #e8690b);
  transform: translateY(-2px);
}

/* Responsive para modal de medición */
@media (max-width: 768px) {
  #medicionModal .modal-content {
    padding: 20px;
    max-width: 95%;
  }
  
  #medicionModal .modal-buttons {
    flex-direction: column;
  }
  
  #medicionModal .btn {
    width: 100%;
  }
}

/* Editor de calibración integrado */
.calibracion-editor {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 20px;
  margin: 20px 0;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: center; /* Centrar el título */
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.editor-header h3 {
  margin: 0;
  color: #00d4ff;
  font-size: 1.5em;
}

.btn-back {
  background: linear-gradient(135deg, #6c757d, #495057);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: linear-gradient(135deg, #5a6268, #3d4142);
  transform: translateY(-2px);
}

.editor-content {
  margin-top: 20px;
}

.calibracion-acciones {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  justify-content: center; /* Centrar los botones */
}

.btn-aplicar {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 196, 204, 0.3);
  width: 100%;
  max-width: 400px;
}

.btn-aplicar:hover {
  /* background: #00a8b0; */
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 196, 204, 0.4);
}

.btn-guardar {
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  width: 100%;
  max-width: 400px;
}

.btn-guardar:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.btn-cancelar-editor {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
  width: 100%;
  max-width: 400px;
}

.btn-cancelar-editor:hover {
  background: linear-gradient(135deg, #c82333, #a71e2a);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}

/* Responsive para editor de calibración */
@media (max-width: 768px) {
  .calibracion-editor {
    margin: 10px 0;
    padding: 15px;
  }
  
  .editor-header {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
  
  .calibracion-acciones {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-aplicar,
  .btn-guardar,
  .btn-cancelar-editor {
    width: 100%;
    max-width: 280px;
    padding: 16px 32px; /* Mantener el mismo padding que en desktop */
  }
}

/* Estilos para el loading spinner en modal de medición */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 30px 20px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #00d4ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loadingMessage {
  color: #00d4ff;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.loading-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin: 0;
  font-style: italic;
}

/* Asegurar que el modal tenga posición relativa para el overlay */
.modal-medicion {
  position: relative;
  overflow: hidden;
}

/* Responsive para loading */
@media (max-width: 768px) {
  .loading-overlay {
    border-radius: 16px;
  }
  
  .loading-container {
    padding: 20px 15px;
    gap: 15px;
  }
  
  .loading-spinner {
    width: 35px;
    height: 35px;
    border-width: 3px;
  }
  
  #loadingMessage {
    font-size: 16px;
  }
  
  .loading-subtitle {
    font-size: 13px;
  }
}

/* ==== ESTILOS PARA LA PÁGINA "ACERCA DE" ==== */
.header-with-back {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0, 196, 204, 0.3);
}

.back-btn {
  background: rgba(0, 196, 204, 0.1);
  border: 1px solid rgba(0, 196, 204, 0.3);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s;
  color: #00c4cc;
}

.back-btn:hover {
  background: rgba(0, 196, 204, 0.2);
  border-color: #00c4cc;
}

.header-with-back h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
  color: #0a4d6b;
}

/* Sección de empresa */
.company-section {
  text-align: center;
  margin-bottom: 35px;
  padding: 25px;
  background: rgba(0, 196, 204, 0.05);
  border-radius: 15px;
  border: 1px solid rgba(0, 196, 204, 0.1);
}

.company-logo {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.company-section h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #0a4d6b;
  line-height: 1.3;
}

.company-description {
  font-size: 1rem;
  line-height: 1.6;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* Secciones de información */
.info-section {
  margin-bottom: 30px;
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 196, 204, 0.1);
}

.section-title {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #0a4d6b;
}

/* Lista de contactos */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(0, 196, 204, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(0, 196, 204, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 196, 204, 0.15);
}

.contact-icon {
  background: rgba(0, 196, 204, 0.1);
  border-radius: 10px;
  padding: 12px;
  color: #00c4cc;
  flex-shrink: 0;
}

.contact-details {
  flex: 1;
}

.contact-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0a4d6b;
  margin-bottom: 5px;
}

.contact-value {
  color: #666;
  text-decoration: none;
  line-height: 1.4;
}

.contact-value:hover {
  color: #00c4cc;
}

/* Lista de características */
.features-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  background: rgba(0, 196, 204, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(0, 196, 204, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 196, 204, 0.15);
}

.feature-icon {
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: 5px;
}

.feature-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #0a4d6b;
}

.feature-content p {
  color: #666;
  line-height: 1.5;
  margin: 0;
}

/* Certificación */
.certification-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: rgba(0, 196, 204, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(0, 196, 204, 0.1);
}

.ce-badge {
  background: #0a4d6b;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.certification-content h4 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0a4d6b;
}

.certification-content p {
  margin: 0;
  color: #666;
  line-height: 1.5;
}

/* Información de la aplicación */
.app-info-section {
  background: linear-gradient(135deg, rgba(0, 196, 204, 0.05), rgba(10, 77, 107, 0.05));
}

.app-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 196, 204, 0.1);
}

.app-detail-row:last-child {
  border-bottom: none;
}

.app-label {
  font-weight: 600;
  color: #0a4d6b;
}

.app-value {
  color: #666;
  font-weight: 500;
}

/* Footer responsive */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 77, 107, 0.95);
  backdrop-filter: blur(10px);
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 0.9rem;
  /* z-index: 1000; */
  border-top: 1px solid rgba(0, 196, 204, 0.3);
}

/* Ajuste para evitar que el contenido se solape con el footer */
#main-content {
  padding-bottom: 70px;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header-with-back h1 {
    font-size: 1.5rem;
  }

  .company-section h2 {
    font-size: 1.2rem;
  }

  .company-logo {
    width: 100px;
  }

  .info-section {
    padding: 20px;
  }

  .contact-item,
  .feature-item {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .certification-card {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .app-detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .footer {
    font-size: 0.8rem;
    padding: 12px;
  }

  #main-content {
    padding-bottom: 60px;
  }
}

/* ==== ESTILOS PARA PESTAÑA ACERCA DE ==== */
.acerca-section {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #0a3a52 100%);
  border-radius: 20px;
  overflow: hidden;
}

.acerca-section .motor-header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  padding: 30px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.company-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.company-logo-about {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.acerca-content {
  padding: 30px;
}

.contact-info-card {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-item-about {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.contact-item-about:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.contact-icon-about {
  background: var(--primary);
  border-radius: 12px;
  padding: 12px;
  color: white;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-details-about {
  color: white;
  line-height: 1.6;
  font-size: 15px;
}

.contact-details-about strong {
  color: var(--primary);
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

.contact-details-about a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-details-about a:hover {
  color: var(--primary);
}

/* Responsive para pestaña Acerca de */
@media (max-width: 768px) {
  .acerca-section .motor-header {
    padding: 20px;
  }

  .company-logo-about {
    width: 100px;
  }

  .acerca-content {
    padding: 20px;
  }

  .contact-item-about {
    padding: 15px;
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .contact-details-about {
    text-align: center;
  }
}

/* Pull-to-refresh styles */
.pull-to-refresh {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), #00BCD4);
  transform: translateY(-100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 172, 161, 0.3);
  opacity: 0;
  pointer-events: none;
}

.pull-to-refresh.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.pull-to-refresh.refreshing {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.refresh-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  font-weight: 600;
  width: auto;
  height: auto;
  max-width: 100px;
  max-height: 50px;
}

.refresh-icon {
  width: 20px !important;
  height: 20px !important;
  margin-bottom: 4px;
  transition: transform 0.3s ease;
  max-width: 20px;
  max-height: 20px;
  min-width: 20px;
  min-height: 20px;
  flex-shrink: 0;
  flex-grow: 0;
  display: block;
}

.refresh-icon.spinning {
  animation: spin 1s linear infinite;
}

.refresh-text {
  font-size: 12px;
  text-align: center;
  line-height: 1.2;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Botón de actualización para desktop */
.desktop-refresh-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
}

.refresh-button {
  background: linear-gradient(135deg, var(--primary), #00BCD4);
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 172, 161, 0.3);
  transition: all 0.3s ease;
  color: white;
}

.refresh-button svg {
  width: 18px;
  height: 18px;
  max-width: 18px;
  max-height: 18px;
}

.refresh-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 172, 161, 0.4);
}

.refresh-button:active {
  transform: scale(0.95);
}

.refresh-button.spinning svg {
  animation: spin 1s linear infinite;
}

/* Ocultar botón en móviles */
@media (max-width: 768px) {
  .desktop-refresh-btn {
    display: none !important;
  }
}

/* Mejoras para touch en móviles */
@media (max-width: 768px) {
  body {
    /* Prevenir zoom accidental */
    touch-action: manipulation;
  }
  
  .container, .poolbox-list, .horario-container {
    touch-action: pan-y;
  }
  
  /* Haptic feedback para elementos interactivos */
  .card, .tab-button, .btn-primary, .nav-item {
    -webkit-tap-highlight-color: rgba(0, 172, 161, 0.3);
    transition: transform 0.1s ease;
  }
  
  /* Efecto de presión en elementos táctiles */
  .card:active, .tab-button:active, .btn-primary:active, .nav-item:active {
    transform: scale(0.98);
  }
  
  /* Mejorar área de toque mínima (44px recomendado por Apple) */
  .nav-item, .tab-button {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ==== ESTILOS PARA CONFIGURACIÓN ==== */
.config-container {
  padding: 20px;
  max-width: 400px;
  margin: 0 auto;
  display: none;
}

.config-option {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.config-option-content {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 16px;
}

.config-icon {
  background: var(--primary);
  border-radius: 10px;
  padding: 8px;
  color: white;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.config-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.config-title {
  color: white;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
}

.config-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
}

.config-arrow {
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

@media (hover: hover) {
  .config-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .config-option:hover .config-arrow {
    color: var(--primary);
    transform: translateX(2px);
  }
}

.config-option:active {
  background: rgba(255, 255, 255, 0.08);
}

/* Responsive para configuración */
@media (max-width: 768px) {
  .config-container {
    padding: 15px;
  }
  
  .config-option-content {
    padding: 14px;
    gap: 14px;
  }
  
  .config-icon {
    padding: 6px;
  }
  
  .config-title {
    font-size: 15px;
  }
  
  .config-description {
    font-size: 13px;
  }
}

/* ==== ESTILOS PARA ACERCA DE ==== */
.about-container {
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
  display: none;
}

.about-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
}

.about-company h2 {
  color: white;
  font-size: 20px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  text-align: center;
  margin: 0 0 20px 0;
  background: linear-gradient(135deg, var(--primary) 0%, #1e88e5 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-company p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  margin: 10px 0;
}

.about-section h3 {
  color: var(--primary);
  font-size: 18px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  margin: 0 0 15px 0;
  border-bottom: 2px solid rgba(25, 118, 210, 0.3);
  padding-bottom: 8px;
}

.about-features ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-features li {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  margin: 10px 0;
  padding-left: 25px;
  position: relative;
}

.about-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
  font-size: 16px;
}

/* Responsive para acerca de */
@media (max-width: 768px) {
  .about-container {
    padding: 15px;
  }
  
  .about-section {
    padding: 16px;
    margin-bottom: 12px;
  }
  
  .about-company h2 {
    font-size: 18px;
  }
  
  .about-company p,
  .about-features li {
    font-size: 14px;
  }
  
  .about-section h3 {
    font-size: 16px;
  }

  /* ✅ Estilos responsive para notificaciones */
  .notificacion-card {
    width: 100%;
    max-width: 370px;
  }

  .notificacion-titulo {
    font-size: 15px;
  }

  .notificacion-mensaje {
    font-size: 13px;
  }
}

/* Estilos para la página Acerca de */


.about-option-content {
  display: flex;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}

.about-option-content svg {
  margin-right: 12px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px; /* Pequeño ajuste para alinear con el texto */
}

.about-option-content span {
  color: white;
  font-family: 'Poppins', sans-serif;
  line-height: 1.5;
  flex: 1;
}

/* Estilos para Intervenciones */
.intervencion-badge-pill {
  position: absolute;
  top: 18px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.intervencion-info {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.tareas-section h4 {
  color: white;
  margin-bottom: 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
}

.tarea-item {
  margin-bottom: 12px;
}

.tarea-completada {
  opacity: 0.8;
}

.tarea-cancelada {
  opacity: 0.6;
}

.intervencion-acciones {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-back {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease;
}

.btn-back:hover {
  transform: translateX(-3px);
}

/* Modal de edición de tarea */
.modal .modal-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-input {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.15);
}

.form-input option {
  background: #1a1a1a;
  color: white;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-field label {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 500;
}

.form-error {
  color: #ffb3b3;
  font-size: 13px;
  line-height: 1.3;
}

/* Estilo para cuando se hace swipe en intervenciones (modo eliminación) */
.poolbox-card.swipe-mode .btn-delete-modern {
  background-color: #ef4444;
  opacity: 1;
}

.poolbox-card.swipe-mode .btn-delete-modern svg path {
  fill: white;
}

/* ========================================
   INDICADORES VISUALES DE RANGO (PH/ORP) - SLIDER
   ======================================== */

.slider-indicator {
  margin-top: 10px;
  padding-top: 10px;
  padding-left: 8px;
  padding-right: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  box-sizing: border-box;
}

/* Contenedor del slider con marcadores */
.slider-container {
  position: relative;
  width: 100%;
  padding-bottom: 20px;
}

/* Contenedor de marcadores */
.range-markers {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 0;
  pointer-events: none;
  z-index: 0;
}

/* Marcador individual (contenedor del triángulo y label) */
.range-marker {
  position: absolute;
  top: 0;
  pointer-events: none;
}

/* Triángulo marcador apuntando hacia arriba */
.marker-triangle {
  position: absolute;
  top: calc(50% + 1px);
  left: 0;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid var(--primary);
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.85;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
  transition: top 0.15s ease-out;
}

/* Etiqueta de valor debajo del triángulo */
.marker-label {
  position: absolute;
  top: calc(50% + 14px);
  left: 0;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--primary);
  opacity: 0.85;
  pointer-events: none;
  white-space: nowrap;
  font-weight: 500;
}

/* Slider personalizado - track fino, thumb pequeño */
.range-slider {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  outline: none;
  margin: 12px 0;
  padding: 0;
  cursor: default;
  height: 14px;
  pointer-events: none;
}

/* Track - Webkit/Chrome/Safari */
.range-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  cursor: default;
}

/* Track para PH - Webkit */
#phSlider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, 
    rgba(0, 172, 161, 0.3) 0%,
    rgba(0, 172, 161, 0.5) 33%,
    rgba(0, 172, 161, 1) 47%,
    rgba(0, 172, 161, 1) 73%,
    rgba(0, 172, 161, 0.5) 87%,
    rgba(0, 172, 161, 0.3) 100%
  );
}

/* Track para ORP - Webkit */
#orpSlider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, 
    rgba(0, 172, 161, 0.3) 0%,
    rgba(0, 172, 161, 0.5) 17%,
    rgba(0, 172, 161, 1) 33%,
    rgba(0, 172, 161, 1) 67%,
    rgba(0, 172, 161, 0.5) 83%,
    rgba(0, 172, 161, 0.3) 100%
  );
}

/* Thumb (punto deslizante) - Webkit/Chrome/Safari */
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 224, 208, 0.95);
  border: none;
  box-shadow: none;
  cursor: default;
  margin-top: -2px;
  position: relative;
  pointer-events: none;
}

/* Track - Firefox */
.range-slider::-moz-range-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  cursor: default;
  border: none;
}

/* Track para PH - Firefox */
#phSlider::-moz-range-track {
  background: linear-gradient(to right, 
    rgba(0, 172, 161, 0.3) 0%,
    rgba(0, 172, 161, 0.5) 33%,
    rgba(0, 172, 161, 1) 47%,
    rgba(0, 172, 161, 1) 73%,
    rgba(0, 172, 161, 0.5) 87%,
    rgba(0, 172, 161, 0.3) 100%
  );
}

/* Track para ORP - Firefox */
#orpSlider::-moz-range-track {
  background: linear-gradient(to right, 
    rgba(0, 172, 161, 0.3) 0%,
    rgba(0, 172, 161, 0.5) 17%,
    rgba(0, 172, 161, 1) 33%,
    rgba(0, 172, 161, 1) 67%,
    rgba(0, 172, 161, 0.5) 83%,
    rgba(0, 172, 161, 0.3) 100%
  );
}

/* Thumb - Firefox */
.range-slider::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 224, 208, 0.95);
  border: none;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

/* Progress - Firefox */
.range-slider::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0px;
}



/* Aumentar altura de tarjetas con indicador */
#phCard.has-indicator,
#orpCard.has-indicator {
  max-height: none;
  min-height: 130px;
}