/* MDZGA Admin — Cyber Neon HUD Console (ops-console.css)
   Served at /assets/ops-console.css — verify 200 OK in Network tab */

:root,
[data-theme="dark"] {
  --bg0: #070A12;
  --bg1: #0A0F1E;
  --surface0: rgba(14, 20, 36, 0.55);
  --surface1: rgba(18, 26, 48, 0.72);
  --surface2: rgba(22, 34, 62, 0.78);

  --text0: rgba(245, 248, 255, 0.92);
  --text1: rgba(245, 248, 255, 0.72);
  --text2: rgba(245, 248, 255, 0.52);

  --border0: rgba(120, 160, 255, 0.18);
  --border1: rgba(120, 160, 255, 0.28);

  --neonCyan: #2DF3FF;
  --neonPurple: #A78BFA;
  --neonLime: #38FCA5;
  --neonAmber: #FFCC66;
  --neonRed: #FF4D6D;

  --glowCyan: 0 0 18px rgba(45, 243, 255, 0.22), 0 0 48px rgba(45, 243, 255, 0.12);
  --glowPurple: 0 0 18px rgba(167, 139, 250, 0.22), 0 0 48px rgba(167, 139, 250, 0.12);
  --glowLime: 0 0 18px rgba(56, 252, 165, 0.18), 0 0 48px rgba(56, 252, 165, 0.10);
  --glowRed: 0 0 18px rgba(255, 77, 109, 0.18), 0 0 48px rgba(255, 77, 109, 0.10);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;

  --shadow0: 0 4px 24px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.2);
  --shadow1: 0 12px 48px rgba(0,0,0,0.4);

  --blur: 10px;
  --gridOpacity: 0.05;
  --scanOpacity: 0.04;
}

/* Legacy aliases for existing selectors */
:root {
  --bg: var(--bg0);
  --surface: var(--bg1);
  --surface-2: var(--surface2);
  --text: var(--text0);
  --muted: var(--text1);
  --faint: var(--text2);
  --brand-2: var(--glowPurple);
  --text-muted: var(--text1);
  --border: var(--border0);
  --border-2: var(--border1);
  --success: var(--neonLime);
  --warning: var(--neonAmber);
  --danger: var(--neonRed);
  --info: var(--neonCyan);
  --brand: var(--neonPurple);
  --ops-bg: var(--bg0);
  --ops-surface: var(--bg1);
  --ops-panel: var(--surface0);
  --ops-panel-soft: var(--surface0);
  --ops-text: var(--text0);
  --ops-muted: var(--text1);
  --ops-border: var(--border0);
  --ops-border-strong: var(--border1);
  --ops-accent: var(--neonPurple);
  --ops-good: var(--neonLime);
  --ops-warn: var(--neonAmber);
  --ops-bad: var(--neonRed);
  --ops-gap: 12px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ── HUD shell: background + grid + scanlines ── */
.ops-scope {
  font-family: var(--font-sans);
  background: radial-gradient(1400px 900px at 20% -10%, rgba(45, 243, 255, 0.06), transparent 50%),
    radial-gradient(1200px 800px at 80% 10%, rgba(167, 139, 250, 0.06), transparent 50%),
    linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 100%);
  color: var(--text0);
  min-height: 100vh;
  position: relative;
}

.ops-scope::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 160, 255, var(--gridOpacity)) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 255, var(--gridOpacity)) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

.ops-scope::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, var(--scanOpacity)) 2px,
    rgba(0, 0, 0, var(--scanOpacity)) 4px
  );
  pointer-events: none;
  z-index: 0;
}

.ops-scope > * {
  position: relative;
  z-index: 1;
}

/* ── HUD top bar ── */
.hud-top-bar {
  border-bottom: 1px solid var(--border0) !important;
  background: var(--surface0);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.ops-form-group-inline .ops-form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text1);
  margin-bottom: 0;
}

.ops-pill-live {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-color: rgba(56, 252, 165, 0.5);
  background: rgba(56, 252, 165, 0.12);
  color: var(--neonLime);
  animation: ops-pulse-subtle 2.5s ease-in-out infinite;
}

@keyframes ops-pulse-subtle {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(56, 252, 165, 0.3); }
  50% { opacity: 0.9; box-shadow: 0 0 8px 2px rgba(56, 252, 165, 0.15); }
}

/* ── HUD sidebar ── */
.hud-sidebar {
  background: var(--surface0) !important;
  border-right: 1px solid var(--border0) !important;
}

.hud-sidebar .nav-link {
  color: var(--text1);
}

.hud-sidebar .nav-link:hover {
  color: var(--neonCyan);
  background: rgba(45, 243, 255, 0.06);
}

.hud-sidebar .nav-link.active {
  color: var(--neonPurple);
  background: rgba(167, 139, 250, 0.12);
}

/* ── HUD card (glass + neon edge + L bracket) ── */
.hud-card,
.hud-card,
.ops-scope .content-card,
.ops-card,
.ops-section-card,
.ops-kpi-card {
  background: var(--surface1);
  border: 1px solid var(--border0);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow0);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.hud-card::before,
.ops-scope .content-card::before,
.ops-card::before,
.ops-section-card::before,
.ops-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--neonCyan);
  border-left: 2px solid var(--neonCyan);
  border-radius: 4px 0 0 0;
  opacity: 0.7;
  pointer-events: none;
}

.ops-card,
.ops-section-card,
.ops-kpi-card {
  padding: 16px;
}

.ops-scope .content-card {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.ops-section-card {
  padding: 24px;
}

.ops-section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ops-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text0);
}

.ops-section-subtitle {
  color: var(--text1);
  font-size: 0.8125rem;
  margin-top: 4px;
}

/* ── Page shell ── */
.ops-page-shell {
  display: grid;
  gap: 24px;
}

.ops-page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.ops-page-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text0);
}

.ops-page-subtitle {
  margin-top: 4px;
  color: var(--text1);
  font-size: 0.875rem;
}

.ops-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--ops-gap);
}

/* ── KPI cards (HUD premium) ── */
.ops-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.ops-kpi-card {
  padding: 16px;
  min-height: 88px;
  display: grid;
  gap: 6px;
  align-content: center;
  text-align: center;
}

.ops-kpi-card.clickable {
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ops-kpi-card.clickable:hover {
  border-color: var(--border1);
  transform: translateY(-2px);
  box-shadow: var(--glowCyan);
}

.ops-kpi-card.clickable:focus-visible {
  outline: 2px solid rgba(45, 243, 255, 0.55);
  outline-offset: 2px;
}

.ops-kpi-card.active {
  border-color: rgba(167, 139, 250, 0.6);
  background: var(--surface2);
  box-shadow: var(--glowPurple);
}

.ops-kpi-card.is-healthy {
  border-left: 3px solid var(--neonLime);
  box-shadow: var(--glowLime);
}

.ops-kpi-card.is-lagging {
  border-left: 3px solid var(--neonAmber);
}

.ops-kpi-card.is-error {
  border-left: 3px solid var(--neonRed);
  box-shadow: var(--glowRed);
}

.ops-kpi {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--text0);
}

.ops-kpi-label {
  color: var(--text1);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

/* KPI card uniform height */
.ops-kpi-grid .ops-kpi-card {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.ops-kpi-delta {
  color: var(--neonLime);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── Statistics layout (Modern SaaS scaling) ── */
.ops-stats-layout {
  width: 100%;
  max-width: 100%;
}

.ops-kpi-grid--stats {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.ops-kpi-grid--stats .ops-kpi {
  font-size: clamp(1.625rem, 2.8vw, 2.5rem);
}

.ops-kpi-grid--stats .ops-kpi-label {
  font-size: 0.75rem;
}

.ops-overview-grid {
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.ops-kpi-grid .ops-kpi {
  font-variant-numeric: tabular-nums;
}

.ops-section-card--full {
  width: 100%;
}

.ops-table-wrap--full {
  width: 100%;
  min-width: 0;
}

.ops-table--stats {
  table-layout: fixed;
  width: 100%;
}

.ops-table--stats th,
.ops-table--stats td {
  padding: 16px 20px;
  font-size: 0.9375rem;
}

.ops-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .ops-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ops-muted {
  color: var(--text1);
  font-size: 0.875rem;
}

/* ── Pills & badges (HUD neon) ── */
.ops-pill,
.ops-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid var(--border0);
  background: var(--surface0);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.ops-badge.kill::before,
.ops-badge.death::before,
.ops-badge.hit::before,
.ops-badge.connection::before,
.ops-badge.disconnection::before,
.ops-badge.suicide::before,
.ops-badge.build::before,
.ops-badge.server::before,
.ops-badge.warning::before,
.ops-badge.error::before,
.ops-badge.noise::before,
.ops-badge.other::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ops-pill.good,
.ops-badge.good {
  color: var(--neonLime);
  border-color: rgba(56, 252, 165, 0.5);
}

.ops-pill.warn,
.ops-badge.warn {
  color: var(--neonAmber);
  border-color: rgba(255, 204, 102, 0.5);
}

.ops-pill.bad,
.ops-badge.bad {
  color: var(--neonRed);
  border-color: rgba(255, 77, 109, 0.5);
}

.ops-badge.kill,
.ops-badge.hit {
  color: var(--neonCyan);
  border-color: rgba(45, 243, 255, 0.45);
}
.ops-badge.kill::before,
.ops-badge.hit::before {
  background: var(--neonCyan);
}

.ops-badge.death,
.ops-badge.suicide {
  color: var(--neonRed);
  border-color: rgba(255, 77, 109, 0.45);
}
.ops-badge.death::before,
.ops-badge.suicide::before {
  background: var(--neonRed);
}

.ops-badge.connection {
  color: var(--neonLime);
  border-color: rgba(56, 252, 165, 0.45);
}
.ops-badge.connection::before {
  background: var(--neonLime);
}

.ops-badge.disconnection {
  color: var(--neonAmber);
  border-color: rgba(255, 204, 102, 0.45);
}
.ops-badge.disconnection::before {
  background: var(--neonAmber);
}

.ops-badge.build {
  color: var(--neonCyan);
  border-color: rgba(45, 243, 255, 0.35);
  background: linear-gradient(135deg, rgba(45, 243, 255, 0.08), rgba(167, 139, 250, 0.08));
}
.ops-badge.build::before {
  background: linear-gradient(135deg, var(--neonCyan), var(--neonPurple));
}

.ops-badge.server {
  color: var(--neonPurple);
  border-color: rgba(167, 139, 250, 0.5);
}
.ops-badge.server::before {
  background: var(--neonPurple);
}

.ops-badge.warning {
  color: var(--neonAmber);
  border-color: rgba(255, 204, 102, 0.5);
}
.ops-badge.warning::before {
  background: var(--neonAmber);
}

.ops-badge.error {
  color: var(--neonRed);
  border-color: rgba(255, 77, 109, 0.5);
}
.ops-badge.error::before {
  background: var(--neonRed);
}

.ops-badge.noise,
.ops-badge.other {
  color: var(--text2);
  border-color: rgba(120, 160, 255, 0.2);
}
.ops-badge.noise::before,
.ops-badge.other::before {
  background: var(--text2);
}

/* ── Chips (HUD segmented controls) ── */
.ops-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ops-chip,
.ops-chip-btn {
  border: 1px solid var(--border0);
  background: var(--surface0);
  color: var(--text0);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8125rem;
  cursor: pointer;
  line-height: 1.2;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ops-chip:hover,
.ops-chip-btn:hover {
  border-color: var(--border1);
  background: var(--surface1);
}

.ops-chip:focus-visible,
.ops-chip-btn:focus-visible {
  outline: 2px solid rgba(45, 243, 255, 0.55);
  outline-offset: 2px;
}

.ops-chip.active,
.ops-chip-btn.active {
  background: rgba(167, 139, 250, 0.2);
  border-color: rgba(167, 139, 250, 0.6);
  box-shadow: var(--glowPurple);
}

/* ── HUD buttons ── */
.hud-btn,
.ops-btn,
.ops-icon-btn {
  border: 1px solid var(--border0);
  border-radius: var(--radius-md);
  background: var(--surface0);
  color: var(--text0);
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ops-icon-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
}

.hud-btn:hover,
.ops-btn:hover,
.ops-icon-btn:hover {
  border-color: var(--neonCyan);
  transform: translateY(-1px);
  box-shadow: var(--glowCyan);
}

.ops-btn.primary {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.3), rgba(167, 139, 250, 0.2));
  border-color: rgba(167, 139, 250, 0.6);
}

.ops-btn.ghost {
  background: var(--surface0);
}

.ops-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hud-btn:focus-visible,
.ops-btn:focus-visible,
.ops-icon-btn:focus-visible,
.ops-drawer-close:focus-visible {
  outline: 2px solid rgba(45, 243, 255, 0.55);
  outline-offset: 2px;
}

.ops-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text1);
}

.ops-live-indicator::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neonLime);
  box-shadow: 0 0 0 0 rgba(56, 252, 165, 0.7);
  animation: ops-pulse 1.8s infinite;
}

.ops-live-indicator.off::before {
  background: var(--neonRed);
  box-shadow: none;
  animation: none;
}

@keyframes ops-pulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 252, 165, 0.65); }
  70% { box-shadow: 0 0 0 7px rgba(56, 252, 165, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 252, 165, 0); }
}

/* ── Table (events feed) ── */
.ops-table-wrap {
  overflow: auto;
  border: 1px solid var(--border0);
  border-radius: var(--radius-lg);
  background: var(--surface0);
  width: 100%;
}

.ops-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9375rem;
}

.ops-table th,
.ops-table td {
  border-bottom: 1px solid var(--border0);
  padding: 16px 20px;
  text-align: left;
  vertical-align: middle;
  min-height: 52px;
}

.ops-table .summary-cell {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text0);
  line-height: 1.4;
  max-width: 360px;
}

.ops-table .summary-cell + td {
  font-size: 0.8125rem;
  color: var(--text1);
}

.ops-raw-line {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text1);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 12px;
  background: rgba(7, 10, 18, 0.9);
  border-radius: var(--radius-md);
  border: 1px solid var(--border0);
  overflow-x: auto;
  max-height: 240px;
  overflow-y: auto;
}

.ops-code-wrap {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text1);
  word-break: break-all;
}

.ops-table th {
  color: var(--text1);
  font-weight: 600;
  background: var(--surface1);
  backdrop-filter: blur(var(--blur));
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.6875rem;
  position: sticky;
  top: 0;
  z-index: 2;
}

.ops-table--sticky thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.ops-table tbody tr {
  transition: background 0.12s ease;
}

.ops-table tbody tr:nth-child(even) {
  background: rgba(22, 34, 62, 0.15);
}

.ops-table tbody tr:hover {
  background: rgba(45, 243, 255, 0.06);
}

.ops-table tbody tr.top-rank {
  background: rgba(167, 139, 250, 0.1);
}

.ops-table tbody tr.top-rank td:first-child {
  color: var(--neonPurple);
  font-weight: 700;
}

.ops-table td.num,
.ops-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ops-table td.time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--text1);
  font-size: 0.8125rem;
}

.ops-table .ops-mono,
.ops-table code,
.ops-drawer-meta code,
.ops-code-block {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text1);
}

.ops-table .row-actions {
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.ops-table tbody tr:hover .row-actions,
.ops-table tbody tr:focus-within .row-actions {
  opacity: 1;
}

/* ── HUD switch (Signal-only) ── */
.ops-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text1);
  white-space: nowrap;
}

.ops-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ops-switch-track {
  display: inline-block;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface0);
  border: 1px solid var(--border0);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ops-switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text2);
  transition: transform 0.2s ease;
}

.ops-switch-input:checked + .ops-switch-track {
  background: rgba(167, 139, 250, 0.2);
  border-color: rgba(167, 139, 250, 0.6);
}

.ops-switch-input:checked + .ops-switch-track::after {
  transform: translateX(16px);
  background: var(--neonPurple);
}

.ops-switch-input:focus-visible + .ops-switch-track {
  box-shadow: 0 0 0 2px rgba(45, 243, 255, 0.3);
}

.ops-switch-text {
  user-select: none;
}

.ops-input,
.ops-select {
  background: var(--surface0);
  border: 1px solid var(--border0);
  color: var(--text0);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  min-height: 36px;
}

.ops-input:focus,
.ops-select:focus {
  outline: none;
  border-color: rgba(45, 243, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(45, 243, 255, 0.15);
}

/* ── Error / empty (HUD NO SIGNAL) ── */
.ops-error-banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 77, 109, 0.5);
  background: rgba(255, 77, 109, 0.08);
  color: #ff8090;
  font-size: 0.875rem;
  box-shadow: var(--glowRed);
}

.ops-empty {
  text-align: center;
  border: 1px dashed var(--border0);
  background: var(--surface0);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
}

.ops-empty::before {
  content: "";
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378a0ff' stroke-width='1.5' stroke-linecap='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M8 12h8M8 16h4'/%3E%3C/svg%3E") no-repeat center;
  opacity: 0.5;
}

.ops-empty-title {
  color: var(--text0);
  font-weight: 600;
  font-size: 1.0625rem;
  margin-bottom: 8px;
}

.ops-empty-body {
  color: var(--text1);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ── Skeletons ── */
.ops-skeleton {
  display: inline-block;
  width: 100%;
  height: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface0), var(--surface1), var(--surface0));
  background-size: 220% 100%;
  animation: ops-shimmer 1.4s infinite linear;
}

.ops-skeleton-line {
  display: block;
  width: 100%;
  height: 12px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--surface0), var(--surface1), var(--surface0));
  background-size: 220% 100%;
  animation: ops-shimmer 1.4s infinite linear;
}

.ops-skeleton-line + .ops-skeleton-line {
  margin-top: 10px;
}

.ops-skeleton-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border0);
  background: var(--surface0);
}

.ops-skeleton-table {
  border: 1px solid var(--border0);
  border-radius: var(--radius-lg);
  padding: 12px;
}

.ops-skeleton-table .ops-skeleton-line {
  height: 14px;
}

@keyframes ops-shimmer {
  from { background-position: 220% 0; }
  to { background-position: -220% 0; }
}

/* ── Drawer (HUD slide-in) ── */
.ops-drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1200;
  pointer-events: none;
}

.ops-drawer.open {
  display: block;
  pointer-events: auto;
}

.ops-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 18, 0.75);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ops-drawer.open .ops-drawer-backdrop {
  opacity: 1;
}

.ops-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(520px, 96vw);
  height: 100%;
  padding: 24px;
  background: var(--surface1);
  border-left: 1px solid var(--border0);
  box-shadow: var(--shadow-lg);
  overflow: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.ops-drawer.open .ops-drawer-panel {
  transform: translateX(0);
}

.ops-drawer-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  border-top: 2px solid var(--neonPurple);
  border-left: 2px solid var(--neonPurple);
  border-radius: 4px 0 0 0;
  opacity: 0.8;
}

.ops-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ops-drawer-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text0);
}

.ops-drawer-close {
  border: 1px solid var(--border0);
  border-radius: var(--radius-md);
  background: var(--surface0);
  color: var(--text0);
  padding: 6px 12px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ops-drawer-close:hover {
  border-color: var(--neonCyan);
  background: var(--surface1);
}

.ops-drawer-meta {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  font-size: 0.875rem;
}

.ops-drawer-meta code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: var(--mono);
}

.ops-code-block {
  background: rgba(7, 10, 18, 0.9);
  padding: 12px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8125rem;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border0);
}

.ops-drawer-section {
  margin-bottom: 16px;
}

.ops-drawer-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ops-drawer-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ops-copy-btn {
  border: 1px solid var(--border0);
  border-radius: var(--radius-sm);
  background: var(--surface0);
  color: var(--text1);
  padding: 2px 8px;
  font-size: 0.6875rem;
  cursor: pointer;
  margin-left: 8px;
  vertical-align: middle;
}

.ops-copy-btn:hover {
  color: var(--text0);
  border-color: var(--neonCyan);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .ops-kpi-card.clickable:hover,
  .ops-chip,
  .ops-chip-btn,
  .ops-table tbody tr,
  .ops-drawer-backdrop,
  .ops-drawer-panel,
  .hud-btn,
  .ops-btn,
  .ops-icon-btn {
    transition: none;
  }
  .ops-kpi-card.clickable:hover,
  .hud-btn:hover,
  .ops-btn:hover,
  .ops-icon-btn:hover {
    transform: none;
  }
  .ops-live-indicator::before {
    animation: none;
  }
  .ops-pill-live {
    animation: none;
  }
  .ops-skeleton,
  .ops-skeleton-line {
    animation: none;
    background: var(--surface1);
  }
  .ops-drawer.open .ops-drawer-backdrop {
    opacity: 1;
  }
  .ops-drawer.open .ops-drawer-panel {
    transform: translateX(0);
  }
}

/* ── Fleet / monitoring cards (HUD) ── */
.fleet-kpi-card {
  background: var(--surface1) !important;
  border: 1px solid var(--border0) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow0) !important;
}

.fleet-kpi-card.lagging .value {
  color: var(--neonAmber);
}

.fleet-kpi-card.healthy .value {
  color: var(--neonLime);
}

.server-card-2026 {
  background: var(--surface1) !important;
  border: 1px solid var(--border0) !important;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .ops-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ops-table th,
  .ops-table td {
    padding: 10px 12px;
  }
}

@media (max-width: 768px) {
  .ops-stats-grid {
    grid-template-columns: 1fr;
  }
  .ops-table--stats th,
  .ops-table--stats td {
    padding: 12px 16px;
    font-size: 0.875rem;
  }
  .ops-page-head {
    align-items: stretch;
  }
  .ops-drawer-panel {
    width: 100%;
  }
}
