:root {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

body {
  margin: 0;
  background: #0b0f19;
  color: #e9eefc;
}

.wrap {
  max-width: 920px;
  margin: 28px auto;
  padding: 0 16px;
  display: grid;
  gap: 16px;
}

.card {
  background: #111827;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

h1, h2 { margin: 0 0 6px; }
.muted { color: rgba(233,238,252,0.7); }
.small { font-size: 12px; }

.row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}
.row.actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }

label { font-size: 12px; color: rgba(233,238,252,0.75); }

input {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  color: #e9eefc;
  padding: 12px 12px;
  outline: none;
}
input:focus { border-color: rgba(255,255,255,0.25); }

button {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.10);
  color: #e9eefc;
  padding: 12px 12px;
  cursor: pointer;
}
button:hover { background: rgba(255,255,255,0.14); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary { background: transparent; }

.status {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 13px;
}

.chat .messages {
  height: 360px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  padding: 12px;
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.msg {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
}

.meta {
  font-size: 12px;
  color: rgba(233,238,252,0.75);
  display: flex;
  gap: 10px;
}

.text {
  white-space: pre-wrap;
  line-height: 1.3;
}

.chatHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 10px;
}

@media (max-width: 720px) {
  .row { grid-template-columns: 1fr; }
  .row.actions { grid-template-columns: 1fr; }
}