/* HART 指令库管理后台：紧凑、深色、无紫色 */
* { box-sizing: border-box; }
body {
  margin: 0; padding: 0 4px 40px;
  background: #141414; color: #e6e6e6;
  font: 12px/1.45 Consolas, "Microsoft YaHei", monospace;
}
.bar {
  position: sticky; top: 0; z-index: 9;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 3px 4px; background: #0d0d0d; border-bottom: 1px solid #2a2a2a;
}
.ttl { font-weight: 700; color: #f0f0f0; margin-right: 6px; }
.sp { flex: 1; }
input, select, button, textarea {
  font: inherit; color: #e6e6e6; background: #1e1e1e;
  border: 1px solid #333; border-radius: 2px; padding: 2px 4px;
}
input:focus, select:focus, textarea:focus { outline: 1px solid #1a73e8; }
button { cursor: pointer; background: #242424; }
button:hover { background: #2f2f2f; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.pri { background: #1a73e8; border-color: #1a73e8; color: #fff; }
button.warn { background: #7a2b2b; border-color: #7a2b2b; color: #fff; }
.dim { color: #8a8a8a; }
.link { color: #58a6ff; text-decoration: none; margin-left: 4px; }
.msg { padding: 2px 6px; min-height: 18px; color: #9ad0a0; }
.msg.err { color: #ff8a8a; }
main { display: flex; gap: 4px; align-items: stretch; }
.pane { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 3px; padding: 4px; margin-top: 4px; }
.pane.cmds { width: 300px; flex: none; }
.pane.edit { flex: 1; min-width: 0; }
h3 { margin: 0 0 4px; font-size: 12px; color: #cfcfcf; font-weight: 700; }
#cmdList { list-style: none; margin: 0; padding: 0; max-height: 62vh; overflow: auto; }
#cmdList li {
  padding: 1px 4px; cursor: pointer; border-bottom: 1px solid #232323;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#cmdList li:hover { background: #232323; }
#cmdList li.on { background: #1f3350; }
#cmdList li b { color: #ffcc66; }
.form { display: grid; grid-template-columns: 64px 1fr 64px 1fr; gap: 3px 4px; align-items: center; }
.form label { color: #9a9a9a; }
.hidden { display: none; }
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid #2c2c2c; padding: 1px 3px; text-align: left; }
th { background: #232323; color: #bdbdbd; font-weight: 400; }
td input { width: 100%; border: 1px solid transparent; background: transparent; }
td input:focus { border-color: #1a73e8; background: #1e1e1e; }
.num { width: 48px; }
.row-bar { display: flex; gap: 4px; margin-top: 4px; }
.hex { word-break: break-all; letter-spacing: .5px; }
.diff { background: #5a2d2d; color: #ffb3b3; }
.cmp { display: flex; gap: 4px; margin-top: 4px; }
.cmp pre { flex: 1; margin: 0; padding: 4px; background: #101010; border: 1px solid #262626; max-height: 200px; overflow: auto; }
#toTop, #toBottom {
  position: fixed; right: 10px; width: 34px; height: 34px; line-height: 30px;
  text-align: center; font-size: 16px; color: #fff; background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.25); border-radius: 50%;
  cursor: pointer; display: none; z-index: 20;
}
#toTop { bottom: 56px; } #toBottom { bottom: 14px; }
@media (max-width: 760px) {
  main { flex-direction: column; }
  .pane.cmds { width: auto; }
  .form { grid-template-columns: 56px 1fr; }
  .cmp { flex-direction: column; }
}
