.service-status-panel {
  display: none;
  margin-bottom: 8px;
}

.service-status-panel.visible {
  display: block;
}

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

.service-status-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #f8fbff;
  font-size: 14px;
}

.service-status-head h2 .h2-ico {
  width: 14px;
  height: 14px;
}

.service-status-muted {
  margin: 0;
  color: #9bb0d5;
  font-size: 10px;
  line-height: 1.2;
}

.service-status-legend-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9bb0d5;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.service-status-legend-inline span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-weight: 800;
}

.service-status-legend-inline i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex: 0 0 7px;
}

.service-status-legend-inline .ok { color: #22c55e; }
.service-status-legend-inline .light { color: #a3e635; }
.service-status-legend-inline .slow { color: #fbbf24; }
.service-status-legend-inline .error { color: #fb3b5f; }
.service-status-legend-inline .ok i { background: #22c55e; }
.service-status-legend-inline .light i { background: #a3e635; }
.service-status-legend-inline .slow i { background: #fbbf24; }
.service-status-legend-inline .error i { background: #fb3b5f; }

.service-status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.service-status-refresh {
  min-height: 28px;
  border: 1px solid rgba(155, 183, 255, .18);
  border-radius: 10px;
  background: rgba(8, 18, 36, .7);
  color: #f8fbff;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
}

.service-status-row {
  display: grid;
  grid-template-columns: minmax(108px, 150px) minmax(0, 1fr) 150px;
  align-items: center;
  gap: 6px;
}

.service-status-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #f8fbff;
  font-weight: 800;
  font-size: 13px;
}

.service-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(155, 183, 255, .28);
  box-shadow: 0 0 0 4px rgba(155, 183, 255, .1);
  flex: 0 0 7px;
}

.service-status-dot.ok {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .12);
}

.service-status-dot.light {
  background: #a3e635;
  box-shadow: 0 0 0 4px rgba(163, 230, 53, .12);
}

.service-status-dot.slow {
  background: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, .12);
}

.service-status-dot.error {
  background: #fb3b5f;
  box-shadow: 0 0 0 4px rgba(251, 59, 95, .12);
}

.service-status-track {
  min-width: 0;
}

.service-status-labels {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 4px;
  color: #9bb0d5;
  font-size: 8px;
  line-height: 1;
  text-align: center;
}

.service-status-labels span {
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.service-status-line {
  height: 22px;
  border: 1px solid rgba(155, 183, 255, .14);
  border-radius: 9px;
  background: rgba(6, 12, 24, .74);
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  align-items: center;
  gap: 5px;
  padding: 0 10px;
}

.service-status-tick {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(155, 183, 255, .28);
}

.service-status-tick.ok { background: #22c55e; }
.service-status-tick.light { background: #a3e635; }
.service-status-tick.soft { background: #a3e635; }
.service-status-tick.slow { background: #fbbf24; }
.service-status-tick.error { background: #fb3b5f; }
.service-status-tick.quiet { background: rgba(155, 183, 255, .28); }

.service-status-score {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  text-align: center;
  white-space: nowrap;
}

.service-status-score strong {
  display: block;
  color: #9bb0d5;
  font-size: 11px;
  line-height: 1.1;
}

.service-status-score.ok strong { color: #22c55e; }
.service-status-score.light strong { color: #a3e635; }
.service-status-score.slow strong { color: #fbbf24; }
.service-status-score.error strong { color: #fb3b5f; }

.service-status-score small {
  display: block;
  color: #9bb0d5;
  font-size: 8px;
  margin-top: 1px;
}

.service-status-errors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.service-status-errors span {
  border: 1px solid rgba(251, 59, 95, .22);
  border-radius: 999px;
  background: rgba(251, 59, 95, .10);
  color: #ffc2cf;
  padding: 2px 7px;
  font-size: 10px;
}

.service-status-tip {
  position: fixed;
  z-index: 60;
  width: 160px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 22, 40, .98);
  border: 1px solid rgba(155, 183, 255, .18);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .35);
  color: #f8fbff;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%);
}

.service-status-tip.visible {
  opacity: 1;
}

.service-status-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: rgba(15, 22, 40, .98);
  border-right: 1px solid rgba(155, 183, 255, .18);
  border-bottom: 1px solid rgba(155, 183, 255, .18);
  transform: translateX(-50%) rotate(45deg);
}

.service-status-tip strong {
  display: block;
  font-size: 14px;
  margin-bottom: 7px;
}

.service-status-tip span {
  display: block;
  color: #dbe7ff;
  font-size: 11px;
  line-height: 1.45;
}

.service-status-empty {
  border: 1px dashed rgba(155, 183, 255, .18);
  border-radius: 14px;
  color: #9bb0d5;
  padding: 12px;
  text-align: center;
}

@media (max-width: 980px) {
  .service-status-summary {
    grid-template-columns: 1fr;
  }

  .service-status-actions {
    justify-content: flex-start;
  }
}

.key-period-usage {
  display: inline-grid;
  grid-template-columns: auto auto;
  column-gap: 5px;
  row-gap: 1px;
  align-items: baseline;
  min-width: 58px;
  font-size: 11px;
  line-height: 1.05;
  white-space: nowrap;
}

.key-period-usage span {
  color: #7f8da3;
  font-size: 10px;
  font-weight: 700;
}

.key-period-usage strong {
  color: #e8eef8;
  font-size: 11px;
  font-weight: 700;
}

.key-period-usage-cost {
  min-width: 100px;
}

.key-period-usage-cost strong {
  font-size: 10.5px;
}

table td .key-period-usage {
  margin: -2px 0;
}

.usage-sort-head {
  white-space: nowrap;
}

.usage-sort-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  margin-left: 4px;
  border: 1px solid rgba(127, 141, 163, .28);
  border-radius: 4px;
  color: #8fa0b8;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.usage-sort-chip.active {
  border-color: rgba(34, 211, 238, .58);
  color: #dffaff;
  background: rgba(34, 211, 238, .1);
}
