:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #eef2f7;
  color: #111827;
}

* {
  box-sizing: border-box;
}

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

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

.panel {
  width: min(980px, 100%);
  height: min(820px, calc(100vh - 48px));
  min-height: 560px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #e5eaf3;
  background: #fbfcff;
}

.eyebrow {
  margin: 0 0 4px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.status {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 13px;
  white-space: nowrap;
}

.messages {
  overflow-y: auto;
  padding: 22px;
  background:
    linear-gradient(#f8fafc 0 0) padding-box,
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08))
      border-box;
}

.message {
  display: flex;
  margin-bottom: 14px;
}

.message.user {
  justify-content: flex-end;
}

.bubble {
  max-width: min(680px, 86%);
  padding: 12px 14px;
  border-radius: 8px;
  line-height: 1.65;
  font-size: 15px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.assistant .bubble {
  color: #172033;
  background: #ffffff;
  border: 1px solid #dce4ef;
}

.user .bubble {
  color: #ffffff;
  background: #2563eb;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid #e5eaf3;
  background: #ffffff;
}

textarea {
  width: 100%;
  max-height: 160px;
  resize: none;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 13px;
  font: inherit;
  line-height: 1.45;
  outline: none;
}

textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

button {
  min-width: 84px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: white;
  background: #111827;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 640px) {
  .shell {
    padding: 0;
  }

  .panel {
    min-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border: 0;
  }

  .topbar {
    padding: 14px 16px;
  }

  h1 {
    font-size: 20px;
  }

  .messages {
    padding: 16px;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  button {
    height: 44px;
  }
}
