#alarm-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  overflow: auto;
  pointer-events: none;
}
#alarm-layer.show { display: flex; }
.alarm-box {
  pointer-events: auto;
  width: min(520px, calc(100vw - 32px));
  flex: none;
  background: linear-gradient(180deg, rgba(10, 48, 96, .96), rgba(4, 18, 42, .96));
  border: 1px solid rgba(62, 198, 255, .45);
  box-shadow: 0 0 28px rgba(255, 107, 129, .16), inset 0 0 28px rgba(30, 120, 200, .16);
  padding: 16px 18px 14px;
  color: #e7f4ff;
  animation: alarm-in .28s ease;
}
.alarm-box:before {
  content: "";
  display: block;
  height: 2px;
  margin: -16px -18px 12px;
  background: linear-gradient(90deg, transparent, #ff6b81, #f0c36a, #ff6b81, transparent);
}
@keyframes alarm-in {
  from { transform: translateY(12px) scale(.96); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.alarm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.alarm-head h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 2px;
  color: #ff6b81;
  text-shadow: 0 0 12px rgba(255, 107, 129, .45);
}
.alarm-head button {
  border: 0;
  background: transparent;
  color: #8eb4d4;
  font-size: 20px;
  cursor: pointer;
}
.alarm-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 7px 10px;
  font-size: 13px;
}
.alarm-grid span { color: #8eb4d4; }
.alarm-grid b { color: #e7f4ff; font-weight: 600; word-break: break-all; }
.alarm-grid b.bad { color: #ff6b81; }
.alarm-actions {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.alarm-actions em {
  font-style: normal;
  color: #8eb4d4;
  font-size: 12px;
}
.alarm-actions button {
  min-width: 96px;
  height: 32px;
  border: 1px solid #3ec6ff;
  background: rgba(62, 198, 255, .16);
  color: #e7f4ff;
  cursor: pointer;
  letter-spacing: 1px;
}
.alarm-actions button:hover { background: rgba(62, 198, 255, .28); }
#ws-badge {
  position: absolute;
  right: 12px;
  top: 8px;
  z-index: 8;
  font-size: 12px;
  color: #8eb4d4;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
#ws-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6b81;
  box-shadow: 0 0 6px #ff6b81;
}
#ws-badge.on i {
  background: #3ddeb4;
  box-shadow: 0 0 6px #3ddeb4;
}
