:root {
  --bg: #101114;
  --surface: #1a1c21;
  --border: #2b2e36;
  --text: #e8e9ec;
  --muted: #8b8f99;
  --accent: #4f8cff;
  --danger: #e5484d;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.topbar nav a { color: var(--muted); text-decoration: none; margin-left: 1.1rem; }
.topbar nav a:hover { color: var(--text); }
main { display: flex; justify-content: center; padding: 2.5rem 1rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 26rem;
}
.card.wide { max-width: 46rem; }
h1 { margin-top: 0; font-size: 1.4rem; }
h2 { font-size: 1.05rem; margin-top: 1.8rem; }
label { display: block; margin: 0.9rem 0 0.3rem; font-size: 0.9rem; color: var(--muted); }
input, select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}
.identifier-row { display: flex; gap: 0.5rem; }
.identifier-row select { width: auto; flex: 0 0 auto; }
button {
  margin-top: 1.2rem;
  width: 100%;
  padding: 0.65rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
button:hover { filter: brightness(1.1); }
button.danger { background: var(--danger); }
.inline-form { display: flex; gap: 0.6rem; align-items: center; }
.inline-form input { max-width: 10rem; }
.inline-form button { margin-top: 0; width: auto; padding: 0.65rem 1rem; }
.error { color: var(--danger); font-size: 0.9rem; }
.alt, .muted { color: var(--muted); font-size: 0.9rem; }
.alt a { color: var(--accent); }
table { width: 100%; border-collapse: collapse; margin-top: 0.8rem; }
th, td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.btn-link { color: var(--accent); text-decoration: none; font-weight: 600; }
dl { display: grid; grid-template-columns: 6rem 1fr; gap: 0.35rem 1rem; }
dt { color: var(--muted); }
dd { margin: 0; }
code { background: var(--bg); padding: 0.15rem 0.4rem; border-radius: 6px; font-size: 0.8rem; word-break: break-all; }
#qr { background: white; border-radius: 8px; padding: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.7rem; margin: 1rem 0; }
.stat { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem; display: flex; flex-direction: column; gap: 0.2rem; }
.stat strong { font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: 0.82rem; }
.count { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.inline-btn { width: auto; margin-top: 0.4rem; padding: 0.5rem 1rem; }
#invite-result { margin: 0.6rem 0 1rem; }
