/* SV DIGITAL - Central de codigos (UI neon / LED) */
:root {
  --bg: #05060b;
  --bg-2: #0a0c15;
  --panel: rgba(17, 21, 34, .72);
  --panel-2: rgba(9, 12, 21, .92);   /* fondo inferior de tarjetas (faltaba y volvia todo transparente) */
  --panel-solid: #10131f;
  --line: rgba(120, 140, 190, .14);
  --line-2: rgba(120, 140, 190, .28);
  --txt: #eef2ff;
  --txt-dim: #8a94b4;
  --txt-mut: #565f7e;
  --acc: #3b82f6;        /* azul (logo SV BOT) */
  --acc-2: #38bdf8;      /* celeste / cyan-azul */
  --acc-3: #7c96ff;      /* azul-violáceo suave */
  --hot: #f43f5e;        /* red LED */
  --amber: #fbbf24;
  --radius: 16px;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
.spin-ic { display: inline-block; animation: spin360 .7s linear infinite; }
@keyframes spin360 { to { transform: rotate(360deg); } }
body { background: radial-gradient(120% 120% at 50% -10%, #0b0e1a 0%, var(--bg) 60%); color: var(--txt); min-height: 100vh; overflow-x: hidden; }

/* Fondos */
.bg-grid { position: fixed; inset: 0; z-index: -2;
  background-image: linear-gradient(rgba(120,140,190,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(120,140,190,.05) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(100% 80% at 50% 0%, #000 40%, transparent 100%); }
.bg-glow { position: fixed; inset: -20% -10% auto -10%; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(45% 55% at 20% 15%, rgba(45,212,191,.14), transparent 60%),
              radial-gradient(45% 55% at 82% 12%, rgba(168,85,247,.16), transparent 60%);
  filter: blur(20px); }

/* ====== FONDO STREAMING VIVO ====== */
.bg-stream { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

/* Auroras: manchas de color que derivan lento */
.aurora { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; mix-blend-mode: screen; }
.aurora.a1 { width: 46vw; height: 46vw; top: -8vw; left: 30vw;
  background: radial-gradient(circle, rgba(45,212,191,.55), transparent 65%); animation: auroraDrift1 26s ease-in-out infinite; }
.aurora.a2 { width: 40vw; height: 40vw; bottom: -12vw; left: 44vw;
  background: radial-gradient(circle, rgba(168,85,247,.5), transparent 65%); animation: auroraDrift2 32s ease-in-out infinite; }
.aurora.a3 { width: 34vw; height: 34vw; top: 24vh; right: 4vw;
  background: radial-gradient(circle, rgba(34,211,238,.42), transparent 65%); animation: auroraDrift3 22s ease-in-out infinite; }
@keyframes auroraDrift1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-6vw,5vh) scale(1.18)} }
@keyframes auroraDrift2 { 0%,100%{transform:translate(0,0) scale(1.05)} 50%{transform:translate(7vw,-6vh) scale(.85)} }
@keyframes auroraDrift3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-5vw,-4vh) scale(1.2)} }

/* Haces de luz de cine que barren en diagonal (reflectores) */
.beam { position: absolute; top: -30%; width: 46%; height: 170%; transform: rotate(18deg); opacity: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--acc) 20%, transparent), transparent);
  filter: blur(16px); mix-blend-mode: screen; }
.beam1 { left: 18%; animation: beamSweep 17s ease-in-out infinite; }
.beam2 { left: 58%; background: linear-gradient(90deg, transparent, rgba(168,85,247,.18), transparent); animation: beamSweep 21s ease-in-out infinite 5s; }
@keyframes beamSweep { 0%,100%{opacity:0; transform:translateX(-18vw) rotate(18deg)} 45%{opacity:.8} 55%{opacity:.8} 100%{transform:translateX(22vw) rotate(18deg)} }

/* ---- CATÁLOGO DE APPS (filas alineadas que se desplazan, estilo Smart TV) ---- */
.bg-catalog { position: absolute; inset: -4% 0; display: flex; flex-direction: column; justify-content: center; gap: 30px;
  transform: perspective(1600px) rotateX(11deg) scale(1.04); transform-origin: center 45%;
  opacity: .5;
  /* se aclara en los lados y se apaga al centro (detrás de la consola) para no estorbar */
  -webkit-mask-image: radial-gradient(120% 78% at 50% 46%, transparent 26%, #000 64%),
                      linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: radial-gradient(120% 78% at 50% 46%, transparent 26%, #000 64%),
              linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.bg-catalog .crow { display: flex; gap: 22px; width: max-content; will-change: transform; }
.bg-catalog .crow:nth-child(odd)  { animation: catSlideL var(--sp, 60s) linear infinite; }
.bg-catalog .crow:nth-child(even) { animation: catSlideR var(--sp, 72s) linear infinite; }
.bg-catalog .ccard { flex: 0 0 auto; width: 168px; height: 100px; border-radius: 14px; position: relative;
  background-image: var(--img); background-size: cover; background-position: center;
  box-shadow: 0 8px 24px -10px #000, 0 0 30px -10px var(--c);
  outline: 1px solid color-mix(in srgb, var(--c) 34%, rgba(255,255,255,.05)); outline-offset: -1px; }
.bg-catalog .ccard::after { content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.10), transparent 40%, rgba(0,0,0,.28)); }
@keyframes catSlideL { from{transform:translateX(0)} to{transform:translateX(-50%)} }
@keyframes catSlideR { from{transform:translateX(-50%)} to{transform:translateX(0)} }

/* Viñeta que enfoca el centro (da profundidad de sala de cine) */
.bg-vig { position: absolute; inset: 0;
  background: radial-gradient(80% 70% at 50% 46%, transparent 40%, rgba(5,6,11,.55) 82%, rgba(5,6,11,.9) 100%); }

/* Barrido de escaneo horizontal (textura de pantalla) */
.bg-scan { position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(120,140,190,.02) 3px 4px); opacity: .5; }
.bg-scan::after { content: ''; position: absolute; left: 0; right: 0; height: 32vh;
  background: linear-gradient(180deg, transparent, rgba(45,212,191,.05), transparent); animation: scanDown 11s linear infinite; }
@keyframes scanDown { 0%{top:-32vh} 100%{top:100vh} }

@media (prefers-reduced-motion: reduce) {
  .aurora, .beam, .bg-catalog .crow, .bg-scan::after { animation: none !important; }
}

/* Layout */
.shell { display: grid; grid-template-columns: 288px 1fr; min-height: 100vh; }
.shell[hidden] { display: none; }

/* ============ SIDEBAR ============ */
.sidebar { border-right: 1px solid var(--line); padding: 18px 12px 16px; display: flex; flex-direction: column; gap: 12px;
  background:
    radial-gradient(80% 30% at 50% 0%, rgba(45,212,191,.08), transparent 70%),
    linear-gradient(180deg, rgba(14,18,30,.92), rgba(7,9,16,.85));
  backdrop-filter: blur(8px); position: sticky; top: 0; height: 100vh; }

/* Zona central scrolleable (marca fija arriba, usuario fijo abajo) */
.side-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: 12px; padding: 4px 8px 8px 4px;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--acc) 45%, #3a4360) transparent;
  /* difuminado sutil arriba/abajo para que se vea que hay más contenido */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
.side-scroll::-webkit-scrollbar { width: 9px; }
.side-scroll::-webkit-scrollbar-track { background: transparent; }
.side-scroll::-webkit-scrollbar-thumb { border-radius: 9px; border: 2px solid transparent; background-clip: padding-box;
  background-color: color-mix(in srgb, var(--acc) 35%, #39425e); }
.side-scroll::-webkit-scrollbar-thumb:hover { background-color: var(--acc); }

.brand { display: flex; align-items: center; gap: 13px; padding: 13px 13px 14px; margin-bottom: 4px; position: relative;
  border-radius: 17px; overflow: hidden;
  background: linear-gradient(150deg, color-mix(in srgb, var(--acc) 12%, transparent), rgba(10,14,24,.55) 55%);
  border: 1px solid color-mix(in srgb, var(--acc) 30%, var(--line));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 30px -18px var(--acc); }
/* halo animado detrás del bloque */
.brand::before { content: ''; position: absolute; top: -60%; right: -30%; width: 180px; height: 180px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--acc) 45%, transparent), transparent 70%); filter: blur(24px); animation: brandFloat 7s ease-in-out infinite; }
/* barra de acento inferior */
.brand::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; z-index: 1;
  background: linear-gradient(90deg, var(--acc), var(--acc-2) 45%, transparent); box-shadow: 0 0 12px var(--acc); }
@keyframes brandFloat { 50% { transform: translate(-14px, 12px) scale(1.15); opacity: .8; } }
.brand > * { position: relative; z-index: 2; }
.brand-mark { position: relative; width: 50px; height: 50px; border-radius: 15px; flex-shrink: 0;
  background: radial-gradient(circle at 50% 40%, #0c1424, #05070f);
  box-shadow: 0 0 26px -4px var(--acc), inset 0 0 0 1px color-mix(in srgb, var(--acc) 30%, transparent);
  animation: brandPulse 4s ease-in-out infinite; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 15px; display: block; }
.brand-mark::before { content: ''; position: absolute; inset: -3px; border-radius: 18px; z-index: -1;
  background: conic-gradient(from 0deg, var(--acc), var(--acc-2), var(--acc-3), var(--acc)); opacity: .5; filter: blur(6px); animation: spin360 8s linear infinite; }
@keyframes brandPulse { 50% { box-shadow: 0 0 38px -2px var(--acc), inset 0 1px 0 rgba(255,255,255,.5), inset 0 -6px 12px rgba(0,0,0,.25); } }
.brand-mark .led { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--acc-3); border: 2px solid rgba(8,10,18,.9); box-shadow: 0 0 10px var(--acc-3); animation: blink 2.4s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.35} }
.brand-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.brand-name { font-size: 20px; letter-spacing: 2.5px; font-weight: 500; line-height: 1; text-shadow: 0 0 18px color-mix(in srgb, var(--acc) 30%, transparent); }
.brand-name b { font-weight: 800; background: linear-gradient(90deg,var(--acc),var(--acc-2),var(--acc-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 9.5px; font-weight: 700;
  color: var(--acc); letter-spacing: 1.4px; text-transform: uppercase; padding: 3px 9px 3px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--acc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--acc) 28%, transparent); }
.brand-sub::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--acc-3); box-shadow: 0 0 8px var(--acc-3); animation: blink 2s infinite; }

.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 8px 14px; font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--amber); text-shadow: 0 0 12px rgba(251,191,36,.35); position: relative; }
.side-head::before { content: ''; position: absolute; left: 4px; top: 12px; width: 4px; height: 12px; border-radius: 3px; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.side-head.mt { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.side-head.mt::before { top: 20px; }
.side-meta { display: inline-flex; gap: 5px; }
.sm-chip { display: inline-flex; align-items: baseline; gap: 3px; font-size: 9px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  color: var(--txt-mut); padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.sm-chip b { font-size: 12px; font-weight: 800; color: var(--txt); font-variant-numeric: tabular-nums; }
.sm-chip.on { color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, transparent); border-color: color-mix(in srgb, var(--acc) 30%, transparent); }
.sm-chip.on b { color: var(--acc); }

.plat-list { display: flex; flex-direction: column; gap: 9px; padding: 2px; }
.plat-list[hidden], .side-head[hidden] { display: none; }

/* ===== Tarjeta NEÓN-GLASS (vidrio tintado + brillo del color de cada plataforma) ===== */
.plat { display: flex; align-items: center; gap: 12px; padding: 13px 14px 13px 17px; border-radius: 16px; cursor: pointer;
  color: var(--txt); text-align: left; position: relative; overflow: hidden; isolation: isolate;
  /* vidrio oscuro fuertemente tintado con el color de la plataforma */
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--svc) 26%, transparent), transparent 60%),
    linear-gradient(145deg, color-mix(in srgb, var(--svc) 16%, rgba(15,19,32,.9)) 0%, rgba(9,12,22,.94) 100%);
  border: 1px solid color-mix(in srgb, var(--svc) 40%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.15),                                   /* filo de vidrio superior */
    inset 0 0 22px -10px color-mix(in srgb, var(--svc) 80%, transparent),  /* resplandor interior */
    0 0 15px -8px var(--svc),                                              /* halo neón exterior */
    0 6px 16px -8px rgba(0,0,0,.7);
  transition: transform .18s, border-color .22s, box-shadow .28s; }
/* reflejo de vidrio en la mitad superior */
.plat::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 52%; pointer-events: none; z-index: 1;
  background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,0)); }
/* barrido de brillo al pasar el mouse */
.plat::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 4;
  background: linear-gradient(115deg, transparent 34%, rgba(255,255,255,.24) 48%, transparent 62%);
  transform: translateX(-130%); transition: transform .7s ease; }
.plat:hover::after { transform: translateX(130%); }
/* barra de acento neón a la izquierda */
.plat-bar { position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--svc); opacity: .85; box-shadow: 0 0 9px var(--svc); transition: opacity .18s, box-shadow .2s; z-index: 3; }
.plat > * { position: relative; z-index: 3; }
.plat:hover { transform: translateX(3px); border-color: color-mix(in srgb, var(--svc) 62%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 0 26px -9px color-mix(in srgb, var(--svc) 90%, transparent),
    0 0 24px -6px var(--svc), 0 10px 24px -9px rgba(0,0,0,.7); }
.plat:hover .plat-bar { opacity: 1; box-shadow: 0 0 13px var(--svc); }
/* activo: cristal encendido a tope en el color de la plataforma */
.plat.active { border-color: var(--svc);
  background:
    radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--svc) 40%, transparent), transparent 62%),
    linear-gradient(145deg, color-mix(in srgb, var(--svc) 28%, rgba(15,19,32,.88)), rgba(9,12,22,.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), inset 0 0 34px -10px var(--svc), 0 0 30px -5px var(--svc), 0 6px 16px -8px rgba(0,0,0,.6); }
.plat.active .plat-bar { opacity: 1; box-shadow: 0 0 14px var(--svc); }

.plat-ico { position: relative; width: 42px; height: 42px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
  background: linear-gradient(160deg, color-mix(in srgb, var(--svc) 22%, rgba(0,0,0,.55)), rgba(0,0,0,.6)); border: 1px solid color-mix(in srgb, var(--svc) 40%, var(--line-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 0 12px -5px var(--svc), inset 0 0 10px -4px rgba(0,0,0,.6);
  transition: border-color .18s, box-shadow .2s; }
.plat.active .plat-ico { border-color: color-mix(in srgb, var(--svc) 70%, #fff); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 16px -2px var(--svc); }
.plat-led { position: absolute; right: 2px; bottom: 2px; width: 8px; height: 8px; border-radius: 50%; background: #3a4360; border: 1.5px solid rgba(8,10,18,.9); transition: all .2s; }
.plat.on .plat-led { background: var(--acc-3); box-shadow: 0 0 7px var(--acc-3); animation: blink 2.2s infinite; }

.plat-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.plat-name { font-size: 14px; font-weight: 700; letter-spacing: .2px; text-shadow: 0 1px 3px rgba(0,0,0,.7), 0 0 1px rgba(0,0,0,.9); }
.plat.active .plat-name { color: color-mix(in srgb, var(--svc) 45%, #fff); }
.plat-sub { font-size: 9.5px; font-weight: 800; letter-spacing: 1.2px; color: var(--txt-mut); }
.plat.on .plat-sub { color: color-mix(in srgb, var(--svc) 70%, var(--txt-dim)); }

.plat-count { font-family: 'Consolas', monospace; font-size: 12px; font-weight: 800; min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 8px; flex-shrink: 0;
  color: var(--svc); background: color-mix(in srgb, var(--svc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--svc) 35%, transparent); }
.plat.active .plat-count { background: var(--svc); color: #04120f; border-color: transparent; box-shadow: 0 0 12px -3px var(--svc); }
.plat .chev { color: var(--txt-mut); font-size: 18px; transition: transform .18s, color .18s; }
.plat:hover .chev, .plat.active .chev { color: var(--svc); transform: translateX(2px); }

.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.conn { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .3px; color: var(--txt-dim);
  padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.02); border: 1px solid var(--line); }
.conn .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--txt-mut); }
.conn.on { color: var(--acc-3); } .conn.on .dot { background: var(--acc-3); box-shadow: 0 0 10px var(--acc-3); animation: blink 1.8s infinite; }
.conn.demo { color: var(--amber); } .conn.demo .dot { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.conn.off { color: var(--hot); } .conn.off .dot { background: var(--hot); box-shadow: 0 0 10px var(--hot); animation: blink 1s infinite; }

/* ============ CONSOLA DE USUARIO / SUB-ADMIN (temática por plataforma) ============ */
.uc { position: relative; width: 100%; max-width: 860px; margin: 0 auto; border-radius: 26px; overflow: hidden;
  background: linear-gradient(180deg, rgba(12,15,26,.9), rgba(8,10,18,.85));
  border: 1px solid color-mix(in srgb, var(--svc) 40%, var(--line-2));
  box-shadow: 0 40px 110px -40px #000, 0 0 70px -40px var(--svc); animation: rise .45s ease both; }
.uc-aura { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(80% 55% at 50% -10%, color-mix(in srgb, var(--svc) 34%, transparent), transparent 60%),
              radial-gradient(60% 50% at 100% 100%, color-mix(in srgb, var(--svc) 16%, transparent), transparent 60%); }

/* Portada temática */
.uc-cover { position: relative; z-index: 1; padding: 30px clamp(22px, 4vw, 40px); overflow: hidden;
  border-bottom: 1px solid color-mix(in srgb, var(--svc) 25%, transparent); }
.uc-cover-bg { position: absolute; inset: -30% -10% auto auto; width: 60%; height: 260%; object-fit: cover;
  opacity: .22; filter: grayscale(.2) blur(2px); transform: rotate(-6deg); pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000); }
.uc-cover-emoji { position: absolute; right: 20px; top: -20px; font-size: 190px; opacity: .06; pointer-events: none; }
.uc-cover-veil { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, color-mix(in srgb, var(--svc) 30%, transparent), transparent 55%); }
.uc-cover-in { position: relative; display: flex; align-items: center; gap: 20px; }
.uc-logo { width: 80px; height: 80px; border-radius: 22px; overflow: hidden; display: grid; place-items: center; font-size: 40px; flex-shrink: 0;
  background: rgba(0,0,0,.5); border: 1px solid var(--svc); box-shadow: 0 0 34px -6px var(--svc), inset 0 0 20px rgba(0,0,0,.6); }
.uc-logo .logo-img { border-radius: 20px; }
.uc-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.uc-tag { font-size: 10px; font-weight: 800; letter-spacing: 2px; color: color-mix(in srgb, var(--svc) 75%, #fff); text-shadow: 0 0 14px var(--svc); }
.uc-name { font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -1px; line-height: 1;
  color: var(--svc); text-shadow: 0 0 30px color-mix(in srgb, var(--svc) 50%, transparent); }
.uc-stats { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.uc-chip { font-size: 12px; color: var(--txt-dim); padding: 4px 12px; border-radius: 999px;
  background: rgba(0,0,0,.35); border: 1px solid color-mix(in srgb, var(--svc) 30%, transparent); }
.uc-chip b { color: color-mix(in srgb, var(--svc) 80%, #fff); font-family: 'Consolas', monospace; }
.uc-live { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; color: var(--acc-3); }
.uc-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--acc-3); box-shadow: 0 0 9px var(--acc-3); animation: blink 1.6s infinite; }

/* Cuerpo */
.uc-body { position: relative; z-index: 1; padding: clamp(20px, 3vw, 30px); }
.uc-field { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.uc-step { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; margin-top: 24px;
  font-size: 13px; font-weight: 800; color: #04120f; background: var(--svc); box-shadow: 0 0 16px -3px var(--svc); }
.uc-fb { flex: 1; min-width: 0; }
.uc-lbl { display: block; font-size: 11px; font-weight: 800; letter-spacing: 1.6px; color: var(--txt-dim); margin-bottom: 10px; }
.uc-control input:focus { border-color: var(--svc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--svc) 18%, transparent); }
.uc-hint { font-size: 11.5px; color: var(--txt-mut); margin-top: 8px; }

.uc-cta { position: relative; overflow: hidden; width: 100%; border: none; border-radius: 15px; padding: 17px; cursor: pointer;
  font-size: 16px; font-weight: 800; letter-spacing: .6px; color: #04120f;
  background: linear-gradient(100deg, var(--svc), color-mix(in srgb, var(--svc) 60%, #fff));
  box-shadow: 0 0 34px -8px var(--svc), inset 0 1px 0 rgba(255,255,255,.4); transition: transform .12s, box-shadow .2s; margin-bottom: 6px; }
.uc-cta:hover { box-shadow: 0 0 48px -6px var(--svc), inset 0 1px 0 rgba(255,255,255,.5); }
.uc-cta:active { transform: translateY(1px); }
.uc-cta:disabled { filter: grayscale(.4) brightness(.8); cursor: wait; }
.uc-cta::after { content: ''; position: absolute; top: 0; bottom: 0; width: 55px; left: -90px;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent); animation: shimmer 3s ease-in-out infinite; }
.uc-cta span { position: relative; z-index: 1; }

@media (max-width: 600px) {
  .uc-field { gap: 10px; } .uc-step { margin-top: 22px; }
  .uc-cover-in { gap: 14px; } .uc-logo { width: 60px; height: 60px; font-size: 30px; }
}

/* ============ CUENTAS DETECTADAS (admin / sub-admin) ============ */
.det { position: relative; width: 100%; max-width: 1180px; margin: 0 auto; animation: rise .4s ease both; }
.det-aura { position: fixed; inset: 0 0 auto auto; width: 50vw; height: 40vh; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 60% at 80% 10%, rgba(45,212,191,.1), transparent 60%); filter: blur(20px); }
.det-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
  padding: 18px 22px; border-radius: 20px; position: relative; overflow: hidden;
  background: linear-gradient(100deg, rgba(45,212,191,.1), rgba(34,211,238,.05) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc) 35%, var(--line-2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.det-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--acc), var(--acc-2) 40%, transparent); }
.det-ico { position: relative; width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-size: 26px; flex-shrink: 0;
  background: rgba(0,0,0,.4); border: 1px solid var(--acc); box-shadow: 0 0 24px -6px var(--acc), inset 0 0 14px rgba(0,0,0,.6); }
.det-ico .led { position: absolute; right: -4px; bottom: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--acc-3); box-shadow: 0 0 10px var(--acc-3); animation: blink 1.8s infinite; }
.det-titlewrap { flex: 1; min-width: 180px; }
.det-title { font-size: clamp(22px, 3vw, 32px); font-weight: 800; letter-spacing: -.5px; color: var(--acc); text-shadow: 0 0 26px color-mix(in srgb, var(--acc) 45%, transparent); line-height: 1; }
.det-sub { font-size: 12px; color: var(--txt-mut); } .det-sub b { color: var(--acc); }
.det-search { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; min-width: 240px;
  background: rgba(2,4,9,.7); border: 1px solid var(--line-2); transition: border-color .2s; }
.det-search:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(45,212,191,.14); }
.det-search span { opacity: .5; }
.det-search input { flex: 1; background: none; border: none; outline: none; color: var(--txt); font-size: 13px; }

.det-plats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.det-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 999px;
  font-family: 'Consolas', monospace; font-size: 12px; font-weight: 800; color: var(--svc);
  background: color-mix(in srgb, var(--svc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--svc) 35%, transparent); }
.det-chip .dc-ico { width: 22px; height: 22px; border-radius: 7px; overflow: hidden; display: grid; place-items: center; font-size: 12px; background: rgba(0,0,0,.4); }
.det-chip .dc-ico .logo-img { border-radius: 6px; }

.det-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 11px; }
.acc-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; cursor: pointer; text-align: left;
  background: linear-gradient(100deg, color-mix(in srgb, var(--svc) 10%, rgba(255,255,255,.02)), rgba(255,255,255,.012));
  border: 1px solid var(--line); color: var(--txt); position: relative; overflow: hidden;
  transition: transform .14s, border-color .18s, box-shadow .2s; animation: rise .3s ease both; }
.acc-tile::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--svc); opacity: .55; }
.acc-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--svc) 55%, transparent); box-shadow: 0 0 22px -8px var(--svc); }
.acc-tile:hover::before { opacity: 1; box-shadow: 0 0 10px var(--svc); }
.acc-tile.copied { border-color: var(--acc-3); box-shadow: 0 0 22px -6px var(--acc-3); }
.at-logo { width: 38px; height: 38px; border-radius: 11px; overflow: hidden; display: grid; place-items: center; font-size: 18px; flex-shrink: 0;
  background: rgba(0,0,0,.4); border: 1px solid color-mix(in srgb, var(--svc) 40%, var(--line-2)); }
.at-logo .logo-img { border-radius: 9px; }
.at-info { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.at-mail { font-family: 'Consolas', monospace; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-svc { font-size: 10px; font-weight: 800; letter-spacing: .8px; color: color-mix(in srgb, var(--svc) 70%, var(--txt-mut)); }
.at-copy { font-size: 14px; opacity: .35; flex-shrink: 0; transition: opacity .15s; }
.acc-tile:hover .at-copy { opacity: 1; }
.acc-tile.copied { pointer-events: none; }
.acc-tile.copied .at-mail { color: var(--acc-3); }
.acc-tile.copied .at-copy { opacity: 1; }

/* ============ STAGE / PANEL ============ */
.stage { padding: clamp(20px, 4vw, 54px); display: flex; align-items: flex-start; justify-content: center; }
.panel { width: 100%; max-width: 820px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px;
  padding: clamp(20px, 3vw, 34px); backdrop-filter: blur(14px); position: relative; overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.04); }
.panel::before { content: ''; position: absolute; inset: 0; border-radius: 22px; padding: 1px; pointer-events: none;
  background: linear-gradient(130deg, color-mix(in srgb, var(--svc,var(--acc)) 55%, transparent), transparent 40%, color-mix(in srgb, var(--svc,var(--acc)) 30%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }

/* Logos de plataforma (imagen real; si no hay, se usa el emoji) */
.logo-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.plat-ico .logo-img, .p-ico .logo-img, .pt-ico .logo-img, .a-ico .logo-img { border-radius: 9px; }
.p-ico .logo-img { border-radius: 14px; }

.watermark { position: absolute; top: -30px; right: -20px; font-size: 190px; line-height: 1; opacity: .05; pointer-events: none; filter: grayscale(.2); transform: rotate(-8deg); }
.watermark-img { position: absolute; top: -40px; right: -30px; width: 240px; height: 240px; object-fit: cover; border-radius: 30px;
  opacity: .07; pointer-events: none; filter: grayscale(.3) blur(1px); transform: rotate(-8deg); }
.p-glow { position: absolute; top: -60px; right: -40px; width: 320px; height: 320px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--svc,var(--acc)) 30%, transparent), transparent 70%); filter: blur(30px); opacity: .55; }
.p-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; position: relative; }
.p-ico { width: 66px; height: 66px; border-radius: 18px; display: grid; place-items: center; font-size: 34px; flex-shrink: 0;
  background: rgba(0,0,0,.4); border: 1px solid var(--svc, var(--acc)); box-shadow: 0 0 26px -4px var(--svc,var(--acc)), inset 0 0 18px rgba(0,0,0,.6); }
.p-title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -.5px; color: var(--svc, var(--acc)); text-shadow: 0 0 26px color-mix(in srgb, var(--svc,var(--acc)) 45%, transparent); line-height: 1; }
.p-badge { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
  color: var(--svc, var(--acc)); border: 1px solid color-mix(in srgb, var(--svc,var(--acc)) 45%, transparent); background: color-mix(in srgb, var(--svc,var(--acc)) 12%, transparent); }

.field { margin-bottom: 20px; }
.label { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; color: var(--txt-dim); margin-bottom: 9px; display: flex; align-items: center; gap: 8px; }
.label::before { content: ''; width: 14px; height: 2px; border-radius: 2px; background: var(--svc, var(--acc)); box-shadow: 0 0 8px var(--svc,var(--acc)); }
.control { position: relative; }
.control input { width: 100%; background: rgba(4,6,12,.7); border: 1px solid var(--line-2); border-radius: 13px;
  color: var(--txt); font-size: 15px; padding: 16px 48px 16px 48px; outline: none; transition: border-color .2s, box-shadow .2s; }
.control input:focus { border-color: var(--svc, var(--acc)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--svc,var(--acc)) 18%, transparent); }
.control input::placeholder { color: var(--txt-mut); }
.control .lead { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 18px; pointer-events: none; z-index: 1; }
.control .paste { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--txt-dim); width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 15px; z-index: 1; }
.control .paste:hover { color: var(--svc,var(--acc)); border-color: var(--svc,var(--acc)); }
.hint { font-size: 11px; color: var(--txt-mut); margin-top: 7px; }

/* ===== Dropdown personalizado (streaming) ===== */
.dd { position: relative; user-select: none; }
.dd-trigger { width: 100%; display: flex; align-items: center; gap: 13px; background: rgba(4,6,12,.7); border: 1px solid var(--line-2);
  border-radius: 13px; padding: 12px 16px; cursor: pointer; color: var(--txt); text-align: left; transition: border-color .2s, box-shadow .2s; }
.dd-trigger:hover { border-color: color-mix(in srgb, var(--svc,var(--acc)) 50%, transparent); }
.dd.open .dd-trigger { border-color: var(--svc, var(--acc)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--svc,var(--acc)) 16%, transparent); }
.dd-badge { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
  background: rgba(0,0,0,.4); border: 1px solid color-mix(in srgb, var(--svc,var(--acc)) 40%, transparent); box-shadow: inset 0 0 10px rgba(0,0,0,.5); }
.dd-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.dd-txt b { font-size: 15px; font-weight: 700; }
.dd-txt small { font-size: 12px; color: var(--txt-dim); }
.dd-caret { color: var(--txt-dim); font-size: 13px; transition: transform .25s; }
.dd.open .dd-caret { transform: rotate(180deg); color: var(--svc,var(--acc)); }

.dd-menu { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40; padding: 7px; border-radius: 14px;
  background: rgba(9,12,20,.97); border: 1px solid var(--line-2); backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.85), 0 0 0 1px color-mix(in srgb, var(--svc,var(--acc)) 22%, transparent);
  display: none; flex-direction: column; gap: 5px; transform-origin: top center; }
.dd.open .dd-menu { display: flex; animation: ddIn .18s ease; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.dd-opt { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--txt); text-align: left; transition: all .14s; position: relative; }
.dd-opt:hover { background: rgba(255,255,255,.045); border-color: var(--line); }
.dd-opt.sel { background: linear-gradient(100deg, color-mix(in srgb, var(--svc,var(--acc)) 20%, transparent), rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--svc,var(--acc)) 45%, transparent); box-shadow: inset 3px 0 0 var(--svc,var(--acc)); }
.dd-opt .o-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; flex-shrink: 0; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); }
.dd-opt.sel .o-ico { border-color: var(--svc,var(--acc)); box-shadow: 0 0 12px -3px var(--svc,var(--acc)); }
.dd-opt .o-txt { display: flex; flex-direction: column; line-height: 1.25; flex: 1; }
.dd-opt .o-txt b { font-size: 14px; font-weight: 700; }
.dd-opt .o-txt small { font-size: 11px; color: var(--txt-dim); }
.dd-opt .o-check { color: var(--svc,var(--acc)); font-size: 15px; opacity: 0; }
.dd-opt.sel .o-check { opacity: 1; text-shadow: 0 0 8px var(--svc,var(--acc)); }

/* Opción en mantenimiento (desplegable) */
.dd-opt.maint { opacity: .72; }
.dd-opt.maint .o-ico { filter: grayscale(.4); }
.maint-tag { font-family: 'Consolas', monospace; font-size: 9px; font-weight: 700; letter-spacing: .5px; color: var(--amber);
  background: rgba(251,191,36,.12); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); padding: 1px 6px; border-radius: 5px; vertical-align: middle; margin-left: 6px; }

/* Panel de mantenimiento */
.maint-panel { text-align: center; padding: 40px 20px 30px; border: 1px dashed color-mix(in srgb, var(--amber) 40%, transparent);
  border-radius: 16px; background: repeating-linear-gradient(45deg, rgba(251,191,36,.04) 0 12px, transparent 12px 24px); margin-top: 8px; }
.maint-ico { position: relative; width: 66px; height: 66px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; font-size: 30px;
  background: rgba(251,191,36,.08); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); }
.maint-ico .led { position: absolute; right: -4px; bottom: -4px; width: 13px; height: 13px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); animation: blink 1.4s infinite; }
.maint-panel h3 { font-size: 20px; margin-bottom: 8px; color: var(--amber); }
.maint-panel p { font-size: 13px; color: var(--txt-dim); line-height: 1.6; margin-bottom: 18px; }
.maint-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: var(--amber);
  padding: 8px 16px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); background: rgba(251,191,36,.06); }
.maint-badge .led { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: blink 1.6s infinite; }

/* ===== Actividad reciente ===== */
.recent { margin-top: 26px; }
.recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.recent-head .r-title { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; color: var(--txt-dim); display: flex; align-items: center; gap: 8px; }
.recent-head .r-title::before { content: ''; width: 14px; height: 2px; border-radius: 2px; background: var(--svc,var(--acc)); box-shadow: 0 0 8px var(--svc,var(--acc)); }
.recent-count { font-size: 11px; color: var(--txt-mut); }
.r-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); cursor: pointer; transition: all .15s; margin-bottom: 8px; }
.r-row:hover { border-color: color-mix(in srgb, var(--svc,var(--acc)) 45%, transparent); background: rgba(255,255,255,.04); transform: translateX(2px); }
.r-type-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; flex-shrink: 0; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); }
.r-info { flex: 1; min-width: 0; }
.r-acc { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-sub { font-size: 11px; color: var(--txt-mut); }
.r-code { font-family: 'Consolas', ui-monospace, monospace; font-size: 17px; font-weight: 800; letter-spacing: 2px; color: var(--svc,var(--acc)); text-shadow: 0 0 12px color-mix(in srgb, var(--svc,var(--acc)) 55%, transparent); }
.r-code.link { font-size: 13px; letter-spacing: 0; }
.r-empty { font-size: 13px; color: var(--txt-mut); padding: 14px; text-align: center; border: 1px dashed var(--line-2); border-radius: 12px; }

.cta { width: 100%; border: none; border-radius: 14px; padding: 17px; font-size: 16px; font-weight: 800; letter-spacing: .5px; cursor: pointer;
  color: #04120f; background: linear-gradient(100deg, var(--svc, var(--acc)), color-mix(in srgb, var(--svc,var(--acc)) 55%, #22d3ee));
  box-shadow: 0 0 30px -6px var(--svc, var(--acc)), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .12s, box-shadow .2s; display: flex; align-items: center; justify-content: center; gap: 10px; }
.cta:hover { box-shadow: 0 0 42px -4px var(--svc, var(--acc)), inset 0 1px 0 rgba(255,255,255,.4); }
.cta:active { transform: translateY(1px); }

/* Resultado */
.result { margin-top: 24px; border-top: 1px dashed var(--line-2); padding-top: 22px; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.res-empty { text-align: center; color: var(--txt-mut); font-size: 14px; padding: 8px; }
.res-empty.denied { color: #ffc2c2; padding: 16px; border-radius: 12px; line-height: 1.5;
  background: color-mix(in srgb, var(--hot) 12%, transparent); border: 1px solid color-mix(in srgb, var(--hot) 48%, transparent); }
.res-empty.denied b { color: #ff9a9a; }
.code-card { background: linear-gradient(160deg, rgba(4,6,12,.8), rgba(10,13,22,.6)); border: 1px solid var(--line-2); border-radius: 16px; padding: 22px; }
.rc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.rc-acc { font-size: 13px; color: var(--txt-dim); word-break: break-all; }
.rc-acc b { color: var(--txt); }
.rc-type { font-size: 11px; font-weight: 800; letter-spacing: 1px; padding: 5px 11px; border-radius: 8px; border: 1px solid; }
.rc-type.login { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 45%, transparent); }
.rc-type.household { color: var(--acc-3); border-color: color-mix(in srgb, var(--acc-3) 45%, transparent); }
.rc-type.reset { color: var(--hot); border-color: color-mix(in srgb, var(--hot) 45%, transparent); }
.led-code { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 6px 0 10px; }
/* Código clicable para copiar */
.led-code.copyable { width: 100%; background: none; border: none; cursor: pointer; padding: 6px 0; border-radius: 14px; transition: transform .12s; }
.led-code.copyable:hover { transform: translateY(-2px); }
.led-code.copyable:hover .led-digit { box-shadow: 0 0 18px -2px var(--svc, var(--acc)); }
.led-code.copyable:active { transform: scale(.98); }
.led-code.copyable.copied .led-digit { border-color: var(--acc-3); box-shadow: 0 0 20px -2px var(--acc-3); color: #eafff5; }
.rc-hint { text-align: center; font-size: 12px; color: var(--txt-mut); margin-bottom: 14px; transition: color .2s; }

/* Enlace + botón portapapeles (recuperar) */
.link-row { display: flex; gap: 10px; align-items: stretch; margin-bottom: 8px; }
.link-row .linkflex { flex: 1; margin-bottom: 0; }
.clip-btn { width: 54px; flex-shrink: 0; border-radius: 13px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04);
  color: var(--txt-dim); font-size: 20px; cursor: pointer; transition: all .15s; }
.clip-btn:hover { color: var(--svc, var(--acc)); border-color: var(--svc, var(--acc)); box-shadow: 0 0 16px -6px var(--svc, var(--acc)); }
.clip-btn.done { background: var(--acc-3); color: #04120f; border-color: transparent; }
.led-digit { font-family: 'Consolas', ui-monospace, monospace; font-size: clamp(44px, 9vw, 76px); font-weight: 800;
  color: #eafffb; text-shadow: 0 0 18px var(--svc,var(--acc)), 0 0 40px color-mix(in srgb, var(--svc,var(--acc)) 60%, transparent);
  background: rgba(0,0,0,.35); border: 1px solid color-mix(in srgb, var(--svc,var(--acc)) 40%, transparent); border-radius: 12px; padding: 8px 18px; min-width: 62px; text-align: center; }
/* Código detrás de enlace (acceso temporal) */
.resolve { text-align: center; padding: 8px 0 4px; }
.rs-note { font-size: 12.5px; color: var(--txt-dim); margin-bottom: 14px; line-height: 1.5; }
.rs-btn { width: 100%; padding: 15px !important; font-size: 14px !important; background: linear-gradient(100deg, var(--svc), var(--acc-2)) !important;
  color: #04120f !important; border: none !important; box-shadow: 0 0 26px -8px var(--svc); }
.rs-manual { display: inline-block; margin-top: 12px; font-size: 11.5px; color: var(--txt-mut); text-decoration: none; }
.rs-manual:hover { color: var(--acc); }
.rs-err { margin-top: 12px; padding: 10px 13px; border-radius: 9px; font-size: 12px; color: var(--amber);
  background: rgba(251,191,36,.08); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); line-height: 1.5; }

.rc-link { display: block; text-align: center; text-decoration: none; font-weight: 800; padding: 16px; border-radius: 13px; margin-bottom: 14px;
  color: #04120f; background: linear-gradient(100deg, var(--svc,var(--acc)), var(--acc-2)); box-shadow: 0 0 26px -6px var(--svc,var(--acc)); word-break: break-all; }
.rc-actions { display: flex; gap: 10px; }
.rc-btn { flex: 1; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--txt); padding: 13px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .15s; }
.rc-btn.primary { border-color: var(--svc,var(--acc)); color: var(--svc,var(--acc)); }
.rc-btn:hover { background: rgba(255,255,255,.06); }
.rc-btn.done { background: var(--acc); color: #04120f; border-color: transparent; }
.rc-meta { text-align: center; font-size: 12px; color: var(--txt-mut); margin-top: 14px; }
.rc-subj { display: block; margin-top: 3px; color: var(--txt-dim); }

/* Mis Cuentas (cliente) */
.acc-list { display: flex; flex-direction: column; gap: 10px; }
.acc-row { display: grid; grid-template-columns: 46px 1fr auto auto; gap: 14px; align-items: center;
  padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.02);
  transition: border-color .2s, background .2s, transform .15s; animation: rise .3s ease both; }
.acc-row:hover { border-color: color-mix(in srgb, var(--svc) 50%, transparent); background: rgba(255,255,255,.045); transform: translateX(3px); }
.acc-row.live { border-color: color-mix(in srgb, var(--svc) 40%, transparent); box-shadow: inset 3px 0 0 var(--svc); }
.acc-logo { width: 46px; height: 46px; border-radius: 13px; overflow: hidden; display: grid; place-items: center; font-size: 20px;
  background: rgba(0,0,0,.4); border: 1px solid var(--line-2); }
.acc-row.live .acc-logo { border-color: var(--svc); box-shadow: 0 0 16px -4px var(--svc); }
.acc-any { color: var(--txt-mut); font-size: 18px; }
.acc-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acc-mail { font-family: 'Consolas', monospace; font-size: 13.5px; word-break: break-all; }
.acc-meta { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--txt-mut); }
.acc-meta .led { width: 7px; height: 7px; border-radius: 50%; background: rgba(120,140,190,.3); flex-shrink: 0; }
.acc-row.live .acc-meta .led { background: var(--acc-3); box-shadow: 0 0 8px var(--acc-3); animation: blink 2s infinite; }
.acc-last { font-family: 'Consolas', monospace; font-size: 19px; font-weight: 800; letter-spacing: 2px; color: var(--svc);
  text-shadow: 0 0 14px color-mix(in srgb, var(--svc) 55%, transparent); }
.acc-go { padding: 9px 14px; border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 700; white-space: nowrap;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2); color: var(--txt-dim); transition: all .15s; }
.acc-go:hover { color: var(--svc); border-color: var(--svc); box-shadow: 0 0 16px -6px var(--svc); }
@media (max-width: 660px) {
  .acc-row { grid-template-columns: 46px 1fr; }
  .acc-last, .acc-go { grid-column: 2; justify-self: start; }
}

/* Vista de cuentas */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.acct { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.02); }
.acct .a-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); }
.acct .a-mail { font-size: 13px; word-break: break-all; }
.acct .a-svc { font-size: 11px; color: var(--txt-mut); }
.cfg-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cfg-row .k { color: var(--txt-dim); }
.cfg-row .v { color: var(--txt); font-weight: 600; }

/* ============ CLIENTES · padrón de fichas ============ */
.frm { display: grid; grid-template-columns: 1fr 1.3fr 1fr 1fr auto; gap: 12px; align-items: end; }
.fld { display: flex; flex-direction: column; }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; padding: 16px; }
.cli-card { position: relative; overflow: hidden; padding: 15px 16px; border-radius: 15px;
  background: linear-gradient(165deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  border: 1px solid var(--line); animation: rise .3s ease both; transition: border-color .2s, transform .15s, box-shadow .2s; }
.cli-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.cli-card.on { --svc: var(--acc-3); }
.cli-card.off { --svc: #5c6684; opacity: .72; }
.cc-strip { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--svc); box-shadow: 0 0 12px var(--svc); }
.cli-card.on:hover { box-shadow: 0 0 28px -12px var(--acc-3); }
.cc-top { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.cc-avatar { position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 800; font-size: 17px; color: #04120f; background: linear-gradient(135deg, var(--acc), var(--acc-2)); }
.cli-card.off .cc-avatar { background: linear-gradient(135deg, #3a4360, #2b3450); color: var(--txt-mut); }
.cc-avatar .led { position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--svc); box-shadow: 0 0 8px var(--svc); }
.cli-card.on .cc-avatar .led { animation: blink 2s infinite; }
.cc-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cc-id b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-id small { font-size: 11.5px; color: var(--txt-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-code { font-family: 'Consolas', monospace; font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: 5px; flex-shrink: 0;
  color: var(--amber); background: rgba(251,191,36,.1); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.cc-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cc-stat { font-size: 11px; color: var(--txt-dim); padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.3); border: 1px solid var(--line); }
.cc-stat b { color: var(--acc); font-family: 'Consolas', monospace; }
.cc-stat.dim { color: var(--txt-mut); }
/* Enlace personal del cliente (URL para compartir) */
.cc-link { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 7px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--acc) 8%, rgba(0,0,0,.3)); border: 1px solid color-mix(in srgb, var(--acc) 22%, var(--line)); }
.cc-url { flex: 1; min-width: 0; font-family: 'Consolas', monospace; font-size: 12px; color: var(--acc-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-copy { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 8px; cursor: pointer;
  color: var(--acc); background: rgba(255,255,255,.04); border: 1px solid color-mix(in srgb, var(--acc) 30%, transparent); transition: .15s; }
.cc-copy:hover { background: color-mix(in srgb, var(--acc) 14%, transparent); color: var(--txt); }
.cc-copy.copied { background: var(--acc); color: #04120f; }

.cc-actions { display: flex; gap: 8px; align-items: center; }
.cc-actions .switch { flex: 1; justify-content: center; }
.cc-del { width: 34px; height: 32px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(244,63,94,.08); color: var(--hot); cursor: pointer; flex-shrink: 0; }
.cc-del:hover { background: var(--hot); color: #fff; border-color: transparent; }
.cc-rank { width: 34px; height: 32px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--txt-mut); cursor: pointer; flex-shrink: 0; font-size: 15px; }
.cc-rank:hover { color: var(--amber); border-color: var(--amber); }
.cc-rank.on { color: var(--amber); border-color: var(--amber); background: rgba(251,191,36,.12); box-shadow: 0 0 12px -4px var(--amber); }
.cc-role { font-family: 'Consolas', monospace; font-size: 9px; font-weight: 800; letter-spacing: .5px; color: var(--amber);
  background: rgba(251,191,36,.14); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); padding: 1px 6px; border-radius: 5px; vertical-align: middle; }
.cli-card.sub { --svc: var(--amber); }
.cli-card.sub .cc-avatar { background: linear-gradient(135deg, var(--amber), #f97316); }
.uc-avatar.sub { background: linear-gradient(135deg, var(--amber), #f97316); }

/* ============ IDIOMAS · riel + matriz ============ */
.cfg-split { display: grid; grid-template-columns: 268px 1fr; gap: 16px; align-items: start; }
.cfg-rail { border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: linear-gradient(165deg, var(--panel), var(--panel-2)); }
.rail-head { display: flex; align-items: center; gap: 9px; padding: 12px 15px; border-bottom: 1px solid var(--line);
  font-size: 10px; font-weight: 800; letter-spacing: 1.6px; color: var(--txt-dim);
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent); }
.rail-head .led { width: 7px; height: 7px; border-radius: 50%; background: var(--acc-3); box-shadow: 0 0 9px var(--acc-3); animation: blink 2s infinite; }
.rail-list { max-height: 560px; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 5px; scrollbar-width: thin; }
.rail-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--txt); text-align: left; transition: all .15s; }
.rail-item:hover { background: rgba(255,255,255,.04); border-color: var(--line); }
.rail-item.sel { background: linear-gradient(100deg, color-mix(in srgb, var(--svc) 20%, transparent), rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--svc) 55%, transparent); box-shadow: inset 3px 0 0 var(--svc); }
.ri-logo { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; font-size: 17px; flex-shrink: 0;
  background: rgba(0,0,0,.4); border: 1px solid var(--line-2); }
.rail-item.sel .ri-logo { border-color: var(--svc); box-shadow: 0 0 12px -3px var(--svc); }
.ri-meta { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ri-meta b { font-size: 12.5px; }
.ri-meta small { font-size: 10.5px; color: var(--txt-mut); }
.rail-item .led { width: 7px; height: 7px; border-radius: 50%; background: rgba(120,140,190,.2); flex-shrink: 0; }
.rail-item.has .led { background: var(--acc-3); box-shadow: 0 0 8px var(--acc-3); }
.rail-item.sel .led { animation: blink 1.8s infinite; }

.cfg-main .rz-head { flex-wrap: wrap; }
.cm-logo { width: 30px; height: 30px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; font-size: 15px;
  background: rgba(0,0,0,.4); border: 1px solid var(--svc); box-shadow: 0 0 12px -4px var(--svc); }
.cfg-main .rt-tabs { margin-left: auto; }
.rt-n { margin-left: 7px; font-family: 'Consolas', monospace; font-size: 10px; padding: 1px 6px; border-radius: 5px;
  background: rgba(0,0,0,.35); color: var(--txt-mut); }
.rt-tab.sel .rt-n { background: rgba(0,0,0,.28); color: var(--amber); }
.tr-n { font-family: 'Consolas', monospace; font-size: 10px; color: var(--txt-mut); text-align: center; }
.cfg-main .cfg-table { border: none; border-radius: 0; background: transparent; }
.cfg-route-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,.25); }
.crb-path { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.crb-path b { color: var(--svc); }
.crb-path i { color: var(--txt-mut); font-style: normal; }
.crb-path code { font-family: 'Consolas', monospace; font-size: 13px; font-weight: 700; color: var(--amber);
  background: rgba(251,191,36,.08); padding: 3px 10px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.crb-path small { font-size: 11px; color: var(--txt-mut); }
.crb-path .logo-img { width: 22px; height: 22px; border-radius: 6px; }
.crb-type { font-size: 11px; color: var(--txt-mut); letter-spacing: .3px; }
.rt-tab { font-family: 'Consolas', monospace; }

@media (max-width: 1000px) {
  .cfg-split { grid-template-columns: 1fr; }
  .rail-list { max-height: 200px; flex-direction: row; flex-wrap: wrap; }
  .rail-item { flex: 1 1 180px; }
  .frm { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) { .frm { grid-template-columns: 1fr; } }

/* ===== Configuración multi-idioma ===== */
.panel-wide { max-width: 1080px; }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 4px 0 22px; }
.pt-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: 13px;
  background: rgba(255,255,255,.02); border: 1px solid var(--line); color: var(--txt); cursor: pointer; transition: all .16s; }
.pt-tile:hover { border-color: var(--line-2); background: rgba(255,255,255,.045); }
.pt-tile.sel { border-color: var(--svc, var(--acc)); background: color-mix(in srgb, var(--svc,var(--acc)) 12%, transparent);
  box-shadow: 0 0 20px -6px var(--svc,var(--acc)), inset 0 0 0 1px color-mix(in srgb, var(--svc,var(--acc)) 30%, transparent); }
.pt-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: rgba(0,0,0,.4); border: 1px solid var(--line-2); }
.pt-tile.sel .pt-ico { border-color: var(--svc,var(--acc)); box-shadow: 0 0 14px -3px var(--svc,var(--acc)); }
.pt-name { font-size: 12px; font-weight: 700; text-align: center; }
.pt-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--svc,var(--acc)); box-shadow: 0 0 8px var(--svc,var(--acc)); animation: blink 2s infinite; }

.rt-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.rt-lead { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--txt-dim); }
.rt-tabs { display: flex; gap: 8px; }
.rt-tab { padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255,255,255,.02); color: var(--txt-dim);
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s; }
.rt-tab:hover { color: var(--txt); border-color: var(--svc,var(--acc)); }
.rt-tab.sel { color: var(--amber); border-color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); box-shadow: 0 0 14px -5px var(--amber); }

.cfg-table { border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; background: rgba(4,6,12,.4); }
.cfg-th, .cfg-tr { display: grid; grid-template-columns: 28px 145px 1fr 1.6fr 44px; gap: 10px; align-items: center; padding: 12px 16px; }
.cfg-th { background: rgba(255,255,255,.03); font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--txt-dim); border-bottom: 1px solid var(--line); }
.cfg-tr { border-bottom: 1px solid var(--line); }
.cfg-tr:last-child { border-bottom: none; }
.cfg-in { background: rgba(4,6,12,.7); border: 1px solid var(--line-2); border-radius: 10px; color: var(--txt); font-size: 13px; padding: 10px 12px; outline: none; transition: border-color .18s, box-shadow .18s; width: 100%; }
.cfg-in:focus { border-color: var(--svc, var(--acc)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--svc,var(--acc)) 16%, transparent); }
.cfg-del { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(244,63,94,.08); color: var(--hot); cursor: pointer; font-size: 15px; transition: all .15s; }
.cfg-del:hover { background: var(--hot); color: #fff; border-color: transparent; }
.cfg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: rgba(255,255,255,.02); flex-wrap: wrap; }
.cfg-add { border: 1px dashed var(--svc,var(--acc)); background: color-mix(in srgb, var(--svc,var(--acc)) 10%, transparent); color: var(--svc,var(--acc)); font-weight: 800; font-size: 13px; letter-spacing: .5px; padding: 11px 18px; border-radius: 11px; cursor: pointer; transition: all .15s; }
.cfg-add:hover { background: color-mix(in srgb, var(--svc,var(--acc)) 20%, transparent); }
.cfg-saved { font-size: 12px; font-weight: 700; color: var(--acc); }

@media (max-width: 720px) {
  .cfg-th { display: none; }
  .cfg-tr { grid-template-columns: 1fr 44px; grid-template-areas: 'lang del' 'sender del' 'subject del'; }
}

/* ===== ACCESO · Consola de transmisión ===== */
.login-screen { position: fixed; inset: 0; z-index: 1000; overflow: hidden auto;
  display: flex; flex-direction: column; background: #04060c; }
.login-screen[hidden] { display: none; }

/* -- Capa 1: muro de pósters en movimiento -- */
.lgx-wall { position: fixed; inset: -18% -12%; z-index: 0; pointer-events: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px;
  opacity: .16; filter: grayscale(.55) blur(1px); animation: wallDrift 46s linear infinite; }
.lgx-wall img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; }
@keyframes wallDrift { from { transform: translate3d(0,0,0) } to { transform: translate3d(-190px,-208px,0) } }

/* -- Capa 2: viñeta + tinte -- */
.lgx-vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(58% 62% at 50% 46%, rgba(4,6,12,.55), rgba(4,6,12,.94) 72%, #04060c 100%),
    radial-gradient(50% 55% at 8% 8%, rgba(45,212,191,.20), transparent 60%),
    radial-gradient(50% 55% at 92% 92%, rgba(168,85,247,.22), transparent 60%); }

/* -- Capa 3: scanlines -- */
.lgx-scan { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.028) 0 1px, transparent 1px 3px);
  animation: scanMove 8s linear infinite; }
@keyframes scanMove { to { background-position: 0 300px } }

/* -- Capa 4: haz de luz que barre -- */
.lgx-beam { position: fixed; top: 0; bottom: 0; width: 42vw; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(34,211,238,.09) 45%, rgba(45,212,191,.05) 60%, transparent);
  filter: blur(28px); animation: beamSweep 11s ease-in-out infinite; }
@keyframes beamSweep { 0%,100% { left: -50vw } 50% { left: 105vw } }

/* -- Barra superior -- */
.lgx-top { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px clamp(16px, 4vw, 44px);
  background: linear-gradient(180deg, rgba(10,14,24,.92), rgba(7,10,18,.5)); backdrop-filter: blur(14px); flex-wrap: wrap; }
/* línea de acento inferior con barrido de luz */
.lgx-top::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--acc) 20%, var(--acc-2) 50%, var(--acc-3) 80%, transparent);
  background-size: 200% 100%; animation: topLine 6s linear infinite;
  box-shadow: 0 0 14px color-mix(in srgb, var(--acc) 55%, transparent); }
@keyframes topLine { from { background-position: 200% 0; } to { background-position: -60% 0; } }

.lgx-id { display: flex; align-items: center; gap: 14px; }
.lgx-mark { position: relative; width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  background: radial-gradient(circle at 50% 40%, #0c1424, #05070f);
  box-shadow: 0 0 26px -4px var(--acc), inset 0 0 0 1px color-mix(in srgb, var(--acc) 30%, transparent);
  animation: brandPulse 4s ease-in-out infinite; }
.lgx-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; display: block; }
.lgx-mark::before { content: ''; position: absolute; inset: -3px; border-radius: 17px; z-index: -1;
  background: conic-gradient(from 0deg, var(--acc), var(--acc-2), var(--acc-3), var(--acc)); filter: blur(7px); opacity: .55; animation: spin360 7s linear infinite; }
.lgx-mark .led { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--acc-3); border: 2px solid rgba(8,10,18,.9); box-shadow: 0 0 10px var(--acc-3); animation: blink 1.8s infinite; }
.lgx-word { font-size: 20px; letter-spacing: 2.5px; font-weight: 500; line-height: 1; text-shadow: 0 0 20px color-mix(in srgb, var(--acc) 28%, transparent); }
.lgx-word b { font-weight: 800; background: linear-gradient(100deg, var(--acc), var(--acc-2) 45%, var(--acc-3) 75%, var(--acc-2));
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: wordFlow 5s linear infinite; }
@keyframes wordFlow { to { background-position: 200% center; } }
.lgx-div-v { width: 1px; height: 26px; background: linear-gradient(180deg, transparent, rgba(120,140,190,.4), transparent); }
.lgx-node { font-family: 'Consolas', monospace; font-size: 10.5px; letter-spacing: 1.5px; color: var(--acc-2);
  padding: 5px 11px; border-radius: 8px; background: color-mix(in srgb, var(--acc-2) 8%, rgba(0,0,0,.3));
  border: 1px solid color-mix(in srgb, var(--acc-2) 26%, transparent); }

.lgx-status { display: flex; gap: 9px; flex-wrap: wrap; }
.lgx-status .st { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 1.3px; color: var(--txt-dim); overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.34));
  border: 1px solid rgba(120,140,190,.24); box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 2px 8px -4px #000; }
.lgx-status .led { width: 8px; height: 8px; border-radius: 50%; }
.lgx-status .st.on { color: color-mix(in srgb, var(--acc-3) 55%, #fff); border-color: color-mix(in srgb, var(--acc-3) 40%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--acc-3) 10%, transparent), rgba(0,0,0,.34)); }
.lgx-status .st.cy { color: color-mix(in srgb, var(--acc-2) 60%, #fff); border-color: color-mix(in srgb, var(--acc-2) 40%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--acc-2) 10%, transparent), rgba(0,0,0,.34)); }
.lgx-status .st.vi { color: color-mix(in srgb, #a855f7 60%, #fff); border-color: color-mix(in srgb, #a855f7 42%, transparent); background: linear-gradient(180deg, color-mix(in srgb, #a855f7 10%, transparent), rgba(0,0,0,.34)); }
.lgx-status .st.on .led { background: var(--acc-3); box-shadow: 0 0 9px var(--acc-3); animation: blink 1.6s infinite; }
.lgx-status .st.cy .led { background: var(--acc-2); box-shadow: 0 0 9px var(--acc-2); animation: blink 2.2s .3s infinite; }
.lgx-status .st.vi .led { background: #a855f7; box-shadow: 0 0 9px #a855f7; animation: blink 2.8s .6s infinite; }

/* -- Escenario central -- */
.lgx-stage { position: relative; z-index: 5; flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 20px; padding: 30px 20px; }

/* Ticker de texto */
.lgx-ticker { font-family: 'Consolas', monospace; font-size: 11px; letter-spacing: 2px; color: var(--acc);
  text-shadow: 0 0 12px rgba(45,212,191,.6); height: 14px; }
.lgx-ticker span::after { content: '▍'; animation: blink .9s steps(1) infinite; margin-left: 2px; }

/* Consola */
.lgx-console { position: relative; width: 100%; max-width: 430px; border-radius: 18px; overflow: hidden;
  background: rgba(9, 13, 23, .86); border: 1px solid rgba(120,140,190,.24); backdrop-filter: blur(20px);
  box-shadow: 0 50px 120px -40px #000, 0 0 60px -30px var(--acc), inset 0 1px 0 rgba(255,255,255,.05);
  animation: rise .5s ease both; }
.lgx-chrome { display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.012));
  border-bottom: 1px solid rgba(120,140,190,.18); }
.lgx-chrome .dots { display: flex; gap: 6px; }
.lgx-chrome .dots i { width: 9px; height: 9px; border-radius: 50%; background: #2b3450; }
.lgx-chrome .dots i:nth-child(1) { background: var(--hot); box-shadow: 0 0 8px rgba(244,63,94,.7); }
.lgx-chrome .dots i:nth-child(2) { background: var(--amber); box-shadow: 0 0 8px rgba(251,191,36,.7); }
.lgx-chrome .dots i:nth-child(3) { background: var(--acc-3); box-shadow: 0 0 8px rgba(52,211,153,.7); }
.chrome-title { flex: 1; text-align: center; font-family: 'Consolas', monospace; font-size: 10px; letter-spacing: 2px; color: var(--txt-mut); }
.lgx-chrome .rec { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 800; letter-spacing: 1.5px; color: var(--hot); }
.lgx-chrome .rec i { width: 7px; height: 7px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 10px var(--hot); animation: recPulse 1.4s infinite; }
@keyframes recPulse { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .35; transform: scale(.8) } }

.lgx-body { padding: 26px 26px 22px; }
.lgx-title { font-size: 26px; font-weight: 800; letter-spacing: -.4px; line-height: 1.1; }
.lgx-title b { background: linear-gradient(100deg, var(--acc), var(--acc-2) 55%, var(--acc-3));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.lgx-sub { font-size: 12.5px; color: var(--txt-mut); margin: 6px 0 22px; }
.lgx-body .label { justify-content: flex-start; }
.lgx-body .label::before { background: var(--acc); box-shadow: 0 0 8px var(--acc); }
.lgx-body .control input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(45,212,191,.16); }

/* CTA con destello */
.lgx-body .cta { --svc: var(--acc); position: relative; overflow: hidden; margin-top: 2px; }
.lgx-body .cta::after { content: ''; position: absolute; top: 0; bottom: 0; width: 55px; left: -80px;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  animation: shimmer 3.2s ease-in-out infinite; }
@keyframes shimmer { 0% { left: -80px } 55%, 100% { left: 115% } }
.lgx-body .cta span { position: relative; z-index: 1; }

.lg-forgot { display: block; margin: 11px 0 16px auto; background: none; border: none; cursor: pointer;
  color: var(--txt-mut); font-size: 12px; font-weight: 600; transition: color .18s; }
.lg-forgot:hover { color: var(--acc); }

/* Medidor LED de intentos */
.lgx-meterbox { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(120,140,190,.14); }
.mt-lbl { font-size: 9px; font-weight: 800; letter-spacing: 1.5px; color: var(--txt-mut); }
.lgx-meter { display: flex; gap: 5px; flex: 1; }
.lgx-meter i { flex: 1; height: 7px; border-radius: 3px; background: rgba(120,140,190,.16); transition: all .3s; }
.lgx-meter i.on { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.lgx-meter i.hot { background: var(--hot); box-shadow: 0 0 10px var(--hot); animation: blink .7s infinite; }
.mt-val { font-family: 'Consolas', monospace; font-size: 11px; font-weight: 700; color: var(--txt-dim); }
.lgx-note { text-align: center; font-size: 11px; color: var(--txt-mut); margin-top: 14px; }

/* Píldoras horizontales */
.lgx-pills { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 640px; }
.lgx-pills li { display: flex; align-items: center; gap: 9px; padding: 9px 15px; border-radius: 999px;
  background: rgba(0,0,0,.4); border: 1px solid rgba(120,140,190,.18); backdrop-filter: blur(8px); }
.lgx-pills .led { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 9px var(--acc); flex-shrink: 0; animation: blink 2.4s infinite; }
.lgx-pills li:nth-child(2) .led { background: var(--acc-2); box-shadow: 0 0 9px var(--acc-2); animation-delay: .5s; }
.lgx-pills li:nth-child(3) .led { background: #a855f7; box-shadow: 0 0 9px #a855f7; animation-delay: 1s; }
.lgx-pills b { font-size: 12px; }
.lgx-pills small { font-size: 11px; color: var(--txt-mut); }

/* Carrusel infinito */
.lgx-marquee { position: relative; z-index: 5; overflow: hidden; padding: 16px 0;
  border-top: 1px solid rgba(120,140,190,.14); border-bottom: 1px solid rgba(120,140,190,.14);
  background: rgba(0,0,0,.35);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.mq-track { display: flex; gap: 16px; width: max-content; animation: mqScroll 32s linear infinite; }
.lgx-marquee:hover .mq-track { animation-play-state: paused; }
@keyframes mqScroll { to { transform: translateX(-50%) } }
.mq-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 14px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(120,140,190,.16); flex-shrink: 0;
  transition: border-color .2s, box-shadow .2s, transform .2s; }
.mq-item:hover { transform: translateY(-3px); border-color: var(--acc); box-shadow: 0 0 20px -6px var(--acc); }
.mq-item img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.mq-item span { font-size: 12px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }

/* Errores + pie */
.login-error { margin: 0 0 14px; padding: 11px 14px; border-radius: 10px; background: rgba(244,63,94,.1);
  border: 1px solid color-mix(in srgb, var(--hot) 45%, transparent); color: var(--hot); font-size: 12.5px; font-weight: 600; animation: rise .25s ease both; }
.login-error.info { background: rgba(45,212,191,.08); border-color: color-mix(in srgb, var(--acc) 45%, transparent); color: var(--acc); }

.lgx-foot { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(16px, 4vw, 40px); font-size: 11px; color: var(--txt-mut); flex-wrap: wrap; }
.lgx-foot-sig { display: inline-flex; align-items: center; gap: 7px; font-family: 'Consolas', monospace; letter-spacing: 1px; }
.lgx-foot-sig .led { width: 7px; height: 7px; border-radius: 50%; background: var(--acc-3); box-shadow: 0 0 9px var(--acc-3); animation: blink 2s infinite; }

@media (max-width: 720px) {
  .lgx-top { justify-content: center; }
  .lgx-title { font-size: 22px; }
  .lgx-pills { display: none; }
  .lgx-foot { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .lgx-wall, .lgx-scan, .lgx-beam, .mq-track, .lgx-body .cta::after { animation: none; }
}

/* ===== Chip de usuario (premium) ===== */
.uchip { --rc: var(--acc-3); display: flex; align-items: center; gap: 11px; padding: 11px 12px; margin-bottom: 12px; border-radius: 15px;
  position: relative; overflow: hidden;
  background: linear-gradient(100deg, color-mix(in srgb, var(--rc) 16%, transparent), rgba(255,255,255,.02));
  border: 1px solid color-mix(in srgb, var(--rc) 40%, var(--line)); box-shadow: 0 0 24px -12px var(--rc); }
.uchip.adm { --rc: #22d3ee; } .uchip.sub { --rc: #fbbf24; } .uchip.cli { --rc: #2dd4bf; }
.uchip::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rc); box-shadow: 0 0 12px var(--rc); }
.uchip-avatar { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 800; font-size: 17px; color: #04120f; background: linear-gradient(135deg, var(--rc), color-mix(in srgb, var(--rc) 55%, #fff));
  box-shadow: 0 0 18px -4px var(--rc), inset 0 1px 0 rgba(255,255,255,.4); }
.uchip-led { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--acc-3);
  border: 2px solid rgba(8,10,18,.9); box-shadow: 0 0 8px var(--acc-3); animation: blink 2s infinite; }
.uchip-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.uchip-meta b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uchip-role { font-size: 9px; font-weight: 800; letter-spacing: 1.4px; color: var(--rc); }
.uchip-logout { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(244,63,94,.08); color: var(--hot); cursor: pointer; font-size: 16px; flex-shrink: 0; transition: all .15s; }
.uchip-logout:hover { background: var(--hot); color: #fff; border-color: transparent; box-shadow: 0 0 14px -4px var(--hot); }

/* ===== Clientes ===== */
.cl-form { display: grid; grid-template-columns: 1fr 1.2fr .9fr .9fr auto; gap: 10px; margin-bottom: 6px; }
.cl-add { border: none; border-radius: 11px; padding: 11px 20px; font-weight: 800; font-size: 13px; letter-spacing: .5px; cursor: pointer; color: #04120f; background: linear-gradient(100deg, var(--acc), var(--acc-2)); box-shadow: 0 0 20px -6px var(--acc); white-space: nowrap; }
.cl-list { display: flex; flex-direction: column; gap: 10px; }
.cl-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: center; padding: 13px 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.02); }
.cl-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cl-avatar { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; color: #04120f; background: linear-gradient(135deg, var(--acc-3), var(--acc-2)); }
.cl-meta { display: flex; flex-direction: column; min-width: 0; }
.cl-meta b { font-size: 14px; } .cl-meta small { font-size: 12px; color: var(--txt-dim); }
.cl-badge { font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 8px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--txt-dim); }
.cl-toggle { font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 9px; cursor: pointer; border: 1px solid; background: transparent; }
.cl-toggle.on { color: var(--acc-3); border-color: color-mix(in srgb, var(--acc-3) 45%, transparent); }
.cl-toggle.off { color: var(--txt-mut); border-color: var(--line-2); }
.cl-del { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(244,63,94,.08); color: var(--hot); cursor: pointer; font-size: 15px; }
.cl-del:hover { background: var(--hot); color: #fff; border-color: transparent; }

/* ===== Asignaciones ===== */
.as-stats { margin-left: auto; display: flex; gap: 10px; }
.as-stats div { text-align: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.as-stats b { display: block; font-size: 20px; font-weight: 800; color: var(--acc); }
.as-stats small { font-size: 9px; font-weight: 700; letter-spacing: 1px; color: var(--txt-mut); }
/* ============ SALA DE CONTROL · Gestor de asignaciones ============ */
.ctl { width: 100%; max-width: 1500px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; animation: rise .4s ease both;
  /* base solida: enmarca todo el panel para que no se pierda con el fondo streaming */
  padding: 22px; border-radius: 26px; position: relative;
  background: linear-gradient(180deg, rgba(9,12,21,.9), rgba(6,8,15,.94));
  border: 1px solid var(--line-2); backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px -40px #000, inset 0 1px 0 rgba(255,255,255,.05); }

/* -- Tira de telemetría -- */
.ctl-head { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  padding: 18px 24px; border-radius: 18px; position: relative; overflow: hidden;
  background: linear-gradient(100deg, rgba(45,212,191,.10), rgba(168,85,247,.07) 60%, transparent);
  border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.ctl-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--acc), var(--acc-2) 40%, var(--acc-3), transparent); }
.ctl-id { display: flex; align-items: center; gap: 16px; }
.ctl-ico { position: relative; width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-size: 26px;
  background: rgba(0,0,0,.45); border: 1px solid var(--acc); box-shadow: 0 0 26px -6px var(--acc), inset 0 0 16px rgba(0,0,0,.6); }
.ctl-ico .led { position: absolute; right: -4px; bottom: -4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--acc-3); box-shadow: 0 0 10px var(--acc-3); animation: blink 1.7s infinite; }
.ctl-title { font-size: clamp(20px, 2.4vw, 30px); font-weight: 500; letter-spacing: 2px; line-height: 1; }
.ctl-title b { font-weight: 800; background: linear-gradient(100deg, var(--acc), var(--acc-2) 55%, var(--acc-3));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.ctl-sig { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-family: 'Consolas', monospace;
  font-size: 10px; letter-spacing: 1.6px; color: var(--txt-mut); }
.ctl-sig .led { width: 7px; height: 7px; border-radius: 50%; background: var(--acc-3); box-shadow: 0 0 9px var(--acc-3); animation: blink 1.4s infinite; }

.ctl-gauges { display: flex; gap: 0; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 4px 26px; position: relative; }
.gauge + .gauge::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.g-val { font-family: 'Consolas', monospace; font-size: 26px; font-weight: 800; color: var(--acc);
  text-shadow: 0 0 18px color-mix(in srgb, var(--acc) 60%, transparent); line-height: 1; }
.g-lbl { font-size: 9px; font-weight: 800; letter-spacing: 1.4px; color: var(--txt-mut); }
.g-bar { display: flex; gap: 3px; }
.g-bar i { width: 8px; height: 4px; border-radius: 2px; background: rgba(120,140,190,.18); }
.g-bar i.on { background: var(--acc); box-shadow: 0 0 7px var(--acc); }
.g-bar i.on:nth-child(1) { animation: blink 3s infinite } .g-bar i.on:nth-child(3) { animation: blink 3s .6s infinite }
.g-bar i.on:nth-child(5) { animation: blink 3s 1.2s infinite }

/* -- Ruta: 3 zonas + conectores -- */
.route { display: grid; grid-template-columns: 1.15fr 42px 1.25fr 42px .8fr; gap: 0; align-items: stretch; }
.rz { border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(165deg, var(--panel), var(--panel-2));
  overflow: hidden; transition: border-color .3s, box-shadow .3s; display: flex; flex-direction: column; }
.rz.ok { border-color: color-mix(in srgb, var(--acc) 55%, transparent); box-shadow: 0 0 30px -14px var(--acc); }
.rz-head { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent); }
.rz-head .led { width: 8px; height: 8px; border-radius: 50%; background: rgba(120,140,190,.3); transition: all .3s; }
.rz.ok .rz-head .led { background: var(--acc-3); box-shadow: 0 0 10px var(--acc-3); animation: blink 1.6s infinite; }
.rz-n { font-family: 'Consolas', monospace; font-size: 16px; font-weight: 800; color: var(--txt-mut); }
.rz.ok .rz-n { color: var(--acc); text-shadow: 0 0 12px var(--acc); }
.rz-t { flex: 1; font-size: 10px; font-weight: 800; letter-spacing: 1.6px; color: var(--txt-dim); }
.rz-tag { min-width: 26px; height: 22px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px;
  font-family: 'Consolas', monospace; font-size: 12px; font-weight: 800;
  background: rgba(120,140,190,.14); color: var(--txt-mut); transition: all .3s; }
.rz.ok .rz-tag { background: var(--acc); color: #04120f; box-shadow: 0 0 14px -3px var(--acc); }
.rz-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 12px; }

/* Terminal de correos */
.term-wrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: rgba(2,4,9,.85); }
.term-scan { position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(0deg, rgba(45,212,191,.05) 0 1px, transparent 1px 4px); }
.term { width: 100%; min-height: 168px; resize: vertical; background: transparent; border: none; outline: none;
  color: #d7fff7; font-family: 'Consolas', monospace; font-size: 13px; line-height: 1.7; padding: 12px 14px; position: relative; z-index: 2; }
.term::placeholder { color: #2f4a52; }
.term-wrap:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(45,212,191,.14); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 120px; overflow-y: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-family: 'Consolas', monospace; font-size: 11px; animation: rise .25s ease both; }
.chip.ok { background: rgba(45,212,191,.1); border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent); color: var(--acc); }
.chip.ok .led { width: 5px; height: 5px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 6px var(--acc); }
.chip.bad { background: rgba(244,63,94,.08); border: 1px solid color-mix(in srgb, var(--hot) 35%, transparent); color: var(--hot); text-decoration: line-through; }

/* Módulos de destino */
.mod { display: flex; flex-direction: column; }
.mod-lbl { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; color: var(--txt-dim); margin-bottom: 8px; }
.mod-lbl .led { width: 7px; height: 7px; border-radius: 50%; background: rgba(120,140,190,.3); transition: all .3s; }
.mod-lbl .led.on { background: var(--acc-3); box-shadow: 0 0 9px var(--acc-3); }

/* Conectores animados */
.link { display: flex; align-items: center; justify-content: center; gap: 5px; position: relative; }
.link::before { content: ''; position: absolute; left: 4px; right: 4px; height: 1px; background: var(--line-2); }
.link i { width: 6px; height: 6px; border-radius: 50%; background: rgba(120,140,190,.25); position: relative; z-index: 1; transition: background .3s; }
.link.live i { background: var(--acc); box-shadow: 0 0 9px var(--acc); animation: flowDot 1.3s infinite; }
.link.live i:nth-child(2) { animation-delay: .18s } .link.live i:nth-child(3) { animation-delay: .36s }
@keyframes flowDot { 0%,100% { opacity: .25; transform: scale(.8) } 50% { opacity: 1; transform: scale(1.25) } }

/* Zona ejecutar */
.rz-exec .exec { align-items: center; justify-content: center; text-align: center; gap: 16px; }
.ring { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; align-content: center;
  border: 2px solid var(--line-2); background: rgba(0,0,0,.4); transition: all .35s; }
.ring b { font-family: 'Consolas', monospace; font-size: 30px; font-weight: 800; color: var(--txt-mut); line-height: 1; transition: color .3s; }
.ring small { font-size: 9px; letter-spacing: 1.3px; color: var(--txt-mut); }
.ring.ready { border-color: var(--acc); box-shadow: 0 0 34px -6px var(--acc), inset 0 0 22px -8px var(--acc); animation: ringPulse 2s infinite; }
.ring.ready b { color: var(--acc); text-shadow: 0 0 18px var(--acc); }
@keyframes ringPulse { 0%,100% { box-shadow: 0 0 34px -6px var(--acc), inset 0 0 22px -8px var(--acc) } 50% { box-shadow: 0 0 52px -4px var(--acc), inset 0 0 28px -6px var(--acc) } }
.patch { width: 100%; border: none; border-radius: 13px; padding: 15px; cursor: pointer; position: relative; overflow: hidden;
  font-weight: 800; font-size: 14px; letter-spacing: 1.2px; color: #04120f;
  background: linear-gradient(100deg, var(--acc), var(--acc-2)); box-shadow: 0 0 28px -8px var(--acc); transition: transform .12s; }
.patch:not(:disabled)::after { content: ''; position: absolute; top: 0; bottom: 0; width: 46px; left: -70px;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent); animation: shimmer 2.6s ease-in-out infinite; }
.patch span { position: relative; z-index: 1; }
.patch:active { transform: translateY(1px); }
.patch:disabled { background: rgba(120,140,190,.12); color: var(--txt-mut); box-shadow: none; cursor: not-allowed; }

/* -- Registro -- */
.log { border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(165deg, var(--panel), var(--panel-2)); overflow: hidden; }
.log-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 13px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.05), transparent); }
.log-title { display: flex; align-items: center; gap: 9px; font-size: 10px; font-weight: 800; letter-spacing: 1.6px; color: var(--txt-dim); }
.log-title .led { width: 7px; height: 7px; border-radius: 50%; background: var(--acc-3); box-shadow: 0 0 9px var(--acc-3); animation: blink 2s infinite; }
.log-title b { font-family: 'Consolas', monospace; font-size: 13px; color: var(--acc); background: rgba(45,212,191,.1);
  padding: 2px 9px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--acc) 30%, transparent); }
.log-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.log-search { display: flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 10px; min-width: 260px;
  background: rgba(2,4,9,.7); border: 1px solid var(--line-2); transition: border-color .2s; }
.log-search:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(45,212,191,.13); }
.log-search span { opacity: .5; font-size: 12px; }
.log-search input { flex: 1; background: none; border: none; outline: none; color: var(--txt); font-size: 12.5px; }
.switch { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font-size: 10px; font-weight: 800; letter-spacing: 1.2px; color: var(--txt-mut);
  background: rgba(0,0,0,.35); border: 1px solid var(--line-2); transition: all .2s; }
.switch i { width: 24px; height: 12px; border-radius: 999px; background: rgba(120,140,190,.25); position: relative; transition: background .25s; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--txt-mut); transition: all .25s; }
.switch.on { color: var(--acc); border-color: var(--acc); }
.switch.on i { background: color-mix(in srgb, var(--acc) 40%, transparent); }
.switch.on i::after { left: 14px; background: var(--acc); box-shadow: 0 0 8px var(--acc); }

.log-rows { display: flex; flex-direction: column; }
.log-row { display: grid; grid-template-columns: 8px 34px 1fr 18px 1fr auto 34px; gap: 12px; align-items: center;
  padding: 11px 16px; border-bottom: 1px solid rgba(120,140,190,.08); transition: background .15s, transform .15s;
  animation: rise .3s ease both; font-size: 12.5px; }
.log-row:last-child { border-bottom: none; }
.log-row:hover { background: rgba(255,255,255,.035); transform: translateX(3px); }
.log-row .led { width: 7px; height: 7px; border-radius: 50%; background: var(--svc); box-shadow: 0 0 8px var(--svc); }
.lr-n { font-family: 'Consolas', monospace; font-size: 10px; color: var(--txt-mut); }
.lr-mail { font-family: 'Consolas', monospace; color: var(--txt); word-break: break-all; }
.lr-arrow { color: var(--acc); font-weight: 800; }
.lr-cli { color: var(--txt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-plat { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--svc) 14%, transparent); color: var(--svc);
  border: 1px solid color-mix(in srgb, var(--svc) 35%, transparent); white-space: nowrap; }
.lr-plat img { width: 17px; height: 17px; border-radius: 5px; object-fit: cover; }
.lr-plat.any { background: rgba(255,255,255,.04); color: var(--txt-mut); border-color: var(--line-2); }

@media (max-width: 1250px) {
  .route { grid-template-columns: 1fr; gap: 12px; }
  .link { height: 30px; transform: rotate(90deg); }
  .ctl-gauges { width: 100%; justify-content: space-around; }
}
@media (max-width: 760px) {
  .log-row { grid-template-columns: 8px 1fr auto; }
  .lr-n, .lr-arrow, .lr-cli { display: none; }
  .log-search { min-width: 0; width: 100%; }
}

/* Gestor de asignaciones (rejilla de 4 columnas) */
.as-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 18px; align-items: start; margin-bottom: 26px; }
.as-action { justify-content: flex-start; padding-top: 22px; min-width: 170px; }
.as-btn { width: 100%; }
.as-btn:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.6); box-shadow: none; }
.as-hint { font-size: 11px; color: var(--txt-mut); margin-top: 8px; text-align: center; line-height: 1.4; }
.cnt-badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  background: var(--acc); color: #04120f; font-weight: 800; font-size: 12px; box-shadow: 0 0 12px -3px var(--acc); }
.as-prev { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(45,212,191,.06);
  border: 1px solid color-mix(in srgb, var(--acc) 35%, transparent); }
.as-prev b { font-size: 11px; color: var(--acc); letter-spacing: .5px; }
.as-prev ol { margin: 8px 0 0 20px; font-family: 'Consolas', monospace; font-size: 12px; color: var(--txt-dim); }
.as-prev li { margin-bottom: 3px; word-break: break-all; }

/* Resultados de búsqueda (cliente / plataforma) */
.as-results { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.as-tip, .as-none { margin-top: 9px; padding: 12px 14px; border-radius: 11px; font-size: 12px; color: var(--txt-mut);
  border: 1px dashed var(--line-2); background: rgba(255,255,255,.015); line-height: 1.5; }
.as-none { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: rgba(251,191,36,.06); }
.as-none small { color: var(--txt-mut); }
.as-client { display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--txt); transition: all .15s; }
.as-client:hover { border-color: var(--acc); background: rgba(45,212,191,.06); }
.as-client.sel { cursor: default; border-color: var(--acc); background: linear-gradient(100deg, rgba(45,212,191,.12), rgba(255,255,255,.02));
  box-shadow: 0 0 20px -8px var(--acc); }
.ac-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ac-name { font-size: 13px; font-weight: 700; }
.ac-code { font-family: 'Consolas', monospace; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
  color: var(--amber); background: rgba(251,191,36,.1); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.ac-line { font-size: 11.5px; color: var(--txt-dim); word-break: break-all; margin-top: 2px; }
.ac-line.dim { color: var(--txt-mut); font-size: 11px; margin-top: 6px; }
.ac-clear { margin-top: 10px; width: 100%; padding: 7px; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2); color: var(--txt-mut); }
.ac-clear:hover { color: var(--hot); border-color: var(--hot); }

.as-plat-opt { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 11px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--txt); font-size: 12.5px; text-align: left; transition: all .15s; }
.as-plat-opt:hover { border-color: var(--line-2); background: rgba(255,255,255,.055); }
.as-plat-opt.sel { border-color: var(--acc); background: rgba(45,212,191,.09); box-shadow: inset 3px 0 0 var(--acc); }
.as-plat-opt img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.as-plat-opt i { font-style: normal; }
.as-plat-opt span { flex: 1; }

/* Cabecera de la lista + estado oculto */
.as-listhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 12px; flex-wrap: wrap; }
.as-all { padding: 8px 16px; border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2); color: var(--txt-dim); transition: all .15s; }
.as-all:hover { color: var(--acc); border-color: var(--acc); }
.as-hidden { text-align: center; padding: 46px 20px; border: 1px dashed var(--line-2); border-radius: 16px; background: rgba(255,255,255,.012); }
.as-hidden .ah-ico { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 14px; display: grid; place-items: center;
  font-size: 24px; font-weight: 800; color: var(--acc-2); background: rgba(34,211,238,.08); border: 1px solid color-mix(in srgb, var(--acc-2) 35%, transparent); }
.as-hidden h3 { font-size: 18px; margin-bottom: 5px; }
.as-hidden p { font-size: 12px; color: var(--txt-mut); }
.as-owner { font-size: 12px; color: var(--txt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }

.as-form { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.as-col { display: flex; flex-direction: column; }
.as-lbl { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--txt-dim); margin-bottom: 8px; }
.as-ta { min-height: 130px; resize: vertical; background: rgba(4,6,12,.7); border: 1px solid var(--line-2); border-radius: 12px; color: var(--txt); font-size: 13px; padding: 12px; outline: none; font-family: 'Consolas', monospace; }
.as-ta:focus { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 16%, transparent); }
.as-count { font-size: 12px; color: var(--txt-mut); margin-top: 8px; } .as-count b { color: var(--acc); }
.as-list { display: flex; flex-direction: column; gap: 8px; }
.as-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: center; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.as-mail { font-size: 13px; word-break: break-all; }
.as-plat { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 7px; background: color-mix(in srgb, var(--acc) 14%, transparent); color: var(--acc); }
.as-plat.any { background: rgba(255,255,255,.05); color: var(--txt-dim); }
.as-del { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(244,63,94,.08); color: var(--hot); cursor: pointer; font-weight: 800; }
.as-del:hover { background: var(--hot); color: #fff; border-color: transparent; }

@media (max-width: 1100px) { .as-grid { grid-template-columns: 1fr 1fr; } .as-action { min-width: 0; padding-top: 0; } }
@media (max-width: 760px) {
  .cl-form { grid-template-columns: 1fr; }
  .as-form, .as-grid { grid-template-columns: 1fr; }
  .as-stats { flex-wrap: wrap; }
  .as-row { grid-template-columns: 1fr auto; }
  .as-owner { max-width: none; }
}

/* Toast */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(140%); background: var(--panel-solid);
  border: 1px solid var(--acc); color: var(--txt); padding: 13px 22px; border-radius: 12px; font-weight: 700; font-size: 14px;
  box-shadow: 0 0 30px -8px var(--acc); transition: transform .3s; z-index: 60; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ============ BARRA SUPERIOR MÓVIL + CAJÓN ============ */
/* Ocultas en escritorio; se activan en el media query móvil. */
.mtop { display: none; }
.scrim { display: none; }

.mtop { align-items: center; gap: 12px; padding: 10px 14px; position: sticky; top: 0; z-index: 45;
  background: linear-gradient(180deg, rgba(9,12,21,.96), rgba(9,12,21,.82)); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-2); }
.mburger { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: grid; place-content: center; gap: 5px;
  background: color-mix(in srgb, var(--acc) 10%, rgba(255,255,255,.03)); border: 1px solid var(--line-2); cursor: pointer; }
.mburger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--acc); box-shadow: 0 0 6px var(--acc);
  transition: transform .28s, opacity .2s; }
.shell.nav-open .mburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.shell.nav-open .mburger span:nth-child(2) { opacity: 0; }
.shell.nav-open .mburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mtop-brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.mtop-mark { position: relative; width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; overflow: visible;
  background: radial-gradient(circle at 50% 40%, #0c1424, #05070f);
  box-shadow: 0 0 18px -4px var(--acc), inset 0 0 0 1px color-mix(in srgb, var(--acc) 30%, transparent); }
.mtop-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
.mtop-mark .led { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--acc-3); border: 2px solid rgba(8,10,18,.9); box-shadow: 0 0 8px var(--acc-3); animation: blink 2.4s infinite; }
.mtop-brand b { font-size: 16px; letter-spacing: 1.5px; font-weight: 500; white-space: nowrap; }
.mtop-brand b span { font-weight: 800; background: linear-gradient(90deg,var(--acc),var(--acc-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mtop-conn { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.mtop-conn .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--txt-mut); }
.mtop-conn.on .dot { background: var(--acc); box-shadow: 0 0 10px var(--acc); animation: blink 2s infinite; }

.scrim { position: fixed; inset: 0; z-index: 48; background: rgba(3,5,10,.6); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .3s; }
.shell.nav-open .scrim { opacity: 1; pointer-events: auto; }

/* ============ RESPONSIVE: TABLET / MÓVIL ============ */
@media (max-width: 900px) {
  .mtop { display: flex; }
  .shell { grid-template-columns: 1fr; }
  /* el sidebar pasa a ser un cajón que entra desde la izquierda */
  .sidebar { position: fixed; top: 0; left: 0; height: 100dvh; width: min(84vw, 320px); z-index: 50;
    transform: translateX(-102%); transition: transform .32s cubic-bezier(.4,.14,.3,1);
    overflow-y: auto; box-shadow: 24px 0 60px -30px #000; }
  .shell.nav-open .sidebar { transform: translateX(0); }
  .plat-list { max-height: none; }
  .stage { padding: 18px 14px 40px; }
  /* pestañas de rutas: desplazables en horizontal en vez de recortarse */
  .cfg-main .rt-tabs { margin-left: 0; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 4px; scrollbar-width: none; }
  .cfg-main .rt-tabs::-webkit-scrollbar { display: none; }
  .rt-tab { flex: 0 0 auto; }
}

@media (max-width: 560px) {
  .stage { padding: 14px 11px 36px; }
  .mtop-brand b { font-size: 15px; }
}
