:root {
  color: #1c2430;
  background: #eef1f4;
  font-family: "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 15px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
button, a.btn {
  border: 0;
  border-radius: 8px;
  background: #2f6bff;
  color: white;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:disabled { opacity: 0.55; cursor: default; }
button.ghost, a.btn.ghost { background: white; color: #1c2430; border: 1px solid #d5dbe3; }
button.danger { background: #fff; color: #b42318; border: 1px solid #f0c7c3; }

.top {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 20px;
  background: white;
  border-bottom: 1px solid #e4e8ee;
}
.brand { font-weight: 650; letter-spacing: 0.04em; }
.host { color: #5c6b7a; font-size: 13px; flex: 1; }
.host b { color: #1c2430; font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 99px; margin-right: 6px; background: #c4ccd6; }
.dot.on { background: #12b76a; }
.dot.off { background: #f04438; }

.gate {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
  padding: 24px;
}
.gate form, dialog form {
  width: min(420px, 100%);
  background: white;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 40px rgba(28, 36, 48, 0.06);
}
h1, h2, h3 { margin: 0 0 8px; font-weight: 650; }
.gate p, .hint { color: #5c6b7a; line-height: 1.5; }
label { display: block; margin: 14px 0; color: #3d4b5c; font-size: 13px; }
input, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d5dbe3;
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
}
.err { color: #b42318; min-height: 1.2em; }
.row { display: flex; justify-content: flex-end; gap: 8px; }

.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 56px);
}
aside {
  background: white;
  border-right: 1px solid #e4e8ee;
  padding: 16px;
}
.aside-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
ul { list-style: none; margin: 0; padding: 0; }
li {
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 6px;
  cursor: pointer;
}
li.on { background: #f3f6ff; border-color: #d9e2ff; }
li strong { display: block; }
li span { color: #5c6b7a; font-size: 12px; }

.stage { padding: 28px; }
.card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 760px;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
pre {
  background: #f6f8fb;
  border-radius: 10px;
  padding: 12px 14px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.5;
}
.muted { color: #5c6b7a; }
dialog { border: 0; padding: 0; background: transparent; }
dialog::backdrop { background: rgba(20, 28, 38, 0.35); }

@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  aside { border-right: 0; border-bottom: 1px solid #e4e8ee; }
}
