:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0d1117;
  color: #e6edf3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #172033, #0d1117 42rem);
}

.app {
  width: min(980px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 24px 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
}

.header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

h1 { margin: 0; font-size: 28px; }
p { margin: 6px 0 0; color: #9da7b3; }

.status {
  border: 1px solid #30363d;
  border-radius: 999px;
  padding: 8px 12px;
  background: #161b22;
  color: #a5d6ff;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
  border: 1px solid #30363d;
  border-radius: 18px;
  background: rgba(22, 27, 34, 0.92);
  padding: 28px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.login-form {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.login-form input[type="password"] {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e6edf3;
  padding: 12px;
  font: inherit;
}

.small-note {
  font-size: 13px;
  line-height: 1.45;
}

.notice {
  border: 1px solid #3b434d;
  background: rgba(22, 27, 34, 0.86);
  border-radius: 14px;
  padding: 12px 14px;
  color: #c9d1d9;
}

.transcript {
  min-height: 420px;
  max-height: calc(100vh - 260px);
  overflow: auto;
  border: 1px solid #30363d;
  border-radius: 16px;
  background: rgba(13, 17, 23, 0.82);
  padding: 14px;
}

.event {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #30363d;
  background: #161b22;
}

.event-user { border-color: #2f81f7; }
.event-agent { border-color: #3fb950; }
.event-error { border-color: #f85149; }
.event-status { border-color: #a371f7; }

.meta {
  color: #8b949e;
  font-size: 12px;
  margin-bottom: 6px;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.35;
}

.composer {
  display: grid;
  gap: 10px;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 70px;
  border-radius: 14px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e6edf3;
  padding: 12px;
  font: inherit;
}

.buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

button {
  border: 1px solid #30363d;
  background: #238636;
  color: white;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
button.danger { background: #da3633; }
button.secondary { background: #30363d; }

@media (max-width: 640px) {
  .header { align-items: flex-start; flex-direction: column; }
  .buttons { flex-direction: column; }
  button { width: 100%; }
}
