
:root{
  --bg:#0b1220;--card:#121a2b;--muted:#98a2b3;--fg:#e6edf3;--brand:#7c5cff;--ok:#28c76f;--warn:#ff9f43;--err:#ea5455
}

.status.loading {
  position: relative;
  padding-right: 22px;
}
.status.loading::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: btnspin 0.8s linear infinite;
}



/* utilities (if you haven't added them yet) */
.mt-12 { margin-top: 12px; }
.ml-8  { margin-left: 8px; }

/* JWT box — single line, clipped with ellipsis */
pre.jwt-box {
  display: block;
  max-width: 100%;
  white-space: nowrap;      /* force one line */
  overflow: hidden;         /* clip overflow */
  text-overflow: ellipsis;  /* show … at the end */
  padding: 8px;
  border: 1px solid #223055;
  border-radius: 8px;
  background: #0d1526;
  color: #e6edf3;
  font-size: 0.85rem;
}

/* Button loading spinner */
.btn.loading {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}
.btn.loading::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: btnspin 0.8s linear infinite;
}
@keyframes btnspin { to { transform: rotate(360deg); } }


/* stronger hidden, so JSON blocks stay hidden until you show them */
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* red button for Disconnect */
.btn.danger { background: #d9534f; color: #fff; }
.btn.danger:hover { filter: brightness(0.95); }

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:linear-gradient(180deg,#060b17,#0b1220);color:var(--fg);font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial}
a{color:var(--brand);text-decoration:none}
.container{max-width:1100px;margin:0 auto;padding:24px}
.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}
.brand{display:flex;gap:10px;align-items:center;font-weight:700;font-size:20px}
.brand .logo{width:28px;height:28px;border-radius:8px;background:radial-gradient(120% 120% at 20% 10%,#9d8cff 0,#7c5cff 40%,#4234b9 80%)}
.card{background:rgba(255,255,255,0.04);backdrop-filter: blur(6px);border:1px solid rgba(255,255,255,0.08);border-radius:16px;padding:16px}
.grid{display:grid;gap:16px}
.grid.cols-2{grid-template-columns: repeat(2,minmax(0,1fr))}
.grid.cols-3{grid-template-columns: repeat(3,minmax(0,1fr))}
.input{display:flex;flex-direction:column;gap:6px}
.input label{color:var(--muted);font-size:13px}
.input input,.input textarea,.input select{background:#0d1526;border:1px solid #1e2a44;color:var(--fg);border-radius:12px;padding:10px 12px;outline:none}
.input input:focus,.input textarea:focus,.input select:focus{border-color:#435bff}
.row{display:flex;gap:10px;align-items:center}
.btn{background:var(--brand);color:white;border:0;border-radius:12px;padding:10px 14px;font-weight:600;cursor:pointer}
.btn.secondary{background:#1d2741}
.btn.ok{background:var(--ok)}
.btn.warn{background:var(--warn)}
.btn.err{background:var(--err)}
hr.sep{border:0;border-top:1px solid rgba(255,255,255,0.08);margin:12px 0}
small.muted{color:var(--muted)}
.kbd{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,'Liberation Mono','Courier New',monospace;background:#0d1526;border:1px solid #1e2a44;border-radius:6px;padding:2px 6px}
.section h3{margin:0 0 12px 0}
.list{display:flex;flex-direction:column;gap:8px}
.item{display:flex;justify-content:space-between;gap:12px;padding:10px;border:1px solid #1e2a44;border-radius:12px;background:#0d1526}
.status{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border-radius:999px;background:#16213a;border:1px solid #223055;color:#cbd5e1;font-size:12px}
img.qr{max-width:280px;border:1px dashed #334155;border-radius:8px;background:#0d1526;padding:6px}
footer{margin-top:24px;color:var(--muted);font-size:13px}
@media(max-width:900px){.grid.cols-3{grid-template-columns:1fr}.grid.cols-2{grid-template-columns:1fr}}
