.chat-body { min-height: 100vh; display: flex; flex-direction: column; }

.chat-header { gap: 12px; flex-wrap: wrap; }
.chat-link {
  color: var(--text); text-decoration: none; font-size: 13px; background: none; cursor: pointer;
  border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font-family: inherit;
}
.chat-link:hover { background: var(--panel); }

.chat-main {
  flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}

.chat-nota { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.chat-mensajes { flex: 1; display: flex; flex-direction: column; gap: 12px; min-height: 200px; }

.msg { max-width: 88%; padding: 10px 14px; border-radius: 12px; line-height: 1.55; font-size: 14.5px; overflow-wrap: anywhere; }
.msg p { margin: 0 0 8px; }
.msg p:last-child { margin-bottom: 0; }
.msg ul { margin: 4px 0 8px; padding-left: 20px; }
.msg-usuario { align-self: flex-end; background: #233457; border: 1px solid #2f4673; }
.msg-trader { align-self: flex-start; background: var(--panel); border: 1px solid var(--border); }
.msg-trader .quien { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.msg-error { align-self: flex-start; background: #3a1010; border: 1px solid #5a1414; color: #ff8a8a; }
.msg-pensando { color: var(--muted); font-style: italic; }

.chat-sugerencias { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-sugerencias button {
  background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.chat-sugerencias button:hover { border-color: var(--accent); }

.chat-form { display: flex; gap: 8px; position: sticky; bottom: 0; background: var(--bg); padding: 8px 0 4px; }
.chat-form textarea {
  flex: 1; resize: vertical; min-height: 44px; max-height: 200px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; font-size: 15px;
}
.chat-form button {
  background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 0 18px;
  font-weight: 600; cursor: pointer; font-family: inherit; font-size: 14px;
}
.chat-form button:disabled { opacity: 0.5; cursor: wait; }

@media (max-width: 600px) {
  .chat-header h1 { font-size: 16px; }
  .msg { max-width: 100%; }
}
