.chat-content { display: grid; gap: 9px; min-width: 0; }
.chat-note, .chat-state, .chat-content .chat-error { margin: 0; font-size: 13px; }
.chat-state:empty { display: none; }
.chat-log { min-height: 140px; height: min(28vh, 270px); overflow-y: auto; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fc; }
.chat-log > p { margin: 0; }
.chat-message { width: fit-content; max-width: 88%; margin-bottom: 9px; padding: 6px 10px; border: 1px solid #e1e8f2; border-radius: 9px; background: #fff; }
.chat-message.own { margin-left: auto; background: #e6efff; border-color: #d6e4ff; }
.chat-message small { color: #4b607e; font-size: 11px; }
.chat-message p { margin: 3px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-form { display: grid; gap: 8px; }
.chat-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 650; }
.chat-form textarea { resize: vertical; }
.chat-form button { justify-self: end; }
.chat-desk { display: grid; grid-template-columns: minmax(160px, 260px) minmax(0, 1fr); gap: 18px; margin-top: 15px; }
.chat-inbox { min-width: 0; }
#chat-list { display: grid; gap: 4px; max-height: 455px; overflow: auto; }
.chat-thread { display: grid; grid-template-columns: 1fr auto; gap: 3px 6px; align-items: baseline; padding: 8px 10px; width: 100%; text-align: left; background: #f5f8fc; color: #304663; border-color: #e4ebf5; }
.chat-thread[aria-pressed=true] { border-color: #86aafa; background: #eaf1ff; }
.chat-thread span { font-size: 12px; }
.chat-thread small { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #536780; }
.chat-pages { display: flex; gap: 7px; margin-top: 8px; }
#chat-thread-title { margin: 0; }
@media (max-width: 650px) {
  .chat-desk { grid-template-columns: 1fr; gap: 12px; }
  #chat-list { max-height: 170px; }
}
.chat-options { width: 100%; }
.chat-options-body { display: grid; gap: 10px; padding-top: 10px; }
.chat-options-body p { margin: 0; }
.chat-thread[data-unread=true] { border-color: #6d98ff; background: #eef4ff; }
