/* CELL ID PRO CSS Manifest */
@import url("./00-foundation.css");
@import url("./01-layout-map.css");
@import url("./02-modals.css");
@import url("./03-theme-overrides.css");
@import url("./04-mobile-overrides.css");
@import url("./05-feature-modules.css");
@import url("./06-responsive-final.css");

/* Modal system final override */
.wf-modal-backdrop {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  background: rgba(3, 8, 16, 0.82) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
}

.wf-modal-backdrop.is-open {
  display: flex !important;
}

.wf-modal {
  width: min(100%, 920px) !important;
  max-height: min(86vh, 920px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.wf-modal-body {
  overflow: auto !important;
  min-height: 0 !important;
}

.wf-modal-footer {
  flex-wrap: wrap !important;
}

.wf-prop-modal {
  width: min(100%, 920px) !important;
}

.wf-ui-notice {
  position: fixed;
  top: auto;
  left: auto;
  right: 18px;
  bottom: 18px;
  height: auto;
  max-height: none;
  z-index: 1000001;
  min-width: 220px;
  max-width: min(92vw, 420px);
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 190, 255, 0.35);
  background: rgba(8, 20, 38, 0.96);
  color: #e8f2ff;
  font: 600 13px/1.35 "DM Sans", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.15px;
  box-shadow: 0 14px 28px rgba(0, 8, 20, 0.48);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wf-ui-notice.show {
  opacity: 1;
  transform: translateY(0);
}

.wf-ui-notice.ok {
  border-color: rgba(78, 219, 169, 0.5);
  background: linear-gradient(180deg, rgba(12, 82, 66, 0.96), rgba(8, 55, 44, 0.98));
  color: #eafff7;
}

.wf-ui-notice.warn {
  border-color: rgba(255, 166, 102, 0.58);
  background: linear-gradient(180deg, rgba(106, 56, 14, 0.96), rgba(74, 38, 9, 0.98));
  color: #fff1df;
}

.wf-app-version,
.wf-brand-version {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#btnClear {
  border-color: rgba(255, 88, 88, 0.52) !important;
  background: linear-gradient(180deg, rgba(168, 35, 47, 0.88), rgba(124, 24, 35, 0.9)) !important;
  color: #ffe9ee !important;
}

#btnClear:hover {
  border-color: rgba(255, 112, 112, 0.7) !important;
  background: linear-gradient(180deg, rgba(189, 42, 56, 0.92), rgba(138, 28, 40, 0.94)) !important;
}

#btnClear:active {
  background: linear-gradient(180deg, rgba(145, 30, 41, 0.95), rgba(108, 21, 32, 0.96)) !important;
}

.wf-nav-action-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(126, 169, 224, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 32, 58, 0.62), rgba(10, 22, 43, 0.5));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 22px rgba(2, 8, 20, 0.15);
}

.wf-nav-action-group .wf-action-btn {
  min-height: 36px;
  padding-inline: 16px;
}

#btnOpenPropagationModal {
  border-color: rgba(64, 225, 182, 0.5) !important;
  background: linear-gradient(180deg, rgba(14, 110, 96, 0.86), rgba(10, 78, 69, 0.9)) !important;
  color: #e8fff8 !important;
}

#btnOpenPropagationModal:hover {
  border-color: rgba(94, 241, 201, 0.66) !important;
  background: linear-gradient(180deg, rgba(18, 127, 110, 0.9), rgba(12, 88, 78, 0.94)) !important;
}

#btnOpenPropagationBulkModal {
  border-color: rgba(118, 170, 255, 0.52) !important;
  background: linear-gradient(180deg, rgba(34, 74, 143, 0.86), rgba(24, 54, 109, 0.9)) !important;
  color: #edf3ff !important;
}

#btnOpenPropagationBulkModal:hover {
  border-color: rgba(145, 191, 255, 0.68) !important;
  background: linear-gradient(180deg, rgba(41, 88, 167, 0.9), rgba(30, 65, 126, 0.94)) !important;
}

#btnAuthLogout {
  border-color: rgba(255, 104, 104, 0.58) !important;
  background: linear-gradient(180deg, rgba(171, 45, 55, 0.92), rgba(124, 29, 39, 0.96)) !important;
  color: #fff1f2 !important;
}

#btnAuthLogout:hover {
  border-color: rgba(255, 136, 136, 0.76) !important;
  background: linear-gradient(180deg, rgba(197, 55, 66, 0.96), rgba(145, 35, 47, 0.98)) !important;
  box-shadow: 0 12px 24px rgba(145, 35, 47, 0.26) !important;
}

@media (max-width: 700px) {
  .wf-ui-notice {
    left: 10px;
    right: 10px;
    bottom: 10px;
    min-width: 0;
    width: auto;
  }

  .wf-modal-backdrop {
    padding: 8px !important;
  }

  .wf-modal,
  .wf-prop-modal,
  .wf-intro-modal {
    width: min(100vw - 12px, 980px) !important;
    max-width: min(100vw - 12px, 980px) !important;
    max-height: 92dvh !important;
    border-radius: 12px !important;
  }

  .wf-nav-action-group {
    display: contents !important;
  }
}

@media (max-width: 700px) {
  :root {
    --nav-h: 232px !important;
  }

  .wf-nav {
    height: var(--nav-h) !important;
    padding: 10px 10px 10px !important;
    gap: 8px !important;
  }

  .wf-brand {
    min-height: 90px !important;
    padding: 6px 86px 6px 10px !important;
    border-radius: 14px !important;
    align-items: flex-start !important;
    justify-content: center !important;
    text-align: left !important;
  }

  .wf-brand-home-link {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "title"
      "meta" !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
    width: auto !important;
    max-width: calc(100% - 88px) !important;
    margin-left: 72px !important;
    align-items: center !important;
    justify-items: center !important;
    align-content: center !important;
    text-align: center !important;
  }

  .wf-brand-mobile-logo {
    display: block !important;
    position: absolute !important;
    left: 8px !important;
    top: 6px !important;
    width: 78px !important;
    height: 78px !important;
    margin: 0 !important;
    opacity: 0.92 !important;
    pointer-events: none !important;
    filter: drop-shadow(0 4px 10px rgba(35, 142, 242, 0.3)) !important;
  }

  .wf-brand-title {
    grid-area: title !important;
    font-size: 20px !important;
    letter-spacing: 1.4px !important;
    line-height: 0.95 !important;
    margin: 0 !important;
    margin-left: 6px !important;
  }

  .wf-brand-meta {
    grid-area: meta !important;
    width: auto !important;
    display: inline-flex !important;
    justify-content: center !important;
    margin-top: 2px !important;
  }

  .wf-brand-tag {
    font-size: 10px !important;
    letter-spacing: 0.9px !important;
    margin-top: -1px !important;
    word-spacing: 1.8px !important;
  }

  .wf-brand .wf-app-version {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 0 0 102px !important;
    font-size: 8.6px !important;
    padding: 2px 8px !important;
    line-height: 1 !important;
    z-index: 1 !important;
  }

  #mobileSidebarToggle {
    top: 40px !important;
    right: 12px !important;
    transform: translateY(-50%) !important;
  }

  .wf-nav-right {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: stretch !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .wf-nav-right .wf-action-btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 12px !important;
    font-size: 10.8px !important;
    padding: 0 10px !important;
    border: 1px solid rgba(127, 181, 242, 0.28) !important;
    background: linear-gradient(180deg, rgba(26, 55, 93, 0.62), rgba(16, 33, 58, 0.66)) !important;
    color: #d9ebff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 14px rgba(3, 10, 22, 0.24) !important;
    box-sizing: border-box !important;
  }

  .wf-nav-right .wf-action-btn:hover {
    border-color: rgba(149, 203, 255, 0.42) !important;
    background: linear-gradient(180deg, rgba(34, 70, 113, 0.72), rgba(20, 44, 76, 0.7)) !important;
  }

  .wf-nav-right .wf-action-btn.wf-action-primary {
    border-color: rgba(96, 194, 255, 0.58) !important;
    background: linear-gradient(180deg, rgba(60, 163, 255, 0.94), rgba(39, 124, 214, 0.96)) !important;
    color: #f6fbff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 8px 18px rgba(25, 109, 191, 0.34) !important;
  }

  .wf-layout {
    margin-top: var(--nav-h) !important;
    height: calc(100dvh - var(--nav-h)) !important;
    padding: 8px !important;
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
    background: linear-gradient(180deg, #07101d 0%, #081427 100%) !important;
  }

  .wf-main {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: #081326 !important;
    box-shadow: 0 14px 28px rgba(2, 8, 20, 0.2) !important;
  }

  .wf-map {
    width: 100% !important;
    flex: 1 1 auto !important;
    height: auto !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  .wf-map-tools {
    position: static !important;
    z-index: auto !important;
    width: 100% !important;
    padding: 8px 8px 0 !important;
  }

  .wf-map-search {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 40px !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 6px !important;
    border: 1px solid rgba(116, 171, 232, 0.26) !important;
    border-radius: 13px !important;
    background: rgba(8, 19, 38, 0.88) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    backdrop-filter: blur(6px) !important;
  }

  .wf-map-query-input {
    height: 34px !important;
    min-width: 0 !important;
    padding-inline: 10px !important;
    font-size: 10.5px !important;
    border-radius: 10px !important;
  }

  #btnMapSearch {
    width: 40px !important;
    min-width: 40px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    overflow: visible !important;
    line-height: 1 !important;
  }

  #btnMapSearch svg {
    width: 14px !important;
    height: 14px !important;
    display: block !important;
    margin: 0 !important;
  }

  .wf-map-geo-fab {
    left: 10px !important;
    bottom: 10px !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    gap: 0 !important;
    font-size: 0 !important;
    border-radius: 10px !important;
  }

  .wf-hud,
  .wf-hud-left,
  .wf-hud-right,
  #statusText {
    display: none !important;
  }

  .wf-sidebar {
    position: fixed !important;
    top: var(--nav-h) !important;
    left: 0 !important;
    width: min(92vw, 360px) !important;
    height: calc(100dvh - var(--nav-h)) !important;
    z-index: 1200 !important;
    transform: translateX(-104%) !important;
    transition: transform .22s ease !important;
    border-radius: 0 16px 16px 0 !important;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.46) !important;
    overflow: hidden !important;
  }

  body.mobile-sidebar-open .wf-sidebar {
    transform: translateX(0) !important;
  }
}

/* XDR popup readability + visual adjustments */
.leaflet-popup.wf-xdr-popup .leaflet-popup-content-wrapper {
  border-radius: 6px !important;
  overflow: hidden !important;
}

.leaflet-popup.wf-xdr-popup .leaflet-popup-content {
  margin: 14px 18px 14px 16px !important;
  min-width: min(420px, calc(100vw - 110px)) !important;
  max-width: min(640px, calc(100vw - 64px)) !important;
  max-height: 390px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  line-height: 1.45 !important;
}

.wf-xdr-pop-head {
  padding-right: 20px !important;
}

.wf-xdr-pop-k,
.wf-xdr-pop-v {
  line-height: 1.35 !important;
}

/* Keep XDR mode toggle aligned with Consulta mode */
.wf-toggle-group-xdr .wf-toggle {
  min-height: 34px;
}

/* Color accents for Datos buttons */
#btnXdrLoadNormalize {
  border-color: rgba(102, 225, 255, 0.5) !important;
  background: linear-gradient(180deg, rgba(36, 152, 203, 0.95), rgba(25, 110, 164, 0.97)) !important;
  color: #effbff !important;
}

#btnXdrBuildTimeline {
  border-color: rgba(139, 192, 255, 0.5) !important;
  background: linear-gradient(180deg, rgba(38, 94, 174, 0.9), rgba(26, 68, 130, 0.94)) !important;
  color: #eaf3ff !important;
}

#btnXdrDrawRoute {
  border-color: rgba(93, 238, 196, 0.5) !important;
  background: linear-gradient(180deg, rgba(22, 126, 109, 0.9), rgba(15, 91, 79, 0.95)) !important;
  color: #e9fff8 !important;
}

#btnXdrStartPlayback {
  border-color: rgba(94, 230, 140, 0.52) !important;
  background: linear-gradient(180deg, rgba(29, 152, 74, 0.92), rgba(21, 112, 53, 0.96)) !important;
  color: #ecffef !important;
}

#btnXdrStopPlayback {
  border-color: rgba(255, 126, 126, 0.52) !important;
  background: linear-gradient(180deg, rgba(174, 47, 47, 0.92), rgba(130, 33, 33, 0.96)) !important;
  color: #ffeded !important;
}

#btnXdrClearTopSelection {
  border-color: rgba(255, 199, 119, 0.54) !important;
  background: linear-gradient(180deg, rgba(168, 116, 39, 0.9), rgba(122, 82, 27, 0.95)) !important;
  color: #fff6e9 !important;
}

#btnXdrOpenMatchModal {
  border-color: rgba(150, 178, 255, 0.5) !important;
  background: linear-gradient(180deg, rgba(70, 93, 171, 0.9), rgba(49, 66, 128, 0.95)) !important;
  color: #eef2ff !important;
}

#btnAnalyzeCoverage {
  border-color: rgba(96, 190, 255, 0.62) !important;
  background: linear-gradient(180deg, rgba(46, 153, 236, 0.98), rgba(22, 107, 202, 0.98)) !important;
  color: #f3fbff !important;
  box-shadow: 0 10px 24px rgba(37, 131, 224, 0.18) !important;
}

#btnUseMapCenterForCoverage {
  border-color: rgba(111, 184, 255, 0.46) !important;
  background: linear-gradient(180deg, rgba(40, 89, 157, 0.92), rgba(23, 57, 112, 0.96)) !important;
  color: #ddecff !important;
}

#btnBatchAddCurrent {
  border-color: rgba(77, 208, 166, 0.55) !important;
  background: linear-gradient(180deg, rgba(22, 134, 116, 0.94), rgba(13, 91, 83, 0.98)) !important;
  color: #ecfffb !important;
}

#btnBatchViewOnly {
  border-color: rgba(96, 165, 250, 0.55) !important;
  background: linear-gradient(180deg, rgba(37, 99, 194, 0.94), rgba(28, 68, 141, 0.98)) !important;
  color: #edf6ff !important;
}

#btnBatchClear {
  border-color: rgba(255, 145, 120, 0.58) !important;
  background: linear-gradient(180deg, rgba(176, 69, 57, 0.94), rgba(128, 43, 40, 0.98)) !important;
  color: #fff1ee !important;
}

#btnBatchExportCSV {
  border-color: rgba(255, 211, 94, 0.58) !important;
  background: linear-gradient(180deg, rgba(181, 128, 32, 0.95), rgba(125, 86, 25, 0.98)) !important;
  color: #fff8dd !important;
}

#btnBatchExportGeoJSON {
  border-color: rgba(83, 218, 180, 0.58) !important;
  background: linear-gradient(180deg, rgba(20, 139, 115, 0.95), rgba(13, 93, 82, 0.98)) !important;
  color: #edfffa !important;
}

#btnBatchExportKML {
  border-color: rgba(95, 176, 255, 0.58) !important;
  background: linear-gradient(180deg, rgba(36, 113, 191, 0.95), rgba(24, 76, 142, 0.98)) !important;
  color: #eff7ff !important;
}

#btnBatchExportKMZ {
  border-color: rgba(164, 132, 255, 0.58) !important;
  background: linear-gradient(180deg, rgba(94, 75, 185, 0.95), rgba(66, 52, 137, 0.98)) !important;
  color: #f3efff !important;
}

#btnBatchExportCSV .wf-export-label,
#btnBatchExportGeoJSON .wf-export-label,
#btnBatchExportKML .wf-export-label,
#btnBatchExportKMZ .wf-export-label,
#btnBatchExportCSV .wf-export-tag,
#btnBatchExportGeoJSON .wf-export-tag,
#btnBatchExportKML .wf-export-tag,
#btnBatchExportKMZ .wf-export-tag {
  color: currentColor !important;
}

#btnExportGeoJSON {
  border-color: rgba(83, 218, 180, 0.58) !important;
  background: linear-gradient(180deg, rgba(20, 139, 115, 0.95), rgba(13, 93, 82, 0.98)) !important;
  color: #edfffa !important;
}

#btnExportKML {
  border-color: rgba(95, 176, 255, 0.58) !important;
  background: linear-gradient(180deg, rgba(36, 113, 191, 0.95), rgba(24, 76, 142, 0.98)) !important;
  color: #eff7ff !important;
}

#btnExportKMZ {
  border-color: rgba(164, 132, 255, 0.58) !important;
  background: linear-gradient(180deg, rgba(94, 75, 185, 0.95), rgba(66, 52, 137, 0.98)) !important;
  color: #f3efff !important;
}

#btnExportCSV {
  border-color: rgba(255, 211, 94, 0.58) !important;
  background: linear-gradient(180deg, rgba(181, 128, 32, 0.95), rgba(125, 86, 25, 0.98)) !important;
  color: #fff8dd !important;
}

#btnExportPericial {
  border-color: rgba(245, 158, 11, 0.62) !important;
  background: linear-gradient(180deg, rgba(185, 116, 29, 0.95), rgba(132, 74, 20, 0.98)) !important;
  color: #fff7ed !important;
}

#btnExportGeoJSON .wf-export-label,
#btnExportKML .wf-export-label,
#btnExportKMZ .wf-export-label,
#btnExportCSV .wf-export-label,
#btnExportGeoJSON .wf-export-tag,
#btnExportKML .wf-export-tag,
#btnExportKMZ .wf-export-tag,
#btnExportCSV .wf-export-tag,
#btnExportGeoJSON .wf-export-icon,
#btnExportKML .wf-export-icon,
#btnExportKMZ .wf-export-icon,
#btnExportCSV .wf-export-icon {
  color: currentColor !important;
}

#btnXdrExportKmz {
  border-color: rgba(111, 184, 255, 0.52) !important;
  background: linear-gradient(180deg, rgba(34, 81, 154, 0.92), rgba(25, 58, 117, 0.97)) !important;
  color: #eaf3ff !important;
}

#btnXdrReportHtml {
  border-color: rgba(112, 154, 255, 0.55) !important;
  background: linear-gradient(180deg, rgba(58, 83, 179, 0.94), rgba(41, 59, 139, 0.98)) !important;
  color: #f0f4ff !important;
}

#btnAnalyzeCoverage:hover,
#btnUseMapCenterForCoverage:hover,
#btnBatchAddCurrent:hover,
#btnBatchViewOnly:hover,
#btnBatchClear:hover,
#btnBatchExportCSV:hover,
#btnBatchExportGeoJSON:hover,
#btnBatchExportKML:hover,
#btnBatchExportKMZ:hover,
#btnExportGeoJSON:hover,
#btnExportKML:hover,
#btnExportKMZ:hover,
#btnExportCSV:hover,
#btnExportPericial:hover,
#btnXdrDrawRoute:hover,
#btnXdrExportKmz:hover,
#btnXdrReportHtml:hover,
#btnXdrStartPlayback:hover,
#btnXdrStopPlayback:hover,
#btnXdrOpenMatchModal:hover {
  filter: brightness(1.12) saturate(1.08);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22) !important;
}

.wf-panel-xdr .wf-xdr-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.wf-panel-xdr .wf-xdr-actions .wf-action-btn {
  min-height: 42px !important;
}

.wf-panel-xdr #btnXdrOpenMatchModal {
  grid-column: 1 / -1 !important;
}

.wf-panel-xdr #btnXdrReportHtml {
  grid-column: 1 / -1 !important;
}

@media (min-width: 701px) {
  .wf-main .leaflet-top {
    top: 12px !important;
  }

  .wf-main .leaflet-left {
    left: 14px !important;
  }

  .wf-main .leaflet-control-zoom {
    display: grid !important;
    grid-template-columns: repeat(2, 36px) !important;
    width: 72px !important;
    height: 42px !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    border: 1px solid rgba(122, 178, 238, 0.28) !important;
    background: rgba(7, 19, 36, 0.88) !important;
    box-shadow: 0 8px 22px rgba(0, 8, 20, 0.28) !important;
  }

  .wf-main .leaflet-control-zoom a {
    width: 36px !important;
    height: 42px !important;
    line-height: 42px !important;
    border-radius: 0 !important;
    border: 0 !important;
    border-right: 1px solid rgba(122, 178, 238, 0.22) !important;
    background: transparent !important;
    color: #d7ecff !important;
    font-size: 16px !important;
  }

  .wf-main .leaflet-control-zoom a:last-child {
    border-right: 0 !important;
  }

  .wf-main .wf-map-tools {
    position: absolute !important;
    top: 12px !important;
    left: 94px !important;
    right: auto !important;
    z-index: 910 !important;
    width: min(460px, calc(100% - 126px)) !important;
    padding: 0 !important;
    display: block !important;
    pointer-events: none !important;
  }

  .wf-main .wf-map-search {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 42px !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    pointer-events: auto !important;
  }

  .wf-main .wf-map-query-input {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    line-height: 42px !important;
    background: rgba(7, 19, 36, 0.88) !important;
    border: 1px solid rgba(122, 178, 238, 0.28) !important;
    box-shadow: 0 8px 22px rgba(0, 8, 20, 0.28) !important;
  }

  .wf-main #btnMapSearch {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    display: inline-grid !important;
    place-items: center !important;
  }

  .wf-main #btnMapSearch svg {
    width: 15px !important;
    height: 15px !important;
  }
}

@media (max-width: 700px) {
  .leaflet-popup.wf-xdr-popup .leaflet-popup-content {
    min-width: min(300px, calc(100vw - 44px)) !important;
    max-width: min(420px, calc(100vw - 32px)) !important;
    margin: 12px 14px !important;
  }
}

/* Lote tab: keep the batch workspace self-contained. */
.wf-sidebar[data-active-tab="lote"] #wfSidebarSmart {
  display: none !important;
}

.wf-sidebar[data-active-tab="lote"] #wfSidebarSummary {
  display: block !important;
  flex: 0 0 auto !important;
  margin-top: 8px !important;
}

.wf-sidebar[data-active-tab="lote"] .wf-sidebar-scroll {
  overflow-y: auto !important;
}

.wf-sidebar[data-active-tab="lote"] .wf-panel-lote {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  max-height: calc(100dvh - var(--nav-h) - 205px) !important;
}

.wf-sidebar[data-active-tab="lote"] .wf-panel-lote .wf-batch-list {
  flex: 1 1 auto !important;
  min-height: 120px !important;
  max-height: min(30dvh, 250px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 4px !important;
}

.wf-sidebar[data-active-tab="lote"] .wf-panel-lote .wf-export-grid,
.wf-sidebar[data-active-tab="lote"] .wf-panel-lote .wf-action-row {
  flex: 0 0 auto !important;
}

@media (max-width: 700px) {
  .wf-sidebar[data-active-tab="lote"] .wf-panel-lote {
    max-height: calc(100dvh - var(--nav-h) - 188px) !important;
  }

  .wf-sidebar[data-active-tab="lote"] .wf-panel-lote .wf-batch-list {
    min-height: 96px !important;
    max-height: min(22dvh, 150px) !important;
  }
}

/* Professional sidebar refresh */
@media (min-width: 701px) {
  :root {
    --sidebar-w: 500px !important;
  }
}

.wf-sidebar {
  background:
    linear-gradient(180deg, rgba(13, 26, 48, 0.98), rgba(7, 15, 30, 0.98)) !important;
  border-color: rgba(117, 158, 210, 0.2) !important;
  border-radius: 0 !important;
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.04),
    18px 0 38px rgba(1, 8, 20, 0.24) !important;
}

.wf-sidebar-scroll {
  gap: 12px !important;
  padding: 16px 18px 18px !important;
}

.wf-sidebar-tabs {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: -16px -18px 12px !important;
  padding: 14px 18px 13px !important;
  background:
    linear-gradient(180deg, rgba(8, 17, 32, 0.98), rgba(9, 20, 38, 0.94)) !important;
  border-bottom: 1px solid rgba(123, 164, 216, 0.2) !important;
  box-shadow: 0 12px 24px rgba(1, 8, 20, 0.28) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.15) !important;
  backdrop-filter: blur(14px) saturate(1.15) !important;
}

.wf-sidebar-tab {
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 10px !important;
  border: 1px solid rgba(117, 158, 210, 0.2) !important;
  border-radius: 9px !important;
  background: rgba(17, 34, 61, 0.72) !important;
  color: #a9bedc !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  font: 800 12px/1 "DM Sans", system-ui, sans-serif !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
  transform: none !important;
}

.wf-sidebar-tab::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(142, 172, 211, 0.48);
  box-shadow: 0 0 0 3px rgba(142, 172, 211, 0.08);
  flex: 0 0 auto;
}

.wf-sidebar-tab::after {
  display: none !important;
}

.wf-sidebar-tab:hover {
  background: rgba(25, 48, 82, 0.9) !important;
  border-color: rgba(126, 190, 255, 0.38) !important;
  color: #e8f3ff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 8, 20, 0.18) !important;
}

.wf-sidebar-tab.active {
  background: linear-gradient(180deg, rgba(45, 139, 226, 0.95), rgba(25, 95, 172, 0.95)) !important;
  border-color: rgba(113, 202, 255, 0.72) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 22px rgba(20, 108, 205, 0.28) !important;
}

.wf-sidebar-tab.active::before {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.wf-sidebar-tab[data-sidebar-tab] {
  border-color: rgba(117, 158, 210, 0.2) !important;
}

.wf-sidebar-tab[data-sidebar-tab].active {
  border-color: rgba(113, 202, 255, 0.72) !important;
}

.wf-sidebar-tab[data-sidebar-tab="cobertura"].active {
  background: linear-gradient(180deg, rgba(19, 148, 104, 0.96), rgba(13, 104, 82, 0.96)) !important;
  border-color: rgba(83, 236, 180, 0.66) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 22px rgba(7, 122, 91, 0.26) !important;
}

.wf-sidebar-tab[data-sidebar-tab="exportar"].active {
  background: linear-gradient(180deg, rgba(178, 119, 28, 0.96), rgba(126, 78, 17, 0.96)) !important;
  border-color: rgba(255, 205, 112, 0.64) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 22px rgba(143, 87, 14, 0.25) !important;
}

.wf-sidebar-tab[data-sidebar-tab="xdr"].active,
.wf-sidebar-tab[data-sidebar-tab="lote"].active {
  background: linear-gradient(180deg, rgba(78, 105, 218, 0.96), rgba(53, 72, 160, 0.96)) !important;
  border-color: rgba(166, 185, 255, 0.64) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 22px rgba(56, 75, 175, 0.25) !important;
}

.wf-sidebar-tab[data-sidebar-tab="live"].active {
  background: linear-gradient(180deg, rgba(31, 158, 210, 0.96), rgba(23, 107, 170, 0.96)) !important;
}

.wf-section,
.wf-sidebar-summary,
.wf-sidebar-smart {
  border-radius: 12px !important;
  border-color: rgba(117, 158, 210, 0.18) !important;
  background:
    linear-gradient(180deg, rgba(17, 32, 57, 0.96), rgba(12, 25, 47, 0.96)) !important;
  box-shadow: 0 10px 24px rgba(1, 8, 20, 0.18) !important;
}

.wf-section-header {
  margin: -2px 0 12px !important;
  padding-bottom: 11px !important;
  border-bottom-color: rgba(125, 169, 224, 0.16) !important;
}

.wf-section-icon {
  width: 26px !important;
  height: 26px !important;
  border-radius: 8px !important;
  background: rgba(74, 171, 255, 0.13) !important;
  border: 1px solid rgba(100, 190, 255, 0.22) !important;
  color: #74caff !important;
}

.wf-section-title {
  color: #f3f8ff !important;
  font-size: 16px !important;
  letter-spacing: 0.35px !important;
}

.wf-input,
.wf-select,
.wf-log,
.wf-detail-panel,
.wf-toggle-group {
  border-color: rgba(126, 169, 224, 0.18) !important;
  background-color: rgba(9, 20, 38, 0.72) !important;
}

.wf-action-btn,
.wf-export-btn {
  border-radius: 9px !important;
}

@media (min-width: 701px) {
  .wf-sidebar.wf-sidebar-compact {
    border-radius: 0 !important;
    background:
      linear-gradient(180deg, rgba(13, 26, 48, 0.98), rgba(7, 15, 30, 0.98)) !important;
  }

  .wf-sidebar.wf-sidebar-compact .wf-sidebar-scroll {
    gap: 10px !important;
    padding: 14px 16px 16px !important;
  }

  .wf-sidebar.wf-sidebar-compact .wf-sidebar-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin: -14px -16px 10px !important;
    padding: 13px 16px 12px !important;
    background:
      linear-gradient(180deg, rgba(8, 17, 32, 0.98), rgba(9, 20, 38, 0.94)) !important;
    border-bottom: 1px solid rgba(123, 164, 216, 0.2) !important;
    box-shadow: 0 12px 24px rgba(1, 8, 20, 0.28) !important;
  }

  .wf-sidebar.wf-sidebar-compact .wf-sidebar-tab {
    min-height: 38px !important;
    border-radius: 9px !important;
    padding: 0 9px !important;
    font-size: 11.5px !important;
  }

  .wf-sidebar.wf-sidebar-compact .wf-section,
  .wf-sidebar.wf-sidebar-compact .wf-sidebar-summary,
  .wf-sidebar.wf-sidebar-compact .wf-sidebar-smart {
    border-radius: 12px !important;
    padding: 10px !important;
  }
}

@media (max-width: 700px) {
  .wf-sidebar-scroll {
    padding: 12px !important;
  }

  .wf-sidebar-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    margin: -12px -12px 10px !important;
    padding: 12px !important;
  }

  .wf-sidebar-tab {
    min-height: 38px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
  }
}

/* Recommended sidebar layout: GIS command rail */
@media (min-width: 701px) {
  :root {
    --sidebar-w: 620px !important;
    --sidebar-rail-w: 136px;
  }

  .wf-sidebar-scroll {
    display: grid !important;
    grid-template-columns: var(--sidebar-rail-w) minmax(0, 1fr) !important;
    grid-auto-rows: min-content !important;
    align-content: start !important;
    column-gap: 16px !important;
    row-gap: 14px !important;
    padding: 18px 16px 16px !important;
    position: relative !important;
  }

  .wf-sidebar-scroll::before {
    content: "" !important;
    position: absolute !important;
    left: calc(16px + var(--sidebar-rail-w) + 8px) !important;
    top: 18px !important;
    width: 1px !important;
    height: calc(100vh - var(--nav-h) - 36px) !important;
    background:
      linear-gradient(
        180deg,
        transparent 0,
        rgba(126, 190, 255, 0.18) 7%,
        rgba(126, 190, 255, 0.34) 50%,
        rgba(126, 190, 255, 0.18) 93%,
        transparent 100%
      ) !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }

  .wf-sidebar-tabs {
    grid-column: 1 !important;
    grid-row: 1 / span 20 !important;
    position: sticky !important;
    top: 18px !important;
    z-index: 1 !important;
    align-self: start !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    min-height: calc(100vh - var(--nav-h) - 34px) !important;
    margin: 0 !important;
    padding: 14px 12px !important;
    border: 1px solid rgba(126, 169, 224, 0.2) !important;
    border-radius: 16px !important;
    background:
      linear-gradient(180deg, rgba(7, 16, 31, 0.96), rgba(5, 12, 24, 0.98)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 14px 30px rgba(1, 8, 20, 0.18) !important;
  }

  .wf-sidebar-tabs::before {
    content: "MODULOS";
    display: block;
    margin: 2px 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(126, 169, 224, 0.24);
    color: #a9c4e8;
    text-align: center;
    font: 900 12px/1 "DM Sans", system-ui, sans-serif;
    letter-spacing: 1.1px;
  }

  .wf-sidebar-tabs::after {
    content: "CELL-ID PRO\A MONITOR GIS";
    white-space: pre;
    margin-top: auto;
    padding: 14px 12px;
    border: 1px solid rgba(126, 169, 224, 0.16);
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(17, 36, 64, 0.72), rgba(8, 18, 35, 0.86));
    color: #6f8caf;
    font: 900 9.5px/1.55 "DM Sans", system-ui, sans-serif;
    letter-spacing: 0.9px;
  }

  .wf-sidebar-tab {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 0 14px !important;
    border-radius: 11px !important;
    background:
      linear-gradient(180deg, rgba(11, 23, 43, 0.94), rgba(6, 15, 29, 0.96)) !important;
    border-color: rgba(97, 139, 194, 0.22) !important;
    color: #a6bbd8 !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 8px 18px rgba(1, 8, 20, 0.12) !important;
    text-align: left !important;
    margin-bottom: 8px !important;
  }

  .wf-sidebar-tab:not(:last-of-type) {
    position: relative !important;
  }

  .wf-sidebar-tab:not(:last-of-type)::before {
    z-index: 1;
  }

  .wf-sidebar-tab:not(:last-of-type) + .wf-sidebar-tab {
    margin-top: 8px !important;
  }

  .wf-sidebar-tab:not(:last-of-type) + .wf-sidebar-tab::before {
    z-index: 1;
  }

  .wf-sidebar-tab::before {
    width: 9px !important;
    height: 9px !important;
    background: rgba(126, 169, 224, 0.42) !important;
    box-shadow: none !important;
  }

  .wf-sidebar-tab::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 10px !important;
    bottom: 10px !important;
    width: 4px !important;
    height: auto !important;
    border-radius: 0 99px 99px 0 !important;
    background: transparent !important;
    opacity: 1 !important;
  }

  .wf-sidebar-tab:not(:last-of-type) {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 8px 18px rgba(1, 8, 20, 0.12),
      0 16px 0 -15px rgba(126, 169, 224, 0.32) !important;
  }

  .wf-sidebar-tab:hover {
    background:
      linear-gradient(180deg, rgba(20, 45, 78, 0.96), rgba(10, 25, 48, 0.98)) !important;
    border-color: rgba(126, 190, 255, 0.34) !important;
    color: #e5f1ff !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.07),
      0 10px 22px rgba(1, 8, 20, 0.18) !important;
  }

  .wf-sidebar-tab.active,
  .wf-sidebar-tab[data-sidebar-tab].active,
  .wf-sidebar-tab[data-sidebar-tab="cobertura"].active,
  .wf-sidebar-tab[data-sidebar-tab="exportar"].active,
  .wf-sidebar-tab[data-sidebar-tab="xdr"].active,
  .wf-sidebar-tab[data-sidebar-tab="lote"].active,
  .wf-sidebar-tab[data-sidebar-tab="live"].active {
    background:
      linear-gradient(90deg, rgba(47, 151, 241, 0.24), rgba(45, 139, 226, 0.12)) !important;
    border-color: rgba(96, 180, 255, 0.34) !important;
    color: #f4f9ff !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 12px 24px rgba(31, 115, 207, 0.15) !important;
  }

  .wf-sidebar-tab.active::before,
  .wf-sidebar-tab[data-sidebar-tab].active::before {
    background: #5cc5ff !important;
    box-shadow: 0 0 12px rgba(92, 197, 255, 0.55) !important;
  }

  .wf-sidebar-tab.active::after,
  .wf-sidebar-tab[data-sidebar-tab].active::after {
    background: #5cc5ff !important;
  }

  .wf-sidebar-tab[data-sidebar-tab="cobertura"].active::before,
  .wf-sidebar-tab[data-sidebar-tab="cobertura"].active::after {
    background: #4ee0a8 !important;
  }

  .wf-sidebar-tab[data-sidebar-tab="exportar"].active::before,
  .wf-sidebar-tab[data-sidebar-tab="exportar"].active::after {
    background: #f4bd57 !important;
  }

  .wf-panel,
  .wf-sidebar-summary,
  .wf-sidebar-smart {
    grid-column: 2 !important;
    min-width: 0 !important;
    position: relative !important;
    z-index: 1 !important;
  }

  .wf-panel {
    margin: 0 !important;
  }

  .wf-section,
  .wf-sidebar-summary,
  .wf-sidebar-smart {
    border-radius: 16px !important;
    padding: 16px !important;
    border-color: rgba(126, 169, 224, 0.2) !important;
    background:
      linear-gradient(180deg, rgba(18, 35, 62, 0.98), rgba(12, 26, 49, 0.98)) !important;
    box-shadow: none !important;
  }

  .wf-section-header {
    margin: 0 0 14px !important;
    padding-bottom: 13px !important;
  }

  .wf-section-title {
    font-size: 17px !important;
  }

  .wf-form-grid {
    gap: 12px !important;
  }

  .wf-field {
    gap: 6px !important;
  }

  .wf-field-label {
    font-size: 11px !important;
    color: #9db4d4 !important;
    font-weight: 800 !important;
    letter-spacing: 0.45px !important;
  }

  .wf-input,
  .wf-select {
    min-height: 38px !important;
    border-radius: 11px !important;
    padding: 9px 12px !important;
    font-size: 13px !important;
  }

  .wf-inline-search {
    grid-template-columns: minmax(0, 1fr) 44px !important;
    gap: 7px !important;
  }

  .wf-inline-search .wf-action-btn {
    min-width: 44px !important;
    width: 44px !important;
    min-height: 38px !important;
    justify-content: center !important;
    padding-inline: 0 !important;
  }

  .wf-toggle-group {
    min-height: 38px !important;
    border-radius: 11px !important;
    padding: 3px !important;
  }

  .wf-toggle {
    min-height: 30px !important;
    border-radius: 8px !important;
  }

  .wf-action-btn.wf-full {
    min-height: 38px !important;
    border-radius: 10px !important;
  }

  .wf-kpi-grid {
    gap: 8px !important;
  }

  .wf-kpi {
    border-radius: 12px !important;
    padding: 13px 14px !important;
  }

  .wf-sidebar-summary {
    margin-top: 0 !important;
    padding: 14px !important;
  }

  .wf-sidebar-smart {
    padding: 14px !important;
  }

  .wf-sidebar-summary-head,
  .wf-smart-head {
    margin-bottom: 10px !important;
    color: #f2f7ff !important;
    font-size: 13px !important;
  }

  .wf-sidebar-summary-grid,
  .wf-smart-grid {
    gap: 8px !important;
    position: relative !important;
  }

  .wf-sidebar-summary-grid::before,
  .wf-smart-grid::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 1px !important;
    transform: translateX(-0.5px) !important;
    background: rgba(126, 190, 255, 0.2) !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }

  .wf-sidebar-summary-kpi,
  .wf-smart-chip {
    border-radius: 10px !important;
    background: rgba(14, 31, 56, 0.78) !important;
    border-color: rgba(126, 169, 224, 0.22) !important;
    position: relative !important;
    z-index: 1 !important;
  }

  .wf-sidebar-summary-last,
  .wf-smart-log {
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(126, 169, 224, 0.14) !important;
  }

  .wf-sidebar.wf-sidebar-compact .wf-sidebar-scroll {
    display: grid !important;
    grid-template-columns: var(--sidebar-rail-w) minmax(0, 1fr) !important;
    column-gap: 16px !important;
    padding: 18px 16px 16px !important;
  }

  .wf-sidebar.wf-sidebar-compact .wf-sidebar-tabs {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 14px 12px !important;
  }

  .wf-sidebar.wf-sidebar-compact .wf-sidebar-tab {
    min-height: 48px !important;
    padding: 0 12px !important;
    font-size: 11.5px !important;
  }
}

/* Desktop hide/show control for the professional sidebar */
.wf-sidebar-hide-toggle {
  display: none;
}

@media (min-width: 701px) {
  .wf-layout {
    transition: gap .42s cubic-bezier(.16, 1, .3, 1) !important;
  }

  .wf-sidebar {
    flex: 0 0 var(--sidebar-w) !important;
    max-width: var(--sidebar-w) !important;
    will-change: flex-basis, width, max-width, opacity, transform;
    transition:
      flex-basis .42s cubic-bezier(.16, 1, .3, 1),
      width .42s cubic-bezier(.16, 1, .3, 1),
      max-width .42s cubic-bezier(.16, 1, .3, 1),
      min-width .42s cubic-bezier(.16, 1, .3, 1),
      opacity .34s ease,
      border-color .34s ease,
      transform .42s cubic-bezier(.16, 1, .3, 1) !important;
  }

  .wf-sidebar-scroll {
    transition:
      opacity .28s ease,
      transform .42s cubic-bezier(.16, 1, .3, 1) !important;
  }

  .wf-main {
    min-width: 0 !important;
    transition: border-color .2s ease, box-shadow .2s ease !important;
  }

  .wf-sidebar-hide-toggle {
    position: fixed;
    top: calc(var(--nav-h) + ((100vh - var(--nav-h)) / 2) - 22px);
    left: calc(var(--sidebar-w) + 20px);
    z-index: 1250;
    width: 34px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(126, 190, 255, 0.28);
    border-radius: 0 12px 12px 0;
    background:
      linear-gradient(180deg, rgba(18, 39, 68, 0.96), rgba(10, 23, 43, 0.96));
    color: #bfe2ff;
    cursor: pointer;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 12px 26px rgba(1, 8, 20, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition:
      left .42s cubic-bezier(.16, 1, .3, 1),
      color .16s ease,
      border-color .16s ease,
      background .16s ease,
      transform .16s ease;
  }

  .wf-sidebar-hide-toggle:hover {
    color: #ffffff;
    border-color: rgba(111, 203, 255, 0.58);
    background:
      linear-gradient(180deg, rgba(35, 88, 137, 0.98), rgba(16, 47, 88, 0.98));
    transform: translateX(1px);
  }

  .wf-sidebar-hide-toggle:focus-visible {
    outline: 2px solid rgba(111, 203, 255, 0.75);
    outline-offset: 2px;
  }

  .wf-sidebar-hide-icon-open {
    display: none;
  }

  body.wf-sidebar-hidden .wf-layout {
    gap: 0 !important;
  }

  body.wf-sidebar-hidden .wf-sidebar {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    flex-basis: 0 !important;
    border-width: 0 !important;
    opacity: 0 !important;
    transform: translateX(-18px) !important;
    pointer-events: none !important;
  }

  body.wf-sidebar-hidden .wf-sidebar-scroll {
    opacity: 0 !important;
    transform: translateX(-18px) !important;
  }

  body.wf-sidebar-hidden .wf-sidebar-hide-toggle {
    left: 12px;
    border-radius: 12px;
    background:
      linear-gradient(180deg, rgba(35, 88, 137, 0.98), rgba(16, 47, 88, 0.98));
    border-color: rgba(111, 203, 255, 0.48);
  }

  body.wf-sidebar-hidden .wf-sidebar-hide-icon-close {
    display: none;
  }

  body.wf-sidebar-hidden .wf-sidebar-hide-icon-open {
    display: block;
  }

  body.wf-sidebar-hidden .wf-main {
    border-color: rgba(126, 190, 255, 0.18) !important;
    box-shadow: 0 16px 34px rgba(1, 8, 20, 0.22) !important;
  }
}

/* Sidebar navigation without the old wf-sidebar-tabs container */
@media (min-width: 701px) {
  #wfSidebarTabs.wf-sidebar-nav {
    grid-column: 1 !important;
    grid-row: 1 / span 20 !important;
    position: sticky !important;
    top: 18px !important;
    align-self: start !important;
    min-height: calc(100vh - var(--nav-h) - 34px) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 9px !important;
    padding: 14px 10px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(113, 155, 211, 0.18) !important;
    background:
      linear-gradient(180deg, rgba(8, 18, 34, 0.96), rgba(4, 11, 23, 0.98)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 16px 32px rgba(1, 8, 20, 0.2) !important;
  }

  #wfSidebarTabs.wf-sidebar-nav::before {
    content: "MÓDULOS";
    display: block;
    margin: 0 4px 6px;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(126, 169, 224, 0.24);
    color: #b3ceef;
    text-align: center;
    font: 900 12px/1 "DM Sans", system-ui, sans-serif;
    letter-spacing: 1px;
  }

  .wf-sidebar-build-info {
    display: grid;
    gap: 2px;
    margin-top: auto;
    padding: 14px 8px 11px;
    border-radius: 6px;
    border: 0;
    border-top: 2px solid rgba(82, 190, 255, 0.72);
    background:
      linear-gradient(180deg, rgba(18, 46, 82, 0.46), rgba(6, 16, 31, 0.78));
    color: #a9c8ec;
    text-align: center;
    font-family: "DM Sans", system-ui, sans-serif;
  font-size: 9.4px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0.12px;
  font-family: "Space Grotesk", "DM Sans", system-ui, sans-serif;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      inset 0 18px 22px rgba(82, 190, 255, 0.05);
  }

  .wf-sidebar-build-title {
    color: #d9ecff;
    font-size: 9.2px;
    font-weight: 900;
    letter-spacing: 0.2px;
  }

  .wf-sidebar-build-count {
    color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  font-family: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  line-height: 1;
  text-shadow: 0 0 10px rgba(82, 190, 255, 0.72);
  }

  #wfSidebarTabs.wf-sidebar-nav .wf-sidebar-tab {
    margin: 0 !important;
  }

  #wfSidebarTabs.wf-sidebar-nav .wf-sidebar-tab + .wf-sidebar-tab {
    position: relative !important;
  }

  #wfSidebarTabs.wf-sidebar-nav .wf-sidebar-tab + .wf-sidebar-tab::before {
    z-index: 1;
  }

  #wfSidebarTabs.wf-sidebar-nav .wf-sidebar-tab + .wf-sidebar-tab::after {
    z-index: 0;
  }

  #wfSidebarTabs.wf-sidebar-nav .wf-sidebar-tab:not(:last-of-type) {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 8px 18px rgba(1, 8, 20, 0.12) !important;
  }

  #wfSidebarTabs.wf-sidebar-nav .wf-sidebar-tab:not(:last-of-type)::before {
    box-shadow: none !important;
  }

  #wfSidebarTabs.wf-sidebar-nav .wf-sidebar-tab:not(:last-of-type)::after {
    box-shadow: none !important;
  }

  .wf-sidebar.wf-sidebar-compact #wfSidebarTabs.wf-sidebar-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 9px !important;
    margin: 0 !important;
    padding: 14px 10px !important;
  }
}

@media (max-width: 700px) {
  #wfSidebarTabs.wf-sidebar-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: -12px -12px 10px !important;
    padding: 12px !important;
    background: rgba(8, 18, 34, 0.94) !important;
    border-bottom: 1px solid rgba(126, 169, 224, 0.2) !important;
  }

  #wfSidebarTabs.wf-sidebar-nav .wf-sidebar-tab {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    border-radius: 9px !important;
    font-size: 10.5px !important;
    justify-content: center !important;
  }

  .wf-sidebar-build-info {
    grid-column: 1 / -1 !important;
    margin-top: 4px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(82, 190, 255, 0.28) !important;
    border-top: 2px solid rgba(82, 190, 255, 0.72) !important;
    background: linear-gradient(180deg, rgba(18, 46, 82, 0.62), rgba(6, 16, 31, 0.86)) !important;
    color: #cfe5ff !important;
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    gap: 2px 12px !important;
    text-align: left !important;
    font-family: "Space Grotesk", "DM Sans", system-ui, sans-serif !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.22 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 22px rgba(2, 8, 20, 0.18) !important;
  }

  .wf-sidebar-build-title,
  .wf-sidebar-build-info > span:not(#sidebarBuildUpdated) {
    grid-column: 1 !important;
  }

  .wf-sidebar-build-count {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    align-self: center !important;
    font-size: 18px !important;
    text-align: right !important;
  }

  #sidebarBuildUpdated {
    grid-column: 1 / -1 !important;
    color: #9fbee5 !important;
    font-size: 10.5px !important;
    margin-top: 3px !important;
  }

  .wf-sidebar {
    width: 100% !important;
    max-width: none !important;
    border-radius: 18px !important;
  }

  .wf-sidebar-scroll {
    padding: 12px !important;
  }
}

/* Cleaner fixed module rail */
@media (min-width: 701px) {
  #wfSidebarTabs.wf-sidebar-nav {
    top: 8px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .wf-sidebar.wf-sidebar-compact #wfSidebarTabs.wf-sidebar-nav {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #wfSidebarTabs.wf-sidebar-nav::before {
    margin-top: 0 !important;
  }
}

/* Final mobile nav fit: keep all top buttons inside wf-nav. */
@media (max-width: 700px) {
  :root {
    --nav-h: 248px !important;
  }

  .wf-nav {
    height: var(--nav-h) !important;
    max-height: var(--nav-h) !important;
    padding: 10px !important;
    gap: 8px !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .wf-nav-left {
    flex: 0 0 auto !important;
    min-height: 0 !important;
  }

  .wf-brand {
    min-height: 76px !important;
    height: 76px !important;
    padding: 6px 86px 6px 10px !important;
    box-sizing: border-box !important;
  }

  .wf-brand-mobile-logo {
    width: 66px !important;
    height: 66px !important;
  }

  .wf-brand-title {
    font-size: 18px !important;
    line-height: 1 !important;
  }

  .wf-brand-tag {
    font-size: 9.2px !important;
    line-height: 1 !important;
  }

  .wf-brand .wf-app-version {
    font-size: 8px !important;
    margin: 1px 0 0 88px !important;
  }

  #mobileSidebarToggle {
    top: 38px !important;
    height: 34px !important;
    min-height: 34px !important;
  }

  .wf-nav-right {
    flex: 0 0 auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin-top: 6px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .wf-nav-right .wf-action-btn {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    min-width: 0 !important;
    padding: 0 10px !important;
    border-radius: 12px !important;
    font-size: 10.9px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
  }

  .wf-layout {
    margin-top: var(--nav-h) !important;
    height: calc(100dvh - var(--nav-h)) !important;
  }
}
