.vss-rm-monitor {
  --vss-rm-bg: #07111f;
  --vss-rm-panel: #0e1d2e;
  --vss-rm-panel-2: #13263b;
  --vss-rm-line: #29435e;
  --vss-rm-text: #f5f8fc;
  --vss-rm-muted: #9db0c3;
  --vss-rm-green: #2ee68a;
  --vss-rm-green-dim: rgba(46, 230, 138, .15);
  --vss-rm-red: #ff6b6b;
  --vss-rm-amber: #f4c95d;
  --vss-rm-blue: #67b7ff;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  container-type: inline-size;
  color: var(--vss-rm-text);
  background: radial-gradient(circle at top right, #173453 0, var(--vss-rm-bg) 38%);
  border: 1px solid var(--vss-rm-line);
  border-radius: 16px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.4;
}
.vss-rm-monitor *, .vss-rm-monitor *::before, .vss-rm-monitor *::after { box-sizing: border-box; }
.vss-rm-monitor h2, .vss-rm-monitor h3, .vss-rm-monitor p { margin-top: 0; color: inherit; }
.vss-rm-monitor h2, .vss-rm-monitor h3 { color: var(--vss-rm-text) !important; }
.vss-rm-monitor h2 { margin-bottom: 0; font-size: clamp(1.45rem, 2.7vw, 2rem); line-height: 1.08; }
.vss-rm-monitor h3 { margin-bottom: 0; font-size: 1.18rem; }
.vss-rm-monitor button, .vss-rm-monitor input, .vss-rm-monitor select { font: inherit; }
.vss-rm-monitor [hidden] { display: none !important; }

.vss-rm-skip-link {
  position: absolute;
  left: 12px;
  top: -70px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--vss-rm-text);
  color: var(--vss-rm-bg) !important;
  font-weight: 700;
  text-decoration: none;
}
.vss-rm-skip-link:focus { top: 12px; }

/* Commercial header: identity at left, navigation centered, health/status grouped at right. */
.vss-rm-site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "left center right";
  gap: clamp(18px, 3vw, 42px);
  align-items: stretch;
  min-height: 154px;
  padding: 14px clamp(18px, 3vw, 28px) 18px;
  border-bottom: 1px solid var(--vss-rm-line);
  background: rgba(7,17,31,.94);
}
.vss-rm-header-left {
  grid-area: left;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}
.vss-rm-header-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.vss-rm-club-logo {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
}
.vss-rm-eyebrow {
  margin-bottom: 2px !important;
  color: var(--vss-rm-blue) !important;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .68rem;
}
.vss-rm-header-brand .vss-rm-eyebrow { margin: 0 !important; }
.vss-rm-monitor-identity {
  align-self: center;
  min-width: 0;
  margin-left: 0;
  padding-top: 5px;
}
.vss-rm-monitor.vss-rm-has-logo .vss-rm-monitor-identity { margin-left: 53px; }
.vss-rm-monitor .vss-rm-site-header h2 {
  margin: 0 !important;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.vss-rm-collector-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 7px;
  margin-top: 5px;
  font-size: .76rem;
}
.vss-rm-collector-label {
  color: var(--vss-rm-text);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .05em;
}
.vss-rm-header-center {
  grid-area: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
}
.vss-rm-header-right {
  grid-area: right;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
}
.vss-rm-header-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.vss-rm-header-health-block {
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.vss-rm-header-health-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  color: var(--vss-rm-muted);
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  text-align: center;
  white-space: nowrap;
}
.vss-rm-header-health-label::before,
.vss-rm-header-health-label::after {
  content: "";
  flex: 1 1 34px;
  max-width: 110px;
  height: 1px;
  background: var(--vss-rm-line);
}
.vss-rm-header-device-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}
.vss-rm-health-chip {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  border: 1px solid var(--vss-rm-line);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: .64rem;
  line-height: 1.15;
  background: rgba(7,17,31,.5);
}
.vss-rm-health-chip.alive { color: var(--vss-rm-green); border-color: rgba(46,230,138,.45); background: var(--vss-rm-green-dim); }
.vss-rm-health-chip.offline { color: var(--vss-rm-red); border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.12); }
.vss-rm-health-chip.unknown { color: var(--vss-rm-amber); }
.vss-rm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--vss-rm-line);
  border-radius: 999px;
  padding: 4px 7px;
  font-size: .66rem;
  line-height: 1.15;
  font-weight: 700;
  white-space: nowrap;
}
.vss-rm-badge-ok { color: var(--vss-rm-green); background: var(--vss-rm-green-dim); border-color: rgba(46,230,138,.45); }
.vss-rm-badge-warn { color: var(--vss-rm-amber); background: rgba(244,201,93,.12); }
.vss-rm-badge-bad { color: var(--vss-rm-red); background: rgba(255,107,107,.12); border-color: rgba(255,107,107,.45); }
.vss-rm-nav-button {
  appearance: none;
  min-width: 112px;
  min-height: 38px;
  border: 1px solid rgba(103,183,255,.88);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(103,183,255,.28), rgba(103,183,255,.12));
  color: var(--vss-rm-text);
  padding: 8px 16px;
  font-size: .76rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 5px 14px rgba(0,0,0,.18);
}
.vss-rm-nav-button:hover, .vss-rm-nav-button:focus-visible {
  border-color: var(--vss-rm-blue);
  background: linear-gradient(180deg, rgba(103,183,255,.38), rgba(103,183,255,.2));
  outline: none;
  transform: translateY(-1px);
}
.vss-rm-nav-button:active { transform: translateY(0); }
.vss-rm-action-button {
  appearance: none;
  border: 1px solid rgba(103,183,255,.52);
  border-radius: 8px;
  background: rgba(103,183,255,.1);
  color: var(--vss-rm-text);
  padding: 7px 10px;
  font-size: .7rem;
  line-height: 1.15;
  font-weight: 700;
  cursor: pointer;
}
.vss-rm-action-button:hover, .vss-rm-action-button:focus-visible {
  border-color: var(--vss-rm-blue);
  background: rgba(103,183,255,.18);
  outline: none;
}
.vss-rm-action-button:disabled { opacity: .55; cursor: wait; }

.vss-rm-main { padding: 24px clamp(18px, 4vw, 50px) 30px; width: 100%; max-width: 1500px; min-width: 0; margin: 0 auto; }
.vss-rm-error { margin-bottom: 18px; padding: 12px 14px; border-radius: 10px; color: var(--vss-rm-red); background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.45); }
.vss-rm-muted { color: var(--vss-rm-muted); font-size: .82rem; }
.vss-rm-panel, .vss-rm-summary-card {
  background: linear-gradient(145deg, rgba(19,38,59,.96), rgba(12,27,43,.96));
  border: 1px solid var(--vss-rm-line);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,.2);
}
.vss-rm-panel { padding: 18px; margin-bottom: 18px; }
.vss-rm-receiver-panel { border-color: rgba(103,183,255,.55); }
.vss-rm-panel-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 15px; }
.vss-rm-receiver-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.vss-rm-receiver-card { background: rgba(7,17,31,.55); border: 1px solid var(--vss-rm-line); border-radius: 13px; padding: 14px; }
.vss-rm-receiver-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.vss-rm-receiver-title strong { font-size: 1rem; }
.vss-rm-state-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid rgba(41,67,94,.55); }
.vss-rm-state-light { width: 18px; height: 18px; border-radius: 50%; background: transparent; border: 2px solid #7f91a3; box-shadow: none; display: inline-block; }
.vss-rm-state-light.cor.active { background: var(--vss-rm-red); border-color: var(--vss-rm-red); box-shadow: 0 0 18px rgba(255,107,107,.8); }
.vss-rm-state-light.vote.active { background: var(--vss-rm-green); border-color: var(--vss-rm-green); box-shadow: 0 0 18px rgba(46,230,138,.8); }
.vss-rm-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.vss-rm-summary-card { padding: 18px; min-height: 124px; display: flex; flex-direction: column; justify-content: center; }
.vss-rm-label { color: var(--vss-rm-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.vss-rm-summary-card strong { margin: 8px 0 6px; font-size: clamp(1.35rem, 2.35vw, 2rem); color: var(--vss-rm-text); }
.vss-rm-footer { display: flex; justify-content: space-between; gap: 20px; padding: 15px clamp(18px, 4vw, 50px); border-top: 1px solid var(--vss-rm-line); color: var(--vss-rm-muted); font-size: .75rem; }

/* Reporting view */
.vss-rm-reports-view { min-width: 0; }
.vss-rm-control-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.vss-rm-control-grid label { display: grid; gap: 5px; color: var(--vss-rm-muted); font-size: .72rem; font-weight: 600; }
.vss-rm-control-grid input, .vss-rm-control-grid select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--vss-rm-line);
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--vss-rm-text);
  background: rgba(7,17,31,.7);
}
.vss-rm-control-grid select option { color: #111; background: #fff; }
.vss-rm-report-range { margin: 12px 0 0 !important; }
.vss-rm-report-summary { margin-bottom: 18px; }
.vss-rm-report-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 18px; }
.vss-rm-report-grid > .vss-rm-panel { min-width: 0; }
.vss-rm-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
.vss-rm-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--vss-rm-text);
  font-size: .74rem;
  background: transparent;
}
.vss-rm-table th, .vss-rm-table td {
  padding: 8px 9px;
  border-bottom: 1px solid rgba(41,67,94,.6);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.vss-rm-table th { color: var(--vss-rm-muted); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; }
.vss-rm-table tbody tr:last-child td { border-bottom: 0; }
.vss-rm-empty { color: var(--vss-rm-muted); text-align: center !important; padding: 18px !important; }

/* Component-width responsiveness: optimized for a dedicated full-width page while remaining safe in embedded containers. */
@container (max-width: 1050px) {
  .vss-rm-site-header {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 16px;
  }
  .vss-rm-summary-grid, .vss-rm-receiver-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .vss-rm-report-grid { grid-template-columns: 1fr; gap: 0; }
}
@container (max-width: 820px) {
  .vss-rm-site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "left center"
      "right right";
    min-height: 0;
    gap: 12px 18px;
    padding: 12px 14px 14px;
  }
  .vss-rm-header-left { grid-template-rows: auto auto; gap: 12px; }
  .vss-rm-monitor-identity, .vss-rm-monitor.vss-rm-has-logo .vss-rm-monitor-identity { margin-left: 0; padding-top: 0; }
  .vss-rm-header-center { align-items: center; justify-content: flex-end; min-width: 0; }
  .vss-rm-header-right { align-items: stretch; gap: 9px; padding-top: 2px; }
  .vss-rm-header-status, .vss-rm-header-device-grid { justify-content: center; }
  .vss-rm-control-grid { grid-template-columns: 1fr 1fr; }
  .vss-rm-control-grid .vss-rm-action-button { grid-column: 1 / -1; justify-self: start; }
  .vss-rm-main { padding: 16px 14px 26px; }
  .vss-rm-footer { flex-direction: column; gap: 5px; padding: 14px; }
}
@container (max-width: 560px) {
  .vss-rm-site-header {
    grid-template-columns: 1fr;
    grid-template-areas: "left" "center" "right";
    gap: 11px;
    padding: 12px;
  }
  .vss-rm-club-logo { width: 36px; height: 36px; }
  .vss-rm-header-brand { gap: 9px; }
  .vss-rm-monitor .vss-rm-site-header h2 { font-size: 1.28rem; }
  .vss-rm-header-center { justify-content: center; }
  .vss-rm-nav-button { min-width: 132px; padding: 8px 14px; font-size: .72rem; }
  .vss-rm-header-status { gap: 6px; }
  .vss-rm-badge { padding: 4px 6px; font-size: .62rem; }
  .vss-rm-header-health-label { font-size: .6rem; gap: 7px; }
  .vss-rm-header-health-label::before, .vss-rm-header-health-label::after { max-width: 54px; }
  .vss-rm-header-device-grid { gap: 6px; }
  .vss-rm-health-chip { flex: 0 1 auto; font-size: .61rem; }
  .vss-rm-summary-grid, .vss-rm-receiver-grid, .vss-rm-control-grid { grid-template-columns: 1fr; }
  .vss-rm-summary-card { min-height: 100px; padding: 13px; border-radius: 13px; }
  .vss-rm-receiver-card { padding: 13px; }
  .vss-rm-panel { padding: 14px; }
}

/* Legacy viewport fallback where container queries are unavailable. */
@media (max-width: 1050px) {
  .vss-rm-summary-grid, .vss-rm-receiver-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .vss-rm-report-grid { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 820px) {
  .vss-rm-site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "left center" "right right";
    min-height: 0;
    gap: 12px 18px;
    padding: 12px 14px 14px;
  }
  .vss-rm-header-left { grid-template-rows: auto auto; gap: 12px; }
  .vss-rm-monitor-identity, .vss-rm-monitor.vss-rm-has-logo .vss-rm-monitor-identity { margin-left: 0; padding-top: 0; }
  .vss-rm-header-center { justify-content: flex-end; min-width: 0; }
  .vss-rm-header-right { align-items: stretch; gap: 9px; padding-top: 2px; }
  .vss-rm-header-status, .vss-rm-header-device-grid { justify-content: center; }
  .vss-rm-control-grid { grid-template-columns: 1fr 1fr; }
  .vss-rm-control-grid .vss-rm-action-button { grid-column: 1 / -1; justify-self: start; }
  .vss-rm-main { padding: 16px 14px 26px; }
  .vss-rm-footer { flex-direction: column; gap: 5px; padding: 14px; }
}
@media (max-width: 560px) {
  .vss-rm-site-header { grid-template-columns: 1fr; grid-template-areas: "left" "center" "right"; gap: 11px; padding: 12px; }
  .vss-rm-club-logo { width: 36px; height: 36px; }
  .vss-rm-monitor .vss-rm-site-header h2 { font-size: 1.28rem; }
  .vss-rm-header-center { justify-content: center; }
  .vss-rm-nav-button { min-width: 132px; padding: 8px 14px; font-size: .72rem; }
  .vss-rm-summary-grid, .vss-rm-receiver-grid, .vss-rm-control-grid { grid-template-columns: 1fr; }
  .vss-rm-summary-card { min-height: 100px; padding: 13px; border-radius: 13px; }
  .vss-rm-receiver-card { padding: 13px; }
}
