:root {
  --bg: #09111f;
  --bg-soft: #101c30;
  --panel: rgba(12, 25, 44, 0.92);
  --panel-2: rgba(16, 32, 58, 0.92);
  --line: rgba(130, 167, 255, 0.18);
  --text: #edf3ff;
  --muted: #9bb0d1;
  --accent: #6ea8ff;
  --accent-2: #5ef2c2;
  --warn: #ffca70;
  --danger: #ff7c93;
  --ok: #79f29b;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  --radius: 18px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(110, 168, 255, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(94, 242, 194, 0.12), transparent 22%),
    linear-gradient(180deg, #08101d, #09111f 42%, #060b14 100%);
  min-height: 100vh;
}
.app {
  width: min(1600px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 34px;
}
.panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(12px);
}
.panel-head {
  padding: 15px 18px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head h2, .panel-head h3, .hero h1 { margin: 0; font-weight: 700; }
.panel-body { padding: 16px 18px 18px; }
.hero {
  padding: 18px 20px 20px;
  min-height: 188px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}
.hero p, .muted { color: var(--muted); margin: 0; }
.headline { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.badge-row, .chips, .actions, .login-actions, .nav-links, .stats-grid, .score-grid, .card-grid, .two-col, .three-col, .kvs, .agent-grid {
  display: grid;
  gap: 16px;
}
.badge-row, .chips, .actions, .login-actions, .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.badge, .chip, button, .pill, .nav-link {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 8px 12px;
  font-size: 12px;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.nav-link.active {
  background: rgba(110,168,255,0.22);
  border-color: rgba(110,168,255,0.45);
}
button {
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
button:hover, .nav-link:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.2); }
.primary { background: rgba(110,168,255,0.22); }
.success { background: rgba(121,242,155,0.17); }
.danger { background: rgba(255,124,147,0.16); }
.warn { background: rgba(255,202,112,0.18); }
.ghost { background: rgba(255,255,255,0.04); }
.shell-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; margin-bottom: 16px; }
.page-grid, .stats-grid, .card-grid, .two-col, .three-col, .kvs, .agent-grid, .score-grid {
  display: grid;
  gap: 16px;
}
.stats-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kvs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.score-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat, .item, .metric, .milestone-card, .agent-card, .json-box {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
}
.item.active, .agent-card.active {
  border-color: rgba(110,168,255,0.55);
  background: rgba(110,168,255,0.08);
}
.item h4, .item h5, .metric h4, .milestone-card h4, .agent-card h4, .stat h4 { margin: 0 0 6px; }
.item p, .metric p, .milestone-card p, .agent-card p, .stat p { margin: 0; color: var(--muted); font-size: 13px; }
.metric-top, .milestone-top, .agent-top, .json-head, .nav-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.stat strong, .metric strong { display: block; font-size: 26px; margin-top: 4px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin-top: 10px;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: inherit;
}
.mini { font-size: 12px; color: var(--muted); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
input, textarea, select {
  width: 100%;
  background: rgba(0,0,0,0.16);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}
pre {
  margin: 0;
  padding: 14px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.empty {
  padding: 28px 14px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(255,255,255,0.14);
  border-radius: 14px;
}
.hidden { display: none !important; }
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: min(560px, 100%);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.login-card h1 { margin: 0 0 10px; }
.login-card p { color: var(--muted); }
.login-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.status-line {
  margin-top: 14px;
  min-height: 22px;
  color: var(--muted);
  font-size: 14px;
}
.status-line.error { color: var(--danger); }
.status-line.ok { color: var(--ok); }
.page-shell { display: flex; flex-direction: column; gap: 16px; }
.section-title { margin: 0 0 8px; }
.subtle-divider { height: 1px; background: var(--line); margin: 2px 0; }
@media (max-width: 1200px) {
  .shell-grid, .card-grid, .two-col, .three-col, .stats-grid, .kvs, .agent-grid, .score-grid { grid-template-columns: 1fr; }
}
