/**
 * Estilos generales
 * Sistema de estilos para el IDE visual
 */

 * {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}
html, body { 
	width: 100%;
	height: 100%;
	font-size: 100%;
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
	overflow: hidden;
}
:focus {
	outline: 0;
}

:root {
  --border-color: #b5b5b5;
}

/* ============================================
ICONOS
Íconos básicos para la interfaz de usuario
============================================ */
/* Base para todos los iconos */
@font-face {
  font-family: 'mangoleoutline1';
  src: url('../fonts/mangoleoutline1.eot?5921085');
  src: url('../fonts/mangoleoutline1.eot?5921085#iefix') format('embedded-opentype'),
       url('../fonts/mangoleoutline1.woff2?5921085') format('woff2'),
       url('../fonts/mangoleoutline1.woff?5921085') format('woff'),
       url('../fonts/mangoleoutline1.ttf?5921085') format('truetype'),
       url('../fonts/mangoleoutline1.svg?5921085#mangoleoutline1') format('svg');
  font-weight: normal;
  font-style: normal;
}
[class^="icon-"]::before,
[class*=" icon-"]::before,
[data-icon]::before {
	font-weight: normal;
	font-style: normal;
	font-family: "mangoleoutline1";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-variant: normal;
	text-transform: none;
}


/* --- Navegación --- */
[data-icon="⌂"]::before, .icon-home::before { content: '\e800'; }
[data-icon="⇦"]::before, .icon-back::before { content: '\e811'; }
[data-icon="⇨"]::before, .icon-forward::before { content: '\e815'; }
[data-icon="⇧"]::before, .icon-up::before { content: '\e818'; }
[data-icon="⇩"]::before, .icon-down::before { content: '\e810'; }
[data-icon="☰"]::before, .icon-menu::before { content: '\e804'; }
[data-icon="⫸"]::before, .icon-menu2::before { content: '\e84f'; } /* '' */
[data-icon="⋮"]::before, .icon-more-v::before { content: '\e84b'; }
[data-icon="…"]::before, .icon-more-h::before { content: '\e84d'; }
[data-icon="⦿"]::before, .icon-more-circle::before { content: '\e83a'; }
[data-icon="✖"]::before, .icon-close::before { content: '\2716'; }
[data-icon="🔍"]::before, .icon-search::before { content: '\e813'; }
[data-icon="❓"]::before, .icon-help-circle::before { content: '\e857'; }
[data-icon="ℹ"]::before, .icon-help2::before { content: '\e865'; } 

/* --- Acciones --- */
[data-icon="+"]::before, .icon-add::before { content: '\e802'; }
[data-icon="⊕"]::before, .icon-add-circle::before { content: '\e801'; }
[data-icon="✖"]::before, .icon-remove::before { content: '\e812'; }
[data-icon="⊗"]::before, .icon-remove-circle::before { content: '\e80f'; }
[data-icon="⊖"]::before, .icon-subtract-circle::before { content: '\e824'; }
[data-icon="✎"]::before, .icon-edit::before { content: '\e832'; }
[data-icon="🗑"]::before, .icon-delete::before { content: '\e81d'; }
[data-icon="💾"]::before, .icon-save::before { content: '\e847'; }
[data-icon="⬆"]::before, .icon-upload::before { content: '\e83c'; }
[data-icon="⬇"]::before, .icon-download::before { content: '\e83b'; }
[data-icon="☁"]::before, .icon-cloud-upload::before { content: '\e829'; }
[data-icon="🔄"]::before, .icon-cloud-sync::before { content: '\e826'; }
[data-icon="⤴"]::before, .icon-share::before { content: '\e817'; }
[data-icon="⧉"]::before, .icon-filters::before { content: '\e838'; }
[data-icon="⏶"]::before, .icon-filter-asc::before { content: '\e819'; }
[data-icon="⏷"]::before, .icon-filter-desc::before { content: '\e836'; }
[data-icon="↑"]::before, .icon-sort-asc::before { content: '\e80a'; }
[data-icon="↓"]::before, .icon-sort-desc::before { content: '\e80c'; }
[data-icon="🔧"]::before, .icon-settings::before { content: '\e82a'; }
[data-icon="⚙"]::before, .icon-config::before { content: '\e82d'; }
[data-icon="🛠"]::before, .icon-tools::before { content: '\e82f'; }
[data-icon="⌫"]::before, .icon-clear-text::before { content: '\e814'; }
[data-icon="🖨"]::before, .icon-print::before { content: '\e80e'; }
[data-icon="☝️"]::before, .icon-apply::before { content: '\e850'; }
[data-icon="🔄"]::before, .icon-refresh::before { content: '\e866'; }
[data-icon="⟳"]::before, .icon-reboot::before { content: '\e861'; }

/* --- Estados --- */
[data-icon="☑"]::before, .icon-check-square::before { content: '\e834'; }
[data-icon="☐"]::before, .icon-uncheck-square::before { content: '\e835'; }
[data-icon="✔"]::before, .icon-check::before { content: '\e84a'; }
[data-icon="✅"]::before, .icon-check-circle::before { content: '\e825'; }
[data-icon="⛔"]::before, .icon-error::before { content: '\e807'; }
[data-icon="⚠"]::before, .icon-warning::before { content: '\e809'; }
[data-icon="🔒"]::before, .icon-lock::before { content: '\e842'; }
[data-icon="🔓"]::before, .icon-unlock::before { content: '\e843'; }
[data-icon="👁"]::before, .icon-eye::before { content: '\e808'; }

/* --- Multimedia --- */
[data-icon="▶"]::before, .icon-play::before { content: "\e853"; margin: 2px 0 0 2px; }
[data-icon="⏸"]::before, .icon-pause::before { content: "\e852"; }
[data-icon="⏹"]::before, .icon-stop::before { content: "\e854"; }
[data-icon="📷"]::before, .icon-photo::before { content: '\e821'; }
[data-icon="🎥"]::before, .icon-video::before { content: '\e820'; }
[data-icon="🖼"]::before, .icon-image::before { content: "\e851"; }
[data-icon="🔊"]::before, .icon-volume::before { content: "\e855"; }
[data-icon="🔇"]::before, .icon-mute::before { content: "\e856"; }
[data-icon="🎤"]::before, .icon-microphone::before { content: '\e830'; }

/* --- Usuarios --- */
[data-icon="👤"]::before, .icon-user::before { content: '\e81f'; }
[data-icon="👥"]::before, .icon-users::before { content: '\e846'; }
[data-icon="💬"]::before, .icon-chat::before { content: '\e833'; }
[data-icon="✔️"]::before, .icon-chat-chk::before { content: '\e84e'; } /* '' */
[data-icon="☑️"]::before, .icon-chat-dblchk::before { content: '\e84c'; } /* '' */
[data-icon="🔔"]::before, .icon-bell::before { content: '\e806'; }
[data-icon="✉"]::before, .icon-mail::before { content: '\e837'; }
[data-icon="@" ]::before, .icon-email::before { content: '\e80d'; }
[data-icon="📱"]::before, .icon-phone::before { content: '\e845'; }
[data-icon="➤"]::before, .icon-send::before { content: '\e816'; }
[data-icon="⎋"]::before, .icon-logout::before { content: '\e858'; } /* '' */

/* --- E-commerce --- */
[data-icon="🛒"]::before, .icon-cart::before { content: '\e81e'; }
[data-icon="🧺"]::before, .icon-empty-cart::before { content: '\e81b'; }
[data-icon="🛍"]::before, .icon-bag::before { content: '\e81a'; }
[data-icon="♥"]::before, .icon-heart::before { content: '\e83d'; }
[data-icon="★"]::before, .icon-star::before { content: '\e80b'; }
[data-icon="🏷"]::before, .icon-tag::before { content: '\e827'; }

/* --- Archivos --- */
[data-icon="📄"]::before, .icon-file::before { content: '\e82e'; }
[data-icon="📁"]::before, .icon-folder::before { content: '\e839'; }
[data-icon="🔗"]::before, .icon-link::before { content: '\e83e'; }
[data-icon="📎"]::before, .icon-attachment::before { content: '\e81c'; }

/* --- Ubicación y red --- */
[data-icon="🗺"]::before, .icon-map::before { content: '\e844'; }
[data-icon="📍"]::before, .icon-location::before { content: '\e822'; }
[data-icon="📡"]::before, .icon-locate-user::before { content: '\e823'; }
[data-icon="➤"]::before, .icon-navigation::before { content: '\e831'; }
[data-icon="🛣"]::before, .icon-routes::before { content: '\e870'; }
[data-icon="🔌"]::before, .icon-olt::before { content: '\e872'; }
[data-icon="📶"]::before, .icon-router::before { content: '\e864'; }
[data-icon="🗺"]::before, .icon-topology::before { content: '\e867'; }

/* --- Interfaz --- */
[data-icon="🌐"]::before, .icon-language::before { content: '\e82c'; }
[data-icon="⊞"]::before, .icon-toggle-on::before { content: '\e848'; }
[data-icon="⊟"]::before, .icon-toggle-off::before { content: '\e828'; }
[data-icon="⊞"]::before, .icon-toggle-on-2::before { content: '\e82b'; }
[data-icon="▦"]::before, .icon-grid::before { content: '\e841'; }
[data-icon="≡"]::before, .icon-list::before { content: '\e83f'; }
[data-icon="≣"]::before, .icon-list-2::before { content: '\e840'; }

/* --- Herramientas --- */
[data-icon="🧮"]::before, .icon-calculator::before { content: '\e849'; }
[data-icon="📋"]::before, .icon-projects::before { content: '\e803'; }
[data-icon="⏱"]::before, .icon-clock::before { content: '\e805'; }
[data-icon="📅"]::before, .icon-calendar::before { content: '\e85a'; }

/* --- Finanzas --- */
[data-icon="📊"]::before, .icon-pie::before { content: '\e85c'; }
[data-icon="📈"]::before, .icon-analytics::before { content: '\e86e'; }
[data-icon="▣"]::before, .icon-qr-code::before { content: '\e85b'; }
[data-icon=""]::before, .icon-barcode::before { content: '\e85d'; }
[data-icon="💳"]::before, .icon-card::before { content: '\e85e'; }
[data-icon="🗂"]::before, .icon-dashboard::before { content: '\e85f'; }
[data-icon="🪪"]::before, .icon-customers::before { content: '\e860'; }
[data-icon="🧾"]::before, .icon-invoices::before { content: '\e862'; }
[data-icon="📝"]::before, .icon-receipt::before { content: '\e863'; }
[data-icon="🏪"]::before, .icon-store::before { content: '\e86f'; }
[data-icon="📤"]::before, .icon-upload-inventory::before { content: '\e876'; }
[data-icon="📥"]::before, .icon-download-inventory::before { content: '\e873'; }
[data-icon="📦"]::before, .icon-boxes::before { content: '\e874'; }
[data-icon="🚚"]::before, .icon-shipment::before { content: '\e875'; }

[data-icon="📶"]::before, .icon-signal-full::before { content: '\e86a'; }
[data-icon="📶"]::before, .icon-signal-low::before { content: '\e86b'; }
[data-icon="📶"]::before, .icon-signal-medium::before { content: '\e86c'; }
[data-icon="📶"]::before, .icon-unknown-connection::before { content: '\e86d'; }
[data-icon="📶"]::before, .icon-offline::before { content: '\e877'; }
[data-icon="📶"]::before, .icon-online::before { content: '\e878'; }

[data-icon="l"]::before, .icon-light-post::before { content: '\e87a'; }
[data-icon="⬡"]::before, .icon-polygon::before { content: '\e87b'; }
[data-icon="📏"]::before, .icon-ruler::before { content: '\e87c'; }
[data-icon="🛠"]::before, .icon-junction-box::before { content: '\e87e'; }
[data-icon="🗂"]::before, .icon-nap::before { content: '\e87f'; }
[data-icon="🖱"]::before, .icon-cursor::before { content: '\e880'; }
[data-icon="🔌"]::before, .icon-wire::before { content: '\e881'; }
[data-icon=""]::before, .icon-odb::before { content: '\e883'; } 
[data-icon=""]::before, .icon-enclosure::before { content: '\e884'; }
[data-icon=""]::before, .icon-building::before { content: '\e885'; }
[data-icon=""]::before, .icon-energy::before { content: '\e886'; }
[data-icon=""]::before, .icon-cut::before { content: '\e87d'; }
[data-icon=""]::before, .icon-add-pin-customer::before { content: '\e887'; }
[data-icon=""]::before, .icon-notes::before { content: '\e889'; }
[data-icon=""]::before, .icon-add-pin::before { content: '\e88a'; }

[data-icon="🌙"]::before, .icon-moon::before { content: '\e879'; }
[data-icon="☁"]::before, .icon-cloud::before { content: '\e868'; }
[data-icon="☀"]::before, .icon-sun::before { content: '\e869'; }

.active-record,
.provisioned-record {
  position: relative;
  width: 15px;
  height: 15px;
  margin: 0 0 0 4px;
  background-color: #89bf49;
  border-radius: 50%;
}
.inactive-record,
.pending-record {
  position: relative;
  width: 15px;
  height: 15px;
  margin: 0 0 0 4px;
  background-color: gray;
  border-radius: 50%;
}
.ignored-record {
  position: relative;
  width: 15px;
  height: 15px;
  margin: 0 0 0 4px;
  background-color: #b30b0b;
  border-radius: 50%;
}

.online,
.offline,
.unknown {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 1px 0 0 2px;
  text-align: center;
  font-size: 24px;
}
.online {
  color: #89bf49;
}
.offline {
  color: #b30b0b;
}
.unknown {
  color: #dba210;
}

/* 
CUSTOMIZACIÓN DEL
MENÚ IZQUIERDO
*/

#index-page0-indexmenu { /* Firefox */
  scrollbar-width: auto;
  scrollbar-color: #515151 #515151;
}
#index-page0-indexmenu::-webkit-scrollbar { /* Chrome, Edge, and Safari */
  width: 10px;
}
#index-page0-indexmenu::-webkit-scrollbar-track {
  background: #292929;
}
#index-page0-indexmenu::-webkit-scrollbar-thumb {
  background-color: #696969;
  border-radius: 10px;
  border: 3px solid #292929;
}
#index-page0-indexmenu::-webkit-scrollbar-button:start:decrement,
#index-page0-indexmenu::-webkit-scrollbar-button:end:increment {
  height: 10px;
  display: block;
  background-color: #292929;
}
#index-page0-indexmenu > li {
  line-height: normal;
  border-bottom: 1px #444444 solid;
}
#index-page0-indexmenu > li.mangole-li-active {
  background: #8fd7d4;
}
#index-page0-indexmenu > li.mangole-li-active > ul > li{
  border-top: 1px #444444 solid;
}
#index-page0-indexmenu > li,
#index-page0-indexmenu > li.mangole-li-active > ul > li {
  min-height: 80px;
  font-size: 13px;
  color: #fff;
  transition: 0.5s;
  -webkit-transition: 0.5s;
  background: url(../img/leftmenuarrow.png) 100px center no-repeat;
}
#index-page0-indexmenu > li {
  background-color: #2b2b2b;
}
#index-page0-indexmenu > li.mangole-li-active > ul > li {
  line-height: normal;
  background: #6A605F;
  border-top: 1px #584d4c solid;
}
#index-page0-indexmenu > li > span.mangole-sidebar-menu-icon {
  display: inline-block;
  width: 100%;
  height: calc(100% - 28px);
  padding: 10px 0 0 0;
}
#index-page0-indexmenu > li > span.mangole-sidebar-menu-label,
#index-page0-indexmenu > li.mangole-li-active > ul > li > span.mangole-sidebar-menu-li-options-contextmenu,
#index-page0-indexmenu > li.mangole-li-active > ul > li > span.mangole-sidebar-menu-label {
  width: 100%;
  height: auto;
  padding: 0px 5px;
  text-align: center;
  font-size: 13px;
  color: #fff;
}

/* ESTILOS PARA BARRA DE DESPLAZAMIENTO */
.theme-dark ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.theme-dark ::-webkit-scrollbar-track {
  background: #1e1e1e;
}
.theme-dark ::-webkit-scrollbar-thumb {
  background-color: #555555;
  border-radius: 6px;
  border: 2px solid #1e1e1e;
}
.theme-dark ::-webkit-scrollbar-thumb:hover {
  background-color: #717171;
}
.theme-dark ::-webkit-scrollbar-thumb:active {
  background-color: #888888;
}
.theme-dark ::-webkit-scrollbar-corner {
  background: #1e1e1e;
}
.theme-dark * {
  scrollbar-width: thin;
  scrollbar-color: #555555 #1e1e1e;
}

/* ESTILOS PARA EL TOGGLE DE TEMA */
#index-page0-tgTheme.mangole-toggle-button {
  background-color: #333;
  border: 2px solid #7b7b7b;
}
#index-page0-tgTheme.mangole-toggle-button button.mangole-toggle-button {
  background-color: #333;
  border: 2px solid #7b7b7b;
}
#index-page0-tgTheme.mangole-toggle-button[data-state="1"] {
    background-color: #333;
    border: 2px solid #7b7b7b;
}
#index-page0-tgTheme.mangole-toggle-button[data-state="1"] button.mangole-toggle-button {
    background-color: #333 !important;
}
#index-page0-tgTheme.mangole-toggle-button button.mangole-toggle-button {
    background-color: #595959 !important;
    border: 2px solid #7b7b7b !important;
}
#index-page0-tgTheme.mangole-toggle-button[data-state="1"] button.mangole-toggle-button {
  width: 25px;
  height: 25px;
}
#index-page0-tgTheme.icon-moon::before {
  position: absolute;
  top: 2px;
  right: 2px;
  color: #7b7b7b;
  font-size: 18px;
}
#index-page0-tgTheme.icon-sun::before {
  position: absolute;
  top: 2px;
  left: 3px;
  color: #7b7b7b;
  font-size: 18px;
}

/* ═══════════════════════════════════════════════════════════════
   TR-069 STAT MODAL  (onus.js → showOnuTr069Modal)
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout ────────────────────────────────────────────────────────── */
.tr069-source-bar { display:flex; 
  align-items:center; 
  gap:8px; 
  padding:4px 18px 10px; 
  background:#161b22; 
}
.tr069-source-label { font-size:11px; color:#556677; }
.tr069-layout { display:flex; height:460px; overflow:hidden; }
#onus-tr069-sidebar { width:250px; min-width:170px; background:#0d1117; border-right:1px solid #2a3a4a; overflow-y:auto; flex-shrink:0; }
#onus-tr069-content { flex:1; overflow-y:auto; padding:18px; background:#161b22; }

/* ── Sidebar Nav ───────────────────────────────────────────────────── */
.onus-tr069-nav { padding:9px 14px; cursor:pointer; font-size:12px; background:transparent; color:#8899aa; border-left:3px solid transparent; transition:all 0.10s; user-select:none; line-height:1.4; }
.onus-tr069-nav:hover { background:#1a2a3a; color:#bbc8d4; }
.onus-tr069-nav.active { background:#1e3a5f; color:#4ca8e0; border-left-color:#4ca8e0; }

/* ── Source Badge ──────────────────────────────────────────────────── */
.tr069-source-badge { border-radius:4px; padding:2px 8px; font-size:11px; font-weight:600; }
.tr069-source-badge--acs { background:#1a4a2a; color:#4caf50; border:1px solid #4caf50; }
.tr069-source-badge--cli { background:#3a2a10; color:#ff9800; border:1px solid #ff9800; }
.tr069-source-badge--none { background:#2a1a1a; color:#f44336; border:1px solid #f44336; }

/* ── Section Title ─────────────────────────────────────────────────── */
.tr069-section-title { font-size:14px; font-weight:600; color:#c8d0dc; margin-bottom:14px; padding-bottom:7px; border-bottom:1px solid #2a3a4a; }

/* ── Key/Value Table ───────────────────────────────────────────────── */
.tr069-table { width:100%; border-collapse:collapse; }
.tr069-row { border-bottom:1px solid #1e2a3a; }
.tr069-row__label { padding:8px 12px; color:#8899aa; white-space:nowrap; width:200px; font-size:12px; vertical-align:top; }
.tr069-row__value { padding:8px 12px; font-size:13px; font-weight:500; word-break:break-all; }

/* ── Status Badge ──────────────────────────────────────────────────── */
.tr069-badge { border-radius:4px; padding:2px 9px; font-size:12px; font-weight:500; white-space:nowrap; }
.tr069-badge--empty { color:#555; }

/* ── Data Tables (ports, hosts, port forward) ──────────────────────── */
.tr069-data-table { width:100%; border-collapse:collapse; font-size:12px; }
.tr069-data-table thead tr { border-bottom:2px solid #2a3a4a; color:#8899aa; }
.tr069-data-table th { padding:6px 8px; text-align:left; }
.tr069-data-row { border-bottom:1px solid #1a2535; }
.tr069-td { padding:6px 8px; }
.tr069-td--mono { font-family:monospace; }

/* ── Section utilities ─────────────────────────────────────────────── */
.tr069-divider { border:none; border-top:1px solid #1e2a3a; margin:12px 0; }
.tr069-group-label { font-size:12px; font-weight:600; color:#8899aa; margin-bottom:6px; }
.tr069-type-tag { color:#4ca8e0; }
.tr069-no-data { padding:20px 0; color:#556677; font-style:italic; font-size:12px; text-align:center; }
.tr069-loading { padding:20px; color:#888; }
.tr069-title-device { font-size:12px; color:#8899aa; }

/* ── Raw output ────────────────────────────────────────────────────── */
.tr069-raw-pre { margin:0; padding:12px; background:#0d1117; color:#c9d1d9; border-radius:6px; font-size:11px; line-height:1.6; overflow:auto; white-space:pre-wrap; word-break:break-word; border:1px solid #2a3a4a; max-height:400px; }




/* ==========================================================================
   TOPO MAP EDITOR — Layout & Explorer
   ========================================================================== */


/* ── Left menu: no scroll here, splExplorer handles it ──────────────────── */
#topo_map-page0-stlPrincipal-left-menu {
  overflow: hidden;
}

/* ── Explorer split: fixed 44px search bar + 44px toolbar + remaining height for tree ──────── */
#topo_map-page0-splExplorer {
  grid-template-rows: 44px 44px 1fr;
  height: 100%;
}
#topo_map-page0-splExplorer > .mangole-split-container-row.row0 > .mangole-split-container-cell.cell0,
#topo_map-page0-splExplorer > .mangole-split-container-row.row1 > .mangole-split-container-cell.cell0 {
  align-self: stretch;
  flex-direction: row;
  align-items: center;
}
#topo_map-page0-splExplorer > .mangole-split-container-row.row2 {
  overflow: hidden;
  min-height: 0;
}
#topo_map-page0-splExplorer > .mangole-split-container-row.row2 > .mangole-split-container-cell.cell0 {
  align-self: stretch;
  height: 100%;
  overflow: hidden;
}
#topo_map-page0-wrpExplorerTree {
  height: 100%;
}

/* ── Right menu: collapses when wrpRightPanel is hidden ─────────────────── */
#topo_map-page0-stlPrincipal-right-menu {
  width: auto;
  min-width: 0;
  flex-shrink: 1;
  border-left: none;
  overflow: hidden;
}

/* ════════════════════════════════════════════════════════════════════════════
   SPLICE VIEWER CANVAS OVERLAY
   ════════════════════════════════════════════════════════════════════════════ */

/* Overlay fullscreen container */
#_sv_overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9000;
  background: #f0f2f4;
  display: flex;
  flex-direction: column;
  font-family: inherit;
}

/* Toolbar */
#_sv_toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #1e2a38;
  color: #fff;
  flex-shrink: 0;
  border-bottom: 2px solid #111;
  flex-wrap: wrap;
}

#_sv_title {
  font-size: 14px;
  font-weight: 700;
  flex: 1;
  min-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#_sv_toolbar button {
  border: none;
  border-radius: 4px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: opacity 0.15s;
}
#_sv_toolbar button:hover { opacity: 0.85; }

#_sv_splitter_sel {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #555;
  background: #2c3e50;
  color: #fff;
  max-width: 220px;
  cursor: pointer;
}

/* Canvas area */
#_sv_canvas {
  flex: 1;
  position: relative;
  overflow: auto;
  cursor: default;
  min-height: 400px;
}

/* SVG connection layer */
#_sv_svg {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
  overflow: visible;
}

/* Active fiber signal animation */
.sv-fiber-active {
  stroke-dasharray: 10 5 !important;
  animation: sv-signal-flow 0.5s linear infinite !important;
  opacity: 1 !important;
}
@keyframes sv-signal-flow {
  from { stroke-dashoffset: 15; }
  to   { stroke-dashoffset: 0; }
}

/* Reversed bezier animation — modo RX */
.sv-fiber-active-rx {
  stroke-dasharray: 10 5 !important;
  animation: sv-signal-flow-rx 0.5s linear infinite !important;
  opacity: 1 !important;
}
@keyframes sv-signal-flow-rx {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: 15; }
}

/* Building canvas: dot de fibra con señal activa */
.bld-dot-active {
  animation: bld-dot-pulse 0.7s ease-in-out infinite alternate !important;
  /*box-shadow: 0 0 0 2px rgba(39,174,96,0.85), 0 0 8px 3px rgba(39,174,96,0.45) !important;*/
  border-color: #27ae60 !important;
}
@keyframes bld-dot-pulse {
  from { box-shadow: 0 0 0 1px rgba(39,174,96,0.6),  0 0 4px 1px rgba(39,174,96,0.3); }
  to   { box-shadow: 0 0 0 3px rgba(39,174,96,0.95), 0 0 10px 4px rgba(39,174,96,0.6); }
}

/* Badge de potencia de señal óptica (dBm) + dirección en cada fila de fibra */
.sv-sig-power {
  font-size: 9px;
  font-weight: 600;
  min-width: 44px;
  text-align: center;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: -0.2px;
}

/* Loading message */
#_sv_loading {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: #888;
}

/* Splice cards (cable / splitter) */
.sv-card {
  position: absolute;
  width: 230px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  user-select: none;
  z-index: 10;
  transition: box-shadow 0.1s;
}
.sv-card:hover {
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.26);
}

/* Card header (drag handle) */
.sv-card-header {
  padding: 5px 10px;
  border-radius: 4px 4px 0 0;
  cursor: grab;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}
.sv-card-header:active { cursor: grabbing; }
.sv-card-header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}

/* Fiber / port rows */
.sv-fiber-row {
  display: flex;
  align-items: center;
  padding: 1px 6px;
  gap: 3px;
  min-height: 22px;
  transition: background 0.1s;
}
.sv-fiber-row:hover { background: #f5f7fa !important; }

/* Port action buttons */
.sv-fiber-row button {
  border-radius: 3px;
  padding: 0 5px;
  font-size: 10px;
  cursor: pointer;
  font-weight: 700;
  flex-shrink: 0;
  height: 18px;
  line-height: 1;
  transition: opacity 0.1s, transform 0.1s;
}
.sv-fiber-row button:hover {
  opacity: 0.8;
  transform: scale(1.08);
}
.sv-fiber-row button:active { transform: scale(0.95); }

/* Fiber color dot */
.sv-fiber-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* PON entry port row header */
.sv-pon-row {
  display: flex;
  align-items: center;
  padding: 2px 6px;
  gap: 3px;
  border-bottom: 2px solid #eef;
  font-size: 10px;
  font-weight: 700;
  color: #27AE60;
}

/* Scrollbar styling inside canvas */
#_sv_canvas::-webkit-scrollbar { width: 8px; height: 8px; }
#_sv_canvas::-webkit-scrollbar-track { background: #e8eaed; }
#_sv_canvas::-webkit-scrollbar-thumb { background: #b0b8c2; border-radius: 4px; }
#_sv_canvas::-webkit-scrollbar-thumb:hover { background: #8a95a0; }

/* ── Explorer tree items ─────────────────────────────────────────────────── */
.topo-explorer-folder,
.topo-explorer-item {
  display: flex;
  align-items: center;
  height: 28px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  padding-right: 4px;
  flex-shrink: 0;
}
.topo-explorer-folder:hover,
.topo-explorer-item:hover { background-color: #e8e8e8; }
.topo-folder-active        { background-color: #2E86DE !important; }
.topo-folder-active .topo-explorer-name,
.topo-folder-active .topo-explorer-folder-icon,
.topo-folder-active .topo-explorer-toggle { color: #fff !important; }
.topo-folder-active .topo-explorer-action { color: rgba(255,255,255,0.85); }
.topo-folder-active .topo-explorer-action:hover { background-color: rgba(255,255,255,0.2); color: #fff; }

.topo-explorer-toggle {
  width: 18px; flex-shrink: 0;
  font-size: 10px; text-align: center;
  color: #888; cursor: pointer;
}
.topo-explorer-folder-icon {
  width: 18px; flex-shrink: 0;
  font-size: 13px; text-align: center;
  color: #888; margin-right: 3px;
}
.topo-explorer-icon {
  width: 22px; flex-shrink: 0;
  font-size: 15px; text-align: center;
  color: #555; margin-right: 2px;
}
.topo-explorer-name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: #333;
}
.topo-explorer-folder-actions {
  display: none; gap: 2px; flex-shrink: 0;
}
.topo-explorer-folder:hover .topo-explorer-folder-actions { display: flex; }
.topo-explorer-action {
  width: 18px; height: 18px;
  font-size: 12px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  color: #666;
}
.topo-explorer-action:hover { background-color: #ccc; color: #222; }

.topo-explorer-no-folder-header {
  display: flex; align-items: center;
  height: 26px; font-size: 11px; color: #888;
  padding-left: 4px; gap: 4px;
}
.topo-explorer-empty {
  font-size: 11px; color: #aaa;
  padding: 12px 8px; text-align: center; line-height: 1.5;
}

/* ── Drawing panel: override blanwrapper's 100%×100% defaults ───────────── */
#topo_map-page0-wrpDrawingPanel {
  width: auto;
  height: auto;
}
#topo_map-page0-wrpDrawingPanel > .mangole-blank-wrapper-body {
  flex: none;
  width: auto;
  overflow: visible;
}

/* ── Tool button active state ────────────────────────────────────────────── */
.topo-tool-active {
  background-color: #d4e6f1 !important;
  color: #1a5276 !important;
}


/* ESTILO PARA LOS LOS DATAGRIDS */
.mangole-datagridv3 .mangole-datagrid-heading .mangole-datagrid-cell {
  white-space: normal;
}
[id$="-page0-dgrRecordsList"] > div.mangole-datagrid-content,
#invoices-page1-dgrItems > div.mangole-datagrid-content {
  padding-bottom: 0!important;
}

/* ESTILOS PARA LOS TEMAS */

.theme-dark #index-page0-stl1-content {
  background: #393939!important;
}


.theme-dark {
  /* Tema Oscuro */
  --bg-primary: #353535;
  --bg-secondary: #272727;
  --bg-tertiary: #353535;
  --bg-quaternary: #2f2f2f;

  --text-primary: #a5a5a5;
  --text-secondary: #a0a0a0;
  --text-titles: #557999;

  --border-color: #595959;

  --shadow: rgba(0,0,0,0.3);

  --gradient-start: #667eea;
  --gradient-end: #764ba2;
}

.theme-dark html, .theme-dark body {
  background-color: var(--bg-primary) !important;
}
.theme-dark body {
  background-color: var(--bg-secondary) !important;
}

/* Estilos para los datagrids */
.theme-dark .mangole-datagridv3 {
  border-color: var(--border-color)!important;
}
.theme-dark .mangole-datagrid-heading {
  background-color: #1e1e1e!important;
  border-bottom: 1px solid var(--border-color)!important;
}
.theme-dark .mangole-datagrid-heading .mangole-datagrid-cell {
  border-right: 1px solid var(--border-color)!important;
  color: var(--text-primary)!important;
}
.theme-dark .mangole-datagrid-heading .mangole-datagrid-cell:last-child {
    border-right: none!important;
}
.theme-dark .mangole-datagrid-row:nth-child(even) {
    background-color: #373737!important;
}
.theme-dark .mangole-datagrid-content .mangole-datagrid-row {
  border-bottom: 1px solid var(--border-color)!important;
}
.theme-dark .mangole-datagrid-content .mangole-datagrid-row:last-child {
    border-bottom: none!important;
}
.theme-dark .mangole-datagrid-content .mangole-datagrid-row:hover {
  background-color: #494949!important;
}
.theme-dark .mangole-datagrid-content .mangole-datagrid-cell {
  border-right: 1px solid var(--border-color)!important;
  color: var(--text-primary)!important;
}
.theme-dark .mangole-datagrid-content .mangole-datagrid-cell:last-child {
    border-right: none!important;
}
.theme-dark .mangole-datagrid-footer {
  border-top: 1px var(--border-color) solid!important;
  background-color: transparent!important;
}
.theme-dark .mangole-datagrid-footer .mangole-btn {
  color: #fff !important;
  background-color: #6f6f6f !important;
}
.theme-dark .mangole-datagrid-footer .mangole-btn.blue {
  background-color: #1b457d !important;
}
.theme-dark .btn-datagrid-columns {
  background: #1e1e1e!important;
}
.theme-dark .column-selector-actions {
  border-bottom: 1px solid var(--border-color)!important;
  background: #575757!important;
}
.theme-dark .column-selector-counter {
  background: #737373!important;
  border-bottom: 1px solid var(--border-color)!important;
  color: #333!important;
}
.theme-dark .column-selector-actions button {
  color: #fff!important;
  background-color: #6f6f6f!important;
  padding: 10px 24px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}
.theme-dark .column-selector-item {
  border-bottom: 1px solid var(--border-color)!important;
}
.theme-dark .column-selector-item:last-child {
    border-bottom: none!important;
}
.theme-dark .column-selector-item:hover {
  background-color: #494949!important;
}
.theme-dark .column-selector-item label {
  color: var(--text-primary)!important;
}


/* Estilos para los botones */
.theme-dark .mangole-btn.blue,
.theme-dark .mangole-btn.blue {
  background-color: #1b457d!important;
}
.theme-dark .mangole-btn.blue:hover,
.theme-dark .mangole-btn.blue:focus {
  background-color: #2b5d9e!important;
}
.theme-dark .mangole-btn.red,
.theme-dark .mangole-btn.red {
  background-color: #a1251c!important;
}
.theme-dark .mangole-btn.red:hover,
.theme-dark .mangole-btn.red:focus {
  background-color: #c13b2a!important;
}
.theme-dark .mangole-btn,
.theme-dark .mangole-btn {
  color: #fff!important;
  background-color: #6f6f6f!important;
}
.theme-dark .mangole-btn:hover,
.theme-dark .mangole-btn:focus {
    background-color: #838383!important;
}


.theme-dark .topo-tool-active,
.theme-dark .topo-tool-active:hover,
.theme-dark .topo-tool-active:focus,
.theme-dark .topo-tool-active:active  {
  background-color: #d4e6f1 !important;
  color: #1a5276 !important;
}

.theme-dark [id$="-wrpFooter"] .mangole-btn:hover,
.theme-dark [id$="-wrpFooter"] .mangole-btn:focus {
    background-color: #838383!important;
}
.theme-dark [id$="-wrpFooter"] .mangole-btn.blue,
.theme-dark [id$="-wrpFooter"] .mangole-btn.blue {
    background-color: #1b457d!important;
}
.theme-dark [id$="-wrpFooter"] .mangole-btn.blue:hover,
.theme-dark [id$="-wrpFooter"] .mangole-btn.blue:focus {
    background-color: #2b5d9e!important;
}
.theme-dark [id$="-wrpFooter"] .mangole-btn.red,
.theme-dark [id$="-wrpFooter"] .mangole-btn.red {
    background-color: #a1251c!important;
}
.theme-dark [id$="-wrpFooter"] .mangole-btn.red:hover,
.theme-dark [id$="-wrpFooter"] .mangole-btn.red:focus {
    background-color: #c13b2a!important;
}
.theme-dark [id$="-wrpFooter"] .mangole-btn,
.theme-dark [id$="-wrpFooter"] .mangole-btn {
  color: #fff!important;
  background-color: #6f6f6f!important;
}

/* Estilos para el menú lateral */
.theme-dark #mangole-sidebar-submenu-index-page0-indexmenu {
  background-color: #3d3d3d!important;
}
.theme-dark .mangole-sidebar-submenu-options {
  color: var(--text-primary) !important;
  border-bottom: 1px var(--border-color) solid!important;
}
.theme-dark .mangole-sidebar-submenu-close-button {
  color: var(--text-primary) !important;
}
.theme-dark .mangole-sidebar-submenu-options:last-child {
  border-bottom: none!important;
}
.theme-dark .mangole-sidebar-submenu-options:hover {
  background: #494949!important;
}

.theme-dark .mangole-sidebar-menu.formsubmenu {
  background-color: #3d3d3d!important;;
  border: 1px var(--border-color) solid!important;
}
.theme-dark .mangole-sidebar-menu.formsubmenu > li {
  color: var(--text-primary) !important;
  border-bottom: 1px var(--border-color) solid!important;
}
.theme-dark .mangole-sidebar-menu.formsubmenu > li:not(.mangole-sidebar-menu-title):hover {
  background: #494949!important;
}
.theme-dark .mangole-sidebar-menu.formsubmenu > li:last-child {
  border-bottom: none!important;
}

/* Estilos para los labels y formularios */
.theme-dark .mangole-label {
  color: var(--text-titles)!important;
}
.theme-dark .mangole-form {
  background-color: var(--bg-secondary)!important;
}

/* Estilos para los paneles */
.theme-dark .mangole-panel-heading {
  color: var(--text-secondary)!important;
  background-color: var(--bg-tertiary)!important;
  border-bottom: 1px var(--border-color) solid!important;
}
.theme-dark .mangole-panel-heading .mangole-btn {
  background-color: #6f6f6f!important;
  color: #fff!important;
}
.theme-dark .mangole-panel {
  border: 1px var(--border-color) solid!important;
  background: var(--bg-secondary)!important;
}

/* Estilos para los textbox, textarea y select */
.theme-dark .mangole-general-textbox label,
.theme-dark .mangole-general-combobox label {
  color: var(--text-primary)!important;
}
.theme-dark .mangole-general-textbox input,
.theme-dark .mangole-general-textbox textarea,
.theme-dark .mangole-general-textbox select,
.theme-dark .mangole-general-combobox .combobox-input-wrapper input.combobox-input {
  background-color: var(--bg-tertiary)!important;
  color: var(--text-primary)!important;
  border: 1px var(--border-color) solid!important;
}
.theme-dark .mangole-general-textbox input::-webkit-input-placeholder,
.theme-dark .mangole-general-textbox textarea::-webkit-input-placeholder,
.theme-dark .mangole-general-textbox select::-webkit-input-placeholder,
.theme-dark .mangole-general-combobox .combobox-input-wrapper input.combobox-input::-webkit-input-placeholder {
  color: var(--text-secondary)!important;
}

/* Estilos para los toggle buttons */
.theme-dark .mangole-toggle-button-label {
  color: var(--text-primary)!important;
}
.theme-dark .mangole-toggle-button .mangole-toggle-button-track {
  background-color: #4d4d4d!important;
  border: 2px solid #8b8b8b!important;
}
.theme-dark .mangole-toggle-button button.mangole-toggle-button {
  background-color: #595959!important;
  border: 2px solid #8b8b8b!important;
}
.theme-dark .mangole-toggle-button.has-label[data-state="1"] .mangole-toggle-button-track {
  background-color: #50732a!important;
  border: 2px solid #6d9742!important;
}
.theme-dark .mangole-toggle-button[data-state="1"] button.mangole-toggle-button {
  background-color: #2b2b2b!important;
}

/* Estilos para el split container */
.theme-dark .mangole-split-container-cell.cell0 {
  border-right: 1px var(--border-color) solid!important;
}

/* Estilos para los modales */
.theme-dark .mangole-modal-header {
  color: var(--text-secondary)!important;
  background-color: var(--bg-tertiary)!important;
  border-bottom: 1px var(--border-color) solid!important;
}
.theme-dark .mangole-modal-header h3 {
  color: var(--text-secondary)!important;
}
.theme-dark .mangole-modal-content {
  background-color: var(--bg-secondary)!important;
}
.theme-dark .mangole-modal-footer {
  border-top: 1px var(--border-color) solid!important;
  background-color: transparent!important;
}
.theme-dark .mangole-modal-footer .btn-primary {
  background-color: #1b457d!important;
}
.theme-dark .mangole-modal-footer .btn-secondary {
  background-color: #6f6f6f!important;
}
.theme-dark .mangole-modal-footer .btn-primary:hover,
.theme-dark .mangole-modal-footer .btn-primary:focus {
  background-color: #2b5d9e!important;
}
.theme-dark .mangole-modal-footer .btn-secondary:hover,
.theme-dark .mangole-modal-footer .btn-secondary:focus {
  background-color: #838383!important;
}

/* Estilos para los footers y contenedores */
.theme-dark [id$="-lblAudit"],
.theme-dark .lblNotice[data-control="label"] {
  background-color: #2f2f2f!important;
}
.theme-dark [id$="-wrpFooter"] {
  border-top: 1px var(--border-color) solid!important;
  background-color: transparent!important;
}
.theme-dark [id$="-lblPaginationInfo"] {
  color: var(--text-primary)!important;
}

/* ═══════════════════════════════════════════════════════════════
   TR-069 STAT MODAL  (onus.js → showOnuTr069Modal)
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout ────────────────────────────────────────────────────────── */
.theme-dark .tr069-source-bar { display:flex; 
  align-items:center; 
  gap:8px; 
  padding:4px 18px 10px; 
  background:var(--bg-secondary);
}
.theme-dark .tr069-source-label { font-size:11px; color:var(--text-secondary); }
.theme-dark .tr069-layout { display:flex; height:460px; overflow:hidden; }
.theme-dark #onus-tr069-sidebar { width:250px; min-width:170px; background:var(--bg-tertiary); border-right:1px solid var(--border-color); overflow-y:auto; flex-shrink:0; }
.theme-dark #onus-tr069-content { flex:1; overflow-y:auto; padding:18px; background:var(--bg-secondary); }

/* ── Sidebar Nav ───────────────────────────────────────────────────── */
.theme-dark .onus-tr069-nav { padding:9px 14px; cursor:pointer; font-size:12px; background:transparent; color:var(--text-secondary); border-left:3px solid transparent; transition:all 0.10s; user-select:none; line-height:1.4; }
.theme-dark .onus-tr069-nav:hover { background:var(--bg-tertiary); color:var(--text-primary); }
.theme-dark .onus-tr069-nav.active { background:var(--bg-tertiary); color:var(--text-primary); border-left-color:var(--text-primary); }

/* ── Source Badge ──────────────────────────────────────────────────── */
.theme-dark .tr069-source-badge { border-radius:4px; padding:2px 8px; font-size:11px; font-weight:600; }
.theme-dark .tr069-source-badge--acs { background:#1a4a2a; color:#4caf50; border:1px solid #4caf50; }
.theme-dark .tr069-source-badge--cli { background:#3a2a10; color:#ff9800; border:1px solid #ff9800; }
.theme-dark .tr069-source-badge--none { background:#2a1a1a; color:#f44336; border:1px solid #f44336; }

/* ── Section Title ─────────────────────────────────────────────────── */
.theme-dark .tr069-section-title { font-size:14px; font-weight:600; color:var(--text-primary); margin-bottom:14px; padding-bottom:7px; border-bottom:1px solid var(--border-color); }

/* ── Key/Value Table ───────────────────────────────────────────────── */
.theme-dark .tr069-table { width:100%; border-collapse:collapse; }
.theme-dark .tr069-row { border-bottom:1px solid var(--border-color); }
.theme-dark .tr069-row__label { padding:8px 12px; color:var(--text-secondary); white-space:nowrap; width:200px; font-size:12px; vertical-align:top; }
.theme-dark .tr069-row__value { padding:8px 12px; font-size:13px; font-weight:500; word-break:break-all; }

/* ── Status Badge ──────────────────────────────────────────────────── */
.theme-dark .tr069-badge { border-radius:4px; padding:2px 9px; font-size:12px; font-weight:500; white-space:nowrap; }
.theme-dark .tr069-badge--empty { color:#555; }

/* ── Data Tables (ports, hosts, port forward) ──────────────────────── */
.theme-dark .tr069-data-table { width:100%; border-collapse:collapse; font-size:12px; }
.theme-dark .tr069-data-table thead tr { border-bottom:2px solid var(--border-color); color:var(--text-secondary); }
.theme-dark .tr069-data-table th { padding:6px 8px; text-align:left; }
.theme-dark .tr069-data-row { border-bottom:1px solid var(--border-color); }
.theme-dark .tr069-td { padding:6px 8px; }
.theme-dark .tr069-td--mono { font-family:monospace; }

/* ── Section utilities ─────────────────────────────────────────────── */
.theme-dark .tr069-divider { border:none; border-top:1px solid var(--border-color); margin:12px 0; }
.theme-dark .tr069-group-label { font-size:12px; font-weight:600; color:var(--text-secondary); margin-bottom:6px; }
.theme-dark .tr069-type-tag { color:var(--text-primary); }
.theme-dark .tr069-no-data { padding:20px 0; color:var(--text-secondary); font-style:italic; font-size:12px; text-align:center; }
.theme-dark .tr069-loading { padding:20px; color:var(--text-secondary); }
.theme-dark .tr069-title-device { font-size:12px; color:var(--text-secondary) ; }

/* ── Raw output ────────────────────────────────────────────────────── */
.theme-dark .tr069-raw-pre { margin:0; padding:12px; background:var(--bg-tertiary); color:var(--text-primary); border-radius:6px; font-size:11px; line-height:1.6; overflow:auto; white-space:pre-wrap; word-break:break-word; border:1px solid var(--border-color); max-height:400px; }

/* ESTILOS PARA EL EXPLORER DEL TOPO MAP EDITOR */
.theme-dark #topo_map-page0-splExplorer > div.mangole-split-container-row {
	background-color: var(--bg-secondary) !important;
}
.theme-dark #topo_map-page0-wrpExplorerTree-body > div.topo-explorer-folder > span.topo-explorer-name,
.theme-dark #topo_map-page0-wrpExplorerTree-body > div.topo-explorer-folder > span.topo-explorer-folder-icon,
.theme-dark #topo_map-page0-wrpExplorerTree-body > div > span.topo-explorer-name,
.theme-dark #topo_map-page0-wrpExplorerTree-body > div > span.topo-explorer-icon  {
	color: var(--text-primary) !important;
}
.theme-dark .topo-explorer-folder:hover,
.theme-dark .topo-explorer-item:hover {
	background-color: var(--bg-tertiary) !important;
}

/* ==========================================================================
   TOPO MAP EDITOR — Dark Theme
   Nota: muchos elementos JS tienen estilos inline; se sobreescribe con !important
   ========================================================================== */

/* ── Mapa Leaflet: tiles oscuros (OSM invertido) ───────────────────────────
   Solo se invierte el pane de tiles; los cables, nodos y regiones mantienen
   sus colores originales (su pane NO está afectado por el filtro)            */
.theme-dark .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.8);
}

/* ── Header del mapa (band superior con botones de herramientas) ────────── */
.theme-dark #topo_map-page0-splHeader > .mangole-split-container-row > .mangole-split-container-cell {
  background-color: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.theme-dark #topo_map-page0-wrpTools {
  background-color: #3b3b3b!important;
}

/* ── Panel derecho (wrpRightPanel) ─────────────────────────────────────── */
.theme-dark #topo_map-page0-wrpRightPanel {
  background-color: var(--bg-secondary) !important;
  border-left: 1px solid var(--border-color) !important;
}
.theme-dark #topo_map-page0-wrpRightPanel > .mangole-blank-wrapper-body {
  background-color: var(--bg-secondary) !important;
}
.theme-dark #topo_map-page0-wrpRightPanel > .mangole-blank-wrapper-body > div:first-child {
  border-bottom: 1px solid var(--border-color) !important;
}
.theme-dark #topo_map-page0-wrpRightPanel-body > div > button.delete-selected-element {
  background: #bb2c22 !important;
  color: #ffffff !important;
}
.theme-dark #_rp_node_color,
.theme-dark #_topo_node_color,
#topo_map-page0-wrpRightPanel-body input[type="color"] {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
}
/* Inputs, selects y textareas con estilos inline generados por showRightPanel */
.theme-dark #topo_map-page0-wrpRightPanel input[type="text"],
.theme-dark #topo_map-page0-wrpRightPanel input[type="number"],
.theme-dark #topo_map-page0-wrpRightPanel select,
.theme-dark #topo_map-page0-wrpRightPanel textarea {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
.theme-dark #topo_map-page0-wrpRightPanel label,
.theme-dark #topo_map-page0-wrpRightPanel span {
  color: var(--text-primary) !important;
}
/* Sección de cables asociados al empalme */
.theme-dark #_rp_splice_links {
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}
.theme-dark #_rp_splice_links > ul > li {
  border-bottom: 1px solid var(--border-color) !important;
}
.theme-dark #_rp_splice_links select {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
.theme-dark #_rp_splice_add > span.icon-add {
  background-color: transparent !important;
}
.theme-dark #topo_map-page0-wrpRightPanel-body > div > hr {
  border-color: var(--border-color) !important;
}
/* ── Panel flotante de dibujo (Drawing Panel) ──────────────────────────── */
.theme-dark #topo_map-page0-wrpDrawingPanel {
  background-color: var(--bg-secondary) !important;
}
.theme-dark #topo_map-page0-wrpDrawingPanel > .mangole-blank-wrapper-body {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px;
}
.theme-dark #topo_map-page0-wrpDrawingPanel button {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
.theme-dark #topo_map-page0-wrpDrawingPanel button:hover {
  background-color: var(--bg-quaternary) !important;
}
.theme-dark #topo_map-page0-wrpDrawingPanel span,
.theme-dark #topo_map-page0-wrpDrawingPanel label {
  color: var(--text-primary) !important;
}

/* ── Barra de búsqueda del mapa (Geomap Search) ───────────────────────── */
.theme-dark div.leaflet-control-container > div.leaflet-top.leaflet-right > div.leaflet-control.mangole-geomap-search {
  background-color: #3b3b3b !important;
}
.theme-dark div.leaflet-control-container > div.leaflet-top.leaflet-right > div.leaflet-control.mangole-geomap-search > input[type=text] {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
.theme-dark div.leaflet-control-container > div.leaflet-top.leaflet-right > div.leaflet-control.mangole-geomap-search > button,
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  color: #fff !important;
  background-color: #6f6f6f !important;
  border: #6f6f6f !important;
}
.theme-dark #topo_map-page0-cmdMapFilter {
  color: #fff !important;
  background-color: #6f6f6f !important;
  border: #6f6f6f !important;
}
.theme-dark .leaflet-container .leaflet-control-attribution {
  color: #ccc !important;
  background: rgb(24 24 24 / 80%) !important;
}
/* ── Modales del mapa (showNodeModal, showCableModal, showBuildingModal…) ──
   Los inputs tienen estilos inline; se fuerza override con !important        */
.theme-dark .mangole-modal-content input[type="text"],
.theme-dark .mangole-modal-content input[type="number"],
.theme-dark .mangole-modal-content select,
.theme-dark .mangole-modal-content textarea {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
.theme-dark .mangole-modal-content input[readonly],
.theme-dark .mangole-modal-content input[disabled] {
  background-color: var(--bg-quaternary) !important;
  color: var(--text-secondary) !important;
}
.theme-dark .mangole-modal-content label {
  color: var(--text-primary) !important;
}
/* Hint de carpeta activa dentro de los modales del mapa */
.theme-dark .mangole-modal-content .icon-folder {
  background-color: #1a2a45 !important;
  border-color: #2a4a7a !important;
  color: #7aaad4 !important;
}
/* Dropdowns de autocompletado (cliente, ODB…) */
.theme-dark #_topo_client_results,
.theme-dark #_topo_odb_results {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}
/* Medición en tiempo real (metros de cable/regla) */
.theme-dark #_topo_cable_length_lbl,
.theme-dark #_topo_ruler_length_lbl {
  color: var(--text-primary) !important;
}

/* ── Splice Viewer & Enclosure Viewer canvas ───────────────────────────── */
.theme-dark #_sv_canvas {
  background-color: #1a2332 !important;
}
/* Tarjetas de cable / splitter / DIO / equipo */
.theme-dark .sv-card {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5) !important;
}
.theme-dark .sv-fiber-row {
  border-bottom: 1px solid var(--border-color);
}
.theme-dark .sv-fiber-row:hover {
  background-color: var(--bg-tertiary) !important;
}
/* Selector de splitter / asset en la toolbar del sv */
.theme-dark #_sv_splitter_sel {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}
/* Modal "Agregar asset al gabinete" (backdrop) */
.theme-dark #_ec_add_modal {
  background-color: rgba(0, 0, 0, 0.6) !important;
}
.theme-dark #_ec_add_modal > div {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}
.theme-dark #_ec_add_modal input,
.theme-dark #_ec_add_modal select {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
.theme-dark #_ec_add_modal label {
  color: var(--text-primary) !important;
}


.theme-dark #topo_map-page0-map1-container > div.leaflet-pane.leaflet-map-pane > div.leaflet-pane.leaflet-tile-pane > div > div > img {
  background-color: var(--bg-secondary) !important;
}

.theme-dark #_topo_map_filter_menu {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
}
.theme-dark #_topo_map_filter_menu > div.topo-menu-separator {
  background-color: var(--border-color) !important;
}
.theme-dark #_topo_map_filter_menu > div > span {
  color: var(--text-primary) !important;
}
