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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-right: 1px solid #293042;
  background: #171b26;
}

.sidebar h1 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: #aab4cf;
  font-size: 0.9rem;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid #384258;
  border-radius: 0.75rem;
  background: #0f1320;
  color: #eef2ff;
  padding: 0.7rem 0.85rem;
}

button {
  border: 0;
  border-radius: 0.75rem;
  background: #6d8dff;
  color: #071023;
  cursor: pointer;
  font-weight: 700;
  padding: 0.75rem 1rem;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.metadata-panel {
  min-height: 0;
}

.metadata-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: #aab4cf;
}

pre {
  overflow: auto;
  max-height: 35vh;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid #293042;
  border-radius: 0.75rem;
  background: #0b0e16;
  color: #c8d2f2;
  font-size: 0.78rem;
}

.chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
}

.status {
  border-bottom: 1px solid #293042;
  color: #aab4cf;
  padding: 0.85rem 1.25rem;
}

.transcript {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: auto;
  padding: 1.25rem;
}

.message {
  max-width: 920px;
  border: 1px solid #293042;
  border-radius: 1rem;
  padding: 1rem;
  white-space: pre-wrap;
}

.message.user {
  align-self: flex-end;
  background: #1c294a;
}

.message.assistant {
  align-self: flex-start;
  background: #171b26;
}

.message-header {
  margin-bottom: 0.5rem;
  color: #aab4cf;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  border-top: 1px solid #293042;
  padding: 1rem 1.25rem;
  background: #171b26;
}

@media (max-width: 800px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #293042;
  }
}
