* { box-sizing: border-box; }
body {
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  margin: 0;
}
.topbar {
  background: #1e293b;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
}
.topbar a { color: #38bdf8; text-decoration: none; font-weight: 600; }
.container { max-width: 960px; margin: 0 auto; padding: 24px; }
.card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 18px;
}
h1, h2, h3 { margin-top: 0; }
input, select, textarea {
  width: 100%;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  margin-bottom: 10px;
  font-size: 14px;
}
label { font-size: 13px; color: #94a3b8; display: block; margin-bottom: 4px; }
button, .btn {
  background: #38bdf8;
  color: #0f172a;
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
}
.btn.secondary { background: #334155; color: #e2e8f0; }
.btn.danger { background: #f87171; color: #1e293b; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge.connected { background: #22c55e33; color: #4ade80; }
.badge.disconnected, .badge.logged_out { background: #f8717133; color: #f87171; }
.badge.connecting, .badge.qr { background: #facc1533; color: #facc15; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid #334155; font-size: 14px; }
.device-item { display: flex; justify-content: space-between; align-items: center; }
.tree-node { margin-left: 20px; border-left: 2px solid #334155; padding-left: 12px; margin-top: 8px; }
.node-box { background: #0f172a; border: 1px solid #334155; border-radius: 8px; padding: 10px; margin-bottom: 6px; }
.tag { font-size: 11px; background: #334155; padding: 2px 8px; border-radius: 999px; margin-left: 6px; }
.qr-box { text-align: center; padding: 20px; }
.qr-box img { width: 260px; height: 260px; background: #fff; padding: 10px; border-radius: 8px; }
.flex { display: flex; gap: 10px; flex-wrap: wrap; }
.muted { color: #94a3b8; font-size: 13px; }
code { background: #0f172a; padding: 2px 6px; border-radius: 4px; }
