/* =====================================================================
   HERMES · Capa visual «vidrio líquido» (v2.1 · réplica exacta de la variante C)
   Se carga después de hermes.css. Todos los valores (medidas, radios,
   alfas, sombras, curvas y duraciones) salen de la variante C del lienzo
   de diseño. El semáforo institucional no cambia.
   ===================================================================== */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }

:root {
  --tinta: #1D1D1F;
  --tinta-2: #48484A;
  --tinta-3: #55555C;
  --icono: #3A3A3C;
  --apagado: #A1A1A6;
  --linea: rgba(0, 0, 0, .07);
  --linea-2: rgba(0, 0, 0, .07);
  --fondo: #D9D9DF;
  --acento: #3366CC;
  --acento-hover: #254E9E;
  --marine: #3366CC;
  --foco: #3366CC;
  --rojo-txt: #B0001E;
  --amarillo-txt: #8A6A00;
  --verde-txt: #056B4E;
  --celeste: #69B1D3;
  --celeste-txt: #2F7FA6;
  --curva: cubic-bezier(0.32, 0.72, 0, 1);
  --pista: rgba(118, 118, 128, .14);
  --gris-seg: rgba(118, 118, 128, .12);
  /* Tipografía (base 13 px como la variante C) */
  --t-xs: 11px; --t-s: 12px; --t-m: 13px; --t-l: 14px; --t-xl: 15px; --t-2xl: 18px; --t-3xl: 30px; --t-4xl: 30px;
  /* Superficies */
  --tarjeta-fondo: rgba(255, 255, 255, .5);
  --tarjeta-filtro: blur(26px) saturate(180%);
  --tarjeta-sombra: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(255,255,255,.45), 0 10px 30px rgba(0,0,0,.12);
  --panel-lat-sombra: inset 0 0 0 1px rgba(255,255,255,.85), inset 0 2px 2px rgba(255,255,255,1), inset 0 -2px 3px rgba(255,255,255,.6), inset 2px 0 4px rgba(255,255,255,.5), inset -2px 0 4px rgba(255,255,255,.5), inset 1.5px 0 0 rgba(110,160,255,.28), inset -1.5px 0 0 rgba(255,140,110,.24), 0 14px 40px rgba(0,0,0,.16);
  --capsula-fondo: linear-gradient(180deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.1) 55%, rgba(255,255,255,.22) 100%);
  --capsula-filtro: blur(12px) saturate(200%) brightness(1.1);
  --capsula-sombra: inset 0 1.5px 1px rgba(255,255,255,1), inset 0 -1px 1px rgba(255,255,255,.7), inset 1px 0 1px rgba(255,255,255,.75), inset -1px 0 1px rgba(255,255,255,.75), inset 0 0 14px rgba(255,255,255,.45), 0 6px 18px rgba(0,0,0,.08);
  --hoja-fondo: linear-gradient(160deg, rgba(255,255,255,.46), rgba(255,255,255,.2));
  --hoja-filtro: blur(40px) saturate(185%) brightness(1.06);
  --hoja-sombra: inset 0 0 0 1px rgba(255,255,255,.8), inset 0 2px 1px rgba(255,255,255,1), inset 0 -2px 2px rgba(255,255,255,.6), inset 0 0 30px rgba(255,255,255,.55), inset 2px 0 0 rgba(110,160,255,.25), inset -2px 0 0 rgba(255,140,110,.2), 0 30px 70px rgba(0,0,0,.22), 0 8px 20px rgba(0,0,0,.1);
  --hoja-sombra-arrastre: inset 0 0 0 1px rgba(255,255,255,.85), inset 0 2px 1px rgba(255,255,255,1), inset 0 -2px 2px rgba(255,255,255,.6), inset 0 0 30px rgba(255,255,255,.55), inset 2px 0 0 rgba(110,160,255,.28), inset -2px 0 0 rgba(255,140,110,.22), 0 44px 90px rgba(0,0,0,.28), 0 12px 28px rgba(0,0,0,.14);
  --caja-fondo: rgba(255, 255, 255, .58);
  --caja-sombra: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(255,255,255,.4);
  --aro-lente: inset 0 0 0 1px rgba(255,255,255,.95), inset 0 2.5px 2px rgba(255,255,255,1), inset 0 -2px 3px rgba(255,255,255,.75), inset 3px 0 5px rgba(255,255,255,.55), inset -3px 0 5px rgba(255,255,255,.55), inset 1.5px 0 0 rgba(110,160,255,.35), inset -1.5px 0 0 rgba(255,140,110,.3), inset 0 0 14px rgba(0,0,0,.06);
  --r-m: 18px;
  --rail: 238px;
  --sombra: 0 10px 30px rgba(0,0,0,.12);
}

/* ---------- Base ---------- */
html { background: #D9D9DF; }
body {
  font-family: Inter, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px; line-height: 1.4;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  color: #1D1D1F;
  background-color: #D9D9DF;
  background-image:
    radial-gradient(ellipse 70% 22% at 55% 0%, rgba(255,255,255,.95), transparent 75%),
    radial-gradient(ellipse 38% 40% at 0% 0%, rgba(255,255,255,.9), transparent 70%),
    radial-gradient(ellipse 38% 40% at 100% 0%, rgba(255,255,255,.8), transparent 70%),
    radial-gradient(ellipse 36% 38% at 0% 100%, rgba(255,255,255,.75), transparent 70%),
    radial-gradient(ellipse 40% 40% at 100% 100%, rgba(255,255,255,.85), transparent 70%),
    radial-gradient(ellipse 12% 60% at 0% 50%, rgba(255,255,255,.5), transparent 75%),
    radial-gradient(ellipse 12% 60% at 100% 50%, rgba(255,255,255,.5), transparent 75%),
    radial-gradient(ellipse 45% 40% at 50% 55%, rgba(170,170,178,.35), transparent 70%);
  background-attachment: fixed;
}
h1, h2, h3, h4 { font-weight: 700; letter-spacing: 0; line-height: 1.4; }
h1 { font-size: 15px; } h2 { font-size: 14px; font-weight: 600; } h3 { font-size: 13px; font-weight: 600; } h4 { font-size: 13px; font-weight: 600; }
a { color: #3366CC; text-decoration: none; }
a:hover { color: #254E9E; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid #3366CC; outline-offset: 2px; border-radius: 6px; }
.muted { color: #55555C; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }
svg { flex-shrink: 0; }

/* ---------- Estructura ---------- */
.app { display: flex; grid-template-columns: none; min-height: 100vh; }
.principal { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- Barra lateral (aside de la variante C) ---------- */
.rail-env { flex-shrink: 0; width: 238px; overflow: clip; transition: width .34s var(--curva); }
body.sin-rail .rail-env { width: 0; }
.rail {
  position: sticky; top: 10px; width: 228px; height: calc(100vh - 20px); margin: 10px 0 10px 10px;
  box-sizing: border-box; display: flex; flex-direction: column; border-radius: 22px;
  background: rgba(255,255,255,.42); color: #1D1D1F;
  -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%);
  box-shadow: var(--panel-lat-sombra); overflow: hidden;
  transition: opacity .24s ease;
}
body.sin-rail .rail, body.rail-animando .rail { opacity: 0; }
.rail::before { content: ""; position: absolute; left: 22px; top: 3px; width: 130px; height: 14px; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%); pointer-events: none; }
.rail::after { content: ""; position: absolute; right: 24px; bottom: 3px; width: 90px; height: 10px; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.8), rgba(255,255,255,0) 70%); pointer-events: none; }
.rail .banda { display: none; }
.rail-marca { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 18px 14px; color: #1D1D1F; text-decoration: none; letter-spacing: 0; font-size: 13px; }
.rail-marca:hover { color: #1D1D1F; }
.rail-marca .marca-ico { position: relative; width: 72px; height: 72px; flex-shrink: 0; margin-bottom: 2px; }
.rail-marca img { display: block; width: 72px; height: 72px; flex-shrink: 0; filter: drop-shadow(0 6px 12px rgba(0,0,0,.16)); }
/* Latido del punto rojo: una copia del mismo ícono recortada al círculo de alerta late una vez por clic */
.rail-marca .latido {
  position: absolute; inset: 0;
  background: url("../img/hermes-icono-128.png") 0 0 / 72px 72px no-repeat;
  clip-path: circle(9.5px at 52.6px 22.2px); transform-origin: 52.6px 22.2px;
}
.rail-marca .latido { pointer-events: auto; cursor: default; }

/* Huevo de pascua: tarjeta de vidrio esmerilado centrada */
.huevo-velo { position: fixed; inset: 0; z-index: 1300; background: rgba(0,0,0,.12); opacity: 0; pointer-events: none; transition: opacity .34s ease; }
.huevo-velo.visible { opacity: 1; pointer-events: auto; }
.huevo {
  position: fixed; left: 50%; top: 50%; z-index: 1301; width: min(400px, calc(100vw - 32px)); box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 28px 22px; border-radius: 30px; text-align: center; color: #1D1D1F;
  background: linear-gradient(160deg, rgba(250,250,252,.93), rgba(244,244,247,.87));
  -webkit-backdrop-filter: blur(40px) saturate(185%) brightness(1.06); backdrop-filter: blur(40px) saturate(185%) brightness(1.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8), inset 0 2px 1px rgba(255,255,255,1), inset 0 -2px 2px rgba(255,255,255,.6), inset 0 0 30px rgba(255,255,255,.55), inset 2px 0 0 rgba(110,160,255,.25), inset -2px 0 0 rgba(255,140,110,.2), 0 30px 70px rgba(0,0,0,.22), 0 8px 20px rgba(0,0,0,.1);
  opacity: 0; transform: translate(-50%, -50%) scale(.86); transition: opacity .26s ease, transform .36s var(--curva);
}
.huevo.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.huevo .b1, .huevo .b2 { position: absolute; border-radius: 50%; pointer-events: none; }
.huevo .b1 { left: 28px; top: 3px; width: 150px; height: 12px; background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%); }
.huevo .b2 { right: 30px; bottom: 3px; width: 90px; height: 9px; background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.85), rgba(255,255,255,0) 70%); }
.huevo-ico { filter: drop-shadow(0 8px 14px rgba(47,95,208,.28)); animation: huevo-flota 3.2s ease-in-out infinite; }
@keyframes huevo-flota { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }
.huevo h2 { margin: 6px 0 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.huevo p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #3A3A3C; text-wrap: pretty; }
.huevo .huevo-sub { font-weight: 600; color: #1D1D1F; }
.huevo-ok { margin-top: 8px; height: 36px; padding: 0 22px; border: 0; border-radius: 18px; background: #3366CC; color: #FFFFFF; font: inherit; font-size: 13px; font-weight: 600; box-shadow: 0 6px 16px rgba(51,102,204,.3); cursor: pointer; transition: scale .26s var(--curva), background .2s ease; }
.huevo-ok:hover { scale: 1.06; background: #2D5BB8; }
.huevo-ok:active { scale: .95; }
.huevo-ok:focus-visible { outline: 3px solid #3366CC; outline-offset: 3px; }
@keyframes latido1 { 0% { transform: scale(1); } 32% { transform: scale(1.1); } 62% { transform: scale(.985); } 100% { transform: scale(1); } }
@keyframes latido2 { 0% { transform: scale(1); } 32% { transform: scale(1.1); } 62% { transform: scale(.985); } 100% { transform: scale(1); } }

/* Onda de agua al hacer clic: dos anillos que refractan lo que hay debajo y se desvanecen */
.onda {
  position: fixed; z-index: 3000; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle closest-side, transparent 62%, rgba(20,40,80,.09) 74%, rgba(255,255,255,.72) 86%, transparent 100%);
  -webkit-backdrop-filter: blur(1.5px) brightness(1.05) saturate(1.2); backdrop-filter: blur(1.5px) brightness(1.05) saturate(1.2);
  -webkit-mask-image: radial-gradient(circle closest-side, transparent 60%, #000 76%, #000 86%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, transparent 60%, #000 76%, #000 86%, transparent 100%);
  transform: scale(.12); opacity: 0; will-change: transform, opacity;
  animation: onda .72s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.onda.onda-2 { animation: onda-2 .72s cubic-bezier(0.22, 0.61, 0.36, 1) .1s both; }
@keyframes onda { 0% { transform: scale(.12); opacity: .95; } 100% { transform: scale(1); opacity: 0; } }
@keyframes onda-2 { 0% { transform: scale(.08); opacity: .7; } 100% { transform: scale(.66); opacity: 0; } }
.rail-nombre { font-size: 17px; font-weight: 700; letter-spacing: .18em; line-height: 1; }
.rail-dep { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: #55555C; padding: 0; text-align: center; line-height: 1.4; }
.rail-buscar {
  display: flex; align-items: center; gap: 6px; height: 28px; margin: 0 12px 16px; padding: 0 11px; border-radius: 14px;
  background: rgba(255,255,255,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 0 1px rgba(255,255,255,.4); color: #55555C;
}
.rail-buscar svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rail-buscar input { flex-grow: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 13px; color: #1D1D1F; outline: none; padding: 0; height: 26px; }
.rail-buscar input::placeholder { color: #55555C; }
.rail-buscar input::-webkit-search-cancel-button { opacity: .5; }
/* Si la pantalla es baja, solo la lista de módulos se desplaza: el logo, el sonido y el usuario quedan a la vista */
.rail-marca, .rail-buscar, .rail-pie { flex-shrink: 0; }
.rail-nav { position: relative; flex: 0 1 auto; min-height: 0; padding-bottom: 6px; overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(60,60,67,.22) transparent; }
.rail-nav.desborda { -webkit-mask: linear-gradient(180deg, #000 calc(100% - 22px), transparent); mask: linear-gradient(180deg, #000 calc(100% - 22px), transparent); }
.rail-nav.desborda.al-final { -webkit-mask: none; mask: none; }
.rail-nav::-webkit-scrollbar { width: 6px; }
.rail-nav::-webkit-scrollbar-thumb { border-radius: 3px; background: rgba(60,60,67,.22); }
.nav-sec { height: 20px; box-sizing: border-box; padding: 0 20px; font-size: 11px; font-weight: 600; line-height: 16px; color: #55555C; }
.rail nav { display: flex; flex-direction: column; gap: 1px; padding: 0 10px; margin-bottom: 14px; }
.rail nav:last-child { margin-bottom: 0; }
.rail nav a {
  display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 8px; border-radius: 10px;
  color: #1D1D1F; font-weight: 400; text-decoration: none; position: relative; background: transparent;
}
.rail nav a:hover { background: transparent; color: #1D1D1F; }
.rail nav a[aria-current="page"] { background: transparent; color: #1D1D1F; font-weight: 600; }
.rail nav a[aria-current="page"]::before { display: none; }
.rail nav a .ico { width: 22px; height: 22px; flex-shrink: 0; color: #3366CC; display: flex; align-items: center; justify-content: center; }
.rail nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rail nav a .lbl { flex-grow: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail nav a .cuenta {
  margin-left: 0; min-width: 22px; height: 18px; padding: 0 6px; box-sizing: border-box; border-radius: 9px;
  background: #D80025; color: #FFFFFF; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.rail nav a .cuenta.suave { background: none; min-width: 0; padding: 0; height: auto; font-size: 12px; font-weight: 400; color: #55555C; border-radius: 0; }
/* Interruptor de efectos de sonido (barra de volumen tipo Apple, encima de la tarjeta del usuario) */
.sonido-sw {
  display: flex; align-items: center; gap: 12px; margin: auto 10px 8px; padding: 8px 12px 8px 8px; border: 0; border-radius: 16px;
  background: rgba(255,255,255,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 0 1px rgba(255,255,255,.4);
  font-family: inherit; text-align: left; color: #1D1D1F; cursor: pointer; flex-shrink: 0;
}
.sonido-sw:focus-visible { outline: 3px solid #3366CC; outline-offset: 2px; }
.sonido-sw .sw-barra {
  position: relative; width: 30px; height: 58px; flex-shrink: 0; border-radius: 15px; overflow: hidden;
  background: rgba(118,118,128,.2); box-shadow: inset 0 1px 2px rgba(0,0,0,.12), inset 0 0 0 1px rgba(255,255,255,.5);
}
.sonido-sw .sw-nivel {
  position: absolute; left: 0; right: 0; bottom: 0; height: 100%; background: #34C759; box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
  transition: height .34s var(--curva), background .24s ease;
}
.sonido-sw .sw-icono { position: absolute; left: 0; right: 0; bottom: 7px; display: flex; justify-content: center; color: #FFFFFF; }
.sonido-sw .sw-icono svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sonido-sw .sw-icono svg path:first-child { fill: currentColor; }
.sonido-sw .sw-i-mudo { display: none; }
.sonido-sw .sw-textos { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sonido-sw .sw-t1 { font-size: 13px; font-weight: 600; }
.sonido-sw .sw-t2 { font-size: 12px; font-weight: 600; color: #248A3D; transition: color .24s ease; }
.sonido-sw .sw-t3 { font-size: 11px; color: #55555C; }
.sonido-sw[aria-checked="false"] .sw-nivel { height: 42%; background: #FF3B30; }
.sonido-sw[aria-checked="false"] .sw-t2 { color: #D70015; }
.sonido-sw[aria-checked="false"] .sw-i-sonando { display: none; }
.sonido-sw[aria-checked="false"] .sw-i-mudo { display: block; }
.rail-pie {
  margin: 0 10px 12px; padding: 10px; border: 0; border-radius: 10px; background: rgba(255,255,255,.55);
  display: flex; align-items: center; gap: 10px; font-size: 13px;
}
.rail-pie .avatar { width: 32px; height: 32px; flex-shrink: 0; border-radius: 16px; background: #8E8E93; color: #FFFFFF; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.rail-pie .quien { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; color: #1D1D1F; }
.rail-pie strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.rail-pie .quien span { font-size: 11px; color: #55555C; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rail-pie form { margin: 0; flex-shrink: 0; }
.rail-pie .salir {
  width: 26px; height: 26px; padding: 0; border: 0; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.6); color: #55555C; box-shadow: inset 0 1px 0 #FFFFFF, 0 2px 6px rgba(0,0,0,.08);
}
.rail-pie .salir svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.rail-pie .salir:hover { background: rgba(255,255,255,.85); color: #B0001E; }
.rail-logo { display: none; }

/* ---------- Cabecera (header transparente con cápsulas) ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 500; flex-shrink: 0; height: 56px; box-sizing: border-box;
  display: flex; align-items: center; gap: 14px; padding: 0 16px 0 18px;
  background: transparent; border: 0; margin: 0; border-radius: 0; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.cabecera::before {
  content: ""; position: absolute; inset: 0 0 -22px 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .24s ease;
  background: linear-gradient(180deg, rgba(222,222,228,.9) 0%, rgba(222,222,228,.78) 70%, rgba(222,222,228,0) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent);
}
html.desplazado .cabecera::before { opacity: 1; }
.capsula {
  display: flex; gap: 2px; color: #3A3A3C; padding: 3px; border-radius: 18px; flex-shrink: 0;
  background: var(--capsula-fondo); -webkit-backdrop-filter: var(--capsula-filtro); backdrop-filter: var(--capsula-filtro);
  box-shadow: var(--capsula-sombra);
}
.capsula button {
  width: 30px; height: 28px; padding: 0; border: 0; border-radius: 14px; background: transparent; color: inherit;
  display: flex; align-items: center; justify-content: center;
}
.capsula-der button { width: 32px; }
.capsula button svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.capsula button svg.grueso { stroke-width: 2; }
.capsula .menu-btn { display: flex; color: #4A4A4F; border: 0; background: transparent; }
.capsula button:disabled { color: #A1A1A6; cursor: default; }
.capsula button[aria-pressed="true"]#btn-inspector, .capsula button[aria-pressed="true"]#btn-filtros { background: rgba(255,255,255,.85); }
#btn-inspector, #btn-filtros { transition: scale .26s var(--curva), background .2s !important; }
#btn-reevaluar.girando svg { animation: giro .8s linear infinite; }
#btn-filtros { position: relative; }
#btn-filtros .insignia { position: absolute; right: 0; top: -2px; min-width: 15px; height: 15px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: #3366CC; box-shadow: 0 0 0 2px rgba(255,255,255,.9); color: #FFFFFF; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#btn-filtros[aria-expanded="true"] { background: rgba(255,255,255,.85); }
.titulos { display: flex; flex-direction: column; min-width: 0; flex-shrink: 1; }
.titulos h1 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titulos .sub { font-size: 11px; color: #55555C; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cabecera .esp { flex-grow: 1; }
.estado-sync.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Selector de vistas: cápsula (tablist) con gota-lupa */
.isla-sub { position: relative; display: flex; padding: 0; flex-shrink: 1; min-width: 0; }
.isla-sub:has(.subnav:empty) { display: none; }
.subnav {
  position: relative; display: flex; gap: 2px; padding: 3px; border: 0; border-radius: 18px; overflow: visible;
  background: var(--capsula-fondo); -webkit-backdrop-filter: var(--capsula-filtro); backdrop-filter: var(--capsula-filtro);
  box-shadow: var(--capsula-sombra);
}
.subnav:empty { display: none; }
.subnav a {
  position: relative; min-width: 100px; height: 28px; box-sizing: border-box; padding: 0 12px; border: 0; border-radius: 14px;
  background: transparent; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 400; color: #1D1D1F; text-decoration: none; white-space: nowrap;
  transition: font-weight .2s;
}
.subnav a:hover { color: #1D1D1F; }
.subnav a[aria-current="page"] { font-weight: 600; color: #1D1D1F; border: 0; }
/* Muchas vistas (Administración): las pestañas se ajustan a su texto y la isla se desplaza si no cabe */
.subnav:has(> a:nth-child(6)) a { min-width: 0; }
.isla-sub:has(.subnav > a:nth-child(6)) { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 4px 10px; margin: -4px -10px; }
.isla-sub::-webkit-scrollbar { display: none; }

/* Franja de pulso: 18 px bajo las islas de la cabecera (8 px de aire), con el nombre de cada categoría siempre visible */
.pulso { position: absolute; left: 22px; right: 22px; top: 56px; z-index: 2; display: flex; gap: 3px; height: 18px; padding: 0; }
.pulso-leyenda { display: none; }
.pulso-barra { display: contents; }
.pulso .seg {
  position: relative; border: 0; padding: 0 8px; margin: 0; height: 100%; min-width: max-content; border-radius: 7px; overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
  transition: flex-grow .5s var(--curva), opacity .25s ease, filter .2s ease, box-shadow .25s ease;
}
.pulso .seg:disabled { cursor: default; }
.pulso .seg-t { white-space: nowrap; font-size: 10.5px; line-height: 1; font-weight: 500; letter-spacing: .01em; color: #FFFFFF; pointer-events: none; }
.pulso .seg-t b { font-weight: 700; }
.pulso .seg.p-amarillo .seg-t { color: #3A2E00; }
/* La franja como filtro: el color elegido llena la franja; los demás quedan como pastillas tenues «+ N» para sumarlos */
.pulso .seg-mas, .pulso .seg-x { display: none; }
.pulso .seg-mas { white-space: nowrap; font-size: 10.5px; line-height: 1; font-weight: 700; color: #FFFFFF; pointer-events: none; }
.pulso .seg.p-amarillo .seg-mas { color: #3A2E00; }
.pulso .seg-x { flex-shrink: 0; margin-left: 7px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; color: #FFFFFF; opacity: .85; pointer-events: none; }
.pulso .seg.p-amarillo .seg-x { color: #3A2E00; }
.pulso .seg.sel .seg-x { display: block; }
.pulso .seg.sel { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 0 1.5px rgba(255,255,255,.95), 0 2px 8px rgba(0,0,0,.16); }
.pulso.filtrado .seg.fuera { flex-grow: 0 !important; padding: 0 7px; opacity: .42; filter: saturate(.55); }
.pulso.filtrado .seg.fuera .seg-t { display: none; }
.pulso.filtrado .seg.fuera .seg-mas { display: inline; }
.pulso.filtrado .seg.fuera:hover:not(:disabled), .pulso.filtrado .seg.fuera:focus-visible { opacity: .9; filter: none; }
.pulso .seg:disabled { opacity: .5; filter: saturate(.6); }
.pulso.filtrado .seg.fuera:disabled { opacity: .25; }
.pulso .seg:hover:not(:disabled) { filter: brightness(1.08) saturate(1.1); }
.pulso .seg:focus-visible { outline: 2px solid #3366CC; outline-offset: 2px; }
.p-rojo { background: #D80025; } .p-amarillo { background: #FFC800; } .p-verde { background: #068460; } .p-azul { background: #003189; }

/* ---------- Barra de filtros (se abre con el botón de la cabecera, debajo de la franja de pulso) ---------- */
.barra-filtros { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .36s var(--curva), opacity .24s ease; }
.barra-filtros.abierta { grid-template-rows: 1fr; opacity: 1; }
.barra-filtros > .bf-in { min-height: 0; overflow: hidden; }
.bf {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 22px 22px 2px; padding: 6px; border-radius: 18px;
  background: rgba(255,255,255,.5); -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(255,255,255,.45), 0 8px 24px rgba(0,0,0,.08);
}
.bf-cat {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px 0 12px; border: 0; border-radius: 15px;
  background: rgba(118,118,128,.12); color: #1D1D1F; font: inherit; font-size: 12.5px; font-weight: 500; white-space: nowrap;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease, scale .26s var(--curva);
}
.bf-cat:hover { background: rgba(255,255,255,.85); scale: 1.04; }
.bf-cat[aria-expanded="true"] { background: rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.bf-cat .chev { fill: none; stroke: #6E6E73; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: rotate .26s var(--curva); }
.bf-cat[aria-expanded="true"] .chev { rotate: 180deg; }
/* Los controles de filtro de la vista viven en la barra de la cabecera */
.vista .filtros .bf-oculto, .vista .filtros.bf-vacia { display: none !important; }
/* Categoría con filtro activo: se intensifica su color */
.bf-cat.activo { background: rgba(51,102,204,.16); color: #1F4A9E; font-weight: 600; box-shadow: inset 0 0 0 1.5px rgba(51,102,204,.55), 0 2px 10px rgba(51,102,204,.18); }
.bf-cat.activo:hover { background: rgba(51,102,204,.24); }
.bf-cat.activo .chev { stroke: #1F4A9E; }
.bf-v { max-width: 160px; overflow: hidden; text-overflow: ellipsis; padding-left: 7px; border-left: 1px solid rgba(31,74,158,.25); font-weight: 600; }
.bf-n { min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: #3366CC; color: #FFFFFF; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.bf-puntos { display: inline-flex; }
.bf-puntos i { width: 9px; height: 9px; border-radius: 5px; box-shadow: 0 0 0 1.5px #FFFFFF; }
.bf-puntos i + i { margin-left: -3px; }
.bf-buscar { flex: 1 1 180px; max-width: 320px; min-width: 160px; display: inline-flex; align-items: center; gap: 6px; height: 30px; margin-left: auto; padding: 0 12px; border-radius: 15px; background: rgba(255,255,255,.7); box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); color: #55555C; }
.bf-buscar svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.bf-buscar input { flex: 1; min-width: 0; width: auto; border: 0; background: transparent; font: inherit; font-size: 12.5px; color: #1D1D1F; outline: none; padding: 0; }
.bf-quitar { height: 30px; padding: 0 12px; border: 0; border-radius: 15px; background: transparent; color: #B0001E; font: inherit; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.bf-quitar b { min-width: 18px; height: 18px; border-radius: 9px; background: rgba(216,0,37,.12); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.bf-quitar:hover { background: rgba(216,0,37,.08); }

/* ---------- Cuerpo: vista + inspector ---------- */
.cuerpo { flex-grow: 1; min-height: 0; display: flex; }
.columna { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.vista {
  padding: 28px 22px 22px; max-width: none; width: auto; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 16px; flex-grow: 1;
}
.vista > div { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vista > div > *, .vista > * { margin-top: 0; margin-bottom: 0; }
.vista > div > .filtros { margin: 0; }
.aviso-cambios { margin: 16px 22px 0; }
.vista.entra { animation: vista-fundido .36s var(--curva) both; }
.vista.entra-der { animation: vista-fundido .36s var(--curva) both, vista-der .36s var(--curva) both; }
.vista.entra-izq { animation: vista-fundido .36s var(--curva) both, vista-izq .36s var(--curva) both; }
@keyframes vista-fundido { from { opacity: 0; } to { opacity: 1; } }
@keyframes vista-der { from { transform: translateX(32px); } to { transform: none; } }
@keyframes vista-izq { from { transform: translateX(-32px); } to { transform: none; } }

/* Inspector (aside derecho) */
.insp-env { flex-shrink: 0; width: 322px; overflow: clip; transition: width .34s var(--curva); }
body.sin-insp .insp-env { width: 0; }
.inspector {
  position: sticky; top: 74px; width: 312px; height: calc(100vh - 84px); margin: 18px 10px 10px 0; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 14px; padding: 20px 18px; border-radius: 22px;
  background: rgba(255,255,255,.42); -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%);
  box-shadow: var(--panel-lat-sombra); overflow: hidden auto; scrollbar-width: none; transition: opacity .24s ease;
}
.inspector:not(.desborda)::-webkit-scrollbar { display: none; }
/* Pantalla baja: el contenido se desplaza y los botones del pie quedan siempre visibles */
.inspector.desborda { scrollbar-width: thin; scrollbar-color: rgba(60,60,67,.22) transparent; }
.inspector.desborda::-webkit-scrollbar { width: 6px; }
.inspector.desborda::-webkit-scrollbar-thumb { border-radius: 3px; background: rgba(60,60,67,.22); }
body.sin-insp .inspector, body.insp-animando .inspector { opacity: 0; }
.inspector > .brillo-sup { position: absolute; left: 22px; top: 3px; width: 130px; height: 14px; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%); pointer-events: none; }
.inspector > .brillo-inf { position: absolute; right: 24px; bottom: 3px; width: 90px; height: 10px; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.8), rgba(255,255,255,0) 70%); pointer-events: none; }
.i-cab { display: flex; flex-direction: column; gap: 6px; }
.i-num { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.i-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.i-sub { font-size: 12px; color: #55555C; }
.i-grupo { display: flex; flex-direction: column; gap: 6px; }
.i-tit { padding-left: 4px; font-size: 11px; font-weight: 600; color: #55555C; }
.i-caja { display: flex; flex-direction: column; padding: 4px 12px; border-radius: 14px; background: rgba(255,255,255,.58); box-shadow: var(--caja-sombra); }
.i-fila { display: flex; padding: 8px 0; gap: 8px; }
.i-fila + .i-fila { border-top: 1px solid rgba(0,0,0,.07); }
.i-fila > span { flex-grow: 1; }
.i-fila > b { font-weight: 600; text-align: right; }
.i-fila.i-col { flex-direction: column; gap: 6px; }
.i-fila.i-col > div:first-child { display: flex; }
.i-fila.i-col > div:first-child > span { flex-grow: 1; }
.i-fila.i-col > div:first-child > b { font-weight: 600; }
.i-barra { height: 5px; border-radius: 3px; background: rgba(118,118,128,.14); }
.i-barra > i { display: block; height: 5px; border-radius: 3px; }
.i-esp { flex-grow: 1; }
.i-acciones { position: sticky; bottom: -20px; z-index: 2; flex-shrink: 0; display: flex; gap: 8px; margin: 0 -18px -20px; padding: 0 18px 20px; }
.inspector.desborda .i-acciones { padding-top: 14px; background: linear-gradient(180deg, rgba(244,244,247,0) 0, rgba(244,244,247,.94) 14px); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); -webkit-mask: linear-gradient(180deg, transparent 0, #000 10px); mask: linear-gradient(180deg, transparent 0, #000 10px); }
.i-acciones button { flex-grow: 1; height: 32px; border: 0; border-radius: 16px; font-size: 13px; }
.b-hoja { background: rgba(255,255,255,.6); box-shadow: inset 0 1px 0 #FFFFFF, 0 2px 8px rgba(0,0,0,.1); font-weight: 500; color: #1D1D1F; }
.b-acento { background: #3366CC; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 12px rgba(51,102,204,.35); font-weight: 600; color: #FFFFFF; }
.i-vacio { margin: auto 0; text-align: center; color: #55555C; font-size: 12px; padding: 24px 8px; }
.i-vacio strong { display: block; color: #1D1D1F; font-size: 14px; margin-bottom: 4px; }
.chip-c { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; background: rgba(118,118,128,.14); color: #48484A; }
.chip-c > i { width: 6px; height: 6px; border-radius: 3px; flex-shrink: 0; }
.chip-c.c-rojo { background: rgba(216,0,37,.1); color: #B0001E; } .chip-c.c-rojo > i { background: #D80025; }
.chip-c.c-amarillo { background: rgba(255,200,0,.18); color: #8A6A00; } .chip-c.c-amarillo > i { background: #FFC800; }
.chip-c.c-verde { background: rgba(6,132,96,.12); color: #056B4E; } .chip-c.c-verde > i { background: #068460; }
.chip-c.c-azul { background: rgba(0,49,137,.1); color: #003189; } .chip-c.c-azul > i { background: #003189; }

/* ---------- Tarjetas (section de la variante C) ---------- */
.panel, .tarjeta, .kpi {
  background: rgba(255,255,255,.5); -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%);
  border: 0; border-radius: 18px; box-shadow: var(--tarjeta-sombra);
}
.panel { padding: 16px 18px; min-width: 0; }
.panel + .panel, .rejilla + .panel, .panel + .rejilla, .kpis + .panel, .kpis + .rejilla, .filtros + .kpis, .rejilla + .rejilla { margin-top: 16px; }
.vista > div > .panel + .panel, .vista > div > .rejilla + .panel, .vista > div > .panel + .rejilla, .vista > div > .kpis + .panel, .vista > div > .kpis + .rejilla, .vista > div > .rejilla + .rejilla { margin-top: 0; }
.panel-cab { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-cab h2, .panel-cab h3 { font-size: 14px; font-weight: 600; margin: 0; }
.panel-cab p { margin: 0; color: #55555C; font-size: 12px; }
.rejilla { gap: 14px; }
.tarjeta { box-sizing: border-box; min-width: 0; }
.t-label { font-size: 12px; font-weight: 600; color: #55555C; }
.t-valor { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.t-nota { font-size: 12px; color: #55555C; }
.t-pista { height: 6px; border-radius: 3px; background: rgba(118,118,128,.14); overflow: hidden; }
.t-pista > i { display: block; height: 6px; border-radius: 3px; }

/* KPI como tarjetas independientes (grid gap 14) */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; }
.kpis:has(> :nth-child(3):last-child), .kpis:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis:has(> :nth-child(4):last-child), .kpis:has(> :nth-child(8):last-child), .kpis:has(> :nth-child(7):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; text-align: left; border-left: 0; min-width: 0; color: #1D1D1F; font: inherit; }
.kpi:first-child { border-left: 0; }
.kpi .l { order: -1; display: block; margin: 0; font-size: 12px; font-weight: 600; color: #55555C; }
.kpi .v { display: block; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v.v-largo, .vista-ejecutiva .kpi .v.v-largo { font-size: 30px; line-height: 1.15; }
.kpi .n { display: block; margin: 0; font-size: 12px; color: #55555C; }
button.kpi:hover { background: rgba(255,255,255,.5); }
button.kpi:hover .l { text-decoration: none; }
.kpi.k-rojo .v { color: #B0001E; } .kpi.k-amarillo .v { color: #8A6A00; } .kpi.k-verde .v { color: #056B4E; } .kpi.k-azul .v { color: #003189; }
.kpi.k-rojo::after, .kpi.k-amarillo::after { display: none; }
.vista-ejecutiva .kpi { padding: 18px 20px; }
.vista-ejecutiva .kpi .v { font-size: 30px; }
.vista-ejecutiva .kpi .l { font-size: 12px; }
.portada { display: none; }

/* ---------- Tableros de la variante C ---------- */
.fila-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fila-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.t-alta { height: 196px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.t-alta.t-valorfinal { gap: 6px; }
.t-kpi { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; }
.t-kpi.con-barra { gap: 8px; }
.t-cuerpo { flex-grow: 1; display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 124px; height: 124px; flex-shrink: 0; transition: scale .34s var(--curva); }
.ring svg { display: block; }
.ring-centro { position: absolute; left: 0; top: 0; width: 124px; height: 124px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-centro b { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.ring-centro span { font-size: 11px; color: #55555C; }
.leyenda-c { flex-grow: 1; display: flex; flex-direction: column; gap: 7px; font-size: 12px; }
.leyenda-c > div { display: flex; align-items: center; gap: 7px; }
.leyenda-c i { width: 8px; height: 8px; border-radius: 4px; flex-shrink: 0; }
.leyenda-c span { flex-grow: 1; }
.leyenda-c b { font-weight: 600; }
.cifras-c { flex-grow: 1; display: flex; flex-direction: column; gap: 12px; }
.cifras-c > div { display: flex; flex-direction: column; }
.cifras-c span { font-size: 12px; color: #55555C; }
.cifras-c b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.mini-c { display: flex; gap: 8px; }
.mini-c a { flex-grow: 1; display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; color: #1D1D1F; text-decoration: none; }
.mini-c a b { font-size: 18px; font-weight: 700; }
.mini-c a span { font-size: 11px; color: #55555C; }
.mini-c .m-rojo { background: rgba(216,0,37,.08); } .mini-c .m-rojo b { color: #B0001E; }
.mini-c .m-acento { background: rgba(51,102,204,.08); } .mini-c .m-acento b { color: #254E9E; }

.geo-fila2 { display: flex; gap: 14px; height: max(520px, calc(100vh - 310px)); min-height: 0; }
.mapa-sec { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.mapa-cab { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px 18px; }
.mapa-cab h2 { margin: 0; flex-grow: 1; font-size: 14px; font-weight: 600; }
.mapa-area { flex-grow: 1; position: relative; margin: 0 10px 10px; border-radius: 14px; background: rgba(255,255,255,.32); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); overflow: hidden; min-height: 0; }
.mapa-area .mapa { position: absolute; inset: 0; height: auto; border: 0; border-radius: 14px; background: transparent; }
.atencion { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.atencion-cab { display: flex; align-items: baseline; padding: 4px 6px 0; }
.atencion-cab h2 { margin: 0; flex-grow: 1; font-size: 14px; font-weight: 600; }
.atencion-cab a { font-size: 12px; color: #3366CC; }
.lista-c { display: flex; flex-direction: column; padding: 6px; border-radius: 14px; background: rgba(255,255,255,.5); -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%); box-shadow: var(--tarjeta-sombra); overflow-y: auto; scrollbar-width: thin; }
.lista-c > a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: #1D1D1F; text-decoration: none; flex-shrink: 0; }
.lista-c > a .punto { width: 9px; height: 9px; flex-shrink: 0; border-radius: 5px; }
.lista-c > a .txt { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.lista-c > a .txt b { font-weight: 600; }
.lista-c > a .txt span { font-size: 12px; color: #55555C; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista-c > a .cant { font-size: 12px; color: #55555C; white-space: nowrap; }
.lista-c > a[aria-current="true"] { background: #3366CC; color: #FFFFFF; }
.lista-c > a[aria-current="true"] .txt span { color: #FFFFFF; opacity: .85; }
.lista-c > a[aria-current="true"] .cant { color: #FFFFFF; font-weight: 600; }
.lista-c > a[aria-current="true"] .punto { background: #FFFFFF !important; box-shadow: inset 0 0 0 3px var(--punto, #D80025); }
.lista-c > .sep { height: 1px; margin: 0 10px 0 29px; background: rgba(0,0,0,.07); flex-shrink: 0; }
.lista-c > .sep:has(+ a[aria-current="true"]), .lista-c > a[aria-current="true"] + .sep { visibility: hidden; }

.sel-c {
  display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 22px 0 10px; border: 0; border-radius: 6px;
  background-color: rgba(118,118,128,.12); font-size: 12px; color: #1D1D1F; -webkit-appearance: none; appearance: none; max-width: 220px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='11' height='11' fill='none' stroke='%236E6E73' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 9.5 4-4 4 4M8 14.5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; background-size: 11px 11px;
}
.seg-c { display: flex; gap: 2px; padding: 2px; border-radius: 7px; background: rgba(118,118,128,.12); }
.seg-c button { height: 22px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; font-size: 12px; color: #1D1D1F; font-weight: 400; }
.seg-c button[aria-selected="true"] { background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.14); font-weight: 600; }

/* Listas con filas (Casos priorizados, Grupos internos de trabajo) */
.lista-titulo { padding: 4px 6px 0; font-size: 14px; font-weight: 600; }
.lista-filas { display: flex; flex-direction: column; padding: 6px; border-radius: 14px; background: rgba(255,255,255,.5); -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%); box-shadow: var(--tarjeta-sombra); }
.fila-c { display: flex; align-items: center; gap: 12px; padding: 11px 12px; transition: scale .26s var(--curva), background .2s ease; }
.fila-c[data-ir] { cursor: pointer; }
.fila-c .punto { width: 9px; height: 9px; flex-shrink: 0; border-radius: 5px; }
.fila-c .num-c { width: 130px; flex-shrink: 0; font-weight: 600; }
.fila-c .desc { flex-grow: 1; min-width: 0; color: #48484A; }
.fila-c .cant { font-size: 12px; color: #55555C; white-space: nowrap; }
.fila-c .nom { flex-grow: 1; min-width: 0; font-weight: 600; }
.fila-c .col110 { width: 110px; flex-shrink: 0; color: #55555C; }
.fila-c .col110.rojo { color: #B0001E; }
.fila-c .col90 { width: 90px; flex-shrink: 0; text-align: right; font-weight: 600; }
.lista-filas > .sep { height: 1px; margin-left: 33px; background: rgba(0,0,0,.07); }
.lista-filas.git > .sep { margin-left: 12px; }

/* ---------- Dock de variables (sobre el mapa) ---------- */
.dock {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 800; height: 60px; box-sizing: border-box;
  display: flex; align-items: flex-end; gap: 10px; padding: 0 12px 10px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,.12));
  -webkit-backdrop-filter: blur(12px) saturate(200%) brightness(1.1); backdrop-filter: blur(12px) saturate(200%) brightness(1.1);
  box-shadow: inset 0 1.5px 1px rgba(255,255,255,1), inset 0 -1px 1px rgba(255,255,255,.7), inset 1px 0 1px rgba(255,255,255,.75), inset -1px 0 1px rgba(255,255,255,.75), inset 0 0 14px rgba(255,255,255,.45), 0 8px 24px rgba(0,0,0,.12);
}
.dock .d-item { position: relative; flex-shrink: 0; display: flex; justify-content: center; width: 40px; transition: width .3s var(--curva); }
.dock .d-btn {
  flex-shrink: 0; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; font-size: 14px; font-weight: 700; letter-spacing: -0.02em;
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.18), 0 4px 12px rgba(0,0,0,.2);
  transition: width .3s var(--curva), height .3s var(--curva), font-size .3s var(--curva), border-radius .3s var(--curva);
}
.dock .d-btn[aria-pressed="true"] { outline: 2px solid #FFFFFF; outline-offset: 1px; }
.dock .d-tip {
  position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); white-space: nowrap; padding: 5px 11px; border-radius: 9px;
  background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 4px 14px rgba(0,0,0,.16); font-size: 12px; font-weight: 500; color: #1D1D1F; pointer-events: none;
  opacity: 0; transition: bottom .3s var(--curva), opacity .12s ease;
}
.dock .d-tip.visible { opacity: 1; }

/* ---------- Mapa ---------- */
.mapa { border: 0; border-radius: 14px; background: transparent; }
.leaflet-container { background: transparent; font-family: inherit; }
.leaflet-tile-pane { opacity: .45; filter: grayscale(1) contrast(.9); }
.leaflet-control-zoom.leaflet-bar { border: 0; border-radius: 8px; background: #FFFFFF; box-shadow: 0 1px 4px rgba(0,0,0,.16); overflow: hidden; margin: 12px 12px 0 0; }
.leaflet-bar a, .leaflet-bar a:hover { width: 30px; height: 30px; line-height: 30px; border: 0; background: transparent; font-size: 17px; font-weight: 400; color: #1D1D1F; }
.leaflet-bar a:first-child { border-bottom: 0; position: relative; }
.leaflet-bar a:first-child::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 0; height: 1px; background: rgba(0,0,0,.1); }
.leaflet-control-attribution { background: rgba(255,255,255,.5) !important; border-radius: 6px 0 0 0; font-size: 9px; }
path.leaflet-interactive { transform-box: fill-box; transform-origin: center; transition: scale .26s var(--curva); }
path.leaflet-interactive:hover { scale: 1.6; }
path.leaflet-interactive.anillo-sel { pointer-events: none; }
.leaflet-tooltip.tip {
  font-family: inherit; font-size: 12px; font-weight: 500; color: #1D1D1F; padding: 5px 11px; border: 0; border-radius: 9px;
  background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 #FFFFFF, 0 4px 14px rgba(0,0,0,.16);
}
.leaflet-tooltip-top.tip::before { border-top-color: rgba(255,255,255,.7); }
.mapa-lista { max-height: 560px; }
.mapa-lista button { border-bottom: 1px solid rgba(0,0,0,.07); border-radius: 9px; }
.mapa-lista button:hover { background: rgba(255,255,255,.5); }
.leyenda-mapa { display: flex; gap: 6px; }

/* ---------- Controles ---------- */
.filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
/* Las barras que solo contienen filtros del portafolio se manejan desde el botón «Filtros» de la cabecera */
.vista .filtros[role="search"] { display: none; }
.vista [data-filtros]:empty, .vista [data-filtros]:not(:has(> :not([role="search"]))) { display: none; }
.filtros select, .filtros input[type="search"], .campo-s {
  height: 26px; border: 0; border-radius: 6px; background-color: rgba(118,118,128,.12); padding: 0 22px 0 10px; font-size: 12px; color: #1D1D1F; max-width: 220px;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='11' height='11' fill='none' stroke='%236E6E73' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 9.5 4-4 4 4M8 14.5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; background-size: 11px 11px;
}
.filtros input[type="search"], input.campo-s { background-image: none; padding: 0 10px; width: 220px; }
.filtros input[type="search"]:focus, .filtros select:focus { outline: none; box-shadow: 0 0 0 3px rgba(51,102,204,.25); }
.chip {
  height: 26px; padding: 0 10px; border-radius: 6px; border: 0; background: rgba(118,118,128,.12);
  font-size: 12px; font-weight: 500; color: #1D1D1F; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.chip:hover { border: 0; color: #1D1D1F; background: rgba(118,118,128,.18); }
.chip[aria-pressed="true"] { background: #FFFFFF; color: #1D1D1F; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.14); }
.chip .dot { width: 8px; height: 8px; border-radius: 4px; }
.limpiar { background: none; border: 0; color: #3366CC; font-size: 12px; font-weight: 500; padding: 0 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 16px; border: 0; border-radius: 16px;
  background: #3366CC; color: #FFFFFF; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 12px rgba(51,102,204,.35);
}
.btn:hover { background: #3366CC; color: #FFFFFF; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-2, .btn-2:hover { background: rgba(255,255,255,.6); color: #1D1D1F; font-weight: 500; border: 0; box-shadow: inset 0 1px 0 #FFFFFF, 0 2px 8px rgba(0,0,0,.1); }
.btn-peligro, .btn-peligro:hover { background: rgba(255,255,255,.6); color: #B0001E; border: 0; box-shadow: inset 0 1px 0 #FFFFFF, 0 2px 8px rgba(0,0,0,.1); }
.btn-s { height: 28px; padding: 0 12px; border-radius: 14px; font-size: 12px; }

.sem { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sem i { width: 9px; height: 9px; border-radius: 5px; flex: none; }
.sem-amarillo i { box-shadow: none; }
.etq { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: rgba(118,118,128,.14); color: #48484A; white-space: nowrap; box-sizing: border-box; vertical-align: middle; }
.etq-rojo { background: rgba(216,0,37,.1); color: #B0001E; }
.etq-amarillo { background: rgba(255,200,0,.18); color: #8A6A00; }
.etq-verde { background: rgba(6,132,96,.12); color: #056B4E; }
.etq-azul { background: rgba(0,49,137,.1); color: #003189; }
.etq-marine { background: rgba(51,102,204,.1); color: #254E9E; }

.barra { height: 6px; border-radius: 3px; background: rgba(118,118,128,.14); }
.barra > i { border-radius: 3px; background: #3366CC; }
.barra > b { top: -3px; bottom: -3px; width: 2px; background: #1D1D1F; border-radius: 1px; }
.barra.b-rojo > i { background: #D80025; } .barra.b-amarillo > i { background: #FFC800; } .barra.b-verde > i { background: #068460; }
.avance span { font-size: 11px; font-weight: 600; }

/* Segmentados (pestañas dentro de tarjetas y fichas): control gris de macOS */
.tabs { display: inline-flex; gap: 2px; padding: 2px; border: 0; border-radius: 7px; background: rgba(118,118,128,.12); overflow-x: auto; max-width: 100%; margin-bottom: 16px; scrollbar-width: none; align-self: flex-start; }
.tabs button { height: 22px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; font-size: 12px; font-weight: 400; color: #1D1D1F; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.tabs button[aria-selected="true"] { background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.14); font-weight: 600; color: #1D1D1F; border: 0; }
.tabs button .etq { margin-left: 2px; height: 16px; padding: 0 6px; font-size: 10px; }
.leyenda-mapa .chip[aria-pressed="true"] { background: #FFFFFF; }

/* Tablas */
.tabla-env { overflow-x: auto; }
.tabla { font-size: 13px; }
.tabla th { font-size: 11px; font-weight: 600; color: #55555C; padding: 8px 12px; border-bottom: 1px solid rgba(0,0,0,.07); background: transparent; position: static; }
.tabla th button { font-weight: 600; }
.tabla td { padding: 9px 12px; border-bottom: 1px solid rgba(0,0,0,.07); }
.tabla tbody tr:last-child > td { border-bottom: 0; }
.tabla tbody tr.fila { transition: background .2s ease; }
.tabla tbody tr.fila:hover { background: rgba(255,255,255,.5); }
.tabla tr.abierta { background: rgba(255,255,255,.4); }
.tabla tr.detalle > td { background: rgba(255,255,255,.35); border-bottom: 1px solid rgba(0,0,0,.07); }
.tabla .exp { border-radius: 14px; color: #55555C; }
.tabla .exp:hover { background: rgba(118,118,128,.12); color: #1D1D1F; }
.tabla .enlace, .enlace { color: #3366CC; font-weight: 600; }
.tabla .enlace:hover, .enlace:hover { text-decoration: none; color: #254E9E; }
.tabla-pie { font-size: 11px; color: #55555C; }
.tabla-pie button { border: 0; border-radius: 14px; padding: 5px 12px; font-weight: 500; background: rgba(255,255,255,.6); box-shadow: inset 0 1px 0 #FFFFFF, 0 2px 8px rgba(0,0,0,.1); }
.celda-mapa { border-radius: 6px; font-weight: 600; }
.matriz th, .matriz td { border-bottom: 1px solid rgba(0,0,0,.07); }
.matriz thead th { background: transparent; }
.matriz .perms label { border: 0; border-radius: 6px; background: rgba(118,118,128,.12); }
.matriz .perms label:has(input:checked) { background: #3366CC; }

/* Formularios */
.form label { font-size: 12px; font-weight: 600; color: #48484A; }
.form input, .form select, .form textarea {
  border: 0; border-radius: 8px; background: rgba(255,255,255,.7); min-height: 32px; font-size: 13px; color: #1D1D1F;
  box-shadow: inset 0 1px 1px #FFFFFF, inset 0 0 0 1px rgba(0,0,0,.08);
}
.form input:focus, .form select:focus, .form textarea:focus { box-shadow: inset 0 0 0 1.5px #3366CC, 0 0 0 4px rgba(51,102,204,.15); }
.form input[readonly] { background: rgba(118,118,128,.08); }
.form-sec { font-size: 13px; font-weight: 600; color: #1D1D1F; border-top: 1px solid rgba(0,0,0,.07); }
.rango input[type="range"] { accent-color: #3366CC; }
.estrellas button { border: 0; border-radius: 8px; background: rgba(255,255,255,.6); box-shadow: inset 0 1px 0 #FFFFFF, 0 2px 6px rgba(0,0,0,.08); }

/* Avisos */
.aviso { border: 0; border-radius: 12px; font-size: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.aviso-error { background: rgba(216,0,37,.1); color: #8E0019; }
.aviso-ok { background: rgba(6,132,96,.12); color: #045C43; }
.aviso-info { background: rgba(51,102,204,.1); color: #1F4386; }
.aviso-clave { background: rgba(255,200,0,.18); color: #5E4700; }
.vacio { color: #55555C; font-size: 12px; }
.vacio strong { color: #1D1D1F; font-size: 14px; font-weight: 600; }
.cargando { color: #55555C; }
.cargando::before { border-color: rgba(118,118,128,.2); border-top-color: #3366CC; }

/* Ficha técnica completa (contenido de las ventanas) */
.ficha-cab { gap: 6px; }
.ficha-objeto { color: #1D1D1F; font-size: 14px; font-weight: 600; line-height: 1.45; }
.mini-kpis { display: flex; flex-wrap: wrap; gap: 10px; border: 0; margin-bottom: 16px; }
.mini-kpis div { flex: 1 1 130px; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 1px; padding: 9px 12px; border: 0; border-radius: 16px; background: rgba(255,255,255,.34); box-shadow: inset 0 1px 1px rgba(255,255,255,.95), inset 0 0 0 1px rgba(255,255,255,.45); }
.mini-kpis div:first-child { border-left: 0; }
.mini-kpis b { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.mini-kpis span { font-size: 11px; color: #48484A; }
.bloque { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.bloque > h3 { padding-left: 4px; margin: 0; font-size: 11px; font-weight: 600; color: #55555C; letter-spacing: 0; }
.bloque > .datos, .bloque > .tabla-env, .bloque > div:not(.grafica):not(.acciones):not(.mini-kpis):not(.alerta), .bloque > .linea-tiempo {
  padding: 4px 12px; border-radius: 14px; background: rgba(255,255,255,.58); box-shadow: var(--caja-sombra);
}
.bloque > .grafica { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.58); box-shadow: var(--caja-sombra); box-sizing: content-box; }
.datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; }
.datos > div { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.07); }
.datos dt { flex-grow: 1; font-size: 13px; color: #1D1D1F; font-weight: 400; }
.datos dd { margin: 0; font-weight: 600; text-align: right; }
.datos .ancho { flex-direction: column; align-items: stretch; gap: 2px; }
.datos .ancho dd { text-align: left; font-weight: 400; }
.nota-grafica { font-size: 11px; color: #55555C; }
.alerta { border-bottom: 1px solid rgba(0,0,0,.07); }
.alerta::before { background: #FFC800; }
.alerta.a-rojo::before { background: #D80025; }
.alerta p { color: #48484A; font-size: 12px; }
.alerta .rec { background: rgba(255,255,255,.55); border-radius: 10px; font-size: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.linea-tiempo li { border-left-color: rgba(0,0,0,.1); font-size: 12px; }
.linea-tiempo li::before { background: #3366CC; }
.linea-tiempo time { color: #55555C; }

/* Decisiones y alertas */
.casos { gap: 0; padding: 6px; border-radius: 14px; background: rgba(255,255,255,.5); -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%); box-shadow: var(--tarjeta-sombra); top: 76px; max-height: calc(100vh - 110px); }
.caso { background: transparent; border: 0; border-left: 0; border-radius: 9px; padding: 9px 10px 9px 29px; position: relative; gap: 2px; color: #1D1D1F; }
.caso::before { content: ""; position: absolute; left: 10px; top: 14px; width: 9px; height: 9px; border-radius: 5px; background: #FFC800; }
.caso.c-rojo::before { background: #D80025; }
.caso + .caso { box-shadow: 0 -1px 0 rgba(0,0,0,.07); border-top-left-radius: 0; border-top-right-radius: 0; }
.caso:hover { border: 0; }
.caso[aria-current="true"], .caso.c-rojo[aria-current="true"] { background: #3366CC; color: #FFFFFF; border: 0; box-shadow: none; }
.caso[aria-current="true"]::before { background: #FFFFFF; box-shadow: inset 0 0 0 3px #FFC800; }
.caso.c-rojo[aria-current="true"]::before { box-shadow: inset 0 0 0 3px #D80025; }
.caso[aria-current="true"] + .caso { box-shadow: none; }
.caso .t { font-weight: 600; }
.caso .m { font-size: 12px; color: #55555C; }
.caso .al { font-size: 12px; color: #48484A; }
.caso[aria-current="true"] .m, .caso[aria-current="true"] .al { color: #FFFFFF; opacity: .85; }
.caso[aria-current="true"] .etq { background: rgba(255,255,255,.22); color: #FFFFFF; }
.contexto p { font-size: 14px; line-height: 1.5; }
.contexto p:first-child { font-weight: 600; }
.sugeridas li { border-bottom: 1px solid rgba(0,0,0,.07); }
.sugeridas li::before { background: rgba(255,200,0,.18); color: #8A6A00; font-weight: 700; }
.sugeridas li.s-rojo::before { background: rgba(216,0,37,.1); color: #B0001E; }
.sugeridas small { color: #55555C; font-weight: 600; }

/* Talento humano */
.org-git { border-top: 2px solid rgba(0,0,0,.07); gap: 14px; }
.org-conector { background: rgba(0,0,0,.1); }
.git { border: 0; border-radius: 18px; background: rgba(255,255,255,.5); -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%); box-shadow: var(--tarjeta-sombra); }
.git-cab h3 { font-size: 13px; font-weight: 600; }
.git-cab p { font-size: 11px; color: #55555C; }
.persona { border: 0; border-radius: 12px; background: rgba(255,255,255,.58); box-shadow: var(--caja-sombra); color: #1D1D1F; }
.persona:hover { border: 0; background: rgba(255,255,255,.75); }
.persona.coord { background: rgba(105,177,211,.14); }
.persona.dir { border: 0; box-shadow: inset 0 0 0 1.5px #3366CC, var(--caja-sombra); }
.persona .nom { font-weight: 600; }
.persona .car { font-size: 11px; color: #55555C; }
.persona .cal { font-weight: 700; font-size: 14px; }
.persona .cal small { color: #55555C; }
.persona .carga { background: rgba(118,118,128,.14); }
.c-baja { background: #8EB76A; } .c-media { background: #69B1D3; } .c-alta { background: #FFAB00; } .c-sobrecarga { background: #D80025; }
.diff pre { border: 0; border-radius: 10px; background: rgba(255,255,255,.6); box-shadow: var(--caja-sombra); }

/* ---------- Ventanas: ficha técnica completa (drawer) ---------- */
.velo { background: rgba(0,0,0,.08); z-index: 900; transition: opacity .34s ease; }
.velo.suelto { opacity: 0; pointer-events: none; }
.drawer {
  top: 12px; right: 12px; bottom: 12px; width: min(760px, calc(100vw - 24px)); border-radius: 30px; overflow: hidden;
  background: var(--hoja-fondo); -webkit-backdrop-filter: var(--hoja-filtro); backdrop-filter: var(--hoja-filtro);
  box-shadow: var(--hoja-sombra); animation: none; color: #1D1D1F;
  translate: 0 0; scale: 1; transition: translate .36s var(--curva), scale .26s var(--curva), box-shadow .24s ease;
}
.drawer.ancho { width: min(1040px, calc(100vw - 24px)); }
.drawer::before { content: ""; position: absolute; left: 26px; top: 3px; width: 190px; height: 16px; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%); pointer-events: none; z-index: 2; }
.drawer::after { content: ""; position: absolute; right: 30px; bottom: 3px; width: 140px; height: 12px; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.85), rgba(255,255,255,0) 70%); pointer-events: none; z-index: 2; }
.drawer-cab { align-items: center; gap: 10px; padding: 22px 24px 12px; border-bottom: 0; position: relative; }
.drawer-cab h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.drawer-cab .sub { font-size: 12px; color: #55555C; margin-top: 2px; }
.drawer-cab .icono, .hoja .cerrar {
  width: 30px; height: 30px; flex-shrink: 0; padding: 0; border: 0; border-radius: 15px; background: rgba(255,255,255,.45);
  box-shadow: inset 0 1px 1px #FFFFFF, inset 0 0 0 1px rgba(255,255,255,.6), 0 2px 6px rgba(0,0,0,.08);
  color: #3A3A3C; display: flex; align-items: center; justify-content: center; font-size: 0;
}
.drawer-cab .icono svg, .hoja .cerrar svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.drawer-cuerpo { padding: 6px 24px 28px; }
.drawer .tabs { margin: 0 0 16px; }
.drawer.arrastrando, .hoja.arrastrando { box-shadow: var(--hoja-sombra-arrastre); scale: 1.015; }

/* Asa y píldora para arrastrar las ventanas */
.asa { cursor: grab; touch-action: none; }
.arrastrando .asa { cursor: grabbing; }
.grabber {
  position: absolute; left: 50%; top: 7px; width: 38px; height: 5px; margin-left: -19px; padding: 0; border: 0; border-radius: 3px;
  background: rgba(60,60,67,.26); cursor: grab; touch-action: none; z-index: 3;
  transition: width .24s var(--curva), margin-left .24s var(--curva), background .2s ease;
}
.asa:hover ~ .grabber, .asa:hover .grabber, .grabber:hover, .grabber:focus-visible, .arrastrando .grabber { width: 52px; margin-left: -26px; background: rgba(60,60,67,.45); }
.drawer:has(.drawer-cab:hover) .grabber { width: 52px; margin-left: -26px; background: rgba(60,60,67,.45); }

/* ---------- Ficha técnica rápida (hoja de vidrio esmerilado) ---------- */
.hoja-velo { position: fixed; inset: 0; z-index: 955; background: rgba(0,0,0,.08); opacity: 0; pointer-events: none; transition: opacity .34s ease; }
.hoja-velo.visible { opacity: 1; pointer-events: auto; }
.hoja {
  position: fixed; top: 66px; left: 0; z-index: 960; width: 580px; max-width: calc(100vw - 24px); box-sizing: border-box;
  display: flex; flex-direction: column; gap: 14px; padding: 22px 24px 20px; border-radius: 30px;
  background: var(--hoja-fondo); -webkit-backdrop-filter: var(--hoja-filtro); backdrop-filter: var(--hoja-filtro);
  box-shadow: var(--hoja-sombra); color: #1D1D1F;
  opacity: 0; pointer-events: none; translate: 0 0; scale: 1;
  transition: translate .36s var(--curva), scale .26s var(--curva), box-shadow .24s ease;
}
.hoja.visible { opacity: 1; pointer-events: auto; }
.hoja .b1 { position: absolute; left: 26px; top: 3px; width: 190px; height: 16px; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%); pointer-events: none; }
.hoja .b2 { position: absolute; right: 30px; bottom: 3px; width: 140px; height: 12px; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.85), rgba(255,255,255,0) 70%); pointer-events: none; }
.hoja .h-cuerpo { display: contents; }
.hoja .h-cab { display: flex; align-items: center; gap: 10px; }
.hoja h2 { margin: 0; flex-grow: 1; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.hoja .chip-h { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.hoja .chip-h > i { width: 6px; height: 6px; border-radius: 3px; }
.hoja .chip-h.c-rojo { background: rgba(216,0,37,.12); color: #B0001E; } .hoja .chip-h.c-rojo > i { background: #D80025; }
.hoja .chip-h.c-amarillo { background: rgba(255,200,0,.2); color: #8A6A00; } .hoja .chip-h.c-amarillo > i { background: #FFC800; }
.hoja .chip-h.c-verde { background: rgba(6,132,96,.12); color: #056B4E; } .hoja .chip-h.c-verde > i { background: #068460; }
.hoja .chip-h.c-azul { background: rgba(0,49,137,.1); color: #003189; } .hoja .chip-h.c-azul > i { background: #003189; }
.hoja .resumen { font-size: 14px; font-weight: 600; line-height: 1.45; color: #1D1D1F; }
.hoja .metricas { display: flex; gap: 10px; }
.hoja .metricas > div { flex: 1 1 0; display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 16px; background: rgba(255,255,255,.34); box-shadow: inset 0 1px 1px rgba(255,255,255,.95), inset 0 0 0 1px rgba(255,255,255,.45); }
.hoja .metricas span { font-size: 11px; color: #48484A; }
.hoja .metricas b { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: #1D1D1F; }
.hoja .separador { height: 1px; margin: 2px 4px; background: rgba(255,255,255,.7); box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.hoja .menu { display: flex; flex-direction: column; gap: 2px; }
.hoja .mrow { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border: 0; border-radius: 13px; background: transparent; font-family: inherit; font-size: 14px; font-weight: 500; color: #1D1D1F; text-align: left; transition: scale .26s var(--curva), background .2s ease, box-shadow .2s ease !important; }
.hoja .mrow svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hoja .mrow:hover { scale: 1.02; background: rgba(255,255,255,.5) !important; box-shadow: inset 0 1px 1px #FFFFFF, inset 0 0 0 1px rgba(255,255,255,.5); }
.hoja .mrow:active { scale: .98; }
/* Descarga de la ficha técnica oficial (Excel y PDF): fila del menú con dos accesos cortos a la derecha */
.hoja .mrow-descarga { padding: 0 6px 0 0; gap: 6px; }
.hoja .mrow-descarga:hover { scale: 1; }
.hoja .mrow-descarga .d-zip { flex-grow: 1; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: 13px; color: #1D1D1F; text-decoration: none; }
.hoja .mrow-descarga .d-zip svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hoja .mrow-descarga .d-fmt { height: 26px; padding: 0 11px; display: inline-flex; align-items: center; border-radius: 13px; background: rgba(118,118,128,.12); color: #1D1D1F; font-size: 12px; font-weight: 600; text-decoration: none; transition: background .2s ease, scale .26s var(--curva); }
.hoja .mrow-descarga .d-fmt:hover { background: rgba(255,255,255,.85); scale: 1.06; }
.hoja .cargando { padding: 40px 0; }

/* ---------- Menús desplegables (diseño de «Casos priorizados») ---------- */
.menu-c {
  position: fixed; z-index: 1300; box-sizing: border-box; display: flex; flex-direction: column; padding: 6px; border-radius: 14px;
  background: rgba(255,255,255,.5); -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(255,255,255,.45), 0 10px 30px rgba(0,0,0,.12);
  color: #1D1D1F; font-size: 13px; opacity: 0; transform: translateY(-6px) scale(.96);
  transition: opacity .2s ease, transform .26s var(--curva);
}
.menu-c.arriba { transform: translateY(6px) scale(.96); }
.menu-c.visible { opacity: 1; transform: none; }
.menu-cab { display: flex; align-items: baseline; gap: 8px; padding: 6px 12px 6px; flex-shrink: 0; }
.menu-cab .t { flex-grow: 1; font-size: 14px; font-weight: 600; }
.menu-cab .s { font-size: 12px; color: #55555C; white-space: nowrap; }
.menu-accion { padding: 0; border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 500; color: #3366CC; white-space: nowrap; }
.menu-accion:hover { color: #254E9E; }
.menu-buscar { display: flex; align-items: center; gap: 6px; height: 28px; margin: 0 6px 6px; padding: 0 11px; border-radius: 14px; flex-shrink: 0; background: rgba(255,255,255,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 0 1px rgba(255,255,255,.4); color: #55555C; }
.menu-buscar svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-buscar input { flex-grow: 1; min-width: 0; height: 26px; border: 0; padding: 0; background: transparent; font: inherit; font-size: 13px; color: #1D1D1F; outline: none; }
.menu-lista { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; margin: 0 -6px; padding: 0 6px 2px; scrollbar-width: thin; overscroll-behavior: contain; }
.menu-grupo { display: flex; flex-direction: column; }
.menu-sec { flex-shrink: 0; padding: 10px 12px 4px; font-size: 11px; font-weight: 600; color: #55555C; }
.menu-vacio { padding: 14px 12px; color: #55555C; font-size: 12px; }
.sep-m { height: 1px; flex-shrink: 0; margin-left: 33px; background: rgba(0,0,0,.07); }
.fila-m {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding: 11px 12px; border: 0; border-radius: 10px; background: transparent;
  font: inherit; font-size: 13px; color: #1D1D1F; text-align: left; cursor: pointer; outline: none;
  transition: scale .26s var(--curva), background .2s ease, box-shadow .2s ease;
}
.fila-m .punto { width: 9px; height: 9px; flex-shrink: 0; border-radius: 5px; }
.fila-m .n { flex-grow: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-m .cnt { flex-shrink: 0; color: #48484A; white-space: nowrap; }
.fila-m .v { flex-shrink: 0; min-width: 64px; text-align: right; font-size: 12px; color: #55555C; white-space: nowrap; }
.fila-m .chk { flex-shrink: 0; fill: none; stroke: #3366CC; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.fila-m[aria-selected="true"] .chk, .fila-m[aria-checked="true"] .chk { opacity: 1; }
.fila-m:hover, .fila-m:focus-visible { scale: 1.04; background: rgba(255,255,255,.5); }
.fila-m:focus-visible { box-shadow: inset 0 0 0 2px rgba(51,102,204,.45); }
.fila-m:active { scale: .98; }
.fila-m:disabled { opacity: .45; cursor: default; scale: 1; }

/* Disparador de las listas desplegables (reemplaza visualmente a <select>) */
.sel-oculto { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden; clip: rect(0 0 0 0); border: 0 !important; opacity: 0; pointer-events: none; }
.sel-m {
  display: inline-flex; align-items: center; height: 26px; max-width: 320px; box-sizing: border-box; padding: 0 24px 0 10px; border: 0; border-radius: 6px;
  background-color: rgba(118,118,128,.12); font: inherit; font-size: 12px; font-weight: 400; color: #1D1D1F; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='11' height='11' fill='none' stroke='%236E6E73' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 9.5 4-4 4 4M8 14.5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center; background-size: 11px 11px;
  transition: background-color .2s ease, scale .26s var(--curva);
}
.sel-m.activo { background-color: rgba(51,102,204,.14); font-weight: 600; }
.sel-m[aria-expanded="true"] { background-color: rgba(118,118,128,.22); }
.sel-m.activo[aria-expanded="true"] { background-color: rgba(51,102,204,.22); }
.sel-m:disabled { opacity: .55; cursor: default; }
.sel-m.sel-form, .form .sel-m {
  display: flex; width: 100%; max-width: none; height: auto; min-height: 32px; padding: 6px 28px 6px 10px; border-radius: 8px;
  background-color: rgba(255,255,255,.7); box-shadow: inset 0 1px 1px #FFFFFF, inset 0 0 0 1px rgba(0,0,0,.08); font-size: 13px; font-weight: 400; background-position: right 10px center;
}
.form .sel-m[aria-expanded="true"], .form .sel-m:focus-visible { box-shadow: inset 0 0 0 1.5px #3366CC, 0 0 0 4px rgba(51,102,204,.15); outline: none; }
.drawer .sel-m:hover, .hoja .sel-m:hover, .inspector .sel-m:hover, .form .sel-m:hover { scale: 1 !important; }
.vista .sel-m:hover { scale: 1.045; }

/* ---------- Lienzo acomodable (v2.7): filas llenas, piezas que se mueven y cambian de tamaño ---------- */
.lz { position: relative; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lz-fila { display: flex; gap: 14px; align-items: stretch; min-width: 0; transition: height .36s var(--curva); }
.lz-fila[data-h] { height: var(--h); }
/* Espacio libre de la fila (una pieza sola achicada): ocupa el peso --hueco y anula su propio espacio entre piezas */
.lz-fila::after { content: ""; flex: var(--hueco, 0) 1 0px; margin-left: -14px; min-width: 0; pointer-events: none; }
.lz-fila[data-hueco]::after { margin-left: 0; box-sizing: border-box; border-radius: 18px; border: 1.5px dashed rgba(60,60,67,.2); background: rgba(255,255,255,.18); }
.lz-fila.estirando, .lz-fila.estirando > .wg { transition: none !important; }
.lz .mt, .lz .mb, .wg > :not(.wg-bar):not(.wg-tam):not(.wg-borde):not(.wg-pista) { margin: 0 !important; }
.wg { position: relative; flex: 1 1 0px; min-width: 0; container-type: inline-size; transition: flex-grow .36s var(--curva); --z: clamp(.72px, 100cqi / var(--w0, 300), 2.2px); }
.lz-fila[data-h] > .wg { container-type: size; --z: clamp(.72px, min(100cqi / var(--w0, 300), 100cqh / var(--h0, 200)), 2.2px); }
.wg > :not(.wg-bar):not(.wg-tam):not(.wg-borde):not(.wg-pista) { height: 100%; box-sizing: border-box; min-width: 0; }
.wg > .atencion { width: auto; }
/* Pieza marcada «No aplicar filtros»: mientras la página tiene filtros, una etiqueta lo recuerda sobre el borde */
.lz.filtrada .wg[data-sf="1"]::after {
  content: "Sin filtros"; position: absolute; left: 14px; top: -10px; z-index: 4; height: 20px; padding: 0 9px;
  display: flex; align-items: center; border-radius: 10px; font-size: 11px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  color: #55555C; background: rgba(255,255,255,.92); box-shadow: inset 0 0 0 1px rgba(60,60,67,.14), 0 2px 8px rgba(0,0,0,.08); pointer-events: none;
}
.wg > .panel:not(.mapa-sec) { display: flex; flex-direction: column; }
.wg > .panel > .grafica { flex: 1 0 auto; }
.lz-fila[data-h] .wg > .panel:not(.mapa-sec) { overflow: hidden; }
.lz-fila[data-h] .wg > .panel:not(.mapa-sec) > :not(.panel-cab):not(.nota-grafica) { flex: 1 1 auto; min-height: 0; }
.lz-fila[data-h] .wg > .panel > .grafica { height: auto; min-height: 90px; }
.lz-fila[data-h] .wg > .panel:not(.mapa-sec) > :not(.panel-cab):not(.grafica):not(.nota-grafica) { overflow: auto; scrollbar-width: thin; }
.w-lista { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.lz-fila[data-h] .w-lista > .lista-filas, .lz-fila[data-h] .wg > .atencion > .lista-c { flex: 0 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
/* El contenido de tarjetas y anillos crece o se achica con la pieza (--z = 1px en el tamaño original) */
.wg .t-label, .wg .t-nota, .wg .kpi .l, .wg .kpi .n, .wg .leyenda-c, .wg .cifras-c span { font-size: calc(var(--z) * 12); }
.wg .t-valor, .wg .kpi .v, .wg .kpi .v.v-largo { font-size: calc(var(--z) * 30); }
.wg .t-alta { height: 100%; min-height: calc(var(--z) * 196); }
.lz-fila[data-h] .wg .t-alta { min-height: 0; }
.wg .ring, .wg .ring-centro { width: calc(var(--z) * 124); height: calc(var(--z) * 124); }
.wg .ring svg, .wg svg.ring { width: 100%; height: 100%; }
.wg svg.ring { width: calc(var(--z) * 124); height: calc(var(--z) * 124); }
.wg .ring-centro b { font-size: calc(var(--z) * 26); }
.wg .ring-centro span, .wg .mini-c a span { font-size: calc(var(--z) * 11); }
.wg .cifras-c b { font-size: calc(var(--z) * 22); }
.wg .mini-c a b { font-size: calc(var(--z) * 18); }
/* Cápsula de opciones (mover · opciones) y esquina para cambiar el tamaño */
.wg-bar {
  position: absolute; top: -13px; left: 50%; translate: -50% 0; z-index: 6; display: flex; gap: 1px; padding: 2px; border-radius: 12px;
  background: rgba(255,255,255,.62); -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
  box-shadow: inset 0 1px 0 #FFFFFF, inset 0 0 0 1px rgba(255,255,255,.5), 0 4px 12px rgba(0,0,0,.12);
}
.wg-b { width: 26px; height: 24px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #3A3A3C; display: flex; align-items: center; justify-content: center; }
.wg-mover { cursor: grab; touch-action: none; }
.wg-b:hover { background: rgba(255,255,255,.9); }
.wg-tam {
  position: absolute; right: 0; bottom: 0; z-index: 6; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 0 0 18px 0;
  background: transparent; color: rgba(60,60,67,.38); cursor: nwse-resize; display: flex; align-items: center; justify-content: center; touch-action: none;
  transition: color .2s ease, scale .26s var(--curva), opacity .2s ease;
}
.wg-tam svg { display: block; filter: drop-shadow(0 1px 0 rgba(255,255,255,.9)); }
.wg:hover > .wg-tam, .wg:focus-within > .wg-tam, .wg.estirando > .wg-tam { color: #3366CC; }
.wg-tam:hover, .wg.estirando > .wg-tam { scale: 1.14; }
/* Bordes derecho (ancho) e inferior (alto): se toman en el espacio entre piezas */
.wg-borde { position: absolute; z-index: 5; touch-action: none; }
.wg-borde-d { top: 22px; bottom: 34px; right: -11px; width: 10px; cursor: ew-resize; }
.wg-borde-i { left: 22px; right: 34px; bottom: -12px; height: 10px; cursor: ns-resize; }
.wg-borde::after { content: ""; position: absolute; border-radius: 2px; background: #3366CC; opacity: 0; transition: opacity .2s ease; box-shadow: 0 0 10px rgba(51,102,204,.45); }
.wg-borde-d::after { left: 3px; top: 0; bottom: 0; width: 4px; }
.wg-borde-i::after { top: 3px; left: 0; right: 0; height: 4px; }
.wg-borde:hover::after, html.lz-eje-x .wg.estirando > .wg-borde-d::after, html.lz-eje-y .wg.estirando > .wg-borde-i::after { opacity: 1; }
/* Pista de una sola vez junto a la esquina */
.wg-pista {
  position: absolute; right: 6px; bottom: 40px; z-index: 7; padding: 6px 11px; border-radius: 12px; white-space: nowrap; pointer-events: none;
  background: rgba(30,30,34,.84); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: #FFFFFF; font-size: 12px; font-weight: 500;
  box-shadow: 0 6px 18px rgba(0,0,0,.2); opacity: 0; translate: 0 6px; transition: opacity .26s ease, translate .36s var(--curva);
}
.wg.pista > .wg-pista { opacity: 1; translate: 0 0; }
.wg.pista > .wg-tam { color: #3366CC; animation: lz-latir 1.1s var(--curva) 2; }
@keyframes lz-latir { 0%, 100% { scale: 1; } 45% { scale: 1.28; } }
html.lz-eje-x, html.lz-eje-x * { cursor: ew-resize !important; }
html.lz-eje-y, html.lz-eje-y * { cursor: ns-resize !important; }
.wg-b:focus-visible, .wg-tam:focus-visible { outline: 2px solid #3366CC; outline-offset: 1px; }
.cabecera .capsula button.wg-b:hover { scale: 1; }
.wg.arrastrando { z-index: 30; scale: 1.03; filter: drop-shadow(0 22px 34px rgba(0,0,0,.2)); transition: scale .26s var(--curva), filter .26s ease; }
.wg.aterriza { animation: lz-aterriza .36s var(--curva); }
@keyframes lz-aterriza { 0% { scale: .94; opacity: .55; } 100% { scale: 1; opacity: 1; } }
html.lz-moviendo, html.lz-moviendo * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
html.lz-estirando, html.lz-estirando * { cursor: nwse-resize !important; user-select: none; -webkit-user-select: none; }
html.lz-moviendo .vista section:hover, html.lz-estirando .vista section:hover, html.lz-moviendo .vista .kpi:hover, html.lz-estirando .vista .kpi:hover,
html.lz-moviendo .vista .tarjeta:hover, html.lz-estirando .vista .tarjeta:hover, html.lz-moviendo .vista section:hover .ring, html.lz-estirando .vista section:hover .ring { scale: 1 !important; }
.lz-guia { position: absolute; z-index: 20; border-radius: 3px; background: #3366CC; box-shadow: 0 0 0 3px rgba(51,102,204,.18), 0 0 16px rgba(51,102,204,.55); pointer-events: none; }
.lz-oculto { position: absolute; left: -20000px; top: 0; visibility: hidden; pointer-events: none; }
.lz-vacia { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 64px 24px; border-radius: 18px; background: rgba(255,255,255,.4); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7); text-align: center; }
.lz-vacia strong { font-size: 15px; }
.lz-vacia span { max-width: 400px; font-size: 13px; line-height: 1.5; color: #55555C; }
.lz-restablecer { margin-top: 4px; height: 32px; padding: 0 16px; border: 0; border-radius: 16px; background: #3366CC; color: #FFFFFF; font: inherit; font-size: 13px; font-weight: 600; }
.lz-aviso {
  position: fixed; left: 50%; bottom: 22px; z-index: 1250; display: flex; align-items: center; gap: 14px; max-width: min(560px, calc(100vw - 32px)); padding: 9px 10px 9px 18px;
  border-radius: 22px; background: rgba(30,30,34,.84); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 10px 30px rgba(0,0,0,.22);
  color: #FFFFFF; font-size: 13px; opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: opacity .24s ease, transform .36s var(--curva);
}
.lz-aviso.visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.lz-aviso button { height: 28px; padding: 0 14px; border: 0; border-radius: 14px; background: rgba(255,255,255,.16); color: #FFFFFF; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; }
.lz-aviso button:hover { background: rgba(255,255,255,.26); }
.lz-quieto .lz-fila, .lz-quieto .wg { transition: none !important; }
.wg.esperando > .wg-bar, .wg.esperando > .wg-tam, .wg.esperando > .wg-borde { display: none; }
.lz-espera { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 140px; border-radius: 18px; background: rgba(255,255,255,.42); box-shadow: var(--tarjeta-sombra); color: #55555C; font-size: 12px; overflow: hidden; position: relative; }
.lz-espera i { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); background-size: 220% 100%; animation: lz-brillo 1.4s ease-in-out infinite; }
@keyframes lz-brillo { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
@media (hover: none) and (min-width: 961px) { .wg-bar { opacity: .92; } .wg-tam { color: #3366CC; } }
@media print { .wg-bar, .wg-tam, .wg-borde, .wg-pista, .lz-guia, .lz-aviso, .lz-espera { display: none !important; } .lz-fila { break-inside: avoid; } }
@media (max-width: 960px) {
  .lz-fila { flex-direction: column; height: auto !important; }
  .lz-fila > .wg { flex-grow: 1 !important; }
  .lz-fila[data-h] > .wg { container-type: inline-size; min-height: 240px; }
  .wg-bar, .wg-tam, .wg-borde, .wg-pista { display: none; }
}

/* ---------- Gota-lupa de vidrio líquido ---------- */
.lente { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; overflow: hidden; background: rgba(255,255,255,.3); opacity: 0; transition: transform .36s var(--curva), width .36s var(--curva), opacity .25s ease; }
.lente .copia { position: absolute; left: 0; top: 0; margin: 0; pointer-events: none; transition: left .36s var(--curva), top .36s var(--curva), transform-origin .36s var(--curva); }
.lente .centro { position: absolute; inset: 0; }
.lente .brillo, .lente .brillo2 { position: absolute; border-radius: 50%; }
.lente .aro { position: absolute; inset: 0; box-sizing: border-box; box-shadow: var(--aro-lente); }
.lente .copia a, .lente .copia span, .lente .copia button { pointer-events: none; }
.lente .copia, .lente .copia * { scale: none !important; }
.lente .copia a { box-shadow: none !important; }
/* Estiramiento de la gota al moverse: un solo impulso (nombres alternos para que se reinicie en cada cambio) */
@keyframes gotaH1 { 0% { scale: 1 1; } 40% { scale: 1.16 .88; } 100% { scale: 1 1; } }
@keyframes gotaH2 { 0% { scale: 1 1; } 40% { scale: 1.16 .88; } 100% { scale: 1 1; } }
@keyframes gotaV1 { 0% { scale: 1 1; } 40% { scale: .92 1.18; } 100% { scale: 1 1; } }
@keyframes gotaV2 { 0% { scale: 1 1; } 40% { scale: .92 1.18; } 100% { scale: 1 1; } }

/* ---------- Efecto Genio ---------- */
.genio { position: fixed; z-index: 1100; pointer-events: none; }
.genio > .franja { position: absolute; left: 0; top: 0; overflow: hidden; will-change: transform, opacity; animation: genie .3s linear both; }
/* Embudo de un solo tirón: cada franja se estrecha y viaja a la vez hacia un solo punto */
@keyframes genie {
  0% { transform: translate(calc(var(--dx) * 0.000), calc(var(--dy) * 0.000)) scale(1.000, 1.000); opacity: 1.00; }
  10% { transform: translate(calc(var(--dx) * 0.032), calc(var(--dy) * 0.032)) scale(0.781, 0.991); opacity: 1.00; }
  20% { transform: translate(calc(var(--dx) * 0.089), calc(var(--dy) * 0.089)) scale(0.594, 0.962); opacity: 1.00; }
  30% { transform: translate(calc(var(--dx) * 0.164), calc(var(--dy) * 0.164)) scale(0.436, 0.914); opacity: 1.00; }
  40% { transform: translate(calc(var(--dx) * 0.253), calc(var(--dy) * 0.253)) scale(0.308, 0.848); opacity: 1.00; }
  50% { transform: translate(calc(var(--dx) * 0.354), calc(var(--dy) * 0.354)) scale(0.206, 0.762); opacity: 1.00; }
  60% { transform: translate(calc(var(--dx) * 0.465), calc(var(--dy) * 0.465)) scale(0.129, 0.658); opacity: 1.00; }
  70% { transform: translate(calc(var(--dx) * 0.586), calc(var(--dy) * 0.586)) scale(0.074, 0.535); opacity: 1.00; }
  80% { transform: translate(calc(var(--dx) * 0.716), calc(var(--dy) * 0.716)) scale(0.041, 0.392); opacity: 1.00; }
  90% { transform: translate(calc(var(--dx) * 0.854), calc(var(--dy) * 0.854)) scale(0.024, 0.231); opacity: 0.73; }
  100% { transform: translate(calc(var(--dx) * 1.000), calc(var(--dy) * 1.000)) scale(0.020, 0.050); opacity: 0.20; }
}

/* Notificaciones */
.toast { border-radius: 16px; background: rgba(30,30,34,.82); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 10px 30px rgba(0,0,0,.2); font-size: 12px; }
.toast.t-error { background: rgba(142,0,25,.88); }
.toast.t-ok { background: rgba(4,92,67,.88); }
.toast.t-info { background: rgba(0,49,137,.85); }

/* ---------- Crecer al pasar el cursor (reglas de la variante C) ---------- */
.cabecera .capsula button, .subnav a, .rail nav a, .rail nav a svg, .vista a, .vista section, .kpi, .tarjeta, .rail button, .inspector button,
.drawer button, .hoja button, .dock .d-btn {
  transition: scale .26s var(--curva), background .2s ease, box-shadow .2s ease, font-weight .2s ease;
}
.dock .d-btn { transition: scale .26s var(--curva), width .3s var(--curva), height .3s var(--curva), font-size .3s var(--curva), border-radius .3s var(--curva); }
.cabecera .capsula button:hover { scale: 1.24; }
.cabecera .capsula button:hover + button, .cabecera .capsula button:has(+ button:hover) { scale: 1.1; }
.cabecera .capsula button:disabled:hover { scale: 1; }
.subnav a:hover { scale: 1.1; }
.rail nav a:hover { scale: 1.07; }
.rail nav a:hover + a, .rail nav a:has(+ a:hover) { scale: 1.025; }
.rail nav a:hover svg { scale: 1.3; }
.rail nav a[aria-current="page"]:hover, .rail nav a[aria-current="page"]:hover svg { scale: 1; }
.vista a:hover { scale: 1.045; }
.vista .tabla a:hover, .vista a.btn:hover { scale: 1.045; }
.vista section:hover, .vista .kpi:hover, .vista .tarjeta:hover { scale: 1.035; }
.vista section:has(.tabla-env, form, .grafica, .org-git, .matriz):hover { scale: 1; }
.vista .panel[data-detalle]:hover { scale: 1; }
.vista section:hover .ring { scale: 1.16; }
.rail button:hover, .inspector button:hover, .hoja button:hover, .drawer button:hover { scale: 1.09; }
.drawer .tabla button:hover, .drawer .tabs button:hover, .hoja .mrow:hover { scale: 1.02; }
.cabecera .capsula button:active, .rail button:active, .inspector button:active, .hoja button:active, .drawer button:active, .vista a:active { scale: .95; }
.fila-c:hover { scale: 1.04; background: rgba(255,255,255,.5); border-radius: 10px; }
.lista-c > a:hover { scale: 1.045; }
.caso { transition: scale .26s var(--curva), background .2s ease; }
.caso:hover { scale: 1.045; }
.vista button.chip:hover, .vista .btn:hover { scale: 1.045; }
.dock .d-btn:hover { scale: 1; }

/* ---------- Ingreso: tarjeta de vidrio ---------- */
.pantalla-ingreso { background: transparent; }
.pantalla-ingreso > .banda { display: none; }
.ingreso form, .ingreso > div { background: rgba(255,255,255,.46); -webkit-backdrop-filter: blur(40px) saturate(185%) brightness(1.06); backdrop-filter: blur(40px) saturate(185%) brightness(1.06);
  border-radius: 30px; padding: 34px 32px 30px; box-shadow: var(--hoja-sombra); max-width: 380px; }
.ingreso > div form { background: none; box-shadow: none; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.marca { display: flex; flex-direction: column; align-items: center; color: #1D1D1F; font-weight: 700; font-size: 2rem; letter-spacing: .2em; margin: 0 0 28px; }
.marca img { width: 96px; height: 96px; margin-bottom: 14px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.18)); }
.marca::after { margin-top: 16px; height: 4px; border-radius: 2px; }
.ingreso label { font-weight: 600; font-size: 12px; color: #48484A; }
.ingreso input { border: 0; border-radius: 14px; background: rgba(255,255,255,.7); box-shadow: inset 0 1px 1px #FFFFFF, inset 0 0 0 1px rgba(0,0,0,.08); font-size: 14px; }
.ingreso input:focus { box-shadow: inset 0 0 0 1.5px #3366CC, 0 0 0 4px rgba(51,102,204,.15); }
.ingreso .btn { border-radius: 23px; height: 46px; font-size: 14px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) {
  .insp-env { position: fixed; right: 0; top: 56px; z-index: 700; width: 322px; }
  body.sin-insp .insp-env, body:not(.insp-abierto) .insp-env { width: 0; }
  .inspector { top: 0; height: calc(100vh - 66px); margin: 0 10px 10px 0; }
  .fila-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .fila-3, .fila-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .geo-fila2 { flex-direction: column; height: auto; }
  .mapa-sec { height: 520px; flex-grow: 0; }
  .atencion { width: auto; }
  .kpis:has(> :nth-child(4):last-child), .kpis:has(> :nth-child(6):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cabecera .titulos .sub { display: none; }
}
@media (max-width: 960px) {
  .app { display: block; }
  .pulso .seg { min-width: 8px; padding: 0 5px; }
  .pulso .seg-t { overflow: hidden; text-overflow: ellipsis; }
  .rail-env { position: fixed; left: 0; top: 0; bottom: 0; z-index: 950; width: 248px; transform: translateX(-100%); transition: transform .34s var(--curva); overflow: visible; }
  .rail-env:has(.rail.abierto) { transform: none; }
  body.sin-rail .rail-env { width: 248px; }
  body.sin-rail .rail { opacity: 1; }
  .rail { top: 10px; }
  .cabecera { padding: 0 10px; gap: 8px; }
  .cabecera .titulos { display: none; }
  .isla-sub { overflow-x: auto; scrollbar-width: none; }
  .subnav a { min-width: 0; }
  .vista { padding: 24px 12px 24px; }
  .fila-3, .fila-4, .kpis, .kpis:has(> :nth-child(4):last-child), .kpis:has(> :nth-child(6):last-child) { grid-template-columns: minmax(0, 1fr); }
  .drawer { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; }
  .drawer.ancho { width: 100vw; }
  .hoja { left: 12px !important; right: 12px; width: auto; }
  .hoja .metricas { flex-direction: column; }
  .t-alta { height: auto; }
  .mapa-cab { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .cabecera .capsula button, .subnav a, .rail nav a, .rail nav a svg, .vista a, .vista section, .kpi, .tarjeta, .rail button, .inspector button,
  .drawer button, .hoja button, .ring, .fila-c, .lista-c > a, .caso, path.leaflet-interactive, .fila-m, .sel-m { scale: none !important; }
  .menu-c { transition: none !important; }
  .lente, .lente .copia, .drawer, .hoja, .rail-env, .insp-env { transition: none !important; }
  .genio > .franja { animation-duration: .01ms !important; animation-delay: 0s !important; }
  .lente { animation: none !important; }
  .onda { display: none !important; }
  .barra-filtros, .pulso, .pulso .seg { transition: none !important; }
  .wg, .lz-fila, .lz-aviso { transition: none !important; animation: none !important; }
  .lz-espera i, .wg.pista > .wg-tam { animation: none !important; }
  .rail-marca .latido { animation: none !important; }
  .huevo, .huevo-velo { transition: none !important; }
  .huevo-ico { animation: none !important; }
  .sonido-sw .sw-nivel, .sonido-sw .sw-t2 { transition: none !important; }
}
@media print {
  body { background: #fff; }
  .rail-env, .cabecera, .insp-env, .toasts, .filtros, .btn, .dock { display: none !important; }
  .panel, .tarjeta, .kpi { box-shadow: none; background: #fff; }
}

/* ---------- Control DIH dentro del vidrio líquido ----------
   El artefacto se diseñó para ~1.160 px sin inspector. Dentro de la columna central (más angosta) sus
   contenedores no deben crecer al ancho de las tablas: las tablas se desplazan dentro de su marco. */
.vista .ctl, .ctl .wrap, .ctl .card, .ctl .foot, .ctl section { min-width: 0; max-width: 100%; }
.ctl .tablewrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
/* Panel deslizante del artefacto: hoja de vidrio pegada al borde derecho (sin el relleno de las tarjetas) */
.ctl .panel { padding: 0; border-radius: 22px 0 0 22px; }
.ctl .panel:hover, .ctl .mbox:hover { scale: none; }

/* Perfiles sin acceso al portafolio (Entidad ejecutora, Interventoría): sin inspector ni su botón */
body.sin-inspector .insp-env { display: none; }
#btn-inspector[hidden] { display: none !important; }
