/* ============================================================
   Nexo CTG · tema visual "Cartagena de Indias"
   Colores de la bandera de Cartagena: rojo, amarillo y verde
   ============================================================ */
:root {
  --nx-noche: #0B3D24;
  --nx-noche-2: #12603A;
  --nx-mar: #00873E;
  --nx-turquesa: #2BAA4A;
  --nx-atardecer: #D52B1E;
  --nx-oro: #FCD116;
  --nx-ocre: #E8B400;
  --nx-buganvilla: #A6192E;
  --nx-crema: #FFFBEA;
  --nx-arena: #F7F5EA;
  --nx-tinta: #1F2A37;
  --nx-gris: #6B7280;
  --nx-borde: #E4DFC6;
  --nx-sombra: 0 10px 30px rgba(11, 61, 36, .10);
  --nx-radio: 18px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: 'Poppins', system-ui, sans-serif; color: var(--nx-tinta); background: var(--nx-arena); }
.nx-titulo, h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; }
a { color: var(--nx-mar); }

/* ---------- botones ---------- */
.nx-btn { background: linear-gradient(135deg, var(--nx-atardecer), var(--nx-buganvilla)); color: #fff; border: 0; border-radius: 999px; padding: .55rem 1.3rem; font-weight: 600; box-shadow: 0 6px 16px rgba(166, 25, 46, .28); transition: transform .15s, box-shadow .15s; }
.nx-btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(166, 25, 46, .35); }
.nx-btn-mar { background: linear-gradient(135deg, var(--nx-mar), var(--nx-turquesa)); box-shadow: 0 6px 16px rgba(0, 135, 62, .3); }
.nx-btn-suave { background: #fff; color: var(--nx-noche); border: 1px solid var(--nx-borde); border-radius: 999px; padding: .5rem 1.1rem; font-weight: 600; }
.nx-btn-suave:hover { border-color: var(--nx-mar); color: var(--nx-mar); }

/* ============================================================
   INGRESO
   ============================================================ */
.nx-login { min-height: 100vh; position: relative; overflow: hidden; display: flex; align-items: stretch;
  background: #0B3D24 url('/img/fondo-cartagena.svg') center/cover no-repeat; }
.nx-login::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(11, 61, 36, .92) 0%, rgba(11, 61, 36, .72) 38%, rgba(213, 43, 30, .18) 70%, rgba(252, 209, 22, .10) 100%); }
.nx-login-skyline { position: absolute; left: 0; right: 0; width: 100%; bottom: -2px; height: 170px; opacity: .9; pointer-events: none; }
.nx-login-inner { position: relative; z-index: 2; width: 100%; max-width: 1200px; margin: 0 auto; padding: 48px 24px 190px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.nx-marca { display: flex; align-items: center; gap: 14px; color: #fff; }
.nx-marca-logo { width: 64px; height: 64px; }
.nx-marca b { font-family: 'Playfair Display', serif; font-size: 2.4rem; letter-spacing: .5px; line-height: 1; }
.nx-marca b span { color: var(--nx-oro); }
.nx-marca small { display: block; font-size: .78rem; letter-spacing: 3px; text-transform: uppercase; opacity: .85; }
.nx-login h1 { color: #fff; font-size: clamp(2.2rem, 4.2vw, 3.6rem); line-height: 1.08; margin: 28px 0 16px; }
.nx-login h1 em { font-style: italic; color: var(--nx-oro); }
.nx-login p.lead { color: rgba(255, 255, 255, .88); font-size: 1.08rem; max-width: 560px; }
.nx-chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.nx-chip { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(6px); color: #fff; border-radius: 16px; padding: 10px 16px; }
.nx-chip b { display: block; font-size: 1.35rem; font-family: 'Playfair Display', serif; color: var(--nx-oro); }
.nx-chip span { font-size: .78rem; opacity: .9; }
.nx-tarjeta-login { background: rgba(255, 248, 238, .94); backdrop-filter: blur(14px); border-radius: 26px; padding: 34px 32px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .6); position: relative; overflow: hidden; }
.nx-tarjeta-login::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--nx-turquesa), var(--nx-oro), var(--nx-atardecer), var(--nx-buganvilla)); }
.nx-tarjeta-login h2 { font-size: 1.8rem; color: var(--nx-noche); margin: 0 0 4px; }
.nx-tarjeta-login .sub { color: var(--nx-gris); font-size: .9rem; margin-bottom: 22px; }
.nx-campo { position: relative; margin-bottom: 16px; }
.nx-campo i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--nx-mar); font-size: 1.1rem; }
.nx-campo input { width: 100%; border: 1.5px solid var(--nx-borde); background: #fff; border-radius: 14px; padding: 14px 16px 14px 46px; font-size: .98rem; outline: none; transition: border-color .15s, box-shadow .15s; }
.nx-campo input:focus { border-color: var(--nx-turquesa); box-shadow: 0 0 0 4px rgba(43, 170, 74, .15); }
.nx-ver-clave { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--nx-gris); }
.nx-login .nx-btn { width: 100%; padding: .85rem; font-size: 1.02rem; }
.nx-login-pie { position: absolute; z-index: 3; bottom: 14px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .8); font-size: .78rem; }
@media (max-width: 900px) {
  .nx-login-inner { grid-template-columns: 1fr; gap: 26px; padding-top: 28px; }
  .nx-login h1 { margin-top: 18px; }
}

/* ============================================================
   APLICACIÓN
   ============================================================ */
.nx-app { display: flex; min-height: 100vh; }
.nx-lateral { width: 264px; flex: 0 0 264px; color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 1040;
  background: linear-gradient(180deg, rgba(11, 61, 36, .97), rgba(18, 96, 58, .97)), url('/img/fondo-cartagena.svg') 70% center/cover; }
.nx-lateral .nx-marca { padding: 22px 22px 18px; }
.nx-lateral .nx-marca b { font-size: 1.7rem; }
.nx-lateral .nx-marca-logo { width: 44px; height: 44px; }
.nx-franja { height: 5px; background: linear-gradient(90deg, var(--nx-atardecer) 0 33.3%, var(--nx-oro) 33.3% 66.6%, var(--nx-mar) 66.6% 100%); }
.nx-nav { padding: 16px 12px; flex: 1; overflow-y: auto; }
.nx-nav .grupo { font-size: .68rem; letter-spacing: 2px; text-transform: uppercase; opacity: .55; padding: 14px 12px 6px; }
.nx-nav a { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .86); text-decoration: none; padding: 11px 14px; border-radius: 12px; font-weight: 500; margin-bottom: 3px; transition: background .15s, color .15s; }
.nx-nav a i { font-size: 1.15rem; width: 22px; text-align: center; color: var(--nx-oro); }
.nx-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nx-nav a.activo { background: linear-gradient(135deg, rgba(43, 170, 74, .28), rgba(166, 25, 46, .22)); color: #fff; box-shadow: inset 3px 0 0 var(--nx-oro); }
.nx-lateral-pie { padding: 14px 18px 18px; font-size: .78rem; opacity: .75; }
.nx-contenido { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nx-barra { height: 66px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--nx-borde); display: flex; align-items: center; justify-content: space-between; padding: 0 26px; position: sticky; top: 0; z-index: 1030; }
.nx-barra h1 { font-size: 1.35rem; margin: 0; color: var(--nx-noche); }
.nx-usuario { display: flex; align-items: center; gap: 10px; }
.nx-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--nx-oro), var(--nx-atardecer)); color: #fff; display: grid; place-items: center; font-weight: 700; }
.nx-pagina { padding: 26px; flex: 1; }
.nx-menu-movil { display: none; border: 0; background: transparent; font-size: 1.6rem; color: var(--nx-noche); }
/* Ocultar / mostrar el menú lateral (escritorio) */
.nx-lateral { transition: margin-left .25s ease; }
.nx-app.menu-oculto .nx-lateral { margin-left: -264px; }
.nx-alternar-menu { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--nx-borde); background: #fff; color: var(--nx-noche); display: inline-grid; place-items: center; font-size: 1.2rem; cursor: pointer; transition: background .15s, transform .15s; }
.nx-alternar-menu:hover { background: #f1f5f9; }
.nx-alternar-menu i { transition: transform .25s; }
.nx-app.menu-oculto .nx-alternar-menu i { transform: scaleX(-1); }
@media (max-width: 992px) {
  .nx-alternar-menu { display: none; }
  .nx-app.menu-oculto .nx-lateral { margin-left: 0; }
  .nx-lateral { position: fixed; left: -280px; transition: left .25s; }
  .nx-lateral.abierto { left: 0; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .nx-menu-movil { display: inline-block; }
  .nx-pagina { padding: 16px; }
}

/* ---------- tarjetas ---------- */
.nx-card { background: #fff; border-radius: var(--nx-radio); box-shadow: var(--nx-sombra); border: 1px solid var(--nx-borde); }
.nx-card-cab { padding: 16px 20px 0; display: flex; align-items: center; justify-content: space-between; }
.nx-card-cab h3 { font-size: 1.1rem; margin: 0; color: var(--nx-noche); }
.nx-hero { position: relative; border-radius: 24px; overflow: hidden; min-height: 210px; color: #fff; padding: 30px 32px; display: flex; align-items: flex-end;
  background: url('/img/fondo-cartagena.svg') center 58%/cover; box-shadow: var(--nx-sombra); }
.nx-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 61, 36, .9), rgba(11, 61, 36, .45) 55%, rgba(213, 43, 30, .15)); }
.nx-hero > * { position: relative; }
.nx-hero h2 { font-size: 2rem; margin: 0 0 6px; }
.nx-hero p { margin: 0; opacity: .9; max-width: 620px; }
.nx-kpi { border-radius: var(--nx-radio); padding: 18px 20px; color: #fff; position: relative; overflow: hidden; box-shadow: var(--nx-sombra); min-height: 118px; }
.nx-kpi i { position: absolute; right: 14px; top: 12px; font-size: 2.4rem; opacity: .28; }
.nx-kpi b { display: block; font-size: 2rem; font-family: 'Playfair Display', serif; line-height: 1.1; }
.nx-kpi span { font-size: .85rem; opacity: .92; }
.nx-kpi small { display: block; font-size: .75rem; opacity: .8; margin-top: 4px; }
.nx-kpi.k1 { background: linear-gradient(135deg, #00873E, #2BAA4A); }
.nx-kpi.k2 { background: linear-gradient(135deg, #1E9E6A, #6CC788); }
.nx-kpi.k3 { background: linear-gradient(135deg, #D52B1E, #FCD116); }
.nx-kpi.k4 { background: linear-gradient(135deg, #A6192E, #D52B1E); }
.nx-kpi.k5 { background: linear-gradient(135deg, #0B3D24, #12603A); }
.nx-tabla { width: 100%; border-collapse: separate; border-spacing: 0; }
.nx-tabla th { background: var(--nx-noche); color: #fff; font-weight: 600; font-size: .8rem; padding: 10px 12px; }
.nx-tabla th:first-child { border-top-left-radius: 12px; }
.nx-tabla th:last-child { border-top-right-radius: 12px; }
.nx-tabla td { padding: 10px 12px; border-bottom: 1px solid var(--nx-borde); font-size: .9rem; vertical-align: middle; }
.nx-tabla tr:hover td { background: #FFFCF6; }
.nx-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; color: #fff; margin: 1px 2px 1px 0; }
.nx-nivel { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; }
.nx-nivel::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.nx-alerta { border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; }
.nx-alerta.ok { background: #E7F7EF; color: #136C47; border: 1px solid #BFE8D2; }
.nx-alerta.err { background: #FDECEC; color: #9B1C1C; border: 1px solid #F5C2C2; }
.form-control, .form-select { border-radius: 12px; border-color: var(--nx-borde); }
.form-control:focus, .form-select:focus { border-color: var(--nx-turquesa); box-shadow: 0 0 0 .2rem rgba(43, 170, 74, .15); }
.form-label { font-weight: 600; font-size: .85rem; color: var(--nx-noche); }
.nx-paginador a, .nx-paginador span { display: inline-block; min-width: 36px; padding: 6px 10px; border-radius: 10px; text-align: center; margin: 0 2px; text-decoration: none; border: 1px solid var(--nx-borde); background: #fff; color: var(--nx-noche); }
.nx-paginador .actual { background: var(--nx-noche); color: #fff; border-color: var(--nx-noche); }

/* ============================================================
   MAPA
   ============================================================ */
.nx-mapa-pagina { padding: 0 !important; position: relative; }
#nxMapa { position: absolute; inset: 0; background: #AAD3DF; }
.nx-panel { position: absolute; z-index: 800; background: rgba(255, 248, 238, .95); backdrop-filter: blur(10px); border-radius: 20px; box-shadow: 0 14px 40px rgba(11, 61, 36, .22); border: 1px solid rgba(255, 255, 255, .7); }
.nx-panel-capas { top: 16px; left: 16px; width: 300px; max-height: calc(100% - 32px); overflow-y: auto; padding: 16px 16px 12px; }
.nx-panel h4 { font-family: 'Poppins', sans-serif; font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; color: var(--nx-mar); font-weight: 700; margin: 12px 0 8px; }
.nx-panel h4:first-child { margin-top: 0; }
.nx-base { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.nx-base button { border: 2px solid transparent; border-radius: 12px; padding: 0; overflow: hidden; background: #fff; font-size: .62rem; font-weight: 600; color: var(--nx-noche); }
.nx-base button div { height: 40px; background-size: cover; background-position: center; }
.nx-base button.activo { border-color: var(--nx-atardecer); }
.nx-capa { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px; font-size: .86rem; }
.nx-capa label { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; }
.nx-capa i { color: var(--nx-mar); }
.form-switch .form-check-input:checked { background-color: var(--nx-turquesa); border-color: var(--nx-turquesa); }
.nx-color-por { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.nx-color-por button { border: 1px solid var(--nx-borde); background: #fff; border-radius: 10px; font-size: .75rem; padding: 6px 4px; font-weight: 600; color: var(--nx-noche); }
.nx-color-por button.activo { background: var(--nx-noche); color: #fff; border-color: var(--nx-noche); }
.nx-herramientas { position: absolute; z-index: 800; top: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; padding: 8px; }
.nx-herramientas button { border: 0; border-radius: 14px; padding: 9px 14px; font-weight: 600; font-size: .86rem; background: #fff; color: var(--nx-noche); display: flex; align-items: center; gap: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, .06); }
.nx-herramientas button.activo { background: linear-gradient(135deg, var(--nx-atardecer), var(--nx-buganvilla)); color: #fff; }
.nx-herramientas button i { font-size: 1.05rem; }
.nx-buscar { position: absolute; z-index: 800; top: 16px; right: 16px; width: 290px; }
.nx-buscar input { width: 100%; border: 0; border-radius: 16px; padding: 12px 16px 12px 42px; box-shadow: 0 10px 30px rgba(11, 61, 36, .2); outline: none; }
.nx-buscar i { position: absolute; left: 15px; top: 12px; color: var(--nx-mar); }
.nx-resultados { background: #fff; border-radius: 14px; margin-top: 6px; box-shadow: 0 10px 30px rgba(11, 61, 36, .2); max-height: 300px; overflow-y: auto; }
.nx-resultados div { padding: 9px 14px; cursor: pointer; font-size: .86rem; border-bottom: 1px solid #f1ece3; }
.nx-resultados div:hover { background: var(--nx-crema); }
.nx-panel-info { top: 76px; right: 16px; width: 320px; padding: 0; overflow: hidden; display: none; }
.nx-info-cab { padding: 18px 18px 14px; color: #fff; position: relative; }
.nx-info-cab h3 { font-size: 1.35rem; margin: 2px 0 4px; }
.nx-info-cab .cerrar { position: absolute; right: 10px; top: 8px; border: 0; background: rgba(255, 255, 255, .2); color: #fff; border-radius: 50%; width: 30px; height: 30px; }
.nx-info-cuerpo { padding: 14px 18px 18px; }
.nx-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.nx-info-grid div { background: #fff; border: 1px solid var(--nx-borde); border-radius: 12px; padding: 8px 10px; }
.nx-info-grid b { display: block; font-size: 1.15rem; color: var(--nx-noche); }
.nx-info-grid span { font-size: .72rem; color: var(--nx-gris); }
.nx-barra-meta { height: 10px; border-radius: 999px; background: #EDE6DA; overflow: hidden; }
.nx-barra-meta i { display: block; height: 100%; background: linear-gradient(90deg, var(--nx-turquesa), var(--nx-oro)); }
.nx-leyenda { position: absolute; z-index: 800; bottom: 26px; right: 16px; padding: 12px 14px; min-width: 200px; font-size: .78rem; }
.nx-leyenda .fila { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.nx-leyenda .cuadro { width: 16px; height: 12px; border-radius: 4px; }
.nx-leyenda .rampa { height: 10px; border-radius: 6px; margin: 6px 0 2px; }
.nx-ucg-label { background: transparent; border: 0; }
.nx-ucg-label div { background: rgba(11, 61, 36, .86); color: #fff; font-weight: 700; font-size: 11px; border-radius: 999px; padding: 3px 9px; white-space: nowrap; border: 2px solid var(--nx-oro); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); transform: translate(-50%, -50%); display: inline-block; }
.nx-barrio-label { background: transparent; border: 0; }
.nx-barrio-label div { color: var(--nx-noche); font-weight: 600; font-size: 10px; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; white-space: nowrap; transform: translate(-50%, -50%); display: inline-block; pointer-events: none; }
.nx-pin { background: transparent; border: 0; }
.nx-pin div { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); display: grid; place-items: center; }
.nx-pin div i { transform: rotate(45deg); color: #fff; font-size: 13px; }
.nx-punto { background: transparent; border: 0; }
.nx-punto div { width: 34px; height: 34px; border-radius: 12px; border: 3px solid #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .35); display: grid; place-items: center; color: #fff; font-size: 16px; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background-color: rgba(166, 25, 46, .25) !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: linear-gradient(135deg, var(--nx-atardecer), var(--nx-buganvilla)) !important; color: #fff !important; font-weight: 700; }
.leaflet-popup-content-wrapper { border-radius: 16px; }
.leaflet-popup-content { margin: 14px 16px; font-family: 'Poppins', sans-serif; }
.nx-modo-aviso { position: absolute; z-index: 800; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--nx-noche); color: #fff; border-radius: 999px; padding: 10px 20px; font-size: .88rem; display: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.nx-cursor-agregar { cursor: crosshair !important; }
@media (max-width: 992px) {
  .nx-panel-capas { width: 260px; display: none; }
  .nx-panel-capas.abierto { display: block; }
  .nx-buscar { width: calc(100% - 32px); top: 70px; }
  .nx-herramientas { top: 12px; flex-wrap: wrap; justify-content: center; width: calc(100% - 24px); }
  .nx-herramientas button span { display: none; }
  .nx-panel-info { width: calc(100% - 32px); top: auto; bottom: 16px; }
}
@media (max-width: 992px) {
  .nx-leyenda { display: none; }
  .nx-tabla { font-size: .85rem; }
  .nx-hero { padding: 22px 20px; min-height: 170px; }
  .nx-hero h2 { font-size: 1.5rem; }
}

/* ============================================================
   RUEDA "ESTRUCTURA DE CAMPAÑA EN EL TERRITORIO" (tablero)
   ============================================================ */
.nx-rueda-sec { background: #fff; border-radius: 24px; box-shadow: var(--nx-sombra); border: 1px solid var(--nx-borde); padding: 24px 16px 14px; position: relative; overflow: hidden; }
.nx-rueda-sec::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--nx-atardecer) 0 33.3%, var(--nx-oro) 33.3% 66.6%, var(--nx-mar) 66.6% 100%); }
.nx-rueda { position: relative; width: min(100%, 640px, 74vh); margin: 0 auto; aspect-ratio: 1; user-select: none; -webkit-tap-highlight-color: transparent; }
.nx-rueda img, .nx-rueda canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.nx-rueda canvas { cursor: default; transition: filter .15s; }
.nx-rueda.sobre canvas { cursor: pointer; }
.nx-rueda-tip { position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 14px)); background: var(--nx-noche); color: #fff; font-size: .8rem; font-weight: 600; padding: 6px 12px; border-radius: 10px; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.25); z-index: 2; }
.nx-rueda-tip small { display: block; font-weight: 400; opacity: .8; }
.nx-rueda-ayuda { text-align: center; color: var(--nx-gris); font-size: .85rem; margin: 10px 0 0; }
.nx-rmodal { border: 0; border-radius: 22px; overflow: hidden; }
.nx-rmodal-cab { --c: var(--nx-noche); background: var(--c); color: #fff; padding: 20px 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.nx-rmodal-cab small { opacity: .8; font-size: .75rem; letter-spacing: 1px; text-transform: uppercase; }
.nx-rmodal-cab h3 { margin: 4px 0 0; font-size: 1.45rem; color: #fff; }
.nx-rlista { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.nx-rlista.uno { grid-template-columns: minmax(0, 300px); justify-content: center; }
.nx-rper { text-align: center; position: relative; }
.nx-rper-foto { aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, var(--nx-crema), var(--nx-arena)); border: 3px solid var(--c, var(--nx-borde)); display: grid; place-items: center; box-shadow: var(--nx-sombra); }
.nx-rper-foto img { width: 100%; height: 100%; object-fit: cover; }
.nx-rper-foto i { font-size: 4.5rem; color: var(--c, var(--nx-gris)); opacity: .35; }
.nx-rper h5 { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1rem; margin: 12px 0 2px; color: var(--nx-tinta); }
.nx-rlista.uno .nx-rper h5 { font-size: 1.2rem; }
.nx-rper p { margin: 0; font-size: .82rem; color: var(--nx-gris); }
.nx-rper-acc { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; }
.nx-rper-acc button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--nx-noche); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.nx-rper-acc button.borrar { color: var(--nx-atardecer); }
.nx-rform { background: var(--nx-crema); border: 1px dashed var(--nx-borde); border-radius: 18px; padding: 18px; }
.nx-rform-foto { display: grid; place-items: center; aspect-ratio: 4 / 5; border-radius: 16px; border: 2px dashed var(--nx-mar); background: #fff; cursor: pointer; overflow: hidden; text-align: center; color: var(--nx-mar); margin: 0; }
.nx-rform-foto img { width: 100%; height: 100%; object-fit: cover; }
.nx-rform-foto i { font-size: 2rem; display: block; }
.nx-rform-foto small { font-size: .72rem; color: var(--nx-gris); }

/* ---------- tarjetas de territorio ---------- */
.nx-terr { padding: 18px 20px 20px; }
.nx-terr-cab { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.nx-tabs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.nx-tabs button { border: 1px solid var(--nx-borde); background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .88rem; color: var(--nx-noche); }
.nx-tabs button span { display: inline-block; min-width: 26px; padding: 0 7px; margin-left: 4px; border-radius: 999px; background: var(--nx-arena); font-size: .75rem; }
.nx-tabs button.activo { background: var(--nx-noche); border-color: var(--nx-noche); color: #fff; }
.nx-tabs button.activo span { background: var(--nx-oro); color: var(--nx-noche); }
.nx-terr-filtros { display: flex; gap: 8px; flex-wrap: wrap; }
.nx-terr-filtros .input-group { width: 220px; }
.nx-terr-filtros select { width: 220px; }
.nx-tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.nx-tgrid.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.nx-tgrid.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.nx-tterr { --c: var(--nx-noche); background: #fff; border: 1px solid var(--nx-borde); border-top: 5px solid var(--c); border-radius: 16px; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; transition: transform .15s, box-shadow .15s; }
.nx-tterr:hover { transform: translateY(-2px); box-shadow: var(--nx-sombra); }
.nx-tterr-cab h4 { font-family: 'Poppins', sans-serif; font-size: .95rem; font-weight: 700; margin: 0; color: var(--nx-tinta); line-height: 1.25; }
.nx-tterr.grande .nx-tterr-cab h4 { font-size: 1.2rem; font-family: 'Playfair Display', serif; }
.nx-tterr-cab small { color: var(--nx-gris); font-size: .76rem; }
.nx-tterr-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 6px; }
.nx-tterr-cifras div { background: var(--nx-arena); border-radius: 10px; padding: 6px 8px; text-align: center; }
.nx-tterr-cifras b { display: block; font-size: 1rem; color: var(--nx-noche); }
.nx-tterr.grande .nx-tterr-cifras b { font-size: 1.35rem; }
.nx-tterr-cifras span { font-size: .68rem; color: var(--nx-gris); }
.nx-tterr-pie { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .78rem; color: var(--nx-gris); margin-top: auto; }
.nx-tterr-pie i { color: var(--c); }
.nx-tterr-pie a { font-weight: 600; white-space: nowrap; text-decoration: none; }
.nx-tpag { display: flex; gap: 4px; flex-wrap: wrap; }
.nx-tpag button { min-width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--nx-borde); background: #fff; font-weight: 600; color: var(--nx-noche); }
.nx-tpag button.act { background: var(--nx-noche); color: #fff; border-color: var(--nx-noche); }
.nx-tpag button:disabled { opacity: .4; }
@media (max-width: 576px) {
  .nx-terr-filtros, .nx-terr-filtros .input-group, .nx-terr-filtros select { width: 100%; }
  .nx-rueda-sec { padding: 18px 6px 10px; }
}

/* ---------- lema de la marca ---------- */
.nx-marca b.nx-lema { font-size: 1.9rem; line-height: 1.08; letter-spacing: 0; }
.nx-marca b.nx-lema span { display: block; color: var(--nx-oro); }
.nx-lateral .nx-marca b.nx-lema { font-size: 1.22rem; }
.nx-lateral .nx-marca { align-items: center; }
.nx-tterr-cifras span { font-size: .62rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-tterr-cifras div { padding: 6px 4px; }
.nx-tterr-pie { flex-wrap: wrap; }
.nx-tterr-pie > span { min-width: 0; max-width: 100%; }

/* ---------- 4 tarjetas resumen bajo la rueda ---------- */
.nx-tres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.nx-tres-card { --c: var(--nx-noche); position: relative; overflow: hidden; display: block; text-decoration: none; color: #fff; border-radius: var(--nx-radio); padding: 18px 20px; min-height: 128px; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, #000)); box-shadow: var(--nx-sombra); transition: transform .15s; }
a.nx-tres-card:hover { color: #fff; transform: translateY(-2px); }
.nx-tres-card i { position: absolute; right: 14px; top: 12px; font-size: 2.6rem; opacity: .25; }
.nx-tres-card b { display: block; font-family: 'Playfair Display', serif; font-size: 2.3rem; line-height: 1.05; }
.nx-tres-card span { font-weight: 600; font-size: .95rem; }
.nx-tres-card small { display: block; font-size: .76rem; opacity: .9; margin-top: 4px; }
.nx-tres-card[style*="#E8B400"] { color: #3a2c00; }
.nx-tres-card[style*="#E8B400"] i { opacity: .3; }
@media (max-width: 992px) { .nx-tres { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .nx-tres { grid-template-columns: 1fr; } }

/* ============================================================
   INGRESO · versión limpia con los colores de la bandera de Cartagena
   (rojo, amarillo y verde; estrella blanca de ocho puntas)
   ============================================================ */
.nx-login { background: radial-gradient(circle at 85% 15%, rgba(252, 209, 22, .18), transparent 40%), radial-gradient(circle at 10% 90%, rgba(0, 135, 62, .10), transparent 45%), #FFFDF6; }
.nx-login::before { display: none; }
.nx-login .nx-marca { color: var(--nx-noche); }
.nx-login .nx-marca b span { color: var(--nx-atardecer); }
.nx-login .nx-marca small { color: var(--nx-mar); opacity: 1; font-weight: 600; }
.nx-login h1 { color: var(--nx-noche); }
.nx-login h1 em { color: var(--nx-atardecer); }
.nx-login p.lead { color: #3F4B45; }
.nx-chip { background: #fff; border: 1px solid #EFE9D2; backdrop-filter: none; color: var(--nx-tinta); box-shadow: 0 6px 18px rgba(11, 61, 36, .07); border-left: 5px solid var(--c, var(--nx-mar)); }
.nx-chip:nth-child(1) { --c: #D52B1E; }
.nx-chip:nth-child(2) { --c: #E8B400; }
.nx-chip:nth-child(3) { --c: #00873E; }
.nx-chip:nth-child(4) { --c: #0B3D24; }
.nx-chip b { color: var(--c); }
.nx-chip:nth-child(2) b { color: #B88A00; }
.nx-chip span { color: var(--nx-gris); opacity: 1; }
/* bandera de Cartagena detrás de la tarjeta */
.nx-login-der { position: relative; padding: 36px; }
.nx-bandera { position: absolute; inset: 0; border-radius: 34px; background: #D52B1E; transform: rotate(-4deg); box-shadow: 0 30px 60px rgba(11, 61, 36, .18); }
.nx-bandera i { display: none; }
.nx-bandera::before { content: ""; position: absolute; inset: 9%; border-radius: 26px; background: #FCD116; }
.nx-bandera::after { content: ""; position: absolute; inset: 20%; border-radius: 18px; background: #00873E; }
.nx-bandera .estrella { position: absolute; z-index: 1; width: 22%; left: 39%; top: -6%; filter: drop-shadow(0 4px 8px rgba(0,0,0,.2)); }
.nx-tarjeta-login { background: #fff; backdrop-filter: none; border: 0; box-shadow: 0 24px 50px rgba(11, 61, 36, .22); }
.nx-tarjeta-login::before { background: linear-gradient(90deg, #D52B1E 0 33.3%, #FCD116 33.3% 66.6%, #00873E 66.6% 100%); }
.nx-tarjeta-login h2 { color: var(--nx-noche); }
.nx-campo input { background: #FBFAF4; border-color: #E9E4CF; }
.nx-campo input:focus { background: #fff; border-color: var(--nx-mar); box-shadow: 0 0 0 4px rgba(0, 135, 62, .12); }
.nx-campo i { color: var(--nx-mar); }
.nx-login .nx-btn { background: linear-gradient(135deg, #00873E, #0B6B35); box-shadow: 0 8px 18px rgba(0, 135, 62, .3); }
.nx-login .nx-btn:hover { box-shadow: 0 12px 24px rgba(0, 135, 62, .38); }
/* silueta de la ciudad abajo, suave */
.nx-login .nx-login-skyline { opacity: .14; bottom: 8px; height: 150px; }
.nx-login-tricolor { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: linear-gradient(90deg, #D52B1E 0 33.3%, #FCD116 33.3% 66.6%, #00873E 66.6% 100%); z-index: 3; }
.nx-login-pie { color: var(--nx-noche); bottom: 18px; opacity: .75; }
@media (max-width: 900px) { .nx-login-der { padding: 18px; } .nx-bandera .estrella { display: none; } }
/* bandera en capas: rojo, amarillo y verde visibles detrás de la tarjeta */
.nx-bandera { background: none; box-shadow: none; transform: none; inset: 36px; }
.nx-bandera::before, .nx-bandera::after, .nx-bandera i { content: ""; display: block; position: absolute; inset: 0; border-radius: 28px; }
.nx-bandera i.r { background: #D52B1E; transform: rotate(-10deg) translate(-6px, 4px); box-shadow: 0 20px 40px rgba(213, 43, 30, .25); }
.nx-bandera::before { background: #FCD116; transform: rotate(-6deg); z-index: 0; }
.nx-bandera::after { background: #00873E; transform: rotate(-2.5deg); }
.nx-bandera .estrella { width: 64px; left: auto; right: -14px; top: -26px; z-index: 2; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.nx-bandera .estrella path { fill: #FCD116; stroke: #fff; stroke-width: 4; }
.nx-tarjeta-login { z-index: 1; }
.nx-login-recordar { display: flex; flex-direction: column; gap: 4px; }
.nx-bandera { z-index: 0; }
.nx-bandera i.r { z-index: 0; }
.nx-bandera::before { z-index: 1; }
.nx-bandera::after { z-index: 2; }
.nx-bandera .estrella { z-index: 3; }

/* Tablero: rueda más pequeña para que la rueda y las 4 tarjetas quepan en la pantalla */
.nx-rueda-sec { padding: 16px 12px 8px; margin-bottom: 14px !important; }
.nx-rueda { width: clamp(280px, calc(100vh - 380px), 520px); max-width: 100%; }
.nx-rueda-ayuda { margin-top: 4px; font-size: .8rem; }
.nx-tres-card { min-height: 0; padding: 14px 18px; }
.nx-tres-card b { font-size: 2rem; }

/* Ingreso: colores invertidos y en capas propias (no la bandera oficial) */
.nx-bandera i.r { background: linear-gradient(135deg, #0B6B35, #00873E); transform: rotate(9deg) translate(8px, 6px); box-shadow: 0 20px 40px rgba(0, 135, 62, .25); }
.nx-bandera::before { background: linear-gradient(135deg, #FFE066, #FCD116); transform: rotate(5deg); }
.nx-bandera::after { background: linear-gradient(135deg, #E8453A, #C4231A); transform: rotate(2deg); }
.nx-tarjeta-login::before { background: linear-gradient(90deg, #00873E 0 33.3%, #FCD116 33.3% 66.6%, #D52B1E 66.6% 100%); }
.nx-login-tricolor { background: linear-gradient(90deg, #00873E 0 33.3%, #FCD116 33.3% 66.6%, #D52B1E 66.6% 100%); }
.nx-chip:nth-child(1) { --c: #00873E; }
.nx-chip:nth-child(3) { --c: #D52B1E; }
.nx-login .nx-marca b span { color: #00873E; }
.nx-login h1 em { color: #00873E; }

/* Rueda · desde la 3.ª rueda: coordinadores en cuadros con su nombre (sin foto) */
.nx-rnombres { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.nx-rnom { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(135deg, #fff, color-mix(in srgb, var(--c) 7%, #fff)); border: 1px solid color-mix(in srgb, var(--c) 25%, #fff); border-left: 6px solid var(--c); box-shadow: 0 8px 22px color-mix(in srgb, var(--c) 14%, transparent); transition: transform .15s, box-shadow .15s; }
.nx-rnom:hover { transform: translateY(-2px); box-shadow: 0 12px 28px color-mix(in srgb, var(--c) 22%, transparent); }
.nx-rnom .ini { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: .5px; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 62%, #000)); box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 35%, transparent); }
.nx-rnom .txt { flex: 1; min-width: 0; padding-right: 26px; }
.nx-rnom .txt b { display: block; font-size: 1rem; color: var(--nx-tinta); line-height: 1.25; }
.nx-rnom .txt small { display: block; color: var(--nx-gris); font-size: .8rem; margin-top: 3px; }
.nx-rnom .num { position: absolute; right: 14px; bottom: 10px; font-family: 'Playfair Display', serif; font-weight: 800; font-size: 1.5rem; color: var(--c); opacity: .18; }
.nx-rnom .nx-rper-acc { top: 8px; right: 8px; }
.nx-rnom:not(:hover) .nx-rper-acc { opacity: .0; }
.nx-rnom .nx-rper-acc { transition: opacity .15s; }
@media (hover: none) { .nx-rnom .nx-rper-acc { opacity: 1 !important; } }

/* Centro de vida en la ficha del barrio (mapa) */
.nx-cvida { display: flex; gap: 10px; align-items: flex-start; background: #FFF8DB; border: 1px solid #F3E2A0; border-left: 4px solid #E8B400; border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
.nx-cvida i { color: #B88A00; font-size: 1.2rem; margin-top: 1px; }
.nx-cvida b { display: block; font-size: .85rem; color: var(--nx-tinta); }
.nx-cvida small { display: block; font-size: .76rem; color: var(--nx-gris); line-height: 1.35; }

/* Rueda · apartados con grupos (localidades / UCG): tarjetas para elegir el grupo */
.nx-rgrupos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.nx-rgrupos.muchos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.nx-rgrupo { --g: var(--nx-mar); position: relative; text-align: left; border: 0; border-radius: 18px; padding: 18px 18px 16px; color: #fff; min-height: 128px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; overflow: hidden;
  background: linear-gradient(145deg, var(--g), color-mix(in srgb, var(--g) 60%, #000)); box-shadow: 0 10px 24px color-mix(in srgb, var(--g) 30%, transparent); transition: transform .15s, box-shadow .15s; }
.nx-rgrupo::before { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.14); }
.nx-rgrupo:hover { transform: translateY(-3px); box-shadow: 0 16px 30px color-mix(in srgb, var(--g) 40%, transparent); }
.nx-rgrupo .loc { font-size: .7rem; letter-spacing: 1.5px; text-transform: uppercase; opacity: .85; }
.nx-rgrupo b { font-family: 'Playfair Display', serif; font-size: 1.15rem; line-height: 1.2; }
.nx-rgrupo small { font-size: .8rem; opacity: .9; }
.nx-rgrupo i { position: absolute; right: 14px; top: 14px; font-size: 1.4rem; opacity: .9; }
.nx-rgrupos.muchos .nx-rgrupo { min-height: 96px; padding: 14px; }
.nx-rgrupos.muchos .nx-rgrupo b { font-size: 1.25rem; }
.nx-rgrupo[style*="#E8B400"] { color: #3a2c00; }
.nx-rvolver { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.nx-rvolver button { border: 1px solid var(--nx-borde); background: #fff; border-radius: 999px; padding: 5px 14px; font-weight: 600; font-size: .85rem; color: var(--nx-noche); }
.nx-rvolver b { font-family: 'Playfair Display', serif; font-size: 1.1rem; }
@media (max-width: 640px) { .nx-rgrupos { grid-template-columns: 1fr; } .nx-rgrupos.muchos { grid-template-columns: repeat(2, 1fr); } }

/* 4 tarjetas resumen con foto real de fondo + velo del color de la tarjeta */
.nx-tres-card { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 55%, transparent) 0%, color-mix(in srgb, var(--c) 88%, #000) 78%), var(--img, none) var(--pos, center)/cover no-repeat, var(--c); min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.nx-tres-card[style*="#E8B400"] { color: #fff; background: linear-gradient(160deg, rgba(232,180,0,.45) 0%, rgba(150,110,0,.92) 78%), var(--img) var(--pos, center)/cover no-repeat, #E8B400; }
.nx-tres-card i { opacity: .55; color: #fff; }
.nx-tres-card .cred { position: absolute; right: 10px; bottom: 6px; font-size: .58rem; opacity: .7; text-shadow: none; }
.nx-tres-card small { padding-right: 70px; }
.nx-tres-card { background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, color-mix(in srgb, var(--c) 35%, transparent) 35%, color-mix(in srgb, var(--c) 92%, #000) 100%), var(--img, none) var(--pos, center)/cover no-repeat, var(--c); min-height: 170px; }
.nx-tres-card[style*="#E8B400"] { background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(232,180,0,.35) 35%, rgba(140,100,0,.95) 100%), var(--img) var(--pos, center)/cover no-repeat, #E8B400; }
.nx-tres-card .cred { left: 12px; top: 8px; right: auto; bottom: auto; font-size: .56rem; opacity: .85; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.nx-tres-card small { padding-right: 0; }
.nx-tres-card i { opacity: .8; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.nx-rgrupo.vacio { filter: saturate(.35); opacity: .6; }
.nx-rgrupo.vacio:hover { filter: none; opacity: 1; }
.nx-rgrupo[style*="#E8B400"] { color: #fff; background: linear-gradient(145deg, #E8B400, #9A7300); }

/* Menú: solo el logo arriba (el lema pasa a marca de agua detrás de la rueda) */
.nx-lateral .nx-marca-solo { justify-content: center; padding: 20px 0 16px; }
.nx-lateral .nx-marca-solo .nx-marca-logo { width: 58px; height: 58px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.3)); }

/* Marca de agua detrás de la rueda */
.nx-rueda-sec > .nx-rueda, .nx-rueda-sec > .nx-rueda-ayuda { position: relative; z-index: 1; }
.nx-rueda-marca { position: absolute; inset: 0; z-index: 0; pointer-events: none; user-select: none; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0; overflow: hidden; }
.nx-rueda-marca span { font-family: 'Playfair Display', serif; font-weight: 800; font-size: clamp(2.6rem, 7.2vw, 7.5rem); line-height: .95; letter-spacing: -1px; white-space: nowrap;
  background: linear-gradient(90deg, #00873E 0%, #FCD116 50%, #D52B1E 100%); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .13; }
.nx-rueda-marca span:last-child { font-style: italic; transform: translateX(6%); }
.nx-rueda-marca span:first-child { transform: translateX(-6%); }
@media (max-width: 640px) { .nx-rueda-marca span { font-size: 2.2rem; opacity: .12; } }
/* marca de agua v2: el lema a los dos lados de la rueda */
.nx-rueda img, .nx-rueda canvas { border-radius: 50%; }
.nx-rueda-marca { flex-direction: row; justify-content: space-between; align-items: center; padding: 0 3%; }
.nx-rueda-marca .izq, .nx-rueda-marca .der { display: flex; flex-direction: column; width: calc(50% - min(26vh, 260px)); }
.nx-rueda-marca .izq { align-items: flex-end; text-align: right; }
.nx-rueda-marca .der { align-items: flex-start; text-align: left; }
.nx-rueda-marca span, .nx-rueda-marca span:first-child, .nx-rueda-marca span:last-child { transform: none; font-style: normal; font-size: clamp(1.8rem, 3.6vw, 4.4rem); line-height: 1; opacity: .2; letter-spacing: 0; }
.nx-rueda-marca .izq span { background: linear-gradient(90deg, #00873E, #2BAA4A); -webkit-background-clip: text; background-clip: text; }
.nx-rueda-marca .der span { background: linear-gradient(90deg, #E8B400, #D52B1E); -webkit-background-clip: text; background-clip: text; font-style: italic; }
.nx-rueda-marca .izq span:last-child, .nx-rueda-marca .der span:last-child { font-size: clamp(2.2rem, 4.6vw, 5.6rem); }
@media (max-width: 900px) {
  .nx-rueda-marca { flex-direction: column; justify-content: space-between; padding: 6px 0; }
  .nx-rueda-marca .izq, .nx-rueda-marca .der { width: auto; flex-direction: row; gap: 8px; align-items: baseline; }
  .nx-rueda-marca span, .nx-rueda-marca .izq span:last-child, .nx-rueda-marca .der span:last-child { font-size: 1.6rem; }
}
.nx-rueda-marca { padding: 0 2.5%; }
.nx-rueda-marca .izq, .nx-rueda-marca .der { width: calc(50% - clamp(140px, calc(50vh - 190px), 260px) - 28px); overflow: hidden; }
.nx-rueda-marca span, .nx-rueda-marca span:first-child { font-size: clamp(1.4rem, 2.4vw, 3rem); }
.nx-rueda-marca .izq span:last-child, .nx-rueda-marca .der span:last-child { font-size: clamp(1.6rem, 3.1vw, 3.8rem); }
/* marca de agua v3: todo el lema a la derecha de la rueda, un poco más visible */
.nx-rueda-marca.solo-der { justify-content: flex-end; }
.nx-rueda-marca.solo-der .der { align-items: flex-start; text-align: left; }
.nx-rueda-marca.solo-der span { opacity: .34; background-clip: text; -webkit-background-clip: text; font-style: normal; }
.nx-rueda-marca.solo-der .a { font-size: clamp(1.2rem, 2vw, 2.4rem) !important; background-image: linear-gradient(90deg, #0B6B35, #00873E); }
.nx-rueda-marca.solo-der .b { font-size: clamp(1.8rem, 3.4vw, 4.2rem) !important; background-image: linear-gradient(90deg, #00873E, #2BAA4A); }
.nx-rueda-marca.solo-der .c { font-size: clamp(1.3rem, 2.3vw, 2.8rem) !important; font-style: italic; background-image: linear-gradient(90deg, #E8B400, #D52B1E); }
@media (max-width: 900px) {
  .nx-rueda-marca.solo-der { justify-content: flex-end; flex-direction: column; }
  .nx-rueda-marca.solo-der .der { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px; width: 100%; }
  .nx-rueda-marca.solo-der span { font-size: 1.3rem !important; }
}
/* marca de agua v4: esquina superior derecha, más visible */
.nx-rueda-marca.solo-der { align-items: flex-start; justify-content: flex-end; padding: 22px 26px 0 0; }
.nx-rueda-marca.solo-der .der { width: auto; align-items: flex-end; text-align: right; overflow: visible; }
.nx-rueda-marca.solo-der span { opacity: .5; }
@media (max-width: 900px) {
  .nx-rueda-marca.solo-der { padding: 10px 12px 0 0; }
  .nx-rueda-marca.solo-der .der { flex-direction: column; align-items: flex-end; gap: 0; width: auto; }
  .nx-rueda-marca.solo-der span { font-size: 1.05rem !important; opacity: .45; }
}

/* ============================================================
   INGRESO · ciudad en color + cinta ondulada animada (verde, amarillo, rojo)
   ============================================================ */
.nx-login-ciudad { position: absolute; left: 0; right: 0; bottom: 0; height: 210px; pointer-events: none; z-index: 1; }
.nx-login-skyline-color { position: absolute; left: 0; right: 0; bottom: 58px; width: 100%; height: 150px; filter: drop-shadow(0 -2px 10px rgba(11,61,36,.12)); }
.nx-cinta { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; overflow: hidden; }
.nx-cinta .ola { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; }
.nx-cinta .o1 { animation: nxOlaX 18s linear infinite, nxOlaY 5s ease-in-out infinite; }
.nx-cinta .o2 { animation: nxOlaX 13s linear infinite reverse, nxOlaY 4s ease-in-out -1.3s infinite; }
.nx-cinta .o3 { animation: nxOlaX 9s linear infinite, nxOlaY 3.4s ease-in-out -2.1s infinite; }
@keyframes nxOlaX { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes nxOlaY { 0%, 100% { bottom: -6px; } 50% { bottom: 6px; } }
@media (prefers-reduced-motion: reduce) { .nx-cinta .ola { animation: none; } }
.nx-login .nx-login-skyline { display: none; }
.nx-login-tricolor { display: none; }
.nx-login-pie { z-index: 3; bottom: 10px; color: #fff; opacity: .95; font-weight: 500; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.nx-login-inner { padding-bottom: 230px; }
@media (max-width: 900px) { .nx-login-skyline-color { height: 110px; } .nx-login-ciudad { height: 170px; } }
.nx-login-skyline-color { bottom: 70px; }
.nx-login-pie { bottom: 6px; font-size: .74rem; }

/* INGRESO · todo en una sola pantalla (sin desplazarse) en portátiles */
@media (min-width: 901px) {
  .nx-login { height: 100vh; height: 100dvh; min-height: 560px; overflow: hidden; }
  .nx-login-ciudad { height: clamp(120px, 24vh, 210px); }
  .nx-login-skyline-color { height: clamp(80px, 16vh, 150px); bottom: clamp(44px, 9vh, 70px); }
  .nx-cinta { height: clamp(60px, 11vh, 96px); }
  .nx-login-inner { align-self: center; padding: 2vh 24px clamp(120px, 24vh, 210px); gap: 40px; }
  .nx-login .nx-marca-logo { width: clamp(40px, 6vh, 64px); height: clamp(40px, 6vh, 64px); }
  .nx-login .nx-marca b.nx-lema { font-size: clamp(1.3rem, 3.4vh, 1.9rem); }
  .nx-login h1 { font-size: clamp(1.9rem, 6.4vh, 3.6rem); margin: clamp(10px, 2.6vh, 28px) 0 clamp(8px, 1.6vh, 16px); }
  .nx-login p.lead { font-size: clamp(.9rem, 2vh, 1.08rem); margin-bottom: 0; }
  .nx-chips { margin-top: clamp(12px, 2.6vh, 26px); }
  .nx-chip { padding: clamp(6px, 1.2vh, 10px) 14px; }
  .nx-chip b { font-size: clamp(1.05rem, 2.6vh, 1.35rem); }
  .nx-tarjeta-login { padding: clamp(18px, 3.6vh, 34px) 32px; }
  .nx-tarjeta-login h2 { font-size: clamp(1.4rem, 3.4vh, 1.8rem); }
  .nx-tarjeta-login .sub { margin-bottom: clamp(10px, 2.4vh, 22px); }
  .nx-campo { margin-bottom: clamp(8px, 1.8vh, 16px); }
  .nx-campo input { padding-top: clamp(10px, 1.7vh, 14px); padding-bottom: clamp(10px, 1.7vh, 14px); }
  .nx-login .nx-btn { padding: clamp(.6rem, 1.6vh, .85rem); }
  .nx-login-der { padding: clamp(18px, 4vh, 36px); }
  .nx-bandera { inset: clamp(18px, 4vh, 36px); }
}

/* Mapa: la leyenda de "Colorear barrios por" va a la izquierda, junto al panel de Mapa base,
   para que no quede debajo de la ficha del barrio (que abre a la derecha). */
.nx-leyenda { right: auto; left: 332px; bottom: 26px; max-height: calc(100% - 52px); overflow-y: auto; }

/* Fotos de obras */
.nx-foto-mini { position: relative; width: 96px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--nx-borde); }
.nx-foto-mini img { width: 100%; height: 100%; object-fit: cover; }
.nx-foto-mini button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; display: grid; place-items: center; }
.nx-obra-portada { height: 150px; margin: -1px -1px 0; border-radius: 18px 18px 0 0; background-size: cover; background-position: center; position: relative; }
.nx-obra-portada span { position: absolute; right: 10px; bottom: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: .72rem; padding: 2px 8px; border-radius: 999px; }
.nx-pop-fotos { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 6px 0; max-width: 280px; }
.nx-pop-fotos a { flex: 0 0 auto; scroll-snap-align: start; }
.nx-pop-fotos img { height: 120px; width: auto; max-width: 240px; border-radius: 10px; object-fit: cover; display: block; }
.nx-pop-cred { font-size: .65rem; color: var(--nx-gris); }

/* Lista desplegable de obras y gestiones (panel de capas del mapa) */
.nx-obras-toggle { display: inline-flex; align-items: center; gap: 4px; border: 0; background: rgba(11, 61, 36, .08); color: var(--nx-mar); border-radius: 999px; padding: 2px 9px; font-size: .78rem; font-weight: 700; cursor: pointer; }
.nx-obras-toggle i { transition: transform .2s; }
.nx-obras-toggle.abierto i { transform: rotate(180deg); }
.nx-obras-lista { margin: 2px 0 8px 4px; max-height: 320px; overflow-y: auto; border-left: 2px solid rgba(230, 126, 34, .35); padding-left: 8px; }
.nx-obras-lista details { margin-bottom: 4px; }
.nx-obras-lista summary { display: flex; align-items: center; gap: 7px; cursor: pointer; list-style: none; font-size: .82rem; font-weight: 700; color: #0B3D24; padding: 5px 4px; border-radius: 8px; }
.nx-obras-lista summary::-webkit-details-marker { display: none; }
.nx-obras-lista summary::after { content: "\203A"; margin-left: 2px; font-size: 1rem; transition: transform .2s; }
.nx-obras-lista details[open] > summary::after { transform: rotate(90deg); }
.nx-obras-lista summary span { flex: 1; }
.nx-obras-lista summary b { background: #0B3D24; color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 7px; }
.nx-obras-lista summary:hover { background: rgba(11, 61, 36, .06); }
.nx-obra-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 5px 6px 5px 24px; border-radius: 8px; cursor: pointer; }
.nx-obra-item .t { display: block; font-size: .8rem; color: #1f2d25; line-height: 1.25; }
.nx-obra-item .e { display: block; font-size: .7rem; color: #6b7a70; }
.nx-obra-item:hover, .nx-obra-item.activa { background: rgba(252, 209, 22, .25); }

/* Sectores del barrio en la ficha del mapa */
.nx-sectores { margin-bottom: 8px; font-size: .8rem; }
.nx-sectores summary { cursor: pointer; font-weight: 600; color: var(--nx-noche); }
.nx-sectores div { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; max-height: 120px; overflow-y: auto; }
.nx-sectores span { background: #EEF6F0; border: 1px solid #D5E9D9; border-radius: 999px; padding: 2px 8px; font-size: .72rem; }

/* Mapa · "Es líder o referente" destacado arriba del formulario */
.nx-lider-switch { background: #FFF8DB; border: 1px solid #F3E2A0; border-radius: 12px; padding: 10px 12px 10px 3rem; }
.nx-lider-switch .form-check-input { width: 2.4em; height: 1.3em; margin-left: -2.6rem; cursor: pointer; }
.nx-lider-switch .form-check-input:checked { background-color: #E8B400; border-color: #E8B400; }
.nx-lider-switch label { font-weight: 600; color: var(--nx-noche); cursor: pointer; }
.nx-lider-switch label i { color: #E8B400; }
.nx-ucg-todo .t { color: var(--nx-mar) !important; font-weight: 600; }

/* Barrios: sectores debajo de cada barrio */
.nx-tabla tr.nx-fila-con-sectores td { border-bottom-color: transparent; }
.nx-tabla tr.nx-fila-sector td { background: #FBFAF4; padding-top: 6px; padding-bottom: 6px; font-size: .85rem; }
.nx-sector-nombre { padding-left: 14px; font-weight: 600; color: var(--nx-mar); }
.nx-sector-nombre i { color: #B88A00; margin-right: 4px; }

/* Búsqueda inteligente: tarjeta flotante de sugerencias */
.nx-sugerencias { position: absolute; z-index: 2000; max-width: 92vw; background: #fff; border: 1px solid var(--nx-borde); border-radius: 16px; box-shadow: 0 18px 40px rgba(11, 61, 36, .22); overflow: hidden; }
.nx-sugerencias .cab { padding: 10px 14px; font-size: .82rem; font-weight: 700; color: var(--nx-noche); background: #FFF8DB; border-bottom: 1px solid #F3E2A0; }
.nx-sugerencias .cab i { color: #E8B400; margin-right: 4px; }
.nx-sugerencias .it { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: #fff; padding: 9px 14px; border-bottom: 1px solid #F2EFE4; cursor: pointer; }
.nx-sugerencias .it i { color: var(--nx-mar); font-size: 1.05rem; }
.nx-sugerencias .it b { display: block; font-size: .88rem; color: var(--nx-tinta); }
.nx-sugerencias .it small { display: block; font-size: .74rem; color: var(--nx-gris); }
.nx-sugerencias .it:hover, .nx-sugerencias .it.activo { background: #EEF6F0; }
.nx-sugerencias .vacio { padding: 12px 14px; font-size: .82rem; color: var(--nx-gris); }
.nx-sugerencias .pie { padding: 7px 14px; font-size: .7rem; color: var(--nx-gris); background: #FBFAF4; }
.nx-aviso-parecidos { background: #FFF8DB; border: 1px solid #F3E2A0; border-left: 5px solid #E8B400; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: .9rem; color: var(--nx-noche); }
.nx-aviso-parecidos i { color: #E8B400; margin-right: 6px; }

/* Campo de barrio con búsqueda escrita (formulario de amigo) */
.nx-combo { position: relative; }
.nx-combo > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--nx-mar); pointer-events: none; }
.nx-combo > input { padding-left: 36px; }
.nx-combo-lista { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1060; background: #fff; border: 1px solid var(--nx-borde); border-radius: 14px; box-shadow: 0 16px 36px rgba(11, 61, 36, .2); overflow: hidden; max-height: 320px; overflow-y: auto; }
.nx-combo-lista .cab { padding: 8px 12px; font-size: .8rem; font-weight: 700; background: #FFF8DB; border-bottom: 1px solid #F3E2A0; color: var(--nx-noche); }
.nx-combo-lista .cab i { color: #E8B400; margin-right: 4px; }
.nx-combo-lista .it { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: #fff; padding: 8px 12px; border-bottom: 1px solid #F2EFE4; }
.nx-combo-lista .it i { color: var(--nx-mar); }
.nx-combo-lista .it b { display: block; font-size: .86rem; color: var(--nx-tinta); }
.nx-combo-lista .it small { display: block; font-size: .72rem; color: var(--nx-gris); }
.nx-combo-lista .it:hover, .nx-combo-lista .it.activo { background: #EEF6F0; }
.nx-combo-lista .vacio { padding: 10px 12px; font-size: .8rem; color: var(--nx-gris); }
.nx-agregar-barrio summary { cursor: pointer; font-weight: 700; color: var(--nx-noche); }
.nx-agregar-barrio summary i { color: var(--nx-mar); margin-right: 4px; }
.nx-no-oficial { display: inline-block; margin-left: 6px; font-size: .66rem; font-weight: 700; text-transform: uppercase; background: #FFF1C2; color: #8A6A00; border-radius: 999px; padding: 1px 7px; vertical-align: middle; }
.nx-quitar-sector button { border: 0; background: transparent; color: #B8B8B8; padding: 0 4px; }
.nx-quitar-sector button:hover { color: var(--nx-atardecer); }

/* ===== Correo: olvidé / crear contraseña ===== */
.nx-login-inner.nx-login-solo { grid-template-columns: minmax(0, 470px); justify-content: center; }
.nx-marca-tarjeta { margin-bottom: 18px; color: var(--nx-noche); }
.nx-login .nx-marca-tarjeta b.nx-lema { color: var(--nx-noche); font-size: 1.15rem; }
.nx-login .nx-marca-tarjeta b.nx-lema span { color: #00873E; }
.nx-icono-ok { width: 74px; height: 74px; margin: 4px auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; background: #e6f5ec; color: #00873E; }
.nx-enlace-login { color: #00873E; font-weight: 600; text-decoration: none; }
.nx-enlace-login:hover { text-decoration: underline; }
.nx-reglas { list-style: none; padding: 0; margin: -4px 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; color: var(--nx-gris); }
.nx-reglas li::before { content: "\F28A"; font-family: bootstrap-icons; margin-right: 6px; color: #c3cec7; }
.nx-reglas li.ok { color: #00873E; }
.nx-reglas li.ok::before { content: "\F26A"; color: #00873E; }
.nx-tarjeta-login .text-center { text-align: center; }
.nx-tarjeta-login .mt-3 { margin-top: 1rem; }
.nx-tarjeta-login .small { font-size: .875rem; }
.nx-tarjeta-login .me-1 { margin-right: .25rem; }
.nx-tarjeta-login a.btn.nx-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* ===== Pantallas de portátil (≈1280–1500 px o poca altura): todo un poco más compacto ===== */
.nx-tterr-cifras b, .nx-kpi b, .nx-tres-card b { font-variant-numeric: tabular-nums; }
.nx-tterr.grande .nx-tterr-cifras { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1.15fr); }
.nx-tterr.grande .nx-tterr-cifras b { font-size: clamp(1rem, 1.15vw, 1.35rem); white-space: nowrap; }
.nx-kpi b { font-size: clamp(1.4rem, 1.75vw, 2rem); position: relative; z-index: 1; white-space: nowrap; }
.nx-kpi i { font-size: clamp(1.7rem, 2vw, 2.4rem); }
.nx-tres-card b { font-size: clamp(1.5rem, 2vw, 2.1rem); }
@media (min-width: 992px) and (max-width: 1500px), (min-width: 992px) and (max-height: 820px) {
  html { font-size: 15px; }
  .nx-lateral { width: 228px; flex-basis: 228px; }
  .nx-app.menu-oculto .nx-lateral { margin-left: -228px; }
  .nx-lateral .nx-marca-solo { padding: 14px 0 12px; }
  .nx-lateral .nx-marca-solo .nx-marca-logo { width: 46px; height: 46px; }
  .nx-nav { padding: 10px 10px; }
  .nx-nav .grupo { padding: 10px 10px 4px; font-size: .64rem; }
  .nx-nav a { padding: 8px 12px; gap: 10px; font-size: .9rem; margin-bottom: 2px; border-radius: 10px; }
  .nx-nav a i { font-size: 1rem; width: 20px; }
  .nx-barra { height: 56px; padding: 0 20px; }
  .nx-barra h1 { font-size: 1.2rem; }
  .nx-avatar { width: 34px; height: 34px; }
  .nx-pagina { padding: 18px 20px; }
  .nx-kpi { padding: 14px 16px; min-height: 104px; }
  .nx-kpi span { font-size: .8rem; }
  .nx-tterr { padding: 12px 14px 10px; gap: 8px; }
  .nx-tterr.grande .nx-tterr-cab h4 { font-size: 1.08rem; }
  .nx-hero h2 { font-size: 1.7rem; }
}
.nx-kpi { height: 100%; }

/* ===== Capa: subsidios de mejoramiento ===== */
.nx-sub-icono { background: none; border: 0; }
.nx-sub-icono > div { width: var(--t); height: var(--t); border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 0; background: radial-gradient(circle at 30% 28%, #42A5F5, #1565C0 62%, #0D3C7A); color: #fff; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(13, 60, 122, .45); transition: transform .15s; }
.nx-sub-icono > div i { font-size: calc(var(--t) * .34); line-height: 1; }
.nx-sub-icono > div b { font-size: calc(var(--t) * .24); line-height: 1.05; font-weight: 800; font-family: 'Poppins', sans-serif; }
.nx-sub-icono:hover > div { transform: scale(1.12); }
.nx-sub-popup .leaflet-popup-content-wrapper { border-radius: 18px; padding: 0; overflow: hidden; }
.nx-sub-popup .leaflet-popup-content { margin: 0; width: 320px !important; }
.nx-sub-pop { font-family: 'Poppins', sans-serif; }
.nx-sub-cab { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: linear-gradient(135deg, #0D3C7A, #1565C0); color: #fff; }
.nx-sub-cab > i { font-size: 1.6rem; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); color: #FCD116; flex-shrink: 0; }
.nx-sub-cab small { font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; opacity: .85; }
.nx-sub-cab h5 { margin: 0; font-family: 'Playfair Display', serif; font-size: 1.15rem; line-height: 1.2; }
.nx-sub-oficial { padding: 6px 16px 0; font-size: .74rem; color: #5d6f64; }
.nx-sub-cifras { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 6px; padding: 12px 16px 6px; }
.nx-sub-cifras div { background: #EEF4FB; border-radius: 12px; padding: 7px 6px; text-align: center; }
.nx-sub-cifras div.g { background: #1565C0; color: #fff; }
.nx-sub-cifras b { display: block; font-size: 1.05rem; line-height: 1.1; color: #0D3C7A; }
.nx-sub-cifras div.g b { color: #fff; font-size: 1.3rem; }
.nx-sub-cifras span { font-size: .64rem; color: #5d6f80; line-height: 1.15; display: block; }
.nx-sub-cifras div.g span { color: rgba(255, 255, 255, .85); }
.nx-sub-barra { margin: 4px 16px 8px; height: 6px; border-radius: 999px; background: #E3ECF7; overflow: hidden; }
.nx-sub-barra i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #42A5F5, #1565C0); }
.nx-sub-tabla { width: calc(100% - 32px); margin: 0 16px 8px; font-size: .78rem; border-collapse: collapse; }
.nx-sub-tabla th { color: #6b7c88; font-weight: 600; padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap; width: 1%; }
.nx-sub-tabla td { padding: 4px 0; color: #1f2d35; border-bottom: 1px dashed #e3e8ee; }
.nx-sub-nota, .nx-sub-prog { margin: 0 16px 8px; font-size: .76rem; padding: 7px 10px; border-radius: 10px; background: #FFF8DB; color: #6b5300; }
.nx-sub-prog { background: #E8F6EE; color: #0B5A2E; }
.nx-sub-fuente { padding: 6px 16px 12px; font-size: .66rem; color: #94a3b8; }
.nx-sub-lista { border-left-color: rgba(21, 101, 192, .35); max-height: 380px; }
.nx-sub-resumen { font-size: .76rem; color: #5d6f80; padding: 2px 2px 6px; }
.nx-sub-resumen b { color: #1565C0; font-size: .9rem; }
.nx-sub-item { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; width: 100%; border: 0; background: transparent; text-align: left; padding: 5px 6px; border-radius: 9px; cursor: pointer; }
.nx-sub-item:hover, .nx-sub-item.activa { background: #EEF4FB; }
.nx-sub-item .t { font-size: .8rem; font-weight: 600; color: #1f2d35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-sub-item .n { font-size: .78rem; font-weight: 800; color: #1565C0; }
.nx-sub-item .bar { grid-column: 1 / 3; height: 4px; border-radius: 999px; background: #E3ECF7; margin-top: 3px; overflow: hidden; }
.nx-sub-item .bar i { display: block; height: 100%; background: #1565C0; border-radius: 999px; }
.nx-sub-item .e { grid-column: 1 / 3; font-size: .68rem; color: #8a99a6; }
.nx-sub-item.sin { cursor: default; opacity: .65; }
.nx-sub-item.prog { background: #E8F6EE; margin-bottom: 4px; }
.nx-sub-item.prog .t i, .nx-sub-item.prog .n { color: #00873E; }
.nx-sub-popup .leaflet-popup-content { max-height: min(70vh, 560px); overflow-y: auto; }

/* ===== Mapa: barra de herramientas sin montarse sobre el panel + panel de capas plegable ===== */
.nx-capas-ocultar { position: sticky; top: 0; float: right; margin: -6px -6px 0 0; width: 32px; height: 32px; border-radius: 10px; border: 0; background: rgba(11, 61, 36, .08); color: var(--nx-noche); display: grid; place-items: center; z-index: 2; cursor: pointer; }
.nx-capas-ocultar:hover { background: var(--nx-noche); color: #fff; }
.nx-capas-pestana { display: none; position: absolute; z-index: 801; top: 16px; left: 16px; align-items: center; gap: 8px; border: 0; border-radius: 16px; padding: 11px 14px; font-weight: 700; font-size: .88rem; color: #fff; background: linear-gradient(135deg, #0B3D24, #00873E); box-shadow: 0 10px 26px rgba(11, 61, 36, .35); cursor: pointer; }
.nx-capas-pestana i:first-child { color: #FCD116; font-size: 1.05rem; }
.nx-capas-pestana:hover { filter: brightness(1.1); }
@media (min-width: 993px) {
  /* La barra ocupa solo el espacio libre entre el panel de capas (izq.) y el buscador (der.) */
  .nx-herramientas { left: 332px; right: 322px; transform: none; margin: 0 auto; width: fit-content; max-width: calc(100% - 654px); flex-wrap: wrap; justify-content: center; }
  .nx-mapa-pagina.capas-ocultas .nx-herramientas { left: 140px; max-width: calc(100% - 462px); }
  .nx-mapa-pagina.capas-ocultas .nx-panel-capas { display: none; }
  .nx-mapa-pagina.capas-ocultas .nx-capas-pestana { display: inline-flex; }
  .nx-mapa-pagina.capas-ocultas .nx-leyenda { left: 16px; }
}
/* Con el panel abierto y pantalla mediana, la barra muestra solo íconos (el nombre sale al pasar el mouse) */
@media (min-width: 993px) and (max-width: 1500px) {
  .nx-mapa-pagina:not(.capas-ocultas) .nx-herramientas button span { display: none; }
  .nx-mapa-pagina:not(.capas-ocultas) .nx-herramientas button { padding: 10px 12px; }
}
@media (max-width: 992px) { .nx-capas-ocultar { display: grid; } }

/* ===== Amigos articulados: ícono propio (escudo morado) ===== */
.nx-pin-art { background: none; border: 0; }
.nx-pin-art > div { position: relative; width: 34px; height: 38px; display: grid; place-items: center; padding-bottom: 6px; color: #fff; font-size: 1rem;
  background: linear-gradient(160deg, #8E44AD, #5B2C83); clip-path: polygon(50% 0, 100% 16%, 100% 58%, 50% 100%, 0 58%, 0 16%); filter: drop-shadow(0 3px 5px rgba(0,0,0,.35)); }
.nx-pin-art > div > span { position: absolute; left: 50%; bottom: 7px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; border: 1.5px solid #fff; }
.nx-pin-art > div > b { position: absolute; top: 2px; right: 3px; font-size: .55rem; color: #FCD116; }
.nx-pin-art:hover > div { filter: drop-shadow(0 4px 8px rgba(91,44,131,.6)) brightness(1.1); }
.nx-art-mini { display: inline-grid; place-items: center; width: 18px; height: 20px; font-size: .62rem; color: #fff; background: linear-gradient(160deg, #8E44AD, #5B2C83); clip-path: polygon(50% 0, 100% 16%, 100% 58%, 50% 100%, 0 58%, 0 16%); vertical-align: -4px; }
.nx-art-cuenta { cursor: default; background: rgba(91, 44, 131, .1); color: #5B2C83; }
.nx-art-cuenta:empty { display: none; }
.nx-art-switch { background: #F4EEF8; border: 1px solid #E2D3EE; border-radius: 14px; padding: 10px 12px 10px 3rem; }
.nx-art-switch .form-check-input:checked { background-color: #5B2C83; border-color: #5B2C83; }
.nx-art-switch label { font-weight: 600; color: #4A2370; }
.nx-art-switch label small { font-weight: 400; color: #7d6a8f; }
@media (min-width: 993px) and (max-width: 1500px) {
  .nx-mapa-pagina.capas-ocultas .nx-herramientas button span { display: none; }
  .nx-mapa-pagina.capas-ocultas .nx-herramientas button { padding: 10px 12px; }
}
@media (min-width: 993px) { .nx-mapa-pagina.capas-ocultas .nx-leyenda { left: 62px; } }

/* ===== Leyenda del mapa plegable ===== */
.nx-leyenda { padding-top: 8px; }
.nx-ley-btn { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: transparent; padding: 2px 0 6px; font-weight: 700; font-size: .78rem; color: var(--nx-noche); cursor: pointer; text-align: left; }
.nx-ley-btn > i:first-child { color: #00873E; }
.nx-ley-btn span { flex: 1; }
.nx-ley-flecha { transition: transform .2s; color: #8a99a6; }
.nx-ley-btn:hover .nx-ley-flecha { color: var(--nx-noche); }
.nx-leyenda.plegada { min-width: 0; padding: 8px 12px; border-radius: 14px; }
.nx-leyenda.plegada .nx-ley-cuerpo { display: none; }
.nx-leyenda.plegada .nx-ley-btn { padding: 0; }
.nx-leyenda.plegada .nx-ley-flecha { transform: rotate(-90deg); }
