:root {
  color-scheme: light;
  font-family:
    "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  background: #f4f6f8;
  color: #18212f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button {
  border: 1px solid #cad3df;
  background: #ffffff;
  border-radius: 6px;
  color: #18212f;
  cursor: pointer;
  font: inherit;
  height: 36px;
  padding: 0 14px;
}

button:hover {
  border-color: #2970ff;
}

.shell {
  min-height: 100vh;
  padding: 24px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: 0 auto 18px;
  max-width: 1280px;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 8px;
}

p {
  color: #637083;
  margin: 0;
}

.connection {
  align-items: center;
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

.dot {
  background: #a8b3c2;
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.dot.online {
  background: #16a34a;
}

.dot.error {
  background: #dc2626;
}

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

.metrics article {
  background: #ffffff;
  border: 1px solid #dde4ee;
  border-radius: 8px;
  padding: 16px;
}

.metrics span {
  color: #637083;
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

.metrics strong {
  font-size: 24px;
}

.workspace {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1280px;
}

.chartPanel,
.tablePanel {
  background: #ffffff;
  border: 1px solid #dde4ee;
  border-radius: 8px;
  overflow: hidden;
}

.chartPanel {
  padding: 18px;
}

canvas {
  display: block;
  height: auto;
  width: 100%;
}

table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e8edf3;
  font-size: 14px;
  padding: 11px 12px;
  text-align: right;
}

th {
  background: #f8fafc;
  color: #526071;
  font-weight: 600;
}

th:first-child,
td:first-child,
th:last-child,
td:last-child {
  text-align: left;
}

@media (max-width: 820px) {
  .shell {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .connection {
    flex-wrap: wrap;
  }

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

  th,
  td {
    font-size: 12px;
    padding: 9px 8px;
  }
}

