:root {
  color-scheme: light;
  --ink: #14213a;
  --muted: #53637b;
  --line: #dce3ed;
  --canvas: #f4f7fb;
  --blue: #2455dc;
  --nav: #0c1b37;
  font: 1rem/1.5 Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body, p, h1, h2, h3, dl, dd { margin: 0; }
.container { width: min(calc(100% - 2 * clamp(14px, 4vw, 44px)), 1136px); margin-inline: auto; }
.topbar { background: var(--nav); color: #fff; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: .02em; }
.brand-mark {
  display: inline-block;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border: 1px solid #81adff;
  border-radius: 5px;
  background: linear-gradient(90deg, transparent 36%, #81adff 36% 41%, transparent 41%),
    linear-gradient(transparent 34%, #81adff 34% 39%, transparent 39%);
}
.preview { color: #cfddff; font-size: .875rem; white-space: nowrap; }
main { padding-block: clamp(24px, 4.5vw, 56px); }
.heading { margin-bottom: 24px; }
h1 { font-size: clamp(1.7rem, 3.3vw, 2.32rem); line-height: 1.2; letter-spacing: -.045em; }
.heading p { margin-top: 7px; color: var(--muted); }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.8vw, 16px); margin-bottom: 18px; }
.metric, .panel { border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.metric { min-width: 0; padding: clamp(9px, 2.1vw, 20px); }
.metric dt { font-size: .875rem; font-weight: 600; }
.metric dd { margin-top: 3px; font-size: clamp(1.48rem, 3.6vw, 2.9rem); line-height: 1.15; font-weight: 680; font-variant-numeric: tabular-nums; }
.metric dd span { color: var(--muted); font-size: .66em; font-weight: 550; white-space: nowrap; }
.primary { border-color: var(--blue); color: #fff; background: linear-gradient(120deg, #2455dc, #1743be); }
.primary dd span { color: #e1eaff; }

.overview { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(220px, 1fr); gap: 16px; align-items: start; }
.panel { min-width: 0; overflow: hidden; }
.panel-heading { padding: 15px clamp(12px, 2vw, 20px); }
h2 { font-size: 1.1rem; font-weight: 670; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
thead { background: #f7f9fc; color: var(--muted); }
th, td { padding: 12px clamp(8px, 2vw, 20px); border-top: 1px solid var(--line); }
tbody th { font-weight: 600; overflow-wrap: anywhere; }
.state { display: inline-flex; align-items: center; gap: .4em; color: var(--muted); white-space: nowrap; }
.state::before { content: ""; width: .48em; height: .48em; border-radius: 50%; background: #76869c; flex: none; }
.online { color: #176148; }
.online::before { background: #1c805d; }
.readonly { color: #244ba4; }
.readonly::before { background: #3f69cf; }

.devices { list-style: none; margin: 0; padding: 0; }
.devices li { border-top: 1px solid var(--line); padding: 13px clamp(12px, 2vw, 20px) 15px; }
.device-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
h3 { font-size: 1rem; font-weight: 650; }
.devices dl { display: grid; gap: 6px; margin-top: 8px; font-size: .875rem; }
.devices dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.devices dt { color: var(--muted); }
.devices dd { font-variant-numeric: tabular-nums; }

@media (max-width: 740px) {
  .overview { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 360px) {
  .brand { font-size: .89rem; }
  .preview { font-size: .8rem; }
  .metric dt { font-size: .79rem; }
}
