.inbox-panel {
  min-height: 0;
  margin-bottom: 16px;
}

.metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.conversation-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 9px;
  max-height: 360px;
  overflow: auto;
  padding-right: 3px;
}

.conversation {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px;
  background: #0d161e;
  cursor: pointer;
}

.conversation:hover,
.conversation.unread {
  border-color: rgba(67, 214, 197, .55);
  background: #101e25;
}

.conversation.triage-advertising,
.conversation.triage-spam,
.conversation.triage-closed {
  opacity: .78;
  border-style: dashed;
}

.triage-label.advertising { color: #ffd166; }
.triage-label.spam { color: #ff7b8a; }
.triage-label.customer { color: #67e8d5; }
.triage-label.closed { color: var(--muted); }

.triage-panel {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #0d161e;
}

.triage-panel small { color: var(--muted); }
.triage-actions { flex-wrap: wrap; }
.triage-actions button.selected { box-shadow: inset 0 0 0 2px rgba(67, 214, 197, .75); }

.conversation p {
  margin: 7px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.conversation-messages {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  max-height: 36vh;
  overflow: auto;
  overflow-x: hidden;
}

.message {
  max-width: 82%;
  border-radius: 13px;
  padding: 10px 12px;
  background: #17232e;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message.out {
  align-self: flex-end;
  background: #135149;
}

.message p {
  margin: 0 0 5px;
  white-space: pre-wrap;
}

.message small {
  color: var(--muted);
}

.draft-panel {
  margin-bottom: 16px;
}

.draft-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.draft {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0d161e;
  cursor: pointer;
}

.draft:hover,
.draft:focus {
  border-color: rgba(67, 214, 197, .55);
  outline: none;
}

.draft p {
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.draft-editor {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.vehicle-lead {
  width: 100%;
  margin-top: 12px;
}

.list-footer {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(147, 162, 175, .14);
  color: var(--muted);
  font-size: 12px;
}

.list-footer button {
  padding: 8px 12px;
}

@media (max-width: 900px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .list-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .list-footer button {
    width: 100%;
  }
}
