/* 관제 벽 화면: 한 화면에 고정하고 넘치는 장비는 페이지 순환으로 보여 준다 (스크롤 없음) */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { overflow: hidden; }

.noc {
  --ok: #2EE6A8; --warn: #FFB547; --err: #FF5D73; --off: #7A8AA6; --cyan: #38E0FF; --violet: #9D8CFF;
  --font-ui: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  --font-num: "SF Mono", "Cascadia Code", "JetBrains Mono", ui-monospace, Consolas, monospace;
  height: 100vh;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--tx);
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}
.noc[data-theme="navy"] {
  --bg: #070F1F; --bg2: #0A1730; --panel: rgba(16, 32, 64, .55); --stroke: rgba(80, 130, 220, .24);
  --stroke-hi: rgba(56, 224, 255, .48); --tx: #E8F0FF; --tx2: #8CA3C7; --tx3: #5A7195;
  --chip: rgba(56, 224, 255, .10); --track: rgba(120, 160, 230, .14);
  background: radial-gradient(1200px 600px at 85% -10%, var(--bg2), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--bg2), transparent 55%), var(--bg);
}
.noc[data-theme="white"] {
  --bg: #F4F7FC; --bg2: #EAF0F9; --panel: #fff; --stroke: #DCE5F2; --stroke-hi: #9CC3E8;
  --tx: #0E2247; --tx2: #4C6285; --tx3: #8CA0BE; --chip: rgba(20, 90, 200, .08); --track: #E6ECF6;
  --cyan: #0E86D4; --violet: #6C5CE7; --ok: #0FB981; --warn: #C97A00; --err: #E4405F;
  background: radial-gradient(1200px 600px at 85% -10%, var(--bg2), transparent 60%), var(--bg);
}

.noc-head { display: flex; align-items: center; gap: 14px; min-height: 52px; flex: none; }
.noc-brand strong { display: block; font-size: 25px; line-height: 1.1; letter-spacing: .14em; font-weight: 400; }
.noc-brand strong b { font-weight: 800; }
.noc-brand em { display: block; margin-top: 2px; font-style: normal; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--tx2); }
.noc-spacer { flex: 1; }
.noc-btn { height: 34px; padding: 0 13px; border: 1px solid var(--stroke); border-radius: 8px; background: var(--chip); color: var(--tx); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.noc-btn:hover { border-color: var(--stroke-hi); }
.noc-link { display: inline-flex; align-items: center; text-decoration: none; }
.noc-page { font-family: var(--font-num); font-size: 12px; color: var(--tx2); white-space: nowrap; }
.noc-time { text-align: right; font-family: var(--font-num); color: var(--tx2); font-size: 11px; line-height: 1.25; }
.noc-time b { display: block; font-size: 20px; color: var(--tx); letter-spacing: .04em; }
.noc-toggle { display: flex; border: 1px solid var(--stroke); border-radius: 8px; overflow: hidden; }
.noc-toggle button { height: 32px; padding: 0 12px; border: 0; background: transparent; color: var(--tx2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.noc-toggle button.on { background: var(--cyan); color: #06162E; }
.noc[data-theme="white"] .noc-toggle button.on { color: #fff; }
:is(.noc-btn, .noc-toggle button):focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.noc-panel { background: var(--panel); border: 1px solid var(--stroke); border-radius: 12px; backdrop-filter: blur(6px); }
.noc-kpis { display: grid; grid-template-columns: repeat(2, minmax(190px, 1fr)) repeat(3, minmax(150px, 1fr)) minmax(280px, 2.2fr); gap: 12px; height: 110px; flex: none; }
.noc-kpi { padding: 12px 15px; min-width: 0; overflow: hidden; }
.noc-kpi h4 { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--tx2); white-space: nowrap; }
.noc-kpi .n { font-family: var(--font-num); font-size: 28px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.noc-kpi .n small { font-size: 14px; font-weight: 500; color: var(--tx2); }
.noc-kpi .sub { margin-top: 4px; font-size: 11px; color: var(--tx3); white-space: nowrap; }
.noc-kpi.good .n { color: var(--ok); }
.noc-kpi.gauge { display: flex; align-items: center; gap: 14px; }
.noc-gauge { position: relative; width: 86px; height: 86px; flex: none; }
.noc-gauge svg { transform: rotate(-90deg); }
.noc-gauge circle { fill: none; stroke-width: 7; }
.noc-gauge .t { stroke: var(--track); }
.noc-gauge .v { stroke: var(--cyan); stroke-linecap: round; transition: stroke-dashoffset .8s; }
.noc-kpi.gauge.mem .v { stroke: var(--violet); }
.noc-gauge span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-num); font-size: 18px; font-weight: 700; }
.noc-kpi.chart { display: flex; flex-direction: column; }
.noc-kpi.chart h4 span { margin-left: 10px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.noc-kpi.chart h4 i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 2px; }
.noc-kpi.chart svg { flex: 1; width: 100%; min-height: 0; }

.noc-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows, 4), minmax(0, 1fr)); gap: 10px; }
.noc-card { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 8px; min-width: 0; min-height: 0; overflow: hidden; }
.noc-card-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.noc-card-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-num); font-size: 13px; }
.noc-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.noc-spark { flex: 1; min-height: 18px; }
.noc-spark svg { width: 100%; height: 100%; display: block; }
.noc-bars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.noc-bars span { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--tx2); }
.noc-bars span b { font-family: var(--font-num); color: var(--tx); font-weight: 600; }
.noc-bars i { display: block; height: 4px; margin-top: 3px; border-radius: 2px; background: var(--track); overflow: hidden; }
.noc-bars u { display: block; height: 100%; border-radius: 2px; background: var(--cyan); transition: width .8s; }
.noc-bars .mem u { background: var(--violet); }
.noc-card-foot { display: flex; justify-content: space-between; font-family: var(--font-num); font-size: 9.5px; color: var(--tx3); white-space: nowrap; }

@media (max-width: 900px) {
  body { overflow: auto; }
  .noc { height: auto; min-height: 100vh; overflow: visible; }
  .noc-head { flex-wrap: wrap; }
  .noc-spacer { display: none; }
  .noc-kpis { height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .noc-kpi.chart { grid-column: 1 / -1; height: 110px; }
  .noc-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); grid-template-rows: none; grid-auto-rows: 128px; }
}
@media (prefers-reduced-motion: reduce) {
  .noc, .noc-gauge .v, .noc-bars u { transition: none; }
}
