/* Vista 3D aislada del diagrama y de las tablas de histórico. */
.sphere-dialog{position:fixed;inset:0;box-sizing:border-box;width:100vw;max-width:100vw;height:100vh;max-height:100vh;margin:0;padding:0;border:0;border-radius:0;background:#071521;color:#e5f5ff;overflow-x:hidden;overflow-y:auto;isolation:isolate}
.sphere-top{position:relative;z-index:300;display:flex;justify-content:space-between;align-items:center;gap:24px;padding:22px 30px;background:#071521;border-bottom:1px solid #21465c}
.sphere-top h2{font-size:21px;margin:8px 0 0}.sphere-top button{white-space:nowrap}
.sphere-stage{position:relative;isolation:isolate;box-sizing:border-box;width:100%;height:calc(100vh - 160px);min-height:740px;overflow:hidden;background:radial-gradient(ellipse at 58% 48%,#123c4a88,transparent 65%),#071521;touch-action:none}
#sphere-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none}
.sphere-nodes{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none;perspective:1200px;transform-style:preserve-3d}
.sphere-node{position:absolute;left:0;top:0;display:block;box-sizing:border-box;width:162px;height:122px;min-height:122px;padding:0;margin:0;pointer-events:auto;cursor:pointer;border:0;border-radius:0;background:transparent!important;box-shadow:none;transform-style:preserve-3d;color:#d6ecfa;outline-offset:8px}
.sphere-node:hover{background:transparent;border:0;filter:none}
.cylinder-mesh{position:absolute;display:block;left:17px;top:11px;width:128px;height:100px;margin:0;transform-origin:64px 50px;transform-style:preserve-3d;pointer-events:none}
.cylinder-facet{position:absolute;display:block;box-sizing:border-box;left:calc(50% - 2.15px);top:0;width:4.3px;height:100px;border:0;background:#183e55;backface-visibility:hidden;transform-origin:50% 50%;pointer-events:none}
.cylinder-cap{position:absolute;display:block;left:0;width:128px;height:128px;border:1px solid #6cb9d288;border-radius:50%;background:radial-gradient(circle at 35% 35%,#245b78e6,#102b43e6);backface-visibility:visible;pointer-events:none}
.cylinder-top{top:-64px;transform:rotateX(90deg)}.cylinder-bottom{top:36px;transform:rotateX(90deg)}
.cylinder-facing-label{position:absolute;display:flex;inset:8px 2px;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:8px 5px;border:0;border-radius:8px;background:linear-gradient(180deg,#0b203633,#0b2036bb);color:inherit;text-align:center;text-shadow:0 2px 5px #000;pointer-events:none;transform:translateZ(70px)}
.cylinder-facing-label strong{display:block;font-size:25px;line-height:1.1;color:inherit}.cylinder-facing-label small{display:block;max-width:100%;font-size:9px;line-height:1.4;font-weight:700;overflow-wrap:break-word;hyphens:auto;color:inherit}
.sphere-node.active{color:#86ffd2}.sphere-node.active .cylinder-facet{border:0;background:#205c54}.sphere-node.active .cylinder-cap{border-color:#86ffd2;background:radial-gradient(circle at 35% 35%,#246f65e6,#12493fe6)}
.sphere-node.action-running{outline:2px solid #ffc46b;animation:action-running-pulse 1.6s ease-in-out infinite}.sphere-node.action-running .cylinder-facing-label{color:#ffe1a3}.sphere-node .ssh-working-label{position:absolute;top:100%;left:-20px;right:-20px;text-align:center;font-size:10px;padding:5px;background:#172c3fee;border:1px solid #ffc46b;border-radius:6px}
.infra-link{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;overflow:hidden;fill:none}.infra-link path{fill:none;stroke-linecap:round}.infra-link-base{stroke:#4f9cb766;stroke-width:1.2}.infra-link-out{stroke:#5fe3b9aa;stroke-width:1.5;stroke-dasharray:7 8;animation:trace-flow 2s linear infinite}.infra-link-in{stroke:#63aee0aa;stroke-width:1.5;stroke-dasharray:5 10;animation:trace-flow 2.8s linear infinite reverse}.infra-link [data-demo="true"]{opacity:.35}
.arsys-cloud{position:absolute;left:26px;top:22px;width:250px;height:190px;z-index:5;color:#c5edff;pointer-events:auto}
.arsys-cloud>svg{position:absolute;inset:0;width:100%;height:100%;fill:#11344bea;stroke:#66b1cc;stroke-width:1.2;filter:drop-shadow(0 0 9px #3baac133)}
.arsys-cloud-content{position:absolute;left:22px;right:18px;top:47px;text-align:center}.arsys-cloud-content strong{font-size:15px;letter-spacing:3px}.arsys-cloud-content ul{margin:9px 0;padding:0;list-style:none;font-size:10px;line-height:1.65}.arsys-cloud-content small{font-size:9px;color:#92b7cb}
.client-server{position:absolute;top:28px;right:28px;display:flex;flex-direction:column;align-items:center;width:210px;min-height:215px;padding:12px 15px;z-index:5;border:1px solid #386a85;border-radius:14px;background:#092135e6;text-align:center;gap:5px;box-shadow:0 8px 24px #0003}
.client-server .database-icon{position:relative;display:block;width:66px;height:66px;flex:none;fill:#1a445f;stroke:#7ac4df;stroke-width:2}.client-server>strong{font-size:13px}.client-server>span{font-size:10px;color:#9dc1d7}.client-server ul{list-style:none;margin:6px 0;padding:0;font-size:10px;line-height:1.7}.client-server small{font-size:9px;color:#9dc1d7}.client-server[data-active="true"]{border-color:#6ed8af}
.infra-corner{position:absolute;z-index:5;box-sizing:border-box;max-width:none;background:#0b2237e8;border:1px solid #37647f;border-radius:12px;padding:16px;box-shadow:0 8px 24px #0003}
.sat-ia{left:28px;bottom:25px;width:218px;min-height:150px;display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center}.sat-ia>strong{font-size:13px;letter-spacing:2px}.sat-ia small{font-size:9px;color:#91aeca}.infra-status{font-size:10px;color:#71dfbb}.sat-core{position:relative;display:grid;place-items:center;width:50px;height:50px;border:1px solid #6bcada;border-radius:50%;color:#9debf4;box-shadow:0 0 15px #48bec344}.sat-core i{position:absolute;inset:-5px;border:1px solid #5bb8ce66;border-radius:50%;transform:rotateX(60deg)}.sat-core i:nth-child(2){transform:rotateY(60deg)}.sat-core i:nth-child(3){transform:rotate(45deg) rotateX(60deg)}.sat-wave{display:flex;align-items:center;justify-content:center;height:18px;gap:4px}.sat-wave i{width:3px;height:10px;background:#65cddd;border-radius:2px;animation:sat-signal 1.4s ease-in-out infinite alternate}.sat-wave i:nth-child(2n){height:18px;animation-delay:.3s}
.edge-fleet{right:28px;bottom:25px;width:245px;max-height:240px;overflow:auto}.edge-heading{display:flex;align-items:center;gap:8px;font-size:12px;letter-spacing:1px}.edge-counts{font-size:10px;color:#accadd;margin:8px 0}.edge-fleet ul{list-style:none;padding:0;margin:8px 0;display:grid;gap:8px}.edge-fleet li{display:grid;grid-template-columns:12px 1fr;gap:2px 5px;font-size:11px}.edge-fleet li small{grid-column:2;color:#a4c3d5;font-size:9px}.edge-fleet>small{font-size:9px;color:#95b4c8}[data-health="ok"]{color:#7be4b9}[data-health="fail"]{color:#ff9d9d}[data-health="unknown"]{color:#9eb6c8}
.sphere-info{position:absolute;z-index:6;left:28px;top:330px;width:245px;max-height:245px;overflow:auto;box-sizing:border-box;padding:18px;border:1px solid #345f79;border-radius:12px;background:#092034ed;box-shadow:0 8px 24px #0003}.sphere-info .eyebrow{font-size:9px}.sphere-info hr{border:0;border-top:1px solid #34536a;margin:14px 0}.sphere-info h3{font-size:12px;line-height:1.5}.sphere-info p{font-size:11px;line-height:1.65;white-space:pre-line}.sphere-info .sphere-active{font-size:20px!important;color:#82efc4;margin:8px 0}
.sphere-tooltip{position:absolute;z-index:400;width:max-content;max-width:min(380px,80vw);padding:16px;border:1px solid #68b6cc;border-radius:10px;background:#071c2ff2;color:#d8ebf6;box-shadow:0 10px 25px #0008;white-space:pre-line;font-size:12px;pointer-events:auto}.sphere-tooltip .p0-inspector{position:static;display:block;width:auto;max-width:100%;padding:0;border:0;box-shadow:none;background:transparent}
.sphere-bottom{position:relative;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 28px;background:#091b2b;border-top:1px solid #25465d}.sphere-bottom>p{font-size:11px;color:#9cbccc}.sphere-actions{display:flex;gap:10px;flex-wrap:wrap}.sphere-dialog>.historical-panel{position:relative;z-index:1;clear:both;max-height:none;margin:24px 28px;padding:22px;background:#102133;border-color:#31536b}.sphere-dialog>.historical-panel .table-wrap{max-height:400px;overflow:auto}
@keyframes sat-signal{to{transform:scaleY(.35);opacity:.5}}
@media(max-width:1100px){.arsys-cloud{width:205px;height:165px;left:16px}.arsys-cloud-content{top:39px;left:16px;right:14px}.client-server{width:170px;right:16px}.sphere-info{left:16px;width:205px;top:310px}.sat-ia{width:180px;left:16px}.edge-fleet{width:200px;right:16px}.sphere-stage{min-height:780px}}
@media(max-width:760px){.sphere-top{padding:16px;gap:10px;align-items:flex-start}.sphere-top h2{font-size:17px}.sphere-stage{min-height:1040px;height:1040px}.arsys-cloud{top:12px;width:175px;height:155px}.arsys-cloud-content{top:35px;left:12px;right:12px}.arsys-cloud-content strong{font-size:12px}.arsys-cloud-content ul{font-size:8px}.arsys-cloud-content small{font-size:8px}.client-server{top:18px;width:145px;min-height:180px;padding:10px}.client-server .database-icon{width:45px;height:45px}.sphere-info{position:relative;top:auto;left:auto;width:auto;max-height:210px;margin:12px 16px}.sat-ia{width:145px;min-height:140px}.edge-fleet{width:175px}.sphere-bottom{padding:16px;align-items:flex-start;flex-direction:column}.sphere-dialog>.historical-panel{margin:16px}.sphere-node{width:145px}.cylinder-facing-label small{font-size:8px}}
@media(prefers-reduced-motion:reduce){.sphere-dialog *{animation:none!important}}

/* SAT-IA: núcleo luminoso, órbitas y actividad de señal (demostración). */
.sat-ia{overflow:hidden;background:radial-gradient(ellipse at 50% 28%,#14536b88,transparent 70%),#0b2237e8;border-color:#448ea8;box-shadow:0 0 24px #3ba6be22,0 8px 24px #0003}
.sat-core{width:58px;height:58px;margin:7px 0;transform-style:preserve-3d;background:radial-gradient(circle,#2386a366,#0d304a);animation:sat-core-glow 2.8s ease-in-out infinite}
.sat-core>span{font-size:17px;font-weight:700;letter-spacing:2px;text-shadow:0 0 12px #80efff}
.sat-core i{inset:-7px;border-color:#74e7f099;box-shadow:0 0 6px #4bbfdc33;animation:sat-orbit-one 7s linear infinite}
.sat-core i:nth-of-type(2){animation-name:sat-orbit-two;animation-duration:9s;animation-direction:reverse}
.sat-core i:nth-of-type(3){animation-name:sat-orbit-three;animation-duration:11s}
.sat-ia .infra-status{animation:sat-status-glow 2s ease-in-out infinite}
.sat-wave{width:100%;height:24px;gap:5px}.sat-wave i{display:block;width:4px;height:18px;transform-origin:center;animation:sat-signal .9s ease-in-out infinite alternate;box-shadow:0 0 6px #63dbec66}.sat-wave i:nth-child(3n){height:24px;animation-delay:-.6s}.sat-wave i:nth-child(2n){height:14px;animation-delay:-.3s}.sat-wave i:nth-child(4n){animation-delay:-.8s}
@keyframes sat-core-glow{0%,100%{box-shadow:0 0 12px #48bec344}50%{box-shadow:0 0 30px #54dbec88,inset 0 0 14px #57cbe633}}
@keyframes sat-orbit-one{from{transform:rotateZ(0deg) rotateX(65deg)}to{transform:rotateZ(360deg) rotateX(65deg)}}
@keyframes sat-orbit-two{from{transform:rotateZ(60deg) rotateY(65deg)}to{transform:rotateZ(420deg) rotateY(65deg)}}
@keyframes sat-orbit-three{from{transform:rotateZ(120deg) rotateX(50deg) rotateY(30deg)}to{transform:rotateZ(480deg) rotateX(50deg) rotateY(30deg)}}
@keyframes sat-status-glow{50%{color:#bdffe4;text-shadow:0 0 8px #71dfbb88}}
@media(prefers-reduced-motion:reduce){.sat-core,.sat-core i,.sat-wave i,.sat-ia .infra-status{animation:none!important}}

/* Estelas violetas de SAT-IA: halo y ondas de energía de demostración. */
.sat-ia{isolation:isolate;overflow:visible;background:radial-gradient(ellipse at 50% 26%,#7548b94d,transparent 72%),#0b2237e8;border-color:#8b70bd;box-shadow:0 0 28px #9b64e52e,0 8px 24px #0003}
.sat-ia::before,.sat-ia::after{content:'';position:absolute;inset:-10px;border:1px solid #ba8cff55;border-radius:18px;pointer-events:none;z-index:-1;filter:blur(2px);animation:sat-violet-echo 4.6s ease-out infinite}
.sat-ia::after{inset:-5px;border-color:#a76cec66;animation-delay:-2.3s;filter:blur(4px)}
.sat-core{background:radial-gradient(circle,#a279de77,#34316c88 55%,#0d304a);border-color:#ccaeff}
.sat-core::before{content:'';position:absolute;inset:-22px;border-radius:50%;pointer-events:none;background:conic-gradient(from 0deg,transparent,#c08aff33,transparent 35%,#9661dc55,transparent 70%,#d5b5ff33,transparent);filter:blur(8px);animation:sat-violet-swirl 9s linear infinite}
.sat-core>span{color:#dfcaff;text-shadow:0 0 10px #b78cff,0 0 22px #9752e5}.sat-core i{border-color:#ccabff99;box-shadow:0 0 10px #a472e555}.sat-wave i{background:#c39aef;box-shadow:0 0 8px #aa6fe688}
@keyframes sat-violet-echo{0%{opacity:0;transform:scale(.98);box-shadow:0 0 12px #a574e533}20%{opacity:.65}100%{opacity:0;transform:scale(1.18);box-shadow:0 0 38px #a574e500}}
@keyframes sat-violet-swirl{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.sat-ia::before,.sat-ia::after,.sat-core::before{animation:none;opacity:.35}}

/* Flujo violeta de SAT-IA, separado de las trazas verdes de estados. */
.infra-link [data-demo="true"]{opacity:1}
.infra-link [data-demo="true"] .infra-link-base{stroke:#a879df55;stroke-width:2;filter:drop-shadow(0 0 4px #ad6bf266)}
.infra-link [data-demo="true"] .infra-link-out{stroke:#cf9dff;stroke-width:2.5;stroke-dasharray:3 18;animation:sat-link-flow 2.2s linear infinite,sat-link-glow 3.2s ease-in-out infinite;filter:drop-shadow(0 0 4px #bc7bff)}
.infra-link [data-demo="true"] .infra-link-in{stroke:#9874ff;stroke-width:2;stroke-dasharray:7 24;animation:sat-link-flow 3s linear infinite reverse;filter:drop-shadow(0 0 3px #9874ff)}
.infra-link [data-demo="false"][data-active="false"] .infra-link-out,.infra-link [data-demo="false"][data-active="false"] .infra-link-in{animation:none;opacity:.15}
@keyframes sat-link-flow{to{stroke-dashoffset:-126}}
@keyframes sat-link-glow{0%,100%{opacity:.6}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){.infra-link [data-demo="true"] path{animation:none!important}}

.sphere-top{flex-wrap:wrap}.sphere-top .company-brand{flex:0 0 100%;width:100%;margin:0 0 6px;padding:14px 20px}.sphere-top .company-name{font-size:24px}.sphere-top .company-neuro{font-size:16px}.sphere-top .company-logo{width:55px;height:55px}.sphere-dialog .sphere-info{top:465px}
@media(max-width:760px){.sphere-dialog .sphere-info{top:auto}.sphere-top .company-name{font-size:20px}}

.background-light .sphere-dialog{background:#8fa6b8}
.background-light .sphere-stage{background:radial-gradient(ellipse at 58% 48%,#123c4a88,transparent 65%),#071521}
.background-light .sphere-dialog>.historical-panel{background:#102133;color:#e5f5ff;border-color:#476e86;box-shadow:0 8px 24px #14283d44}
.background-light .sphere-stage .infra-corner,.background-light .sphere-info,.background-light .client-server{box-shadow:0 8px 24px #14283d44}

/* Marco de la escena 3D: solo perímetro, fondo y animaciones intactos. */
.sphere-stage{width:calc(100% - 48px);margin:10px 24px 18px;border:1px solid #668ba3;border-radius:14px;box-shadow:0 0 0 4px #091928,0 0 0 5px #426177,0 12px 28px #0003}
.background-light .sphere-stage{border-color:#92afc2;box-shadow:0 0 0 4px #132a3d,0 0 0 5px #7698ae,0 12px 28px #14283d33}
@media(max-width:760px){.sphere-stage{width:calc(100% - 24px);margin:10px 12px 18px}}

/* El diálogo es el contenedor desplazable; los márgenes dejan libre su barra. */
.sphere-dialog{height:100dvh;max-height:100dvh;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;overscroll-behavior-y:contain;touch-action:pan-y}
.sphere-stage{touch-action:pan-y}
.sphere-dialog::-webkit-scrollbar{width:14px}.sphere-dialog::-webkit-scrollbar-track{background:#102333}.sphere-dialog::-webkit-scrollbar-thumb{background:#63899f;border:3px solid #102333;border-radius:10px}.sphere-dialog::-webkit-scrollbar-thumb:hover{background:#8cb2c7}

/* Chaflanes en el perímetro de la escena; los popups quedan fuera del recorte. */
.sphere-stage{--frame-cut:18px;border-radius:18px;corner-shape:bevel;clip-path:polygon(var(--frame-cut) 0,calc(100% - var(--frame-cut)) 0,100% var(--frame-cut),100% calc(100% - var(--frame-cut)),calc(100% - var(--frame-cut)) 100%,var(--frame-cut) 100%,0 calc(100% - var(--frame-cut)),0 var(--frame-cut))}
.sphere-dialog>.historical-panel{border-radius:18px;corner-shape:bevel}
@media(max-width:760px){.sphere-stage{--frame-cut:12px;border-radius:12px}}

/* Una sola superficie desplazable cuando la esfera es modal. */
html:has(#sphere-dialog[open]),body.sphere-open{overflow:hidden!important;overscroll-behavior:none}
body.sphere-open{padding-right:0}
#sphere-dialog[open]{position:fixed;inset:0;margin:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;box-sizing:border-box;overflow-y:scroll!important;overflow-x:hidden;scrollbar-gutter:stable;overscroll-behavior:contain;touch-action:pan-y;scroll-behavior:auto;scrollbar-width:auto;scrollbar-color:#88abc0 #102333}
#sphere-dialog>.sphere-top,#sphere-dialog>.sphere-bottom,#sphere-dialog>.historical-panel{flex-shrink:0}

html.sphere-modal-open{overflow:hidden!important}

/* El radio se aplica a la escena y a su contorno exterior, sin chaflán poligonal. */
.sphere-stage{border-radius:28px;corner-shape:round;clip-path:none;overflow:hidden;box-shadow:0 0 0 4px #091928,0 0 0 5px #426177,0 12px 28px #0003}
.background-light .sphere-stage{box-shadow:0 0 0 4px #132a3d,0 0 0 5px #7698ae,0 12px 28px #14283d33}
.sphere-dialog>.historical-panel{border-radius:26px;corner-shape:round;clip-path:none;box-shadow:0 0 0 3px #091928,0 0 0 4px #426177,0 10px 24px #0003}
@media(max-width:760px){.sphere-stage,.sphere-dialog>.historical-panel{border-radius:20px}}
.sphere-top .company-brand{padding:24px 34px;min-height:150px;border-radius:22px}.sphere-top .company-name{font-size:clamp(23px,2.2vw,38px)}.sphere-top .company-neuro{font-size:16px}.sphere-top .company-logo{width:76px;height:76px}
.sphere-node,.sphere-node *{user-select:none;-webkit-user-select:none;-webkit-user-drag:none}.sphere-node{touch-action:none;cursor:grab}.sphere-node:active{cursor:grabbing}
@media(max-width:760px){.sphere-top .company-brand{padding:20px 16px;min-height:132px}.sphere-top .company-name{font-size:20px}.sphere-top .company-logo{width:50px;height:50px}.sphere-top .company-neuro{font-size:13px}}

/* El zoom amplía el lienzo sin realimentar el radio de la esfera. */
#sphere-dialog[open]{overflow-x:auto}.sphere-stage{flex-shrink:0;max-width:none;max-height:none}.sphere-dialog>.historical-panel{min-width:0}

/* Estados dentro del volumen: etiquetas siempre legibles y superficie ligera. */
.sphere-node .cylinder-facing-label{background:linear-gradient(180deg,#0b203655,#0b2036dd);text-shadow:0 1px 4px #000,0 0 7px #071521}.sphere-node:hover,.sphere-node:focus-visible{opacity:1!important;filter:none}

.sphere-return-legend{font-size:10px;line-height:1.6;color:#c3bbde;max-width:1000px;margin-bottom:7px}

#sphere-transitions{z-index:4}#sphere-transitions .transition-marker{touch-action:pan-y}

/* Fondo binario tenue, independiente de la geometría y la interacción. */
.binary-background{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;user-select:none;mask-image:radial-gradient(ellipse at 58% 48%,#0004 0%,#0008 42%,#000 80%)}
.binary-background>span{position:absolute;top:-180px;left:6%;color:#5bcf9b;opacity:.13;font:11px/2.1 Consolas,Monaco,monospace;letter-spacing:3px;white-space:nowrap;text-shadow:0 0 5px #44a87533;animation:binary-fall 24s linear infinite;will-change:transform}
.binary-background>span:nth-child(2){left:14%;animation-delay:-11s;animation-duration:29s}.binary-background>span:nth-child(3){left:23%;animation-delay:-19s;animation-duration:26s}.binary-background>span:nth-child(4){left:31%;animation-delay:-6s;animation-duration:31s}.binary-background>span:nth-child(5){left:40%;animation-delay:-22s;animation-duration:28s}.binary-background>span:nth-child(6){left:48%;animation-delay:-15s;animation-duration:25s}.binary-background>span:nth-child(7){left:57%;animation-delay:-3s;animation-duration:32s}.binary-background>span:nth-child(8){left:65%;animation-delay:-17s;animation-duration:27s}.binary-background>span:nth-child(9){left:73%;animation-delay:-9s;animation-duration:30s}.binary-background>span:nth-child(10){left:81%;animation-delay:-24s;animation-duration:28s}.binary-background>span:nth-child(11){left:89%;animation-delay:-13s;animation-duration:33s}.binary-background>span:nth-child(12){left:95%;animation-delay:-5s;animation-duration:26s}
@keyframes binary-fall{from{transform:translateY(-80px)}to{transform:translateY(var(--binary-travel,1700px))}}
/* Jerarquía de lectura más nítida sin aumentar tarjetas ni flechas. */
.sphere-node .cylinder-facing-label{background:linear-gradient(180deg,#0b2036aa,#0b2036ee);text-shadow:0 1px 3px #000,0 0 8px #071521}
.sphere-node .cylinder-facing-label strong{font-size:27px;letter-spacing:.3px;color:#edf8ff}.sphere-node .cylinder-facing-label small{font-size:10px;line-height:1.5;font-weight:700;color:#e1eff8}.sphere-node.active .cylinder-facing-label strong,.sphere-node.active .cylinder-facing-label small{color:#92ffcf}.sphere-node.action-running .cylinder-facing-label strong,.sphere-node.action-running .cylinder-facing-label small{color:#ffe1a3}
#sphere-transitions .transition-marker{background:#153249d9;border:1px solid #6d9bb866;box-shadow:0 0 6px #5fb3cf33}#sphere-transitions .transition-tick{background:#e3faff;box-shadow:0 0 5px #a9e7f9aa}#sphere-transitions .transition-return .transition-tick{background:#e0d7f6}
@media(max-width:760px){.sphere-node .cylinder-facing-label small{font-size:9px}.binary-background>span{font-size:10px;opacity:.1}}
@media(prefers-reduced-motion:reduce){.binary-background>span{animation:none!important;top:25%;opacity:.06}.binary-background>span:nth-child(2n){top:65%}}

/* Cilindro visible: la etiqueta no debe convertirse en una tarjeta opaca. */
.sphere-node .cylinder-facing-label{inset:10px 3px;background:transparent;border:0;border-radius:0;box-shadow:none;text-shadow:0 1px 4px #000,0 0 5px #04111b}
.sphere-node .cylinder-mesh{filter:none;opacity:1;transform-style:preserve-3d;-webkit-transform-style:preserve-3d;overflow:visible}
.sphere-node .cylinder-facet{background:#1b465c;box-shadow:inset 0 1px 0 #74bed155,inset 0 -1px 0 #081d2e88}
.sphere-node .cylinder-cap{border:1px solid #7db8ceaa;background:radial-gradient(ellipse at 35% 35%,#37718a,#173b54 72%);box-shadow:inset 0 0 12px #16394c66}
.sphere-node.active .cylinder-facet{background:#205e54;box-shadow:inset 0 1px 0 #8cf3ca99,inset 0 -1px 0 #0c342b}
.sphere-node.active .cylinder-cap{border-color:#8ef3ce;background:radial-gradient(ellipse at 35% 35%,#3b8d78,#1b5148 72%)}
.sphere-node .cylinder-facing-label strong{font-size:27px}.sphere-node .cylinder-facing-label small{font-size:10px;line-height:1.45;color:#edf6fc}
@media(max-width:760px){.sphere-node .cylinder-facing-label small{font-size:9px}}

/* No aplicar filtros ni opacidad al ancestro de las caras 3D. */
.sphere-node{filter:none;opacity:1;transform-style:preserve-3d;overflow:visible}.cylinder-mesh{isolation:auto;contain:none;mix-blend-mode:normal}

/* Bytes verdes más visibles, conservados en la capa de fondo. */
.binary-background>span{color:#7dffb9;opacity:.49;text-shadow:0 0 7px #49cf8d88}
@media(max-width:760px){.binary-background>span{opacity:.43}}
@media(prefers-reduced-motion:reduce){.binary-background>span{opacity:.26}}

/* Diagnóstico anclado a la escena: independiente de la altura de la cabecera. */
.sphere-dialog .sphere-stage>.sphere-info{position:absolute;left:28px;top:250px;bottom:auto;width:245px;max-height:205px;margin:0;z-index:6;background:#092034f5}
/* Cuatro esquinas con perspectiva, luz superior y profundidad exterior. */
.arsys-cloud{transform:perspective(1000px) rotateY(6deg) rotateX(3deg);transform-origin:center}
.arsys-cloud>svg{filter:drop-shadow(2px 5px 0 #082638) drop-shadow(2px 6px 0 #041422) drop-shadow(0 12px 12px #0006);fill:#123b50;stroke:#8ed7e6;stroke-width:1.5}
.arsys-cloud-content strong{text-shadow:0 2px 0 #0a292c,0 0 12px #5ed7ae44}.arsys-cloud-content{transform:translateZ(6px)}
.client-server{transform:perspective(1000px) rotateY(-6deg) rotateX(3deg);border-top-color:#78b3cd;border-left-color:#557f98;box-shadow:-4px 7px 0 #061a2a,-7px 12px 0 #04121e,0 18px 25px #0006,inset 0 1px 0 #b8e9ff33;background:linear-gradient(145deg,#173c52,#092135 75%)}
.client-server .database-icon{filter:drop-shadow(2px 4px 0 #061522) drop-shadow(0 0 8px #61d0e52b)}
.sat-ia{transform:perspective(1000px) rotateY(6deg) rotateX(-3deg);border-top-color:#c3a4ed;box-shadow:4px 7px 0 #171d39,7px 12px 0 #080f22,0 0 30px #9b64e533,0 20px 28px #0006,inset 0 1px 0 #e0c7ff33;background:radial-gradient(ellipse at 50% 26%,#7548b95e,transparent 72%),linear-gradient(145deg,#1c304f,#0b2237 80%)}
.edge-fleet{transform:perspective(1000px) rotateY(-6deg) rotateX(-3deg);border-top-color:#78b3cd;border-right-color:#557f98;box-shadow:-4px 7px 0 #061a2a,-7px 12px 0 #04121e,0 18px 25px #0006,inset 0 1px 0 #b8e9ff33;background:linear-gradient(145deg,#173c52,#0b2237 75%)}
.background-light .sphere-stage .client-server,.background-light .sphere-stage .edge-fleet{box-shadow:-4px 7px 0 #153348,-7px 12px 0 #0a2236,0 18px 25px #14283d66,inset 0 1px 0 #b8e9ff33}
.background-light .sphere-stage .sat-ia{box-shadow:4px 7px 0 #252c49,7px 12px 0 #121b31,0 0 30px #9b64e533,0 20px 28px #14283d66}
@media(max-width:1100px){.sphere-dialog .sphere-stage>.sphere-info{left:16px;top:225px;width:205px;max-height:205px}}
@media(max-width:760px){.sphere-dialog .sphere-stage>.sphere-info{left:16px;top:205px;width:175px;max-height:205px}.arsys-cloud,.client-server,.sat-ia,.edge-fleet{transform:none}}

#sphere-transitions{z-index:2}#sphere-tooltip{max-height:65vh;overflow:auto}#sphere-tooltip .state-actions-summary{margin:8px 0;padding:0;white-space:pre-line}#sphere-tooltip .last-evaluation .p0-inspector{display:block;position:static}

.sphere-secondary .cylinder-facing-label{opacity:.65!important}.sphere-secondary{cursor:zoom-in}.sphere-group-picker{font-size:11px;color:#a8c9d9}.sphere-group-picker select{margin-left:8px}

/* Módulos técnicos: frontal legible y profundidad de equipo en grafito. */
.sphere-node{--technical-color:#91b9cc;--technical-glow:#63bde525;width:200px;height:170px;min-height:170px;transform-style:flat;isolation:isolate;perspective:none}
.technical-mesh{position:absolute;inset:0;z-index:0;pointer-events:none}
.technical-front{position:absolute;left:22px;top:24px;width:132px;height:112px;border:1px solid #7597ab;border-radius:3px;background:linear-gradient(135deg,#263b49,#132431 65%,#0d1b26);box-shadow:inset 0 1px 0 #d9f1ff30,0 12px 18px #0005}
.technical-front::before,.technical-front::after{content:'';position:absolute;bottom:10px;width:17px;height:2px;background:#476171;box-shadow:0 -5px #476171,0 -10px #476171}
.technical-front::before{left:10px}.technical-front::after{right:10px}
.technical-top{position:absolute;left:22px;top:6px;width:156px;height:18px;clip-path:polygon(0 100%,15.4% 0,100% 0,84.6% 100%);background:linear-gradient(110deg,#536b7c,#2b4050);border-top:1px solid #90a8b8}
.technical-side{position:absolute;left:154px;top:6px;width:24px;height:130px;clip-path:polygon(0 18px,100% 0,100% 112px,0 100%);background:linear-gradient(90deg,#0b1721,#203241);border-right:1px solid #405868}
.technical-indicator{position:absolute;left:33px;top:34px;width:36px;height:3px;border-radius:1px;background:var(--technical-color);box-shadow:0 0 8px var(--technical-glow)}
.technical-sweep{display:none;position:absolute;left:24px;top:43px;width:128px;height:1px;background:linear-gradient(90deg,transparent,var(--technical-color),transparent);pointer-events:none}
.sphere-node .technical-label{position:absolute;z-index:2;left:22px;top:48px;width:132px;display:flex;flex-direction:column;align-items:center;pointer-events:none;text-align:center;opacity:1!important}
.sphere-node .technical-label strong{font-size:34px;line-height:40px;font-weight:800;letter-spacing:.5px;color:#fff;text-shadow:0 2px 3px #0008}
.sphere-node .technical-label small{font-size:14px;line-height:20px;font-weight:700;letter-spacing:.4px;color:#d9e9f3;margin-top:2px}
.technical-status{display:none}
.sphere-node.technical-healthy{--technical-color:#88f6cb;--technical-glow:#5ef3b84d}
.sphere-node.technical-incident{--technical-color:#ff969b;--technical-glow:#f45e7440}
.sphere-node.active .technical-front{border-color:var(--technical-color);box-shadow:inset 0 1px 0 #d9f1ff30,0 0 12px var(--technical-glow),0 12px 18px #0005}
.sphere-node.selected .technical-front,.sphere-node:focus-visible .technical-front{outline:1px solid var(--technical-color);outline-offset:3px}
.sphere-node.action-running{--technical-color:#ffd080;--technical-glow:#ffc46b45;outline:0;animation:none}
.sphere-node.action-running .technical-sweep{display:block;animation:technical-scan 2.4s ease-in-out infinite}
.sphere-node.action-running .technical-label strong{color:#ffe1a3}
.sphere-node .ssh-working-label{top:145px;left:0;right:0}
@keyframes technical-scan{0%,100%{transform:translateY(0);opacity:.2}50%{transform:translateY(77px);opacity:.8}}
@media(prefers-reduced-motion:reduce){.sphere-node .technical-sweep{animation:none!important;top:110px}}

/* Paneles de lectura fuera de la proyección y con tamaño de texto uniforme. */
.transition-popover,#sphere-tooltip{position:fixed;z-index:10010;width:460px;max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);overflow:auto;padding:22px 24px;background:#071b2c;border:1px solid #92c9df;border-radius:12px;color:#f0f7fc;box-shadow:0 16px 44px #000b;font-size:17px;line-height:1.65;text-align:left;white-space:pre-line;overflow-wrap:anywhere;pointer-events:auto}
#sphere-tooltip strong{display:block;font-size:20px;line-height:1.4;margin-bottom:12px;color:#fff}
#sphere-tooltip p,#sphere-tooltip li,#sphere-tooltip small,#sphere-tooltip .p0-inspector,#sphere-tooltip .state-actions-summary,#sphere-tooltip .last-evaluation>p{font-size:16px;line-height:1.65;color:#e1eef7}
#sphere-tooltip .last-evaluation>summary{font-size:15px;line-height:1.5;padding:12px 0;letter-spacing:.4px;color:#9ae6ff}
#sphere-tooltip .last-evaluation{white-space:normal}
@media(max-width:760px){.transition-popover,#sphere-tooltip{padding:18px;font-size:16px}#sphere-tooltip strong{font-size:19px}}

/* Infraestructura y esfera comparten el escenario como referencia de posición. */
#sphere-dialog .arsys-cloud,#sphere-dialog .client-server,#sphere-dialog .sat-ia,#sphere-dialog .edge-fleet{position:absolute;z-index:6;scale:var(--infra-scale,1);max-width:calc((50% - 24px)/var(--infra-scale,1));max-height:calc(30%/var(--infra-scale,1));overflow:auto}
#sphere-dialog .arsys-cloud{left:20px;top:24px;bottom:auto;transform-origin:top left}
#sphere-dialog .client-server{right:20px;top:24px;bottom:auto;transform-origin:top right}
#sphere-dialog .sat-ia{left:20px;bottom:20px;top:auto;transform-origin:bottom left}
#sphere-dialog .edge-fleet{right:20px;bottom:20px;top:auto;transform-origin:bottom right}
@media(max-width:760px){#sphere-dialog .arsys-cloud,#sphere-dialog .sat-ia{left:10px}#sphere-dialog .client-server,#sphere-dialog .edge-fleet{right:10px}}

/* Lluvia binaria verde fluorescente, siempre detrás de los estados. */
.binary-background>span{color:#58ff98;opacity:.38;text-shadow:0 0 4px #58ff9880,0 0 10px #28e87840}
@media(max-width:760px){.binary-background>span{opacity:.30}}
@media(prefers-reduced-motion:reduce){.binary-background>span{opacity:.20}}

/* Un puerto abierto no confirma una consulta CENTRAL válida. */
.sphere-node.technical-unverified{--technical-color:#ffd080;--technical-glow:#ffc46b45}
.sphere-node.technical-unverified .technical-label small{color:#ffd080;font-size:13px}
.system-unverified{color:#ffd080!important}
.step.active.system-unverified{--active-border:#ffd080;border-color:#ffd080;background:linear-gradient(145deg,#403629,#28251f)}
.step.active.system-unverified .step-code{border-color:#ffd080;color:#ffd080}

/* Retornos a P0: naranja de alto contraste, separado de las conexiones de avance. */
#sphere-transitions .transition-return{background:#4a2c17;border-color:#ffa34d}
#sphere-transitions .transition-return .transition-tick{background:#ffb55c;box-shadow:0 0 6px #ff9f4380}
.sphere-return-legend{color:#ffb55c}

/* Resumen en el centro de la columna izquierda, entre Arsys y SAT-IA. */
.sphere-dialog .sphere-stage>.sphere-info{left:20px;top:50%;bottom:auto;transform:translateY(-50%);max-height:min(280px,32%);margin:0}
@media(max-width:760px){.sphere-dialog .sphere-stage>.sphere-info{left:10px;top:50%}}

/* Relieve de equipos: canto extruido de la nube y chasis del servidor biselado. */
#sphere-dialog .arsys-cloud{transform:perspective(1100px) rotateY(9deg) rotateX(4deg)}
#sphere-dialog .arsys-cloud>svg{stroke-width:1.4;filter:drop-shadow(1px 2px 0 #6d9aac55) drop-shadow(3px 5px 0 #071724) drop-shadow(0 13px 10px #0007)}
#sphere-dialog .arsys-cloud-content{transform:none;text-shadow:0 1px 3px #03111b}
#sphere-dialog .client-server{transform:perspective(1100px) rotateY(-9deg) rotateX(4deg);border-radius:10px;border-top:2px solid #9ebdcd;border-left:1px solid #708e9f;border-right:2px solid #233f52;border-bottom:2px solid #102432;background:radial-gradient(ellipse at 24% 0,#9fd8ee1c,transparent 65%),linear-gradient(135deg,#294658,#122c40 55%,#091c2d);box-shadow:inset 2px 2px 1px #d4f1ff30,inset -5px -4px 8px #030f1c99,-2px 2px 0 #3d596b,-4px 4px 0 #294354,-6px 6px 0 #1c3345,-8px 8px 0 #102638,0 18px 24px #0008}
#sphere-dialog .client-server::before{content:'';position:absolute;inset:5px;border:1px solid #90b5ca24;border-radius:6px;pointer-events:none}
#sphere-dialog .client-server::after{content:'';position:absolute;right:9px;top:13px;width:3px;height:29px;background:repeating-linear-gradient(to bottom,#7593a4 0 2px,transparent 2px 6px);pointer-events:none}
#sphere-dialog .client-server .database-icon{fill:#254d63;stroke:#a1d1e3;filter:drop-shadow(1px 2px 0 #476d83) drop-shadow(2px 4px 0 #061725) drop-shadow(0 6px 5px #0005)}
#sphere-dialog .client-server>strong{color:#ddf3ff;text-shadow:0 1px 2px #030e18}
@media(max-width:760px){#sphere-dialog .arsys-cloud{transform:perspective(1100px) rotateY(4deg) rotateX(2deg)}#sphere-dialog .client-server{transform:perspective(1100px) rotateY(-4deg) rotateX(2deg)}}

/* Mismo relieve de equipo para SAT-IA y la consola de nodos EDGE. */
#sphere-dialog .sat-ia{transform:perspective(1100px) rotateY(9deg) rotateX(-4deg);border-radius:10px;border-top:2px solid #c7b3e3;border-left:1px solid #9d89bd;border-right:2px solid #332d50;border-bottom:2px solid #171b31;background:radial-gradient(ellipse at 28% 0,#c0a1ed28,transparent 65%),linear-gradient(135deg,#3b3b5d,#202d46 55%,#101d30);box-shadow:inset 2px 2px 1px #e8dcff30,inset -5px -4px 8px #080d2199,2px 2px 0 #655475,4px 4px 0 #493c5e,6px 6px 0 #302940,8px 8px 0 #1b1c30,0 18px 24px #0008}
#sphere-dialog .sat-ia>strong{color:#eadfff;text-shadow:0 2px 2px #100c20}
#sphere-dialog .sat-core{border-top:2px solid #dfccff;border-left:1px solid #bd9fe6;border-right:2px solid #594777;border-bottom:2px solid #30233f;background:radial-gradient(circle at 30% 22%,#c1a0ed88,#4c3a7188 45%,#1b2441 85%)}
#sphere-dialog .edge-fleet{transform:perspective(1100px) rotateY(-9deg) rotateX(-4deg);border-radius:10px;border-top:2px solid #9ebdcd;border-left:1px solid #708e9f;border-right:2px solid #233f52;border-bottom:2px solid #102432;background:radial-gradient(ellipse at 24% 0,#9fd8ee1c,transparent 65%),linear-gradient(135deg,#294658,#122c40 55%,#091c2d);box-shadow:inset 2px 2px 1px #d4f1ff30,inset -5px -4px 8px #030f1c99,-2px 2px 0 #3d596b,-4px 4px 0 #294354,-6px 6px 0 #1c3345,-8px 8px 0 #102638,0 18px 24px #0008}
#sphere-dialog .edge-fleet::before{content:'';position:absolute;inset:5px;border:1px solid #90b5ca24;border-radius:6px;pointer-events:none}
#sphere-dialog .edge-heading{padding-bottom:8px;border-bottom:1px solid #7298ad40;box-shadow:0 1px 0 #050f1b66;color:#ddf3ff;text-shadow:0 1px 2px #030e18}
#sphere-dialog .edge-heading>span{color:#a1d1e3;text-shadow:1px 2px #061725,0 0 6px #82b5cc33}
#sphere-dialog .edge-fleet li{padding:6px 7px;border:1px solid #7298ad24;border-radius:4px;background:linear-gradient(135deg,#96c8e00c,#030f1c33);box-shadow:inset 0 1px 0 #d4f1ff10}
@media(max-width:760px){#sphere-dialog .sat-ia{transform:perspective(1100px) rotateY(4deg) rotateX(-2deg)}#sphere-dialog .edge-fleet{transform:perspective(1100px) rotateY(-4deg) rotateX(-2deg)}}

/* Reloj digital de la cabecera central: hora de Madrid, independiente del diagnóstico. */
.company-brand .brand-clock{display:flex;flex-direction:column;align-items:center;gap:4px;margin:14px auto 0;width:max-content;max-width:100%;padding:8px 22px;border:1px solid #7eb3c333;border-radius:7px;background:linear-gradient(180deg,#061824b3,#06121dcc);box-shadow:inset 0 1px 4px #0005;color:#d9f9f4;font-variant-numeric:tabular-nums}
.brand-clock-time{font-family:Consolas,'Liberation Mono',monospace;font-size:28px;font-weight:600;line-height:1.15;letter-spacing:3px;text-shadow:0 0 10px #66dfc52e}
.brand-clock-calendar{display:flex;align-items:center;justify-content:center;gap:12px;font:12px/1.4 Consolas,'Liberation Mono',monospace;letter-spacing:1px;color:#bad4df}
.brand-clock-zone{font-size:9px;letter-spacing:1.5px;color:#7ea6ba}
@media(max-width:760px){.company-brand .brand-clock{padding:8px 12px;margin-top:12px}.brand-clock-time{font-size:23px;letter-spacing:2px}.brand-clock-calendar{font-size:11px;gap:8px}}

/* CENTRAL como base de datos: cuerpo cilíndrico, tapa elíptica y reflejo lateral. */
#sphere-dialog .client-server{width:230px;min-height:250px;padding:68px 28px 35px;gap:6px;border:0;border-radius:0;background:transparent;box-shadow:none;isolation:isolate;transform:perspective(1100px) rotateY(-7deg) rotateX(2deg)}
#sphere-dialog .client-server::before,#sphere-dialog .client-server::after{display:none}
#sphere-dialog .client-server .database-shell{position:absolute;inset:0;z-index:-1;width:100%;height:100%;overflow:visible;fill:none;stroke:none;filter:drop-shadow(2px 4px 0 #061522) drop-shadow(0 12px 9px #0007);pointer-events:none}
#sphere-dialog .client-server>strong{font-size:15px;letter-spacing:.4px}
#sphere-dialog .client-server>span{color:#bad7e7}
#sphere-dialog .client-server ul{margin:5px 0;position:relative;text-shadow:0 1px 3px #020d17}
#sphere-dialog .client-server small{position:relative;color:#bad0dd;line-height:1.5}
@media(max-width:1100px){#sphere-dialog .client-server{width:195px;padding:60px 23px 30px;min-height:235px}}
@media(max-width:760px){#sphere-dialog .client-server{width:165px;padding:55px 20px 27px;min-height:220px;transform:perspective(1100px) rotateY(-4deg) rotateX(2deg)}#sphere-dialog .client-server>strong{font-size:12px}}

/* Incidencia EDGE: rojo intermitente solo para plantas sin respuesta vigente. */
#sphere-dialog .edge-fleet li[data-health="fail"]{color:#ff6675;border-color:#e9586866;background:linear-gradient(135deg,#6c243633,#230f1d66);animation:edge-failure-frame 1.6s ease-in-out infinite}
#sphere-dialog .edge-fleet li[data-health="fail"]>.edge-led,#sphere-dialog .edge-fleet li[data-health="fail"]>span:nth-child(2){color:#ff6675;animation:edge-failure-light 1.6s ease-in-out infinite}
#sphere-dialog .edge-fleet li[data-health="fail"]>small{color:#ffc2c8}
@keyframes edge-failure-light{0%,100%{opacity:.65;text-shadow:none}50%{opacity:1;text-shadow:0 0 7px #ff4c66aa}}
@keyframes edge-failure-frame{0%,100%{box-shadow:inset 0 0 0 1px #f5647410}50%{box-shadow:inset 0 0 0 1px #f5647466,0 0 9px #ff4c662b}}
@media(prefers-reduced-motion:reduce){#sphere-dialog .edge-fleet li[data-health="fail"],#sphere-dialog .edge-fleet li[data-health="fail"]>span{animation:none!important}}

/* P0: nombre funcional y comprobaciones separadas del resultado real. */
.sphere-node[data-state="P0"] .technical-label{top:43px}
.sphere-node[data-state="P0"] .technical-label small{font-size:12px;line-height:14px;width:160px;letter-spacing:0;white-space:pre-line}
#sphere-tooltip ol.state-actions-summary{padding-left:24px;margin:8px 0 16px;white-space:normal}
#sphere-tooltip ol.state-actions-summary li{padding-left:3px;margin:7px 0}
#p0-inspector>ol.state-actions-summary{padding-left:22px;white-space:normal}
#p0-summary{white-space:pre-line}

/* P2 comparte la estructura de comprobaciones y resultado de P0. */
.sphere-node[data-state="P2"] .technical-label{top:38px}
.sphere-node[data-state="P2"] .technical-label small{font-size:11px;line-height:13px;width:156px;letter-spacing:0;white-space:pre-line}
#p2-affected>ol.state-actions-summary{padding-left:22px;white-space:normal}
#p2-evaluation{white-space:pre-line}

/* Más superficie de lectura para las etiquetas funcionales de los estados. */
.sphere-node{width:250px;height:212px;min-height:212px}
.sphere-node .technical-mesh{inset:auto;left:calc(50% - 110px);top:0;width:200px;height:170px;scale:1.25;transform-origin:0 0}
.sphere-node .technical-label{left:calc(50% - 82.5px);top:60px;width:165px}
.sphere-node .technical-label strong{font-size:42px;line-height:48px}
.sphere-node .technical-label small{font-size:17px;line-height:23px;letter-spacing:.2px}
.sphere-node[data-state="P0"] .technical-label{top:54px}
.sphere-node[data-state="P0"] .technical-label small{font-size:15px;line-height:19px;width:175px}
.sphere-node[data-state="P2"] .technical-label{top:46px}
.sphere-node[data-state="P2"] .technical-label small{font-size:14px;line-height:18px;width:175px}
.sphere-node .ssh-working-label{top:180px}

/* Tres bloques: comprobaciones, condiciones visibles y resultado desplegable. */
#sphere-tooltip{width:520px;max-height:calc(100dvh - 24px)}
.state-transition-conditions{margin:14px 0 0;padding-top:14px;border-top:1px solid #53768c66;white-space:normal}
.state-transition-conditions h4{font-size:14px;line-height:1.4;letter-spacing:.6px;color:#9ae6ff;margin:0 0 10px}
.state-transition-conditions ul{padding-left:20px;margin:0}
#sphere-tooltip .state-transition-conditions li{font-size:15px;line-height:1.5;margin:7px 0}
#sphere-tooltip ol.state-actions-summary li{line-height:1.5}
.grafcet .state-actions-tip,.grafcet .p0-inspector,.grafcet .affected-tooltip{max-height:80vh;overflow:auto}
.grafcet ol.state-actions-summary{padding-left:22px;white-space:normal}
.grafcet .state-transition-conditions li{font-size:13px;line-height:1.6;margin:6px 0}

/* P201: título funcional legible en tres líneas. */
.sphere-node[data-state="P201"] .technical-label{top:46px}
.sphere-node[data-state="P201"] .technical-label small{font-size:14px;line-height:18px;width:175px;letter-spacing:0;white-space:pre-line}

/* Subgrupos de alcance P201: mismo módulo y tres bloques de explicación. */
.sphere-node[data-state^="P201"] .technical-label small{font-size:14px;line-height:18px;width:175px;letter-spacing:0;white-space:pre-line}
.sphere-node[data-state="P2013"].active{--technical-color:#ffd080;--technical-glow:#ffc46b45}
.grafcet .p201-substates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:24px;margin-top:42px}
.grafcet .p201-substates .step{width:100%;max-width:100%;padding:14px;align-items:flex-start}
.grafcet .p201-substates .step-code{font-size:15px;width:58px}
.grafcet .p201-substates h3{font-size:12px;overflow-wrap:anywhere}
.grafcet .p201-substates ul{font-size:12px;white-space:pre-line}
.grafcet #P2013.active{--active-border:#ffd080}

.sphere-node[data-state="P2011"] .technical-label strong,.sphere-node[data-state="P2012"] .technical-label strong,.sphere-node[data-state="P2013"] .technical-label strong{font-size:34px;line-height:42px;letter-spacing:0}

/* El GRAFCET conserva las ramas paralelas y el tamaño de lectura en pantallas estrechas. */
.grafcet-scroll{max-width:100%;overflow-x:auto;padding:6px;overscroll-behavior-x:contain}
.grafcet-scroll>.grafcet{min-width:1200px;padding-left:16px;padding-right:16px}
.grafcet-scroll .grafcet>.branches{grid-template-columns:260px minmax(650px,1fr) 200px;max-width:none;gap:16px}
.grafcet-scroll #parallel-focus{grid-template-columns:minmax(470px,3fr) minmax(164px,1fr);gap:16px}
.grafcet .p201-subbranch{min-width:0}
.grafcet .p201-subbranch>.transition{min-height:68px;margin:0 0 22px;justify-content:center}
.grafcet .p201-substates .step{min-height:230px}

/* Las diagonales ambientales dejan espacio a la esfera secundaria. */
.infra-link[data-esquinas-ocultas~="arsys"] [data-link="arsys-edge"],
.infra-link[data-esquinas-ocultas~="edge"] [data-link="arsys-edge"],
.infra-link[data-esquinas-ocultas~="client"] [data-link="sat-client"],
.infra-link[data-esquinas-ocultas~="sat"] [data-link="sat-client"]{display:none}

/* Aprovechar el ancho de la página sin recortar P3 ni las ramas paralelas. */
body>main{max-width:none;width:100%;padding:18px}
body>main>.panel{padding:18px}
.grafcet .p201-substates{gap:16px}
.grafcet .p201-substates .step{flex-direction:column;gap:10px}
@media(max-width:800px){body>main{padding:10px}body>main>.panel{padding:12px}}

/* La cabecera 3D comparte el fondo exterior claro de la vista 2D. */
.background-light .sphere-top{background:#8fa6b8;border-bottom-color:#6d8da2}
.background-light .sphere-top>div:not(.company-brand){color:#122e44}
.background-light .sphere-top>div:not(.company-brand)>.eyebrow{color:#145373}
.background-light .sphere-top>div:not(.company-brand)>h2{color:#122e44}
