.qosControls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.qosControls select {
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid #cfd8f4;
  border-radius: 10px;
  background: #fff;
  color: #243767;
  font-weight: 700;
}

.qosControls input {
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid #cfd8f4;
  border-radius: 10px;
  background: #fff;
  color: #243767;
  font-weight: 700;
}

.qosThresholdNote {
  margin: 4px 0 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #7a5d00;
}

.qosSummaryGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.qosMetricCard {
  text-align: center;
}

.qosMetricLabel {
  font-size: 0.82rem;
  font-weight: 800;
  color: #7c5a00;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.qosMetricValue {
  font-size: 1.45rem;
  font-weight: 900;
  color: #20376e;
  margin-top: 3px;
}

.qosMetricSub {
  margin-top: 4px;
  color: #5c6b8a;
  font-size: 0.82rem;
  font-weight: 700;
}

.qosCard {
  margin-top: 10px;
}

.qosHistogram {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.qosHistogramRow {
  display: grid;
  grid-template-columns: 90px 1fr 50px;
  gap: 10px;
  align-items: center;
}

.qosHistogramLabel {
  font-size: 0.86rem;
  font-weight: 800;
  color: #20376e;
}

.qosHistogramTrack {
  height: 14px;
  border-radius: 999px;
  background: #e7ecfb;
  border: 1px solid #d6def6;
  overflow: hidden;
}

.qosHistogramFill {
  height: 100%;
  min-width: 4px;
  background: linear-gradient(90deg, #2f2d83 0%, #7810a4 100%);
  border-radius: 999px;
}

.qosHistogramCount {
  text-align: right;
  font-weight: 800;
  color: #20376e;
}

.qosInsightsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.qosInsightCard strong {
  display: block;
  margin-bottom: 8px;
}

.qosInsightList {
  display: grid;
  gap: 8px;
}

.qosInsightRow {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid #e9edf8;
}

.qosInsightRow:last-child {
  border-bottom: none;
}

.qosInsightRow strong {
  color: #20376e;
}

.qosInsightRow span {
  color: #7c5a00;
  font-weight: 800;
  white-space: nowrap;
}

.qosInsightEmpty {
  color: #7c5a00;
  font-size: 0.82rem;
  font-weight: 800;
  margin-left: 8px;
  white-space: nowrap;
}

.qosTable {
  min-width: 1200px;
}

.qosQuestionBtn {
  border: 0;
  background: transparent;
  color: #20376e;
  font: inherit;
  font-weight: 800;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.qosQuestionBtn:hover {
  text-decoration: underline;
}

.qosChoiceBtn {
  white-space: nowrap;
}

.qosQuestionModalShell {
  width: min(1200px, calc(100vw - 24px));
  max-width: 1200px;
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
}

#qosDashboardPage .qosDashboardShell {
  padding-top: 0;
}

#qosDashboardPage .qosDashboardShell > #adminQosPanel {
  width: 100%;
  margin-top: 0;
}

#qosDashboardPage .adminHeader {
  margin-bottom: 10px;
}

.adminSplitPageShell {
  width: min(1500px, calc(100vw - 28px));
  margin: 0 auto 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adminSplitPageShell > * {
  width: 100%;
}

.qosDashboardEventsCard {
  margin-top: 16px;
}

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

.qosEventsTable td,
.qosEventsTable th {
  vertical-align: top;
}

.qosEventsTable td:nth-child(1),
.qosEventsTable td:nth-child(2),
.qosEventsTable td:nth-child(3),
.qosEventsTable td:nth-child(4),
.qosEventsTable td:nth-child(6),
.qosEventsTable td:nth-child(7),
.qosEventsTable td:nth-child(8),
.qosEventsTable td:nth-child(9) {
  white-space: nowrap;
}

.qosQuestionDetail {
  padding: 18px 20px 20px;
  overflow: auto;
  max-height: calc(100vh - 120px);
}

.qosQuestionMeta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 12px;
  margin-top: 12px;
  font-weight: 700;
  color: #20376e;
}

.qosQuestionMeta strong {
  color: #7c5a00;
}

.qosQuestionDetail .reportDetailCard + .reportDetailCard {
  margin-top: 12px;
}

@media (max-width: 780px) {
  .qosControls select,
  .qosControls input {
    min-width: 0;
    width: 100%;
  }

  .qosHistogramRow {
    grid-template-columns: 76px 1fr 42px;
  }
}
