/*
 * Animación «órbita» del NOC de Fisher Platform (módulo Internet · ISP).
 * Es el CSS real del ERP: las variables y las piezas mínimas de core.css y todo topology.css,
 * sin el resto del tablero. Se usa con js/noc-orbit.js. Estilos propios de la web al final.
 */
/* ---- Tokens: claro (sólo con «el del tema» en modo claro) --------------- */
.nocl {
    --nocl-bg: #f4f6f9;
    --nocl-card: #ffffff;
    --nocl-card-2: #f6f8fb;
    --nocl-border: #e1e7ef;
    --nocl-border-2: #cfd8e3;
    --nocl-text: #0f172a;
    --nocl-muted: #5b6b7d;
    --nocl-dim: #94a3b8;
    --nocl-grid: rgba(15, 23, 42, .07);
    --nocl-accent: #0d9488;
    --nocl-ok: #0f9f8f;
    --nocl-warn: #c2700a;
    --nocl-high: #ea580c;
    --nocl-crit: #e11d48;
    --nocl-info: #2563eb;
    --nocl-violet: #7c3aed;
    --nocl-none: #d5dde7;
    --nocl-ok-bg: rgba(13, 148, 136, .1);
    --nocl-warn-bg: rgba(194, 112, 10, .12);
    --nocl-crit-bg: rgba(225, 29, 72, .1);
    --nocl-info-bg: rgba(37, 99, 235, .1);
    --nocl-a1: #2a78d6;
    --nocl-a2: #eb6834;
    --nocl-glow: rgba(13, 148, 136, .14);
    --nocl-topo-grid: #0d9488;
    --nocl-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
    --nocl-r: 12px;
    color: var(--nocl-text);
    background: var(--nocl-bg);
    border-radius: 14px;
    padding: 0 16px 18px;
    position: relative;
}

/* ---- Tokens: oscuro (de serie, en el modo oscuro del tema y en la pared) */
.nocl.nocl--dark,
[data-erp-mode="dark"] .nocl.nocl--theme,
.nocl.nocl--wall {
    --nocl-bg: #05080c;
    --nocl-card: #0a0f15;
    --nocl-card-2: #0f161e;
    --nocl-border: #17212c;
    --nocl-border-2: #223040;
    --nocl-text: #dce5ee;
    --nocl-muted: #7f8d9b;
    --nocl-dim: #4a5866;
    --nocl-grid: rgba(148, 163, 184, .09);
    --nocl-accent: #2dd4bf;
    --nocl-ok: #2dd4bf;
    --nocl-warn: #f5b13d;
    --nocl-high: #fb8c3c;
    --nocl-crit: #fb5172;
    --nocl-info: #60a5fa;
    --nocl-violet: #a78bfa;
    --nocl-none: #1d2833;
    --nocl-ok-bg: rgba(45, 212, 191, .1);
    --nocl-warn-bg: rgba(245, 177, 61, .13);
    --nocl-crit-bg: rgba(251, 81, 114, .14);
    --nocl-info-bg: rgba(96, 165, 250, .13);
    --nocl-a1: #5aa2f0;
    --nocl-a2: #f58a5c;
    --nocl-glow: rgba(45, 212, 191, .16);
    --nocl-topo-grid: #2dd4bf;
    --erp-ink: #dce5ee;
    --erp-link: #8fd8cc;
    background:
        radial-gradient(1100px 520px at 12% -12%, rgba(45, 212, 191, .07), transparent 60%),
        radial-gradient(900px 480px at 105% 0%, rgba(96, 165, 250, .05), transparent 60%),
        #05080c;
}
@media (prefers-color-scheme: dark) {
    [data-erp-mode="auto"] .nocl.nocl--theme {
        --nocl-bg: #05080c; --nocl-card: #0a0f15; --nocl-card-2: #0f161e; --nocl-border: #17212c; --nocl-border-2: #223040;
        --nocl-text: #dce5ee; --nocl-muted: #7f8d9b; --nocl-dim: #4a5866; --nocl-grid: rgba(148, 163, 184, .09);
        --nocl-accent: #2dd4bf; --nocl-ok: #2dd4bf; --nocl-warn: #f5b13d; --nocl-high: #fb8c3c; --nocl-crit: #fb5172; --nocl-info: #60a5fa;
        --nocl-none: #1d2833; --nocl-ok-bg: rgba(45, 212, 191, .1); --nocl-warn-bg: rgba(245, 177, 61, .13); --nocl-crit-bg: rgba(251, 81, 114, .14);
        --nocl-info-bg: rgba(96, 165, 250, .13); --nocl-a1: #5aa2f0; --nocl-a2: #f58a5c; --nocl-glow: rgba(45, 212, 191, .16); --nocl-topo-grid: #2dd4bf;
        --erp-ink: #dce5ee; --erp-link: #8fd8cc; background: #05080c;
    }
}

/* ---- Pantalla de pared ---------------------------------------------------- */
.nocl.nocl--wall { position: fixed; inset: 0; z-index: 1040; overflow: auto; border-radius: 0; padding: 0 22px 22px; }


.nocl [hidden] { display: none !important; }
.nocl h2, .nocl h3, .nocl h4, .nocl h5 { color: var(--nocl-text); }
.nocl a { color: inherit; }
.nocl a:hover { color: var(--nocl-accent); text-decoration: none; }
.nocl-mono { font-family: var(--nocl-mono); font-variant-numeric: tabular-nums; }
.nocl-muted { color: var(--nocl-muted); }
.tone-ok { color: var(--nocl-ok); } .tone-warn { color: var(--nocl-warn); } .tone-crit { color: var(--nocl-crit); } .tone-info { color: var(--nocl-info); } .tone-muted { color: var(--nocl-muted); } .tone-text { color: var(--nocl-text); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 7px; }
.dot.tone-ok { background: var(--nocl-ok); } .dot.tone-warn { background: var(--nocl-warn); } .dot.tone-crit { background: var(--nocl-crit); } .dot.tone-info { background: var(--nocl-info); } .dot.tone-muted { background: var(--nocl-dim); }
.nocl-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--nocl-border); background: var(--nocl-card); color: var(--nocl-text) !important; cursor: pointer; text-decoration: none !important; line-height: 1.3; }
.nocl-btn:hover { border-color: var(--nocl-border-2); background: var(--nocl-card-2); }
.nocl-btn:focus-visible { outline: 2px solid var(--nocl-accent); outline-offset: 1px; }
.nocl-btn[aria-pressed="true"] { border-color: var(--nocl-accent); color: var(--nocl-accent) !important; }
.nocl-btn--xs { font-size: 11px; padding: 3px 8px; }
.nocl-st { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.nocl-st.st-ok { color: var(--nocl-ok); } .nocl-st.st-error { color: var(--nocl-crit); } .nocl-st.st-unknown { color: var(--nocl-muted); } .nocl-st.st-maint { color: var(--nocl-info); }
.nocl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nocl-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--nocl-text); border: 1px solid var(--nocl-border); background: color-mix(in srgb, var(--nocl-card) 85%, transparent); padding: 4px 9px; border-radius: 7px; cursor: pointer; }
.nocl-chip span { font-family: var(--nocl-mono); color: var(--nocl-muted); }
.nocl-chip:hover { border-color: var(--nocl-border-2); }
.nocl-chip[aria-pressed="true"] { border-color: var(--nocl-accent); box-shadow: 0 0 0 1px var(--nocl-accent) inset; }
.nocl-chip--more { cursor: default; color: var(--nocl-muted); }
.nocl-chip:focus-visible { outline: 2px solid var(--nocl-accent); outline-offset: 1px; }

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;}

/*
 * Tablero NOC → Red: la topología en vivo (topology.js). El lienzo ocupa la
 * tarjeta; la leyenda, las zonas y la ficha flotante van encima en HTML (se
 * leen, se enfocan y se pulsan con el teclado).
 */
.nocl-topo-card { display: flex; flex-direction: column; min-height: 470px; overflow: hidden;
    background-color: var(--nocl-card);
    background-image: radial-gradient(70% 60% at 50% 62%, color-mix(in srgb, var(--nocl-accent) 9%, transparent), transparent 70%); }
.nocl-topo-sub { font-size: 11px; color: var(--nocl-muted); margin: -6px 0 0; }
.nocl-topo-legend { position: absolute; top: 14px; right: 16px; list-style: none; margin: 0; padding: 0; font-size: 11px; color: var(--nocl-muted); text-align: right; z-index: 2; }
.nocl-topo-legend li { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 5px; }
.nocl-topo-legend .ln { display: inline-block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; box-shadow: 0 0 6px currentColor; }
.nocl-topo-legend .arc { display: inline-block; width: 12px; height: 8px; border: 2px solid var(--nocl-accent); border-bottom: 0; border-radius: 12px 12px 0 0; }
.nocl-topo-wrap { position: relative; flex: 1 1 auto; min-height: 340px; margin: 4px -16px 0; }
.nocl-topo-wrap canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.nocl-topo-wrap canvas:active { cursor: grabbing; }
.nocl-topo-wrap canvas:focus-visible { outline: 2px solid var(--nocl-accent); outline-offset: -2px; }
.nocl-topo-empty { position: absolute; inset: 40% 0 auto; }
.nocl-topo-tip { position: absolute; z-index: 3; min-width: 170px; max-width: 240px; padding: 8px 10px; font-size: 12px; border-radius: 9px; background: color-mix(in srgb, var(--nocl-card) 94%, transparent); border: 1px solid var(--nocl-border-2); box-shadow: 0 14px 40px -16px rgba(0, 0, 0, .8); pointer-events: none; backdrop-filter: blur(4px); }
.nocl-topo-tip.is-pinned { pointer-events: auto; border-color: var(--nocl-accent); }
.nocl-topo-tip strong { display: block; font-family: var(--nocl-mono); font-size: 12px; margin-bottom: 2px; }
.nocl-topo-tip > div { margin-top: 3px; }
.nocl-topo-tip__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px !important; }
.nocl-topo-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 6px; position: relative; z-index: 2; }
.nocl-topo-foot .nocl-chip .dot { width: 6px; height: 6px; flex-basis: 6px; }
@media (max-width: 767px) {
    .nocl-topo-card { min-height: 380px; }
    .nocl-topo-wrap { min-height: 280px; }
    .nocl-topo-legend { display: none; }
}
