:root {
  --bg: #11151c; --card: #1a2029; --text: #e6e9ef; --muted: #8a93a3;
  --accent: #3fa9f5; --ok: #3ddc84; --err: #ff5566; --border: #2a3342;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, sans-serif; line-height: 1.45;
}
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 1.2rem; border-bottom: 1px solid var(--border);
}
h1 { font-size: 1.2rem; margin: 0; }
h2 { font-size: 1.05rem; }
h3 { font-size: .95rem; color: var(--muted); margin: .2rem 0 .6rem; }
section { padding: 1rem 1.2rem; max-width: 1100px; margin: 0 auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem; margin-bottom: 1rem;
}
input, select, button {
  width: 100%; padding: .55rem .7rem; margin: .25rem 0; font-size: .95rem;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px;
}
label { display: block; font-size: .85rem; color: var(--muted); margin-top: .4rem; }
button { cursor: pointer; background: #232c3a; width: auto; padding-inline: 1rem; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: #061320; font-weight: 600; }
.row { display: flex; gap: .5rem; margin-top: .5rem; }
.err { color: var(--err); min-height: 1.2em; }
.dot { display: inline-block; width: .65em; height: .65em; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--ok); }
.device-tile { cursor: pointer; }
.device-tile:hover { border-color: var(--accent); }
.device-tile .uid { font-family: ui-monospace, monospace; color: var(--muted); font-size: .85rem; }
table { width: 100%; font-size: .9rem; border-collapse: collapse; }
td { padding: .15rem 0; }
td:first-child { color: var(--muted); width: 45%; }
pre {
  background: var(--bg); border: 1px solid var(--border); border-radius: 7px;
  padding: .5rem; font-size: .78rem; max-height: 14em; overflow: auto; white-space: pre-wrap;
}
.wifi-item { display: flex; justify-content: space-between; align-items: center;
  padding: .3rem 0; border-bottom: 1px solid var(--border); }
.wifi-item button { padding: .25rem .7rem; font-size: .85rem; }
form#form-login { max-width: 340px; margin: 3rem auto; }
