:root {
  font-family: Inter,"Noto Sans SC","Microsoft YaHei",system-ui,sans-serif;
  color: #172521;
  background: #f4f7f5;
  line-height: 1.5;
  font-size: 16px;
  --ink: #172521;
  --muted: #5b6e66;
  --line: #e1e9e4;
  --green: #187a57;
  --mint: #e5f6ed;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

button,summary,a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg:not(.svg-defs) {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

h1,h2,p {
  margin: 0;
}

button:focus-visible,a:focus-visible,summary:focus-visible {
  outline: 2px solid #258a65;
  outline-offset: 3px;
}

button[disabled] {
  cursor: not-allowed;
}

[hidden] {
  display: none!important;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 226px;
  background: #fbfdfb;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.identity {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 26px 21px 27px;
}

.identity strong {
  font-size: 1rem;
  letter-spacing: .01em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #184b3c;
  color: #b8f0d3;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.navigation {
  padding: 0 12px;
  display: grid;
  gap: 5px;
}

.navigation a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: .9375rem;
  color: #4c6459;
  font-weight: 600;
}

.navigation a:hover {
  background: #eff5f1;
}

.navigation a.selected {
  background: #e7f2ea;
  color: #205d47;
}

.side-footer {
  margin: auto 17px 18px;
  border-top: 1px solid var(--line);
  padding: 16px 4px 4px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
}

.side-footer>span {
  display: flex;
  justify-content: space-between;
  flex: 1;
  gap: 8px;
}

.main {
  margin-left: 226px;
  min-height: 100vh;
}

.content {
  max-width: 1510px;
  margin: 0 auto;
  padding: 34px 34px 54px;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 21px;
}

.page-heading h1 {
  font-size: clamp(1.65rem,3vw,2rem);
  font-weight: 720;
  letter-spacing: -.04em;
}

.page-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  border: 1px solid #d6e3db;
  background: #fff;
  color: #28453a;
  padding: 8px 13px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9375rem;
  font-weight: 650;
  min-height: 40px;
}

.button:not([disabled]):hover {
  background: #edf6ef;
}

.button svg {
  width: 17px;
  height: 17px;
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  width: min(100%, 410px);
  padding: clamp(22px, 6vw, 34px);
}

.auth-device {
  color: var(--green);
  font-weight: 700;
}

.auth-card h1 {
  margin-top: 6px;
  font-size: 1.55rem;
  letter-spacing: -.02em;
}

.auth-description,
.auth-message {
  margin-top: 10px;
  color: var(--muted);
}

.auth-description:empty,
.auth-message:empty {
  display: none;
}

.auth-form {
  display: grid;
  gap: 7px;
  margin-top: 20px;
}

.auth-form label {
  font-weight: 600;
}

.auth-form input:not([type=hidden]) {
  width: 100%;
  min-height: 44px;
  margin-bottom: 7px;
  padding: 8px 10px;
  border: 1px solid #ccdcd2;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.auth-form input:focus-visible {
  outline: 2px solid #258a65;
  outline-offset: 1px;
}

.auth-submit {
  margin-top: 3px;
  min-height: 44px;
  background: #185140;
  color: #fff;
  border-color: #185140;
  font-size: 1rem;
}

.auth-submit:not([disabled]):hover {
  background: #21654e;
}

.test-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 9px;
  margin-top: 13px;
}

.test-controls label {
  grid-column: 1 / -1;
  color: var(--muted);
}

.test-controls select {
  min-width: 0;
  min-height: 40px;
  appearance: none;
  padding: 7px 30px 7px 9px;
  background: linear-gradient(45deg, transparent 50%, #48685a 50%) right 14px center / 5px 5px no-repeat,
    linear-gradient(135deg, #48685a 50%, transparent 50%) right 9px center / 5px 5px no-repeat, #fff;
  color: var(--ink);
  border: 1px solid #d6e3db;
  border-radius: 8px;
  font: inherit;
}

.test-status {
  margin-top: 9px;
  color: var(--muted);
  font-size: .9375rem;
}

.test-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.test-results dt {
  font-size: .875rem;
  color: var(--muted);
}

.test-results dd {
  margin: 2px 0 0;
  font-weight: 680;
}

.test-results dd small {
  margin-left: 4px;
  color: var(--muted);
  font-size: .875rem;
}

.hero {
  min-height: 152px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 89% 12%,#255848 0%,transparent 57%),#143c32;
  color: #effff5;
  border-radius: 14px;
  padding: 25px 29px;
  margin-bottom: 19px;
}

.hero-data {
  z-index: 1;
  min-width: 0;
}

.hero-label {
  color: #a8c9bb;
  font-size: .9375rem;
}

.hero-network {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 6px 0 5px;
}

.hero-network h2 {
  font-size: 1.4375rem;
  font-weight: 650;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border-radius: 20px;
  font-size: .875rem;
  background: #33564a;
  color: #d1e7dd;
  white-space: nowrap;
}

.badge i,.chart-footer i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.badge[data-tone=online] {
  color: #aaf1c7;
  background: #286047;
}

.badge[data-tone=warning] {
  color: #ffdb9b;
  background: #624f37;
}

.badge[data-tone=offline] {
  color: #ffd1cb;
  background: #6c4642;
}

.hero p {
  color: #c2dcd2;
  font-size: .9375rem;
}

.hero-meta {
  min-width: 178px;
  margin: 0;
  padding-left: 23px;
  border-left: 1px solid #456b5e;
  display: grid;
  gap: 12px;
  font-size: .9375rem;
}

.hero-meta dt {
  color: #b4d4c7;
}

.hero-meta dd {
  margin: 2px 0 0;
  color: #f4fff8;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 13px;
  margin-bottom: 17px;
}

.metric,.card {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.metric {
  padding: 14px 15px 13px;
}

.metric-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.metric-head h2 {
  font-size: 1rem;
  font-weight: 650;
  color: #375045;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex: none;
}

.metric-icon svg {
  width: 17px;
  height: 17px;
}

.mint {
  background: #e4f5eb;
  color: #27855f;
}

.blue {
  background: #e6f0fa;
  color: #226d9d;
}

.lavender {
  background: #f1edfb;
  color: #6f52a4;
}

.amber {
  background: #fff3dd;
  color: #9c661e;
}

.number {
  font-size: clamp(1.3rem,2.1vw,1.65rem);
  font-weight: 720;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  min-height: 1.75rem;
  margin: 8px 0 2px;
  overflow-wrap: anywhere;
}

.number small {
  margin-left: 4px;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
}

.hint {
  color: var(--muted);
  font-size: .875rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0,1.9fr) minmax(260px,1fr);
  gap: 16px;
  align-items: start;
}

.stack {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.card {
  padding: 19px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.card-header h2,.power-card h2 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.card-header p,.power-card>p:not(.hint) {
  margin-top: 3px;
  color: var(--muted);
  font-size: .9375rem;
}

.range {
  display: flex;
  align-items: center;
  border: 1px solid #e1eae3;
  background: #f5f8f6;
  border-radius: 8px;
  padding: 3px;
  flex: none;
}

.range button {
  background: none;
  border: 0;
  color: #566d62;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: .875rem;
  white-space: nowrap;
  cursor: pointer;
}

.range button[aria-pressed=true] {
  background: #fff;
  box-shadow: 0 1px 3px #153e2b22;
  color: #1e644b;
  font-weight: 700;
}

.plot {
  height: 228px;
  margin: 13px 0 0;
  position: relative;
}

.plot canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #5b7266;
  font-size: .9375rem;
  pointer-events: none;
}

.chart-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: .875rem;
  margin-top: 7px;
}

.chart-footer i {
  color: #268967;
  margin-right: 6px;
}

.networks {
  margin-top: 13px;
}

.network-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #ecf0ed;
  padding: 11px 0;
}

.network-row:last-child {
  border: 0;
}

.network-row>span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.network-row strong,.network-row small {
  display: block;
}

.network-row strong {
  font-size: .9375rem;
  font-weight: 680;
  overflow-wrap: anywhere;
}

.network-row small {
  color: var(--muted);
  font-size: .875rem;
  margin-top: 1px;
}

.network-icon {
  background: #eef4f1;
  color: #477363;
  width: 33px;
  height: 33px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: none;
}

.network-icon svg {
  width: 17px;
  height: 17px;
}

.network-state {
  margin-left: auto;
  white-space: nowrap;
  font-size: .875rem;
  color: #60756b;
  background: #eef3f0;
  border-radius: 20px;
  padding: 4px 8px;
}

.network-state.active {
  color: #256a4f;
  background: #e3f4e9;
}

.network-button {
  padding-inline: 10px;
}

.action-status {
  margin: 4px 0 7px;
  color: var(--muted);
  font-size: .9375rem;
}

.action-status:empty {
  display: none;
}

.commands {
  border-top: 1px solid #ecf0ed;
  padding-top: 8px;
  margin-top: 3px;
}

.commands summary {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: .9375rem;
  font-weight: 650;
  color: #2a6750;
  padding: 5px 0;
  list-style: none;
}

.commands summary::-webkit-details-marker {
  display: none;
}

.commands summary::after {
  content: "+";
  margin-left: auto;
  color: #717f77;
}

.commands[open] summary::after {
  content: "−";
}

.commands summary svg {
  width: 17px;
  height: 17px;
}

.command-list {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}

.command-list>div {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f4f7f5;
  border-radius: 7px;
  padding: 6px 7px;
}

.command-list code {
  font-size: .875rem;
  overflow-wrap: anywhere;
  flex: 1;
}

.icon-button {
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: #3d6353;
  padding: 6px;
  cursor: pointer;
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.commands .hint:not(:empty) {
  margin-top: 6px;
}

.power-card .wake-button {
  width: 100%;
  background: #edf2ef;
  color: #5b7166;
  border-color: #e3eae5;
  margin: 13px 0 5px;
}

.power-card .wake-button:not([disabled]) {
  border-color: #185140;
  background: #185140;
  color: #fff;
}

.power-card .wake-button:not([disabled]):hover {
  background: #21654e;
}

.power-card .hint {
  text-align: center;
}

.event-list {
  list-style: none;
  padding: 0;
  margin: 13px 0 0;
}

.event-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid #ecf1ed;
  font-size: .9375rem;
}

.event-list .empty {
  display: block;
  color: var(--muted);
  padding: 13px 0 3px;
}

.event-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #348967;
}

.event-indicator.warning {
  background: #b36c37;
}

.event-list time {
  font-size: .875rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (max-width:1100px) {
  .sidebar {
    width: 186px;
  }
  .main {
    margin-left: 186px;
  }
  .content {
    padding-left: 23px;
    padding-right: 23px;
  }
  .layout {
    grid-template-columns: minmax(0,1.6fr) minmax(235px,1fr);
  }
  .card {
    padding: 15px;
  }
  .chart-header {
    flex-wrap: wrap;
  }
}

@media (max-width:840px) {
  .sidebar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .identity {
    padding: 14px 18px 8px;
  }
  .navigation {
    display: flex;
    gap: 5px;
    padding: 0 11px 9px;
    overflow: auto;
    white-space: nowrap;
  }
  .navigation a {
    padding: 7px 8px;
    gap: 5px;
  }
  .side-footer,.main {
    margin-left: 0;
  }
  .content {
    padding: 20px 17px 32px;
  }
  .layout {
    grid-template-columns: minmax(0,1.6fr) minmax(210px,1fr);
  }
  .hero {
    padding: 22px;
    min-height: 140px;
  }
  .chart-header {
    align-items: flex-start;
  }
}

@media (max-width:610px) {
  .metrics {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 9px;
  }
  .layout {
    grid-template-columns: minmax(0,1fr);
  }
  .metrics .metric {
    padding: 11px;
  }
  .plot {
    height: 200px;
  }
  .hero {
    margin-bottom: 13px;
    align-items: flex-start;
    flex-direction: column;
  }
  .hero-meta {
    width: 100%;
    grid-template-columns: repeat(2,minmax(0,1fr));
    border-left: 0;
    border-top: 1px solid #456b5e;
    padding: 10px 0 0;
  }
  .content {
    padding-left: 13px;
    padding-right: 13px;
  }
  .event-list li {
    grid-template-columns: auto 1fr;
  }
  .event-list time {
    grid-column: 2;
  }
}
