:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17202a;
  background: #f4f6f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f172a, #14532d 58%, #f59e0b);
  color: white;
}

.topbar p,
.panel-title p {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 800;
  opacity: 0.78;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
}

h2 {
  font-size: 24px;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  filter: brightness(0.96);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.status-grid article,
.panel,
.control-row {
  border: 1px solid #dbe2ea;
  background: white;
  border-radius: 8px;
}

.status-grid article {
  padding: 18px;
}

.status-grid span,
label {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.status-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.control-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin-bottom: 18px;
}

input {
  display: block;
  width: min(420px, 80vw);
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

#message {
  margin: 0;
  color: #334155;
  font-weight: 700;
}

.panel {
  margin-top: 18px;
  overflow: hidden;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.panel-title span {
  color: #64748b;
  font-weight: 700;
}

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

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  vertical-align: top;
}

th {
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td strong {
  display: block;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.good {
  background: #dcfce7;
  color: #166534;
}

.pill.bad {
  background: #fee2e2;
  color: #991b1b;
}

.events {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.event {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.event strong {
  display: block;
}

.event span {
  display: block;
  margin-top: 6px;
  color: #64748b;
}

@media (max-width: 840px) {
  .topbar,
  .control-row,
  .panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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