.tabular { font-variant-numeric: tabular-nums; }
pre { white-space: pre-wrap; word-break: break-word; max-height: 50vh; overflow: auto; }
#volver .icon { transform: rotate(180deg); }
#confirmar { z-index: 1050; }
.metrica + .metrica { margin-top: .75rem; }
.g-rejilla { stroke: var(--tblr-border-color); stroke-dasharray: 2 3; }
.g-etiqueta { font-size: 11px; fill: var(--tblr-secondary); font-variant-numeric: tabular-nums; }
.g-linea { fill: none; stroke-width: 2; stroke-linejoin: round; }
.g-discontinua { stroke-dasharray: 6 4; }
.g-primary { stroke: var(--tblr-primary); } .g-secondary { stroke: var(--tblr-secondary); }
.g-green { stroke: var(--tblr-green); } .g-red { stroke: var(--tblr-red); } .g-yellow { stroke: var(--tblr-yellow); }
.g-area-primary { fill: var(--tblr-primary); opacity: .1; } .g-area-green { fill: var(--tblr-green); opacity: .12; }
.g-punto-primary { fill: var(--tblr-primary); } .g-punto-secondary { fill: var(--tblr-secondary); } .g-punto-green { fill: var(--tblr-green); }
.g-clave { display: inline-block; width: 16px; height: 0; border-top: 2px solid; margin-right: 6px; }
.g-clave-primary { border-color: var(--tblr-primary); } .g-clave-secondary { border-color: var(--tblr-secondary); }
.g-clave-green { border-color: var(--tblr-green); } .g-clave-discontinua { border-top-style: dashed; }
.g-fila { display: grid; grid-template-columns: 5.5rem 1fr 4.5rem; gap: .75rem; align-items: center; padding: .3rem 0; }
.g-pista { position: relative; height: .5rem; background: var(--tblr-bg-surface-secondary); border-radius: 2px; }
.g-barra { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.g-cero { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--tblr-secondary); }
.g-dona-green, .g-dona-red, .g-dona-secondary, .g-dona-yellow, .g-dona-azure, .g-dona-primary { fill: none; stroke-width: 18; }
.g-dona-green { stroke: var(--tblr-green); } .g-dona-red { stroke: var(--tblr-red); } .g-dona-secondary { stroke: var(--tblr-secondary); }
.g-dona-yellow { stroke: var(--tblr-yellow); } .g-dona-azure { stroke: var(--tblr-azure); } .g-dona-primary { stroke: var(--tblr-primary); }
.g-dona-centro { font-size: 22px; font-weight: 600; fill: var(--tblr-body-color); }
.g-clave-cuadro { display: inline-block; width: .65rem; height: .65rem; border-radius: 2px; }
.g-fondo-green { background: var(--tblr-green); } .g-fondo-red { background: var(--tblr-red); } .g-fondo-secondary { background: var(--tblr-secondary); }
.g-fondo-yellow { background: var(--tblr-yellow); } .g-fondo-azure { background: var(--tblr-azure); } .g-fondo-primary { background: var(--tblr-primary); }
.g-cero-linea { stroke: var(--tblr-secondary); stroke-width: 1.5; }
.g-col-pos { fill: var(--tblr-green); } .g-col-neg { fill: var(--tblr-red); }
.g-clave-yellow { border-color: var(--tblr-yellow); } .g-clave-azure { border-color: var(--tblr-azure); }
.g-punto-yellow { fill: var(--tblr-yellow); } .g-area-yellow { fill: var(--tblr-yellow); opacity: .1; }
.g-azure { stroke: var(--tblr-azure); }
.mapa-linea { fill: none; stroke-width: 2; }
.mapa-nodo { stroke: var(--tblr-bg-surface); stroke-width: 3; }
.mapa-nombre { font-size: 12px; font-weight: 600; fill: var(--tblr-body-color); }
.mapa-detalle { font-size: 10px; fill: var(--tblr-secondary); }
.nav-segmented .nav-link { font-size: .8rem; padding-left: .25rem; padding-right: .25rem; }
[data-plegable] > .card-header { cursor: pointer; user-select: none; }
[data-plegable] > .card-header::after { content: ""; margin-left: auto; width: .55rem; height: .55rem; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; opacity: .6; }
[data-plegable].plegada > .card-header::after { transform: rotate(-45deg); }
[data-plegable].plegada > :not(.card-header) { display: none !important; }
.app-icono { width: 28px; height: 28px; object-fit: contain; flex: none; }
.app-icono-vacio { width: 28px; height: 28px; border-radius: 6px; background: var(--tblr-bg-surface-secondary); flex: none; }
#terminal { height: calc(100vh - 11rem); min-height: 16rem; background: #000; border-radius: 4px; padding: 4px; }
.teclas .btn { min-width: 2.6rem; }
.pantalla-img { display: block; width: 100%; max-height: calc(100vh - 9rem); min-height: 12rem; object-fit: contain; background: #000; border-radius: 4px; }
#tecla-ctrl[aria-pressed="true"] { background: var(--tblr-primary); color: #fff; }
.g-punto-red { fill: var(--tblr-red); } .g-punto-azure { fill: var(--tblr-azure); }
.g-clave-red { border-color: var(--tblr-red); }
.g-area-red { fill: var(--tblr-red); opacity: .1; } .g-area-azure { fill: var(--tblr-azure); opacity: .1; } .g-area-secondary { fill: var(--tblr-secondary); opacity: .1; }

/* --- Modelos 3D de los equipos --- */
.m3d { position: relative; width: 150px; height: 138px; margin: 0 auto; perspective: 700px; perspective-origin: 50% 35%; }
.m3d .obj { position: absolute; left: 50%; top: 58%; transform-style: preserve-3d; animation: m3d-giro 9s ease-in-out infinite alternate; }
.m3d .pieza, .m3d .caja { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.m3d .cara { position: absolute; left: 0; top: 0; box-sizing: border-box; overflow: hidden; }
.m3d-sombra { position: absolute; left: 50%; bottom: 6px; width: 110px; height: 18px; margin-left: -55px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,0,0,.35), transparent); filter: blur(2px); }
@keyframes m3d-giro { from { transform: rotateX(-20deg) rotateY(-38deg); } to { transform: rotateX(-20deg) rotateY(38deg); } }
@media (prefers-reduced-motion: reduce) { .m3d .obj { animation: none; transform: rotateX(-20deg) rotateY(-28deg); } .m3d .led, .m3d .pantalla span { animation: none !important; } }
.m3d-grande { transform: scale(1.35); transform-origin: 50% 40%; margin-bottom: 1.6rem; }

/* materiales */
.aluminio { background: linear-gradient(150deg, #e7eaee, #a9b1bb); }
.aluminio.cara-der, .aluminio.cara-izq { background: #8f98a3; } .aluminio.cara-abajo { background: #6d7580; }
.aluminio.cara-arriba { background: linear-gradient(160deg, #eef1f4, #c3c9d0); }
.minipc { background: linear-gradient(150deg, #3a4048, #1f2328); border: 1px solid rgba(255,255,255,.06); }
.minipc.cara-arriba { background: linear-gradient(160deg, #4a515a, #2a2f35); }
.rack { background: linear-gradient(180deg, #2b3138, #171b20); border: 1px solid rgba(255,255,255,.08); }
.rack.cara-arriba { background: #39414a; }
.movil { background: linear-gradient(150deg, #2d3238, #121518); border-radius: 6px; }
[data-bs-theme="dark"] .aluminio { background: linear-gradient(150deg, #8a929c, #4f5660); }
[data-bs-theme="dark"] .aluminio.cara-arriba { background: linear-gradient(160deg, #9aa2ab, #5e6670); }
[data-bs-theme="dark"] .aluminio.cara-der, [data-bs-theme="dark"] .aluminio.cara-izq { background: #474e57; }

/* detalles */
.m3d .teclado { position: absolute; left: 8px; right: 8px; top: 6px; height: 32px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; }
.m3d .teclado i { background: rgba(0,0,0,.28); border-radius: 1px; }
.m3d .touchpad { position: absolute; left: 36%; right: 36%; bottom: 7px; height: 16px; background: rgba(0,0,0,.12); border-radius: 2px; }
.m3d .muesca { position: absolute; left: 44%; right: 44%; top: 0; height: 2px; background: rgba(0,0,0,.25); }
.m3d .logo { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: rgba(255,255,255,.35); }
.m3d .pantalla { position: absolute; inset: 3px; border-radius: 2px; background: #0b0f16; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 8px; }
.m3d .pantalla span { display: block; height: 4px; border-radius: 2px; background: #1c2532; }
.m3d-encendido .pantalla { background: linear-gradient(135deg, #0b3b8c, #0e7490 60%, #10b981); box-shadow: inset 0 0 12px rgba(255,255,255,.15); }
.m3d-encendido .pantalla span { background: rgba(255,255,255,.75); animation: m3d-barra 2.4s ease-in-out infinite; transform-origin: left; }
.m3d-encendido .pantalla span:nth-child(2) { width: 70%; animation-delay: .4s; } .m3d-encendido .pantalla span:nth-child(3) { width: 85%; animation-delay: .8s; }
.m3d-encendido .pantalla span:nth-child(4) { width: 50%; animation-delay: 1.2s; }
@keyframes m3d-barra { 0%, 100% { transform: scaleX(1); opacity: .9; } 50% { transform: scaleX(.6); opacity: .5; } }
.m3d .led { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #4b5058; }
.m3d-minipc .led { left: 9px; top: 50%; margin-top: -3px; }
.m3d-encendido .led { background: #2fb344; box-shadow: 0 0 6px 1px #2fb344; animation: m3d-luz 1.8s ease-in-out infinite; }
.m3d-encendido .led-2 { background: #4299e1; box-shadow: 0 0 6px 1px #4299e1; }
@keyframes m3d-luz { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.m3d .puertos { position: absolute; right: 10px; top: 50%; margin-top: -3px; display: flex; gap: 4px; }
.m3d .puertos i { width: 9px; height: 5px; background: #0d0f12; border-radius: 1px; }
.m3d .rejilla { position: absolute; inset: 14px; background: repeating-linear-gradient(90deg, rgba(0,0,0,.35) 0 2px, transparent 2px 5px); border-radius: 50%; }
.m3d .bahias { position: absolute; left: 6px; top: 4px; bottom: 4px; display: flex; gap: 3px; }
.m3d .bahias i { width: 16px; background: #0f1215; border: 1px solid #343b43; border-radius: 1px; }
.m3d .leds { position: absolute; right: 8px; top: 50%; margin-top: -3px; display: flex; gap: 6px; }
.m3d .leds .led { position: static; }
.m3d .camara { position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #0b0d10; border: 2px solid #3a4048; }
.equipo-tarjeta { cursor: pointer; transition: transform .15s; }
.equipo-tarjeta:hover { transform: translateY(-2px); }

.web-fila { cursor: pointer; }
.web-fila:hover { background: var(--tblr-bg-surface-secondary); }

/* El servidor comprueba los permisos de forma independiente. */
.solo-lectura [data-admin] { display: none !important; }
