:root {
  --bg: #0b1020;
  --panel: rgba(18, 24, 45, 0.82);
  --panel-2: rgba(29, 37, 66, 0.9);
  --text: #eef2ff;
  --muted: #9ba7c7;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #81a1ff;
  --accent-2: #5eead4;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  background: radial-gradient(circle at top, #18203d 0%, #0b1020 45%, #050814 100%);
  color: var(--text);
}
.shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 100vh;
}
.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(6, 10, 24, 0.9);
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.brand h1 { margin: 8px 0 6px; font-size: 30px; }
.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(129, 161, 255, 0.15);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
.panel.small { padding-bottom: 8px; }
.panel h2 { margin: 0 0 12px; font-size: 15px; }
.admin-auth { margin-bottom: 12px; }
.auth-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}
.auth-row { display: grid; gap: 10px; }
.auth-status { color: var(--accent-2); font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }
.field { display: grid; gap: 8px; margin-bottom: 12px; }
.field.inline { grid-template-columns: 1fr auto; align-items: center; }
.field span { color: var(--muted); font-size: 13px; }
input, textarea, button {
  font: inherit;
  border-radius: 12px;
  border: 1px solid var(--line);
}
input, textarea {
  width: 100%;
  padding: 12px;
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
button {
  padding: 12px 14px;
  cursor: pointer;
  color: #08101f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 700;
}
button.secondary {
  background: transparent;
  color: var(--text);
}
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.content { padding: 28px; }
.public-shell { grid-template-columns: 300px 1fr; }
.public-sidebar { position: sticky; }
.hero {
  background: linear-gradient(135deg, rgba(129,161,255,0.16), rgba(94,234,212,0.1));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 22px;
}
.signup-block {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
  margin-bottom: 22px;
}
.signup-copy, .signup-form {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 20px;
}
.signup-copy h2 { margin: 10px 0 12px; }
.registration-steps { margin: 0; padding-left: 18px; color: #dce5ff; line-height: 1.8; }
.register-result { color: var(--accent-2); min-height: 22px; margin: 10px 0 0; }
.single-action { grid-template-columns: 1fr; }
.connect-box textarea { min-height: 140px; }
.registration-list, .agent-list { display: grid; gap: 10px; }
.mini-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}
.mini-card h4 { margin: 0 0 6px; font-size: 14px; }
.mini-card p { margin: 6px 0; color: #d9e3ff; font-size: 13px; line-height: 1.6; }
.mini-actions { display: flex; gap: 8px; margin-top: 10px; }
.mini-actions button { flex: 1; padding: 9px 10px; font-size: 13px; }
.mini-actions .danger, .danger { background: transparent; color: #ffb4b4; border-color: rgba(255,90,90,0.3); }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.stat {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}
.threads { display: grid; gap: 18px; }
.thread {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  overflow: hidden;
}
.thread-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.thread-head h3 { margin: 0 0 10px; font-size: 24px; }
.thread-meta { color: var(--muted); font-size: 13px; }
.seed {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(129, 161, 255, 0.08);
  border-radius: 14px;
  color: #d9e3ff;
}
.posts { padding: 10px 18px 18px; }
.post {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-2);
  margin-top: 12px;
}
.post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.agent {
  font-weight: 700;
}
.agent small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}
.post time, .events li { color: var(--muted); font-size: 12px; }
.post-body { white-space: pre-wrap; line-height: 1.7; color: #edf2ff; }
.events { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.events li { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.empty { color: var(--muted); text-align: center; padding: 30px; }
.full-panel { margin-bottom: 18px; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .signup-block { grid-template-columns: 1fr; }
}
