/* GATE 6 — SuperApix matrix visual v2
 * Extraído de dashboard_ecosistema.html (bloque sa-mx / esferas).
 * Negocio: apariencia del tablero de red SuperApix (nodos, ramas, etiquetas).
 * Overrides #matriz-superapix-dibujo / mobile / android-safe siguen en el HTML.
 */
/* ========== SuperApix matriz visual v2 (cian neón + dorado/naranja APIX) ========== */
.sa-mx-wrap { font-size: 1rem; }
.sa-node-sphere {
    width: 5.5rem;
    height: 5.5rem;
    min-width: 5.5rem;
    min-height: 5.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(34, 211, 238, 0.75);
    background: radial-gradient(circle at 32% 28%, rgba(34, 211, 238, 0.18), rgba(15, 31, 56, 0.92) 55%, rgba(5, 10, 20, 0.98));
    box-shadow:
        0 0 28px rgba(34, 211, 238, 0.22),
        0 0 12px rgba(251, 191, 36, 0.12),
        inset 0 2px 12px rgba(255, 255, 255, 0.06);
}
@media (min-width: 640px) {
    .sa-node-sphere {
        width: 6.75rem;
        height: 6.75rem;
        min-width: 6.75rem;
        min-height: 6.75rem;
    }
}
.sa-node-sphere--pilar {
    border-color: rgba(251, 191, 36, 0.88);
    box-shadow:
        0 0 26px rgba(251, 191, 36, 0.32),
        0 0 14px rgba(34, 211, 238, 0.18),
        inset 0 1px 10px rgba(255, 255, 255, 0.05);
}
.sa-node-sphere--root {
    border-color: rgba(251, 146, 60, 0.9);
    box-shadow:
        0 0 36px rgba(251, 146, 60, 0.35),
        0 0 20px rgba(34, 211, 238, 0.2),
        inset 0 0              20px rgba(212, 175, 55, 0.1);
}
.sa-node-sphere--empty {
    border-style: dashed;
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(10, 22, 40, 0.65);
    box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.35);
}
.sa-node-icon { width: 2rem; height: 2rem; color: rgba(148, 163, 184, 0.85); }
@media (min-width: 640px) {
    .sa-node-icon { width: 2.35rem; height: 2.35rem; }
}
.sa-mx-label-rol {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #22d3ee;
    text-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}
@media (min-width: 640px) {
    .sa-mx-label-rol { font-size: 0.95rem; }
}
.sa-mx-label-alias {
    font-size: 0.95rem;
    font-weight: 600;
    max-width: 11rem;
    line-height: 1.25;
    color: #e2e8f0;
}
@media (min-width: 640px) {
    .sa-mx-label-alias { font-size: 1.08rem; max-width: 12rem; }
}
.sa-mx-label-folio {
    font-size: 0.82rem;
    font-family: ui-monospace, monospace;
    color: #fbbf24;
    opacity: 0.95;
    max-width: 12rem;
}
/* Árbol físico recursivo completo (auditoría de red; scroll propio). */
.sa-mx-tree-full {
    width: 100%;
    max-height: min(70vh, 48rem);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1.25rem;
    padding: 0.75rem 0.5rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    text-align: left;
}
.sa-mx-tree-full-head {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 0.75rem;
}
.sa-mx-tree-full-node {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
    padding: 0.28rem 0.4rem;
    margin-left: calc(var(--sa-depth, 0) * 1.15rem);
    border-radius: 0.4rem;
    cursor: pointer;
    border-left: 2px solid transparent;
}
.sa-mx-tree-full-node:hover {
    background: rgba(34, 211, 238, 0.06);
    border-left-color: rgba(34, 211, 238, 0.45);
}
.sa-mx-tree-full-node--pilar {
    border-left-color: rgba(251, 191, 36, 0.35);
}
.sa-mx-tree-full-node--unp {
    border-left-color: rgba(251, 146, 60, 0.55);
    font-weight: 700;
}
.sa-mx-tree-full-rol {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #22d3ee;
    white-space: nowrap;
}
.sa-mx-tree-full-alias {
    font-size: 0.82rem;
    font-weight: 600;
    color: #e2e8f0;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sa-mx-tree-full-meta {
    font-size: 0.68rem;
    font-family: ui-monospace, monospace;
    color: #64748b;
}
.sa-mx-tree-full-node--vacant .sa-mx-tree-full-alias {
    color: #64748b;
    font-weight: 500;
}
@media (min-width: 640px) {
    .sa-mx-label-folio { font-size: 0.95rem; }
}
.sa-mx-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.sa-mx-cell--click {
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 0.75rem;
    transition: background 0.2s, box-shadow 0.2s;
}
.sa-mx-cell--click:hover {
    background: rgba(34, 211, 238, 0.08);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.25);
}
.sa-matrix-conn-down {
    width: 2px;
    min-height: 1.75rem;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.55), rgba(251, 191, 36, 0.25));
    border-radius: 2px;
}
.sa-matrix-conn-short {
    width: 2px;
    min-height: 1rem;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.45), rgba(34, 211, 238, 0.1));
    border-radius: 2px;
}
/* Jerarquía 2×2: no depender de utilidades Tailwind en strings JS (CDN no las emite). */
.sa-mx-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: clamp(1.75rem, 4vw, 3rem);
    padding-bottom: 1rem;
}
.sa-mx-tree-root-row {
    display: flex;
    justify-content: center;
    width: 100%;
}
.sa-mx-pilas-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(1.25rem, 3vw, 2.75rem);
    width: 100%;
    max-width: 72rem;
    box-sizing: border-box;
}
.sa-mx-pilar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1rem, 2vw, 1.75rem);
    min-width: min(100%, 11rem);
}
.sa-mx-un-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(0.75rem, 2vw, 1.5rem);
}
.sa-mx-tree--1x3 {
    gap: clamp(1.5rem, 3vw, 2.5rem);
}
.sa-mx-1x3-base {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    width: 100%;
    max-width: 56rem;
}
