:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6f8;
  color: #17202a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.shell {
  min-height: 100vh;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0;
  font-size: 28px;
}

.page-head p {
  margin: 6px 0 0;
  color: #526170;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.device-grid.is-empty {
  display: block;
  padding: 28px;
  border: 1px dashed #c8d1dc;
  border-radius: 8px;
  background: #ffffff;
  color: #526170;
}

.panel {
  padding: 24px;
  border: 1px solid #d7dee6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(28, 39, 49, 0.12);
}

.topline,
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topline {
  margin-bottom: 24px;
  font-size: 15px;
  color: #526170;
}

.device-id {
  font-weight: 700;
  color: #17202a;
}

.pill {
  min-width: 74px;
  padding: 6px 10px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.online {
  background: #dbf7e6;
  color: #126c36;
}

.offline {
  background: #fde4e4;
  color: #9d1d20;
}

.relay-button {
  width: 100%;
  aspect-ratio: 1 / 0.72;
  border: 0;
  border-radius: 8px;
  background: #1f6feb;
  color: #ffffff;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.relay-button:active {
  transform: scale(0.98);
}

.relay-button.is-on {
  background: #188038;
}

.relay-button.is-busy {
  background: #7b8794;
  cursor: wait;
}

.status-row {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #edf0f3;
  color: #526170;
}

.status-row strong {
  color: #17202a;
}
