* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f8fafc;
  color: #0f172a;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}
.topbar h1 { margin: 0; font-size: 18px; }
.pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}
.pill.ok { background: #dcfce7; color: #166534; }
.pill.err { background: #fee2e2; color: #991b1b; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  padding: 20px 24px;
}
.panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
}
.panel h2 { margin: 0 0 12px; font-size: 15px; }
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
button {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
button:hover { background: #f1f5f9; }
.output {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  overflow: auto;
  max-height: 420px;
}
.auth-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
}
.auth-row input {
  flex: 1;
  min-width: 180px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
}
.status-line {
  font-size: 12px;
  color: #475569;
  margin-bottom: 10px;
}
.subhead {
  margin: 16px 0 8px;
  font-size: 13px;
  color: #334155;
}
.prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.prompt-chip {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
  font-size: 12px;
}
.prompt-chip:hover {
  background: #ffe4e6;
}
.trace-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}
.trace-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
  font-size: 12px;
}
.trace-title { font-weight: 600; margin-bottom: 4px; }
.trace-summary { color: #334155; }
.trace-meta { color: #64748b; margin-top: 4px; font-family: monospace; white-space: pre-wrap; }
