:root {
  color: #172033;
  background: #f4f7fb;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  color: #fff;
  background: #0f766e;
  cursor: pointer;
}

button.secondary {
  border: 1px solid #c8d3df;
  color: #172033;
  background: #fff;
}

input {
  width: 100%;
  border: 1px solid #c8d3df;
  border-radius: 8px;
  padding: 12px;
  color: #172033;
  background: #fff;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-right: 1px solid #d9e2ec;
  background: #ffffff;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #0f766e;
  font-weight: 800;
}

.brand strong,
.brand span,
.panel,
.conversation,
.message {
  min-width: 0;
}

.brand strong {
  display: block;
  font-size: 22px;
}

.brand span,
.hint,
.label,
.conversation span,
.meta {
  color: #637083;
  font-size: 13px;
}

.panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fafc;
}

.panel h1 {
  margin: 0;
  font-size: 20px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.conversation-list,
.results {
  display: grid;
  gap: 8px;
  overflow: auto;
}

.conversation {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  color: #172033;
  background: transparent;
}

.conversation.active,
.conversation:hover {
  border-color: #99f6e4;
  background: #ecfeff;
}

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

.chat-header,
.composer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #d9e2ec;
  background: rgba(255, 255, 255, 0.8);
}

.chat-header h2 {
  margin: 2px 0 0;
  font-size: 24px;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  overflow: auto;
}

.message {
  width: min(620px, 88%);
  padding: 12px 14px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.06);
}

.message.mine {
  align-self: flex-end;
  border-color: #99f6e4;
  background: #ccfbf1;
}

.message p {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.composer {
  border-top: 1px solid #d9e2ec;
  border-bottom: 0;
}

.hidden {
  display: none !important;
}

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

  .sidebar {
    max-height: 48vh;
    border-right: 0;
    border-bottom: 1px solid #d9e2ec;
  }

  .chat {
    min-height: 52vh;
  }
}
