/* Ops Dashboard (noc.html): full-screen, dark, built for a wall screen in an operations centre */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #060C0C; --bg-2: #0A1414; --panel: #0D1817; --panel-2: #112120; --line: rgba(140, 210, 195, .12); --line-2: rgba(140, 210, 195, .22);
  --ink: #E6EEEC; --ink-2: #BFD0CB; --muted: #82998F; --teal: #2FB89A; --teal-dim: #1A6F62;
  --st-ok: #34C79A; --st-warn: #F2B33D; --st-alert: #F0503C; --st-info: #6AA8E0;
  --st-ok-bg: rgba(52, 199, 154, .12); --st-warn-bg: rgba(242, 179, 61, .13); --st-alert-bg: rgba(240, 80, 60, .15);
  --g-ocean-1: #12393A; --g-ocean-2: #061517; --g-land: #1F3B37; --g-land-hi: #2F6157; --g-border: rgba(150, 225, 205, .42);
  --g-grat: rgba(140, 210, 195, .09); --g-glow: rgba(47, 184, 154, .28); --g-label: rgba(225, 242, 237, .78);
  --font: "Manrope", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.noc-loading { display: grid; place-items: center; height: 100vh; color: var(--muted); font-weight: 600; }

/* ---------- layout: header / [left | globe | right] / DC wall ---------- */
.noc-app { height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; padding: 10px 14px 12px;
  background: radial-gradient(1200px 700px at 50% 45%, rgba(47, 184, 154, .07), transparent 70%), var(--bg); }
.noc-main { display: grid; grid-template-columns: minmax(300px, 22vw) minmax(0, 1fr) minmax(300px, 22vw); gap: 12px; min-height: 0; }
.noc-side { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.noc-side > h2 { white-space: nowrap; overflow: hidden; margin: 2px 4px 0; font-size: 13px; letter-spacing: .01em; color: var(--muted); font-weight: 800; display: flex; align-items: center; gap: 8px; }
.noc-side > h2 .n { margin-left: auto; font-size: 11px; letter-spacing: .04em; }
.noc-panels { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }

/* ---------- header ---------- */
.noc-head { display: flex; align-items: center; gap: 16px; min-width: 0; }
.noc-brand { display: flex; align-items: center; gap: 10px; flex: none; }
.noc-brand img { width: 30px; height: 30px; }
.noc-brand b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.noc-brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.noc-links { display: flex; gap: 2px; flex-wrap: wrap; min-width: 0; overflow: hidden; max-height: 30px; }
.noc-links a { padding: 6px 9px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.noc-links a:hover { background: var(--panel-2); color: #fff; }
.noc-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.noc-overall { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.noc-overall .big { font-size: 13px; font-weight: 900; letter-spacing: .12em; padding: 4px 10px; border-radius: 8px; }
.noc-overall .cnt { display: flex; gap: 10px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.noc-overall .cnt span { display: inline-flex; align-items: center; gap: 5px; }
.noc-meta { text-align: right; line-height: 1.25; }
.noc-meta .clock { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.noc-meta small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.noc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); font-size: 12px; font-weight: 800; cursor: pointer; color: var(--ink-2); }
.noc-btn:hover { background: var(--panel-2); color: #fff; }
.noc-btn svg { flex: none; }

/* ---------- status bits ---------- */
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--st-ok); }
.dot.warn { background: var(--st-warn); } .dot.alert { background: var(--st-alert); box-shadow: 0 0 0 3px rgba(240, 80, 60, .2); } .dot.info { background: var(--st-info); }
.chip { font-size: 10px; font-weight: 900; letter-spacing: .12em; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; flex: none; }
.chip.ok, .big.ok { background: var(--st-ok-bg); color: var(--st-ok); }
.chip.warn, .big.warn { background: var(--st-warn-bg); color: var(--st-warn); }
.chip.alert, .big.alert { background: var(--st-alert-bg); color: var(--st-alert); }
.big.alert { animation: noc-blink 2s ease-in-out infinite; }
@keyframes noc-blink { 50% { background: rgba(240, 80, 60, .32); } }

/* ---------- side panels ---------- */
.pnl { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 10px 14px; border-radius: 12px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); min-height: 0; flex: 1 1 0; overflow: hidden; }
.pnl::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--st-ok); }
.pnl.warn::before { background: var(--st-warn); } .pnl.alert::before { background: var(--st-alert); }
.pnl.alert { border-color: rgba(240, 80, 60, .35); }
.pnl-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pnl-head h3 { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pnl-head h3 a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.pnl-head .chip { margin-left: 8px; }
.pnl-head h3 { margin-right: auto; }
.pnl-val { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pnl-val b { white-space: nowrap; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.pnl-val span { font-size: 11.5px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pnl-bar { display: flex; height: 5px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .06); gap: 2px; }
.pnl-bar i { display: block; height: 100%; }
.pnl-rows { flex: 1 1 0; display: flex; flex-direction: column; gap: 3px; min-height: 0; overflow: hidden; }
.pnl-row { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); min-width: 0; line-height: 1.35; }
.pnl-row .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pnl-row .v { margin-left: auto; flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.pnl-row .dot { width: 7px; height: 7px; box-shadow: none; }
a.pnl-row:hover .t { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.pnl-more { font-size: 11px; font-weight: 800; color: var(--teal); white-space: nowrap; flex: none; }
.pnl-more:hover { text-decoration: underline; }

/* ---------- globe ---------- */
.noc-globe { position: relative; min-height: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(60% 60% at 50% 50%, rgba(47, 184, 154, .06), transparent 70%), var(--bg-2); }
.noc-globe canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.g-over { position: absolute; z-index: 2; pointer-events: none; }
.g-over > * { pointer-events: auto; }
.g-title { top: 12px; left: 14px; }
.g-title b { display: block; font-size: 15px; font-weight: 800; }
.g-title span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.g-speed { top: 12px; right: 12px; display: flex; align-items: center; gap: 6px; }
.g-reset { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; margin-right: 6px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(10, 20, 20, .8); color: var(--ink-2); font-size: 12px; font-weight: 800; cursor: pointer; }
.g-reset:hover { color: #fff; background: var(--teal-dim); }
.g-reset:active svg { transform: rotate(-90deg); }
.g-reset svg { transition: transform .2s; }
.g-speed small { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin-right: 2px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: rgba(10, 20, 20, .8); border: 1px solid var(--line-2); }
.seg button { border: 0; background: transparent; min-width: 34px; height: 28px; padding: 0 8px; border-radius: 7px; font-size: 12px; font-weight: 800; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.seg button:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.seg button[aria-pressed="true"] { background: var(--teal-dim); color: #fff; }
.g-legend { left: 14px; bottom: 12px; display: flex; flex-direction: column; gap: 5px; padding: 9px 11px; border-radius: 10px; background: rgba(8, 18, 18, .78); border: 1px solid var(--line); font-size: 11px; font-weight: 700; color: var(--ink-2); }
.g-legend div { display: flex; align-items: center; gap: 7px; }
.g-legend .ln { width: 18px; height: 0; border-top: 2px solid var(--st-ok); }
.g-legend .ln.warn { border-color: var(--st-warn); } .g-legend .ln.alert { border-top-style: dashed; border-color: var(--st-alert); }
.lg-regions { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line); }
.lg-regions span { display: inline-flex; align-items: center; gap: 6px; }
.lg-regions i { width: 12px; height: 9px; border-radius: 3px; opacity: .85; }
.lg-toggle { margin-top: 4px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); border-radius: 7px; padding: 4px 8px; font-size: 11px; font-weight: 700; color: var(--ink-2); cursor: pointer; text-align: left; }
.lg-toggle:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.lg-toggle b { color: var(--teal); }
.lg-toggle[aria-pressed="false"] b { color: var(--muted); }
.g-regions { left: 50%; transform: translateX(-50%); bottom: 12px; }
.g-regions .seg button { gap: 6px; }
.g-regions .dot { width: 7px; height: 7px; box-shadow: none; }
.g-refresh { right: 14px; bottom: 14px; font-size: 11px; font-weight: 700; color: var(--muted); text-align: right; }
.g-refresh button { margin-top: 4px; }

/* ---------- DC wall ---------- */
.noc-wall { display: flex; flex-direction: column; gap: 6px; }
.noc-wall > h2 { margin: 0 4px; font-size: 13px; letter-spacing: .01em; color: var(--muted); font-weight: 800; display: flex; gap: 14px; align-items: center; }
.noc-wall > h2 .leg { display: inline-flex; gap: 12px; font-size: 11px; letter-spacing: .04em; font-weight: 700; }
.noc-wall > h2 .leg span { display: inline-flex; align-items: center; gap: 5px; }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 5px; }
.dct { position: relative; display: block; padding: 5px 7px 5px 9px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); min-width: 0; cursor: pointer; }
.dct::before { content: ''; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3px; border-radius: 0 3px 3px 0; background: var(--st-ok); }
.dct.warn::before { background: var(--st-warn); } .dct.alert::before { background: var(--st-alert); }
.dct.warn { background: linear-gradient(90deg, rgba(242, 179, 61, .10), var(--panel) 70%); }
.dct.alert { background: linear-gradient(90deg, rgba(240, 80, 60, .18), var(--panel) 75%); border-color: rgba(240, 80, 60, .4); }
.dct:hover, .dct.hl { border-color: rgba(255, 255, 255, .55); }
.dct b { display: flex; align-items: center; gap: 4px; font-size: 10.5px; letter-spacing: -.01em; font-weight: 800; white-space: nowrap; overflow: hidden; }
.dct b .rg { margin-left: auto; font-size: 9px; font-weight: 800; color: var(--muted); letter-spacing: .06em; }
.dct b .dot { width: 7px; height: 7px; box-shadow: none; }
.dct small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; font-variant-numeric: tabular-nums; }
.dct.warn small { color: #E9C37A; } .dct.alert small { color: #F7907F; }

/* ---------- hover card ---------- */
.noc-tip { position: fixed; z-index: 50; width: 300px; padding: 12px 14px; border-radius: 12px; background: rgba(9, 20, 20, .96); border: 1px solid var(--line-2); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); font-size: 12px; pointer-events: none; backdrop-filter: blur(6px); }
.noc-tip .hd { display: flex; align-items: center; gap: 8px; }
.noc-tip .hd b { font-size: 14px; font-weight: 800; }
.noc-tip .hd .chip { margin-left: auto; }
.noc-tip .loc { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; margin: 3px 0 8px; }
.noc-tip .loc img { width: 18px; height: 13px; border-radius: 2px; }
.noc-tip .why { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.noc-tip .why div { display: flex; gap: 7px; align-items: flex-start; font-weight: 700; }
.noc-tip .why .dot { margin-top: 4px; width: 7px; height: 7px; box-shadow: none; }
.noc-tip dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; }
.noc-tip dt { color: var(--muted); font-weight: 600; }
.noc-tip dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.noc-tip .foot { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); color: var(--teal); font-weight: 800; font-size: 11px; }
/* side-panel pop-ups: the row the DC card was opened from, lists of DCs or computers, a check's details */
.noc-tip .hd b { overflow-wrap: anywhere; line-height: 1.3; }
.noc-tip .ctx { margin: 0 0 8px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); }
.noc-tip .ctx small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.noc-tip .ctx div { display: flex; gap: 7px; align-items: flex-start; font-weight: 700; }
.noc-tip .ctx .dot, .noc-tip .tl .dot { flex: none; margin-top: 4px; width: 7px; height: 7px; box-shadow: none; }
.noc-tip .sec { margin: 8px 0 3px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.noc-tip .why + .sec, .noc-tip .loc + .sec { margin-top: 0; }
.noc-tip .tls { display: flex; flex-direction: column; gap: 2px; }
.noc-tip .tl { display: flex; gap: 7px; align-items: flex-start; min-width: 0; }
.noc-tip .tl b { flex: none; font-weight: 800; white-space: nowrap; }
.noc-tip .tl .tl-s { min-width: 0; margin-left: auto; padding-left: 8px; color: var(--muted); font-weight: 600; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.noc-tip .txt { margin: 6px 0 0; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.noc-tip .more { margin-top: 4px; color: var(--muted); font-weight: 700; }

/* ---------- shorter screens (e.g. 1366×768): headline values only, one-line DC tiles ---------- */
@media (max-height: 900px) {
  .noc-app { gap: 8px; padding: 8px 10px; }
  .pnl { padding: 7px 10px 7px 12px; gap: 3px; }
  .pnl-val b { font-size: 18px; }
  .pnl-bar { display: none; }
  .dct { padding: 4px 6px 4px 8px; }
  .dct small { display: none; }
  .noc-meta .clock { font-size: 17px; }
}
/* ---------- smaller screens: keep it usable, allow scrolling ---------- */
@media (max-width: 1280px) {
  .noc-links { display: none; }
  .noc-main { grid-template-columns: minmax(260px, 26vw) minmax(0, 1fr) minmax(260px, 26vw); }
}
@media (max-width: 1000px), (max-height: 700px) {
  .noc-app { height: auto; min-height: 100vh; }
  .noc-main { grid-template-columns: 1fr; }
  .noc-globe { height: 72vh; order: -1; }
  .pnl { flex: none; }
  .noc-head { flex-wrap: wrap; }
  .noc-right { margin-left: 0; flex-wrap: wrap; }
}

/* "click anywhere to go full screen" hint (browsers need a click or key press before going full screen) */
.noc-fs-hint { position: fixed; z-index: 60; left: 50%; top: 64px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 12px; background: rgba(9, 20, 20, .94); border: 1px solid var(--teal-dim); box-shadow: 0 12px 40px rgba(0, 0, 0, .5); font-size: 13px; font-weight: 700; color: var(--ink); transition: opacity .6s; pointer-events: auto; }
.noc-fs-hint svg { color: var(--teal); }
.noc-fs-hint button { border: 0; background: rgba(255, 255, 255, .06); color: var(--ink-2); width: 26px; height: 26px; border-radius: 7px; cursor: pointer; font-size: 16px; line-height: 1; }
.noc-fs-hint button:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.noc-fs-hint.faded { opacity: .7; }
.noc-fs-hint.faded:hover { opacity: 1; }
.g-legend .lg-regions { display: grid; grid-template-columns: auto auto; gap: 4px 12px; }
.noc-btn.noc-back[hidden] { display: none; }
.noc-btn.noc-back:disabled { opacity: .45; cursor: default; }
/* DC wall: a mini flag in place of the status dot (the left bar carries the status) */
.dct b .dct-flag { flex: none; width: 14px; height: 10px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.22); }
.dct b { gap: 5px; }
.dct { padding: 5px 5px 5px 8px; }
.dct b { gap: 4px; font-size: 10px; letter-spacing: -.025em; }
.dct b .dct-flag { width: 13px; height: 9px; }
.dct small { font-size: 9.5px; letter-spacing: -.01em; }

/* ---------- loading animation (ADR.loaderHtml): spinning globe, orbiting replication dots, real progress ---------- */
.adr-loader { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 64px 20px; color: var(--ld-muted); animation: adr-ld-in .35s ease-out both; }
.adr-loader-brand { font-weight: 800; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; }
.adr-loader-globe { width: var(--ld-size, 132px); height: var(--ld-size, 132px); overflow: visible; }
.adr-loader-globe .g-body { fill: var(--ld-fill); stroke: var(--ld-ring); stroke-width: 1.4; }
.adr-loader-globe .g-lat { fill: none; stroke: var(--ld-faint); }
.adr-loader-globe .g-lat2 { opacity: .7; }
.adr-loader-globe .g-mer { transform-origin: 75px 75px; animation: adr-ld-mer 3.2s linear infinite; }
.adr-loader-globe .g-mer ellipse { fill: none; stroke: var(--ld-a); stroke-width: 1.5; opacity: .85; }
.adr-loader-globe .g-orbit { transform-origin: 75px 75px; animation: adr-ld-spin 2.4s linear infinite; }
.adr-loader-globe .g-orbit-b { animation-duration: 3.6s; animation-direction: reverse; }
.adr-loader-globe .g-path { fill: none; stroke: var(--ld-faint); stroke-dasharray: 2 6; }
.adr-loader-globe .g-sat { fill: var(--ld-a); filter: drop-shadow(0 0 4px var(--ld-glow)); }
.adr-loader-globe .g-sat-b { opacity: .8; }
.adr-loader-bar { width: 200px; max-width: 70vw; height: 3px; border-radius: 3px; background: var(--ld-faint); overflow: hidden; }
.adr-loader-bar i { display: block; height: 100%; width: 4%; border-radius: 3px; background: var(--ld-a); transition: width .25s ease-out; }
.adr-loader-cap { font-size: 13px; font-weight: 600; min-height: 1.4em; text-align: center; }
.adr-loader-cap .n { color: var(--ld-a); font-variant-numeric: tabular-nums; }
.adr-fade-in { animation: adr-ld-in .45s ease-out both; }
@keyframes adr-ld-mer { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }
@keyframes adr-ld-spin { to { transform: rotate(360deg); } }
@keyframes adr-ld-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .adr-loader-globe .g-mer, .adr-loader-globe .g-orbit { animation-duration: 8s; } .adr-fade-in, .adr-loader { animation: none; } }

.noc-loading .adr-loader { --ld-size: 168px; --ld-a: var(--teal); --ld-muted: var(--muted); --ld-fill: #0B2524; --ld-ring: var(--g-border); --ld-faint: rgba(140,210,195,.16); --ld-glow: rgba(47,184,154,.6); gap: 22px; }
