/* Tema inspirado en Material Design. Se activa por página con <body class="tema-google">
   y solo en escritorio (>= 769 px): la app se migra por etapas, pantalla por pantalla.
   Colores siempre por variable: el modo noche solo redefine las variables. */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/roboto-latin.woff2') format('woff2');
}

body.tema-google {
  --tg-fondo: #f0f4f9;
  --tg-hoja: #ffffff;
  --tg-suave: #f0f4f9;
  --tg-campo: #e9eef6;
  --tg-linea: #e3e3e3;
  --tg-texto: #1f1f1f;
  --tg-texto-2: #444746;
  --tg-primario: #0b57d0;
  --tg-tonal: #d3e3fd;
  --tg-tonal-texto: #041e49;
  --tg-activo: #c2e7ff;
  --tg-activo-texto: #001d35;
  --tg-error: #f9dedc;
  --tg-error-texto: #8c1d18;
  --tg-hover: rgba(68, 71, 70, .08);
  --tg-clima-dia: rgba(255, 255, 255, .55);
  --tg-sombra: 0 2px 6px rgba(31, 31, 31, .15), 0 1px 2px rgba(31, 31, 31, .2);
  --tg-peligro: #b3261e;
  --tg-peligro-texto: #ffffff;
  --tg-ok: #c4eed0;
  --tg-ok-texto: #0c3a1c;
  --tg-aviso: #ffdf9e;
  --tg-aviso-texto: #4d3700;
}
html.night body.tema-google {
  --tg-fondo: #131314;
  --tg-hoja: #1e1f20;
  --tg-suave: #282a2c;
  --tg-campo: #282a2c;
  --tg-linea: #3c4043;
  --tg-texto: #e3e3e3;
  --tg-texto-2: #c4c7c5;
  --tg-primario: #a8c7fa;
  --tg-tonal: #0842a0;
  --tg-tonal-texto: #d3e3fd;
  --tg-activo: #004a77;
  --tg-activo-texto: #c2e7ff;
  --tg-error: #8c1d18;
  --tg-error-texto: #f9dedc;
  --tg-hover: rgba(227, 227, 227, .08);
  --tg-clima-dia: rgba(255, 255, 255, .1);
  --tg-sombra: 0 2px 6px rgba(0, 0, 0, .5);
  --tg-peligro: #f2b8b5;
  --tg-peligro-texto: #601410;
  --tg-ok: #0f5223;
  --tg-ok-texto: #c4eed0;
  --tg-aviso: #5c4300;
  --tg-aviso-texto: #ffdf9e;
}

.tg-barra { display: none; }

@media (min-width: 769px) {
  body.tema-google { --sidebar-full-w: 268px; }
  html body.tema-google, html.night body.tema-google {
    padding: 0; background: var(--tg-fondo); color: var(--tg-texto);
    font-family: Roboto, Arial, sans-serif;
  }
  body.tema-google #sidebar-toggle, body.tema-google #sidebar .logo-section { display: none; }

  /* barra superior */
  /* z-index por debajo de la barra lateral (999) y de los modales (1000+) */
  .tema-google .tg-barra { position: fixed; z-index: 998; top: 0; left: 0; right: 0; height: 64px; box-sizing: border-box;
    display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--tg-fondo); color: var(--tg-texto-2); }
  .tg-marca { flex: 0 0 198px; display: flex; align-items: center; gap: 10px; color: var(--tg-texto); text-decoration: none; font-size: 22px; }
  .tg-marca img { width: 28px; height: 28px; }
  .tg-ico { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
    background: none; color: var(--tg-texto-2); cursor: pointer; }
  .tg-ico:hover { background: var(--tg-hover); }
  .tg-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .tg-insignia { position: absolute; top: 4px; right: 2px; min-width: 16px; height: 16px; box-sizing: border-box; padding: 0 4px; border-radius: 99px;
    background: #b3261e; color: #fff; font-size: 11px; line-height: 16px; text-align: center; }
  .tg-insignia[hidden] { display: none; }
  .tg-cuenta { flex: none; width: 36px; height: 36px; margin: 0 4px; padding: 0; border: 0; border-radius: 50%; background: var(--tg-primario);
    color: var(--tg-hoja); font: 500 15px Roboto, Arial, sans-serif; cursor: pointer; }
  .tg-espacio { flex: 1; }

  /* buscador */
  .tg-buscar { position: relative; flex: 1 1 320px; max-width: 720px; display: flex; align-items: center; gap: 12px; height: 48px; box-sizing: border-box;
    padding: 0 16px; border-radius: 24px; background: var(--tg-campo); color: var(--tg-texto-2); }
  .tg-buscar:focus-within { background: var(--tg-hoja); box-shadow: var(--tg-sombra); }
  .tg-buscar svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .tg-buscar input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: none; color: var(--tg-texto); font: 16px Roboto, Arial, sans-serif; }
  .tg-buscar input::placeholder { color: var(--tg-texto-2); opacity: 1; }
  .tg-resultados { position: absolute; top: 52px; left: 0; right: 0; margin: 0; padding: 8px; list-style: none; border-radius: 16px;
    background: var(--tg-hoja); box-shadow: var(--tg-sombra); max-height: 60vh; overflow-y: auto; }
  .tg-resultados[hidden] { display: none; }
  .tg-resultados a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--tg-texto); text-decoration: none; font-size: 14px; }
  .tg-resultados a small { color: var(--tg-texto-2); font-size: 12px; }
  .tg-resultados a:hover, .tg-resultados a.activo { background: var(--tg-hover); }
  .tg-vacio { padding: 9px 12px; color: var(--tg-texto-2); }

  /* menú lateral */
  html body.tema-google #sidebar, html.night body.tema-google #sidebar { top: 64px; height: calc(100% - 64px); padding: 4px 12px 12px; background: var(--tg-fondo); color: var(--tg-texto); }
  html body.tema-google #sidebar:not(.active) { padding: 4px 12px 12px; }
  body.tema-google #sidebar .menu:not(.menu-bottom) { scrollbar-color: var(--tg-linea) transparent; }
  body.tema-google #sidebar .menu:not(.menu-bottom)::-webkit-scrollbar-track { background: transparent; }
  body.tema-google #sidebar .menu:not(.menu-bottom)::-webkit-scrollbar-thumb { background: var(--tg-linea); }
  html body.tema-google #sidebar .menu a, html.night body.tema-google #sidebar .menu a { border-radius: 999px; background: none; color: var(--tg-texto); }
  html body.tema-google #sidebar .menu a:hover { background: var(--tg-hover); }
  html body.tema-google #sidebar .menu a.active, html.night body.tema-google #sidebar .menu a.active,
  html body.tema-google #sidebar .menu li.split-active > a, html.night body.tema-google #sidebar .menu li.split-active > a { background: var(--tg-activo); color: var(--tg-activo-texto); font-weight: 700; }
  html body.tema-google #sidebar .menu li.menu-group-title { padding: 12px 16px 4px; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--tg-texto-2); }

  /* la opción de la pantalla actual: la píldora blanca vieja deja paso a la del tema */
  html body.tema-google #sidebar .menu li.split-active, html.night body.tema-google #sidebar .menu li.split-active { display: block; padding: 0; margin: 0; border-radius: 999px; background: none; box-shadow: none; }
  body.tema-google #sidebar .menu li.split-active .ico-reload { display: none; }
  /* menú compacto: los 14 módulos caben sin desplazar */
  html body.tema-google #sidebar.active .menu:not(.menu-bottom) li:not(.menu-group-title) > a { display: flex; align-items: center; box-sizing: border-box; height: 34px; margin: 0; padding: 0 16px; font-size: 14px; white-space: nowrap; }
  html body.tema-google #sidebar.active .menu:not(.menu-bottom) li:first-child > a { height: 40px; margin-bottom: 2px; }
  html body.tema-google #sidebar.active .menu:not(.menu-bottom) a img.ico { width: 18px; height: 18px; margin-right: 12px; }
  html body.tema-google #sidebar:not(.active) .menu:not(.menu-bottom) li.menu-group-title { padding: 4px 0; }

  /* los iconos del menú son blancos: en modo día se oscurecen */
  html:not(.night) body.tema-google #sidebar .menu:not(.menu-bottom) a img.ico { filter: brightness(0) opacity(.72); }
  html:not(.night) body.tema-google #sidebar .menu:not(.menu-bottom) a.active img.ico,
  html:not(.night) body.tema-google #sidebar .menu:not(.menu-bottom) li.split-active > a img.ico { filter: brightness(0); }
  /* Recargar pasa a la barra superior */
  body.tema-google #sidebar .menu li:has(> a[onclick*="recargarMapa"]) { display: none; }

  /* cuenta: el menú de usuario cuelga del círculo de arriba */
  body.tema-google #sidebar .user-placeholder { display: none; }
  html body.tema-google #sidebar .sidebar-user-menu { position: fixed; top: 64px; right: 16px; bottom: auto; left: auto; width: 280px; padding: 8px;
    border: 0; border-radius: 16px; background: var(--tg-hoja); color: var(--tg-texto); box-shadow: var(--tg-sombra); }
  html body.tema-google #sidebar .sidebar-user-menu a, html body.tema-google #sidebar .sidebar-user-menu span { color: var(--tg-texto); font-size: 14px; }
  html body.tema-google #sidebar .sidebar-user-menu a { border-radius: 10px; }

  /* hoja del contenido */
  html body.tema-google #main-content { box-sizing: border-box; min-height: calc(100vh - 80px); margin-top: 64px; margin-right: 16px; margin-bottom: 16px;
    padding: 24px; border-radius: 16px; background: var(--tg-hoja); }
  body.tema-google #main-content::before, body.tema-google #main-content::after { display: none; }
  html body.tema-google h1, html.night body.tema-google h1 { color: var(--tg-texto); font-weight: 400; }
}

/* El modo noche viejo (night-mode.css) pinta textos y campos: aquí manda el tema. */
@media (min-width: 769px) {
  html.night:has(body.tema-google), html:has(body.tema-google) { background: #f0f4f9; }
  html.night:has(body.tema-google) { background: #131314; }
  html.night body.tema-google .tg-marca,
  html.night body.tema-google #inicioEsc a,
  html.night body.tema-google #inicioEsc strong,
  html.night body.tema-google #inicioEsc h2 { color: inherit; }
  html.night body.tema-google .tg-marca { color: var(--tg-texto); }
  html.night body.tema-google .tg-buscar input,
  html.night body.tema-google .tg-buscar input:focus { background: transparent !important; color: var(--tg-texto) !important; border: 0 !important; box-shadow: none !important; }
  html.night body.tema-google .tg-ico { background: none; color: var(--tg-texto-2); }
  html.night body.tema-google .tg-ico:hover { background: var(--tg-hover); }
}

/* Encabezados fijos de las páginas: bajo la barra superior, no debajo de ella. */
@media (min-width: 769px) {
  body.tema-google .reg-dia { top: 64px; }
}

@media (min-width: 769px) {
  /* el icono de la pantalla actual es oscuro de fábrica: en noche va claro sobre su píldora */
  html.night body.tema-google #sidebar .menu:not(.menu-bottom) li.split-active > a img.ico { filter: brightness(0) invert(1); }
  /* night-mode.css fija el fondo de la página con !important */
  html.night body.tema-google { background: var(--tg-fondo) !important; }
}

/* ===================== Contenido migrado: <body class="tema-google tg-cont"> (KPI, Equipos y mapas) ===================== */
.tg-fincas { display: none; }
@media (min-width: 769px) {
  body.tg-cont { --tg-fuente-num: 32px; }
  body.tg-cont #main-content { position: relative; }
  html body.tg-cont #main-content > h1 { margin: 0 0 14px; font-size: 28px; }
  body.tg-cont #main-content > h1 img { display: none; }

  /* filtros y hora */
  body.tg-cont #controls { margin-bottom: 8px; }
  body.tg-cont .kpi-controls { gap: 12px; color: var(--tg-texto-2); font-size: 13px; }
  body.tg-cont .kpi-controls .small { font-size: 12px; font-weight: 400; opacity: 1; color: var(--tg-texto-2); }
  html body.tg-cont .kpi-controls select, html body.tg-cont .kpi-controls input[type="text"],
  html.night body.tg-cont .kpi-controls select, html.night body.tg-cont .kpi-controls input[type="text"] {
    height: 32px; box-sizing: border-box; padding: 0 10px; border: 1px solid var(--tg-linea); border-radius: 8px; background: var(--tg-hoja); color: var(--tg-texto); box-shadow: none; font-size: 13px; }
  html body.tg-cont .finca-filtro button, html.night body.tg-cont .finca-filtro button { height: 32px; padding: 0 14px; border: 1px solid var(--tg-linea); border-radius: 8px; background: var(--tg-hoja); color: var(--tg-texto-2); box-shadow: none; font-size: 13px; font-weight: 500; }
  html body.tg-cont .finca-filtro button.activa, html.night body.tg-cont .finca-filtro button.activa { background: var(--tg-tonal); border-color: var(--tg-tonal); color: var(--tg-tonal-texto); }
  html body.tg-cont #last-update, html.night body.tg-cont #last-update { position: absolute; top: 34px; right: 24px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--tg-texto-2); font-size: 13px; font-weight: 400; }

  /* pestañas con línea */
  html body.tg-cont .tabs, html.night body.tg-cont .tabs { display: flex; gap: 4px; padding: 0; margin: 0 0 16px; border-bottom: 1px solid var(--tg-linea); background: none; }
  html body.tg-cont .tabs .tab-btn, html.night body.tg-cont .tabs .tab-btn { height: 44px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none !important; background-image: none !important; box-shadow: none; color: var(--tg-texto-2); font: 500 14px Roboto, Arial, sans-serif; }
  html body.tg-cont .tabs .tab-btn.active, html.night body.tg-cont .tabs .tab-btn.active { border-bottom-color: var(--tg-primario); color: var(--tg-primario); }
  html body.tg-cont .tabs .tab-btn:hover { background: var(--tg-hover) !important; }

  /* secciones */
  body.tg-cont .kpi-section { margin: 0 0 12px; }
  html body.tg-cont .kpi-section > h2, html.night body.tg-cont .kpi-section > h2,
  html body.tg-cont .kpi-section > .kpi-cmd-cab > h2, html.night body.tg-cont .kpi-section > .kpi-cmd-cab > h2 { color: var(--tg-texto); font-size: 16px; font-weight: 500; letter-spacing: 0; text-transform: none; }
  html body.tg-cont .kpi-sub, html.night body.tg-cont .kpi-sub { color: var(--tg-texto-2); opacity: 1; font-weight: 400; }
  html body.tg-cont .kpi-note, html.night body.tg-cont .kpi-note { color: var(--tg-texto-2); }

  /* tarjetas de números */
  body.tg-cont .cards-container { gap: 12px; }
  html body.tg-cont .card.kpi-card, html.night body.tg-cont .card.kpi-card { padding: 14px 18px; border: 0; border-radius: 16px; background: var(--tg-suave); box-shadow: none; color: var(--tg-texto); transform: none; }
  html body.tg-cont .card.kpi-card .card-number, html.night body.tg-cont .card.kpi-card .card-number { color: inherit; font-size: 32px; font-weight: 400; line-height: 1.2; }
  html body.tg-cont .card.kpi-card .card-text, html.night body.tg-cont .card.kpi-card .card-text { color: inherit; opacity: 1; font-size: 14px; font-weight: 500; }
  html body.tg-cont .card.kpi-card.online-card, html.night body.tg-cont .card.kpi-card.online-card { background: var(--tg-ok); color: var(--tg-ok-texto); }
  html body.tg-cont .card.kpi-card.offline-card, html.night body.tg-cont .card.kpi-card.offline-card { background: var(--tg-error); color: var(--tg-error-texto); }
  html body.tg-cont .card.kpi-card.low-battery-card, html.night body.tg-cont .card.kpi-card.low-battery-card,
  html body.tg-cont .card.kpi-card.SCC-err-card, html.night body.tg-cont .card.kpi-card.SCC-err-card { background: var(--tg-aviso); color: var(--tg-aviso-texto); }

  /* medidores */
  body.tg-cont .kpi-meter { max-width: none; margin: 10px 0 0; }
  html body.tg-cont .kpi-meter-head, html.night body.tg-cont .kpi-meter-head { color: var(--tg-texto-2); font-weight: 500; }
  html body.tg-cont .kpi-meter-track, html.night body.tg-cont .kpi-meter-track { height: 6px; border-radius: 999px; background: var(--tg-campo); }

  /* gráficos */
  html body.tg-cont .kpi-chart-box, html.night body.tg-cont .kpi-chart-box { padding: 16px 20px; border: 1px solid var(--tg-linea); border-radius: 16px; background: var(--tg-hoja); box-shadow: none; }
  html body.tg-cont .kpi-dia, html.night body.tg-cont .kpi-dia { border: 1px solid var(--tg-linea); border-radius: 8px; background: none !important; background-image: none !important; box-shadow: none; color: var(--tg-texto-2); }
  html body.tg-cont .kpi-dia.is-activo, html.night body.tg-cont .kpi-dia.is-activo { border-color: var(--tg-tonal); background: var(--tg-tonal) !important; color: var(--tg-tonal-texto); }

  /* Resumen de KPI LoRaWAN: sin la dona; batería, señal y operación en una fila */
  body.tg-cont #tab-resumen.active:has(#batProm) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
  body.tg-cont #tab-resumen:has(#batProm) > section { min-width: 0; margin: 0; grid-column: 1 / -1; }
  body.tg-cont #tab-resumen:has(#batProm) > section:has(#fincaChart) { display: none; }
  body.tg-cont #tab-resumen:has(#batProm) > section:nth-of-type(3),
  body.tg-cont #tab-resumen:has(#batProm) > section:nth-of-type(4),
  body.tg-cont #tab-resumen:has(#batProm) > section:nth-of-type(5) { grid-column: auto; box-sizing: border-box; align-self: stretch; padding: 14px 18px; border-radius: 16px; background: var(--tg-suave); }
  body.tg-cont #tab-resumen:has(#batProm) > section:nth-of-type(n+3):nth-of-type(-n+5) .cards-container { display: block; }
  html body.tg-cont #tab-resumen:has(#batProm) > section:nth-of-type(n+3):nth-of-type(-n+5) .card.kpi-card,
  html.night body.tg-cont #tab-resumen:has(#batProm) > section:nth-of-type(n+3):nth-of-type(-n+5) .card.kpi-card { display: flex; flex-direction: row-reverse; align-items: baseline; justify-content: space-between; gap: 8px; width: auto; min-width: 0; padding: 3px 0; border-radius: 0; background: none; color: var(--tg-texto); }
  html body.tg-cont #tab-resumen:has(#batProm) > section:nth-of-type(n+3):nth-of-type(-n+5) .card.kpi-card .card-number { font-size: 14px; font-weight: 500; line-height: 1.4; }
  html body.tg-cont #tab-resumen:has(#batProm) > section:nth-of-type(n+3):nth-of-type(-n+5) .card.kpi-card .card-text { color: var(--tg-texto-2); font-weight: 400; }
  body.tg-cont #tab-resumen:has(#batProm) > section:nth-of-type(n+3):nth-of-type(-n+5) .card-sub { display: none; }
  body.tg-cont #tab-resumen .kpi-chart-canvas:has(#estadoFincaChart) { display: none; }
  body.tg-cont .tg-fincas { display: block; margin-top: 12px; }
  .tg-finca { margin-bottom: 14px; }
  .tg-finca > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
  .tg-finca b { font-weight: 500; }
  .tg-finca span { color: var(--tg-texto-2); }
  .tg-finca-barra { height: 10px; margin-top: 4px; border-radius: 999px; overflow: hidden; background: var(--tg-error); }
  .tg-finca-barra i { display: block; height: 10px; background: #146c2e; }
  html.night .tg-finca-barra i { background: #6dd58c; }

  /* listas y tablas */
  html body.tg-cont .kpi-revision-item, html.night body.tg-cont .kpi-revision-item,
  html body.tg-cont .kpi-cmd-item, html.night body.tg-cont .kpi-cmd-item { border: 1px solid var(--tg-linea); border-radius: 12px; background: var(--tg-hoja); box-shadow: none; color: var(--tg-texto); }
  html body.tg-cont .kpi-subtab-btn, html.night body.tg-cont .kpi-subtab-btn { border: 1px solid var(--tg-linea); border-radius: 8px; background: none !important; background-image: none !important; box-shadow: none; color: var(--tg-texto-2); font-weight: 500; }
  html body.tg-cont .kpi-subtab-btn.active, html.night body.tg-cont .kpi-subtab-btn.active, html body.tg-cont .kpi-subtab-btn.is-activo, html.night body.tg-cont .kpi-subtab-btn.is-activo { border-color: var(--tg-tonal); background: var(--tg-tonal) !important; color: var(--tg-tonal-texto); }
  html body.tg-cont .kpi-rend-tabla th, html.night body.tg-cont .kpi-rend-tabla th,
  html body.tg-cont .kpi-ord-tabla th, html.night body.tg-cont .kpi-ord-tabla th,
  html body.tg-cont .kpi-cmd-tabla th, html.night body.tg-cont .kpi-cmd-tabla th { background: none; color: var(--tg-texto-2); font-weight: 500; text-transform: none; letter-spacing: 0; }
  html body.tg-cont .kpi-rend-tabla td, html.night body.tg-cont .kpi-rend-tabla td,
  html body.tg-cont .kpi-ord-tabla td, html.night body.tg-cont .kpi-ord-tabla td { background: none; border-bottom: 1px solid var(--tg-linea); color: var(--tg-texto); }
}

@media (min-width: 769px) {
  /* los números venían apagados por .card-number del tema viejo */
  html body.tg-cont .card.kpi-card, html body.tg-cont .card.kpi-card *, html.night body.tg-cont .card.kpi-card, html.night body.tg-cont .card.kpi-card * { opacity: 1; filter: none; text-shadow: none; }
  html body.tg-cont .kpi-controls select, html body.tg-cont .kpi-controls input[type="text"],
  html.night body.tg-cont .kpi-controls select, html.night body.tg-cont .kpi-controls input[type="text"] { box-shadow: none !important; background: var(--tg-hoja) !important; }
  body.tg-cont .kpi-chart-box:has(.tg-fincas) { display: flex; flex-direction: column; }
  body.tg-cont .kpi-chart-box .tg-fincas { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; }
  body.tg-cont .tg-finca { margin: 0; }
}

@media (min-width: 769px) {
  /* listas, gráficos y medidores usan todo el ancho de la hoja */
  body.tg-cont .kpi-revision-lista, body.tg-cont .kpi-chart-box, body.tg-cont .kpi-cmd-lista, body.tg-cont .kpi-cmd-item, body.tg-cont .kpi-revision-item { max-width: none; }
  body.tg-cont #kpiContent section > .kpi-chart-box { width: auto; }
  /* Cobertura: sin los colores azules del tema viejo */
  html body.tg-cont .kpi-cob-banda, html.night body.tg-cont .kpi-cob-banda { border-radius: 16px; background: var(--tg-suave); box-shadow: none; color: var(--tg-texto); }
  html body.tg-cont #kpiContent table th, html.night body.tg-cont #kpiContent table th { background: none; color: var(--tg-texto-2); font-weight: 500; }
  html body.tg-cont #kpiContent table td, html.night body.tg-cont #kpiContent table td { background: none; border-bottom: 1px solid var(--tg-linea); }
  html body.tg-cont #kpiContent table tr, html.night body.tg-cont #kpiContent table tr { background: none; }
}

@media (min-width: 769px) {
  /* Grupos de opciones: chips de Material (rectángulo redondeado), sin cápsula alrededor */
  html body.tg-cont .kpi-subtabs, html.night body.tg-cont .kpi-subtabs,
  html body.tg-cont .kpi-dias, html.night body.tg-cont .kpi-dias { display: inline-flex; flex-wrap: wrap; gap: 8px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  html body.tg-cont .kpi-subtab-btn, html.night body.tg-cont .kpi-subtab-btn,
  html body.tg-cont .kpi-dia, html.night body.tg-cont .kpi-dia { display: inline-flex; align-items: center; gap: 8px; height: 32px; box-sizing: border-box; margin: 0; padding: 0 12px; border-radius: 8px; font-size: 13px; }
  html body.tg-cont .kpi-subtab-n, html.night body.tg-cont .kpi-subtab-n { min-width: 20px; height: 20px; box-sizing: border-box; padding: 0 6px; border-radius: 999px; background: var(--tg-campo); color: var(--tg-texto-2); font-size: 11px; line-height: 20px; text-align: center; }
  html body.tg-cont .kpi-subtab-btn.active .kpi-subtab-n, html.night body.tg-cont .kpi-subtab-btn.active .kpi-subtab-n,
  html body.tg-cont .kpi-subtab-btn.is-activo .kpi-subtab-n, html.night body.tg-cont .kpi-subtab-btn.is-activo .kpi-subtab-n,
  html body.tg-cont .kpi-dia.is-activo .kpi-subtab-n, html.night body.tg-cont .kpi-dia.is-activo .kpi-subtab-n { background: var(--tg-primario); color: var(--tg-hoja); }
}

@media (min-width: 769px) {
  /* mismos chips para severidad y tipo de problema; los botones usan la letra del tema */
  body.tg-cont button, body.tg-cont select, body.tg-cont input { font-family: Roboto, Arial, sans-serif; }
  html body.tg-cont .kpi-rev-filtro, html.night body.tg-cont .kpi-rev-filtro,
  html body.tg-cont .kpi-rev-tipo-sel, html.night body.tg-cont .kpi-rev-tipo-sel { display: inline-flex; align-items: center; height: 32px; box-sizing: border-box; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 500; box-shadow: none; }
  html body.tg-cont .kpi-rev-filtro, html.night body.tg-cont .kpi-rev-filtro { background-image: none; }
  html body.tg-cont .kpi-rev-tipo-sel, html.night body.tg-cont .kpi-rev-tipo-sel { padding-right: 30px; border: 1px solid var(--tg-linea); background-color: transparent; color: var(--tg-texto-2); }
  html body.tg-cont .kpi-dia.is-activo > *, html.night body.tg-cont .kpi-dia.is-activo > * { background: var(--tg-primario); color: var(--tg-hoja); opacity: 1; }
}

/* ===================== Equipos y mapas (mismas reglas para todo tg-cont) ===================== */
@media (min-width: 769px) {
  /* campos */
  html body.tg-cont #main-content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  html body.tg-cont #main-content select, html body.tg-cont #main-content textarea,
  html.night body.tg-cont #main-content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  html.night body.tg-cont #main-content select, html.night body.tg-cont #main-content textarea {
    box-sizing: border-box; border: 1px solid var(--tg-linea) !important; border-radius: 8px; background: var(--tg-hoja) !important; box-shadow: none !important; color: var(--tg-texto) !important; opacity: 1; }
  html body.tg-cont #main-content input:focus, html body.tg-cont #main-content select:focus, html body.tg-cont #main-content textarea:focus { outline: 2px solid var(--tg-primario); outline-offset: -1px; }
  html body.tg-cont #main-content input::placeholder, html body.tg-cont #main-content textarea::placeholder { color: var(--tg-texto-2); opacity: 1; }
  html body.tg-cont #main-content label, html body.tg-cont #controls { color: var(--tg-texto-2); }

  /* títulos y tablas */
  html body.tg-cont #main-content h2, html.night body.tg-cont #main-content h2 { color: var(--tg-texto); font-size: 16px; font-weight: 500; }
  html body.tg-cont #main-content table th, html.night body.tg-cont #main-content table th { background: none; border-color: var(--tg-linea); color: var(--tg-texto-2); font-weight: 500; }
  html body.tg-cont #main-content table td, html.night body.tg-cont #main-content table td { background: none; border-color: var(--tg-linea); color: var(--tg-texto); }
  html body.tg-cont #main-content table tr, html.night body.tg-cont #main-content table tr { background: none; }

  /* pestañas en grupo: sin cápsula */
  html body.tg-cont .tabs-grupo, html.night body.tg-cont .tabs-grupo { display: inline-flex; gap: 4px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  html body.tg-cont .snd-tabs, html.night body.tg-cont .snd-tabs { background: none; border-bottom: 1px solid var(--tg-linea); border-radius: 0; padding: 0; gap: 4px; box-shadow: none; }
  html body.tg-cont .snd-tabs .tab-btn, html.night body.tg-cont .snd-tabs .tab-btn { height: 44px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none !important; box-shadow: none; color: var(--tg-texto-2); font-weight: 500; }
  html body.tg-cont .snd-tabs .tab-btn.active, html.night body.tg-cont .snd-tabs .tab-btn.active { border-bottom-color: var(--tg-primario); color: var(--tg-primario); }

  /* paneles */
  html body.tg-cont .side-card, html.night body.tg-cont .side-card, html body.tg-cont .mover-equipo-box, html.night body.tg-cont .mover-equipo-box,
  html body.tg-cont .area-block, html.night body.tg-cont .area-block, html body.tg-cont .mf-panel, html.night body.tg-cont .mf-panel,
  html body.tg-cont .mf-edit, html.night body.tg-cont .mf-edit, html body.tg-cont .mf-fuera-card, html.night body.tg-cont .mf-fuera-card,
  html body.tg-cont .reemplazo-info, html.night body.tg-cont .reemplazo-info, html body.tg-cont .gps-resultado, html.night body.tg-cont .gps-resultado,
  html body.tg-cont .log, html.night body.tg-cont .log { border: 1px solid var(--tg-linea); border-radius: 16px; background: var(--tg-hoja); box-shadow: none; color: var(--tg-texto); }
  html body.tg-cont .snd-item, html.night body.tg-cont .snd-item { border: 1px solid var(--tg-linea); border-radius: 12px; background: var(--tg-hoja); box-shadow: none; color: var(--tg-texto); }
  html body.tg-cont .ultimo-registro-item, html.night body.tg-cont .ultimo-registro-item,
  html body.tg-cont #moverPondActual, html.night body.tg-cont #moverPondActual,
  html body.tg-cont .senders-pill-list, html.night body.tg-cont .senders-pill-list { border-radius: 8px; background: var(--tg-suave) !important; color: var(--tg-texto); }

  /* chips */
  html body.tg-cont .snd-cinta-pill, html.night body.tg-cont .snd-cinta-pill, html body.tg-cont .mf-capa, html.night body.tg-cont .mf-capa,
  html body.tg-cont .sender-pill, html.night body.tg-cont .sender-pill, html body.tg-cont .modo-btn, html.night body.tg-cont .modo-btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 32px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--tg-linea); border-radius: 8px; background: none; box-shadow: none; color: var(--tg-texto-2); font-family: Roboto, Arial, sans-serif; font-size: 13px; font-weight: 500; }
  html body.tg-cont .snd-cinta-pill.is-activo, html.night body.tg-cont .snd-cinta-pill.is-activo, html body.tg-cont .snd-cinta-pill.activa, html.night body.tg-cont .snd-cinta-pill.activa,
  html body.tg-cont .mf-capa.is-activo, html.night body.tg-cont .mf-capa.is-activo, html body.tg-cont .sender-pill.checked, html.night body.tg-cont .sender-pill.checked,
  html body.tg-cont .modo-btn.active, html.night body.tg-cont .modo-btn.active, html body.tg-cont .modo-btn.activo, html.night body.tg-cont .modo-btn.activo { border-color: var(--tg-tonal); background: var(--tg-tonal); color: var(--tg-tonal-texto); }
  html body.tg-cont .snd-cinta-n, html.night body.tg-cont .snd-cinta-n { border-radius: 999px; background: var(--tg-campo); color: var(--tg-texto-2); }

  /* botones: de acción en píldora plana, de fila en contorno */
  body.tg-cont .btn-degradado:not(.tab-btn):not(.kpi-subtab-btn):not(.kpi-dia):not(.kpi-rev-filtro):not(.modo-btn),
  html body.tg-cont .btn-toolbar, html body.tg-cont .btn-nuevo-pond, html body.tg-cont .snd-btn.is-primario, html.night body.tg-cont .snd-btn.is-primario { border-radius: 999px; background-image: none !important; box-shadow: none; font-family: Roboto, Arial, sans-serif; font-weight: 500; }
  html body.tg-cont #main-content .btn, html.night body.tg-cont #main-content .btn { border: 1px solid var(--tg-linea); border-radius: 8px; background: none; box-shadow: none; color: var(--tg-texto-2); }
  html body.tg-cont #main-content .btn:hover { background: var(--tg-hover); }
  html.night body.tg-cont #main-content .btn img { filter: invert(1); }
  html body.tg-cont .col-filter-btn, html.night body.tg-cont .col-filter-btn { background: none; box-shadow: none; color: var(--tg-texto-2); }
}

@media (min-width: 769px) {
  /* Registrar nodo: el formulario no empuja la columna del mapa fuera de la hoja */
  body.tg-cont .register-col-form { flex: 1 1 0; min-width: 0; }
  body.tg-cont .register-col-side { flex: 0 0 300px; min-width: 0; }
  /* Sugerencias de ChirpStack: aviso suave en lugar del amarillo fuerte */
  html body.tg-cont .sugerencia-row, html.night body.tg-cont .sugerencia-row { border-color: var(--tg-linea); background: none; color: var(--tg-texto); }
  html body.tg-cont .sugerencia-info, html.night body.tg-cont .sugerencia-info { color: var(--tg-texto); }
}

@media (min-width: 769px) {
  html body.tg-cont #sugerenciasChirpstack, html.night body.tg-cont #sugerenciasChirpstack,
  html body.tg-cont #sugerenciasVacio, html.night body.tg-cont #sugerenciasVacio { border: 1px solid var(--tg-linea); border-radius: 16px; background: var(--tg-suave); box-shadow: none; color: var(--tg-texto); }
  html body.tg-cont .sugerencia-row, html.night body.tg-cont .sugerencia-row { background: var(--tg-hoja); }
}

@media (min-width: 769px) {
  html body.tg-cont #sugerenciasAcciones, html.night body.tg-cont #sugerenciasAcciones { background: var(--tg-hoja); color: var(--tg-texto); }
  html body.tg-cont #main-content h3:not(.small), html.night body.tg-cont #main-content h3:not(.small) { color: var(--tg-texto); font-weight: 500; }
}

@media (min-width: 769px) {
  /* contador de un chip activo: círculo azul con número claro, como en KPI */
  html body.tg-cont .snd-cinta-pill.is-activo .snd-cinta-n, html.night body.tg-cont .snd-cinta-pill.is-activo .snd-cinta-n { background: var(--tg-primario); color: var(--tg-hoja); opacity: 1; }
}

/* Pantallas de 769-1079 px: si una tabla no cabe, se desplaza dentro de su caja y no saca la página de ancho. */
@media (min-width: 769px) and (max-width: 1079px) {
  body.tema-google #listadoTabla { overflow-x: auto; }
}

/* ===================== Tablas de Material: <body class="... tg-tablas"> =====================
   Solo líneas horizontales, sin colores por fila, texto a la izquierda, números y acciones a la
   derecha, tinte al pasar el mouse y cabecera fija bajo la barra superior. */
@media (min-width: 769px) {
  html body.tg-tablas #main-content table, html.night body.tg-tablas #main-content table {
    width: 100%; border: 1px solid var(--tg-linea); border-collapse: separate; border-spacing: 0; border-radius: 16px; overflow: visible; background: none; box-shadow: none; font-size: 14px; font-variant-numeric: tabular-nums; }
  html body.tg-tablas #main-content table th, html.night body.tg-tablas #main-content table th,
  html body.tg-tablas #main-content table td, html.night body.tg-tablas #main-content table td {
    height: 44px; box-sizing: border-box; padding: 8px 16px; border: 0; border-bottom: 1px solid var(--tg-linea); text-align: left; }
  html body.tg-tablas #main-content table th, html.night body.tg-tablas #main-content table th {
    position: sticky; top: 64px; z-index: 2; height: 48px; background: var(--tg-hoja); font-size: 13px; }
  html body.tg-tablas #main-content table tr:first-child th:first-child { border-top-left-radius: 16px; }
  html body.tg-tablas #main-content table tr:first-child th:last-child { border-top-right-radius: 16px; }
  html body.tg-tablas #main-content table tbody tr:last-child td { border-bottom: 0; }
  html body.tg-tablas #main-content table tbody tr:hover td, html.night body.tg-tablas #main-content table tbody tr:hover td { background: var(--tg-hover); }
  /* la última columna es de acciones */
  html body.tg-tablas #main-content table th:last-child, html.night body.tg-tablas #main-content table th:last-child,
  html body.tg-tablas #main-content table td:last-child, html.night body.tg-tablas #main-content table td:last-child { text-align: right; white-space: nowrap; }
}

@media (min-width: 769px) {
  /* columnas numéricas a la derecha */
  html body.tg-tablas #tab-listado table th:nth-child(2), html body.tg-tablas #tab-listado table td:nth-child(2),
  html body.tg-tablas #tab-ponds table th:nth-child(3), html body.tg-tablas #tab-ponds table td:nth-child(3),
  html body.tg-tablas [id^="tab-finca-"] table th:nth-child(2), html body.tg-tablas [id^="tab-finca-"] table td:nth-child(2),
  html body.tg-tablas #tab-otros table th:nth-child(2), html body.tg-tablas #tab-otros table td:nth-child(2) { text-align: right; }
}

@media (min-width: 769px) {
  /* el modo noche viejo pinta cabeceras y filas alternadas */
  html body.tg-tablas #main-content table thead, html.night body.tg-tablas #main-content table thead,
  html body.tg-tablas #main-content table tr, html.night body.tg-tablas #main-content table tr { background: none !important; }
  html body.tg-tablas #main-content table th, html.night body.tg-tablas #main-content table th { background: var(--tg-hoja) !important; }
  html body.tg-tablas #main-content [id^="tab-finca-"] table th:nth-child(2), html body.tg-tablas #main-content [id^="tab-finca-"] table td:nth-child(2) { text-align: right; }
}

@media (min-width: 769px) {
  html body.tg-tablas #main-content table tbody td, html.night body.tg-tablas #main-content table tbody td { background: none !important; }
  html body.tg-tablas #main-content table tbody tr:hover td, html.night body.tg-tablas #main-content table tbody tr:hover td { background: var(--tg-hover) !important; }
}

/* ===================== Historiales y reportes ===================== */
@media (min-width: 769px) {
  /* tabla con su propio desplazamiento: la cabecera se fija arriba de ese recuadro */
  html body.tg-tablas #main-content .tabla-scroll-container table th, html.night body.tg-tablas #main-content .tabla-scroll-container table th { top: 0; }
  html body.tg-tablas .tabla-scroll-container, html.night body.tg-tablas .tabla-scroll-container { border: 0; border-radius: 16px; background: none; box-shadow: none; }

  /* tablas de reportes e instalaciones: columnas más ajustadas, fecha en una línea */
  html body.tg-tablas #main-content .historial-tabla th, html body.tg-tablas #main-content .historial-tabla td,
  html.night body.tg-tablas #main-content .historial-tabla th, html.night body.tg-tablas #main-content .historial-tabla td { padding: 8px 12px; }
  html body.tg-tablas #main-content #historialTabla th:nth-child(1), html body.tg-tablas #main-content #historialTabla td:nth-child(1),
  html body.tg-tablas #main-content #historialTablaInst th:nth-child(2), html body.tg-tablas #main-content #historialTablaInst td:nth-child(2) { text-align: right; }
  html body.tg-tablas #main-content #historialTabla td:nth-child(3), html body.tg-tablas #main-content #historialTablaInst td:nth-child(4) { white-space: nowrap; }

  /* tarjetas y paneles */
  html body.tg-cont .env-card, html.night body.tg-cont .env-card { border: 0; border-radius: 16px; background: var(--tg-suave); box-shadow: none; color: var(--tg-texto); }
  html body.tg-cont .reg-equipo, html.night body.tg-cont .reg-equipo, html body.tg-cont .reporte-form, html.night body.tg-cont .reporte-form,
  html body.tg-cont .inst-form, html.night body.tg-cont .inst-form, html body.tg-cont .reg-vacio, html.night body.tg-cont .reg-vacio,
  html body.tg-cont .historial-card, html.night body.tg-cont .historial-card { border: 1px solid var(--tg-linea); border-radius: 16px; background: var(--tg-hoja); box-shadow: none; color: var(--tg-texto); }
  html body.tg-cont .mobile-cards .device-card, html.night body.tg-cont .mobile-cards .device-card { border: 1px solid var(--tg-linea); border-radius: 12px; background: var(--tg-hoja); box-shadow: none; color: var(--tg-texto); }
  html body.tg-cont .gps-card-sub, html.night body.tg-cont .gps-card-sub, html body.tg-cont .gps-completo, html.night body.tg-cont .gps-completo { border-color: var(--tg-linea); border-radius: 12px; background: var(--tg-suave); color: var(--tg-texto); }
  html body.tg-cont .reg-equipo .uid, html.night body.tg-cont .reg-equipo .uid { color: var(--tg-texto); font-weight: 500; }
  html body.tg-cont .reg-dia, html.night body.tg-cont .reg-dia { border-radius: 8px; background: var(--tg-suave); color: var(--tg-texto); }
  html body.tg-cont .custum-file-upload, html.night body.tg-cont .custum-file-upload { border-color: var(--tg-linea); border-radius: 16px; background: var(--tg-suave); box-shadow: none; color: var(--tg-texto-2); }

  /* chips */
  html body.tg-cont .reg-chip, html.night body.tg-cont .reg-chip, html body.tg-cont .inst-ribbon-btn, html.night body.tg-cont .inst-ribbon-btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 32px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--tg-linea); border-radius: 8px; background: none; box-shadow: none; color: var(--tg-texto-2); font-family: Roboto, Arial, sans-serif; font-size: 13px; font-weight: 500; }
  html body.tg-cont .reg-chip.activo, html.night body.tg-cont .reg-chip.activo, html body.tg-cont .inst-ribbon-btn.selected, html.night body.tg-cont .inst-ribbon-btn.selected { border-color: var(--tg-tonal); background: var(--tg-tonal); color: var(--tg-tonal-texto); }
  html body.tg-cont .reg-chip .n, html.night body.tg-cont .reg-chip .n { color: inherit; opacity: .75; }

  /* botones */
  html body.tg-cont .reg-btn, html.night body.tg-cont .reg-btn, html body.tg-cont .env-btn, html.night body.tg-cont .env-btn { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--tg-primario); box-shadow: none; color: var(--tg-hoja); font-family: Roboto, Arial, sans-serif; font-weight: 500; }
  html body.tg-cont .btn-accion, html.night body.tg-cont .btn-accion, html body.tg-cont .historial-tabla .btn-accion, html.night body.tg-cont .historial-tabla .btn-accion,
  html body.tg-cont .historial-filtros button, html.night body.tg-cont .historial-filtros button, html body.tg-cont .foto-btn, html.night body.tg-cont .foto-btn,
  html body.tg-cont #btnCapturarGps, html.night body.tg-cont #btnCapturarGps, html body.tg-cont #btnCapturarGpsInst, html.night body.tg-cont #btnCapturarGpsInst,
  html body.tg-cont .gps-card-toggle, html.night body.tg-cont .gps-card-toggle { border: 1px solid var(--tg-linea); border-radius: 8px; background: none; background-image: none; box-shadow: none; color: var(--tg-texto-2); font-family: Roboto, Arial, sans-serif; font-weight: 500; }
  html body.tg-cont .historial-tabla .btn-accion img, html.night body.tg-cont .historial-tabla .btn-accion img { opacity: 1; }
}

@media (min-width: 769px) {
  html.night body.tg-cont .historial-tabla .btn-accion img { filter: brightness(0) invert(1); }
  html.night body.tg-cont .historial-tabla .btn-accion { color: var(--tg-texto); }
}

/* ===================== Modales (todas las páginas con el tema) =====================
   .modal-hist > .modal-content. Las fichas de los monitores van en su etapa. */
@media (min-width: 769px) {
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) { background: rgba(0, 0, 0, .42); }
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) > .modal-content,
  html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) > .modal-content {
    box-sizing: border-box; padding: 24px; border: 0; border-radius: 28px; background: var(--tg-hoja); box-shadow: var(--tg-sombra); color: var(--tg-texto); font-family: Roboto, Arial, sans-serif; }
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .modal-header,
  html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .modal-header { border: 0; background: none; color: var(--tg-texto); font-size: 22px; font-weight: 400; }
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .modal-header strong { font-weight: 400; }
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .modal-body { color: var(--tg-texto); }
  body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .ico-modal { width: 24px !important; height: 24px !important; }

  /* pestañas */
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .modal-tabs, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .modal-tabs { gap: 4px; padding: 0; border-bottom: 1px solid var(--tg-linea); border-radius: 0; background: none; }
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .modal-tab-btn, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .modal-tab-btn { height: 40px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--tg-texto-2); font: 500 14px Roboto, Arial, sans-serif; }
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .modal-tab-btn.active, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .modal-tab-btn.active { border-bottom-color: var(--tg-primario); color: var(--tg-primario); }

  /* campos */
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) select, html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) textarea,
  html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) select, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) textarea {
    box-sizing: border-box; border: 1px solid var(--tg-linea) !important; border-radius: 8px !important; background: var(--tg-hoja) !important; box-shadow: none !important; color: var(--tg-texto) !important; font-family: Roboto, Arial, sans-serif; }

  /* botones: acción en píldora; cancelar y cerrar como botón de texto */
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) button:not(.modal-tab-btn):not(.tab-btn):not(.tg-sin-pildora):not(.config-opcion):not(.clase-btn):not(.eqm-seg-btn) { border-radius: 999px !important; background-image: none !important; box-shadow: none !important; font-family: Roboto, Arial, sans-serif; font-weight: 500; }
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) button[onclick*="cerrar" i]:not(.modal-tab-btn):not([onclick*="Sesion" i]), html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) button[onclick*="cancel" i]:not(.modal-tab-btn),
  html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) button[onclick*="cerrar" i]:not(.modal-tab-btn):not([onclick*="Sesion" i]), html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) button[onclick*="cancel" i]:not(.modal-tab-btn) { border: 0 !important; background: none !important; color: var(--tg-primario) !important; }
}

@media (min-width: 769px) {
  /* X neutra de Material en lugar del círculo rojo */
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) img[src*="Cancel.ico"] { content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' stroke='%23444746' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E"); }
  html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) img[src*="Cancel.ico"] { content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' stroke='%23c4c7c5' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E"); }

  /* Configuración */
  html body.tema-google .config-tabs, html.night body.tema-google .config-tabs { gap: 4px; padding: 0; border-bottom: 1px solid var(--tg-linea); border-radius: 0; background: none; }
  html body.tema-google .config-tabs .tab-btn, html.night body.tema-google .config-tabs .tab-btn { height: 40px; padding: 0 12px; border: 0; border-bottom: 3px solid transparent; border-radius: 0 !important; background: none !important; background-image: none !important; box-shadow: none; color: var(--tg-texto-2); font: 500 14px Roboto, Arial, sans-serif; }
  html body.tema-google .config-tabs .tab-btn.active, html.night body.tema-google .config-tabs .tab-btn.active { border-bottom-color: var(--tg-primario); color: var(--tg-primario); }
  html body.tema-google .config-opcion, html.night body.tema-google .config-opcion { border: 1px solid var(--tg-linea); border-radius: 16px !important; background: none; box-shadow: none; color: var(--tg-texto); font-family: Roboto, Arial, sans-serif; }
  html body.tema-google .config-opcion.activa, html.night body.tema-google .config-opcion.activa, html body.tema-google .config-opcion.activo, html.night body.tema-google .config-opcion.activo, html body.tema-google .config-opcion[aria-pressed="true"], html.night body.tema-google .config-opcion[aria-pressed="true"], html body.tema-google .config-opcion[aria-checked="true"], html.night body.tema-google .config-opcion[aria-checked="true"] { border-color: var(--tg-primario); background: var(--tg-tonal); color: var(--tg-tonal-texto); }

  /* tablas dentro de modales */
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) table, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) table { border-collapse: separate; border-spacing: 0; background: none; }
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) table th, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) table th { background: var(--tg-hoja) !important; border-color: var(--tg-linea); color: var(--tg-texto-2); font-weight: 500; text-transform: none; letter-spacing: 0; }
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) table td, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) table td { background: none !important; border-bottom: 1px solid var(--tg-linea); color: var(--tg-texto); }
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) table tr, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) table tr { background: none !important; }

  /* campo de solo lectura y acción principal sin color propio */
  html body.tema-google .editar-device-pond-texto, html.night body.tema-google .editar-device-pond-texto { border-radius: 8px; background: var(--tg-suave); color: var(--tg-texto); }
  html body.tema-google #btnGuardarEdit, html.night body.tema-google #btnGuardarEdit, html body.tema-google #btnGuardarPond, html.night body.tema-google #btnGuardarPond { border: 0; background: var(--tg-primario) !important; color: var(--tg-hoja) !important; }

  /* inicio de sesión */
  html body.tema-google .login-card, html.night body.tema-google .login-card { padding: 28px; border: 0; border-radius: 28px; background: var(--tg-hoja); box-shadow: var(--tg-sombra); color: var(--tg-texto); font-family: Roboto, Arial, sans-serif; }
  html body.tema-google .login-title, html.night body.tema-google .login-title { color: var(--tg-texto); font-size: 24px; font-weight: 400; }
  html body.tema-google .login-field, html.night body.tema-google .login-field { border: 1px solid var(--tg-linea); border-radius: 8px; background: var(--tg-hoja); box-shadow: none; color: var(--tg-texto-2); }
  html body.tema-google .login-field input, html.night body.tema-google .login-field input { border: 0 !important; background: none !important; }
  html body.tema-google .login-remember, html.night body.tema-google .login-remember { color: var(--tg-texto-2); }
  html body.tema-google .login-btn-primary, html.night body.tema-google .login-btn-primary { border: 0; border-radius: 999px !important; background: var(--tg-primario) !important; color: var(--tg-hoja) !important; font-weight: 500; letter-spacing: 0; text-transform: none; }
  html body.tema-google .login-btn-guest, html.night body.tema-google .login-btn-guest { border: 0; border-radius: 999px !important; background: none !important; color: var(--tg-primario) !important; font-weight: 500; }
}

@media (min-width: 769px) {
  html body.tema-google .config-tabs .tab-btn, html.night body.tema-google .config-tabs .tab-btn { flex: 1 1 auto; min-width: 0; padding: 0 6px; font-size: 13px; }
  html body.tema-google .modal-hist .login-field input:not([type="checkbox"]), html.night body.tema-google .modal-hist .login-field input:not([type="checkbox"]),
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .login-field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .login-field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) { border: 0 !important; border-radius: 0 !important; background: none !important; }
}

@media (min-width: 769px) {
  /* Chrome pinta su propio fondo al autocompletar: se tapa con el color de la hoja */
  html body.tema-google input:-webkit-autofill, html body.tema-google input:-webkit-autofill:hover, html body.tema-google input:-webkit-autofill:focus,
  html.night body.tema-google input:-webkit-autofill, html.night body.tema-google input:-webkit-autofill:hover, html.night body.tema-google input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--tg-hoja) inset !important; box-shadow: 0 0 0 1000px var(--tg-hoja) inset !important;
    -webkit-text-fill-color: var(--tg-texto) !important; caret-color: var(--tg-texto); transition: background-color 99999s ease-out; }
  /* ícono de usuario del inicio de sesión */
  html body.tema-google .login-card img.login-avatar { width: 56px; height: 56px; content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Ccircle cx='28' cy='28' r='28' fill='%23d3e3fd'/%3E%3Ccircle cx='28' cy='22' r='7' fill='none' stroke='%230b57d0' stroke-width='2.4'/%3E%3Cpath d='M14 42c2-8 8-11 14-11s12 3 14 11' fill='none' stroke='%230b57d0' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
  html.night body.tema-google .login-card img.login-avatar { content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Ccircle cx='28' cy='28' r='28' fill='%230842a0'/%3E%3Ccircle cx='28' cy='22' r='7' fill='none' stroke='%23d3e3fd' stroke-width='2.4'/%3E%3Cpath d='M14 42c2-8 8-11 14-11s12 3 14 11' fill='none' stroke='%23d3e3fd' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
}

@media (min-width: 769px) {
  /* misma fuerza que las reglas de campos de los modales y del contenido: si no, le ganan */
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) input:-webkit-autofill:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) input:-webkit-autofill:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .login-field input:-webkit-autofill:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .login-field input:-webkit-autofill:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  html body.tg-cont #main-content input:-webkit-autofill:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  html.night body.tg-cont #main-content input:-webkit-autofill:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) {
    -webkit-box-shadow: 0 0 0 1000px var(--tg-hoja) inset !important; box-shadow: 0 0 0 1000px var(--tg-hoja) inset !important;
    -webkit-text-fill-color: var(--tg-texto) !important; transition: background-color 99999s ease-out !important; }
}

/* ===================== Diálogos de confirmación =====================
   tema-google.js les pone .tg-dialogo, data-tono (peligro, aviso o normal) y su ícono. */
.tg-dialogo-ico { display: none; }
@media (min-width: 769px) {
  html body.tema-google .tg-dialogo > .modal-content, html.night body.tema-google .tg-dialogo > .modal-content { width: 380px !important; max-width: calc(100vw - 48px); align-items: stretch; gap: 0; padding: 24px; text-align: left; }
  body.tema-google .tg-dialogo .tg-dialogo-ico { display: grid; place-items: center; align-self: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 50%; background: var(--tg-tonal); color: var(--tg-tonal-texto); }
  body.tema-google .tg-dialogo[data-tono="peligro"] .tg-dialogo-ico { background: var(--tg-error); color: var(--tg-error-texto); }
  body.tema-google .tg-dialogo[data-tono="aviso"] .tg-dialogo-ico { background: var(--tg-aviso); color: var(--tg-aviso-texto); }
  body.tema-google .tg-dialogo .tg-dialogo-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  /* título centrado; la X sobra: están Cancelar y el clic fuera */
  html body.tema-google .tg-dialogo .modal-header, html.night body.tema-google .tg-dialogo .modal-header { justify-content: center !important; margin: 0 0 12px !important; padding: 0 !important; text-align: center; font-size: 24px !important; line-height: 1.25; }
  html body.tema-google .tg-dialogo .modal-header img { display: none; }
  /* el ícono grande viejo */
  body.tema-google .tg-dialogo .modal-content > div:has(> img):not(.modal-header):not(.tg-dialogo-ico) { display: none !important; }

  /* texto */
  html body.tema-google .tg-dialogo .logout-modal-texto, html.night body.tema-google .tg-dialogo .logout-modal-texto,
  html body.tema-google .tg-dialogo .modal-content > p, html.night body.tema-google .tg-dialogo .modal-content > p,
  html body.tema-google .tg-dialogo #confirmMasivoTexto, html.night body.tema-google .tg-dialogo #confirmMasivoTexto { margin: 0 0 8px; padding: 0; color: var(--tg-texto-2); font-size: 14px; line-height: 1.5; text-align: left; }

  /* botones abajo a la derecha */
  html body.tema-google .tg-dialogo .modal-content > div:has(> button), html body.tema-google .tg-dialogo .logout-modal-actions { display: flex !important; justify-content: flex-end !important; gap: 8px !important; margin-top: 16px; }
  html body.tema-google .tg-dialogo .modal-content > div:has(> button) > button, html body.tema-google .tg-dialogo .logout-modal-actions > button { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; height: 40px; padding: 0 20px !important; font-size: 14px; }
  html body.tema-google .tg-dialogo button:not(.tg-accion), html.night body.tema-google .tg-dialogo button:not(.tg-accion) { border: 0 !important; background: none !important; color: var(--tg-primario) !important; }
  html body.tema-google .tg-dialogo button.tg-accion, html.night body.tema-google .tg-dialogo button.tg-accion { border: 0 !important; background: var(--tg-primario) !important; color: var(--tg-hoja) !important; }
  html body.tema-google .tg-dialogo[data-tono="peligro"] button.tg-accion, html.night body.tema-google .tg-dialogo[data-tono="peligro"] button.tg-accion { background: var(--tg-peligro) !important; color: var(--tg-peligro-texto) !important; }
}

/* ===================== Barras de desplazamiento y notificaciones ===================== */
@media (min-width: 769px) {
  /* la barra respeta las esquinas redondeadas: fina, sin carril y separada de los bordes */
  body.tema-google .modal-hist *::-webkit-scrollbar { width: 8px; height: 8px; }
  body.tema-google .modal-hist *::-webkit-scrollbar-track { margin: 24px 0; background: transparent; }
  body.tema-google .modal-hist *::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 99px; background: var(--tg-linea); background-clip: padding-box; }
  body.tema-google .modal-hist *::-webkit-scrollbar-thumb:hover { background: var(--tg-texto-2); background-clip: padding-box; }

  /* Notificaciones: globo que sale de la campana, no un modal centrado */
  html body.tema-google #modalNotificaciones, html.night body.tema-google #modalNotificaciones { display: none; align-items: flex-start; justify-content: flex-end; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  html body.tema-google #modalNotificaciones > .modal-content, html.night body.tema-google #modalNotificaciones > .modal-content {
    position: fixed; top: 68px; right: 16px; width: 380px !important; max-width: calc(100vw - 32px); max-height: min(560px, calc(100vh - 92px)) !important; padding: 16px 8px 8px 16px; border-radius: 16px; overflow-y: auto; scrollbar-gutter: stable; animation: tg-globo .16s ease-out; transform-origin: calc(100% - 74px) 0; }
  html body.tema-google #modalNotificaciones .modal-header, html.night body.tema-google #modalNotificaciones .modal-header { position: static; font-size: 18px; }
  body.tema-google #modalNotificaciones .modal-header img[src*="Cancel.ico"] { display: none; }
  /* pico del globo, bajo la campana */
  body.tema-google #modalNotificaciones::before { content: ""; position: fixed; z-index: 1; top: 62px; right: 83px; width: 14px; height: 14px; background: var(--tg-hoja); transform: rotate(45deg); box-shadow: -1px -1px 2px rgba(0, 0, 0, .08); }
  @keyframes tg-globo { from { opacity: 0; transform: scale(.92) translateY(-6px); } to { opacity: 1; transform: none; } }
}

@media (min-width: 769px) {
  html body.tema-google .notif-fila, html.night body.tema-google .notif-fila { border: 1px solid var(--tg-linea); border-radius: 12px; background: var(--tg-hoja); box-shadow: none; }
  html body.tema-google .notif-fila .notif-msg, html.night body.tema-google .notif-fila .notif-msg { color: var(--tg-texto); }
  html body.tema-google .notif-fila .notif-fecha, html.night body.tema-google .notif-fila .notif-fecha, html body.tema-google .notif-vacio, html.night body.tema-google .notif-vacio { color: var(--tg-texto-2); }
  html body.tema-google #btnTogglePush, html.night body.tema-google #btnTogglePush { border: 0 !important; background: var(--tg-tonal) !important; color: var(--tg-tonal-texto) !important; }
  html body.tema-google #btnTestPush, html.night body.tema-google #btnTestPush { border: 1px solid var(--tg-linea) !important; background: none !important; color: var(--tg-texto-2) !important; }
  body.tema-google #modalNotificaciones.closing > .modal-content { animation: none; opacity: 0; transition: opacity .15s; }
}

@media (min-width: 769px) {
  /* un globo no oscurece la pantalla; le gana a las reglas de los modales */
  html body.tema-google #modalNotificaciones, html.night body.tema-google #modalNotificaciones { background: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  html body.tema-google #modalNotificaciones > .modal-content, html.night body.tema-google #modalNotificaciones > .modal-content { padding: 16px 8px 8px 16px !important; border-radius: 16px !important; }
}

/* Filas de notificación: ícono por tipo y título corto (solo escritorio) */
.notif-tg-ico, .notif-tg-titulo { display: none; }
@media (min-width: 769px) {
  html body.tema-google .notif-fila, html.night body.tema-google .notif-fila { align-items: flex-start; gap: 12px; margin-bottom: 0; padding: 10px 12px; opacity: 1; }
  html body.tema-google .notif-fila .notif-tipo-ico { display: none; }
  html body.tema-google .notif-tg-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--tg-tonal); color: var(--tg-tonal-texto); }
  html body.tema-google .notif-tg-ico.mal { background: var(--tg-error); color: var(--tg-error-texto); }
  html body.tema-google .notif-tg-ico.aviso { background: var(--tg-aviso); color: var(--tg-aviso-texto); }
  html body.tema-google .notif-tg-ico.bien { background: var(--tg-ok); color: var(--tg-ok-texto); }
  .notif-tg-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  html body.tema-google .notif-tg-titulo { display: block; color: var(--tg-texto); font-size: 14px; font-weight: 500; line-height: 1.3; }
  html body.tema-google .notif-fila .notif-msg, html.night body.tema-google .notif-fila .notif-msg { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 2px; color: var(--tg-texto-2); font-size: 13px; line-height: 1.35; }
  html body.tema-google .notif-fila .notif-fecha, html.night body.tema-google .notif-fila .notif-fecha { margin-top: 3px; font-size: 12px; }
  /* las leídas se distinguen por el título, sin apagar toda la fila */
  html body.tema-google .notif-fila.leida .notif-tg-titulo { font-weight: 400; }
  html body.tema-google .notif-fila:not(.leida), html.night body.tema-google .notif-fila:not(.leida) { border-color: var(--tg-primario); }
  html body.tema-google .notif-fila .notif-check.leida { display: none; }
  html body.tema-google .notif-seccion-titulo, html.night body.tema-google .notif-seccion-titulo { color: var(--tg-texto-2); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
}

/* ===================== Monitores: <body class="... tg-monitor"> ===================== */
.tg-ult-corto { display: none; }
@media (min-width: 769px) {
  body.tg-monitor .tg-ult-largo { display: none; }
  body.tg-monitor .tg-ult-corto { display: inline; }
  body.tg-monitor #controls { margin-bottom: 8px; }
  body.tg-monitor #table-container { position: static; }
  body.tg-monitor .controls-left { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
  html body.tg-monitor #controls .small, html.night body.tg-monitor #controls .small { margin: 6px 0 0; color: var(--tg-texto-2); font-size: 12px; font-weight: 400; opacity: 1; }
  html body.tg-monitor .btn-gps-pond, html.night body.tg-monitor .btn-gps-pond { width: 32px; height: 32px; border: 1px solid var(--tg-linea); border-radius: 8px; background: none; box-shadow: none; }
  html body.tg-monitor .uid-search input, html.night body.tg-monitor .uid-search input { height: 32px; width: 90px; }
  html body.tg-monitor #pondFilter, html.night body.tg-monitor #pondFilter { height: 32px; }

  /* tarjetas (filtros) y acciones masivas en la misma fila */
  body.tg-mon-lw #table-container { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
  body.tg-mon-lw #table-container > * { grid-column: 1 / -1; }
  body.tg-mon-lw #table-container > .cards-container { grid-column: 1; }
  body.tg-mon-lw #table-container > .mass-actions { grid-column: 2; }
  body.tg-monitor .cards-container { flex-wrap: nowrap; gap: 8px; margin-bottom: 12px; }
  html body.tg-monitor .card, html.night body.tg-monitor .card { flex: 1 1 0; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 6px; min-width: 0; padding: 8px 12px; border: 2px solid transparent; border-radius: 16px; background: var(--tg-suave); box-shadow: none; color: var(--tg-texto); opacity: 1; transform: none; }
  html body.tg-monitor .card .card-number, html.night body.tg-monitor .card .card-number { color: inherit; font-size: 22px; font-weight: 400; line-height: 1.2; }
  html body.tg-monitor .card .card-text, html.night body.tg-monitor .card .card-text { overflow: hidden; color: inherit; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
  html body.tg-monitor .card.online-card, html.night body.tg-monitor .card.online-card { background: var(--tg-ok); color: var(--tg-ok-texto); }
  html body.tg-monitor .card.offline-card, html.night body.tg-monitor .card.offline-card { background: var(--tg-error); color: var(--tg-error-texto); }
  html body.tg-monitor .card.low-battery-card, html.night body.tg-monitor .card.low-battery-card, html body.tg-monitor .card.SCC-err-card, html.night body.tg-monitor .card.SCC-err-card { background: var(--tg-aviso); color: var(--tg-aviso-texto); }
  html body.tg-monitor .card.active, html.night body.tg-monitor .card.active, html body.tg-monitor .card.activa, html.night body.tg-monitor .card.activa, html body.tg-monitor .card.selected, html.night body.tg-monitor .card.selected { border-color: var(--tg-primario); }

  body.tg-monitor .mass-actions { display: flex; flex-wrap: nowrap; gap: 8px; margin: 0 0 12px; }
  body.tg-monitor .mass-actions img { display: none; }
  html body.tg-monitor .mass-actions button, html.night body.tg-monitor .mass-actions button { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; box-shadow: none; font: 500 13px Roboto, Arial, sans-serif; white-space: nowrap; transform: none; }
  html body.tg-monitor #apagarTodosBtn, html.night body.tg-monitor #apagarTodosBtn { background: var(--tg-peligro) !important; color: var(--tg-peligro-texto) !important; }
  html body.tg-monitor #encenderTodosBtn, html.night body.tg-monitor #encenderTodosBtn { background: var(--tg-ok) !important; background-image: none !important; color: var(--tg-ok-texto) !important; }
  html body.tg-monitor #pingOfflineBtn, html.night body.tg-monitor #pingOfflineBtn { border: 1px solid var(--tg-linea); background: none !important; background-image: none !important; color: var(--tg-primario) !important; }

  /* chip Ocultar Paddle y SNR */
  html body.tg-monitor #toggleColumns, html.night body.tg-monitor #toggleColumns { position: static; z-index: auto; display: inline-flex; align-items: center; gap: 6px; width: auto; height: 32px; margin: 0; padding: 0 12px; border: 1px solid var(--tg-linea); border-radius: 8px; background: none !important; background-image: none !important; box-shadow: none; color: var(--tg-texto-2); font: 500 13px Roboto, Arial, sans-serif; }
  body.tg-monitor #toggleColumns img { display: none; }

  /* tabla: columnas fijas para que entre sin desplazamiento */
  html body.tg-monitor #table-container table, html.night body.tg-monitor #table-container table { table-layout: fixed; font-size: 13px; }
  html body.tg-monitor #table-container table th, html.night body.tg-monitor #table-container table th,
  html body.tg-monitor #table-container table td, html.night body.tg-monitor #table-container table td { height: 44px; padding: 2px 6px; overflow: hidden; text-align: left; font-size: 13px; }
  html body.tg-monitor #table-container table th, html.night body.tg-monitor #table-container table th { font-size: 12px; }
  body.tg-mon-lw #table-container th:nth-child(1) { width: 6%; } body.tg-mon-lw #table-container th:nth-child(2) { width: 13%; }
  body.tg-mon-lw #table-container th:nth-child(3) { width: 4.5%; } body.tg-mon-lw #table-container th:nth-child(4) { width: 8.5%; }
  body.tg-mon-lw #table-container th:nth-child(5) { width: 5%; } body.tg-mon-lw #table-container th:nth-child(6) { width: 5.5%; }
  body.tg-mon-lw #table-container th:nth-child(7) { width: 11%; } body.tg-mon-lw #table-container th:nth-child(8) { width: 5.5%; }
  body.tg-mon-lw #table-container th:nth-child(9) { width: 5%; } body.tg-mon-lw #table-container th:nth-child(10) { width: 9%; }
  body.tg-mon-lw #table-container th:nth-child(11) { width: 11%; } body.tg-mon-lw #table-container th:nth-child(12) { width: 16%; }
  html body.tg-mon-lw #table-container td:nth-child(3), html body.tg-mon-lw #table-container th:nth-child(3),
  html body.tg-mon-lw #table-container td:nth-child(5), html body.tg-mon-lw #table-container th:nth-child(5),
  html body.tg-mon-lw #table-container td:nth-child(6), html body.tg-mon-lw #table-container th:nth-child(6),
  html body.tg-mon-lw #table-container td:nth-child(9), html body.tg-mon-lw #table-container th:nth-child(9) { text-align: center; }
  html body.tg-mon-lw #table-container td:nth-child(8), html body.tg-mon-lw #table-container th:nth-child(8),
  html body.tg-mon-lw #table-container td:nth-child(12), html body.tg-mon-lw #table-container th:nth-child(12) { text-align: right; }
  html body.tg-monitor #table-container td:nth-child(2) { white-space: nowrap; }

  /* UID, insignia y marcas M-A y A-C en una sola línea */
  html body.tg-monitor .hist-btn, html.night body.tg-monitor .hist-btn { min-width: 40px; height: 26px; margin: 0; padding: 0 7px; border: 0; border-radius: 8px; background: var(--tg-tonal) !important; background-image: none !important; box-shadow: none; color: var(--tg-tonal-texto); font: 500 13px Roboto, Arial, sans-serif; }
  html body.tg-monitor .tipo-equipo-badge { vertical-align: middle; margin: 0 2px 0 4px; }
  body.tg-monitor #table-container .ind { display: inline-flex; align-items: center; gap: 3px; margin: 0; vertical-align: middle; }
  html body.tg-monitor .tg-ind { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--tg-linea); font-size: 0; }
  html body.tg-monitor .tg-ind.si { background: var(--tg-primario); }

  /* motor y paddle: la marca como ícono */
  html body.tg-monitor #table-container table td.tg-on, html body.tg-monitor #table-container table td.tg-off,
  html.night body.tg-monitor #table-container table td.tg-on, html.night body.tg-monitor #table-container table td.tg-off { font-size: 0; }
  body.tg-monitor td.tg-on::before, body.tg-monitor td.tg-off::before { content: ""; display: inline-block; width: 18px; height: 18px; vertical-align: middle; background: currentColor; -webkit-mask: var(--tg-icono) center / contain no-repeat; mask: var(--tg-icono) center / contain no-repeat; }
  body.tg-monitor td.tg-on::before { --tg-icono: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13l4 4L19 7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); color: #1e8e3e; }
  html.night body.tg-monitor td.tg-on::before { color: #6dd58c; }
  body.tg-monitor td.tg-off::before { --tg-icono: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); color: #8e918f; }

  /* RSSI, estado, ping y acciones */
  html body.tg-monitor .rssi-bars { justify-content: flex-start; }
  body.tg-monitor .estado-celda { display: inline-flex; align-items: center; gap: 2px; }
  html body.tg-monitor .status-pill, html.night body.tg-monitor .status-pill { padding: 2px 8px; border: 0; border-radius: 999px; font-size: 12px; font-weight: 500; }
  html body.tg-monitor .status-pill.online, html.night body.tg-monitor .status-pill.online { background: var(--tg-ok); color: var(--tg-ok-texto); }
  html body.tg-monitor .status-pill.offline, html.night body.tg-monitor .status-pill.offline { background: var(--tg-error); color: var(--tg-error-texto); }
  html body.tg-monitor .ping-btn-mini, html.night body.tg-monitor .ping-btn-mini { width: 28px; height: 28px; padding: 4px; border: 0; border-radius: 50%; background: none !important; background-image: none !important; box-shadow: none; }
  html body.tg-monitor .action-btn-stop, html.night body.tg-monitor .action-btn-stop, html body.tg-monitor .action-btn-start, html.night body.tg-monitor .action-btn-start { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; width: auto; height: 28px; margin: 0 0 0 4px; padding: 0 8px; border: 0; border-radius: 8px; background-image: none !important; box-shadow: none; font: 500 12px Roboto, Arial, sans-serif; }
  html body.tg-monitor .action-btn-stop, html.night body.tg-monitor .action-btn-stop { background: var(--tg-error) !important; color: var(--tg-error-texto); }
  html body.tg-monitor .action-btn-start, html.night body.tg-monitor .action-btn-start { background: var(--tg-ok) !important; color: var(--tg-ok-texto); }
  body.tg-monitor .action-btn-stop img, body.tg-monitor .action-btn-start img { width: 13px; height: 13px; }

  /* ficha fuera de la regla de tablas: su encabezado no se fija a la página */
  html body.tg-tablas .modal-hist table th, html.night body.tg-tablas .modal-hist table th { position: static; }
}

/* botón Volver arriba: flotante de Material */
@media (min-width: 769px) {
  html body.tema-google #scrollTopBtn, html.night body.tema-google #scrollTopBtn { right: 28px; bottom: 28px; width: 56px; height: 56px; border: 0; border-radius: 16px; background: var(--tg-tonal) !important; background-image: none !important; box-shadow: var(--tg-sombra); color: var(--tg-tonal-texto); }
}

/* ===================== Modales distribuidos para escritorio ===================== */
@media (min-width: 769px) {
  /* Ficha de equipos y sensores: ancha, Información en dos columnas */
  html body.tema-google #modalHistorial > .modal-content, html body.tema-google #modalHistorialGrupo > .modal-content { width: min(980px, calc(100vw - 64px)) !important; max-height: calc(100vh - 64px) !important; }
  body.tema-google #modalHistorial .modal-tab-content.active { min-height: 0; overflow-y: auto; }
  html body.tema-google #modalHistorial .eq-info, html body.tema-google #modalHistorialGrupo .eq-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; max-height: none; overflow: visible; }
  html body.tema-google .eq-info-bloque, html.night body.tema-google .eq-info-bloque { padding: 12px 16px; border: 0; border-radius: 16px; background: var(--tg-suave); color: var(--tg-texto); }
  html body.tema-google .eq-info-bloque h4, html.night body.tema-google .eq-info-bloque h4 { color: var(--tg-texto-2); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
  html body.tema-google .eq-info-fila, html.night body.tema-google .eq-info-fila { border-top-color: var(--tg-linea); }
  html body.tema-google .eq-info-lbl, html.night body.tema-google .eq-info-lbl { color: var(--tg-texto-2); }
  html body.tema-google .eq-info-val, html.night body.tema-google .eq-info-val, html body.tema-google .eq-info-texto, html.night body.tema-google .eq-info-texto { color: var(--tg-texto); }
  body.tema-google #modalHistorial .registro-lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body.tema-google #gpsMap { height: min(56vh, 480px); border-radius: 16px; }
  body.tema-google #modalHistorial .modal-chart { height: min(56vh, 480px); }

  /* Senders y gateways: mapa a la izquierda, datos a la derecha */
  html body.tema-google #modalSender > .modal-content, html body.tema-google #modalGateway > .modal-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 20px; width: min(980px, calc(100vw - 64px)) !important; max-height: calc(100vh - 64px) !important; height: min(640px, calc(100vh - 64px)); overflow: hidden; }
  body.tema-google #modalSender .modal-header, body.tema-google #modalGateway .modal-header { grid-column: 1 / -1; }
  body.tema-google #modalSender .snd-minimapa, body.tema-google #modalGateway .snd-minimapa { grid-column: 1; grid-row: 2; height: 100%; min-height: 0; border-radius: 16px; }
  body.tema-google #modalSender .snd-gps-barra { grid-column: 1; grid-row: 3; margin-top: 8px; }
  body.tema-google #modalSender .snd-modal-body, body.tema-google #modalGateway .snd-modal-body { grid-column: 2; grid-row: 2 / span 2; min-height: 0; overflow-y: auto; padding-right: 6px; }

  /* Revisión: datos a la izquierda, causas y qué revisar a la derecha */
  html body.tema-google #modalRevision > .modal-content { width: min(980px, calc(100vw - 64px)) !important; max-height: calc(100vh - 64px) !important; }
  html body.tema-google .kpi-rev-modal-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 20px; align-items: start; }
  html body.tema-google .kpi-rev-modal-body > .kpi-rev-modal-datos { grid-column: 1; grid-row: 1 / span 30; position: sticky; top: 0; padding: 12px 16px; border-radius: 16px; background: var(--tg-suave); }
  html body.tema-google .kpi-rev-modal-body > :not(.kpi-rev-modal-datos) { grid-column: 2; }

  /* detalle de comando y fuera de servicio */
  html body.tema-google #modalComando > .modal-content, html body.tema-google #modalFueraServicio > .modal-content { width: min(860px, calc(100vw - 64px)) !important; max-height: calc(100vh - 64px) !important; }

  /* Configuración: más ancha, animaciones en cuatro columnas */
  html body.tema-google #modalConfiguracion > .modal-content { width: min(720px, calc(100vw - 64px)) !important; }
  body.tema-google .config-opciones { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }

  /* formularios de edición: campos en dos columnas */
  html body.tema-google #modalEditarDevice > .modal-content, html body.tema-google #modalPond > .modal-content { width: min(640px, calc(100vw - 64px)) !important; }
  html body.tema-google #modalEditarReporte > .modal-content, html body.tema-google #modalEditarInstalacion > .modal-content { width: min(720px, calc(100vw - 64px)) !important; }

  /* degradado muy suave solo en los botones principales rellenos */
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) button.tg-accion.tg-accion, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) button.tg-accion.tg-accion,
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .login-btn-primary.login-btn-primary, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .login-btn-primary.login-btn-primary,
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) #btnGuardarEdit, html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) #btnGuardarPond,
  html body.tg-monitor #apagarTodosBtn, html.night body.tg-monitor #apagarTodosBtn,
  html body.tg-cont .btn-toolbar, html.night body.tg-cont .btn-toolbar, html body.tg-cont .btn-nuevo-pond, html.night body.tg-cont .btn-nuevo-pond,
  html body.tg-cont .reg-btn, html.night body.tg-cont .reg-btn, html body.tg-cont .env-btn, html.night body.tg-cont .env-btn {
    background-image: linear-gradient(rgba(255, 255, 255, .07), rgba(0, 0, 0, .07)) !important; }
}

/* Registro del modal Historial (todas las anchuras: en el teléfono quedaba blanco en modo noche) */
html body.tema-google .registro-lista, html.night body.tema-google .registro-lista { background: none; }
html body.tema-google .registro-card, html.night body.tema-google .registro-card { border: 1px solid var(--tg-linea); border-radius: 12px; background: var(--tg-hoja); box-shadow: none; color: var(--tg-texto); }
html body.tema-google .registro-card-hora, html.night body.tema-google .registro-card-hora { color: var(--tg-texto); font-weight: 500; }
html body.tema-google .registro-card-detalle, html.night body.tema-google .registro-card-detalle { color: var(--tg-texto-2); }

@media (min-width: 769px) {
  /* Actualizar firmware: acción principal a la derecha */
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) #otaBtn, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) #otaBtn { display: block; width: auto; height: 40px; margin: 12px 0 2px auto; padding: 0 20px; border: 0; background: var(--tg-primario) !important; background-image: linear-gradient(rgba(255, 255, 255, .07), rgba(0, 0, 0, .07)) !important; color: var(--tg-hoja) !important; }
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .btn-ver-mas:not(#otaBtn), html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .btn-ver-mas:not(#otaBtn) { border: 0; background: var(--tg-tonal) !important; color: var(--tg-tonal-texto) !important; }
  /* Guardar no es una acción peligrosa: azul, aunque antes fuera rojo */
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) button[onclick*="guardar" i]:not(.modal-tab-btn):not([onclick*="guardarTipo" i]):not([onclick*="guardarClase" i]), html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) button[onclick*="guardar" i]:not(.modal-tab-btn):not([onclick*="guardarTipo" i]):not([onclick*="guardarClase" i]) { border: 0 !important; background: var(--tg-primario) !important; background-image: linear-gradient(rgba(255, 255, 255, .07), rgba(0, 0, 0, .07)) !important; color: var(--tg-hoja) !important; }
}

@media (min-width: 769px) {
  /* APA, INI y UID son chips: rectángulo redondeado */
  html body.tg-monitor .action-btn-stop, html.night body.tg-monitor .action-btn-stop, html body.tg-monitor .action-btn-start, html.night body.tg-monitor .action-btn-start,
  html body.tg-monitor .hist-btn, html.night body.tg-monitor .hist-btn { border-radius: 8px !important; }
  /* Monitor SS: anchos por columna */
  body.tg-mon-ss #table-container th:nth-child(1) { width: 7%; } body.tg-mon-ss #table-container th:nth-child(2) { width: 7.5%; }
  body.tg-mon-ss #table-container th:nth-child(3) { width: 9.5%; } body.tg-mon-ss #table-container th:nth-child(4) { width: 6%; }
  body.tg-mon-ss #table-container th:nth-child(5) { width: 5.5%; } body.tg-mon-ss #table-container th:nth-child(6) { width: 5.5%; }
  body.tg-mon-ss #table-container th:nth-child(7) { width: 8.5%; } body.tg-mon-ss #table-container th:nth-child(8) { width: 10.5%; }
  body.tg-mon-ss #table-container th:nth-child(9) { width: 5%; } body.tg-mon-ss #table-container th:nth-child(10) { width: 5%; }
  body.tg-mon-ss #table-container th:nth-child(11) { width: 11%; } body.tg-mon-ss #table-container th:nth-child(12) { width: 9%; }
  body.tg-mon-ss #table-container th:nth-child(13) { width: 10%; }
}

@media (min-width: 769px) {
  /* ficha: dos columnas que se llenan sin huecos, en lugar de filas */
  html body.tema-google #modalHistorial .eq-info, html body.tema-google #modalHistorialGrupo .eq-info { display: block; columns: 2; column-gap: 12px; }
  html body.tema-google #modalHistorial .eq-info > *, html body.tema-google #modalHistorialGrupo .eq-info > * { break-inside: avoid; margin: 0 0 12px; }

  /* Acuático y Terrestre, y clases de sensor: chips, el activo en celeste */
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .clase-selector button:not(.tg-x), html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .clase-selector button:not(.tg-x) {
    height: 32px; padding: 0 12px; border: 1px solid var(--tg-linea) !important; border-radius: 8px !important; background: none !important; background-image: none !important; color: var(--tg-texto-2) !important; font-size: 13px; }
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .clase-selector button.activo, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .clase-selector button.activo,
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .clase-selector button.active, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .clase-selector button.active,
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .clase-selector button.is-activo, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .clase-selector button.is-activo,
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .clase-selector button.selected, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .clase-selector button.selected { border-color: var(--tg-primario) !important; background: var(--tg-tonal) !important; color: var(--tg-tonal-texto) !important; }
}

@media (min-width: 769px) {
  /* chip activo de la ficha: azul sólido en día y noche, para que su ícono blanco se vea */
  html body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .clase-selector button.clase-btn.activo, html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada) .clase-selector button.clase-btn.activo { border-color: #0b57d0 !important; background: #0b57d0 !important; color: #fff !important; }

  /* zoom del gráfico: íconos de Material Symbols (zoom_in, zoom_out) */
  html body.tema-google .zoom-btn, html.night body.tema-google .zoom-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--tg-linea); border-radius: 50%; background: none !important; background-image: none !important; box-shadow: none; }
  html body.tema-google .zoom-btn:hover { background: var(--tg-hover) !important; }
  body.tema-google .zoom-btn img { width: 20px; height: 20px; }
  body.tema-google .zoom-btn img[src*="Zoom%20In"], body.tema-google .zoom-btn img[src*="Zoom In"] { content: url("/static/images/md/zoom_in.svg"); }
  body.tema-google .zoom-btn img[src*="Zoom%20Out"], body.tema-google .zoom-btn img[src*="Zoom Out"] { content: url("/static/images/md/zoom_out.svg"); }
  html.night body.tema-google .zoom-btn img[src*="Zoom%20In"], html.night body.tema-google .zoom-btn img[src*="Zoom In"] { content: url("/static/images/md/zoom_in_noche.svg"); }
  html.night body.tema-google .zoom-btn img[src*="Zoom%20Out"], html.night body.tema-google .zoom-btn img[src*="Zoom Out"] { content: url("/static/images/md/zoom_out_noche.svg"); }
}

/* ICONOS-MENU: Material Symbols, contorno normal y relleno en la página activa */
@media (min-width: 769px) {
  body.tema-google #sidebar .menu a[href="/home"] img.ico, body.tema-google #inicioEsc a[href="/home"] img { content: url("/static/images/md/home.svg"); }
  body.tema-google #sidebar .menu a[href="/monitor"] img.ico, body.tema-google #inicioEsc a[href="/monitor"] img { content: url("/static/images/md/monitor.svg"); }
  body.tema-google #sidebar .menu a[href="/mqtt"] img.ico, body.tema-google #inicioEsc a[href="/mqtt"] img { content: url("/static/images/md/terminal.svg"); }
  body.tema-google #sidebar .menu a[href="/kpi"] img.ico, body.tema-google #inicioEsc a[href="/kpi"] img { content: url("/static/images/md/analytics.svg"); }
  body.tema-google #sidebar .menu a[href="/sensores"] img.ico, body.tema-google #inicioEsc a[href="/sensores"] img { content: url("/static/images/md/camaron.svg"); }
  body.tema-google #sidebar .menu a[href="/kpi_sensores"] img.ico, body.tema-google #inicioEsc a[href="/kpi_sensores"] img { content: url("/static/images/md/analytics.svg"); }
  body.tema-google #sidebar .menu a[href="/devices"] img.ico, body.tema-google #inicioEsc a[href="/devices"] img { content: url("/static/images/md/hub.svg"); }
  body.tema-google #sidebar .menu a[href="/register_device"] img.ico, body.tema-google #inicioEsc a[href="/register_device"] img { content: url("/static/images/md/add_circle.svg"); }
  body.tema-google #sidebar .menu a[href="/instalaciones"] img.ico, body.tema-google #inicioEsc a[href="/instalaciones"] img { content: url("/static/images/md/memory.svg"); }
  body.tema-google #sidebar .menu a[href="/map_editor"] img.ico, body.tema-google #inicioEsc a[href="/map_editor"] img { content: url("/static/images/md/edit_location_alt.svg"); }
  body.tema-google #sidebar .menu a[href="/enviadores"] img.ico, body.tema-google #inicioEsc a[href="/enviadores"] img { content: url("/static/images/md/cell_tower.svg"); }
  body.tema-google #sidebar .menu a[href="/mapa_finca"] img.ico, body.tema-google #inicioEsc a[href="/mapa_finca"] img { content: url("/static/images/md/map.svg"); }
  body.tema-google #sidebar .menu a[href="/historial_gps"] img.ico, body.tema-google #inicioEsc a[href="/historial_gps"] img { content: url("/static/images/md/location_on.svg"); }
  body.tema-google #sidebar .menu a[href="/historial_envios"] img.ico, body.tema-google #inicioEsc a[href="/historial_envios"] img { content: url("/static/images/md/history.svg"); }
  body.tema-google #sidebar .menu a[href="/registro_equipo"] img.ico, body.tema-google #inicioEsc a[href="/registro_equipo"] img { content: url("/static/images/md/list_alt.svg"); }
  body.tema-google #sidebar .menu a[href="/reportes_mantenimiento"] img.ico, body.tema-google #inicioEsc a[href="/reportes_mantenimiento"] img { content: url("/static/images/md/assignment.svg"); }
  body.tema-google #sidebar .menu a.active[href="/home"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/home"] img.ico { content: url("/static/images/md/home_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/monitor"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/monitor"] img.ico { content: url("/static/images/md/monitor_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/mqtt"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/mqtt"] img.ico { content: url("/static/images/md/terminal_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/kpi"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/kpi"] img.ico { content: url("/static/images/md/analytics_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/sensores"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/sensores"] img.ico { content: url("/static/images/md/camaron_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/kpi_sensores"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/kpi_sensores"] img.ico { content: url("/static/images/md/analytics_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/devices"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/devices"] img.ico { content: url("/static/images/md/hub_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/register_device"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/register_device"] img.ico { content: url("/static/images/md/add_circle_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/instalaciones"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/instalaciones"] img.ico { content: url("/static/images/md/memory_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/map_editor"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/map_editor"] img.ico { content: url("/static/images/md/edit_location_alt_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/enviadores"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/enviadores"] img.ico { content: url("/static/images/md/cell_tower_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/mapa_finca"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/mapa_finca"] img.ico { content: url("/static/images/md/map_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/historial_gps"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/historial_gps"] img.ico { content: url("/static/images/md/location_on_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/historial_envios"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/historial_envios"] img.ico { content: url("/static/images/md/history_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/registro_equipo"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/registro_equipo"] img.ico { content: url("/static/images/md/list_alt_fill.svg"); }
  body.tema-google #sidebar .menu a.active[href="/reportes_mantenimiento"] img.ico, body.tema-google #sidebar .menu li.split-active > a[href="/reportes_mantenimiento"] img.ico { content: url("/static/images/md/assignment_fill.svg"); }
  html.night body.tema-google #sidebar .menu:not(.menu-bottom) a img.ico { filter: brightness(0) invert(1) opacity(.78); }
  html.night body.tema-google #sidebar .menu:not(.menu-bottom) a.active img.ico, html.night body.tema-google #sidebar .menu:not(.menu-bottom) li.split-active > a img.ico { filter: brightness(0) invert(1); }
}

/* ICONOS-ACCIONES: Material Symbols en contenido y modales; XNIGHT.ico siempre claro */
@media (min-width: 769px) {
  html body.tema-google img[src*="/Edit.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/EditLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_edit.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Edit.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/EditLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/EditNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/EditNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_edit_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Delete.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/DeleteLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_delete.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Delete.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/DeleteLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/DeleteNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/DeleteNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_delete_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Download.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/DownloadLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_download.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Download.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/DownloadLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/DownloadNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/DownloadNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_download_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Upload.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/UploadLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_upload.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Upload.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/UploadLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/UploadNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/UploadNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_upload_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/PDF.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/PDFLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_picture_as_pdf.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/PDF.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/PDFLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/PDFNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/PDFNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_picture_as_pdf_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Microsoft Excel.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Microsoft%20Excel.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Microsoft%20ExcelLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Microsoft ExcelLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_table_view.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Microsoft Excel.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Microsoft%20Excel.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Microsoft%20ExcelLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Microsoft ExcelLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Microsoft ExcelNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Microsoft%20ExcelNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Microsoft ExcelNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Microsoft%20ExcelNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_table_view_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Add.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/AddLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_add.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Add.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/AddLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/AddNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/AddNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_add_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Done.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/DoneLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_check_circle.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Done.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/DoneLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/DoneNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/DoneNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_check_circle_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Schedule.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ScheduleLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_schedule.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Schedule.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ScheduleLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ScheduleNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ScheduleNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_schedule_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Location.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/LocationLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_location_on.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Location.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/LocationLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/LocationNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/LocationNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_location_on_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Target.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/TargetLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_my_location.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Target.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/TargetLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/TargetNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/TargetNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_my_location_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/gps.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/gpsLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_gps_fixed.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/gps.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/gpsLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/gpsNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/gpsNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_gps_fixed_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Choice.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ChoiceLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_checklist.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Choice.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ChoiceLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ChoiceNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ChoiceNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_checklist_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Info.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/InfoLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_info.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Info.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/InfoLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/InfoNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/InfoNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_info_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Error.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ErrorLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_error.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Error.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ErrorLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ErrorNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ErrorNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_error_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Chart.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ChartLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_show_chart.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Chart.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ChartLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ChartNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ChartNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_show_chart_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Close.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/CloseLINE.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_close.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Close.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/CloseLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/CloseNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/CloseNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_close_noche.svg"); filter: none !important; }
}

@media (min-width: 769px) {
  /* íconos Material sobre fondo de color: blancos; sobre el chip claro de KPI: oscuros */
  html body.tema-google .btn-recargar-staging:not(#tgNada) img, html body.tema-google .btn-subir-staging:not(#tgNada) img, html body.tema-google .historial-swipe-accion:not(#tgNada) img { filter: brightness(0) invert(1) !important; }
  html.night body.tema-google .kpi-rev-ico:not(#tgNada) img { filter: brightness(0) opacity(.75) !important; }
}

@media (min-width: 769px) {
  html body.tema-google img[src*="/Low Battery.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Low%20Battery.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_battery_android_alert.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Low Battery.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Low%20Battery.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Low BatteryNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Low%20BatteryNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Low BatteryNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Low%20BatteryNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_battery_android_alert_noche.svg"); filter: none !important; }
}

@font-face { font-family: 'Material Symbols Outlined'; font-style: normal; font-weight: 400; font-display: block; src: url("/static/fonts/material-symbols-outlined-400.woff2") format("woff2"); }
@media (min-width: 769px) {
  /* batería: fuente Material Symbols (battery_android_frame_*); el dibujo viejo queda para el teléfono */
  body.tema-google .bat-svg { display: none; }
  body.tema-google .tg-bat { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; display: inline-block; width: 24px; height: 24px; overflow: hidden; flex: none; color: #444746; }
  html.night body.tema-google .tg-bat { color: #c4c7c5; }
  body.tema-google .tg-bat.bat-b0::before { content: "battery_android_0"; }
  body.tema-google .tg-bat.bat-b1::before { content: "battery_android_frame_1"; }
  body.tema-google .tg-bat.bat-b2::before { content: "battery_android_frame_2"; }
  body.tema-google .tg-bat.bat-b3::before { content: "battery_android_frame_3"; }
  body.tema-google .tg-bat.bat-b4::before { content: "battery_android_frame_4"; }
  body.tema-google .tg-bat.bat-b5::before { content: "battery_android_frame_5"; }
  body.tema-google .tg-bat.bat-b6::before { content: "battery_android_frame_6"; }
  body.tema-google .tg-bat.bat-b7::before { content: "battery_android_frame_full"; }
}

@media (min-width: 769px) {
  /* Monitor LW: anchos según contenido y todas las columnas a la izquierda, en día y noche */
  body.tg-mon-lw #table-container th:nth-child(1) { width: 6.5%; }
  body.tg-mon-lw #table-container th:nth-child(2) { width: 12.5%; }
  body.tg-mon-lw #table-container th:nth-child(3) { width: 5%; }
  body.tg-mon-lw #table-container th:nth-child(4) { width: 9%; }
  body.tg-mon-lw #table-container th:nth-child(5) { width: 5.5%; }
  body.tg-mon-lw #table-container th:nth-child(6) { width: 5.5%; }
  body.tg-mon-lw #table-container th:nth-child(7) { width: 11.5%; }
  body.tg-mon-lw #table-container th:nth-child(8) { width: 5.5%; }
  body.tg-mon-lw #table-container th:nth-child(9) { width: 5.5%; }
  body.tg-mon-lw #table-container th:nth-child(10) { width: 11.5%; }
  body.tg-mon-lw #table-container th:nth-child(11) { width: 12.5%; }
  body.tg-mon-lw #table-container th:nth-child(12) { width: 9.5%; }
  html body.tg-mon-lw #table-container table th:nth-child(3), html body.tg-mon-lw #table-container table td:nth-child(3), html body.tg-mon-lw #table-container table th:nth-child(5), html body.tg-mon-lw #table-container table td:nth-child(5), html body.tg-mon-lw #table-container table th:nth-child(6), html body.tg-mon-lw #table-container table td:nth-child(6), html body.tg-mon-lw #table-container table th:nth-child(8), html body.tg-mon-lw #table-container table td:nth-child(8), html body.tg-mon-lw #table-container table th:nth-child(9), html body.tg-mon-lw #table-container table td:nth-child(9) { text-align: left; }
  html body.tg-mon-lw #table-container table th:nth-child(12), html body.tg-mon-lw #table-container table td:nth-child(12) { text-align: left; }
}
@media (min-width: 1280px) {
  html body.tg-mon-lw #table-container table th { white-space: nowrap; }
}

@media (min-width: 769px) {
  html.night body.tg-mon-lw:not(#tgNada) #table-container table th:nth-child(12), html.night body.tg-mon-lw:not(#tgNada) #table-container table td:nth-child(12) { text-align: left; }
}

@media (min-width: 769px) {
  html body.tg-mon-lw:not(#tgNada) #table-container table td:nth-child(12) > :first-child, html body.tg-mon-lw:not(#tgNada) #table-container table td:nth-child(12) > :first-child > button:first-child { margin-left: 0; }
}

@media (min-width: 769px) {
  /* Monitor SS: todas las columnas a la izquierda, en día y noche */
  html body.tg-mon-ss:not(#tgNada) #table-container table th, html body.tg-mon-ss:not(#tgNada) #table-container table td,
  html.night body.tg-mon-ss:not(#tgNada) #table-container table th, html.night body.tg-mon-ss:not(#tgNada) #table-container table td { text-align: left; }
}
@media (min-width: 1280px) {
  html body.tg-mon-ss #table-container table th { white-space: nowrap; }
}

@media (min-width: 769px) {
  /* icono de ping: autorenew de Material Symbols; Restart.ico queda para el teléfono */
  body.tema-google #pingOfflineBtn img, body.tema-google .ping-btn-mini img { display: none; }
  body.tema-google .tg-ping { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; display: inline-block; width: 24px; height: 24px; overflow: hidden; flex: none; color: inherit; }
  body.tema-google .tg-ping::before { content: "autorenew"; }
  body.tema-google .ping-btn-mini .tg-ping { font-size: 20px; width: 20px; height: 20px; color: #444746; }
  html.night body.tema-google .ping-btn-mini .tg-ping { color: #c4c7c5; }
  body.tema-google .ping-btn.enviando .tg-ping, body.tema-google .btn-pingoffline.enviando .tg-ping { animation: ping-giro 1s linear infinite; }
}
@media (min-width: 769px) and (prefers-reduced-motion: reduce) {
  body.tema-google .ping-btn.enviando .tg-ping, body.tema-google .btn-pingoffline.enviando .tg-ping { animation: none; opacity: .5; }
}

@media (min-width: 769px) {
  /* Apagar y Encender todos: mismo color suave que APA e INI, sin degradado */
  html body.tg-monitor:not(#tgNada) #apagarTodosBtn, html.night body.tg-monitor:not(#tgNada) #apagarTodosBtn { background: var(--tg-error) !important; background-image: none !important; color: var(--tg-error-texto) !important; }
  html body.tg-monitor:not(#tgNada) #encenderTodosBtn, html.night body.tg-monitor:not(#tgNada) #encenderTodosBtn { background: var(--tg-ok) !important; background-image: none !important; color: var(--tg-ok-texto) !important; }
  /* menú de usuario: iconos Material */
  html body.tema-google #sidebarMenuNotificaciones img { content: url("/static/images/md/a_notifications.svg"); filter: none !important; }
  html.night body.tema-google #sidebarMenuNotificaciones img { content: url("/static/images/md/a_notifications_noche.svg"); filter: none !important; }
  html body.tema-google #sidebarMenuConfig img { content: url("/static/images/md/a_settings.svg"); filter: none !important; }
  html.night body.tema-google #sidebarMenuConfig img { content: url("/static/images/md/a_settings_noche.svg"); filter: none !important; }
  html body.tema-google #sidebarMenuLogin img { content: url("/static/images/md/a_login.svg"); filter: none !important; }
  html.night body.tema-google #sidebarMenuLogin img { content: url("/static/images/md/a_login_noche.svg"); filter: none !important; }
  html body.tema-google #sidebarMenuPermisos img { content: url("/static/images/md/a_lock.svg"); filter: none !important; }
  html.night body.tema-google #sidebarMenuPermisos img { content: url("/static/images/md/a_lock_noche.svg"); filter: none !important; }
  html body.tema-google #sidebarMenuUsuarios img { content: url("/static/images/md/a_manage_accounts.svg"); filter: none !important; }
  html.night body.tema-google #sidebarMenuUsuarios img { content: url("/static/images/md/a_manage_accounts_noche.svg"); filter: none !important; }
  html body.tema-google #sidebarMenuLogout img { content: url("/static/images/md/a_logout.svg"); filter: none !important; }
  html.night body.tema-google #sidebarMenuLogout img { content: url("/static/images/md/a_logout_noche.svg"); filter: none !important; }
}

@media (min-width: 769px) {
  /* el contenido se desliza con transform (sidebar-estado.js) en vez de animar el margen */
  body.sidebar-animando { overflow-x: clip; }
  body.sidebar-animando #main-content { transition: none; will-change: transform; }
  body.sidebar-animando #scrollTopBtn { visibility: hidden; }
}

@media (min-width: 769px) {
  /* Gestor de usuarios: título y Nuevo usuario arriba, lista en dos columnas */
  html body.tema-google #modalUsuarios:not(#tgNada):not(#tgNada) > .modal-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; width: 820px !important; max-width: calc(100vw - 48px) !important; overflow: hidden !important; padding: 24px 28px; }
  body.tema-google #modalUsuarios > .modal-content > img[src*="Admin.ico"] { display: none; }
  html body.tema-google #modalUsuarios:not(#tgNada):not(#tgNada) .modal-header { grid-column: 1; grid-row: 1; justify-content: flex-start !important; margin: 0; padding: 0; }
  html body.tema-google #modalUsuarios:not(#tgNada):not(#tgNada) #btnNuevoUsuario, html.night body.tema-google #modalUsuarios:not(#tgNada):not(#tgNada) #btnNuevoUsuario { grid-column: 2; grid-row: 1; width: auto !important; height: 40px; margin: 0 40px 0 0 !important; padding: 0 20px !important; background: var(--tg-primario) !important; color: var(--tg-hoja) !important; font-weight: 500 !important; }
  html body.tema-google #modalUsuarios:not(#tgNada) #listaUsuarios { grid-column: 1 / -1; grid-row: 2; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px !important; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); margin-top: 16px; padding: 0 4px 2px 0 !important; overflow-y: auto; color: var(--tg-texto); scrollbar-color: var(--tg-linea) transparent; }
  body.tema-google #listaUsuarios > div:not(.usuario-fila) { grid-column: 1 / -1; }
  html body.tema-google #listaUsuarios:not(#tgNada) > .usuario-fila, html.night body.tema-google #listaUsuarios:not(#tgNada) > .usuario-fila { justify-content: flex-start !important; gap: 12px !important; min-width: 0; padding: 10px 12px !important; border: 1px solid var(--tg-linea) !important; border-radius: 12px !important; background: none !important; }
  body.tema-google .usuario-fila::before { content: attr(data-inicial); display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--tg-activo); color: var(--tg-activo-texto); font-size: 15px; font-weight: 500; }
  body.tema-google .usuario-datos { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html body.tema-google .usuario-datos > div:first-child { overflow: hidden; text-overflow: ellipsis; font-weight: 500 !important; }
  html body.tema-google .usuario-datos > div:last-child { color: var(--tg-texto-2) !important; }
  html body.tema-google #modalUsuarios:not(#tgNada):not(#tgNada) .usuario-editar, html.night body.tema-google #modalUsuarios:not(#tgNada):not(#tgNada) .usuario-editar { border: 1px solid var(--tg-linea) !important; background: none !important; color: var(--tg-primario) !important; font-weight: 500 !important; }
  html body.tema-google #modalUsuarios:not(#tgNada):not(#tgNada) .usuario-borrar, html.night body.tema-google #modalUsuarios:not(#tgNada):not(#tgNada) .usuario-borrar { background: var(--tg-error) !important; color: var(--tg-error-texto) !important; font-weight: 500 !important; }
}

@media (min-width: 769px) {
  /* Monitor LW: APA e INI pasan a icono mode_off_on con su color */
  body.tema-google td .action-btn-stop img, body.tema-google td .action-btn-start img, body.tema-google td .tg-accion-txt { display: none; }
  html body.tg-monitor:not(#tgNada) td .action-btn-stop, html.night body.tg-monitor:not(#tgNada) td .action-btn-stop, html body.tg-monitor:not(#tgNada) td .action-btn-start, html.night body.tg-monitor:not(#tgNada) td .action-btn-start { justify-content: center; width: 36px; padding: 0; }
  body.tema-google .tg-power { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; display: inline-block; width: 20px; height: 20px; overflow: hidden; flex: none; }
  body.tema-google .tg-power::before { content: "power_settings_circle"; }
}

@media (min-width: 769px) {
  /* Permisos de invitado: título a la izquierda, módulos en dos columnas, Guardar abajo a la derecha */
  html body.tema-google #modalPermisos:not(#tgNada):not(#tgNada) > .modal-content { display: grid; grid-template-columns: minmax(0, 1fr); width: 720px !important; max-width: calc(100vw - 48px) !important; overflow: hidden !important; padding: 24px 28px; }
  body.tema-google #modalPermisos > .modal-content > img[src*="Access.ico"] { display: none; }
  html body.tema-google #modalPermisos:not(#tgNada):not(#tgNada) .modal-header { justify-content: flex-start !important; margin: 0; padding: 0 40px 0 0; }
  html body.tema-google #modalPermisos:not(#tgNada) #listaPermisos { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; row-gap: 0 !important; max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); margin-top: 12px; padding: 0 !important; overflow-y: auto; color: var(--tg-texto); scrollbar-color: var(--tg-linea) transparent; }
  html body.tema-google #listaPermisos:not(#tgNada) > div { min-height: 44px; box-sizing: border-box; padding: 6px 0; border-bottom: 1px solid var(--tg-linea); }
  html body.tema-google #modalPermisos:not(#tgNada):not(#tgNada) > .modal-content > button, html.night body.tema-google #modalPermisos:not(#tgNada):not(#tgNada) > .modal-content > button { justify-self: end; width: auto !important; height: 40px; margin: 16px 0 0 !important; padding: 0 24px !important; background: var(--tg-primario) !important; color: var(--tg-hoja) !important; font-weight: 500 !important; }

  /* Configuración: mismo alto en todas las pestañas y un solo ritmo de espacios */
  html body.tema-google #modalConfiguracion:not(#tgNada):not(#tgNada) > .modal-content { height: min(680px, calc(100vh - 64px)) !important; }
  html body.tema-google #modalConfiguracion .config-tabs, html.night body.tema-google #modalConfiguracion .config-tabs { gap: 8px; margin: 8px 0 0; }
  html body.tema-google #modalConfiguracion .config-tabs .tab-btn, html.night body.tema-google #modalConfiguracion .config-tabs .tab-btn { flex: 0 0 auto; padding: 0 16px; font-size: 14px; }
  body.tema-google #modalConfiguracion #configNota { margin: 14px 0 6px; }
  body.tema-google #modalConfiguracion .config-seccion { gap: 0; padding: 0 0 8px; border: 0; }
  body.tema-google #modalConfiguracion .config-fila { box-sizing: border-box; min-height: 48px; padding: 6px 0; gap: 24px; }
  body.tema-google #modalConfiguracion .config-fila + .config-nota { margin: -8px 0 8px; }
  html body.tema-google #modalConfiguracion:not(#tgNada):not(#tgNada) .config-fila select { width: 180px; max-width: 100%; }
  body.tema-google #modalConfiguracion .config-sub { gap: 32px; }
  body.tema-google #modalConfiguracion .config-titulo { margin: 20px 0 4px; font-weight: 500; }
  body.tema-google #modalConfiguracion .config-titulo + .config-nota { margin: 0 0 12px !important; }
  body.tema-google #modalConfiguracion #configPush { display: flex; flex-direction: column; }
  body.tema-google #modalConfiguracion .config-botones { gap: 8px; margin: 8px 0; }
  html body.tema-google #modalConfiguracion:not(#tgNada):not(#tgNada) .config-btn { flex: 0 0 auto; height: 36px; padding: 0 20px; }
  body.tema-google #modalConfiguracion #cfgEnvio { gap: 12px; }
  body.tema-google #modalConfiguracion #cfgEnvio .config-nota:empty { display: none; }
}

@media (min-width: 769px) {
  /* Enviador MQTT */
  body.tg-mqtt #main-content > form { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
  html body.tg-mqtt #main-content > form label { color: var(--tg-texto-2); font-size: 14px; }
  html body.tg-mqtt:not(#tgNada) #main-content > form input[type=text], html.night body.tg-mqtt:not(#tgNada) #main-content > form input[type=text] { width: 240px; height: 40px; box-sizing: border-box; margin: 0; box-shadow: none; }
  html body.tg-mqtt:not(#tgNada) #main-content > form input[type=submit], html.night body.tg-mqtt:not(#tgNada) #main-content > form input[type=submit] { height: 40px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--tg-primario) !important; background-image: none !important; box-shadow: none; color: var(--tg-hoja); font: 500 14px Roboto, Arial, sans-serif; }
  html body.tg-mqtt:not(#tgNada) #main-content > form input[type=submit]:disabled { opacity: .5; cursor: default; }
  html body.tg-mqtt:not(#tgNada) .pre-placeholder, html.night body.tg-mqtt:not(#tgNada) .pre-placeholder,
  html body.tg-mqtt:not(#tgNada) .skeleton-respuesta, html.night body.tg-mqtt:not(#tgNada) .skeleton-respuesta,
  html body.tg-mqtt:not(#tgNada) .acks-card, html.night body.tg-mqtt:not(#tgNada) .acks-card,
  html body.tg-mqtt:not(#tgNada) #respuestaMqtt pre, html.night body.tg-mqtt:not(#tgNada) #respuestaMqtt pre { margin-top: 16px; border: 1px solid var(--tg-linea); border-radius: 16px; background: none; box-shadow: none; color: var(--tg-texto); }
  html body.tg-mqtt:not(#tgNada) .pre-placeholder, html.night body.tg-mqtt:not(#tgNada) .pre-placeholder { min-height: 280px; gap: 10px; color: var(--tg-texto-2); }
  html body.tg-mqtt:not(#tgNada) .pre-placeholder p, html.night body.tg-mqtt:not(#tgNada) .pre-placeholder p { color: var(--tg-texto-2); }
  body.tg-mqtt .pre-placeholder img { display: none; }
  body.tg-mqtt .pre-placeholder::before { content: "keyboard"; font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 48px; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; display: inline-block; width: 48px; height: 48px; overflow: hidden; }
  html body.tg-mqtt:not(#tgNada) #respuestaMqtt pre { padding: 16px; font: 13px/1.5 ui-monospace, Consolas, monospace; }
  html body.tg-mqtt:not(#tgNada) .acks-card, html.night body.tg-mqtt:not(#tgNada) .acks-card { padding: 16px; }
  body.tg-mqtt .acks-cab { margin-bottom: 12px; }
  html body.tg-mqtt:not(#tgNada) .acks-cab h2, html.night body.tg-mqtt:not(#tgNada) .acks-cab h2 { color: var(--tg-texto); font-size: 16px; font-weight: 500; }
  html body.tg-mqtt:not(#tgNada) .acks-cuenta, html.night body.tg-mqtt:not(#tgNada) .acks-cuenta { color: var(--tg-texto-2); }
  html body.tg-mqtt:not(#tgNada) .acks-tabla th, html.night body.tg-mqtt:not(#tgNada) .acks-tabla th { position: static; height: 40px; padding: 0 12px; border-bottom: 1px solid var(--tg-linea); border-radius: 0 !important; background: none !important; color: var(--tg-texto-2); font-weight: 500; }
  html body.tg-mqtt:not(#tgNada) .acks-tabla td, html.night body.tg-mqtt:not(#tgNada) .acks-tabla td { height: 44px; padding: 0 12px; border-bottom: 1px solid var(--tg-linea); }
  html body.tg-mqtt:not(#tgNada) .acks-tabla tr:last-child td, html.night body.tg-mqtt:not(#tgNada) .acks-tabla tr:last-child td { border-bottom: 0; }
  html body.tg-mqtt:not(#tgNada) .acks-tabla .is-num, html.night body.tg-mqtt:not(#tgNada) .acks-tabla .is-num { text-align: right; }
  html body.tg-mqtt:not(#tgNada) .acks-tabla tr.is-pendiente td, html.night body.tg-mqtt:not(#tgNada) .acks-tabla tr.is-pendiente td { color: var(--tg-texto-2); }
  html body.tg-mqtt:not(#tgNada) .acks-estado.ok, html.night body.tg-mqtt:not(#tgNada) .acks-estado.ok { background: var(--tg-ok); color: var(--tg-ok-texto); }
  html body.tg-mqtt:not(#tgNada) .acks-estado.sin, html.night body.tg-mqtt:not(#tgNada) .acks-estado.sin { background: var(--tg-error); color: var(--tg-error-texto); }
  html body.tg-mqtt:not(#tgNada) .acks-estado.espera, html.night body.tg-mqtt:not(#tgNada) .acks-estado.espera { background: var(--tg-hover); color: var(--tg-texto-2); }
}

@media (min-width: 769px) {
  html body.tg-mqtt:not(#tgNada):not(#tgNada) #main-content > form input[type=submit], html.night body.tg-mqtt:not(#tgNada):not(#tgNada) #main-content > form input[type=submit] { border: 0 !important; color: var(--tg-hoja) !important; }
  html body.tg-mqtt:not(#tgNada):not(#tgNada) #main-content table.acks-tabla, html.night body.tg-mqtt:not(#tgNada):not(#tgNada) #main-content table.acks-tabla { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
}

@media (min-width: 769px) {
  /* Nuevo/Editar usuario: campos arriba y módulos en dos columnas (siguen el orden módulo, sub-permisos) */
  html body.tema-google #modalFormUsuario:not(#tgNada):not(#tgNada) > .modal-content { width: 720px !important; max-width: calc(100vw - 48px) !important; padding: 24px 28px; }
  body.tema-google #modalFormUsuario .modal-header + div { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px !important; }
  body.tema-google #modalFormUsuario .modal-header + div > label:nth-of-type(3), body.tema-google #fuModulosContainer { grid-column: 1 / -1; }
  html body.tema-google #fuListaModulos:not(#tgNada) { display: block !important; column-count: 2; column-gap: 32px; }
  html body.tema-google #fuListaModulos:not(#tgNada) > div { box-sizing: border-box; min-height: 40px; padding: 4px 0; border-bottom: 1px solid var(--tg-linea); break-inside: avoid; }
  html body.tema-google #modalFormUsuario:not(#tgNada):not(#tgNada) > .modal-content > button, html.night body.tema-google #modalFormUsuario:not(#tgNada):not(#tgNada) > .modal-content > button { display: block; width: auto !important; height: 40px; margin: 16px 0 0 auto !important; padding: 0 24px !important; background: var(--tg-primario) !important; color: var(--tg-hoja) !important; font-weight: 500 !important; }

  /* iconos Material que faltaban en pestañas, filtros y motivos de KPI */
  html body.tema-google img[src*="/Power Off Button.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Power Off ButtonNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Power%20Off%20Button.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Power%20Off%20ButtonNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_power_off.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Power Off Button.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Power Off ButtonNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Power%20Off%20Button.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Power%20Off%20ButtonNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_power_off_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Low Connection.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Low ConnectionNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Low%20Connection.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Low%20ConnectionNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_signal_cellular_alt_1_bar.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Low Connection.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Low ConnectionNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Low%20Connection.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Low%20ConnectionNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_signal_cellular_alt_1_bar_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Wi-Fi off.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Wi-Fi offNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Wi-Fi%20off.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Wi-Fi%20offNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_wifi_off.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Wi-Fi off.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Wi-Fi offNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Wi-Fi%20off.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Wi-Fi%20offNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_wifi_off_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/ProcessorLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ProcessorFILL.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Processor.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ProcessorNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_memory.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/ProcessorLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ProcessorFILL.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Processor.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ProcessorNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_memory_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/Radio WavesLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Radio WavesFILL.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Radio Waves.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Radio WavesNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Radio%20WavesLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Radio%20WavesFILL.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Radio%20Waves.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Radio%20WavesNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_cell_tower.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/Radio WavesLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Radio WavesFILL.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Radio Waves.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Radio WavesNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Radio%20WavesLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Radio%20WavesFILL.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Radio%20Waves.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Radio%20WavesNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_cell_tower_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/ConsoleLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ConsoleFILL.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/Console.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ConsoleNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_terminal.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/ConsoleLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ConsoleFILL.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/Console.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ConsoleNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_terminal_noche.svg"); filter: none !important; }
  html body.tema-google img[src*="/ListLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ListFILL.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/List.ico"]:not(.ico):not(.leaflet-marker-icon), html body.tema-google img[src*="/ListNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_list.svg"); filter: none !important; }
  html.night body.tema-google img[src*="/ListLINE.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ListFILL.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/List.ico"]:not(.ico):not(.leaflet-marker-icon), html.night body.tema-google img[src*="/ListNIGHT.ico"]:not(.ico):not(.leaflet-marker-icon) { content: url("/static/images/md/a_list_noche.svg"); filter: none !important; }
}

@media (min-width: 769px) and (max-width: 1299px) {
  /* con el menú abierto, Acción queda angosta: botones un poco más chicos para que no se corten */
  html body.tg-mon-lw:not(#tgNada) #table-container table td:nth-child(12), html.night body.tg-mon-lw:not(#tgNada) #table-container table td:nth-child(12) { padding-left: 2px; padding-right: 2px; }
  html body.tg-monitor:not(#tgNada):not(#tgNada) td .action-btn-stop, html.night body.tg-monitor:not(#tgNada):not(#tgNada) td .action-btn-stop, html body.tg-monitor:not(#tgNada):not(#tgNada) td .action-btn-start, html.night body.tg-monitor:not(#tgNada):not(#tgNada) td .action-btn-start { width: 30px; margin-left: 2px; }
}

@media (min-width: 769px) {
  /* novedades de KPI: el icono de noche ya es claro, sin oscurecerlo */
  html.night body.tema-google:not(#tgNada) .kpi-rev-ico img { filter: none !important; }
}

/* ===================== Skeletons de carga: colores del tema y forma de cada pantalla ===================== */
@keyframes tg-sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (min-width: 769px) {
  body.tema-google { --tg-sk-a: #eceef1; --tg-sk-b: #f7f8f9; }
  html.night body.tema-google { --tg-sk-a: #26282b; --tg-sk-b: #34373b; }
  html body.tema-google .skeleton-block, html.night body.tema-google .skeleton-block, html body.tema-google .skeleton-line, html.night body.tema-google .skeleton-line, html body.tema-google .sk, html.night body.tema-google .sk, body.tema-google #kpiSkeleton .sk-box::before, body.tema-google #kpiSkeleton .sk-box::after {
    background: linear-gradient(90deg, var(--tg-sk-a) 25%, var(--tg-sk-b) 50%, var(--tg-sk-a) 75%) !important; background-size: 300% 100% !important; background-repeat: repeat !important; animation: tg-sk 1.5s linear infinite !important; }

  /* tablas: marco fino, cabecera y filas con la altura real */
  html body.tema-google .skeleton-table, html.night body.tema-google .skeleton-table, html body.tema-google .listado-skeleton, html.night body.tema-google .listado-skeleton, html body.tema-google #envSkeleton .sk-table, html.night body.tema-google #envSkeleton .sk-table {
    display: flex; flex-direction: column; gap: 1px; overflow: hidden; border: 1px solid var(--tg-linea); border-radius: 16px; background: var(--tg-linea); box-shadow: none; }
  html body.tema-google .skeleton-table .skeleton-row, html body.tema-google .listado-skeleton .fila, html body.tema-google #envSkeleton .sk-row { height: 44px; border: 0; border-radius: 0 !important; }
  html body.tema-google .skeleton-table .skeleton-row:first-child, html body.tema-google .listado-skeleton .cabecera, html body.tema-google #envSkeleton .sk-row-head { height: 48px; border: 0; border-radius: 0 !important; }
  html body.tema-google .tabla-skeleton, html.night body.tema-google .tabla-skeleton { background: var(--tg-hoja); }
  body.tema-google #mapSkeleton { border-radius: 16px; }
  html body.tema-google .skeleton-btn { border-radius: 8px; }
  html body.tema-google tr.tg-sk-fila td, html.night body.tema-google tr.tg-sk-fila td { height: 44px; padding: 0 16px; }

  /* Monitores: tarjetas y acciones en la misma fila, como la pantalla real */
  body.tg-monitor .loading-screen.skeleton { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 12px; margin-top: 12px; }
  body.tg-mon-ss .loading-screen.skeleton { grid-template-columns: minmax(0, 1fr); }
  body.tg-monitor .skeleton-cards { flex-wrap: nowrap; gap: 8px; margin: 0; }
  body.tg-monitor .skeleton-card { flex: 1 1 0; height: 49px; border-radius: 14px; }
  body.tg-monitor .skeleton-mass-actions { align-items: center; gap: 8px; margin: 0; }
  html body.tg-monitor .skeleton-btn { flex: none; width: 112px; height: 36px; border-radius: 999px; }
  body.tg-monitor .skeleton-table { grid-column: 1 / -1; }

  /* KPI: sin la dona, tarjetas a todo el ancho y los dos paneles de abajo */
  body.tema-google #kpiSkeleton .sk-section { margin: 14px 0; }
  body.tema-google #kpiSkeleton .sk-section:has(.sk-pie) { display: none; }
  body.tema-google #kpiSkeleton .sk-h2 { width: 180px; height: 16px; }
  body.tema-google #kpiSkeleton .sk-cards { flex-wrap: nowrap; gap: 12px; }
  body.tema-google #kpiSkeleton .sk-card { flex: 1 1 0; min-width: 0; max-width: none; height: 88px; border-radius: 16px; }
  body.tema-google #kpiSkeleton .sk-meter { max-width: none; height: 8px; border-radius: 4px; }
  html body.tema-google #kpiSkeleton .sk-box, html.night body.tema-google #kpiSkeleton .sk-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: none; height: 334px; background: none !important; animation: none !important; }
  body.tema-google #kpiSkeleton .sk-box::before, body.tema-google #kpiSkeleton .sk-box::after { content: ""; border-radius: 16px; }

  /* Historial de envíos y Registro del equipo */
  body.tema-google #envSkeleton .sk-cards { flex-wrap: nowrap; gap: 12px; }
  body.tema-google #envSkeleton .sk-card { flex: 1 1 0; height: 68px; border-radius: 16px; }
  body.tema-google #envSkeleton .sk-pill { height: 40px; border-radius: 8px; }
  body.tema-google #regSkeleton .sk-head { border-radius: 16px; }
  body.tema-google #regSkeleton .sk-chip { border-radius: 8px; }
  body.tema-google #regSkeleton .sk-ev { border-radius: 12px; }
}
@media (min-width: 769px) and (prefers-reduced-motion: reduce) {
  html body.tema-google .skeleton-block, html.night body.tema-google .skeleton-block, html body.tema-google .skeleton-line, html.night body.tema-google .skeleton-line, html body.tema-google .sk, html.night body.tema-google .sk, body.tema-google #kpiSkeleton .sk-box::before, body.tema-google #kpiSkeleton .sk-box::after { animation: none !important; }
}

@media (min-width: 769px) {
  /* interruptor de modo nocturno: switch de Material 3 (sin marcar = día, marcado = noche) */
  html body.tema-google .checkbox-wrapper-5 .check { width: 52px; height: 32px; background: none; perspective: none; }
  html body.tema-google .checkbox-wrapper-5 .check label { display: block; width: 52px; height: 32px; border: 2px solid #747775; border-radius: 16px; background: #e1e3e1; transition: background .2s, border-color .2s; }
  html body.tema-google .checkbox-wrapper-5 .check input[type="checkbox"] { top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #747775; box-shadow: none; transition: left .2s cubic-bezier(.2, 0, 0, 1), background .2s, box-shadow .15s; }
  html body.tema-google .checkbox-wrapper-5 .check input[type="checkbox"]:checked { left: 24px; background: var(--tg-hoja); }
  html body.tema-google .checkbox-wrapper-5 .check input[type="checkbox"]:checked + label { border-color: var(--tg-primario); background: var(--tg-primario); }
  html body.tema-google .checkbox-wrapper-5 .check input[type="checkbox"]:hover { box-shadow: 0 0 0 6px var(--tg-hover); }
  html body.tema-google .checkbox-wrapper-5 .check input[type="checkbox"]:focus-visible { outline: 2px solid var(--tg-primario); outline-offset: 2px; }
  html body.tema-google .checkbox-wrapper-5 .check label::before { content: none; }
  html body.tema-google .checkbox-wrapper-5 .check label::after { content: "light_mode"; position: absolute; z-index: 4; top: 4px; left: 4px; right: auto; width: 24px; height: 24px; overflow: hidden; color: #e1e3e1; font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 16px; line-height: 24px; letter-spacing: normal; text-align: center; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; pointer-events: none; transition: left .2s cubic-bezier(.2, 0, 0, 1), color .2s; }
  html body.tema-google .checkbox-wrapper-5 .check input[type="checkbox"]:checked + label::after { content: "dark_mode"; left: 24px; color: var(--tg-primario); }
}
@media (min-width: 769px) and (prefers-reduced-motion: reduce) {
  html body.tema-google .checkbox-wrapper-5 .check input[type="checkbox"], html body.tema-google .checkbox-wrapper-5 .check label, html body.tema-google .checkbox-wrapper-5 .check label::after { transition: none; }
}

@media (min-width: 769px) {
  /* casillas de Configuración, Permisos y Usuarios: switch de Material 3 */
  body.tema-google { --tg-sw-riel: #e1e3e1; --tg-sw-borde: #747775; }
  html.night body.tema-google { --tg-sw-riel: #36393d; --tg-sw-borde: #8e918f; }
  body.tema-google .checkbox-wrapper-3 { position: relative; flex: none; width: 52px; height: 32px; }
  html body.tema-google .checkbox-wrapper-3 input[type="checkbox"] { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
  html body.tema-google .checkbox-wrapper-3 label.toggle { display: block; box-sizing: border-box; width: 52px; height: 32px; margin: 0; border: 2px solid var(--tg-sw-borde); border-radius: 16px; background: var(--tg-sw-riel); transition: background .2s, border-color .2s; }
  html body.tema-google .checkbox-wrapper-3 label.toggle span { position: absolute; top: 8px; left: 8px; width: 16px; height: 16px; overflow: hidden; border-radius: 50%; background: var(--tg-sw-borde); color: var(--tg-primario); font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 16px; line-height: 24px; letter-spacing: normal; text-align: center; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; transition: top .2s cubic-bezier(.2, 0, 0, 1), left .2s cubic-bezier(.2, 0, 0, 1), width .2s, height .2s, background .2s, box-shadow .15s; }
  html body.tema-google .checkbox-wrapper-3 input:checked + label.toggle { border-color: var(--tg-primario); background: var(--tg-primario); }
  html body.tema-google .checkbox-wrapper-3 input:checked + label.toggle span { top: 4px; left: 24px; width: 24px; height: 24px; background: var(--tg-hoja); }
  body.tema-google .checkbox-wrapper-3 input:checked + label.toggle span::before { content: "check"; }
  html body.tema-google .checkbox-wrapper-3 input:hover:not(:disabled) + label.toggle span { box-shadow: 0 0 0 5px var(--tg-hover); }
  html body.tema-google .checkbox-wrapper-3 input:focus-visible + label.toggle { outline: 2px solid var(--tg-primario); outline-offset: 2px; }
  html body.tema-google .checkbox-wrapper-3 input:disabled { cursor: default; }
  html body.tema-google .checkbox-wrapper-3 input:disabled + label.toggle { opacity: .38; }
  /* que el halo no se recorte en la lista con desplazamiento */
  html body.tema-google #modalPermisos:not(#tgNada):not(#tgNada) #listaPermisos { padding-right: 6px !important; }
}
@media (min-width: 769px) and (prefers-reduced-motion: reduce) {
  html body.tema-google .checkbox-wrapper-3 label.toggle, html body.tema-google .checkbox-wrapper-3 label.toggle span { transition: none; }
}

@media (min-width: 769px) {
  html body.tema-google #modalPermisos:not(#tgNada) #listaPermisos, html body.tema-google #fuListaModulos:not(#tgNada) { column-gap: 32px !important; }
}

/* ===================== Login Material (body.tg-login, lo pone tema-google.js) ===================== */
.tg-etq { display: none; }
html body.tg-login .login-card:not(#tgNada), html.night body.tg-login .login-card:not(#tgNada) { box-sizing: border-box; width: 360px; max-width: calc(100vw - 32px); padding: 24px; border: 0; border-radius: 28px; background: var(--tg-hoja); box-shadow: var(--tg-sombra); color: var(--tg-texto); font-family: Roboto, Arial, sans-serif; text-align: center; }
body.tg-login .login-card img.login-avatar { display: none; }
body.tg-login .login-card::before { content: "account_circle"; display: block; width: 40px; height: 40px; margin: 8px auto 12px; overflow: hidden; color: var(--tg-primario); font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 40px; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
html body.tg-login .login-title:not(#tgNada), html.night body.tg-login .login-title:not(#tgNada) { margin: 0 0 24px; color: var(--tg-texto); font-size: 24px; font-weight: 400; line-height: 32px; text-align: center; }
/* campo con contorno y etiqueta flotante */
html body.tg-login .login-field:not(#tgNada), html.night body.tg-login .login-field:not(#tgNada) { position: relative; display: block; box-sizing: border-box; height: 56px; margin: 0 0 16px; padding: 0; border: 1px solid var(--tg-texto-2); border-radius: 8px; background: none; box-shadow: none; text-align: left; }
html body.tg-login .login-field:not(#tgNada):hover { border-color: var(--tg-texto); }
html body.tg-login .login-field:not(#tgNada):focus-within, html.night body.tg-login .login-field:not(#tgNada):focus-within { border: 2px solid var(--tg-primario); }
body.tg-login .login-field svg { display: none; }
body.tg-login .login-field::before { position: absolute; top: 15px; left: 12px; width: 24px; height: 24px; overflow: hidden; color: var(--tg-texto-2); font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; pointer-events: none; }
body.tg-login .login-field:has(input[type="text"])::before { content: "person"; }
body.tg-login .login-field:has(input[type="password"])::before { content: "lock"; }
body.tg-login .login-field:focus-within::before { top: 14px; left: 11px; }
html body.tg-login .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .login-field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), html.night body.tg-login .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .login-field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) { box-sizing: border-box; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0 16px 0 48px; border: 0 !important; border-radius: 8px !important; outline: 0; background: none !important; box-shadow: none; color: var(--tg-texto) !important; font: 16px Roboto, Arial, sans-serif; }
body.tg-login .login-field input::placeholder { color: transparent; opacity: 0; }
body.tg-login .tg-etq { position: absolute; top: 50%; left: 48px; display: block; padding: 0 4px; margin-left: -4px; background: var(--tg-hoja); color: var(--tg-texto-2); font-size: 16px; line-height: 1; transform: translateY(-50%); transition: top .15s, left .15s, font-size .15s, color .15s; pointer-events: none; }
body.tg-login .login-field:focus-within .tg-etq, body.tg-login .login-field:has(input:not(:placeholder-shown)) .tg-etq, body.tg-login .login-field:has(input:-webkit-autofill) .tg-etq { top: 0; left: 16px; font-size: 12px; }
body.tg-login .login-field:focus-within .tg-etq { color: var(--tg-primario); }
/* casilla Material */
html body.tg-login .login-remember:not(#tgNada), html.night body.tg-login .login-remember:not(#tgNada) { display: flex; align-items: center; gap: 12px; min-height: 40px; margin: 0 0 16px; color: var(--tg-texto); font-size: 14px; text-align: left; }
html body.tg-login .login-remember input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; box-sizing: border-box; width: 18px; height: 18px; margin: 0; border: 2px solid var(--tg-texto-2); border-radius: 2px; background: none center / 16px no-repeat; cursor: pointer; }
html body.tg-login .login-remember input[type="checkbox"]:checked { border-color: var(--tg-primario); background-color: var(--tg-primario); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' stroke='%23fff' stroke-width='3' fill='none'/%3E%3C/svg%3E"); }
html.night body.tg-login .login-remember input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' stroke='%231e1f20' stroke-width='3' fill='none'/%3E%3C/svg%3E"); }
html body.tg-login .login-remember input[type="checkbox"]:focus-visible { outline: 2px solid var(--tg-primario); outline-offset: 2px; }
/* botones */
html body.tg-login .modal-hist:not(#tgNada):not(#tgNada) .login-btn-primary.login-btn-primary, html.night body.tg-login .modal-hist:not(#tgNada):not(#tgNada) .login-btn-primary.login-btn-primary { display: block; width: 100%; height: 48px; margin: 0 0 8px; padding: 0 24px; border: 0; border-radius: 999px !important; background: var(--tg-primario) !important; background-image: none !important; box-shadow: none; color: var(--tg-hoja) !important; font: 500 14px Roboto, Arial, sans-serif; letter-spacing: .1px; text-transform: none; }
html body.tg-login .modal-hist:not(#tgNada):not(#tgNada) .login-btn-guest, html.night body.tg-login .modal-hist:not(#tgNada):not(#tgNada) .login-btn-guest { display: block; width: 100%; height: 48px; margin: 0; padding: 0 24px; border: 0; border-radius: 999px !important; background: none !important; box-shadow: none; color: var(--tg-primario) !important; font: 500 14px Roboto, Arial, sans-serif; }
html body.tg-login .modal-hist:not(#tgNada):not(#tgNada) .login-btn-guest:hover { background: var(--tg-hover) !important; }
@media (prefers-reduced-motion: reduce) { body.tg-login .tg-etq { transition: none; } }

/* Barra inferior del teléfono en páginas aún sin migrar: iconos Material claros sobre la barra azul */
@media (max-width: 768px) {
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/SyncLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Sync.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/SyncLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Sync.ico"] { content: url("/static/images/md/b_sync_noche.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/SyncFILL.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/SyncFILL.ico"] { content: url("/static/images/md/b_sync_lleno_dia.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/LocationLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Location.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/LocationLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Location.ico"] { content: url("/static/images/md/b_location_on_noche.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/ProcessorLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Processor.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/ProcessorLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Processor.ico"] { content: url("/static/images/md/b_memory_noche.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/ProcessorFILL.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/ProcessorFILL.ico"] { content: url("/static/images/md/b_memory_lleno_dia.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Time MachineLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Time Machine.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Time%20MachineLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Time%20Machine.ico"] { content: url("/static/images/md/b_history_noche.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Time MachineFILL.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Time%20MachineFILL.ico"] { content: url("/static/images/md/b_history_lleno_dia.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/DownloadLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Download.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/DownloadLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Download.ico"] { content: url("/static/images/md/b_download_noche.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/UploadLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Upload.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/UploadLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Upload.ico"] { content: url("/static/images/md/b_upload_noche.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/MapLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Map.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/MapLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Map.ico"] { content: url("/static/images/md/b_map_noche.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/MapFILL.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/MapFILL.ico"] { content: url("/static/images/md/b_map_lleno_dia.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/TolvaLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Tolva.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/TolvaLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Tolva.ico"] { content: url("/static/images/md/b_tolva_noche.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/TolvaFILL.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/TolvaFILL.ico"] { content: url("/static/images/md/b_tolva_lleno_dia.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/AddLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Add.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/AddLINE.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/Add.ico"] { content: url("/static/images/md/b_add_noche.svg"); filter: none !important; }
  html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/AddFILL.ico"], html body.tema-google:not(.tg-movil) #bottom-bar img[src*="/AddFILL.ico"] { content: url("/static/images/md/b_add_lleno_dia.svg"); filter: none !important; }
html body.tema-google:not(.tg-movil) #bottom-bar [data-tab="tab-hidrofono"] img.ico-line { content: url("/static/images/md/b_graphic_eq_noche.svg"); filter: none !important; }
html body.tema-google:not(.tg-movil) #bottom-bar [data-tab="tab-hidrofono"] img.ico-fill { content: url("/static/images/md/b_graphic_eq_lleno_dia.svg"); filter: none !important; }
html body.tema-google:not(.tg-movil) #bottom-bar #btnHomeMobile img { content: url("/static/images/md/b_home_lleno_dia.svg"); filter: none !important; }
html body.tema-google:not(.tg-movil) #bottom-bar #bottomUserBtn img { content: url("/static/images/md/b_person_noche.svg"); filter: none !important; }
}

/* botón de volver arriba: flecha de Material Symbols */
@media (min-width: 769px) {
  body.tema-google #scrollTopBtn svg { display: none; }
  body.tema-google #scrollTopBtn::before { font: normal 24px/1 'Material Symbols Outlined'; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; content: "arrow_upward"; }
}

@media (min-width: 769px) {
/* Forma de los botones: toda acción es píldora; las opciones de un grupo son chips de 8 px y no cambian al activarse */
html body.tema-google #btnCapturarGps:not(#tgNada):not(#tgNada), html.night body.tema-google #btnCapturarGps:not(#tgNada):not(#tgNada),
  html body.tema-google #btnCapturarGpsInst:not(#tgNada):not(#tgNada), html.night body.tema-google #btnCapturarGpsInst:not(#tgNada):not(#tgNada),
  html body.tema-google #btnEnviarMoverEquipo:not(#tgNada):not(#tgNada), html.night body.tema-google #btnEnviarMoverEquipo:not(#tgNada):not(#tgNada),
  html body.tema-google #btnGuardarInstalacion:not(#tgNada):not(#tgNada), html.night body.tema-google #btnGuardarInstalacion:not(#tgNada):not(#tgNada),
  html body.tema-google #btnGuardarReporte:not(#tgNada):not(#tgNada), html.night body.tema-google #btnGuardarReporte:not(#tgNada):not(#tgNada),
  html body.tema-google #mfEditarCaminos:not(#tgNada):not(#tgNada), html.night body.tema-google #mfEditarCaminos:not(#tgNada):not(#tgNada),
  html body.tema-google .finca-barra button:not(#tgNada):not(#tgNada), html.night body.tema-google .finca-barra button:not(#tgNada):not(#tgNada),
  html body.tema-google #main-content .btn:not(#tgNada):not(#tgNada), html.night body.tema-google #main-content .btn:not(#tgNada):not(#tgNada),
  html body.tema-google .btn-limpiar-uid:not(#tgNada):not(#tgNada), html.night body.tema-google .btn-limpiar-uid:not(#tgNada):not(#tgNada),
  html body.tema-google .finca-toast-cerrar:not(#tgNada):not(#tgNada), html.night body.tema-google .finca-toast-cerrar:not(#tgNada):not(#tgNada),
  html body.tema-google .gps-card-toggle:not(#tgNada):not(#tgNada), html.night body.tema-google .gps-card-toggle:not(#tgNada):not(#tgNada),
  html body.tema-google #btnExportarExcel:not(#tgNada):not(#tgNada), html.night body.tema-google #btnExportarExcel:not(#tgNada):not(#tgNada),
  html body.tema-google #btnGpsPond:not(#tgNada):not(#tgNada), html.night body.tema-google #btnGpsPond:not(#tgNada):not(#tgNada),
  html body.tema-google #toggleColumns:not(#tgNada):not(#tgNada), html.night body.tema-google #toggleColumns:not(#tgNada):not(#tgNada),
  html body.tema-google td .action-btn-stop:not(#tgNada):not(#tgNada), html.night body.tema-google td .action-btn-stop:not(#tgNada):not(#tgNada),
  html body.tema-google td .action-btn-start:not(#tgNada):not(#tgNada), html.night body.tema-google td .action-btn-start:not(#tgNada):not(#tgNada),
  html body.tema-google .hist-btn:not(#tgNada):not(#tgNada), html.night body.tema-google .hist-btn:not(#tgNada):not(#tgNada),
  html body.tema-google .col-filter-btn:not(#tgNada):not(#tgNada), html.night body.tema-google .col-filter-btn:not(#tgNada):not(#tgNada),
  html body.tema-google .foto-btn:not(#tgNada):not(#tgNada), html.night body.tema-google .foto-btn:not(#tgNada):not(#tgNada),
  html body.tema-google .btn-accion:not(#tgNada):not(#tgNada), html.night body.tema-google .btn-accion:not(#tgNada):not(#tgNada),
  html body.tema-google .historial-filtros button:not(#tgNada):not(#tgNada), html.night body.tema-google .historial-filtros button:not(#tgNada):not(#tgNada) { border-radius: 999px !important; }
html body.tema-google .finca-filtro button:not(#tgNada):not(#tgNada), html.night body.tema-google .finca-filtro button:not(#tgNada):not(#tgNada),
  html body.tema-google .finca-filtro button.activa:not(#tgNada):not(#tgNada), html.night body.tema-google .finca-filtro button.activa:not(#tgNada):not(#tgNada),
  html body.tema-google .mf-capa:not(#tgNada):not(#tgNada), html.night body.tema-google .mf-capa:not(#tgNada):not(#tgNada),
  html body.tema-google .mf-capa.is-activo:not(#tgNada):not(#tgNada), html.night body.tema-google .mf-capa.is-activo:not(#tgNada):not(#tgNada),
  html body.tema-google .snd-cinta-pill:not(#tgNada):not(#tgNada), html.night body.tema-google .snd-cinta-pill:not(#tgNada):not(#tgNada),
  html body.tema-google .snd-cinta-pill.is-activo:not(#tgNada):not(#tgNada), html.night body.tema-google .snd-cinta-pill.is-activo:not(#tgNada):not(#tgNada),
  html body.tema-google .snd-cinta-pill.activa:not(#tgNada):not(#tgNada), html.night body.tema-google .snd-cinta-pill.activa:not(#tgNada):not(#tgNada),
  html body.tema-google .kpi-dia:not(#tgNada):not(#tgNada), html.night body.tema-google .kpi-dia:not(#tgNada):not(#tgNada),
  html body.tema-google .kpi-dia.is-activo:not(#tgNada):not(#tgNada), html.night body.tema-google .kpi-dia.is-activo:not(#tgNada):not(#tgNada),
  html body.tema-google .kpi-subtab-btn:not(#tgNada):not(#tgNada), html.night body.tema-google .kpi-subtab-btn:not(#tgNada):not(#tgNada),
  html body.tema-google .kpi-subtab-btn.active:not(#tgNada):not(#tgNada), html.night body.tema-google .kpi-subtab-btn.active:not(#tgNada):not(#tgNada),
  html body.tema-google .inst-ribbon-btn:not(#tgNada):not(#tgNada), html.night body.tema-google .inst-ribbon-btn:not(#tgNada):not(#tgNada),
  html body.tema-google .inst-ribbon-btn.selected:not(#tgNada):not(#tgNada), html.night body.tema-google .inst-ribbon-btn.selected:not(#tgNada):not(#tgNada),
  html body.tema-google .modo-btn:not(#tgNada):not(#tgNada), html.night body.tema-google .modo-btn:not(#tgNada):not(#tgNada),
  html body.tema-google .modo-btn.active:not(#tgNada):not(#tgNada), html.night body.tema-google .modo-btn.active:not(#tgNada):not(#tgNada),
  html body.tema-google .modo-btn.activo:not(#tgNada):not(#tgNada), html.night body.tema-google .modo-btn.activo:not(#tgNada):not(#tgNada),
  html body.tema-google .reg-chip:not(#tgNada):not(#tgNada), html.night body.tema-google .reg-chip:not(#tgNada):not(#tgNada),
  html body.tema-google .reg-chip.activo:not(#tgNada):not(#tgNada), html.night body.tema-google .reg-chip.activo:not(#tgNada):not(#tgNada),
  html body.tema-google .sender-pill:not(#tgNada):not(#tgNada), html.night body.tema-google .sender-pill:not(#tgNada):not(#tgNada),
  html body.tema-google .sender-pill.checked:not(#tgNada):not(#tgNada), html.night body.tema-google .sender-pill.checked:not(#tgNada):not(#tgNada),
  html body.tema-google .clase-btn:not(#tgNada):not(#tgNada), html.night body.tema-google .clase-btn:not(#tgNada):not(#tgNada),
  html body.tema-google .clase-btn.activo:not(#tgNada):not(#tgNada), html.night body.tema-google .clase-btn.activo:not(#tgNada):not(#tgNada) { border-radius: 8px !important; }
/* elementos que llenan los datos: tema-google.js marca las tarjetas sin dato; mapas y listas esperan con ellas */
html body.tema-google .card.tg-sk-tarjeta:not(#tgNada), html.night body.tema-google .card.tg-sk-tarjeta:not(#tgNada) { border-color: transparent !important; background: linear-gradient(90deg, var(--tg-sk-a) 25%, var(--tg-sk-b) 50%, var(--tg-sk-a) 75%) !important; background-size: 300% 100% !important; animation: tg-sk 1.5s linear infinite; box-shadow: none !important; }
body.tema-google .card.tg-sk-tarjeta > * { visibility: hidden; }
html body.tema-google:has(.tg-sk-tarjeta) :is(#sndMapa, #gwMapa, #mfMapa):not(.leaflet-container), html body.tema-google:has(.tg-sk-tarjeta) :is(.mf-lista, #sndGrid, #gwGrid):empty { min-height: 160px; border: 0; border-radius: 16px; background: linear-gradient(90deg, var(--tg-sk-a) 25%, var(--tg-sk-b) 50%, var(--tg-sk-a) 75%); background-size: 300% 100%; animation: tg-sk 1.5s linear infinite; }
/* Inicio: los indicadores llegan por fetch */
  html body.tema-google #escKpis:empty { display: block !important; height: 76px; border-radius: 16px; background: linear-gradient(90deg, var(--tg-sk-a) 25%, var(--tg-sk-b) 50%, var(--tg-sk-a) 75%); background-size: 300% 100%; animation: tg-sk 1.5s linear infinite; }
}


/* Botones con relleno: ningún botón de acción queda blanco sobre fondo blanco (ni oscuro sobre oscuro de noche).
   Relleno gris azulado suave en vez de solo contorno. Aplica en todos los anchos. */
body.tema-google { --tg-boton: #dfe5ee; --tg-boton-hover: #d0d8e4; }
html.night body.tema-google { --tg-boton: #35383c; --tg-boton-hover: #42464b; }
html body.tema-google #btnCapturarGps:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google #btnCapturarGps:not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google #btnCapturarGpsInst:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google #btnCapturarGpsInst:not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google #mfEditarCaminos:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google #mfEditarCaminos:not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google .finca-barra button:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google .finca-barra button:not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google #main-content .btn:not([style*="background"]):not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google #main-content .btn:not([style*="background"]):not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google .btn-limpiar-uid:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google .btn-limpiar-uid:not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google .finca-toast-cerrar:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google .finca-toast-cerrar:not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google .gps-card-toggle:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google .gps-card-toggle:not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google #btnExportarExcel:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google #btnExportarExcel:not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google #btnGpsPond:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google #btnGpsPond:not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google #toggleColumns:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google #toggleColumns:not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google .foto-btn:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google .foto-btn:not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google .finca-filtro button:not(.activa):not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google .finca-filtro button:not(.activa):not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google #pingOfflineBtn:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google #pingOfflineBtn:not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google #btnTestPush:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google #btnTestPush:not(#tgNada):not(#tgNada):not(#tgNada),
  html body.tema-google .zoom-btn:not(#tgNada):not(#tgNada):not(#tgNada), html.night body.tema-google .zoom-btn:not(#tgNada):not(#tgNada):not(#tgNada) { background-color: var(--tg-boton) !important; background-image: none !important; border-color: transparent !important; box-shadow: none !important; }
html body.tema-google #btnCapturarGps:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google #btnCapturarGps:not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google #btnCapturarGpsInst:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google #btnCapturarGpsInst:not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google #mfEditarCaminos:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google #mfEditarCaminos:not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google .finca-barra button:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google .finca-barra button:not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google #main-content .btn:not([style*="background"]):not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google #main-content .btn:not([style*="background"]):not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google .btn-limpiar-uid:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google .btn-limpiar-uid:not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google .finca-toast-cerrar:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google .finca-toast-cerrar:not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google .gps-card-toggle:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google .gps-card-toggle:not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google #btnExportarExcel:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google #btnExportarExcel:not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google #btnGpsPond:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google #btnGpsPond:not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google #toggleColumns:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google #toggleColumns:not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google .foto-btn:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google .foto-btn:not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google .finca-filtro button:not(.activa):not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google .finca-filtro button:not(.activa):not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google #pingOfflineBtn:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google #pingOfflineBtn:not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google #btnTestPush:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google #btnTestPush:not(#tgNada):not(#tgNada):not(#tgNada):hover,
  html body.tema-google .zoom-btn:not(#tgNada):not(#tgNada):not(#tgNada):hover, html.night body.tema-google .zoom-btn:not(#tgNada):not(#tgNada):not(#tgNada):hover { background-color: var(--tg-boton-hover) !important; }
/* "Editar caminos" es una acción, no una capa apagada: sin la transparencia de .mf-capa */
html body.tema-google #mfEditarCaminos { opacity: 1; }

/* APA e INI de la tabla: fondo de botón usual, icono rojo o verde (2026-11-07) */
html body.tg-monitor:not(#tgNada):not(#tgNada) td .action-btn-stop, html.night body.tg-monitor:not(#tgNada):not(#tgNada) td .action-btn-stop,
html body.tg-monitor:not(#tgNada):not(#tgNada) td .action-btn-start, html.night body.tg-monitor:not(#tgNada):not(#tgNada) td .action-btn-start { background: var(--tg-boton) !important; }
html body.tg-monitor:not(#tgNada):not(#tgNada) td .action-btn-stop:hover, html.night body.tg-monitor:not(#tgNada):not(#tgNada) td .action-btn-stop:hover,
html body.tg-monitor:not(#tgNada):not(#tgNada) td .action-btn-start:hover, html.night body.tg-monitor:not(#tgNada):not(#tgNada) td .action-btn-start:hover { background: var(--tg-boton-hover) !important; }
html body.tg-monitor td .action-btn-stop .tg-power, html body.tg-monitor:not(#tgNada) td .action-btn-stop { color: #d93025 !important; }
html body.tg-monitor td .action-btn-start .tg-power, html body.tg-monitor:not(#tgNada) td .action-btn-start { color: #188038 !important; }
html.night body.tg-monitor td .action-btn-stop .tg-power { color: #f28b82 !important; }
html.night body.tg-monitor td .action-btn-start .tg-power { color: #81c995 !important; }

/* chips Online/Offline más claros en modo día (2026-11-07) */
html:not(.night) body.tg-monitor:not(#tgNada) .status-pill.online { background: #e6f4ea; color: #137333; }
html:not(.night) body.tg-monitor:not(#tgNada) .status-pill.offline { background: #fce8e6; color: #c5221f; }

/* tarjetas contadoras del Monitor más suaves en modo noche (2026-11-07) */
html.night body.tg-monitor:not(#tgNada) .card.online-card { background: #1e3527 !important; color: #a8dab5 !important; }
html.night body.tg-monitor:not(#tgNada) .card.offline-card { background: #3d2221 !important; color: #f2b8b5 !important; }
html.night body.tg-monitor:not(#tgNada) .card.low-battery-card, html.night body.tg-monitor:not(#tgNada) .card.SCC-err-card { background: #3a3120 !important; color: #f6d78b !important; }

/* Ficha de apagadores: Gráfico y registro en una sola pestaña (2026-11-07) */
#modalHistorial .hist-dividido { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 769px) {
  body.tema-google #modalHistorial .hist-dividido { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; gap: 16px; }
  body.tema-google #modalHistorial .hist-col-grafico { min-width: 0; }
  body.tema-google #modalHistorial .hist-col-registro { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-height: min(56vh, 480px); overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
  html body.tema-google #modalHistorial:not(#tgNada) .hist-col-registro .registro-lista { grid-template-columns: minmax(0, 1fr); max-height: none; overflow: visible; }
  body.tema-google #modalHistorial .hist-col-registro .btn-ver-mas { flex: none; }
}

/* Detalle de un envío (KPI → Respuesta a comandos): mapa a la izquierda en vez de la columna vacía (2026-11-07) */
@media (min-width: 769px) {
  html body.tema-google #modalComando:not(#tgNada) > .modal-content { width: min(1180px, calc(100vw - 64px)) !important; height: min(720px, calc(100vh - 64px)); overflow: hidden !important; }
  html body.tema-google #modalComando:not(#tgNada) .kpi-rev-modal-body { display: block; max-height: none; height: 100%; }
}

/* Escritorio: la campana de la barra superior ya abre Notificaciones; se quita del menú de usuario (2026-11-07).
   Solo CSS: el display inline de #sidebarMenuNotificaciones sigue decidiendo si la campana se ve. */
@media (min-width: 769px) {
  html body.tema-google:has(.tg-barra) #sidebarMenuNotificaciones { display: none !important; }
}

/* ===== Foto de perfil (user-menu.js: pintarPerfil) — 2026-11-07 ===== */
.perfil-avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; border-radius: 50%; background: var(--tg-primario, #1a73e8); color: #fff; font: 500 16px Roboto, Arial, sans-serif; }
.perfil-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.perfil-avatar.is-grande { width: 56px; height: 56px; font-size: 24px; }
.perfil-avatar.is-barra { width: 28px; height: 28px; font-size: 14px; }
html body.tema-google .perfil-cab, html.night body.tema-google .perfil-cab { display: flex; align-items: center; gap: 14px; margin: 0 0 4px; padding: 12px 12px 14px; border-bottom: 1px solid var(--tg-linea); }
html body.tema-google .perfil-foto-btn, html.night body.tema-google .perfil-foto-btn { position: relative; flex: none; width: 56px !important; height: 56px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: none !important; box-shadow: none !important; cursor: pointer; }
.perfil-cam { position: absolute; right: -2px; bottom: -2px; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 2px solid var(--tg-hoja, #fff); border-radius: 50%; background: var(--tg-boton, #dfe5ee); }
.perfil-cam svg { width: 13px; height: 13px; fill: var(--tg-texto, #1f1f1f); }
.perfil-txt { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
html body.tema-google .perfil-txt strong, html.night body.tema-google .perfil-txt strong { overflow: hidden; color: var(--tg-texto); font: 500 16px Roboto, Arial, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
html body.tema-google .perfil-txt > span, html.night body.tema-google .perfil-txt > span { color: var(--tg-texto-2); font-size: 12px; }
.perfil-acc { display: flex; gap: 6px; margin-top: 6px; }
html body.tema-google .perfil-acc button:not(#tgNada), html.night body.tema-google .perfil-acc button:not(#tgNada) { width: auto !important; height: 28px !important; margin: 0 !important; padding: 0 12px !important; border: 0 !important; border-radius: 999px !important; background: var(--tg-boton) !important; box-shadow: none !important; color: var(--tg-texto) !important; font: 500 12px Roboto, Arial, sans-serif !important; cursor: pointer; }
html body.tema-google .perfil-acc button:not(#tgNada):hover, html.night body.tema-google .perfil-acc button:not(#tgNada):hover { background: var(--tg-boton-hover) !important; }
/* botón de cuenta con foto */
html body.tema-google .tg-cuenta.con-foto { background-color: transparent; background-position: center; background-size: cover; color: transparent; }
/* barra inferior: el avatar ocupa el lugar del icono */
#bottomUserBtn .user-avatar-wrap .perfil-avatar.is-barra { box-shadow: 0 0 0 2px var(--tg-hoja, #fff); }
html body.tema-google .perfil-foto-btn > .perfil-avatar { width: 56px; height: 56px; line-height: 1; }
html body.tema-google .perfil-acc button:not(#tgNada), html.night body.tema-google .perfil-acc button:not(#tgNada) { white-space: nowrap; }
/* la regla de la barra inferior cambia todo img del botón por el icono de persona: la foto se respeta */
html body.tg-movil:not(#tgNada):not(#tgNada) #bottom-bar #bottomUserBtn .perfil-avatar img, html.night body.tg-movil:not(#tgNada):not(#tgNada) #bottom-bar #bottomUserBtn .perfil-avatar img { content: normal; filter: none !important; }
html body.tema-google #bottomUserMenu { min-width: 288px; box-sizing: border-box; }
html body.tema-google #sidebar .sidebar-user-menu .perfil-avatar, html.night body.tema-google #sidebar .sidebar-user-menu .perfil-avatar { display: inline-flex; align-items: center; justify-content: center; margin: 0; padding: 0; color: #fff; font-size: 24px; line-height: 1; }
html body.tema-google .perfil-avatar img { width: 100% !important; height: 100% !important; max-width: none; margin: 0 !important; padding: 0 !important; border-radius: 50%; object-fit: cover; }

/* ===== Teléfono: barra de navegación en el azul de la app (#1f2663), igual que las barras del sistema (theme-color)
   Pedido del usuario 2026-11-07: un azul de la familia del #00084d original, más suave, que combine en día y noche. ===== */
@media (max-width: 768px) {
  html body #bottom-bar:not(#tgNada), html.night body #bottom-bar:not(#tgNada) { background: #1f2663 !important; border-top: 0 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .18) !important; }
  html body #bottom-bar:not(#tgNada) > a { color: rgba(255, 255, 255, .8); }
  html body #bottom-bar:not(#tgNada) > a > img:not(.gps-pond-badge), html.night body #bottom-bar:not(#tgNada) > a > img:not(.gps-pond-badge) { filter: brightness(0) invert(1) !important; }
  html body #bottom-bar:not(#tgNada) > a.active, html.night body #bottom-bar:not(#tgNada) > a.active { background: rgba(255, 255, 255, .18) !important; box-shadow: none !important; }
  /* buscadores y filtro de la barra: cápsulas translúcidas con texto blanco */
  html body #bottom-bar:not(#tgNada) .bb-buscar, html.night body #bottom-bar:not(#tgNada) .bb-buscar,
  html body #bottom-bar:not(#tgNada) .bottom-bar-search input, html.night body #bottom-bar:not(#tgNada) .bottom-bar-search input,
  html body #bottom-bar:not(#tgNada) .bottom-bar-pond select, html.night body #bottom-bar:not(#tgNada) .bottom-bar-pond select,
  html body #bottom-bar:not(#tgNada) > input[type=text] { background: rgba(255, 255, 255, .14) !important; border: 0 !important; color: #fff !important; box-shadow: none !important; }
  html body #bottom-bar:not(#tgNada) .bb-buscar input, html.night body #bottom-bar:not(#tgNada) .bb-buscar input { color: #fff !important; }
  html body #bottom-bar:not(#tgNada) .bb-buscar svg { color: rgba(255, 255, 255, .8); }
  html body #bottom-bar:not(#tgNada) input::placeholder { color: rgba(255, 255, 255, .75) !important; opacity: 1; }
  html body #bottom-bar:not(#tgNada) select option { color: #1f1f1f; background: #fff; }
}
@media (max-width: 768px) {
  /* más específico que las reglas día/noche de los iconos (tema-google-movil.css): la barra es azul en ambos modos */
  html body #bottom-bar#bottom-bar:not(#tgNada) > a > img:not(.gps-pond-badge) { filter: brightness(0) invert(1) !important; }
  html body #bottom-bar#bottom-bar:not(#tgNada) .bb-buscar { background: rgba(255, 255, 255, .14) !important; }
  html body #bottom-bar#bottom-bar:not(#tgNada) .bb-buscar input#bbBuscar { background: none !important; color: #fff !important; }
  html body #bottom-bar#bottom-bar:not(#tgNada) input#uidSearchMobile, html body #bottom-bar#bottom-bar:not(#tgNada) select#pondFilterMobile {
    background: rgba(255, 255, 255, .14) !important; border: 0 !important; color: #fff !important; box-shadow: none !important; }
}

/* ===== Teléfono: todo lo que va dentro de la barra azul combina con ella, en día y noche (2026-11-08).
   Antes algunos campos salían claros con letra blanca (día) o gris oscuro (noche), y las pestañas tenían iconos oscuros. ===== */
@media (max-width: 768px) {
  html body #bottom-bar#bottom-bar:not(#tgNada):not(#tgNada) input:not([type=checkbox]):not([type=radio]),
  html body #bottom-bar#bottom-bar:not(#tgNada):not(#tgNada) select {
    background-color: rgba(255, 255, 255, .14) !important; background-image: none; border: 0 !important; box-shadow: none !important; color: #fff !important; -webkit-text-fill-color: #fff; }
  html body #bottom-bar#bottom-bar:not(#tgNada):not(#tgNada) select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right 12px center !important; -webkit-appearance: none; appearance: none; }
  html body #bottom-bar#bottom-bar:not(#tgNada):not(#tgNada) .bb-buscar input#bbBuscar { background: none !important; }
  html body #bottom-bar#bottom-bar:not(#tgNada):not(#tgNada) input:focus, html body #bottom-bar#bottom-bar:not(#tgNada):not(#tgNada) select:focus { background-color: rgba(255, 255, 255, .22) !important; outline: none; }
  html body #bottom-bar#bottom-bar:not(#tgNada):not(#tgNada) input::placeholder { color: rgba(255, 255, 255, .72) !important; -webkit-text-fill-color: rgba(255, 255, 255, .72); }
  html body #bottom-bar#bottom-bar:not(#tgNada):not(#tgNada) select option { color: #1f1f1f; background: #fff; -webkit-text-fill-color: #1f1f1f; }
  /* botón Enviar (MQTT): blanco con letra azul */
  html body #bottom-bar#bottom-bar:not(#tgNada):not(#tgNada) .bottom-bar-send-btn { background: #fff !important; background-image: none !important; color: #1f2663 !important; }
  /* pestañas (Registrar equipo, Instalaciones, Reportes) */
  html body #bottom-bar#bottom-bar:not(#tgNada):not(#tgNada) .bottom-bar-tab-btn { color: rgba(255, 255, 255, .8) !important; }
  html body #bottom-bar#bottom-bar:not(#tgNada):not(#tgNada) .bottom-bar-tab-btn.active { background: rgba(255, 255, 255, .18) !important; background-image: none !important; box-shadow: none !important; color: #fff !important; }
  html body #bottom-bar#bottom-bar:not(#tgNada):not(#tgNada) .bottom-bar-tab-btn img,
  html body #bottom-bar#bottom-bar:not(#tgNada):not(#tgNada) #btnHomeMobile img { filter: brightness(0) invert(1) !important; }
}

/* Historial: cabecera del gráfico de voltaje (estilo app Salud de iOS; 2026-11-09) */
.hist-volt-cab { padding: 4px 4px 2px; }
.hist-volt-tit { display: block; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--tg-texto-2, #666); }
.hist-volt-num { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--tg-texto, #111); }
.hist-volt-rango { font-size: 14px; color: var(--tg-texto-2, #666); }
#modalHistorial .chart-legend { justify-content: flex-start; gap: 12px; padding-left: 4px; color: var(--tg-texto-2, #666); }

/* ===== Ficha del equipo estilo Material 3 (pestaña Información del Monitor LW; 2026-11-09) =====
   renderEquipoInfo() en index.html. Todo con prefijo eqm- para no chocar con los estilos del modal. */
body.tema-google { --eqm-verde: #1e8e3e; --eqm-naranja: #e37400; --eqm-rojo: #d93025; }
html.night body.tema-google { --eqm-verde: #6dd58c; --eqm-naranja: #ffb95c; --eqm-rojo: #f2b8b5; }
:is(#equipoInfo, #sensorInfo) .eqm { display: flex; flex-direction: column; gap: 16px; font-family: Roboto, Arial, sans-serif; color: var(--tg-texto); text-align: left; }
:is(#equipoInfo, #sensorInfo) .eqm-ms { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 22px; line-height: 1; letter-spacing: normal;
  text-transform: none; display: inline-block; white-space: nowrap; direction: ltr; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; user-select: none; }
:is(#equipoInfo, #sensorInfo) .eqm-ms.f { font-variation-settings: 'FILL' 1; }
:is(#equipoInfo, #sensorInfo) .eqm-hero { background: var(--tg-suave); border-radius: 28px; padding: 16px 18px 14px; }
:is(#equipoInfo, #sensorInfo) .eqm-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
:is(#equipoInfo, #sensorInfo) .eqm-estado { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 8px; border-radius: 8px; font-size: 14px; font-weight: 500; }
:is(#equipoInfo, #sensorInfo) .eqm-estado .eqm-ms { font-size: 18px; }
:is(#equipoInfo, #sensorInfo) .eqm-estado.on { background: var(--tg-ok); color: var(--tg-ok-texto); }
:is(#equipoInfo, #sensorInfo) .eqm-estado.off { background: var(--tg-peligro); color: var(--tg-peligro-texto); }
:is(#equipoInfo, #sensorInfo) .eqm-sup { font-size: 13px; color: var(--tg-texto-2); }
:is(#equipoInfo, #sensorInfo) .eqm-volt { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 6px; }
:is(#equipoInfo, #sensorInfo) .eqm-num { font-size: 45px; line-height: 52px; font-weight: 400; font-variant-numeric: tabular-nums; }
:is(#equipoInfo, #sensorInfo) .eqm-uni { font-size: 22px; color: var(--tg-texto-2); }
:is(#equipoInfo, #sensorInfo) .eqm-pct { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; }
:is(#equipoInfo, #sensorInfo) .eqm-barra { height: 4px; border-radius: 2px; background: var(--tg-linea); overflow: hidden; margin-bottom: 14px; }
:is(#equipoInfo, #sensorInfo) .eqm-barra > div { height: 100%; border-radius: 2px; }
:is(#equipoInfo, #sensorInfo) .eqm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
:is(#equipoInfo, #sensorInfo) .eqm-stat { background: var(--tg-hoja); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
:is(#equipoInfo, #sensorInfo) .eqm-stat > .eqm-ms { font-size: 20px; color: var(--tg-primario); }
:is(#equipoInfo, #sensorInfo) .eqm-stat .l { font-size: 12px; color: var(--tg-texto-2); }
:is(#equipoInfo, #sensorInfo) .eqm-stat .v { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#equipoInfo, #sensorInfo) .eqm-alerta { font-size: 16px; color: var(--eqm-naranja); }
:is(#equipoInfo, #sensorInfo) .eqm-tit { font-size: 14px; font-weight: 500; color: var(--tg-primario); padding: 4px 16px; }
:is(#equipoInfo, #sensorInfo) .eqm-card { border: 1px solid var(--tg-linea); border-radius: 16px; overflow: hidden; background: var(--tg-hoja); }
:is(#equipoInfo, #sensorInfo) .eqm-li { display: flex; align-items: center; gap: 16px; padding: 10px 16px; min-height: 64px; }
:is(#equipoInfo, #sensorInfo) .eqm-li + .eqm-li, :is(#equipoInfo, #sensorInfo) .eqm-det > .eqm-li:first-child { border-top: 1px solid var(--tg-linea); }
:is(#equipoInfo, #sensorInfo) .eqm-av { width: 40px; height: 40px; border-radius: 50%; background: var(--tg-tonal); color: var(--tg-tonal-texto); display: grid; place-items: center; flex: none; }
:is(#equipoInfo, #sensorInfo) .eqm-av.eqm-av-el { background: var(--tg-suave); }
:is(#equipoInfo, #sensorInfo) .eqm-tx { flex: 1; min-width: 0; }
:is(#equipoInfo, #sensorInfo) .eqm-h { font-size: 16px; line-height: 24px; display: block; overflow-wrap: anywhere; }
:is(#equipoInfo, #sensorInfo) .eqm-s { font-size: 14px; line-height: 20px; color: var(--tg-texto-2); display: block; overflow-wrap: anywhere; }
:is(#equipoInfo, #sensorInfo) .eqm-mono { font-family: "Roboto Mono", ui-monospace, monospace; font-size: 15px; background: none; padding: 0; color: inherit; }
:is(#equipoInfo, #sensorInfo) .eqm-tr { font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 4px; flex: none; }
:is(#equipoInfo, #sensorInfo) .eqm-tr .eqm-ms { font-size: 18px; }
:is(#equipoInfo, #sensorInfo) .eqm-tr.ok { color: var(--eqm-verde); }
:is(#equipoInfo, #sensorInfo) .eqm-tr.mal { color: var(--eqm-rojo); }
:is(#equipoInfo, #sensorInfo) .eqm-el { width: 24px; height: 24px; display: block; }
:is(#equipoInfo, #sensorInfo) .eqm-el.ico-night { display: none; }
html.night :is(#equipoInfo, #sensorInfo) .eqm-el.ico-day { display: none; }
html.night :is(#equipoInfo, #sensorInfo) .eqm-el.ico-night { display: block; }
:is(#equipoInfo, #sensorInfo) .eqm-seg { display: inline-flex; border: 1px solid var(--tg-texto-2); border-radius: 999px; overflow: hidden; margin-top: 8px; }
:is(#equipoInfo, #sensorInfo) .eqm-seg-btn { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; margin: 0; border: 0; border-radius: 0;
  background: none; color: var(--tg-texto); font: 500 14px Roboto, Arial, sans-serif; cursor: pointer; box-shadow: none; }
:is(#equipoInfo, #sensorInfo) .eqm-seg-btn + .eqm-seg-btn { border-left: 1px solid var(--tg-texto-2); }
:is(#equipoInfo, #sensorInfo) .eqm-seg-btn[aria-pressed="true"] { background: var(--tg-tonal); color: var(--tg-tonal-texto); }
:is(#equipoInfo, #sensorInfo) .eqm-seg-btn .eqm-el { width: 20px; height: 20px; }
:is(#equipoInfo, #sensorInfo) .eqm-nota { display: block; font-size: 12px; color: var(--tg-texto-2); margin-top: 6px; }
:is(#equipoInfo, #sensorInfo) .eqm-fw-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
:is(#equipoInfo, #sensorInfo) .eqm-badge { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
:is(#equipoInfo, #sensorInfo) .eqm-badge.ok { background: var(--tg-ok); color: var(--tg-ok-texto); }
:is(#equipoInfo, #sensorInfo) .eqm-badge.aviso { background: var(--tg-aviso); color: var(--tg-aviso-texto); }
:is(#equipoInfo, #sensorInfo) .eqm-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px 0 12px; margin: 0; border: 0; border-radius: 999px;
  font: 500 13px Roboto, Arial, sans-serif; flex: none; cursor: pointer; box-shadow: none; }
:is(#equipoInfo, #sensorInfo) .eqm-btn .eqm-ms { font-size: 18px; }
:is(#equipoInfo, #sensorInfo) .eqm-btn.tonal { background: var(--tg-tonal); color: var(--tg-tonal-texto); }
:is(#equipoInfo, #sensorInfo) .eqm-btn.texto { background: none; color: var(--tg-primario); padding: 0 12px; }
:is(#equipoInfo, #sensorInfo) .eqm-btn:disabled { opacity: .6; cursor: wait; }
:is(#equipoInfo, #sensorInfo) .eqm-exp { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 48px; padding: 0 16px; margin: 0; border: 0;
  border-radius: 0; background: none; color: var(--tg-primario); font: 500 14px Roboto, Arial, sans-serif; cursor: pointer; box-shadow: none; }
:is(#equipoInfo, #sensorInfo) .eqm-exp .eqm-ms { transition: transform .25s; }
:is(#equipoInfo, #sensorInfo) .eqm-exp[aria-expanded="true"] .eqm-ms { transform: rotate(180deg); }
:is(#equipoInfo, #sensorInfo) .eqm-det[hidden] { display: none; }
@media (min-width: 769px) {
  :is(#equipoInfo, #sensorInfo) .eqm { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  :is(#equipoInfo, #sensorInfo) .eqm-hero, :is(#equipoInfo, #sensorInfo) .eqm-full { grid-column: 1 / -1; }
}
/* el botón propio de ota-equipo.js se reemplaza por "Actualizar" en la fila Firmware (solo Monitor LW; sensores igual) */
body:is(.tg-mon-lw, .tg-mon-ss) #tab-info #otaBox { display: none !important; }
/* la ficha nueva ya trae su propia rejilla: sin las 2 columnas de la ficha anterior (.eq-info, sigue en sensores) */
html body.tema-google #modalHistorial :is(#equipoInfo, #sensorInfo).eq-info { display: block; columns: auto; max-height: none; overflow: visible; }
html body.tema-google #modalHistorial :is(#equipoInfo, #sensorInfo).eq-info > .eqm { margin: 0; }

/* Diálogo "Actualización de firmware" del Monitor LW (abrirOtaDesdeFicha en index.html; 2026-11-09) */
.eqm-velo { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.45); display: grid; place-items: center;
  padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.eqm-velo[hidden] { display: none; }
.eqm-dlg { width: min(460px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; background: var(--tg-hoja); color: var(--tg-texto);
  border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 16px; font-family: Roboto, Arial, sans-serif; box-shadow: 0 8px 32px rgba(0,0,0,.3); }
.eqm-dlg .eqm-ms { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 22px; line-height: 1; letter-spacing: normal;
  text-transform: none; display: inline-block; white-space: nowrap; direction: ltr; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; user-select: none; }
.eqm-dlg .eqm-ms.f { font-variation-settings: 'FILL' 1; }
.eqm-dlg .eqm-dlg-ico { color: var(--tg-primario); font-size: 26px; align-self: center; }
html body .eqm-dlg h3, html.night body .eqm-dlg h3 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 400; text-align: center; color: var(--tg-texto); }
.eqm-dlg .eqm-dlg-txt { margin: 0; font-size: 14px; line-height: 20px; color: var(--tg-texto-2); }
.eqm-dlg .eqm-dlg-txt b { color: var(--tg-texto); font-weight: 500; }
.eqm-dlg .eqm-tx { flex: 1; min-width: 0; text-align: left; }
.eqm-dlg .eqm-h { font-size: 16px; line-height: 24px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--tg-texto); }
.eqm-dlg .eqm-s { font-size: 12px; line-height: 16px; color: var(--tg-texto-2); display: block; overflow-wrap: anywhere; }
.eqm-dlg .eqm-dlg-aviso { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 14px; border-radius: 16px; background: var(--tg-aviso); color: var(--tg-aviso-texto); }
.eqm-dlg .eqm-dlg-aviso .eqm-h, .eqm-dlg .eqm-dlg-aviso .eqm-s { color: var(--tg-aviso-texto); }
.eqm-dlg .eqm-dlg-aviso .eqm-h { font-size: 14px; font-weight: 500; line-height: 20px; }
.eqm-dlg .eqm-dlg-aviso .eqm-btn.texto { color: var(--tg-aviso-texto); }
.eqm-dlg .eqm-dlg-lista { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; margin: 0 -8px; }
.eqm-dlg .eqm-op { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 8px; margin: 0; border: 0; border-radius: 12px;
  background: none; color: var(--tg-texto); font: inherit; text-align: left; cursor: pointer; box-shadow: none; }
.eqm-dlg .eqm-op:hover:not(:disabled) { background: var(--tg-suave); }
.eqm-dlg .eqm-op > .eqm-ms { color: var(--tg-texto-2); }
.eqm-dlg .eqm-op[aria-checked="true"] > .eqm-ms { color: var(--tg-primario); }
.eqm-dlg .eqm-op:disabled { cursor: default; opacity: .6; }
.eqm-dlg .eqm-badge { font-size: 11px; font-weight: 500; padding: 1px 8px; border-radius: 8px; white-space: nowrap; line-height: 18px; }
.eqm-dlg .eqm-badge.ok { background: var(--tg-ok); color: var(--tg-ok-texto); }
.eqm-dlg .eqm-badge.aviso { background: var(--tg-aviso); color: var(--tg-aviso-texto); }
.eqm-dlg .eqm-badge.gris { background: var(--tg-suave); color: var(--tg-texto-2); }
.eqm-dlg .eqm-dlg-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tg-texto-2); }
.eqm-dlg .eqm-dlg-msg { margin: 0; font-size: 13px; line-height: 18px; padding: 10px 12px; border-radius: 12px; }
.eqm-dlg .eqm-dlg-msg[hidden] { display: none; }
.eqm-dlg .eqm-dlg-msg.aviso { background: var(--tg-aviso); color: var(--tg-aviso-texto); }
.eqm-dlg .eqm-dlg-msg.error { background: var(--tg-peligro); color: var(--tg-peligro-texto); }
.eqm-dlg .eqm-dlg-pie { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.eqm-dlg .eqm-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 24px; margin: 0; border: 0; border-radius: 999px;
  font: 500 14px Roboto, Arial, sans-serif; cursor: pointer; box-shadow: none; flex: none; }
.eqm-dlg .eqm-btn.texto { background: none; color: var(--tg-primario); padding: 0 12px; }
.eqm-dlg .eqm-btn.lleno { background: var(--tg-primario); color: var(--tg-hoja); }
.eqm-dlg .eqm-btn:disabled { opacity: .5; cursor: default; }

/* aviso propio de ficha-equipo.js donde la página no tiene mostrarToastComando (sensores) */
.eqm-snack { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 3100; max-width: min(420px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 8px;
  background: var(--tg-texto); color: var(--tg-hoja); font: 14px/20px Roboto, Arial, sans-serif; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.eqm-snack.ver { opacity: 1; transform: translate(-50%, 0); }
.eqm-snack.error { background: var(--tg-peligro); color: var(--tg-peligro-texto); }

/* selector de 3 opciones (tipo de sensor): sin cortar palabras; en teléfono, solo texto */
:is(#equipoInfo, #sensorInfo) .eqm-seg-btn { white-space: nowrap; }
@media (max-width: 479px) {
  :is(#equipoInfo, #sensorInfo) .eqm-seg.tres .eqm-seg-btn { padding: 0 12px; }
  :is(#equipoInfo, #sensorInfo) .eqm-seg.tres .eqm-seg-btn .eqm-el { display: none !important; }
}

/* Botón segmentado de Material 3 (tipo de equipo/sensor en la ficha). La regla general de
   botones en modales los vuelve píldoras sueltas: aquí manda el grupo con bordes compartidos. */
html body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg,
html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg {
  display: inline-flex; align-items: stretch; height: 40px; padding: 0; gap: 0;
  border: 1px solid var(--tg-texto-2); border-radius: 999px; overflow: hidden; background: none; }
html body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg .eqm-seg-btn,
html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg .eqm-seg-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 100% !important; min-width: 48px;
  margin: 0 !important; padding: 0 16px !important; border: 0 !important; border-radius: 0 !important;
  background: none !important; background-image: none !important; box-shadow: none !important;
  color: var(--tg-texto) !important; font: 500 14px/20px Roboto, Arial, sans-serif; letter-spacing: .1px; }
html body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg .eqm-seg-btn + .eqm-seg-btn,
html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg .eqm-seg-btn + .eqm-seg-btn {
  border-left: 1px solid var(--tg-texto-2) !important; }
html body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg .eqm-seg-btn:hover,
html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg .eqm-seg-btn:hover { background: var(--tg-hover) !important; }
html body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg .eqm-seg-btn[aria-pressed="true"],
html.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg .eqm-seg-btn[aria-pressed="true"] {
  background: var(--tg-activo) !important; color: var(--tg-activo-texto) !important; }
/* el segmento elegido cambia su icono por la marca de verificación, como en Material 3 */
:is(#equipoInfo, #sensorInfo) .eqm-seg .eqm-seg-btn[aria-pressed="true"] .eqm-el { display: none !important; }
:is(#equipoInfo, #sensorInfo) .eqm-seg .eqm-seg-btn[aria-pressed="true"]::before {
  content: 'check'; font-family: 'Material Symbols Outlined'; font-size: 18px; line-height: 1; font-weight: normal;
  font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; }

/* Configuración → Apariencia → "Tamaño de la ficha del equipo" (preferencias.js tamanoFicha; 2026-11-09).
   Achica texto, iconos y filas de las listas Equipo / Conexión / Más detalles y las 3 tarjetas del resumen. */
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-li { gap: 12px; padding: 8px 14px; min-height: 52px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-av { width: 32px; height: 32px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-av .eqm-ms { font-size: 18px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-av .eqm-el { width: 20px; height: 20px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-h { font-size: 14px; line-height: 20px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-s { font-size: 12px; line-height: 16px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-mono { font-size: 13px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-tit { font-size: 13px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-nota { font-size: 11px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-badge { font-size: 11px; padding: 1px 6px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-tr { font-size: 11px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-tr .eqm-ms { font-size: 16px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-btn { height: 32px; font-size: 12px; padding: 0 12px 0 10px; gap: 6px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-btn .eqm-ms { font-size: 16px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-seg-btn .eqm-el { width: 16px; height: 16px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-exp { height: 42px; font-size: 13px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-stat { padding: 8px 10px; border-radius: 14px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-stat > .eqm-ms { font-size: 18px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-stat .l { font-size: 11px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-stat .v { font-size: 13px; }

html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-li { gap: 10px; padding: 6px 12px; min-height: 44px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-av { width: 28px; height: 28px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-av .eqm-ms { font-size: 16px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-av .eqm-el { width: 18px; height: 18px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-h { font-size: 13px; line-height: 18px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-s { font-size: 11px; line-height: 15px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-mono { font-size: 12px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-tit { font-size: 12px; padding: 2px 14px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-nota { font-size: 10px; margin-top: 4px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-badge { font-size: 10px; padding: 1px 6px; border-radius: 6px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-tr { font-size: 10px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-tr .eqm-ms { font-size: 14px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-btn { height: 28px; font-size: 11px; padding: 0 10px 0 8px; gap: 4px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-btn .eqm-ms { font-size: 14px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-seg-btn .eqm-el { width: 14px; height: 14px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-exp { height: 38px; font-size: 12px; padding: 0 14px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-stat { padding: 6px 8px; border-radius: 12px; gap: 2px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-stat > .eqm-ms { font-size: 16px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-stat .l { font-size: 10px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-stat .v { font-size: 12px; }
/* segmentado Terrestre/Acuático: sus reglas del tema son muy fuertes, se igualan aquí */
html.ficha-compacta body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg, html.ficha-compacta.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg { height: 32px; }
html.ficha-compacta body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg .eqm-seg-btn, html.ficha-compacta.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg .eqm-seg-btn { padding: 0 12px !important; gap: 6px; font-size: 12px; line-height: 16px; }
html.ficha-pequena body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg, html.ficha-pequena.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg { height: 28px; margin-top: 6px; }
html.ficha-pequena body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg .eqm-seg-btn, html.ficha-pequena.night body.tema-google .modal-hist:not(#tgNada):not(#tgNada):not(#tgNada) .eqm-seg .eqm-seg-btn { padding: 0 10px !important; gap: 4px; font-size: 11px; line-height: 14px; min-width: 40px; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-seg .eqm-seg-btn[aria-pressed="true"]::before { font-size: 16px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-seg .eqm-seg-btn[aria-pressed="true"]::before { font-size: 14px; }
/* icono propio de tolva en la ficha de sensores (svg con width fijo) */
html.ficha-compacta #sensorInfo .eqm-av .eqm-svg { width: 18px; height: 18px; }
html.ficha-pequena #sensorInfo .eqm-av .eqm-svg { width: 16px; height: 16px; }
/* botón Copiar (DevEUI, GPS) en la ficha: solo icono, redondo (botonCopiarFicha en ficha-equipo.js; 2026-11-09) */
:is(#equipoInfo, #sensorInfo) .eqm-btn.eqm-copiar { width: 40px; height: 40px; padding: 0; justify-content: center; gap: 0; color: var(--tg-texto-2); }
:is(#equipoInfo, #sensorInfo) .eqm-btn.eqm-copiar .eqm-ms { font-size: 20px; }
:is(#equipoInfo, #sensorInfo) .eqm-btn.eqm-copiar:hover { background: var(--tg-hover); color: var(--tg-primario); }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-btn.eqm-copiar { width: 34px; height: 34px; padding: 0; }
html.ficha-compacta :is(#equipoInfo, #sensorInfo) .eqm-btn.eqm-copiar .eqm-ms { font-size: 18px; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-btn.eqm-copiar { width: 30px; height: 30px; padding: 0; }
html.ficha-pequena :is(#equipoInfo, #sensorInfo) .eqm-btn.eqm-copiar .eqm-ms { font-size: 16px; }

/* Teléfono: la pestaña Actividad del Monitor LW no cabía en el modal (overflow hidden) y el botón
   "Ver más" quedaba recortado abajo. El gráfico queda fijo arriba y solo hace scroll la columna del
   registro (lista + Ver más), que ocupa el resto de la altura del modal (2026-11-09). */
@media (max-width: 768px) {
  body.tema-google #modalHistorial #tab-grafico.active { min-height: 0; overflow: hidden; }
  body.tema-google #modalHistorial #tab-grafico .hist-dividido { flex: 1; min-height: 0; }
  body.tema-google #modalHistorial #tab-grafico .hist-col-grafico { flex: none; }
  body.tema-google #modalHistorial #tab-grafico .hist-col-registro { flex: 1; min-height: 0; display: flex; flex-direction: column;
    overflow-y: auto; overscroll-behavior: contain; padding-bottom: 12px; }
  html body.tema-google #modalHistorial:not(#tgNada) #tab-grafico .registro-lista { flex: none; max-height: none; overflow: visible; }
  body.tema-google #modalHistorial #tab-grafico .btn-ver-mas { flex: none; width: 100%; margin-top: 8px; }
}
