/* Conéctate Fiber GIS — frentes físicos del rack v0.9.4 */
.rf-envoltura { overflow-x: auto; }
.rf-rack { width: 920px; padding: 22px 26px 30px; border-radius: 20px; background: radial-gradient(ellipse 120% 60% at 50% 0%, #1d2d4d 0%, #0e1729 55%, #0a1120 100%);
  box-shadow: inset 0 0 0 1px #ffffff12, 0 20px 40px #0f172a40; font-family: Inter, system-ui, sans-serif; }
.rf-cab { text-align: center; margin-bottom: 18px; color: #e2e8f0; }
.rf-cab div { font-size: 30px; letter-spacing: -.01em; }
.rf-cab b { font-weight: 700; color: #f8fafc; } .rf-cab i { font-style: normal; color: #60a5fa; margin: 0 10px; } .rf-cab span { font-weight: 300; }
.rf-cab small { display: block; color: #9fb0c8; font-size: 15px; margin-top: 2px; }
.rf-armario { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 6px 0; }
/* rieles verticales */
.rf-armario::before, .rf-armario::after { content: ""; position: absolute; top: 0; bottom: 0; width: 26px; z-index: 0;
  background: repeating-linear-gradient(180deg, #121a28 0 5px, #05080e 5px 10px, #121a28 10px 18px), linear-gradient(90deg, #1b2433, #2a3446 50%, #1b2433);
  background-blend-mode: multiply; box-shadow: inset 0 0 0 1px #ffffff0f; }
.rf-armario::before { left: 48px; } .rf-armario::after { right: 0; }
.rf-fila { position: relative; z-index: 1; display: grid; grid-template-columns: 48px 1fr; }
.rf-us { display: flex; flex-direction: column; justify-content: space-around; align-items: flex-end; padding-right: 10px; color: #7d8ba4; font-size: 15px; font-variant-numeric: tabular-nums; }
.rf-fila.libre .rf-us { font-size: 12px; color: #55627a; justify-content: space-between; }

/* equipo con orejas y tornillos */
.rf-eq { --oreja: 26px; position: relative; padding: 0 var(--oreja); border-radius: 4px; cursor: pointer;
  background:
    radial-gradient(circle at calc(var(--oreja) / 2) 14px, #c6ccd6 0 4px, #59606c 4.5px 6px, transparent 6.5px),
    radial-gradient(circle at calc(var(--oreja) / 2) calc(100% - 14px), #c6ccd6 0 4px, #59606c 4.5px 6px, transparent 6.5px),
    radial-gradient(circle at calc(100% - var(--oreja) / 2) 14px, #c6ccd6 0 4px, #59606c 4.5px 6px, transparent 6.5px),
    radial-gradient(circle at calc(100% - var(--oreja) / 2) calc(100% - 14px), #c6ccd6 0 4px, #59606c 4.5px 6px, transparent 6.5px),
    linear-gradient(90deg, #1a2130 0, #2b3343 var(--oreja), #10151f var(--oreja), #10151f calc(100% - var(--oreja)), #2b3343 calc(100% - var(--oreja)), #1a2130 100%);
  box-shadow: 0 3px 10px #0009, inset 0 1px 0 #ffffff14; }
.rf-eq:hover { filter: brightness(1.06); }
.rf-eq.sel { outline: 3px solid #f59e0b; outline-offset: 2px; }
.rf-eq.olt { box-shadow: 0 0 0 2px #f59e0bcc, 0 0 26px #f59e0b33, 0 3px 10px #0009; }
.rf-etq { height: 30px; display: flex; align-items: center; gap: 12px; padding: 0 14px; color: #cbd5e1; font-size: 13.5px; white-space: nowrap; overflow: hidden; }
.rf-etq i { width: 12px; height: 12px; border-radius: 50%; background: #475569; flex: none; }
.rf-etq i.on { background: #22c55e; box-shadow: 0 0 8px #22c55eaa; }
.rf-etq b { color: #fff; font-size: 15px; letter-spacing: .01em; }
.rf-etq span { color: #d6dde8; overflow: hidden; text-overflow: ellipsis; }
.rf-etq em { margin-left: auto; font-style: normal; color: #4ade80; font-size: 13px; }
.rf-cara { position: relative; margin-bottom: 6px; border-radius: 3px; overflow: hidden; }
.rf-libre { display: flex; align-items: center; justify-content: center; margin: 0 26px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, #0d1422 0 4px, #0a0f19 4px 8px); box-shadow: inset 0 0 0 1px #ffffff0a; }
.rf-libre span { color: #4b5873; font-size: 11px; letter-spacing: .05em; }

/* piezas comunes */
.fp { position: absolute; inset: 0; display: flex; align-items: center; gap: 14px; padding: 6px 16px; }
.fp-t { display: none; }
.fp-marca { flex: none; line-height: 1; }
.fp-marca small { display: block; font-size: 9px; font-weight: 500; margin-top: 3px; letter-spacing: 0; line-height: 1.2; }
.fp-leds { display: inline-flex; flex-direction: column; gap: 2px; font-size: 8px; line-height: 9px; color: #6b7280; flex: none; }
.fp-leds span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.fp-leds i { width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 4px currentColor; }
.fp-usb { display: inline-block; width: 8px; height: 16px; flex: none; border-radius: 1px; background: linear-gradient(90deg, #1e3a8a 0 40%, #2563eb 40%); box-shadow: 0 0 0 1.5px #9ca3af; }
.fp-num { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.fp-num small, .fp-rej small { font-size: 8.5px; color: #4b5563; text-align: center; line-height: 1; }
.fp-fila { display: flex; gap: 3px; align-items: flex-end; }
.fp-rej { display: grid; gap: 2px 3px; padding: 3px 5px; border-radius: 3px; background: #0000000f; }

/* puertos: cada uno se ve lleno si tiene cordón */
.fp-sfp, .fp-qsfp, .fp-rj, .fp-pon-p, .fp-odf-p { position: relative; display: inline-block; flex: none; cursor: pointer; }
.fp-sfp { width: 20px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, #c9ced6, #8d949e); box-shadow: inset 0 0 0 1px #6b7280; }
.fp-sfp i { position: absolute; inset: 3px 3px 2px; background: #0b0d12; border-radius: 1px; }
.fp-sfp.on i { background: linear-gradient(180deg, #2563eb 0 50%, #1e3a8a 50%); }
.fp-sfp.on::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -4px; height: 4px; background: #facc15; border-radius: 0 0 2px 2px; }
.fp-qsfp { width: 30px; height: 18px; border-radius: 2px; background: linear-gradient(180deg, #c9ced6, #8d949e); box-shadow: inset 0 0 0 1px #6b7280; }
.fp-qsfp i { position: absolute; inset: 3px; background: #0b0d12; border-radius: 1px; }
.fp-qsfp.on i { background: linear-gradient(180deg, #64748b, #334155); }
.fp-qsfp.on b { position: absolute; left: 9px; right: 9px; top: -7px; height: 12px; background: #facc15; border-radius: 3px 3px 0 0; box-shadow: 0 0 0 1px #a16207; }
.fp-rj { width: 20px; height: 17px; border-radius: 2px; background: linear-gradient(180deg, #bfc5cd, #868d97); box-shadow: inset 0 0 0 1px #6b7280; }
.fp-rj i { position: absolute; inset: 3px 3px 2px; background: #07090d;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 75% 70%, 75% 100%, 25% 100%, 25% 70%, 0 70%); }
.fp-rj.on i { background: #1f2937; }
.fp-rj.on::before { content: ""; position: absolute; left: 2px; top: 1px; width: 4px; height: 3px; background: #22c55e; box-shadow: 12px 0 #f59e0b; }
.fp-pon-p { width: 22px; height: 20px; border-radius: 3px; background: linear-gradient(180deg, #2f6fe4, #1e40af); box-shadow: inset 0 0 0 1px #1e3a8a, 0 1px 0 #ffffff60; }
.fp-pon-p i { position: absolute; left: 6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #0b1020; box-shadow: inset 0 0 0 2px #0f2a6b; }
.fp-pon-p.on i { background: radial-gradient(#fef08a, #facc15 60%, #a16207); }
.fp-pon-p.on::before { content: ""; position: absolute; right: 100%; top: 6px; width: 7px; height: 8px; background: #facc15; border-radius: 2px 0 0 2px; }
.fp-odf-p { width: 18px; height: 16px; border-radius: 2px; background: linear-gradient(180deg, #22c55e, #15803d); box-shadow: inset 0 0 0 1px #14532d; }
.fp-odf-p i { position: absolute; left: 5px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: #052e16; }
.fp-odf-p.on i { background: #facc15; }
.fp-sfp:hover, .fp-qsfp:hover, .fp-rj:hover, .fp-pon-p:hover, .fp-odf-p:hover, .fp-sel-port { outline: 2px solid #f59e0b; outline-offset: 1px; z-index: 3; }

/* OLT Huawei */
.fp-olt { flex-direction: column; align-items: stretch; gap: 0; padding: 0 30px; background: linear-gradient(180deg, #2a2f38, #1b1f27); }
.olt-tapa { position: relative; height: 46px; flex: none; display: flex; align-items: flex-end; padding: 0 6px 4px; color: #cbd5e1; font-size: 12px; }
.olt-llave { position: relative; padding-bottom: 6px; }
.olt-llave::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: 0; height: 6px; border: 1px solid #94a3b8; border-bottom: 0; border-radius: 3px 3px 0 0; }
.olt-llave.izq { width: 50%; text-align: center; }
.olt-llave.adm { width: 13%; text-align: center; margin-left: 2%; }
.olt-llave.up { margin-left: auto; width: 8%; text-align: center; font-size: 11px; }
.olt-asa { position: absolute; left: 50%; top: 6px; width: 74px; height: 22px; transform: translateX(-50%); border: 3px solid #a3aab5; border-radius: 6px; }
.olt-adv { position: absolute; right: 100px; top: 8px; width: 40px; height: 16px; background: linear-gradient(90deg, #f8fafc 0 40%, #e5e7eb 40%); border: 1px solid #ef4444; border-radius: 2px; }
.olt-slots { flex: 1; min-height: 0; display: flex; gap: 3px; padding: 0 2px; }
.olt-base { height: 14px; flex: none; }
.olt-c { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 2px; border-radius: 3px;
  background: linear-gradient(90deg, #b9bec6 0, #eef0f3 18%, #f8f9fb 50%, #dfe2e7 82%, #a9afb8 100%); box-shadow: inset 0 0 0 1px #8b929c; }
.olt-c.gpon { flex: 1.15; }
.olt-c .fp-leds { color: #374151; align-self: flex-start; margin-left: 6px; }
.olt-tor { width: 12px; height: 12px; flex: none; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #9ca3af, #3f4652 70%); box-shadow: 0 1px 1px #0006; }
.olt-alerta { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 12px solid #eab308; flex: none; }
.olt-pon { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 2px 0; }
.olt-pf { display: flex; align-items: center; gap: 3px; }
.olt-pf em { font-style: normal; font-size: 9.5px; color: #1f2937; width: 12px; }
.olt-ctrl { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 4px; }
.olt-ctrl .fp-rj { width: 24px; height: 20px; }
.olt-rejilla { width: 26px; height: 26px; background: radial-gradient(circle, #111827 1.8px, transparent 2.2px) 0 0 / 8px 8px; }
.olt-etq-ctrl { width: 70%; height: 22px; background: linear-gradient(180deg, #fde047, #eab308); border-radius: 2px; }
.olt-c.ciego { background: linear-gradient(90deg, #d8d2c4 0, #f3efe6 30%, #f7f4ed 55%, #ded8ca 100%); box-shadow: inset 0 0 0 1px #b8b09e; }
.olt-pest { margin-top: 70%; width: 70%; height: 22px; background: linear-gradient(180deg, #cfc7b4, #b9b09a); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.olt-ups { width: 64px; flex: none; display: flex; flex-direction: column; gap: 3px; }
.olt-up { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 4px; border-radius: 3px; font-size: 10px; text-align: center; color: #111827;
  background: linear-gradient(90deg, #b9bec6 0, #eef0f3 18%, #f8f9fb 50%, #dfe2e7 82%, #a9afb8 100%); box-shadow: inset 0 0 0 1px #8b929c; }
.olt-up .fp-leds { color: #374151; }
.olt-up-p { display: flex; flex-direction: column; gap: 8px; }
.olt-up-p .fp-sfp { width: 24px; height: 18px; }
.olt-up-etq { width: 70%; height: 16px; margin-top: auto; background: linear-gradient(180deg, #fde047, #eab308); border-radius: 2px; }
.olt-haz { position: absolute; top: 70px; bottom: 26px; width: 24px; border: 7px solid #eab308; z-index: 2; pointer-events: none;
  box-shadow: 0 0 0 1px #a16207, inset 0 0 0 1px #a16207; filter: drop-shadow(0 2px 2px #0008); }
.olt-haz.izq { left: 2px; border-right: 0; border-radius: 40px 0 0 40px; }
.olt-haz.der { right: 2px; border-left: 0; border-radius: 0 40px 40px 0; }

/* Arista */
.fp-arista { background: linear-gradient(180deg, #f1f3f5 0, #dde1e6 50%, #c8cdd4 100%); gap: 12px; }
.fp-marca.arista { color: #3f4650; font-size: 17px; font-weight: 600; letter-spacing: .14em; }
.fp-mg { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.fp-q { display: grid; grid-template-columns: repeat(2, auto); gap: 9px 6px; padding: 8px 8px 4px; border-radius: 4px; background: #9aa2ad55; box-shadow: inset 0 0 0 1px #8b929c; }
.fp-arista .fp-leds { margin-left: auto; color: #374151; }

/* MikroTik */
.fp-mk { background: linear-gradient(180deg, #ffffff 0, #f1f4f7 60%, #dfe4ea 100%); gap: 14px; }
.fp-marca.mk { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; font-size: 20px; color: #1f2937; letter-spacing: -.01em; }
.fp-marca.mk small { font-family: Inter, system-ui, sans-serif; font-style: normal; font-size: 9.5px; color: #374151; }
.fp-zz { flex: none; width: 140px; height: 14px; opacity: .9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14'%3E%3Cpath d='M0 12 L5 2 L10 12' fill='none' stroke='%23111827' stroke-width='2.4'/%3E%3C/svg%3E") repeat-x; }
.fp-zz.largo { width: 100%; }
.fp-crsz { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fp-cons { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.fp-cons small { font-size: 7.5px; color: #4b5563; }
.fp-mk .fp-leds { color: #374151; }
.fp-crs { position: absolute; right: 22px; top: 6px; text-align: right; font: italic 700 11px Inter, system-ui, sans-serif; color: #1f2937; }
.fp-crs small { display: block; font-weight: 400; font-size: 8.5px; }
.fp-mk-pie { position: absolute; right: 22px; bottom: 5px; font: italic 700 12px Georgia, serif; color: #1f2937; }

/* servidores */
.fp-srv { background: linear-gradient(180deg, #252a35 0, #161a22 100%); gap: 16px; }
.fp-marca.hp { color: #f1f5f9; display: flex; align-items: center; gap: 8px; }
.fp-marca.hp b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #f1f5f9; color: #111827; font-style: italic; font-size: 15px; }
.fp-marca.hp small { margin: 0; font-size: 10px; color: #e5e7eb; }
.fp-marca.dell { color: #f1f5f9; font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.fp-marca.dell small { font-size: 9px; color: #cbd5e1; font-weight: 500; }
.fp-bahias { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.fp-bahias > div { display: flex; gap: 6px; }
.fp-cad { flex: 1; position: relative; height: 26px; border-radius: 3px; box-shadow: inset 0 0 0 1px #4b5563;
  background: radial-gradient(circle, #3b4252 1px, transparent 1.4px) 0 0 / 5px 5px, linear-gradient(180deg, #2c3240, #1b1f28); }
.fp-srv.f2 .fp-cad { height: 30px; }
.fp-cad i { position: absolute; right: 22px; top: 22%; width: 10px; height: 56%; background: linear-gradient(180deg, #ef4444, #991b1b); border-radius: 2px; }
.fp-cad b { position: absolute; right: 8px; top: 28%; width: 5px; height: 5px; border-radius: 50%; background: #facc15; box-shadow: 0 7px 0 #22c55e; }
.fp-cad em { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: #facc15aa; border-radius: 3px 0 0 3px; }
.fp-srv-p { display: flex; align-items: center; gap: 8px; }
.fp-dvd { width: 70px; height: 10px; border-radius: 2px; background: #0b0d12; box-shadow: inset 0 0 0 1px #4b5563; }
.fp-ledv { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.fp-power { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid #22c55e; box-shadow: 0 0 8px #22c55e88, inset 0 0 4px #22c55e55; }

/* organizador y ODF */
.fp-org { background: linear-gradient(180deg, #1a1f29 0, #0d1118 100%); gap: 16px; }
.fp-marca.org { color: #f1f5f9; font-size: 13px; font-weight: 700; letter-spacing: .08em; width: 72px; }
.fp-canal { flex: 1; position: relative; height: 72%; border-radius: 6px; background: #030406; box-shadow: inset 0 3px 8px #000; display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.fp-haz { position: relative; height: 62%; border-radius: 30px;
  background: repeating-linear-gradient(175deg, #fde047 0 3px, #eab308 3px 5px, #ca8a04 5px 6px); box-shadow: inset 0 -3px 6px #00000055, 0 2px 4px #0008; }
.fp-haz.a { flex: 2.2; } .fp-haz.b { flex: 1.3; } .fp-haz.c { flex: 1.8; }
.fp-haz::before, .fp-haz::after { content: ""; position: absolute; top: -8%; bottom: -8%; width: 10px; border-radius: 3px; background: linear-gradient(90deg, #111, #2a2a2a, #111); }
.fp-haz::before { left: 22%; } .fp-haz::after { right: 18%; }
.fp-odf { background: linear-gradient(180deg, #1c2230, #10151f); }
.fp-odf-a { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.fp-odf-a > div { display: flex; justify-content: space-between; }
.fp-odf .fp-num small { color: #94a3b8; }
.fp-gen { background: linear-gradient(180deg, #3b4352, #222833); }
.fp-marca.gen { color: #e5e7eb; font-size: 13px; font-weight: 700; }

.rk-vista { display: inline-flex; border: 1px solid var(--pg-borde); border-radius: 10px; overflow: hidden; }
.rk-vista button { border: 0 !important; border-radius: 0 !important; background: var(--pg-tarjeta); }
.rk-vista button.activo { background: var(--pg-azul-suave); color: var(--pg-azul); font-weight: 700; }

/* ajustes de encaje */
.olt-asa { top: 3px; height: 16px; width: 64px; border-width: 3px; left: 49%; }
.olt-llave.up { width: 64px; flex: none; white-space: nowrap; font-size: 10.5px; }
.olt-llave.adm { white-space: nowrap; }
.fp-arista { gap: 8px; padding: 6px 12px; }
.fp-arista .fp-rej { gap: 2px; padding: 2px 3px; }
.fp-arista .fp-sfp { width: 16px; height: 13px; }
.fp-arista .fp-q { gap: 8px 4px; padding: 7px 6px 3px; }
.fp-arista .fp-qsfp { width: 26px; height: 16px; }
.fp-mk { padding-right: 150px; }
.fp-mk .fp-leds { align-self: center; }
.fp-crs { top: 7px; }
.fp-mk-pie { bottom: 7px; }

/* cordones dibujados sobre el rack (v0.10.0) */
.rf-cordones { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; overflow: visible; }
.rf-cordones path { pointer-events: stroke; }
.rf-sinubicar { margin-top: 14px; }
.rf-sinubicar .pg-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* v0.13.0: cordones por los costados, resaltado y puerto a intervenir */
.rf-c path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.rf-c .sombra { stroke: #0009; stroke-width: 5; } .rf-c .hilo { stroke-width: 3; }
.rf-c.tenue { opacity: .18; }
.rf-c.sel .hilo { stroke-width: 4.5; filter: drop-shadow(0 0 4px #fde047); animation: rf-pulso 1.1s ease-in-out infinite; }
.rf-c.sel .sombra { stroke-width: 7; }
@keyframes rf-pulso { 50% { stroke: #fff7ae; } }
.fp-blink { outline: 3px solid #f97316 !important; outline-offset: 2px; z-index: 5; animation: fp-titila .8s steps(2, start) infinite; }
@keyframes fp-titila { 50% { outline-color: #fde047; box-shadow: 0 0 12px 4px #f97316; } }
.rk-buscar { display: flex; gap: 6px; }
.rk-buscar input { min-width: 230px; border-radius: 10px; padding: 8px 10px; }
.rk-pasos { margin: 8px 0 0; padding-left: 18px; } .rk-pasos li { margin: 4px 0; }
.rk-desconectar { padding: 12px; border-radius: 12px; background: #fff7ed; border: 2px solid #f97316; color: #9a3412; margin: 10px 0; }
.rk-desconectar b { display: block; font-size: 17px; color: #7c2d12; }

/* v0.13.1: cordones más finos, como patch cords reales */
.rf-c .sombra { stroke-width: 4; } .rf-c .hilo { stroke-width: 2.2; }
.rf-c.sel .hilo { stroke-width: 3.6; }
