:root {
  --bg: #080c10;
  --panel: rgba(10, 18, 28, 0.95);
  --border: #1a2d45;
  --cyan: #00e5ff;
  --orange: #ff6b35;
  --green: #39ff14;
  --amber: #f59e0b;
  --red: #ff3333;
  --text: #c8daea;
  --muted: #4a6278;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Share Tech Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body {
  display: flex;
}

.cu-root {
  display: flex;
  flex: 1;
  min-height: 100vh;
  max-height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
}

.cu-sidebar {
  width: 280px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.cu-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.cu-sidebar-title {
  font-size: 14px;
  color: var(--muted);
}

.cu-sidebar-clock {
  font-size: 18px;
  color: var(--cyan);
  font-weight: 700;
}

.cu-sidebar-section {
  margin-bottom: 10px;
}

.cu-sidebar-section--grow {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cu-section-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.cu-video-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;   /* scrolls only when the section is flex-constrained */
  min-height: 0;
}

/* Video feeds section — can shrink in the sidebar flex column */
.cu-sidebar-section--feeds {
  flex-shrink: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cu-video-slot {
  border: 1px solid var(--border);
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cu-video-slot--alpha { border-color: var(--cyan); }
.cu-video-slot--bravo { border-color: var(--orange); }
.cu-video-slot--gamma { border-color: var(--green); }
.cu-video-slot--delta { border-color: var(--amber); }

.cu-video-slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.cu-video-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

.cu-video-dot--alpha { background: var(--cyan); }
.cu-video-dot--bravo { background: var(--orange); }
.cu-video-dot--gamma { background: var(--green); }
.cu-video-dot--delta { background: var(--amber); }

.cu-video-header-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cu-video-header-right {
  color: var(--muted);
}

.cu-video-frame {
  background: #05080c;
  border: 1px solid var(--border);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
}

.cu-video-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

.cu-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.cu-stat-box {
  border: 1px solid var(--border);
  padding: 6px 8px;
}

.cu-stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.cu-stat-value {
  font-size: 15px;
  color: var(--cyan);
  font-weight: 700;
}

.cu-unit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  overflow-y: auto;
  max-height: 100%;
}

.cu-unit-list-item {
  margin-bottom: 2px;
}

.cu-unit-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

/* ── Event log ────────────────────────────────────────────────── */
.cu-event-log {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cu-event-item {
  display: flex;
  gap: 6px;
  line-height: 1.5;
  padding: 2px 0;
}

.cu-event-time {
  color: var(--muted);
  flex-shrink: 0;
  min-width: 44px;
}

.cu-event-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.cu-event-dot--fire        { background: var(--red); }
.cu-event-dot--patient     { background: var(--green); }
.cu-event-dot--room        { background: var(--cyan); }
.cu-event-dot--mission     { background: var(--amber); }
.cu-event-dot--fire_suppressed { background: var(--orange); }
.cu-event-dot--patient_evac    { background: var(--green); }

.cu-event-label {
  color: var(--text);
}

.cu-event-label--fire        { color: var(--red); }
.cu-event-label--patient     { color: var(--green); }
.cu-event-label--patient_evac { color: var(--green); }

.cu-sidebar-footer {
  margin-top: 8px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.cu-mesh-label {
  color: var(--muted);
}

.cu-mesh-value {
  color: var(--green);
}

.cu-text-green {
  color: var(--green);
}

.cu-text-orange {
  color: var(--orange);
}

.cu-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.cu-map-frame {
  position: relative;
  flex: 1;
  margin: 8px 10px 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}


.cu-map-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--cyan);
  border-style: solid;
  opacity: 0.5;
  z-index: 2;
}

.cu-map-corner--tl {
  top: 6px;
  left: 6px;
  border-width: 2px 0 0 2px;
}

.cu-map-corner--tr {
  top: 6px;
  right: 6px;
  border-width: 2px 2px 0 0;
}

.cu-map-corner--bl {
  bottom: 6px;
  left: 6px;
  border-width: 0 0 2px 2px;
}

.cu-map-corner--br {
  bottom: 6px;
  right: 6px;
  border-width: 0 2px 2px 0;
}

.cu-map-hud {
  position: absolute;
  font-size: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 2;
  letter-spacing: 0.18em;
}

.cu-map-hud--tl {
  top: 10px;
  left: 18px;
}

.cu-map-hud--tr {
  top: 10px;
  right: 18px;
  align-items: flex-end;
}

.cu-hud-demo {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--bg);
  background: var(--orange);
  padding: 2px 7px;
  border-radius: 2px;
  font-weight: 700;
}

.cu-hud-line {
  line-height: 1.6;
}

.cu-hud-label {
  color: var(--muted);
  margin-right: 4px;
}

.cu-hud-value {
  color: var(--cyan);
}

.cu-map-scale {
  position: absolute;
  left: 12px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--muted);
  z-index: 2;
}

.cu-map-scale-line {
  display: inline-block;
  height: 1px;
  width: 50px;
  background: var(--muted);
}

.cu-map-controls {
  position: absolute;
  right: 16px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.cu-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 16px;
  font-size: 13px;
  font-family: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  border-radius: 3px;
  min-height: 36px;
}

.cu-btn:active {
  border-color: var(--cyan);
}

.cu-status-bar {
  height: 38px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 13px;
  background: #05080c;
}

.cu-status-left,
.cu-status-center,
.cu-status-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cu-status-left {
  flex: 1;
}

.cu-status-center {
  flex: 1;
  justify-content: center;
}

.cu-status-right {
  flex: 1;
  justify-content: flex-end;
}

.cu-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

.cu-status-dot--connecting {
  background: var(--amber);
}

.cu-status-dot--live {
  background: var(--green);
}

.cu-status-dot--offline {
  background: var(--red);
}

.cu-status-dot--partial {
  background: var(--orange);
}

.cu-status-text {
  color: var(--muted);
}

.cu-status-alert {
  color: var(--red);
}

.cu-status-meta {
  color: var(--muted);
}

.cu-text-red {
  color: var(--red);
}

/* ── Isometric map canvas ─────────────────────────────────────── */
.cu-map-iso-wrapper {
  position: absolute;
  inset: -12% -6% -12% -6%;
  transform: perspective(1400px) rotateX(50deg) rotateZ(-42deg);
  transform-origin: 54% 46%;
  will-change: transform;
}

.cu-map-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Video enlarged overlay ───────────────────────────────────── */
.cu-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 12, 16, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cu-video-overlay.is-open {
  display: flex;
}

.cu-video-overlay-panel {
  width: min(62vw, 860px);
  border: 1px solid var(--border);
  background: rgba(5, 8, 14, 0.97);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 12px;
  pointer-events: none;
}

.cu-video-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.cu-video-overlay-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cu-video-overlay-title {
  color: var(--text);
}

.cu-video-overlay-frame {
  background: #020507;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--border);
  letter-spacing: 0.2em;
}

.cu-video-overlay-footer {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
}

/* clickable slots */
.cu-video-slot {
  cursor: pointer;
  transition: opacity 0.12s;
}

.cu-video-slot:hover {
  opacity: 0.8;
}

/* ── Stats toggle button (sidebar) ──────────────────────────────── */
.cu-stats-toggle-btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  touch-action: manipulation;
}

.cu-stats-toggle-btn:hover,
.cu-stats-toggle-btn:active {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ── Stats modal overlay ─────────────────────────────────────────── */
.cu-stats-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(4, 8, 14, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cu-stats-overlay.is-open {
  display: flex;
  animation: statsAppear 0.14s ease;
}

@keyframes statsAppear {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.cu-stats-panel {
  background: #050d16;
  border: 1px solid var(--border);
  padding: 20px 22px 18px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cu-stats-panel-title {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.14em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.cu-stats-panel .cu-stats-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.cu-stats-panel .cu-stat-box {
  padding: 10px 12px;
}

.cu-stats-panel .cu-stat-label {
  font-size: 12px;
  margin-bottom: 4px;
}

.cu-stats-panel .cu-stat-value {
  font-size: 22px;
}

.cu-stats-close-btn {
  width: 100%;
  min-height: 48px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  touch-action: manipulation;
}

.cu-stats-close-btn:active {
  border-color: var(--cyan);
  color: var(--cyan);
}

.cu-monitoring-link {
  color: var(--cyan);
  text-decoration: none;
  font-size: 13px;
  border: 1px solid var(--cyan);
  padding: 10px 18px;
  border-radius: 3px;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.05em;
}

.cu-monitoring-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ── Map zoom layer ───────────────────────────────────────────────── */
.cu-map-zoom-layer {
  position: absolute;
  inset: 0;
  transform-origin: center center;
  /* touch-action managed by JS to allow pinch */
}

/* ══ Orientation lock overlays ════════════════════════════════════ */
.cu-rotate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 40px;
}

.cu-rotate-icon {
  font-size: 72px;
  color: var(--cyan);
  animation: rotateSpin 2s ease-in-out infinite;
}

@keyframes rotateSpin {
  0%   { transform: rotate(0deg); }
  40%  { transform: rotate(90deg); }
  100% { transform: rotate(90deg); }
}

.cu-rotate-msg {
  font-size: 18px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* Show portrait overlay on touch devices in landscape */
@media screen and (orientation: landscape) and (hover: none) and (pointer: coarse) {
  .cu-rotate-overlay--portrait {
    display: flex;
  }
  /* Hide the monitoring page content */
  .mon-root {
    display: none !important;
  }
}

/* Show landscape overlay on touch devices in portrait */
@media screen and (orientation: portrait) and (hover: none) and (pointer: coarse) {
  .cu-rotate-overlay--landscape {
    display: flex;
  }
  /* Hide the mission page content */
  .cu-root {
    display: none !important;
  }
}

/* ══ Responsive layout ════════════════════════════════════════════ */

/* ── Landscape tablet / small desktop (≤ 1024px) ──────────────── */
@media (max-width: 1024px) {
  .cu-sidebar {
    width: 240px;
  }
}

/* ── Landscape phone / small tablet (height ≤ 500px) ─────────── */
@media (max-height: 500px) {
  .cu-sidebar {
    padding: 8px 8px;
    width: 210px;
  }
  .cu-sidebar-header {
    margin-bottom: 6px;
  }
  .cu-sidebar-title {
    font-size: 11px;
  }
  .cu-sidebar-clock {
    font-size: 14px;
  }
  .cu-sidebar-section {
    margin-bottom: 6px;
  }
  .cu-section-label {
    font-size: 10px;
    margin-bottom: 4px;
  }
  .cu-video-frame {
    height: 72px;
    font-size: 10px;
  }
  .cu-video-list {
    gap: 4px;
  }
  .cu-video-slot {
    padding: 4px 6px 6px;
  }
  .cu-video-slot-header {
    font-size: 11px;
  }
  .cu-video-footer {
    font-size: 9px;
  }
  /* Stack stats in one row of 4 */
  .cu-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .cu-stat-box {
    padding: 4px 6px;
  }
  .cu-stat-label {
    font-size: 9px;
    margin-bottom: 1px;
  }
  .cu-stat-value {
    font-size: 12px;
  }
  .cu-unit-list {
    font-size: 12px;
  }
  .cu-event-log {
    font-size: 11px;
  }
  .cu-event-item {
    line-height: 1.3;
    padding: 1px 0;
    gap: 4px;
  }
  .cu-event-time {
    min-width: 36px;
  }
  .cu-sidebar-footer {
    font-size: 11px;
    margin-top: 4px;
  }
  .cu-monitoring-link {
    font-size: 12px;
    padding: 9px 14px;
  }
  .cu-settings-btn {
    font-size: 11px;
    padding: 2px 5px;
  }
  .cu-status-bar {
    height: 28px;
    font-size: 11px;
    padding: 0 10px;
  }
  .cu-status-dot {
    width: 7px;
    height: 7px;
  }
  .cu-btn {
    padding: 5px 10px;
    font-size: 11px;
    min-height: 28px;
  }
  .cu-map-frame {
    margin: 5px 7px 3px;
  }
}

/* ── Landscape phone very small (height ≤ 400px) ─────────────── */
@media (max-height: 400px) {
  .cu-sidebar {
    width: 185px;
    padding: 6px 7px;
  }
  .cu-video-frame {
    height: 56px;
  }
  /* Hide video footers to save vertical space */
  .cu-video-footer {
    display: none;
  }
}

/* ── Settings button ─────────────────────────────────────────────── */
.cu-settings-btn {
  background: none;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: inherit;
  font-size: 16px;
  padding: 10px 12px;
  min-height: 44px;
  min-width: 44px;
  border-radius: 3px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
  touch-action: manipulation;
}

.cu-settings-btn:hover,
.cu-settings-btn:active {
  background: rgba(0, 229, 255, 0.08);
}

/* ── Settings overlay ────────────────────────────────────────────── */
.cu-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 8, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}

.cu-settings-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.cu-settings-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  width: min(360px, 90vw);
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.cu-settings-header {
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--cyan);
}

.cu-settings-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cu-settings-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cu-settings-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.cu-settings-lang-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cu-settings-lang-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 8px 16px;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  min-width: 90px;
  text-align: center;
}

.cu-settings-lang-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.cu-settings-lang-btn.is-active {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--cyan);
  color: var(--cyan);
}

.cu-settings-close-btn {
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.18em;
  padding: 12px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  border-radius: 0 0 4px 4px;
  width: 100%;
}

.cu-settings-close-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

/* ── Setup overlay (first-launch) ───────────────────────────────── */
.cu-setup-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.cu-setup-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.cu-setup-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7);
}

.cu-setup-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 20px 14px;
}

.cu-setup-title {
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--cyan);
  margin-bottom: 4px;
}

.cu-setup-subtitle {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.cu-setup-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cu-setup-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cu-setup-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.cu-setup-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.1em;
  padding: 10px 12px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  text-transform: uppercase;
}

.cu-setup-input:focus {
  border-color: var(--cyan);
}

.cu-setup-input::placeholder {
  color: var(--muted);
  text-transform: uppercase;
}

.cu-setup-lang-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cu-setup-lang-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cu-setup-lang-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 8px 16px;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  min-width: 90px;
  text-align: center;
}

.cu-setup-lang-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.cu-setup-lang-btn.is-active {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--cyan);
  color: var(--cyan);
}

.cu-setup-confirm-btn {
  background: rgba(0, 229, 255, 0.1);
  border: none;
  border-top: 1px solid var(--border);
  color: var(--cyan);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.2em;
  padding: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-radius: 0 0 4px 4px;
  width: 100%;
  text-align: center;
}

.cu-setup-confirm-btn:hover {
  background: rgba(0, 229, 255, 0.2);
}

/* ── Monitoring header nav row ───────────────────────────────────── */
.mon-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}


/* ── Setup overlay (first-launch) ───────────────────────────────── */
.cu-setup-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.cu-setup-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.cu-setup-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7);
}

.cu-setup-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 20px 14px;
}

.cu-setup-title {
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--cyan);
  margin-bottom: 4px;
}

.cu-setup-subtitle {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.cu-setup-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cu-setup-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cu-setup-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.cu-setup-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.1em;
  padding: 10px 12px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  text-transform: uppercase;
}

.cu-setup-input:focus {
  border-color: var(--cyan);
}

.cu-setup-input::placeholder {
  color: var(--muted);
  text-transform: uppercase;
}

.cu-setup-lang-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cu-setup-lang-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cu-setup-lang-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 8px 16px;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  min-width: 90px;
  text-align: center;
}

.cu-setup-lang-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.cu-setup-lang-btn.is-active {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--cyan);
  color: var(--cyan);
}

.cu-setup-confirm-btn {
  background: rgba(0, 229, 255, 0.1);
  border: none;
  border-top: 1px solid var(--border);
  color: var(--cyan);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.2em;
  padding: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-radius: 0 0 4px 4px;
  width: 100%;
  text-align: center;
}

.cu-setup-confirm-btn:hover {
  background: rgba(0, 229, 255, 0.2);
}

.cu-settings-reconfig-btn {
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.18em;
  padding: 12px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  width: 100%;
  text-align: center;
}

.cu-settings-reconfig-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
