.nw-context {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.topbar .nw-context h1,
.topbar #organizationSupportIdTop,
.topbar #currentUser {
  margin: 0;
}

@media (max-width: 980px) {
  .topbar {
    margin-bottom: 8px;
  }

  #appView:has(#tab-analytics:not(.hidden)) .topbar {
    margin-bottom: 2px !important;
  }
}

.topbar-actions {
  position: relative;
}

.nw-context-switch {
  flex: 0 0 auto;
}

#networkContextToggle {
  display: inline-grid !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  place-items: center;
  margin: 0;
  padding: 0 !important;
  border-radius: 12px !important;
  cursor: pointer;
}

#networkContextToggle svg {
  width: 20px !important;
  height: 20px !important;
}

#networkContextToggle[hidden],
#networkContextToggle.hidden {
  display: none !important;
}

.nw-context-switch .nw-context__menu {
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  margin-top: 0;
}

.nw-context__menu {
  position: absolute;
  z-index: 40;
  display: grid;
  gap: 2px;
  min-width: min(320px, calc(100vw - 32px));
  margin-top: 4px;
  padding: 6px;
  border: 1px solid #d5dde8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 32, 48, 0.12);
}

.nw-context__menu[hidden],
.nw-context__menu.hidden {
  display: none !important;
}

.nw-context__item,
.nw-context__label {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.nw-context__label {
  cursor: default;
  color: #6b7788;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nw-context__item.is-active,
.nw-context__item:hover {
  background: #eaf3ff;
}

#appView.is-network-context .workspace > .tab-panel {
  display: none !important;
}

#networkWorkspace.nw-workspace {
  display: none;
  padding: 0 0 32px;
}

#appView.is-network-context #networkWorkspace.nw-workspace {
  display: grid;
  gap: 16px;
}

.nw-kpis,
.nw-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 761px) {
  .nw-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.nw-kpi,
.nw-card {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  background: #fff;
}

.nw-kpi span,
.nw-muted {
  color: #6b7788;
  font-size: 13px;
}

.nw-kpi b,
.nw-int {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  font-weight: 650;
  white-space: nowrap;
}

.nw-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.nw-toolbar label {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 13px;
}

.nw-table-wrap {
  overflow: auto;
}

.nw-table {
  width: 100%;
  border-collapse: collapse;
}

.nw-table th,
.nw-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #eef1f5;
  text-align: left;
  white-space: nowrap;
}

.nw-table th {
  color: #6b7788;
  font-size: 12px;
  font-weight: 600;
}

.nw-empty {
  margin: 0;
  color: #6b7788;
}
